Compiler Problems
Compiler Problems
3.
4.
T->F
F->(E)
F->id. Construct an LR Parsing table for the above grammar. Give the moves of
LR parser on id*id+id.(12) NOV/DEC2012, APRIL/MAY 11, NOV/DEC2011
5. (b) What is a shift-reduce parser? Explain in detail the conflicts that may occur during
shift- reduce parsing. (4) MAY/JUNE 2012
8. Design an LALR Parser for the following grammar and parse the input id=id.
a. S-> L=R/R
L->*R/id
R->L NOV/DEC2013
6. Consider the following grammar
a. S-AS|b
b. A-SA|a.
7. Construct the SLR parse table for the grammar .Shoe the actions of the parser for the
input string abab.. (16) MAY/JUNE 14, APRIL/MAY 09
UNIT II
1. Compare the features of DFA and NFA. Draw the DFA for the augmented regular
expression((/a)b*)* NOV/DEC2012
2. Construct the Minimized DFA for the regular expression. (0+1)*(0+1)10 NOV/DEC2011
3. Draw the DFA for the augmented regular expression (a|b)*# directly using syntax tree.
(12) NOV/DEC2013
4. Draw NFA for the regular expression ab*/ab. MAY/JUNE 14
5. Draw the transition diagram for relational operators and unsigned numbers in Pascal.
APRIL/MAY 11
6. Prove that the following two regular expressions are equivalent by showing that the
minimum state DFAs are same. (i) (a/b)* (ii) (a*/b*)* MAY/JUNE 15
7. Draw a NFA for a*|b*.