Tip:
Highlight text to annotate it
X
Let's test our knowledge of using shifting
to fill out the parse table: the chart.
Let's say that this is our grammar:
P reduces to or can be rewritten as:
open parenthesis P, closed parenthesis.
or P can just disappear.
Sometimes we write the epsilon and sometimes we don't--whatever we'd prefer.
So chart state[0] includes the following parse states:
(P goes to: here's right where I am, open P, close)
or (P goes to: here's where I am and then there's nothing more),
both coming from state[0].
What I'd like you to tell me is:
What are we going to put in chart[1] if the input is ( )
because of shifting?
What's shifting going to add to our parsing chart?
In this multiple choice quiz--actually, there's only 1 right answer.
Which one is it?