COMPILER DESIGN

SYNTAX ANALYSIS

ROLE OF THE PARSER

Question [CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
In operator Precedence parsing, precedence relations are defined by
A
for all pair of non-terminals
B
for all pair of terminals
C
to delimit the handle
D
none of these
Explanation: 

Detailed explanation-1: -There are the three operator precedence relations: a ⋗ b means that terminal “a” has the higher precedence than terminal “b". a ⋖ b means that terminal “a” has the lower precedence than terminal “b". a ≐ b means that the terminal “a” and “b” both have same precedence.

Detailed explanation-2: -Technically, an operator precedence grammar is a context-free grammar that has the property (among others) that no production has either an empty right-hand side or two adjacent nonterminals in its right-hand side. These properties allow precedence relations to be defined between the terminals of the grammar.

Detailed explanation-3: -3. Which of the following is true for operator precedence parsing? Explanation: There are two important properties for these operator precedence parsers is that it does not appear on the right side of any production and no production has two adjacent non-terminals.

Detailed explanation-4: -Take a stack, put the $ symbol into it, and put the input string into the input buffer with the $ symbol at its end. Check whether the given grammar is operator grammar or not. Draw the operator precedence relation table. Parse the input string. More items

There is 1 question to complete.