What do you mean by LR Parser

What do you mean by LR Parser? Describe its parts with appropriate description.

E

Expert

Verified

The LR means Left-to-Right signifying the parser that reads the input string from left to right. LR parser can be written for almost all the Programming constructs. LR parser comprises of two parts: Driver Routine and Parsing Table.

a) The Driver routine is similar for all the Parsers only the Parsing Table changes.

b) The Parsing Table is basically a form of representing the State-Transition Diagram for the language. It includes the entries for all possible States and the input symbols. In each state there in a predetermined next state based on the input symbol. Whenever there is any duplicate entry or two next states for the similar symbol, then there is an ambiguity in grammar.

   Related Questions in Computer Engineering

©TutorsGlobe All rights reserved 2022-2023.