Arithmetic Grammar Top-Down Parser
See image for lab instructions (instructions.png)
-
$lex lexer.l
-
$gcc -o lexer lex.yy.c
-
$echo TEST_EXPRESSION | ./lexer
EXAMPLES: $ echo 1+1 | ./lexer
Syntax Error--Invalid Input String
$ echo 22 | ./lexer
Valid Arithmetic Expression String
$ echo "22" | ./lexer
Valid Arithmetic Expression String
$ echo "9+2" | ./lexer
Syntax Error--Invalid Input String
$ echo "9 + 2" | ./lexer
Valid Arithmetic Expression String