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?

in Compiler Design by Active (3.4k points) | 70 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

+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.6k points)

Related questions

0 votes
3 answers
asked Nov 17, 2016 in Compiler Design by thor Loyal (6.7k points) | 717 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
50,092 questions
55,239 answers
85,996 users