A compiler for subset of C using lex and yacc.
lex
yacc
chmod -x compile
./compile
./parser test-case.txt
- Nested code blocks
- +=, -= supported
- for loops and nested for loops
- integer assignment and declaration
- if-else handled
- array assignment, array declaration
- comma separated initialization/declaration e.g int a=10,b;
- support for short, long , long long , signed and unsigned
- while statements supported
- unary expressions supported in both lhs, rhs and standalone statements
- display specific errors with line numbers
- LEX
- YACC