This question is on my CS homework and I have no idea how to do it.
Consider the grammar
S ← ( L )
S ← a
L ← L , S
L ← S
Draw a parse tree for the sentence ( a , ( a , a ) )
I tried following the structure and I end up with (L,(L,L))
That doesn't seem to be correct though. Could anyone push me in the right direction?
Here's part of what you're after:
Now you get to do the rest of the work :)