0
3.7kviews
Apply operator precedence parsing algorithm for the statement $Id - id \ast id$

For a given grammar below, construct an operator precedence relation matrix, assuming *, + are binary operators and id as terminal Symbol and E as non-terminal.

E → E + E $ \ \ \ $ E → E * E $ \ \ \ $ E → id

Apply operator precedence parsing algorithm for the statement

Id - id * id


Mumbai University > Computer Engineering > Sem6 > System Programming and Compiler Construction

Marks: 10M

Year: Dec 2015

1 Answer
0
21views
  • Bottom-up parsers for a large class of context-free grammars can be easily developed using operator grammars.
  • Operator grammars have the property that no production right side is empty or has two adjacent nonterminal.
  • This property enables the implementation of efficient operator-precedence parsers.
  • These parser rely on the following three precedence …

Create a free account to keep reading this post.

and 3 others joined a min ago.

Please log in to add an answer.