Question
E -> E * F | F + E | F
F -> F – F | id
Which of the following is true?
a.
* has higher precedence than +
b.
– has higher precedence than *
c.
+ and — have same precedence
d.
+ has higher precedence than *
Posted under Compiler Design
Engage with the Community - Add Your Comment
Confused About the Answer? Ask for Details Here.
Know the Explanation? Add it Here.
Q. Given the following expression grammar: E -> E * F | F + E | F F -> F – F | id Which of the following is...
Similar Questions
Discover Related MCQs
Q. lanation: e.g. input is 3*4-5 rFirst ‘- ‘ is be evaluated then ‘ *’5. Which one of the following is true at any valid state in shift-reduce parsing?
View solution
Q. In the context of abstract-syntax-tree and control-flow-graph.
Which one of the following is true?
View solution
Q. Match the following:
List-I List-II
A. Lexical analysis 1. Graph coloring
B. Parsing 2. DFA minimization
C. Register allocation 3. Post-order traversal
D. Expression evaluation 4. Production tree
A B C D
View solution
Q. Which of the following pairs is the most powerful?
View solution
Q. Consider the following grammar G.
S → F ⎪ H
F → p ⎪ c
H → d ⎪ c
Which one is true?
S1: All strings generated by G can be parsed with help of LL (1).
S2: All strings generated by G can be parsed with help of LR (1).
View solution
Q. What is the maximum number of reduce moves that can be taken by a bottom-up parser for a grammar with no epsilon- and unit-production to parse a string with n tokens?
View solution
Q. Consider the following two sets of LR (1) items of an LR (1) grammar.
X -> c.X, c/d
X -> .cX, c/d
X -> .d, c/d
X -> c.X, $
X -> .cX, $
X -> .d, $
Which one is false?
1. Cannot be merged since look ahead’s are different.
2. Can be merged but will result in S-R conflict.
3. Can be merged but will result in R-R conflict.
4. Cannot be merged since goto on c will lead to two different sets.
View solution
Q. What is the binary equivalent of the decimal number 368
View solution
Q. AB+(A+B)’ is equivalent to
View solution
Q. Which of the following is the fastest logic ?
View solution
Q. A latch is constructed using two cross coupled
View solution
Q. DAG representation of a basic block allows
View solution
Q. Which of the following actions an operator precedence parser may take to recover from an error?
View solution
Q. Which of the following is used for grouping of characters into tokens?
View solution
Q. A optimizing compiler
View solution
Q. Input to code generator
View solution
Q. A synthesized attribute is an attribute whose value at a parse tree node depends on
View solution
Q. In a bottom up evaluation of a syntax direction definition ,inherited attributes can
View solution
Q. _________ or scanning is the process where the stream of characters making up the source program is read from left to right and grouped into tokens.
View solution
Q. _____________ is a graph representation of a derivation
View solution
Suggested Topics
Are you eager to expand your knowledge beyond Compiler Design? We've curated a selection of related categories that you might find intriguing.
Click on the categories below to discover a wealth of MCQs and enrich your understanding of Computer Science. Happy exploring!