diff --git a/tests/report.at b/tests/report.at index f4936aef..6c0fe2c2 100644 --- a/tests/report.at +++ b/tests/report.at @@ -1137,6 +1137,344 @@ AT_CHECK([[sed -e 's/bison-xml-report version="[^"]*"/bison-xml-report version=" ]]) +# Check HTML output. +if test x"$XSLTPROC" != x""; then + AT_CHECK([[$XSLTPROC \ + `]]AT_SET_ENV[[ bison --print-datadir`/xslt/xml2xhtml.xsl \ + input.xml >input.html]]) + AT_CHECK([sed -e '1s/GNU Bison [0-9.]*$/GNU Bison VERSION/' input.html], [], +[[ + + + + + input.yy - GNU Bison XML Automaton Report + + +

GNU Bison XML Automaton Report

+ input grammar: input.yy

+ +

Table of Contents

Reductions

Nonterminals useless in grammar

+ +

Terminals unused in grammar

+ +

Rules useless in grammar

+

Conflicts

+ +

Grammar

+

+ 0 $acceptunit "end of file" + + 1 unitassignments exp + + 2 assignments → %empty + 3 | assignments assignment + + 4 assignmentid ":=" exp + + 5 id"identifier" + + 6 @1 → %empty + + 7 @2 → %empty + + 8 exp"incr" exp @1 @2 exp + 9 | "(" exp ")" + 10 | "identifier" + 11 | "number" +

+ +

Terminals, with rules where they appear

+ +

"end of file" (0) 0 +error (256) +":=" (258) 4 +"incr" (259) 8 +"identifier" (260) 5 10 +"number" (261) 11 +"(" (262) 9 +")" (263) 9 +

+ +

Nonterminals, with rules where they appear

+ +

$accept (9) + on left: 0 +unit (10) + on left: 1 + on right: 0 +assignments (11) + on left: 2 3 + on right: 1 3 +assignment (12) + on left: 4 + on right: 3 +id (13) + on left: 5 + on right: 4 +exp (14) + on left: 8 9 10 11 + on right: 1 4 8 9 +@1 (15) + on left: 6 + on right: 8 +@2 (16) + on left: 7 + on right: 8 +

Automaton

+ +

state 0

+ +

0 $accept unit "end of file" + 1 unit assignments exp + 2 assignments %empty + 3 | assignments assignment + + $default reduce using rule 2 (assignments) + + unit go to state 1 + assignments go to state 2 +

+ +

state 1

+ +

0 $acceptunit "end of file" + + "end of file" shift, and go to state 3 +

+ +

state 2

+ +

1 unitassignments exp + 3 assignmentsassignments assignment + 4 assignment id ":=" exp + 5 id "identifier" + 8 exp "incr" exp @1 @2 exp + 9 | "(" exp ")" + 10 | "identifier" + 11 | "number" + + "incr" shift, and go to state 4 + "identifier" shift, and go to state 5 + "number" shift, and go to state 6 + "(" shift, and go to state 7 + + assignment go to state 8 + id go to state 9 + exp go to state 10 +

+ +

state 3

+ +

0 $acceptunit "end of file" + + $default accept +

+ +

state 4

+ +

8 exp "incr" exp @1 @2 exp + 8 | "incr" exp @1 @2 exp + 9 | "(" exp ")" + 10 | "identifier" + 11 | "number" + + "incr" shift, and go to state 4 + "identifier" shift, and go to state 11 + "number" shift, and go to state 6 + "(" shift, and go to state 7 + + exp go to state 12 +

+ +

state 5

+ +

5 id"identifier" [":="] + 10 exp"identifier" ["end of file"] + + "end of file" reduce using rule 10 (exp) + $default reduce using rule 5 (id) +

+ +

state 6

+ +

11 exp"number" + + $default reduce using rule 11 (exp) +

+ +

state 7

+ +

8 exp "incr" exp @1 @2 exp + 9 | "(" exp ")" + 9 | "(" exp ")" + 10 | "identifier" + 11 | "number" + + "incr" shift, and go to state 4 + "identifier" shift, and go to state 11 + "number" shift, and go to state 6 + "(" shift, and go to state 7 + + exp go to state 13 +

+ +

state 8

+ +

3 assignmentsassignments assignment + + $default reduce using rule 3 (assignments) +

+ +

state 9

+ +

4 assignmentid ":=" exp + + ":=" shift, and go to state 14 +

+ +

state 10

+ +

1 unitassignments exp + + $default reduce using rule 1 (unit) +

+ +

state 11

+ +

10 exp"identifier" + + $default reduce using rule 10 (exp) +

+ +

state 12

+ +

6 @1 %empty + 8 exp"incr" exp @1 @2 exp + + $default reduce using rule 6 (@1) + + @1 go to state 15 +

+ +

state 13

+ +

9 exp"(" exp ")" + + ")" shift, and go to state 16 +

+ +

state 14

+ +

4 assignmentid ":=" exp + 8 exp "incr" exp @1 @2 exp + 9 | "(" exp ")" + 10 | "identifier" + 11 | "number" + + "incr" shift, and go to state 4 + "identifier" shift, and go to state 11 + "number" shift, and go to state 6 + "(" shift, and go to state 7 + + exp go to state 17 +

+ +

state 15

+ +

7 @2 %empty + 8 exp"incr" exp @1 @2 exp + + $default reduce using rule 7 (@2) + + @2 go to state 18 +

+ +

state 16

+ +

9 exp"(" exp ")" + + $default reduce using rule 9 (exp) +

+ +

state 17

+ +

4 assignmentid ":=" exp + + $default reduce using rule 4 (assignment) +

+ +

state 18

+ +

8 exp "incr" exp @1 @2 exp + 8 | "incr" exp @1 @2 exp + 9 | "(" exp ")" + 10 | "identifier" + 11 | "number" + + "incr" shift, and go to state 4 + "identifier" shift, and go to state 11 + "number" shift, and go to state 6 + "(" shift, and go to state 7 + + exp go to state 19 +

+ +

state 19

+ +

8 exp"incr" exp @1 @2 exp + + $default reduce using rule 8 (exp) +

+ + + +]]) +fi AT_BISON_OPTION_POPDEFS AT_CLEANUP @@ -1725,6 +2063,232 @@ AT_CHECK([[sed -e 's/bison-xml-report version="[^"]*"/bison-xml-report version=" ]]) +# Check HTML output. +if test x"$XSLTPROC" != x""; then + AT_CHECK([[$XSLTPROC \ + `]]AT_SET_ENV[[ bison --print-datadir`/xslt/xml2xhtml.xsl \ + input.xml >input.html]]) + AT_CHECK([sed -e '1s/GNU Bison [0-9.]*$/GNU Bison VERSION/' input.html], [], +[[ + + + + + input.y - GNU Bison XML Automaton Report + + +

GNU Bison XML Automaton Report

+ input grammar: input.y

+ +

Table of Contents

Reductions

Nonterminals useless in grammar

+ +

Terminals unused in grammar

+ +

Rules useless in grammar

+

Rules useless in parser due to conflicts

+

+ 3 expexp "+" exp +

+ +

Conflicts

+ +

State 7 conflicts: 1 shift/reduce, 3 reduce/reduce +State 8 conflicts: 2 shift/reduce + + +

Grammar

+

+ 0 $acceptexp $end + + 1 expexp "⊕" exp + 2 | exp "+" exp + 3 | exp "+" exp + 4 | "number" + 5 | "Ñùṃéℝô" +

+ +

Terminals, with rules where they appear

+ +

$end (0) 0 +error (256) +"+" (258) 2 3 +"⊕" (259) 1 +"number" (260) 4 +"Ñùṃéℝô" (261) 5 +

+ +

Nonterminals, with rules where they appear

+ +

$accept (7) + on left: 0 +exp (8) + on left: 1 2 3 4 5 + on right: 0 1 2 3 +

Automaton

+ +

state 0

+ +

0 $accept exp $end + 1 exp exp "⊕" exp + 2 | exp "+" exp + 3 | exp "+" exp + 4 | "number" + 5 | "Ñùṃéℝô" + + "number" shift, and go to state 1 + "Ñùṃéℝô" shift, and go to state 2 + + exp go to state 3 +

+ +

state 1

+ +

4 exp"number" + + $default reduce using rule 4 (exp) +

+ +

state 2

+ +

5 exp"Ñùṃéℝô" + + $default reduce using rule 5 (exp) +

+ +

state 3

+ +

0 $acceptexp $end + 1 expexp "⊕" exp + 2 | exp "+" exp + 3 | exp "+" exp + + $end shift, and go to state 4 + "+" shift, and go to state 5 + "⊕" shift, and go to state 6 +

+ +

state 4

+ +

0 $acceptexp $end + + $default accept +

+ +

state 5

+ +

1 exp exp "⊕" exp + 2 | exp "+" exp + 2 | exp "+" exp + 3 | exp "+" exp + 3 | exp "+" exp + 4 | "number" + 5 | "Ñùṃéℝô" + + "number" shift, and go to state 1 + "Ñùṃéℝô" shift, and go to state 2 + + exp go to state 7 +

+ +

state 6

+ +

1 exp exp "⊕" exp + 1 | exp "⊕" exp + 2 | exp "+" exp + 3 | exp "+" exp + 4 | "number" + 5 | "Ñùṃéℝô" + + "number" shift, and go to state 1 + "Ñùṃéℝô" shift, and go to state 2 + + exp go to state 8 +

+ +

state 7

+ +

1 expexp "⊕" exp + 2 | exp "+" exp + 2 | exp "+" exp [$end, "+", "⊕"] + 3 | exp "+" exp + 3 | exp "+" exp [$end, "+", "⊕"] + + "⊕" shift, and go to state 6 + + $end reduce using rule 2 (exp) + $end [reduce using rule 3 (exp)] + "+" reduce using rule 2 (exp) + "+" [reduce using rule 3 (exp)] + "⊕" [reduce using rule 2 (exp)] + "⊕" [reduce using rule 3 (exp)] + $default reduce using rule 2 (exp) + + Conflict between rule 2 and token "+" resolved as reduce (%left "+"). +

+ +

state 8

+ +

1 expexp "⊕" exp + 1 | exp "⊕" exp [$end, "+", "⊕"] + 2 | exp "+" exp + 3 | exp "+" exp + + "+" shift, and go to state 5 + "⊕" shift, and go to state 6 + + "+" [reduce using rule 1 (exp)] + "⊕" [reduce using rule 1 (exp)] + $default reduce using rule 1 (exp) +

+ + + +]]) +fi AT_BISON_OPTION_POPDEFS AT_CLEANUP