summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLogan Chien <tzuhsiang.chien@gmail.com>2015-04-19 22:54:42 +0800
committerYang Ni <yangni@google.com>2015-04-21 16:15:09 +0000
commit21b0461a1afa012e9b0cf5f05d6648185d021e1f (patch)
tree5c3c45ed36749226bc10e4d62b23d0b0b8680f11
parent183a1750a1be2606d51a2666752b3f489249e04f (diff)
downloadrs-21b0461a1afa012e9b0cf5f05d6648185d021e1f.tar.gz
Handle error case when yylex() failed to parse.
Remove the incorrect characters in rs.spec as well. Change-Id: I7106e263e79239b970a7a1442efe2625dbe28298
-rw-r--r--rs.spec4
-rw-r--r--spec.l5
2 files changed, 7 insertions, 2 deletions
diff --git a/rs.spec b/rs.spec
index c2e3fd83..e9051ac0 100644
--- a/rs.spec
+++ b/rs.spec
@@ -159,7 +159,7 @@ AllocationGetPointer {
param uint32_t z
param uint32_t array
param size_t *stride
- ret void *s
+ ret void *
}
Allocation1DData {
@@ -367,7 +367,7 @@ ScriptSetTimeZone {
ScriptInvokeIDCreate {
param RsScript s
param uint32_t slot
- ret RsScriptInvokeID;
+ ret RsScriptInvokeID
}
ScriptInvoke {
diff --git a/spec.l b/spec.l
index a24bfd33..e5001591 100644
--- a/spec.l
+++ b/spec.l
@@ -187,6 +187,11 @@ ID [a-zA-Z_][a-zA-Z0-9_]*
BEGIN(INITIAL);
}
+<*>. {
+ fprintf(stderr, "error: unexpected character \'%c\' at line %d\n",
+ *yytext, num_lines + 1);
+ exit(1);
+ }
%%