diff --git a/lexicalStructure.lex b/lexicalStructure.lex index de6d394..5027607 100644 --- a/lexicalStructure.lex +++ b/lexicalStructure.lex @@ -13,7 +13,7 @@ DIGIT [0-9] "null" {printf( "C_NULL: %s (%d)\n", yytext, atoi( yytext ) );} -"'"[.|\n]"'" {printf( "C_CHARACTER: %s (%d)\n", yytext, atoi( yytext ) );} /*using double \ per documentation to show escaped chars*/ +\'.\'|\'\\[nt]\' {printf( "C_CHARACTER: %s (%d)\n", yytext, atoi( yytext ) );} /*using double \ per documentation to show escaped chars*/ "true" {printf( "C_TRUE: %s (%d)\n", yytext, atoi( yytext ) );} diff --git a/simpleLiteralTest.a b/simpleLiteralTest.a index d93c06a..d33541e 100644 --- a/simpleLiteralTest.a +++ b/simpleLiteralTest.a @@ -8,4 +8,9 @@ null '7' true '189 +'/n' +'/t' +'"' +'/' +