# Operator Precedence

878 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.
0
is it option b?

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;
}
0
But for terminal {$,$} , there is no associativity defined as the ORT(operator relational table ) contains blank entry at [$,$].
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

## Related questions

1 vote
1
356 views
In operator precedence parsing we have the rule that production cannot have two adjacent non-terminals or an epsilon production, so this production, S--> ab is allowed but not S--> AB, A->a and B->b, though they are giving us the same output. Why so?