Skip to content

iAnas19/Scrypton

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Scrypton

Compiler Project on Python completed till Syntax Analyzing Phase
Scrypton is just the name of compiler we gave to the language since we are making it from python, hence S C R Y P T O N

How to run

run this command in git bash in your folder
git clone https://github.com/iAnas19/Scrypton
then
cd Scrypton
after cloning it run the main.py file only, it will execute the whole code it self.

What these files are doing?

  • WordBreaker file is breaking the word.
  • Lexical is tokenizing it.
  • Syntax is Checking if the given code is valid.
  • .txt files are just code you will run to see if you wrote a correct syntax or not.
  • main file will tokenize the code present in the txt file and pass it from syntax if else statement to verify if it is valid Syntax.
  • Token file just have a class of values or properties a token may contain.

How to see the valid syntax of the language?

Currently I have changed the CFG in the code from documentation. I won't be uploading it because it might create confusion. So, just open Syntax.py and see the syntax of each statements on your own. And if you still have any queries, contact me if you have any problem

Note

I did not create this entire project on my own, it was a group project in my 5th semester of Compiler Construction's Course.
It contains few bugs. Copy it on you own behalf.