This repo contains all needed features (written in python) to check the grammar (structure) of a python source code without checking its semantics. The features are: (listed in order)
- Tokenizer (tokenize the source code into tokens, using the help of regular expression)
- Grammar (grammar file, contains the rule of python source code structures, contained in grammar.txt)
- Converted Grammar (grammar in Chomsky Normal Form, required when using CYK Algorithm)
- Parser (check whether the tokenized source code satisfies the python grammar from file grammar.txt using CYK Algorithm)
The project is done to fulfill task given in course IF2124 (Teori Bahasa Formal dan Otomata/Formal Language and Automata Theory) at Institut Teknologi Bandung.