Skip to content
Snippets Groups Projects
Commit f13cb3ed authored by Oscar Amaya Mohr's avatar Oscar Amaya Mohr
Browse files

Update minako-lexic.l

parent 2b44b5aa
Branches
No related merge requests found
...@@ -17,7 +17,7 @@ BLOCK_COMMENT "/*"((("*"[^/])?)|[^*])*"*/" ...@@ -17,7 +17,7 @@ BLOCK_COMMENT "/*"((("*"[^/])?)|[^*])*"*/"
LINE_COMMENT "//".* LINE_COMMENT "//".*
INT [0-9]+ INT [0-9]+
FLOAT [0-9]+"."[0-9]+|"."[0-9]+([eE]([-+])?[0-9]+)?|[0-9]+[eE]([-+])?[0-9]+ FLOAT [0-9]+"."[0-9]+|"."[0-9]+([eE]([-+])?[0-9]+)?|[0-9]+[eE]([-+])?[0-9]+
ID ([a-zA-Z])+([0-9]|[a-zA-Z])* ID [[:alpha:]]+[[:alnum:]]*
PUNCTUATION "+"|"-"|"*"|"/"|"="|"("|")"|"{"|"}"|","|";" PUNCTUATION "+"|"-"|"*"|"/"|"="|"("|")"|"{"|"}"|","|";"
WHITESPACE [ \t\n\r] WHITESPACE [ \t\n\r]
...@@ -51,12 +51,12 @@ while return KW_WHILE; ...@@ -51,12 +51,12 @@ while return KW_WHILE;
true yylval.intValue = 1; return CONST_BOOLEAN; true yylval.intValue = 1; return CONST_BOOLEAN;
false yylval.intValue = 0; return CONST_BOOLEAN; false yylval.intValue = 0; return CONST_BOOLEAN;
\" BEGIN(st); \" BEGIN(st);
<st>[^\n\"]*/\" yylval.string = yytext; BEGIN(INITIAL);return CONST_STRING; <st>[^\n\"]*/\" yylval.string = yytext; BEGIN(INITIAL); return CONST_STRING;
{ID} yylval.string = yytext; return ID; {ID} yylval.string = yytext; return ID;
{PUNCTUATION} return (int)(*yytext); {PUNCTUATION} return (int)(*yytext);
{WHITESPACE} {WHITESPACE}
. invalid_token(); . invalid_token();
<<EOF>> return EOF; <<EOF>> return EOF;
%% %%
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment