alishokri1661s / LL1-Parser

This console app gets a grammar and gives you LL(1) Parse Table.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

LL1-Parser

Getting Started

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.

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 )

About

This console app gets a grammar and gives you LL(1) Parse Table.


Languages

Language:Java 99.8%Language:Batchfile 0.2%