Don't forget to BEGIN(INITIAL) when terminating a string

This commit is contained in:
josh committed 2018-04-07 09:31:10 -04:00
1 parent aaf47bf934
commit 49e4e853be
1 file changed
+4 -1
+4 -1
View File
@@ -109,7 +109,10 @@ sizeof return TOK_SIZEOF;
BEGIN(str); BEGIN(str);
} }
<str>{ <str>{
\" return TOK_STR_CONST; \" {
BEGIN(INITIAL);
return TOK_STR_CONST;
}
\\x[0-9A-Fa-f]{2} { \\x[0-9A-Fa-f]{2} {
/* hexadecimal escape code */ /* hexadecimal escape code */
unsigned int val; unsigned int val;