Chapter 2: Context-Free Languages
Anita Sarkeesian Lecture
The lecture is tonight at 6:00 p.m. in the SUB Ballrooms
and should be of interest to CS majors.
More Information.
For Your Enjoyment
- A YouTube introduction to
yacc.
Chapter 2.4, Deterministic Context-Free Languages
Lecture Problem
In the CFG provided in the video above, show the parse tree that
yacc would generate for - 3 + 4 * 5 $.
Deterministic Context-Free Grammars
- Show that grammar (A -> A + a | a) has only one derivation
for the string a + a + a.
Consequently, A is a DCFG.
- Show that grammar (B -> B + B | a) has more than one derivation
for the string a + a + a.
Consequently, B is not a DCFG.