From 0f76a9da53bdb1beb48ef76b59baebf5473a3011 Mon Sep 17 00:00:00 2001 From: Stefano Sanfilippo Date: Sun, 23 Nov 2014 23:14:43 +0100 Subject: [PATCH] Complete valid tokens in "shift" status. --- Monicelli.ll | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Monicelli.ll b/Monicelli.ll index f139028..5e9545c 100644 --- a/Monicelli.ll +++ b/Monicelli.ll @@ -17,7 +17,7 @@ CHAR [a-zA-Z_] %x shift %% -("\r\n"|"\n") { +("\r\n"|"\n") { lineNumber += 1; } @@ -153,7 +153,7 @@ CHAR [a-zA-Z_] return CASE_END; } -[ \t\f\v] {} +[ \t\f\v] {} {CHAR}({DIGIT}|{CHAR})* { yylval.strval = strdup(yytext); @@ -165,7 +165,7 @@ CHAR [a-zA-Z_] return NUMBER; } -. { +. { yyerror("Unexpected token"); return -1; };