The Gateway to Computer Science Excellence
0 votes
100 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?

in Compiler Design by Active (3.5k points) | 100 views
+1
because operator precedence parser can work on only operator grammar. And that rule is one of the conditions for being an operator grammar.
0
Okay, Thank u.. :)

1 Answer

+2 votes

Rule of Operator precedence Parser is Any two variable should not adjacent to each other.If they are adjacent to each other then convert it!

eg- In C compiler,no two variables are adjacent 

            ab!=a*b this is not allowed in our c compiler

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,647 questions
56,497 answers
195,490 comments
100,818 users