]
>
Assignment 3: An LL(1) Parser (Due: Tu, April 29)
Assignment 3: An LL(1) Parser (Due: Tu, April 29)
Part a: Give the LL(1) parsing table of the L756 grammar, ignoring rules 21 and
23.
Part b: Write a parser for L756 programs that doesn’t use transition rules 21 and
23. The parser should use the following procedures
- SCANTOKEN() of assg. #2.
- PRINT(i) which prints out the value of i.
- PARSER – which is an LL(1) predicate parser. PARSER should
- Call PRINT(i) when the right hand side of the i’th rule is to replace
the top most symbol in the syntax pushdown store.
- Print out the values of TYPE and VALUE returned in each call to
SCANTOKEN.
The main program should call PARSER and be provided with a L756
program whose parsing requires all the production rules except for 21 and
23.