Professional Documents
Culture Documents
CC Proj-Phase-2 V-6 M.Ibrahim Ahmed F2018266025
CC Proj-Phase-2 V-6 M.Ibrahim Ahmed F2018266025
DELIVERAVLE – II
6. LL(1) Grammar
9. Parser Software using LL(1) approach (it will print parse tree in the form of
productions)
6. LL(1) Grammar:
First Sets:
CP = {void}
stmtSet = {int, id, cout, cin}
stmtSet` = {int, id, cout, cin, €}
stmt = {int, id, cout, cin}
decStmt = {int}
Type = {int}
idSet = {id}
idSet` = {€, } ,
AS = {id}
E = {(, id, intLiteral}
E` = {+, *, €}
coutStmt = {cout}
cinStmt = {cin}
Follow Sets:
CProgram = {$}
stmtSet = {}}
stmtSet`={}}
stmt = {;}
decStmt = {;}
Type = {id}
idSet = {;}
idSet` = {;}
AS = {;}
E = {+, *, ), ;}
E` = {+, *, ), ;}
coutStmt = {;}
cinStmt = {;}