input grammar: sample.txt
0 $accept → command $end 1 command → A 2 A → 'a' 3 | '(' A ')'
$end (0) '(' (40) 3 ')' (41) 'a' (97) 2 error (256)
$accept (6) on left: 0 command (7) on left: 1 on right: 0 A (8) on left: 2 3 on right: 1
0 $accept → . command $end 1 command → . A 2 A → . 'a' 3 | . '(' A ')' 'a' shift, and go to state 1 '(' shift, and go to state 2 command go to state 3 A go to state 4
2 A → 'a' . $default reduce using rule 2 (A)
2 A → . 'a' 3 | . '(' A ')' 3 | '(' . A ')' 'a' shift, and go to state 1 '(' shift, and go to state 2 A go to state 5
0 $accept → command . $end $end shift, and go to state 6
1 command → A . $default reduce using rule 1 (command)
3 A → '(' A . ')' ')' shift, and go to state 7
0 $accept → command $end . $default accept
3 A → '(' A ')' . $default reduce using rule 3 (A)