ref: d82cd3b9dba1335ff981f2816672501babf55e11
parent: 9fbc6a472de910787bc0ba27ceac576392b46045
author: Roberto E. Vargas Caballero <[email protected]>
date: Sat Dec 16 03:12:54 EST 2017
[as] Fix string and iden parser After the last changes string() didn't parsed the full string and iden would consume the full input string.
--- a/as/expr.c
+++ b/as/expr.c
@@ -195,10 +195,11 @@
case '$':
continue;
default:
- break;
+ goto out_loop;
}
}
+out_loop:
tok2str();
yylval.sym = lookup(yytext);
@@ -236,8 +237,10 @@
int c;
char *p;
- while (*endp != '"')
- ++endp;
+ for (++endp; *endp++ != '"'; )
+ ;
+ tok2str();
+
return STRING;
}