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);
+    }
 
 %%