Compiler Assignment
Compiler Assignment
Department( AIML)
Assignment (Odd Semester 2022-23)
1) Differentiate between parse tree, Syntax tree and annotated parse tree with example.
E-> E+T/T
T-> TF/F
F-> F*/a/b
Construct the SLR parsing table for this grammar.Also parse the input string a*b+a using the
grammar.
E → iE’
E’ → +iE’/𝜖
Draw the parse tree for input string i+i $.
5) What is CLR (1) grammar? For the following grammar check whether it is CLR (1) or not
S →Aa / bAc / Bc / bBa
A→d
B→d