commit | 21b0461a1afa012e9b0cf5f05d6648185d021e1f | [log] [tgz] |
---|---|---|
author | Logan Chien <tzuhsiang.chien@gmail.com> | Sun Apr 19 22:54:42 2015 +0800 |
committer | Yang Ni <yangni@google.com> | Tue Apr 21 16:15:09 2015 +0000 |
tree | 5c3c45ed36749226bc10e4d62b23d0b0b8680f11 | |
parent | 183a1750a1be2606d51a2666752b3f489249e04f [diff] [blame] |
Handle error case when yylex() failed to parse. Remove the incorrect characters in rs.spec as well. Change-Id: I7106e263e79239b970a7a1442efe2625dbe28298
diff --git a/spec.l b/spec.l index a24bfd3..e500159 100644 --- a/spec.l +++ b/spec.l
@@ -187,6 +187,11 @@ BEGIN(INITIAL); } +<*>. { + fprintf(stderr, "error: unexpected character \'%c\' at line %d\n", + *yytext, num_lines + 1); + exit(1); + } %%