GNU Bison XML Automaton Report

input grammar: egg.y

Table of Contents

Reductions

Nonterminals useless in grammar

Terminals unused in grammar

Rules useless in grammar

Conflicts

Grammar

0 $acceptEXPRESSION $end 1 EXPRESSIONEXPRESSION ADDOP TERM 2 | TERM 3 TERMTERM MULTOP FACTOR 4 | FACTOR 5 FACTOROPENPAREN EXPRESSION CLOSEPAREN 6 | INTEGER

Terminals, with rules where they appear

Nonterminals, with rules where they appear

Automaton

State 0

0 $accept EXPRESSION $end 1 EXPRESSION EXPRESSION ADDOP TERM 2 | TERM 3 TERM TERM MULTOP FACTOR 4 | FACTOR 5 FACTOR OPENPAREN EXPRESSION CLOSEPAREN 6 | INTEGER INTEGER shift, and go to state 1 OPENPAREN shift, and go to state 2 EXPRESSION go to state 3 TERM go to state 4 FACTOR go to state 5

State 1

6 FACTORINTEGER [$end, ADDOP, MULTOP, CLOSEPAREN] $end reduce using rule 6 (FACTOR) ADDOP reduce using rule 6 (FACTOR) MULTOP reduce using rule 6 (FACTOR) CLOSEPAREN reduce using rule 6 (FACTOR)

State 2

1 EXPRESSION EXPRESSION ADDOP TERM 2 | TERM 3 TERM TERM MULTOP FACTOR 4 | FACTOR 5 FACTOR OPENPAREN EXPRESSION CLOSEPAREN 5 | OPENPAREN EXPRESSION CLOSEPAREN 6 | INTEGER INTEGER shift, and go to state 1 OPENPAREN shift, and go to state 2 EXPRESSION go to state 6 TERM go to state 4 FACTOR go to state 5

State 3

0 $acceptEXPRESSION $end 1 EXPRESSIONEXPRESSION ADDOP TERM $end shift, and go to state 7 ADDOP shift, and go to state 8

State 4

2 EXPRESSIONTERM [$end, ADDOP, CLOSEPAREN] 3 TERMTERM MULTOP FACTOR MULTOP shift, and go to state 9 $end reduce using rule 2 (EXPRESSION) ADDOP reduce using rule 2 (EXPRESSION) CLOSEPAREN reduce using rule 2 (EXPRESSION)

State 5

4 TERMFACTOR [$end, ADDOP, MULTOP, CLOSEPAREN] $end reduce using rule 4 (TERM) ADDOP reduce using rule 4 (TERM) MULTOP reduce using rule 4 (TERM) CLOSEPAREN reduce using rule 4 (TERM)

State 6

1 EXPRESSIONEXPRESSION ADDOP TERM 5 FACTOROPENPAREN EXPRESSION CLOSEPAREN ADDOP shift, and go to state 8 CLOSEPAREN shift, and go to state 10

State 7

0 $acceptEXPRESSION $end $default accept

State 8

1 EXPRESSIONEXPRESSION ADDOP TERM 3 TERM TERM MULTOP FACTOR 4 | FACTOR 5 FACTOR OPENPAREN EXPRESSION CLOSEPAREN 6 | INTEGER INTEGER shift, and go to state 1 OPENPAREN shift, and go to state 2 TERM go to state 11 FACTOR go to state 5

State 9

3 TERMTERM MULTOP FACTOR 5 FACTOR OPENPAREN EXPRESSION CLOSEPAREN 6 | INTEGER INTEGER shift, and go to state 1 OPENPAREN shift, and go to state 2 FACTOR go to state 12

State 10

5 FACTOROPENPAREN EXPRESSION CLOSEPAREN [$end, ADDOP, MULTOP, CLOSEPAREN] $end reduce using rule 5 (FACTOR) ADDOP reduce using rule 5 (FACTOR) MULTOP reduce using rule 5 (FACTOR) CLOSEPAREN reduce using rule 5 (FACTOR)

State 11

1 EXPRESSIONEXPRESSION ADDOP TERM [$end, ADDOP, CLOSEPAREN] 3 TERMTERM MULTOP FACTOR MULTOP shift, and go to state 9 $end reduce using rule 1 (EXPRESSION) ADDOP reduce using rule 1 (EXPRESSION) CLOSEPAREN reduce using rule 1 (EXPRESSION)

State 12

3 TERMTERM MULTOP FACTOR [$end, ADDOP, MULTOP, CLOSEPAREN] $end reduce using rule 3 (TERM) ADDOP reduce using rule 3 (TERM) MULTOP reduce using rule 3 (TERM) CLOSEPAREN reduce using rule 3 (TERM)