Skip to content

Simple Programming Language using Lex and Yacc

Notifications You must be signed in to change notification settings

AymanAzzam/Cplus

Repository files navigation

Cplus

Compiler for C++ using Flex(Lex) and Bison(Yacc), that compiles:

  1. if else, switch case default.
  2. for, do while, while.
  3. fuctions, nested blocks.
  4. expressions, all operators(arithmetic, assignment, ..etc).
  5. data types (int, float, char, bool, const).
  6. break, continue.

Dependencies

JDK 11 Flex Bison Cmake G++
User Dev Dev Dev Dev

Build

Run the following script:

./build.sh

Compile a program using the GUI

Double click on Executables/GUI.jar or run the following command from the Executables directory:

java -jar /GUI.jar

Compile a program without the GUI

Put your code file in build folder and name it 'source.cp' then run the followig command from the build directory:

./cplus

You will get 3 output files:

  • quad.txt contains the quadruples.
  • log.txt contains any errors and warnings.
  • table.txt contains the data in the symbol table after compiling the program.

Team Members

  1. Ayman Azzam
  2. Ayman Elakwah
  3. AymanAbdelnaby
  4. Khaled Moataz

About

Simple Programming Language using Lex and Yacc

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •