CSCE 434 Lecture 20

From Notes
Jump to navigation Jump to search

« previous | Wednesday, October 9, 2013 | next »

Lecture Slides

Building a SLR parser

Canonical LR(0) items

Kernel items: all items with cursor at left end of RHS, with addition of a rule [S::=S].

S::=S is a production in the augmented grammar G mapping a new start state S to the start state of a grammar G.

We do this because we cannot have an "initial" item S or final item S in the original grammar (nothing goes to S)

I: set of items; take its closure (all possible items reachable from the current state)