/Complier

A tiny complier implement via c++, which could identify cpp sentense, analysis words, judge whether the grammar is correct and generate Quaternion.GUI contained

Primary LanguageC++MIT LicenseMIT

A Super Compiler!

The main function of the code is to implement a cpp compiler(not so perfect yet).Some more details are as followed:

Input

You can input anything you want--as long as it corresponse to the cpp grammer, like you must contain main function, and match your brackets--never forget to enclose the bracket.
Noticed the code only support simple four arithmetic, that's to say you could only input "+", "-", "*", or "/" when you want to input number operations. what's more, it doesn't support build-in functions.

Output

You can change the output in the main function.The demo in main.cpp display some table, like token, operations and keywords table, you can remove them and add what you need.

Start

Come to the main.cpp and type g++ *.cpp -o main and ./main.Then wait for the output in the terminal or your IDE!

Problems

Just mentioned above, the project has not support much situations yet, like build-in functions and more complicate operations like square, factorial, etc. Wishing we would repair these problems in the future.