Skip to content

Latest commit

 

History

History
25 lines (18 loc) · 875 Bytes

README.md

File metadata and controls

25 lines (18 loc) · 875 Bytes

CLR-Parser

Run the file clr.py for making CLR table for grammar you provide and then parse a string for the same.

Sample input :     

Example Grammar -
         S->AA
         A->aA
         A->b
         end

Example Strings -
         aaabab
         bb
         abb
         bab

Running the parser

1.$python3 clr.py

2.Then enter the grammer, the grammer will be parsed and r-r, s-r conflicts will indicate that the grammar is not CLR.

3.Then enter the string to be parsed.