COMPILER DESIGN

TOOLS AND TECHNIQUES FOR COMPILER DESIGN

MISCELLENOUS

Question [CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
A grammer can be solve sovle by operator precedence parser if and only if
A
It remove left recursion
B
it remove left factoring
C
In between two non-terminal there is a terminal
D
None of the above
Explanation: 

Detailed explanation-1: -An operator precedence grammar is a kind of grammar for formal languages. 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.

Detailed explanation-2: -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-3: -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.