The Gateway to Computer Science Excellence
0 votes
570 views
In Operator precedence parsing, precedence relations are defined,

i. for all pair of non-terminals.

ii. for all pair of terminals.

iii. to delimit the handle.

iv. only for certain pair of terminals.
in Compiler Design by Active (4.4k points) | 570 views
0
is it option b?

2 Answers

+2 votes
it is Option - (b)
Precedence Relation Table is constructed to decide the priority of the operators, we use a stack here

if(stack.top()<=current->symbol){
stack.push(current->symbol);
current=current->next;
}
else {
stack.pop();
current=current->next;
}
by Active (1.1k points)
0
But for terminal {$, $} , there is no associativity defined as the ORT(operator relational table ) contains blank entry at [$,$].
+2 votes
A:-

There are two important properties for operator precedence parsers is that

1)it doesn't appear on the right side of any production

2)no  production has two adjacent no terminals

So the answer would be (A) for all pair of non terminals
by Active (1.7k points)
Quick search syntax
tags tag:apple
author user:martin
title title:apple
content content:apple
exclude -tag:apple
force match +apple
views views:100
score score:10
answers answers:2
is accepted isaccepted:true
is closed isclosed:true
50,737 questions
57,321 answers
198,391 comments
105,142 users