search
Log In

Recent questions tagged operator-grammar

1 vote
2 answers
1
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 257 views
0 votes
0 answers
2
Say I have a grammar, S→ AB A→ a B→ b This grammar is not operator grammar as 2 non terminals are lying side by side, but can be converted to an operator grammar. S→ ab , A→ a , B→ b here i have a doubt, operator grammar as the name suggests should have a ... right? how can we operate even two terminal symbols when placed side by side? Isn't it same as placing 2 non-terminal symbol side by side?
asked Jun 6, 2019 in Compiler Design Hirak 97 views
0 votes
2 answers
3
Given an operator grammar : $E -> E * F / F + E / F$ $F -> F - F / id$ Is this table correct for the above operator grammar ?
asked May 29, 2018 in Compiler Design Rahul Ranjan 1 193 views
2 votes
0 answers
4
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 369 views
0 votes
2 answers
5
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 763 views
0 votes
2 answers
6
Given an Operator Grammar as, E -> E*F / F+E / F F -> F-F / id How to determine associativity in this case? Since Operator grammar can be ambiguous also. Is the above question solved using associativity and precedence of operators we consider in C programming? or it is Different.
asked Sep 15, 2017 in Compiler Design AnilGoudar 1.2k views
0 votes
0 answers
7
Write one or more C statements that clears (i.e., sets to 0) bits 11 and 12 of the variable "x" without disturbing the other bits using bit-level C operators. The variable mask, declared below, may be helpful. int mask = 0x00001800; int x = arbitrary_value;
asked Sep 14, 2017 in Programming Garrett McClure 123 views
0 votes
3 answers
8
12 votes
3 answers
9
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.6k views
To see more, click for the full list of questions or popular tags.
...