LR(1) parsing table with epsilon productions
问题 I'm having trouble building the collection of sets of items for LR(1) parsers with a grammar containing epsilon productions. For example, given the following grammar (where eps stands for epsilon) S -> a S U U -> b | eps State0 would be S' -> .S, $ S -> .a S U, $ Moving with 'a' from State0 would give the following state, let's call it State2 S -> a .S U, $ S -> .a S U, $/??? In order to have the lookahead for the second item of State2 I need to calculate FIRST(U$). I know that FIRST(U) = {'b