The Gateway to Computer Science Excellence
First time here? Checkout the FAQ!
0 votes

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?

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

1 Answer

0 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

answered ago by Junior (703 points)

Related questions

0 votes
3 answers
asked Nov 17, 2016 in Compiler Design by thor Loyal (6.7k points) | 705 views
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
49,588 questions
54,197 answers
71,152 users