Computer Science, asked by sivakilaru447, 1 year ago

Write short note on the components of lr parser

Answers

Answered by pornimv
0
• parser : a program that, given a sentence, reconstructs a derivation for that
sentence ---- if done sucessfully, it “recognize” the sentence
• all parsers read their input left-to-right, but construct parse tree differently.
• bottom-up parsers --- construct the tree from leaves to root
shift-reduce, LR, SLR, LALR, operator precedence
• top-down parsers --- construct the tree from root to leaves
recursive descent, predictive parsing, LL(1)
• LR parser components: input, stack (strings of grammar symbols and states),
driver routine, parsing tables.
Similar questions