Skip to content

Latest commit

 

History

History
37 lines (32 loc) · 1.04 KB

README.md

File metadata and controls

37 lines (32 loc) · 1.04 KB

Grammar

You can find the Grammar for C language here.

I have attached the reduced grammar that we worked on in this repo.


How to run

  1. While being in the curent repo, i.e., C-Parser use the folowing command in the terminal to run.
./build <file_path_to_parse>
  1. Output will be printed on the terminal.
  2. If you do not wan't file contents to be printed, goto src/parser.cpp file and change PRINT_FILE_CONTENTS to anything other than 1.

To Know

  1. First and Follow Table has been given here.
  2. Predictive Parsing Table has been given here.
  3. We used the following syntax to print colored text in terminal.
\e[<color code>m<text>\e[0m

Color Code
Black 30
Red 31
Green 32
Yellow 33
Blue 34
Magenta 35
Cyan 36
White 37