Skip to content

Latest commit

 

History

History
37 lines (24 loc) · 1.17 KB

README.md

File metadata and controls

37 lines (24 loc) · 1.17 KB

Parser for Mini C Language 💻

This project consists in implementing a mini C compiler using lex and yacc.

Team Members

  1. Bruno Medeiros
  2. Joel Pinto -> GitHub Account: https://github.com/Fockester
  3. Jorge Machado -> GitHub Account: https://github.com/Twixxx79

Phases

  1. DONE Lexical analyser
  2. DONE Parser
  3. DONE Latex Report

Parser Specifications

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.

Observations

  1. The report file was written in portuguese as so the comments in the .yac and .l files.
  2. 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! 😄