finished string and char updates and testing updates task 03
This commit is contained in:
@ -6,8 +6,9 @@
|
||||
%}
|
||||
|
||||
DIGIT [0-9]
|
||||
CHAR \\\\n|\\\\t|\\\'|[^'\\\n\t]
|
||||
STRINGVAL CHAR | " "
|
||||
CHAR \\n|\\t|\\'|[^'\n\t\\]
|
||||
SCHAR \\n|\\t|\\\"|[^\"\n\\]
|
||||
|
||||
%%
|
||||
/* rules */
|
||||
{DIGIT}+ {printf( "C_INTEGER: %s (%d)\n", yytext, atoi( yytext ) );}
|
||||
@ -20,7 +21,7 @@ STRINGVAL CHAR | " "
|
||||
|
||||
"false" {printf( "C_FALSE: %s (%d)\n", yytext, atoi( yytext ) );}
|
||||
|
||||
"{STRINGVAL}+" {printf( "C_STRING: %s (%d)\n", yytext, atoi( yytext ) );}
|
||||
\"{SCHAR}+\" {printf( "C_STRING: %s (%d)\n", yytext, atoi( yytext ) );}
|
||||
|
||||
.|\n
|
||||
|
||||
|
Reference in New Issue
Block a user