Emulator for the CLR Parser




1. Background

The objective of this project is to implement an efficient and robust CLR parser using a high level programming language, that is capable of correctly parsing any input fed to it. To avoid some of invalid reductions, the states need to carry more information. Extra information is put into state by adding a terminal symbol as the second component in the item.

2. Objectives

The LR(1) parsing method consists of a parser stack, that holds non-terminals, grammar symbols and tokens; a parsing table that specifies parser actions, and a driver function that interacts with the parser stack, table and scanner. The typical actions of a CLR parser include: shift, reduce, and accept or error. The project work would include a set of predefined grammar and an interface which would convert each phase of the parsing process into a visual representation and would display onto webpage. The implementation is pretty straight forward and simple. Then it would take any input string belonging to the grammar language and would show the acceptance or rejection of that input string.

3. Programming Interfaces

a. HTML5+CSS3

General functionality, rendering of pages, display of each step, navigation from servlet to another.

b. JavaScript

Front end validations of input grammar. After constructing the parsing table, we accept the input string to check whether it gets accepted by the parser or not. To do so, before submitting to the server, we do some front-end checking. If the input string contains an invalid terminal or non-terminal, we pop it out on the form submission.

c. Bootstrap

Twitter Bootstrap is a web-application framework which contains a vast set of library functions to achieve some graphic utilities like modal, tool-tips, carousels, animations, transitions, etc.

e. jQuery Libraries

Twitter Bootstrap is a web-application framework which contains a vast set of library functions to achieve some graphic utilities like modal, tool-tips, carousels, animations, transitions, etc.

d. Java Servelet and MySQL Database




4. Results



User Interface




Click Here for details