This project consists in implementing a mini C compiler using lex and yacc.
- Bruno Medeiros
- Joel Pinto -> GitHub Account: https://github.com/Fockester
- Jorge Machado -> GitHub Account: https://github.com/Twixxx79
DONE
Lexical analyserDONE
ParserDONE
Latex Report
The syntactic analyser should parse programs that contain:
- Whole and real numbers
- Declaration of variables: int, float, char, void, double
- Assignment instructions and instructions while, for, if, else, printf
- Data structures: struct
- Other commands: #include
- Operators: <=,> =, == ,! =, <,>
- Comments: text between / ∗ and ∗ /
It can also detected multiple errors in multiple lines and tell which token is missing.
- The report file was written in portuguese as so the comments in the .yac and .l files.
- The main.c file contains an example code written in naive C (simplistic C) where it contains 3 errors that will be detected by the parser when executed.
Thanks for reading! 😄