• Input: Extended G = (N, T, P, S’); QG;
Contents(x) for all x Î QG; Follow(A) for all x Î A
• Output: LR-table for G (a = Action part, b = Go-to part)
• Method:
• StatesOfTable := QG; StartingState := <e>
• for each <x> Î QG do
• for
each I Î Contents(<x>) do
• case I of
• I = A ® y·Xz, where X
Î N:
if A ® yX·z Î Contents(<q>) then b[<x>, X] := <q>
• I = A ® y·Xz, where X
Î T:
if A ® yX·z Î Contents(<q>) then a[<x>, X] := s<q>
• I = S’ ® S·: a[<x>, $] := J
• I = A ® y· (A ¹ S’):
for each a Î Follow(A) do a[<x>, a] := rp,
where p is a label
of rule A ® y