Csc 4330/6330, Programming Language Concepts (Summer 2020)
Homework 4 (Not to be turned in)
-
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 10 and LR Parsing table on slide 20 of Chapter 4 Part II slides,
show a rightmost derivation (if possible) and the Stack/Input/Action for the following strings:
- (id + id) * id
- (id + id( * id