Skip to content

About

A compiler for C like Language.

Resources

Stars

0 stars

Watchers

0 watching

Forks

 
 

Latest commit

 

History

8 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Compilers-Lab

A compiler for C like Language.

Flex is used for Lexical Analysis and Bison is used for syntax and semantic Analysis.

The language supports arithmetic, relational, logical operators( with short-circuiting), iterative and conditional statements(with nesting), functions, primitive data types.

How to Run

These are the commands to be executed :-

  • bison -d bison.y
  • flex flex.l
  • g++ -std=c++11 bison.tab.c lex.yy.c
  • ./a.out < input.cpp

bison.tab.c and lex.yy.c files are automatically generated from the execution of first two commands.

input.cpp is the name of the file containing C language code which is to be compiled.

About

A compiler for C like Language.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages