GithubHelp home page GithubHelp logo

aymanelakwah / cplus Goto Github PK

View Code? Open in Web Editor NEW

This project forked from aymanazzam/cplus

0.0 1.0 0.0 4.01 MB

Simple Programming Language using Lex and Yacc

Lex 2.60% Yacc 14.58% Batchfile 0.12% C++ 58.26% Makefile 0.25% C 1.32% CMake 1.31% Java 21.28% Shell 0.27%

cplus's Introduction

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

cplus's People

Contributors

aymanazzam avatar aymanabdelnaby avatar aymanelakwah avatar khaledmoataz avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.