This project is about a grammar analyzer. The idea is to show properties of input grammars. We analyze first and follows of the grammar, the productions, terminals and no terminals, analyzed if the grammar is regular or not, transform to Chomsky Normal Form, showed parsing table, delete inmediate left recursion, showed reduce-reduce or shift-reduce conflicts, showed derivation tree of words, and others. Many code from solved exercises in Compiler Theory course was used. The code for create LALR tables was created used PLY framework.
See in this repository:
orden.pdf
- Docker
- Build image
sudo docker build ./ -t rayniel95/grammaranalyzer:v1.0
- Execute container
sudo docker run --network "host" rayniel95/grammaranalyzer:v1.0
- Conect to
localhost:5000
- Introduce
/usr/bin/dot
as path at:
- Play with test cases in
code/test_cases
. You can find differents grammars and words.
Note: For update automaton visualization press
Ctrl + R
.