search
Log In
0 votes
941 views

closed as a duplicate of: Operator Precedence
in Compiler Design
closed by
941 views
0
is it C ?
0
B is given
0

B is correct. All operators and terminals have entry in operator precedence table. For non terminals no such entry is present.

See this: https://www.geeksforgeeks.org/operator-grammar-and-precedence-parser-in-toc/

3 Answers

0 votes
option A) is correct
0

Sorry bro,
you are wrong...

operator precedence relations exists between the operators such is   -  {id,+,*,$} (Terminals)

0 votes
If we go forward by assuming that question is asking only for parser table than answer is B. C is the consequence of using relation in parsing process. Question is asking only defined not why table is constructed.
0 votes

Related questions

1 vote
2 answers
1
215 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?
asked Jun 14, 2019 in Compiler Design Hirak 215 views
2 votes
0 answers
2
338 views
Can anyone explain why operator precedence parsing cannot handle unary minus,and what are the approach to handle it.
asked Nov 16, 2017 in Compiler Design junaid ahmad 338 views
0 votes
2 answers
3
724 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.
asked Sep 18, 2017 in Compiler Design AnilGoudar 724 views
12 votes
3 answers
4
3.4k views
Which grammar rules violate the requirement of the operator grammar? A, B, C are variables and a, b, c are terminals $A \rightarrow BC$ $A \rightarrow CcBb$ $A \rightarrow BaC$ $A \rightarrow \epsilon$ (a) 1 only (b) 1 and 2 (c) 1 and 3 (d) 1 and 4
asked Jun 17, 2016 in Compiler Design jothee 3.4k views
...