To run the code first download the zip file of the project and extract it
Then you can run the projtect in two ways:
- Execute the run.bat file
- Run the "java -jar LL(1).jar" command in CMD
Make sure the input grammar is LL(1).
If you want to make sure that you grammar is LL(1) or not you can use this link.
Type the grammar in input.txt file or another text file with the following Example.
S : EXP
EXP : TERM EXP'
EXP' : + TERM EXP'
EXP' : - TERM EXP'
EXP' : #
TERM : FACTOR TERM'
TERM' : * FACTOR TERM'
TERM' : / FACTOR TERM'
TERM' : #
FACTOR : ID
ID : id ID'
ID' : ++
ID' : --
ID' : #
ID : -- id
ID : ++ id
FACTOR : num
FACTOR : ( EXP )