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 grammar: input.yy
+ ++ 0 $accept → unit "end of file" + + 1 unit → assignments exp + + 2 assignments → %empty + 3 | assignments assignment + + 4 assignment → id ":=" exp + + 5 id → "identifier" + + 6 @1 → %empty + + 7 @2 → %empty + + 8 exp → "incr" exp @1 @2 exp + 9 | "(" exp ")" + 10 | "identifier" + 11 | "number" +
+ +"end of file" (0) 0 +error (256) +":=" (258) 4 +"incr" (259) 8 +"identifier" (260) 5 10 +"number" (261) 11 +"(" (262) 9 +")" (263) 9 +
+ +$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 +
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 +
+ +0 $accept → unit • "end of file" + + "end of file" shift, and go to state 3 +
+ +1 unit → assignments • exp + 3 assignments → assignments • 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 +
+ +0 $accept → unit "end of file" • + + $default accept +
+ +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 +
+ +5 id → "identifier" • [":="] + 10 exp → "identifier" • ["end of file"] + + "end of file" reduce using rule 10 (exp) + $default reduce using rule 5 (id) +
+ +11 exp → "number" • + + $default reduce using rule 11 (exp) +
+ +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 +
+ +3 assignments → assignments assignment • + + $default reduce using rule 3 (assignments) +
+ +4 assignment → id • ":=" exp + + ":=" shift, and go to state 14 +
+ +1 unit → assignments exp • + + $default reduce using rule 1 (unit) +
+ +10 exp → "identifier" • + + $default reduce using rule 10 (exp) +
+ +6 @1 → • %empty + 8 exp → "incr" exp • @1 @2 exp + + $default reduce using rule 6 (@1) + + @1 go to state 15 +
+ +9 exp → "(" exp • ")" + + ")" shift, and go to state 16 +
+ +4 assignment → id ":=" • 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 +
+ +7 @2 → • %empty + 8 exp → "incr" exp @1 • @2 exp + + $default reduce using rule 7 (@2) + + @2 go to state 18 +
+ +9 exp → "(" exp ")" • + + $default reduce using rule 9 (exp) +
+ +4 assignment → id ":=" exp • + + $default reduce using rule 4 (assignment) +
+ +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 +
+ +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 grammar: input.y
+ +State 7 conflicts: 1 shift/reduce, 3 reduce/reduce +State 8 conflicts: 2 shift/reduce + + +
+ 0 $accept → exp $end + + 1 exp → exp "⊕" exp + 2 | exp "+" exp + 3 | exp "+" exp + 4 | "number" + 5 | "Ñùṃéℝô" +
+ +$end (0) 0 +error (256) +"+" (258) 2 3 +"⊕" (259) 1 +"number" (260) 4 +"Ñùṃéℝô" (261) 5 +
+ +$accept (7) + on left: 0 +exp (8) + on left: 1 2 3 4 5 + on right: 0 1 2 3 +
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 +
+ +4 exp → "number" • + + $default reduce using rule 4 (exp) +
+ +5 exp → "Ñùṃéℝô" • + + $default reduce using rule 5 (exp) +
+ +0 $accept → exp • $end + 1 exp → exp • "⊕" 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 +
+ +0 $accept → exp $end • + + $default accept +
+ +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 +
+ +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 +
+ +1 exp → exp • "⊕" 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 "+"). +
+ +1 exp → exp • "⊕" 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