PardhivA / C-Compiler

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

C Compiler

A custom made compiler for C Language made using yacc and flex

All the basic constructs like variable declarations, arithmetic expressions, assignments, control-flow constructors like if , if-else, swithc, loop constructs like while, do-while along with break and continue statements are present.

How to run

Make sure flex and yacc are installed in your system. If you are using windows, you can wsl for linux and run. Get into one of the folders and run these commands

  cd cs21b003_lab11 // for example
  make clean
  make fname=prob1
  ./parser input1

Usage/Examples

Screenshot from 2023-12-04 13-33-56

About


Languages

Language:C 88.6%Language:Yacc 9.1%Language:Lex 2.2%Language:Makefile 0.2%