Merge branch 'Dev' into Sprint1-TokenizeConstantsAndLiterals-FE-t#03
This commit is contained in:
@ -1,10 +1,12 @@
|
||||
/* so we placed the citation here. */
|
||||
/* definitions */
|
||||
%option noyywrap
|
||||
|
||||
%{
|
||||
#include "typedefs.h"
|
||||
%}
|
||||
|
||||
|
||||
DIGIT [0-9]
|
||||
CHAR \\n|\\t|\\'|[^'\n\t\\]
|
||||
/* char can be a newline, tab, an escaped quote, or anything but a single quote, an actual line break, an actual tab, or a backslash by itself (to prevent confusion from escaped quote */
|
||||
@ -15,6 +17,7 @@ ENDCOM \*\)
|
||||
COMMENTCHAR [^\*]|\*[^\)]
|
||||
/*Making the contents of a comment anything that is either not a * or not a * followed by ) to terminate comments at the first ENDCOM */
|
||||
%%
|
||||
|
||||
/* rules */
|
||||
{DIGIT}+ {printf( "C_INTEGER: %s (%d)\n", yytext, atoi( yytext ) );}
|
||||
|
||||
@ -43,4 +46,5 @@ int main( int argc, char **argv )
|
||||
else
|
||||
yyin = stdin;
|
||||
yylex();
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user