Csc 4330/6330, Programming Language Concepts (Spring 2020)
Homework 4 (Due: Friday, February 28)
Handin under Assignment 4Note: Since solutions will be discussed on Wednesday, all submitted homeworks will get full credit, but only if you make the submission (-:
-
Eliminate left recursion in the following grammar:
S --> SX S --> SSb S --> XS S --> a
- Determine if the following grammar passes the pairwise disjointness test.
A --> aB | b | CBB B --> aB | ba | aBb C --> aaA | b | caB
- Using the Grammar on slide 4-33 and LR Parsing table on slide 4-34 of Chapter 4 slides,
show a rightmost derivation (if possible) and the Stack/Input/Action for the following strings:
- (id + id) * id
- (id + id( * id