GNU Bison XML Automaton Report

input grammar: sample.txt

Table of Contents

Reductions

Nonterminals useless in grammar

Terminals unused in grammar

Rules useless in grammar

Conflicts

Grammar

0 $acceptcommand $end 1 commandA 2 A'a' 3 | '(' A ')'

Terminals, with rules where they appear

$end (0) '(' (40) 3 ')' (41) 'a' (97) 2 error (256)

Nonterminals, with rules where they appear

$accept (6) on left: 0 command (7) on left: 1 on right: 0 A (8) on left: 2 3 on right: 1

Automaton

state 0

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

state 1

2 A'a' . $default reduce using rule 2 (A)

state 2

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

state 3

0 $acceptcommand . $end $end shift, and go to state 6

state 4

1 commandA . $default reduce using rule 1 (command)

state 5

3 A'(' A . ')' ')' shift, and go to state 7

state 6

0 $acceptcommand $end . $default accept

state 7

3 A'(' A ')' . $default reduce using rule 3 (A)