1.

A bottom up parser generates __________(a) Right most derivation(b) Right most derivation in reverse(c) Left most derivation(d) Left most derivation in reverseThis question was addressed to me in a job interview.The question is from Handle of Right sentinel Grammar topic in division Bottom Up Parsing of Compiler

Answer»

Correct answer is (B) Right most derivation in reverse

The best explanation: This corresponds to starting at the leaves of the parse tree. It can be thought of. A process of REDUCING the string in question to the START symbol of the grammar. Bottom-up PARSING is also known as shift-reduce parsing.



Discussion

No Comment Found

Related InterviewSolutions