version 3.7.3
[bison.git] / tests / report.at
blob9021f6d5a3d03c0d82a6e4117b56cd0ad448fc8f
1 # Bison Reports.                               -*- Autotest -*-
3 # Copyright (C) 2018-2020 Free Software Foundation, Inc.
5 # This program is free software: you can redistribute it and/or modify
6 # it under the terms of the GNU General Public License as published by
7 # the Free Software Foundation, either version 3 of the License, or
8 # (at your option) any later version.
10 # This program is distributed in the hope that it will be useful,
11 # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13 # GNU General Public License for more details.
15 # You should have received a copy of the GNU General Public License
16 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
18 AT_BANNER([[Test reports.]])
20 ## --------- ##
21 ## Reports.  ##
22 ## --------- ##
24 AT_SETUP([Reports])
26 AT_KEYWORDS([report])
28 AT_BISON_OPTION_PUSHDEFS
29 AT_DATA([input.yy],
30 [[%token
31   END  0  "end of file"
32   ASSIGN  ":="
33   INCR    "incr"
36 %token <std::string> IDENTIFIER "identifier"
37 %type <std::string> id
38 %token <int> NUMBER "number"
39 %type  <int> exp
42 %start unit;
43 unit: assignments exp  { driver.result = $2; };
45 assignments:
46   %empty                 {}
47 | assignments assignment {};
49 assignment:
50   id ":=" exp { driver.variables[$id] = $exp; };
52 id:
53   "identifier";
55 exp:
56   "incr" exp <int>{ $$ = 1; } <int>{ $$ = 10; } exp   { $$ = $2 + $3 + $4 + $5; }
57 | "(" exp ")"   { std::swap ($$, $2); }
58 | "identifier"  { $$ = driver.variables[$1]; }
59 | "number"      { std::swap ($$, $1); };
60 ]])
62 AT_BISON_CHECK([-o input.cc -v --graph=input.gv --xml input.yy])
64 # Check the contents of the report.
65 AT_CHECK([cat input.output], [],
66 [[Grammar
68     0 $accept: unit "end of file"
70     1 unit: assignments exp
72     2 assignments: %empty
73     3            | assignments assignment
75     4 assignment: id ":=" exp
77     5 id: "identifier"
79     6 @1: %empty
81     7 @2: %empty
83     8 exp: "incr" exp @1 @2 exp
84     9    | "(" exp ")"
85    10    | "identifier"
86    11    | "number"
89 Terminals, with rules where they appear
91     "end of file" (0) 0
92     error (256)
93     ":=" (258) 4
94     "incr" (259) 8
95     "identifier" <std::string> (260) 5 10
96     "number" <int> (261) 11
97     "(" (262) 9
98     ")" (263) 9
101 Nonterminals, with rules where they appear
103     $accept (9)
104         on left: 0
105     unit (10)
106         on left: 1
107         on right: 0
108     assignments (11)
109         on left: 2 3
110         on right: 1 3
111     assignment (12)
112         on left: 4
113         on right: 3
114     id <std::string> (13)
115         on left: 5
116         on right: 4
117     exp <int> (14)
118         on left: 8 9 10 11
119         on right: 1 4 8 9
120     @1 <int> (15)
121         on left: 6
122         on right: 8
123     @2 <int> (16)
124         on left: 7
125         on right: 8
128 State 0
130     0 $accept: . unit "end of file"
132     $default  reduce using rule 2 (assignments)
134     unit         go to state 1
135     assignments  go to state 2
138 State 1
140     0 $accept: unit . "end of file"
142     "end of file"  shift, and go to state 3
145 State 2
147     1 unit: assignments . exp
148     3 assignments: assignments . assignment
150     "incr"        shift, and go to state 4
151     "identifier"  shift, and go to state 5
152     "number"      shift, and go to state 6
153     "("           shift, and go to state 7
155     assignment  go to state 8
156     id          go to state 9
157     exp         go to state 10
160 State 3
162     0 $accept: unit "end of file" .
164     $default  accept
167 State 4
169     8 exp: "incr" . exp @1 @2 exp
171     "incr"        shift, and go to state 4
172     "identifier"  shift, and go to state 11
173     "number"      shift, and go to state 6
174     "("           shift, and go to state 7
176     exp  go to state 12
179 State 5
181     5 id: "identifier" .
182    10 exp: "identifier" .
184     "end of file"  reduce using rule 10 (exp)
185     $default       reduce using rule 5 (id)
188 State 6
190    11 exp: "number" .
192     $default  reduce using rule 11 (exp)
195 State 7
197     9 exp: "(" . exp ")"
199     "incr"        shift, and go to state 4
200     "identifier"  shift, and go to state 11
201     "number"      shift, and go to state 6
202     "("           shift, and go to state 7
204     exp  go to state 13
207 State 8
209     3 assignments: assignments assignment .
211     $default  reduce using rule 3 (assignments)
214 State 9
216     4 assignment: id . ":=" exp
218     ":="  shift, and go to state 14
221 State 10
223     1 unit: assignments exp .
225     $default  reduce using rule 1 (unit)
228 State 11
230    10 exp: "identifier" .
232     $default  reduce using rule 10 (exp)
235 State 12
237     8 exp: "incr" exp . @1 @2 exp
239     $default  reduce using rule 6 (@1)
241     @1  go to state 15
244 State 13
246     9 exp: "(" exp . ")"
248     ")"  shift, and go to state 16
251 State 14
253     4 assignment: id ":=" . exp
255     "incr"        shift, and go to state 4
256     "identifier"  shift, and go to state 11
257     "number"      shift, and go to state 6
258     "("           shift, and go to state 7
260     exp  go to state 17
263 State 15
265     8 exp: "incr" exp @1 . @2 exp
267     $default  reduce using rule 7 (@2)
269     @2  go to state 18
272 State 16
274     9 exp: "(" exp ")" .
276     $default  reduce using rule 9 (exp)
279 State 17
281     4 assignment: id ":=" exp .
283     $default  reduce using rule 4 (assignment)
286 State 18
288     8 exp: "incr" exp @1 @2 . exp
290     "incr"        shift, and go to state 4
291     "identifier"  shift, and go to state 11
292     "number"      shift, and go to state 6
293     "("           shift, and go to state 7
295     exp  go to state 19
298 State 19
300     8 exp: "incr" exp @1 @2 exp .
302     $default  reduce using rule 8 (exp)
306 # Now generate verbose reports.
307 AT_BISON_CHECK([-o input.cc -rall --graph=input.gv --xml input.yy])
309 # Check the contents of the report.
310 AT_CHECK([cat input.output], [],
311 [[Grammar
313     0 $accept: unit "end of file"
315     1 unit: assignments exp
317     2 assignments: %empty
318     3            | assignments assignment
320     4 assignment: id ":=" exp
322     5 id: "identifier"
324     6 @1: %empty
326     7 @2: %empty
328     8 exp: "incr" exp @1 @2 exp
329     9    | "(" exp ")"
330    10    | "identifier"
331    11    | "number"
334 Terminals, with rules where they appear
336     "end of file" (0) 0
337     error (256)
338     ":=" (258) 4
339     "incr" (259) 8
340     "identifier" <std::string> (260) 5 10
341     "number" <int> (261) 11
342     "(" (262) 9
343     ")" (263) 9
346 Nonterminals, with rules where they appear
348     $accept (9)
349         on left: 0
350     unit (10)
351         on left: 1
352         on right: 0
353     assignments (11)
354         on left: 2 3
355         on right: 1 3
356     assignment (12)
357         on left: 4
358         on right: 3
359     id <std::string> (13)
360         on left: 5
361         on right: 4
362     exp <int> (14)
363         on left: 8 9 10 11
364         on right: 1 4 8 9
365     @1 <int> (15)
366         on left: 6
367         on right: 8
368     @2 <int> (16)
369         on left: 7
370         on right: 8
373 State 0
375     0 $accept: . unit "end of file"
376     1 unit: . assignments exp
377     2 assignments: . %empty
378     3            | . assignments assignment
380     $default  reduce using rule 2 (assignments)
382     unit         go to state 1
383     assignments  go to state 2
386 State 1
388     0 $accept: unit . "end of file"
390     "end of file"  shift, and go to state 3
393 State 2
395     1 unit: assignments . exp
396     3 assignments: assignments . assignment
397     4 assignment: . id ":=" exp
398     5 id: . "identifier"
399     8 exp: . "incr" exp @1 @2 exp
400     9    | . "(" exp ")"
401    10    | . "identifier"
402    11    | . "number"
404     "incr"        shift, and go to state 4
405     "identifier"  shift, and go to state 5
406     "number"      shift, and go to state 6
407     "("           shift, and go to state 7
409     assignment  go to state 8
410     id          go to state 9
411     exp         go to state 10
414 State 3
416     0 $accept: unit "end of file" .
418     $default  accept
421 State 4
423     8 exp: . "incr" exp @1 @2 exp
424     8    | "incr" . exp @1 @2 exp
425     9    | . "(" exp ")"
426    10    | . "identifier"
427    11    | . "number"
429     "incr"        shift, and go to state 4
430     "identifier"  shift, and go to state 11
431     "number"      shift, and go to state 6
432     "("           shift, and go to state 7
434     exp  go to state 12
437 State 5
439     5 id: "identifier" .  [":="]
440    10 exp: "identifier" .  ["end of file"]
442     "end of file"  reduce using rule 10 (exp)
443     $default       reduce using rule 5 (id)
446 State 6
448    11 exp: "number" .
450     $default  reduce using rule 11 (exp)
453 State 7
455     8 exp: . "incr" exp @1 @2 exp
456     9    | . "(" exp ")"
457     9    | "(" . exp ")"
458    10    | . "identifier"
459    11    | . "number"
461     "incr"        shift, and go to state 4
462     "identifier"  shift, and go to state 11
463     "number"      shift, and go to state 6
464     "("           shift, and go to state 7
466     exp  go to state 13
469 State 8
471     3 assignments: assignments assignment .
473     $default  reduce using rule 3 (assignments)
476 State 9
478     4 assignment: id . ":=" exp
480     ":="  shift, and go to state 14
483 State 10
485     1 unit: assignments exp .
487     $default  reduce using rule 1 (unit)
490 State 11
492    10 exp: "identifier" .
494     $default  reduce using rule 10 (exp)
497 State 12
499     6 @1: . %empty
500     8 exp: "incr" exp . @1 @2 exp
502     $default  reduce using rule 6 (@1)
504     @1  go to state 15
507 State 13
509     9 exp: "(" exp . ")"
511     ")"  shift, and go to state 16
514 State 14
516     4 assignment: id ":=" . exp
517     8 exp: . "incr" exp @1 @2 exp
518     9    | . "(" exp ")"
519    10    | . "identifier"
520    11    | . "number"
522     "incr"        shift, and go to state 4
523     "identifier"  shift, and go to state 11
524     "number"      shift, and go to state 6
525     "("           shift, and go to state 7
527     exp  go to state 17
530 State 15
532     7 @2: . %empty
533     8 exp: "incr" exp @1 . @2 exp
535     $default  reduce using rule 7 (@2)
537     @2  go to state 18
540 State 16
542     9 exp: "(" exp ")" .
544     $default  reduce using rule 9 (exp)
547 State 17
549     4 assignment: id ":=" exp .
551     $default  reduce using rule 4 (assignment)
554 State 18
556     8 exp: . "incr" exp @1 @2 exp
557     8    | "incr" exp @1 @2 . exp
558     9    | . "(" exp ")"
559    10    | . "identifier"
560    11    | . "number"
562     "incr"        shift, and go to state 4
563     "identifier"  shift, and go to state 11
564     "number"      shift, and go to state 6
565     "("           shift, and go to state 7
567     exp  go to state 19
570 State 19
572     8 exp: "incr" exp @1 @2 exp .
574     $default  reduce using rule 8 (exp)
579 AT_CHECK([sed -e '1s/GNU Bison .*\.$/GNU Bison VERSION./' input.gv], [],
580 [[// Generated by GNU Bison VERSION.
581 // Report bugs to <bug-bison@gnu.org>.
582 // Home page: <https://www.gnu.org/software/bison/>.
584 digraph "input.yy"
586   node [fontname = courier, shape = box, colorscheme = paired6]
587   edge [fontname = courier]
589   0 [label="State 0\n\l  0 $accept: • unit \"end of file\"\l  1 unit: • assignments exp\l  2 assignments: • %empty\l  3            | • assignments assignment\l"]
590   0 -> 1 [style=dashed label="unit"]
591   0 -> 2 [style=dashed label="assignments"]
592   0 -> "0R2" [style=solid]
593  "0R2" [label="R2", fillcolor=3, shape=diamond, style=filled]
594   1 [label="State 1\n\l  0 $accept: unit • \"end of file\"\l"]
595   1 -> 3 [style=solid label="\"end of file\""]
596   2 [label="State 2\n\l  1 unit: assignments • exp\l  3 assignments: assignments • assignment\l  4 assignment: • id \":=\" exp\l  5 id: • \"identifier\"\l  8 exp: • \"incr\" exp @1 @2 exp\l  9    | • \"(\" exp \")\"\l 10    | • \"identifier\"\l 11    | • \"number\"\l"]
597   2 -> 4 [style=solid label="\"incr\""]
598   2 -> 5 [style=solid label="\"identifier\""]
599   2 -> 6 [style=solid label="\"number\""]
600   2 -> 7 [style=solid label="\"(\""]
601   2 -> 8 [style=dashed label="assignment"]
602   2 -> 9 [style=dashed label="id"]
603   2 -> 10 [style=dashed label="exp"]
604   3 [label="State 3\n\l  0 $accept: unit \"end of file\" •\l"]
605   3 -> "3R0" [style=solid]
606  "3R0" [label="Acc", fillcolor=1, shape=diamond, style=filled]
607   4 [label="State 4\n\l  8 exp: • \"incr\" exp @1 @2 exp\l  8    | \"incr\" • exp @1 @2 exp\l  9    | • \"(\" exp \")\"\l 10    | • \"identifier\"\l 11    | • \"number\"\l"]
608   4 -> 4 [style=solid label="\"incr\""]
609   4 -> 11 [style=solid label="\"identifier\""]
610   4 -> 6 [style=solid label="\"number\""]
611   4 -> 7 [style=solid label="\"(\""]
612   4 -> 12 [style=dashed label="exp"]
613   5 [label="State 5\n\l  5 id: \"identifier\" •  [\":=\"]\l 10 exp: \"identifier\" •  [\"end of file\"]\l"]
614   5 -> "5R5" [style=solid]
615  "5R5" [label="R5", fillcolor=3, shape=diamond, style=filled]
616   5 -> "5R10" [label="[\"end of file\"]", style=solid]
617  "5R10" [label="R10", fillcolor=3, shape=diamond, style=filled]
618   6 [label="State 6\n\l 11 exp: \"number\" •\l"]
619   6 -> "6R11" [style=solid]
620  "6R11" [label="R11", fillcolor=3, shape=diamond, style=filled]
621   7 [label="State 7\n\l  8 exp: • \"incr\" exp @1 @2 exp\l  9    | • \"(\" exp \")\"\l  9    | \"(\" • exp \")\"\l 10    | • \"identifier\"\l 11    | • \"number\"\l"]
622   7 -> 4 [style=solid label="\"incr\""]
623   7 -> 11 [style=solid label="\"identifier\""]
624   7 -> 6 [style=solid label="\"number\""]
625   7 -> 7 [style=solid label="\"(\""]
626   7 -> 13 [style=dashed label="exp"]
627   8 [label="State 8\n\l  3 assignments: assignments assignment •\l"]
628   8 -> "8R3" [style=solid]
629  "8R3" [label="R3", fillcolor=3, shape=diamond, style=filled]
630   9 [label="State 9\n\l  4 assignment: id • \":=\" exp\l"]
631   9 -> 14 [style=solid label="\":=\""]
632   10 [label="State 10\n\l  1 unit: assignments exp •\l"]
633   10 -> "10R1" [style=solid]
634  "10R1" [label="R1", fillcolor=3, shape=diamond, style=filled]
635   11 [label="State 11\n\l 10 exp: \"identifier\" •\l"]
636   11 -> "11R10" [style=solid]
637  "11R10" [label="R10", fillcolor=3, shape=diamond, style=filled]
638   12 [label="State 12\n\l  6 @1: • %empty\l  8 exp: \"incr\" exp • @1 @2 exp\l"]
639   12 -> 15 [style=dashed label="@1"]
640   12 -> "12R6" [style=solid]
641  "12R6" [label="R6", fillcolor=3, shape=diamond, style=filled]
642   13 [label="State 13\n\l  9 exp: \"(\" exp • \")\"\l"]
643   13 -> 16 [style=solid label="\")\""]
644   14 [label="State 14\n\l  4 assignment: id \":=\" • exp\l  8 exp: • \"incr\" exp @1 @2 exp\l  9    | • \"(\" exp \")\"\l 10    | • \"identifier\"\l 11    | • \"number\"\l"]
645   14 -> 4 [style=solid label="\"incr\""]
646   14 -> 11 [style=solid label="\"identifier\""]
647   14 -> 6 [style=solid label="\"number\""]
648   14 -> 7 [style=solid label="\"(\""]
649   14 -> 17 [style=dashed label="exp"]
650   15 [label="State 15\n\l  7 @2: • %empty\l  8 exp: \"incr\" exp @1 • @2 exp\l"]
651   15 -> 18 [style=dashed label="@2"]
652   15 -> "15R7" [style=solid]
653  "15R7" [label="R7", fillcolor=3, shape=diamond, style=filled]
654   16 [label="State 16\n\l  9 exp: \"(\" exp \")\" •\l"]
655   16 -> "16R9" [style=solid]
656  "16R9" [label="R9", fillcolor=3, shape=diamond, style=filled]
657   17 [label="State 17\n\l  4 assignment: id \":=\" exp •\l"]
658   17 -> "17R4" [style=solid]
659  "17R4" [label="R4", fillcolor=3, shape=diamond, style=filled]
660   18 [label="State 18\n\l  8 exp: • \"incr\" exp @1 @2 exp\l  8    | \"incr\" exp @1 @2 • exp\l  9    | • \"(\" exp \")\"\l 10    | • \"identifier\"\l 11    | • \"number\"\l"]
661   18 -> 4 [style=solid label="\"incr\""]
662   18 -> 11 [style=solid label="\"identifier\""]
663   18 -> 6 [style=solid label="\"number\""]
664   18 -> 7 [style=solid label="\"(\""]
665   18 -> 19 [style=dashed label="exp"]
666   19 [label="State 19\n\l  8 exp: \"incr\" exp @1 @2 exp •\l"]
667   19 -> "19R8" [style=solid]
668  "19R8" [label="R8", fillcolor=3, shape=diamond, style=filled]
673 AT_CHECK([[sed -e 's/bison-xml-report version="[^"]*"/bison-xml-report version="VERSION"/g' input.xml]], [],
674 [[<?xml version="1.0"?>
676 <bison-xml-report version="VERSION" bug-report="bug-bison@gnu.org" url="https://www.gnu.org/software/bison/">
678   <filename>input.yy</filename>
680   <grammar>
681     <rules>
682       <rule number="0" usefulness="useful">
683         <lhs>$accept</lhs>
684         <rhs>
685           <symbol>unit</symbol>
686           <symbol>&quot;end of file&quot;</symbol>
687         </rhs>
688       </rule>
689       <rule number="1" usefulness="useful">
690         <lhs>unit</lhs>
691         <rhs>
692           <symbol>assignments</symbol>
693           <symbol>exp</symbol>
694         </rhs>
695       </rule>
696       <rule number="2" usefulness="useful">
697         <lhs>assignments</lhs>
698         <rhs>
699           <empty/>
700         </rhs>
701       </rule>
702       <rule number="3" usefulness="useful">
703         <lhs>assignments</lhs>
704         <rhs>
705           <symbol>assignments</symbol>
706           <symbol>assignment</symbol>
707         </rhs>
708       </rule>
709       <rule number="4" usefulness="useful">
710         <lhs>assignment</lhs>
711         <rhs>
712           <symbol>id</symbol>
713           <symbol>&quot;:=&quot;</symbol>
714           <symbol>exp</symbol>
715         </rhs>
716       </rule>
717       <rule number="5" usefulness="useful">
718         <lhs>id</lhs>
719         <rhs>
720           <symbol>&quot;identifier&quot;</symbol>
721         </rhs>
722       </rule>
723       <rule number="6" usefulness="useful">
724         <lhs>@1</lhs>
725         <rhs>
726           <empty/>
727         </rhs>
728       </rule>
729       <rule number="7" usefulness="useful">
730         <lhs>@2</lhs>
731         <rhs>
732           <empty/>
733         </rhs>
734       </rule>
735       <rule number="8" usefulness="useful">
736         <lhs>exp</lhs>
737         <rhs>
738           <symbol>&quot;incr&quot;</symbol>
739           <symbol>exp</symbol>
740           <symbol>@1</symbol>
741           <symbol>@2</symbol>
742           <symbol>exp</symbol>
743         </rhs>
744       </rule>
745       <rule number="9" usefulness="useful">
746         <lhs>exp</lhs>
747         <rhs>
748           <symbol>&quot;(&quot;</symbol>
749           <symbol>exp</symbol>
750           <symbol>&quot;)&quot;</symbol>
751         </rhs>
752       </rule>
753       <rule number="10" usefulness="useful">
754         <lhs>exp</lhs>
755         <rhs>
756           <symbol>&quot;identifier&quot;</symbol>
757         </rhs>
758       </rule>
759       <rule number="11" usefulness="useful">
760         <lhs>exp</lhs>
761         <rhs>
762           <symbol>&quot;number&quot;</symbol>
763         </rhs>
764       </rule>
765     </rules>
766     <terminals>
767       <terminal symbol-number="0" token-number="0" name="&quot;end of file&quot;" type="" usefulness="useful"/>
768       <terminal symbol-number="1" token-number="256" name="error" type="" usefulness="useful"/>
769       <terminal symbol-number="3" token-number="258" name="&quot;:=&quot;" type="" usefulness="useful"/>
770       <terminal symbol-number="4" token-number="259" name="&quot;incr&quot;" type="" usefulness="useful"/>
771       <terminal symbol-number="5" token-number="260" name="&quot;identifier&quot;" type="std::string" usefulness="useful"/>
772       <terminal symbol-number="6" token-number="261" name="&quot;number&quot;" type="int" usefulness="useful"/>
773       <terminal symbol-number="7" token-number="262" name="&quot;(&quot;" type="" usefulness="useful"/>
774       <terminal symbol-number="8" token-number="263" name="&quot;)&quot;" type="" usefulness="useful"/>
775     </terminals>
776     <nonterminals>
777       <nonterminal symbol-number="9" name="$accept" type="" usefulness="useful"/>
778       <nonterminal symbol-number="10" name="unit" type="" usefulness="useful"/>
779       <nonterminal symbol-number="11" name="assignments" type="" usefulness="useful"/>
780       <nonterminal symbol-number="12" name="assignment" type="" usefulness="useful"/>
781       <nonterminal symbol-number="13" name="id" type="std::string" usefulness="useful"/>
782       <nonterminal symbol-number="14" name="exp" type="int" usefulness="useful"/>
783       <nonterminal symbol-number="15" name="@1" type="int" usefulness="useful"/>
784       <nonterminal symbol-number="16" name="@2" type="int" usefulness="useful"/>
785     </nonterminals>
786   </grammar>
788   <automaton>
790     <state number="0">
791       <itemset>
792         <item rule-number="0" dot="0"/>
793         <item rule-number="1" dot="0"/>
794         <item rule-number="2" dot="0"/>
795         <item rule-number="3" dot="0"/>
796       </itemset>
797       <actions>
798         <transitions>
799           <transition type="goto" symbol="unit" state="1"/>
800           <transition type="goto" symbol="assignments" state="2"/>
801         </transitions>
802         <errors/>
803         <reductions>
804           <reduction symbol="$default" rule="2" enabled="true"/>
805         </reductions>
806       </actions>
807       <solved-conflicts/>
808     </state>
810     <state number="1">
811       <itemset>
812         <item rule-number="0" dot="1"/>
813       </itemset>
814       <actions>
815         <transitions>
816           <transition type="shift" symbol="&quot;end of file&quot;" state="3"/>
817         </transitions>
818         <errors/>
819         <reductions/>
820       </actions>
821       <solved-conflicts/>
822     </state>
824     <state number="2">
825       <itemset>
826         <item rule-number="1" dot="1"/>
827         <item rule-number="3" dot="1"/>
828         <item rule-number="4" dot="0"/>
829         <item rule-number="5" dot="0"/>
830         <item rule-number="8" dot="0"/>
831         <item rule-number="9" dot="0"/>
832         <item rule-number="10" dot="0"/>
833         <item rule-number="11" dot="0"/>
834       </itemset>
835       <actions>
836         <transitions>
837           <transition type="shift" symbol="&quot;incr&quot;" state="4"/>
838           <transition type="shift" symbol="&quot;identifier&quot;" state="5"/>
839           <transition type="shift" symbol="&quot;number&quot;" state="6"/>
840           <transition type="shift" symbol="&quot;(&quot;" state="7"/>
841           <transition type="goto" symbol="assignment" state="8"/>
842           <transition type="goto" symbol="id" state="9"/>
843           <transition type="goto" symbol="exp" state="10"/>
844         </transitions>
845         <errors/>
846         <reductions/>
847       </actions>
848       <solved-conflicts/>
849     </state>
851     <state number="3">
852       <itemset>
853         <item rule-number="0" dot="2"/>
854       </itemset>
855       <actions>
856         <transitions/>
857         <errors/>
858         <reductions>
859           <reduction symbol="$default" rule="accept" enabled="true"/>
860         </reductions>
861       </actions>
862       <solved-conflicts/>
863     </state>
865     <state number="4">
866       <itemset>
867         <item rule-number="8" dot="0"/>
868         <item rule-number="8" dot="1"/>
869         <item rule-number="9" dot="0"/>
870         <item rule-number="10" dot="0"/>
871         <item rule-number="11" dot="0"/>
872       </itemset>
873       <actions>
874         <transitions>
875           <transition type="shift" symbol="&quot;incr&quot;" state="4"/>
876           <transition type="shift" symbol="&quot;identifier&quot;" state="11"/>
877           <transition type="shift" symbol="&quot;number&quot;" state="6"/>
878           <transition type="shift" symbol="&quot;(&quot;" state="7"/>
879           <transition type="goto" symbol="exp" state="12"/>
880         </transitions>
881         <errors/>
882         <reductions/>
883       </actions>
884       <solved-conflicts/>
885     </state>
887     <state number="5">
888       <itemset>
889         <item rule-number="5" dot="1">
890           <lookaheads>
891             <symbol>&quot;:=&quot;</symbol>
892           </lookaheads>
893         </item>
894         <item rule-number="10" dot="1">
895           <lookaheads>
896             <symbol>&quot;end of file&quot;</symbol>
897           </lookaheads>
898         </item>
899       </itemset>
900       <actions>
901         <transitions/>
902         <errors/>
903         <reductions>
904           <reduction symbol="&quot;end of file&quot;" rule="10" enabled="true"/>
905           <reduction symbol="$default" rule="5" enabled="true"/>
906         </reductions>
907       </actions>
908       <solved-conflicts/>
909     </state>
911     <state number="6">
912       <itemset>
913         <item rule-number="11" dot="1"/>
914       </itemset>
915       <actions>
916         <transitions/>
917         <errors/>
918         <reductions>
919           <reduction symbol="$default" rule="11" enabled="true"/>
920         </reductions>
921       </actions>
922       <solved-conflicts/>
923     </state>
925     <state number="7">
926       <itemset>
927         <item rule-number="8" dot="0"/>
928         <item rule-number="9" dot="0"/>
929         <item rule-number="9" dot="1"/>
930         <item rule-number="10" dot="0"/>
931         <item rule-number="11" dot="0"/>
932       </itemset>
933       <actions>
934         <transitions>
935           <transition type="shift" symbol="&quot;incr&quot;" state="4"/>
936           <transition type="shift" symbol="&quot;identifier&quot;" state="11"/>
937           <transition type="shift" symbol="&quot;number&quot;" state="6"/>
938           <transition type="shift" symbol="&quot;(&quot;" state="7"/>
939           <transition type="goto" symbol="exp" state="13"/>
940         </transitions>
941         <errors/>
942         <reductions/>
943       </actions>
944       <solved-conflicts/>
945     </state>
947     <state number="8">
948       <itemset>
949         <item rule-number="3" dot="2"/>
950       </itemset>
951       <actions>
952         <transitions/>
953         <errors/>
954         <reductions>
955           <reduction symbol="$default" rule="3" enabled="true"/>
956         </reductions>
957       </actions>
958       <solved-conflicts/>
959     </state>
961     <state number="9">
962       <itemset>
963         <item rule-number="4" dot="1"/>
964       </itemset>
965       <actions>
966         <transitions>
967           <transition type="shift" symbol="&quot;:=&quot;" state="14"/>
968         </transitions>
969         <errors/>
970         <reductions/>
971       </actions>
972       <solved-conflicts/>
973     </state>
975     <state number="10">
976       <itemset>
977         <item rule-number="1" dot="2"/>
978       </itemset>
979       <actions>
980         <transitions/>
981         <errors/>
982         <reductions>
983           <reduction symbol="$default" rule="1" enabled="true"/>
984         </reductions>
985       </actions>
986       <solved-conflicts/>
987     </state>
989     <state number="11">
990       <itemset>
991         <item rule-number="10" dot="1"/>
992       </itemset>
993       <actions>
994         <transitions/>
995         <errors/>
996         <reductions>
997           <reduction symbol="$default" rule="10" enabled="true"/>
998         </reductions>
999       </actions>
1000       <solved-conflicts/>
1001     </state>
1003     <state number="12">
1004       <itemset>
1005         <item rule-number="6" dot="0"/>
1006         <item rule-number="8" dot="2"/>
1007       </itemset>
1008       <actions>
1009         <transitions>
1010           <transition type="goto" symbol="@1" state="15"/>
1011         </transitions>
1012         <errors/>
1013         <reductions>
1014           <reduction symbol="$default" rule="6" enabled="true"/>
1015         </reductions>
1016       </actions>
1017       <solved-conflicts/>
1018     </state>
1020     <state number="13">
1021       <itemset>
1022         <item rule-number="9" dot="2"/>
1023       </itemset>
1024       <actions>
1025         <transitions>
1026           <transition type="shift" symbol="&quot;)&quot;" state="16"/>
1027         </transitions>
1028         <errors/>
1029         <reductions/>
1030       </actions>
1031       <solved-conflicts/>
1032     </state>
1034     <state number="14">
1035       <itemset>
1036         <item rule-number="4" dot="2"/>
1037         <item rule-number="8" dot="0"/>
1038         <item rule-number="9" dot="0"/>
1039         <item rule-number="10" dot="0"/>
1040         <item rule-number="11" dot="0"/>
1041       </itemset>
1042       <actions>
1043         <transitions>
1044           <transition type="shift" symbol="&quot;incr&quot;" state="4"/>
1045           <transition type="shift" symbol="&quot;identifier&quot;" state="11"/>
1046           <transition type="shift" symbol="&quot;number&quot;" state="6"/>
1047           <transition type="shift" symbol="&quot;(&quot;" state="7"/>
1048           <transition type="goto" symbol="exp" state="17"/>
1049         </transitions>
1050         <errors/>
1051         <reductions/>
1052       </actions>
1053       <solved-conflicts/>
1054     </state>
1056     <state number="15">
1057       <itemset>
1058         <item rule-number="7" dot="0"/>
1059         <item rule-number="8" dot="3"/>
1060       </itemset>
1061       <actions>
1062         <transitions>
1063           <transition type="goto" symbol="@2" state="18"/>
1064         </transitions>
1065         <errors/>
1066         <reductions>
1067           <reduction symbol="$default" rule="7" enabled="true"/>
1068         </reductions>
1069       </actions>
1070       <solved-conflicts/>
1071     </state>
1073     <state number="16">
1074       <itemset>
1075         <item rule-number="9" dot="3"/>
1076       </itemset>
1077       <actions>
1078         <transitions/>
1079         <errors/>
1080         <reductions>
1081           <reduction symbol="$default" rule="9" enabled="true"/>
1082         </reductions>
1083       </actions>
1084       <solved-conflicts/>
1085     </state>
1087     <state number="17">
1088       <itemset>
1089         <item rule-number="4" dot="3"/>
1090       </itemset>
1091       <actions>
1092         <transitions/>
1093         <errors/>
1094         <reductions>
1095           <reduction symbol="$default" rule="4" enabled="true"/>
1096         </reductions>
1097       </actions>
1098       <solved-conflicts/>
1099     </state>
1101     <state number="18">
1102       <itemset>
1103         <item rule-number="8" dot="0"/>
1104         <item rule-number="8" dot="4"/>
1105         <item rule-number="9" dot="0"/>
1106         <item rule-number="10" dot="0"/>
1107         <item rule-number="11" dot="0"/>
1108       </itemset>
1109       <actions>
1110         <transitions>
1111           <transition type="shift" symbol="&quot;incr&quot;" state="4"/>
1112           <transition type="shift" symbol="&quot;identifier&quot;" state="11"/>
1113           <transition type="shift" symbol="&quot;number&quot;" state="6"/>
1114           <transition type="shift" symbol="&quot;(&quot;" state="7"/>
1115           <transition type="goto" symbol="exp" state="19"/>
1116         </transitions>
1117         <errors/>
1118         <reductions/>
1119       </actions>
1120       <solved-conflicts/>
1121     </state>
1123     <state number="19">
1124       <itemset>
1125         <item rule-number="8" dot="5"/>
1126       </itemset>
1127       <actions>
1128         <transitions/>
1129         <errors/>
1130         <reductions>
1131           <reduction symbol="$default" rule="8" enabled="true"/>
1132         </reductions>
1133       </actions>
1134       <solved-conflicts/>
1135     </state>
1136   </automaton>
1137 </bison-xml-report>
1140 # Check HTML output.
1141 if test x"$XSLTPROC" != x""; then
1142   AT_CHECK([[$XSLTPROC \
1143            `]]AT_SET_ENV[[ bison --print-datadir`/xslt/xml2xhtml.xsl \
1144            input.xml | \
1145            sed -e 's/GNU Bison [0-9][-.0-9a-z]*/GNU Bison VERSION/' \
1146            >input.html]])
1148   AT_CHECK([cat input.html], [],
1149 [[<?xml version="1.0" encoding="UTF-8"?>
1150 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
1151 <html xmlns="http://www.w3.org/1999/xhtml" xmlns:bison="http://www.gnu.org/software/bison/">
1152   <head>
1153     <meta http-equiv="Content-Type" content="text/html;charset=UTF-8" />
1154     <title>input.yy - GNU Bison XML Automaton Report</title>
1155     <style type="text/css">
1156       body {
1157         font-family: "Nimbus Sans L", Arial, sans-serif;
1158         font-size: 9pt;
1159       }
1160       a:link {
1161         color: #1f00ff;
1162         text-decoration: none;
1163       }
1164       a:visited {
1165         color: #1f00ff;
1166         text-decoration: none;
1167       }
1168       a:hover {
1169         color: red;
1170       }
1171       #menu a {
1172         text-decoration: underline;
1173       }
1174       .i {
1175         font-style: italic;
1176       }
1177       .pre {
1178         font-family: monospace;
1179         white-space: pre;
1180       }
1181       ol.decimal {
1182         list-style-type: decimal;
1183       }
1184       ol.lower-alpha {
1185         list-style-type: lower-alpha;
1186       }
1187       .dot {
1188         color: #cc0000;
1189       }
1190       #footer {
1191         margin-top: 3.5em;
1192         font-size: 7pt;
1193       }
1194       </style>
1195   </head>
1196   <body><h1>GNU Bison XML Automaton Report</h1><p>
1197     input grammar: <span class="i">input.yy</span></p>
1199 <h3>Table of Contents</h3><ul id="menu"><li><a href="#reductions">Reductions</a><ul class="lower-alpha"><li><a href="#nonterminals_useless_in_grammar">Nonterminals useless in grammar</a></li><li><a href="#terminals_unused_in_grammar">Terminals unused in grammar</a></li><li><a href="#rules_useless_in_grammar">Rules useless in grammar</a></li></ul></li><li><a href="#conflicts">Conflicts</a></li><li><a href="#grammar">Grammar</a><ul class="lower-alpha"><li><a href="#grammar">Itemset</a></li><li><a href="#terminals">Terminal symbols</a></li><li><a href="#nonterminals">Nonterminal symbols</a></li></ul></li><li><a href="#automaton">Automaton</a></li></ul><h2><a name="reductions" id="reductions"></a> Reductions</h2><h3><a name="nonterminals_useless_in_grammar" id="nonterminals_useless_in_grammar"></a> Nonterminals useless in grammar</h3>
1201 <h3><a name="terminals_unused_in_grammar" id="terminals_unused_in_grammar"></a> Terminals unused in grammar</h3>
1203 <h3><a name="rules_useless_in_grammar" id="rules_useless_in_grammar"></a> Rules useless in grammar</h3>
1204 <h2><a name="conflicts" id="conflicts"></a> Conflicts</h2>
1206 <h2><a name="grammar" id="grammar"></a> Grammar</h2>
1207 <p class="pre">
1208   <a name="rule_0" id="rule_0">  0</a> <span class="i">$accept</span> → <span class="i">unit</span> <b>"end of file"</b>
1210   <a name="rule_1" id="rule_1">  1</a> <span class="i">unit</span> → <span class="i">assignments</span> <span class="i">exp</span>
1212   <a name="rule_2" id="rule_2">  2</a> <span class="i">assignments</span> → %empty
1213   <a name="rule_3" id="rule_3">  3</a>             | <span class="i">assignments</span> <span class="i">assignment</span>
1215   <a name="rule_4" id="rule_4">  4</a> <span class="i">assignment</span> → <span class="i">id</span> <b>":="</b> <span class="i">exp</span>
1217   <a name="rule_5" id="rule_5">  5</a> <span class="i">id</span> → <b>"identifier"</b>
1219   <a name="rule_6" id="rule_6">  6</a> <span class="i">@1</span> → %empty
1221   <a name="rule_7" id="rule_7">  7</a> <span class="i">@2</span> → %empty
1223   <a name="rule_8" id="rule_8">  8</a> <span class="i">exp</span> → <b>"incr"</b> <span class="i">exp</span> <span class="i">@1</span> <span class="i">@2</span> <span class="i">exp</span>
1224   <a name="rule_9" id="rule_9">  9</a>     | <b>"("</b> <span class="i">exp</span> <b>")"</b>
1225   <a name="rule_10" id="rule_10"> 10</a>     | <b>"identifier"</b>
1226   <a name="rule_11" id="rule_11"> 11</a>     | <b>"number"</b>
1227 </p>
1229 <h3><a name="terminals" id="terminals"></a> Terminals, with rules where they appear</h3>
1231 <ul>
1232   <li><b>"end of file"</b> (0) <a href="#rule_0">0</a></li>
1233   <li><b>error</b> (256)</li>
1234   <li><b>":="</b> (258) <a href="#rule_4">4</a></li>
1235   <li><b>"incr"</b> (259) <a href="#rule_8">8</a></li>
1236   <li><b>"identifier"</b> &lt;std::string&gt; (260) <a href="#rule_5">5</a> <a href="#rule_10">10</a></li>
1237   <li><b>"number"</b> &lt;int&gt; (261) <a href="#rule_11">11</a></li>
1238   <li><b>"("</b> (262) <a href="#rule_9">9</a></li>
1239   <li><b>")"</b> (263) <a href="#rule_9">9</a></li>
1240 </ul>
1242 <h3><a name="nonterminals" id="nonterminals"></a> Nonterminals, with rules where they appear</h3>
1244 <ul>
1245   <li><b>$accept</b> (9)
1246     <ul>
1247       <li>on left: <a href="#rule_0">0</a></li>
1248     </ul>
1249   </li>
1250   <li><b>unit</b> (10)
1251     <ul>
1252       <li>on left: <a href="#rule_1">1</a></li>
1253       <li>on right: <a href="#rule_0">0</a></li>
1254     </ul>
1255   </li>
1256   <li><b>assignments</b> (11)
1257     <ul>
1258       <li>on left: <a href="#rule_2">2</a> <a href="#rule_3">3</a></li>
1259       <li>on right: <a href="#rule_1">1</a> <a href="#rule_3">3</a></li>
1260     </ul>
1261   </li>
1262   <li><b>assignment</b> (12)
1263     <ul>
1264       <li>on left: <a href="#rule_4">4</a></li>
1265       <li>on right: <a href="#rule_3">3</a></li>
1266     </ul>
1267   </li>
1268   <li><b>id</b> &lt;std::string&gt; (13)
1269     <ul>
1270       <li>on left: <a href="#rule_5">5</a></li>
1271       <li>on right: <a href="#rule_4">4</a></li>
1272     </ul>
1273   </li>
1274   <li><b>exp</b> &lt;int&gt; (14)
1275     <ul>
1276       <li>on left: <a href="#rule_8">8</a> <a href="#rule_9">9</a> <a href="#rule_10">10</a> <a href="#rule_11">11</a></li>
1277       <li>on right: <a href="#rule_1">1</a> <a href="#rule_4">4</a> <a href="#rule_8">8</a> <a href="#rule_9">9</a></li>
1278     </ul>
1279   </li>
1280   <li><b>@1</b> &lt;int&gt; (15)
1281     <ul>
1282       <li>on left: <a href="#rule_6">6</a></li>
1283       <li>on right: <a href="#rule_8">8</a></li>
1284     </ul>
1285   </li>
1286   <li><b>@2</b> &lt;int&gt; (16)
1287     <ul>
1288       <li>on left: <a href="#rule_7">7</a></li>
1289       <li>on right: <a href="#rule_8">8</a></li>
1290     </ul>
1291   </li>
1292 </ul><h2><a name="automaton" id="automaton"></a> Automaton</h2>
1294 <h3><a name="state_0" id="state_0"></a>State 0</h3>
1296 <p class="pre">  <a href="#rule_0">  0</a> <span class="i">$accept</span> → <span class="dot">•</span> <span class="i">unit</span> <b>"end of file"</b>
1297   <a href="#rule_1">  1</a> <span class="i">unit</span> → <span class="dot">•</span> <span class="i">assignments</span> <span class="i">exp</span>
1298   <a href="#rule_2">  2</a> <span class="i">assignments</span> → <span class="dot">•</span> %empty
1299   <a href="#rule_3">  3</a>             | <span class="dot">•</span> <span class="i">assignments</span> <span class="i">assignment</span>
1301     $default  <a href="#rule_2">reduce using rule 2</a> (assignments)
1303     unit         <a href="#state_1">go to state 1</a>
1304     assignments  <a href="#state_2">go to state 2</a>
1305 </p>
1307 <h3><a name="state_1" id="state_1"></a>State 1</h3>
1309 <p class="pre">  <a href="#rule_0">  0</a> <span class="i">$accept</span> → <span class="i">unit</span> <span class="dot">•</span> <b>"end of file"</b>
1311     "end of file"  <a href="#state_3">shift, and go to state 3</a>
1312 </p>
1314 <h3><a name="state_2" id="state_2"></a>State 2</h3>
1316 <p class="pre">  <a href="#rule_1">  1</a> <span class="i">unit</span> → <span class="i">assignments</span> <span class="dot">•</span> <span class="i">exp</span>
1317   <a href="#rule_3">  3</a> <span class="i">assignments</span> → <span class="i">assignments</span> <span class="dot">•</span> <span class="i">assignment</span>
1318   <a href="#rule_4">  4</a> <span class="i">assignment</span> → <span class="dot">•</span> <span class="i">id</span> <b>":="</b> <span class="i">exp</span>
1319   <a href="#rule_5">  5</a> <span class="i">id</span> → <span class="dot">•</span> <b>"identifier"</b>
1320   <a href="#rule_8">  8</a> <span class="i">exp</span> → <span class="dot">•</span> <b>"incr"</b> <span class="i">exp</span> <span class="i">@1</span> <span class="i">@2</span> <span class="i">exp</span>
1321   <a href="#rule_9">  9</a>     | <span class="dot">•</span> <b>"("</b> <span class="i">exp</span> <b>")"</b>
1322   <a href="#rule_10"> 10</a>     | <span class="dot">•</span> <b>"identifier"</b>
1323   <a href="#rule_11"> 11</a>     | <span class="dot">•</span> <b>"number"</b>
1325     "incr"        <a href="#state_4">shift, and go to state 4</a>
1326     "identifier"  <a href="#state_5">shift, and go to state 5</a>
1327     "number"      <a href="#state_6">shift, and go to state 6</a>
1328     "("           <a href="#state_7">shift, and go to state 7</a>
1330     assignment  <a href="#state_8">go to state 8</a>
1331     id          <a href="#state_9">go to state 9</a>
1332     exp         <a href="#state_10">go to state 10</a>
1333 </p>
1335 <h3><a name="state_3" id="state_3"></a>State 3</h3>
1337 <p class="pre">  <a href="#rule_0">  0</a> <span class="i">$accept</span> → <span class="i">unit</span> <b>"end of file"</b> <span class="dot">•</span>
1339     $default  accept
1340 </p>
1342 <h3><a name="state_4" id="state_4"></a>State 4</h3>
1344 <p class="pre">  <a href="#rule_8">  8</a> <span class="i">exp</span> → <span class="dot">•</span> <b>"incr"</b> <span class="i">exp</span> <span class="i">@1</span> <span class="i">@2</span> <span class="i">exp</span>
1345   <a href="#rule_8">  8</a>     | <b>"incr"</b> <span class="dot">•</span> <span class="i">exp</span> <span class="i">@1</span> <span class="i">@2</span> <span class="i">exp</span>
1346   <a href="#rule_9">  9</a>     | <span class="dot">•</span> <b>"("</b> <span class="i">exp</span> <b>")"</b>
1347   <a href="#rule_10"> 10</a>     | <span class="dot">•</span> <b>"identifier"</b>
1348   <a href="#rule_11"> 11</a>     | <span class="dot">•</span> <b>"number"</b>
1350     "incr"        <a href="#state_4">shift, and go to state 4</a>
1351     "identifier"  <a href="#state_11">shift, and go to state 11</a>
1352     "number"      <a href="#state_6">shift, and go to state 6</a>
1353     "("           <a href="#state_7">shift, and go to state 7</a>
1355     exp  <a href="#state_12">go to state 12</a>
1356 </p>
1358 <h3><a name="state_5" id="state_5"></a>State 5</h3>
1360 <p class="pre">  <a href="#rule_5">  5</a> <span class="i">id</span> → <b>"identifier"</b> <span class="dot">•</span>  [":="]
1361   <a href="#rule_10"> 10</a> <span class="i">exp</span> → <b>"identifier"</b> <span class="dot">•</span>  ["end of file"]
1363     "end of file"  <a href="#rule_10">reduce using rule 10</a> (exp)
1364     $default       <a href="#rule_5">reduce using rule 5</a> (id)
1365 </p>
1367 <h3><a name="state_6" id="state_6"></a>State 6</h3>
1369 <p class="pre">  <a href="#rule_11"> 11</a> <span class="i">exp</span> → <b>"number"</b> <span class="dot">•</span>
1371     $default  <a href="#rule_11">reduce using rule 11</a> (exp)
1372 </p>
1374 <h3><a name="state_7" id="state_7"></a>State 7</h3>
1376 <p class="pre">  <a href="#rule_8">  8</a> <span class="i">exp</span> → <span class="dot">•</span> <b>"incr"</b> <span class="i">exp</span> <span class="i">@1</span> <span class="i">@2</span> <span class="i">exp</span>
1377   <a href="#rule_9">  9</a>     | <span class="dot">•</span> <b>"("</b> <span class="i">exp</span> <b>")"</b>
1378   <a href="#rule_9">  9</a>     | <b>"("</b> <span class="dot">•</span> <span class="i">exp</span> <b>")"</b>
1379   <a href="#rule_10"> 10</a>     | <span class="dot">•</span> <b>"identifier"</b>
1380   <a href="#rule_11"> 11</a>     | <span class="dot">•</span> <b>"number"</b>
1382     "incr"        <a href="#state_4">shift, and go to state 4</a>
1383     "identifier"  <a href="#state_11">shift, and go to state 11</a>
1384     "number"      <a href="#state_6">shift, and go to state 6</a>
1385     "("           <a href="#state_7">shift, and go to state 7</a>
1387     exp  <a href="#state_13">go to state 13</a>
1388 </p>
1390 <h3><a name="state_8" id="state_8"></a>State 8</h3>
1392 <p class="pre">  <a href="#rule_3">  3</a> <span class="i">assignments</span> → <span class="i">assignments</span> <span class="i">assignment</span> <span class="dot">•</span>
1394     $default  <a href="#rule_3">reduce using rule 3</a> (assignments)
1395 </p>
1397 <h3><a name="state_9" id="state_9"></a>State 9</h3>
1399 <p class="pre">  <a href="#rule_4">  4</a> <span class="i">assignment</span> → <span class="i">id</span> <span class="dot">•</span> <b>":="</b> <span class="i">exp</span>
1401     ":="  <a href="#state_14">shift, and go to state 14</a>
1402 </p>
1404 <h3><a name="state_10" id="state_10"></a>State 10</h3>
1406 <p class="pre">  <a href="#rule_1">  1</a> <span class="i">unit</span> → <span class="i">assignments</span> <span class="i">exp</span> <span class="dot">•</span>
1408     $default  <a href="#rule_1">reduce using rule 1</a> (unit)
1409 </p>
1411 <h3><a name="state_11" id="state_11"></a>State 11</h3>
1413 <p class="pre">  <a href="#rule_10"> 10</a> <span class="i">exp</span> → <b>"identifier"</b> <span class="dot">•</span>
1415     $default  <a href="#rule_10">reduce using rule 10</a> (exp)
1416 </p>
1418 <h3><a name="state_12" id="state_12"></a>State 12</h3>
1420 <p class="pre">  <a href="#rule_6">  6</a> <span class="i">@1</span> → <span class="dot">•</span> %empty
1421   <a href="#rule_8">  8</a> <span class="i">exp</span> → <b>"incr"</b> <span class="i">exp</span> <span class="dot">•</span> <span class="i">@1</span> <span class="i">@2</span> <span class="i">exp</span>
1423     $default  <a href="#rule_6">reduce using rule 6</a> (@1)
1425     @1  <a href="#state_15">go to state 15</a>
1426 </p>
1428 <h3><a name="state_13" id="state_13"></a>State 13</h3>
1430 <p class="pre">  <a href="#rule_9">  9</a> <span class="i">exp</span> → <b>"("</b> <span class="i">exp</span> <span class="dot">•</span> <b>")"</b>
1432     ")"  <a href="#state_16">shift, and go to state 16</a>
1433 </p>
1435 <h3><a name="state_14" id="state_14"></a>State 14</h3>
1437 <p class="pre">  <a href="#rule_4">  4</a> <span class="i">assignment</span> → <span class="i">id</span> <b>":="</b> <span class="dot">•</span> <span class="i">exp</span>
1438   <a href="#rule_8">  8</a> <span class="i">exp</span> → <span class="dot">•</span> <b>"incr"</b> <span class="i">exp</span> <span class="i">@1</span> <span class="i">@2</span> <span class="i">exp</span>
1439   <a href="#rule_9">  9</a>     | <span class="dot">•</span> <b>"("</b> <span class="i">exp</span> <b>")"</b>
1440   <a href="#rule_10"> 10</a>     | <span class="dot">•</span> <b>"identifier"</b>
1441   <a href="#rule_11"> 11</a>     | <span class="dot">•</span> <b>"number"</b>
1443     "incr"        <a href="#state_4">shift, and go to state 4</a>
1444     "identifier"  <a href="#state_11">shift, and go to state 11</a>
1445     "number"      <a href="#state_6">shift, and go to state 6</a>
1446     "("           <a href="#state_7">shift, and go to state 7</a>
1448     exp  <a href="#state_17">go to state 17</a>
1449 </p>
1451 <h3><a name="state_15" id="state_15"></a>State 15</h3>
1453 <p class="pre">  <a href="#rule_7">  7</a> <span class="i">@2</span> → <span class="dot">•</span> %empty
1454   <a href="#rule_8">  8</a> <span class="i">exp</span> → <b>"incr"</b> <span class="i">exp</span> <span class="i">@1</span> <span class="dot">•</span> <span class="i">@2</span> <span class="i">exp</span>
1456     $default  <a href="#rule_7">reduce using rule 7</a> (@2)
1458     @2  <a href="#state_18">go to state 18</a>
1459 </p>
1461 <h3><a name="state_16" id="state_16"></a>State 16</h3>
1463 <p class="pre">  <a href="#rule_9">  9</a> <span class="i">exp</span> → <b>"("</b> <span class="i">exp</span> <b>")"</b> <span class="dot">•</span>
1465     $default  <a href="#rule_9">reduce using rule 9</a> (exp)
1466 </p>
1468 <h3><a name="state_17" id="state_17"></a>State 17</h3>
1470 <p class="pre">  <a href="#rule_4">  4</a> <span class="i">assignment</span> → <span class="i">id</span> <b>":="</b> <span class="i">exp</span> <span class="dot">•</span>
1472     $default  <a href="#rule_4">reduce using rule 4</a> (assignment)
1473 </p>
1475 <h3><a name="state_18" id="state_18"></a>State 18</h3>
1477 <p class="pre">  <a href="#rule_8">  8</a> <span class="i">exp</span> → <span class="dot">•</span> <b>"incr"</b> <span class="i">exp</span> <span class="i">@1</span> <span class="i">@2</span> <span class="i">exp</span>
1478   <a href="#rule_8">  8</a>     | <b>"incr"</b> <span class="i">exp</span> <span class="i">@1</span> <span class="i">@2</span> <span class="dot">•</span> <span class="i">exp</span>
1479   <a href="#rule_9">  9</a>     | <span class="dot">•</span> <b>"("</b> <span class="i">exp</span> <b>")"</b>
1480   <a href="#rule_10"> 10</a>     | <span class="dot">•</span> <b>"identifier"</b>
1481   <a href="#rule_11"> 11</a>     | <span class="dot">•</span> <b>"number"</b>
1483     "incr"        <a href="#state_4">shift, and go to state 4</a>
1484     "identifier"  <a href="#state_11">shift, and go to state 11</a>
1485     "number"      <a href="#state_6">shift, and go to state 6</a>
1486     "("           <a href="#state_7">shift, and go to state 7</a>
1488     exp  <a href="#state_19">go to state 19</a>
1489 </p>
1491 <h3><a name="state_19" id="state_19"></a>State 19</h3>
1493 <p class="pre">  <a href="#rule_8">  8</a> <span class="i">exp</span> → <b>"incr"</b> <span class="i">exp</span> <span class="i">@1</span> <span class="i">@2</span> <span class="i">exp</span> <span class="dot">•</span>
1495     $default  <a href="#rule_8">reduce using rule 8</a> (exp)
1496 </p>
1498 <div id="footer"><hr />This document was generated using
1499       <a href="http://www.gnu.org/software/bison/" title="GNU Bison">
1500       GNU Bison VERSION</a>
1501       XML Automaton Report.<br />
1502       Verbatim copying and distribution of this entire page is
1503       permitted in any medium, provided this notice is preserved.</div></body>
1504 </html>
1508 AT_BISON_OPTION_POPDEFS
1509 AT_CLEANUP
1512 ## ------------------------ ##
1513 ## Reports with conflicts.  ##
1514 ## ------------------------ ##
1516 AT_SETUP([Reports with conflicts])
1518 AT_KEYWORDS([cex report])
1520 # We need UTF-8 support for correct screen-width computation of UTF-8
1521 # characters.  Skip the test if not available.
1522 locale=`locale -a | $EGREP '^en_US\.(UTF-8|utf8)$' | sed 1q`
1523 AT_SKIP_IF([test x == x"$locale"])
1525 AT_BISON_OPTION_PUSHDEFS
1526 AT_DATA([input.y],
1527 [[%left "+"
1530 : exp "⊕" exp
1531 | exp "+" exp
1532 | exp "+" exp
1533 | "number"
1534 | "Ñùṃéℝô"
1537 AT_CHECK([LC_ALL="$locale" bison -fno-caret -o input.cc -rall -Wcex --graph=input.gv --xml input.y], [], [],
1538 [[input.y: warning: 3 shift/reduce conflicts [-Wconflicts-sr]
1539 input.y: warning: 3 reduce/reduce conflicts [-Wconflicts-rr]
1540 input.y: warning: shift/reduce conflict on token "⊕" [-Wcounterexamples]
1541   Example: exp "+" exp • "⊕" exp
1542   Shift derivation
1543     exp
1544     ↳ exp "+" exp
1545               ↳ exp • "⊕" exp
1546   Reduce derivation
1547     exp
1548     ↳ exp             "⊕" exp
1549       ↳ exp "+" exp •
1550 input.y: warning: reduce/reduce conflict on tokens $end, "+", "⊕" [-Wcounterexamples]
1551   Example: exp "+" exp •
1552   First reduce derivation
1553     exp
1554     ↳ exp "+" exp •
1555   Second reduce derivation
1556     exp
1557     ↳ exp "+" exp •
1558 input.y: warning: shift/reduce conflict on token "⊕" [-Wcounterexamples]
1559   Example: exp "+" exp • "⊕" exp
1560   Shift derivation
1561     exp
1562     ↳ exp "+" exp
1563               ↳ exp • "⊕" exp
1564   Reduce derivation
1565     exp
1566     ↳ exp             "⊕" exp
1567       ↳ exp "+" exp •
1568 input.y: warning: shift/reduce conflict on token "⊕" [-Wcounterexamples]
1569   Example: exp "⊕" exp • "⊕" exp
1570   Shift derivation
1571     exp
1572     ↳ exp "⊕" exp
1573               ↳ exp • "⊕" exp
1574   Reduce derivation
1575     exp
1576     ↳ exp             "⊕" exp
1577       ↳ exp "⊕" exp •
1578 input.y: warning: shift/reduce conflict on token "+" [-Wcounterexamples]
1579   Example: exp "⊕" exp • "+" exp
1580   Shift derivation
1581     exp
1582     ↳ exp "⊕" exp
1583               ↳ exp • "+" exp
1584   Reduce derivation
1585     exp
1586     ↳ exp             "+" exp
1587       ↳ exp "⊕" exp •
1588 input.y: warning: shift/reduce conflict on token "+" [-Wcounterexamples]
1589   Example: exp "⊕" exp • "+" exp
1590   Shift derivation
1591     exp
1592     ↳ exp "⊕" exp
1593               ↳ exp • "+" exp
1594   Reduce derivation
1595     exp
1596     ↳ exp             "+" exp
1597       ↳ exp "⊕" exp •
1598 input.y:6.3-13: warning: rule useless in parser due to conflicts [-Wother]
1601 # Check the contents of the report.
1602 # FIXME: Avoid trailing white spaces.
1603 AT_CHECK([sed -e 's/ *$//' input.output], [],
1604 [[Rules useless in parser due to conflicts
1606     3 exp: exp "+" exp
1609 State 7 conflicts: 1 shift/reduce, 3 reduce/reduce
1610 State 8 conflicts: 2 shift/reduce
1613 Grammar
1615     0 $accept: exp $end
1617     1 exp: exp "⊕" exp
1618     2    | exp "+" exp
1619     3    | exp "+" exp
1620     4    | "number"
1621     5    | "Ñùṃéℝô"
1624 Terminals, with rules where they appear
1626     $end (0) 0
1627     error (256)
1628     "+" (258) 2 3
1629     "⊕" (259) 1
1630     "number" (260) 4
1631     "Ñùṃéℝô" (261) 5
1634 Nonterminals, with rules where they appear
1636     $accept (7)
1637         on left: 0
1638     exp (8)
1639         on left: 1 2 3 4 5
1640         on right: 0 1 2 3
1643 State 0
1645     0 $accept: • exp $end
1646     1 exp: • exp "⊕" exp
1647     2    | • exp "+" exp
1648     3    | • exp "+" exp
1649     4    | • "number"
1650     5    | • "Ñùṃéℝô"
1652     "number"  shift, and go to state 1
1653     "Ñùṃéℝô"  shift, and go to state 2
1655     exp  go to state 3
1658 State 1
1660     4 exp: "number" •
1662     $default  reduce using rule 4 (exp)
1665 State 2
1667     5 exp: "Ñùṃéℝô" •
1669     $default  reduce using rule 5 (exp)
1672 State 3
1674     0 $accept: exp • $end
1675     1 exp: exp • "⊕" exp
1676     2    | exp • "+" exp
1677     3    | exp • "+" exp
1679     $end  shift, and go to state 4
1680     "+"   shift, and go to state 5
1681     "⊕"   shift, and go to state 6
1684 State 4
1686     0 $accept: exp $end •
1688     $default  accept
1691 State 5
1693     1 exp: • exp "⊕" exp
1694     2    | • exp "+" exp
1695     2    | exp "+" • exp
1696     3    | • exp "+" exp
1697     3    | exp "+" • exp
1698     4    | • "number"
1699     5    | • "Ñùṃéℝô"
1701     "number"  shift, and go to state 1
1702     "Ñùṃéℝô"  shift, and go to state 2
1704     exp  go to state 7
1707 State 6
1709     1 exp: • exp "⊕" exp
1710     1    | exp "⊕" • exp
1711     2    | • exp "+" exp
1712     3    | • exp "+" exp
1713     4    | • "number"
1714     5    | • "Ñùṃéℝô"
1716     "number"  shift, and go to state 1
1717     "Ñùṃéℝô"  shift, and go to state 2
1719     exp  go to state 8
1722 State 7
1724     1 exp: exp • "⊕" exp
1725     2    | exp • "+" exp
1726     2    | exp "+" exp •  [$end, "+", "⊕"]
1727     3    | exp • "+" exp
1728     3    | exp "+" exp •  [$end, "+", "⊕"]
1730     "⊕"  shift, and go to state 6
1732     $end      reduce using rule 2 (exp)
1733     $end      [reduce using rule 3 (exp)]
1734     "+"       reduce using rule 2 (exp)
1735     "+"       [reduce using rule 3 (exp)]
1736     "⊕"       [reduce using rule 2 (exp)]
1737     "⊕"       [reduce using rule 3 (exp)]
1738     $default  reduce using rule 2 (exp)
1740     Conflict between rule 2 and token "+" resolved as reduce (%left "+").
1742     shift/reduce conflict on token "⊕":
1743         2 exp: exp "+" exp •
1744         1 exp: exp • "⊕" exp
1745       Example: exp "+" exp • "⊕" exp
1746       Shift derivation
1747         exp
1748         ↳ exp "+" exp
1749                   ↳ exp • "⊕" exp
1750       Reduce derivation
1751         exp
1752         ↳ exp             "⊕" exp
1753           ↳ exp "+" exp •
1755     reduce/reduce conflict on tokens $end, "+", "⊕":
1756         2 exp: exp "+" exp •
1757         3 exp: exp "+" exp •
1758       Example: exp "+" exp •
1759       First reduce derivation
1760         exp
1761         ↳ exp "+" exp •
1762       Second reduce derivation
1763         exp
1764         ↳ exp "+" exp •
1766     shift/reduce conflict on token "⊕":
1767         3 exp: exp "+" exp •
1768         1 exp: exp • "⊕" exp
1769       Example: exp "+" exp • "⊕" exp
1770       Shift derivation
1771         exp
1772         ↳ exp "+" exp
1773                   ↳ exp • "⊕" exp
1774       Reduce derivation
1775         exp
1776         ↳ exp             "⊕" exp
1777           ↳ exp "+" exp •
1781 State 8
1783     1 exp: exp • "⊕" exp
1784     1    | exp "⊕" exp •  [$end, "+", "⊕"]
1785     2    | exp • "+" exp
1786     3    | exp • "+" exp
1788     "+"  shift, and go to state 5
1789     "⊕"  shift, and go to state 6
1791     "+"       [reduce using rule 1 (exp)]
1792     "⊕"       [reduce using rule 1 (exp)]
1793     $default  reduce using rule 1 (exp)
1795     shift/reduce conflict on token "⊕":
1796         1 exp: exp "⊕" exp •
1797         1 exp: exp • "⊕" exp
1798       Example: exp "⊕" exp • "⊕" exp
1799       Shift derivation
1800         exp
1801         ↳ exp "⊕" exp
1802                   ↳ exp • "⊕" exp
1803       Reduce derivation
1804         exp
1805         ↳ exp             "⊕" exp
1806           ↳ exp "⊕" exp •
1808     shift/reduce conflict on token "+":
1809         1 exp: exp "⊕" exp •
1810         2 exp: exp • "+" exp
1811       Example: exp "⊕" exp • "+" exp
1812       Shift derivation
1813         exp
1814         ↳ exp "⊕" exp
1815                   ↳ exp • "+" exp
1816       Reduce derivation
1817         exp
1818         ↳ exp             "+" exp
1819           ↳ exp "⊕" exp •
1821     shift/reduce conflict on token "+":
1822         1 exp: exp "⊕" exp •
1823         3 exp: exp • "+" exp
1824       Example: exp "⊕" exp • "+" exp
1825       Shift derivation
1826         exp
1827         ↳ exp "⊕" exp
1828                   ↳ exp • "+" exp
1829       Reduce derivation
1830         exp
1831         ↳ exp             "+" exp
1832           ↳ exp "⊕" exp •
1839 AT_CHECK([sed -e '1s/GNU Bison .*\.$/GNU Bison VERSION./' input.gv], [],
1840 [[// Generated by GNU Bison VERSION.
1841 // Report bugs to <bug-bison@gnu.org>.
1842 // Home page: <https://www.gnu.org/software/bison/>.
1844 digraph "input.y"
1846   node [fontname = courier, shape = box, colorscheme = paired6]
1847   edge [fontname = courier]
1849   0 [label="State 0\n\l  0 $accept: • exp $end\l  1 exp: • exp \"⊕\" exp\l  2    | • exp \"+\" exp\l  3    | • exp \"+\" exp\l  4    | • \"number\"\l  5    | • \"Ñùṃéℝô\"\l"]
1850   0 -> 1 [style=solid label="\"number\""]
1851   0 -> 2 [style=solid label="\"Ñùṃéℝô\""]
1852   0 -> 3 [style=dashed label="exp"]
1853   1 [label="State 1\n\l  4 exp: \"number\" •\l"]
1854   1 -> "1R4" [style=solid]
1855  "1R4" [label="R4", fillcolor=3, shape=diamond, style=filled]
1856   2 [label="State 2\n\l  5 exp: \"Ñùṃéℝô\" •\l"]
1857   2 -> "2R5" [style=solid]
1858  "2R5" [label="R5", fillcolor=3, shape=diamond, style=filled]
1859   3 [label="State 3\n\l  0 $accept: exp • $end\l  1 exp: exp • \"⊕\" exp\l  2    | exp • \"+\" exp\l  3    | exp • \"+\" exp\l"]
1860   3 -> 4 [style=solid label="$end"]
1861   3 -> 5 [style=solid label="\"+\""]
1862   3 -> 6 [style=solid label="\"⊕\""]
1863   4 [label="State 4\n\l  0 $accept: exp $end •\l"]
1864   4 -> "4R0" [style=solid]
1865  "4R0" [label="Acc", fillcolor=1, shape=diamond, style=filled]
1866   5 [label="State 5\n\l  1 exp: • exp \"⊕\" exp\l  2    | • exp \"+\" exp\l  2    | exp \"+\" • exp\l  3    | • exp \"+\" exp\l  3    | exp \"+\" • exp\l  4    | • \"number\"\l  5    | • \"Ñùṃéℝô\"\l"]
1867   5 -> 1 [style=solid label="\"number\""]
1868   5 -> 2 [style=solid label="\"Ñùṃéℝô\""]
1869   5 -> 7 [style=dashed label="exp"]
1870   6 [label="State 6\n\l  1 exp: • exp \"⊕\" exp\l  1    | exp \"⊕\" • exp\l  2    | • exp \"+\" exp\l  3    | • exp \"+\" exp\l  4    | • \"number\"\l  5    | • \"Ñùṃéℝô\"\l"]
1871   6 -> 1 [style=solid label="\"number\""]
1872   6 -> 2 [style=solid label="\"Ñùṃéℝô\""]
1873   6 -> 8 [style=dashed label="exp"]
1874   7 [label="State 7\n\l  1 exp: exp • \"⊕\" exp\l  2    | exp • \"+\" exp\l  2    | exp \"+\" exp •  [$end, \"+\", \"⊕\"]\l  3    | exp • \"+\" exp\l  3    | exp \"+\" exp •  [$end, \"+\", \"⊕\"]\l"]
1875   7 -> 6 [style=solid label="\"⊕\""]
1876   7 -> "7R2d" [label="[\"⊕\"]", style=solid]
1877  "7R2d" [label="R2", fillcolor=5, shape=diamond, style=filled]
1878   7 -> "7R2" [style=solid]
1879  "7R2" [label="R2", fillcolor=3, shape=diamond, style=filled]
1880   7 -> "7R3d" [label="[$end, \"+\", \"⊕\"]", style=solid]
1881  "7R3d" [label="R3", fillcolor=5, shape=diamond, style=filled]
1882   8 [label="State 8\n\l  1 exp: exp • \"⊕\" exp\l  1    | exp \"⊕\" exp •  [$end, \"+\", \"⊕\"]\l  2    | exp • \"+\" exp\l  3    | exp • \"+\" exp\l"]
1883   8 -> 5 [style=solid label="\"+\""]
1884   8 -> 6 [style=solid label="\"⊕\""]
1885   8 -> "8R1d" [label="[\"+\", \"⊕\"]", style=solid]
1886  "8R1d" [label="R1", fillcolor=5, shape=diamond, style=filled]
1887   8 -> "8R1" [style=solid]
1888  "8R1" [label="R1", fillcolor=3, shape=diamond, style=filled]
1893 AT_CHECK([[sed -e 's/bison-xml-report version="[^"]*"/bison-xml-report version="VERSION"/g' input.xml]], [],
1894 [[<?xml version="1.0"?>
1896 <bison-xml-report version="VERSION" bug-report="bug-bison@gnu.org" url="https://www.gnu.org/software/bison/">
1898   <filename>input.y</filename>
1900   <grammar>
1901     <rules>
1902       <rule number="0" usefulness="useful">
1903         <lhs>$accept</lhs>
1904         <rhs>
1905           <symbol>exp</symbol>
1906           <symbol>$end</symbol>
1907         </rhs>
1908       </rule>
1909       <rule number="1" usefulness="useful">
1910         <lhs>exp</lhs>
1911         <rhs>
1912           <symbol>exp</symbol>
1913           <symbol>&quot;⊕&quot;</symbol>
1914           <symbol>exp</symbol>
1915         </rhs>
1916       </rule>
1917       <rule number="2" usefulness="useful">
1918         <lhs>exp</lhs>
1919         <rhs>
1920           <symbol>exp</symbol>
1921           <symbol>&quot;+&quot;</symbol>
1922           <symbol>exp</symbol>
1923         </rhs>
1924       </rule>
1925       <rule number="3" usefulness="useless-in-parser">
1926         <lhs>exp</lhs>
1927         <rhs>
1928           <symbol>exp</symbol>
1929           <symbol>&quot;+&quot;</symbol>
1930           <symbol>exp</symbol>
1931         </rhs>
1932       </rule>
1933       <rule number="4" usefulness="useful">
1934         <lhs>exp</lhs>
1935         <rhs>
1936           <symbol>&quot;number&quot;</symbol>
1937         </rhs>
1938       </rule>
1939       <rule number="5" usefulness="useful">
1940         <lhs>exp</lhs>
1941         <rhs>
1942           <symbol>&quot;Ñùṃéℝô&quot;</symbol>
1943         </rhs>
1944       </rule>
1945     </rules>
1946     <terminals>
1947       <terminal symbol-number="0" token-number="0" name="$end" type="" usefulness="useful"/>
1948       <terminal symbol-number="1" token-number="256" name="error" type="" usefulness="useful"/>
1949       <terminal symbol-number="3" token-number="258" name="&quot;+&quot;" type="" usefulness="useful" prec="1" assoc="left"/>
1950       <terminal symbol-number="4" token-number="259" name="&quot;⊕&quot;" type="" usefulness="useful"/>
1951       <terminal symbol-number="5" token-number="260" name="&quot;number&quot;" type="" usefulness="useful"/>
1952       <terminal symbol-number="6" token-number="261" name="&quot;Ñùṃéℝô&quot;" type="" usefulness="useful"/>
1953     </terminals>
1954     <nonterminals>
1955       <nonterminal symbol-number="7" name="$accept" type="" usefulness="useful"/>
1956       <nonterminal symbol-number="8" name="exp" type="" usefulness="useful"/>
1957     </nonterminals>
1958   </grammar>
1960   <automaton>
1962     <state number="0">
1963       <itemset>
1964         <item rule-number="0" dot="0"/>
1965         <item rule-number="1" dot="0"/>
1966         <item rule-number="2" dot="0"/>
1967         <item rule-number="3" dot="0"/>
1968         <item rule-number="4" dot="0"/>
1969         <item rule-number="5" dot="0"/>
1970       </itemset>
1971       <actions>
1972         <transitions>
1973           <transition type="shift" symbol="&quot;number&quot;" state="1"/>
1974           <transition type="shift" symbol="&quot;Ñùṃéℝô&quot;" state="2"/>
1975           <transition type="goto" symbol="exp" state="3"/>
1976         </transitions>
1977         <errors/>
1978         <reductions/>
1979       </actions>
1980       <solved-conflicts/>
1981     </state>
1983     <state number="1">
1984       <itemset>
1985         <item rule-number="4" dot="1"/>
1986       </itemset>
1987       <actions>
1988         <transitions/>
1989         <errors/>
1990         <reductions>
1991           <reduction symbol="$default" rule="4" enabled="true"/>
1992         </reductions>
1993       </actions>
1994       <solved-conflicts/>
1995     </state>
1997     <state number="2">
1998       <itemset>
1999         <item rule-number="5" dot="1"/>
2000       </itemset>
2001       <actions>
2002         <transitions/>
2003         <errors/>
2004         <reductions>
2005           <reduction symbol="$default" rule="5" enabled="true"/>
2006         </reductions>
2007       </actions>
2008       <solved-conflicts/>
2009     </state>
2011     <state number="3">
2012       <itemset>
2013         <item rule-number="0" dot="1"/>
2014         <item rule-number="1" dot="1"/>
2015         <item rule-number="2" dot="1"/>
2016         <item rule-number="3" dot="1"/>
2017       </itemset>
2018       <actions>
2019         <transitions>
2020           <transition type="shift" symbol="$end" state="4"/>
2021           <transition type="shift" symbol="&quot;+&quot;" state="5"/>
2022           <transition type="shift" symbol="&quot;⊕&quot;" state="6"/>
2023         </transitions>
2024         <errors/>
2025         <reductions/>
2026       </actions>
2027       <solved-conflicts/>
2028     </state>
2030     <state number="4">
2031       <itemset>
2032         <item rule-number="0" dot="2"/>
2033       </itemset>
2034       <actions>
2035         <transitions/>
2036         <errors/>
2037         <reductions>
2038           <reduction symbol="$default" rule="accept" enabled="true"/>
2039         </reductions>
2040       </actions>
2041       <solved-conflicts/>
2042     </state>
2044     <state number="5">
2045       <itemset>
2046         <item rule-number="1" dot="0"/>
2047         <item rule-number="2" dot="0"/>
2048         <item rule-number="2" dot="2"/>
2049         <item rule-number="3" dot="0"/>
2050         <item rule-number="3" dot="2"/>
2051         <item rule-number="4" dot="0"/>
2052         <item rule-number="5" dot="0"/>
2053       </itemset>
2054       <actions>
2055         <transitions>
2056           <transition type="shift" symbol="&quot;number&quot;" state="1"/>
2057           <transition type="shift" symbol="&quot;Ñùṃéℝô&quot;" state="2"/>
2058           <transition type="goto" symbol="exp" state="7"/>
2059         </transitions>
2060         <errors/>
2061         <reductions/>
2062       </actions>
2063       <solved-conflicts/>
2064     </state>
2066     <state number="6">
2067       <itemset>
2068         <item rule-number="1" dot="0"/>
2069         <item rule-number="1" dot="2"/>
2070         <item rule-number="2" dot="0"/>
2071         <item rule-number="3" dot="0"/>
2072         <item rule-number="4" dot="0"/>
2073         <item rule-number="5" dot="0"/>
2074       </itemset>
2075       <actions>
2076         <transitions>
2077           <transition type="shift" symbol="&quot;number&quot;" state="1"/>
2078           <transition type="shift" symbol="&quot;Ñùṃéℝô&quot;" state="2"/>
2079           <transition type="goto" symbol="exp" state="8"/>
2080         </transitions>
2081         <errors/>
2082         <reductions/>
2083       </actions>
2084       <solved-conflicts/>
2085     </state>
2087     <state number="7">
2088       <itemset>
2089         <item rule-number="1" dot="1"/>
2090         <item rule-number="2" dot="1"/>
2091         <item rule-number="2" dot="3">
2092           <lookaheads>
2093             <symbol>$end</symbol>
2094             <symbol>&quot;+&quot;</symbol>
2095             <symbol>&quot;⊕&quot;</symbol>
2096           </lookaheads>
2097         </item>
2098         <item rule-number="3" dot="1"/>
2099         <item rule-number="3" dot="3">
2100           <lookaheads>
2101             <symbol>$end</symbol>
2102             <symbol>&quot;+&quot;</symbol>
2103             <symbol>&quot;⊕&quot;</symbol>
2104           </lookaheads>
2105         </item>
2106       </itemset>
2107       <actions>
2108         <transitions>
2109           <transition type="shift" symbol="&quot;⊕&quot;" state="6"/>
2110         </transitions>
2111         <errors/>
2112         <reductions>
2113           <reduction symbol="$end" rule="2" enabled="true"/>
2114           <reduction symbol="$end" rule="3" enabled="false"/>
2115           <reduction symbol="&quot;+&quot;" rule="2" enabled="true"/>
2116           <reduction symbol="&quot;+&quot;" rule="3" enabled="false"/>
2117           <reduction symbol="&quot;⊕&quot;" rule="2" enabled="false"/>
2118           <reduction symbol="&quot;⊕&quot;" rule="3" enabled="false"/>
2119           <reduction symbol="$default" rule="2" enabled="true"/>
2120         </reductions>
2121       </actions>
2122       <solved-conflicts>
2123         <resolution rule="2" symbol="&quot;+&quot;" type="reduce">%left &quot;+&quot;</resolution>
2124       </solved-conflicts>
2125     </state>
2127     <state number="8">
2128       <itemset>
2129         <item rule-number="1" dot="1"/>
2130         <item rule-number="1" dot="3">
2131           <lookaheads>
2132             <symbol>$end</symbol>
2133             <symbol>&quot;+&quot;</symbol>
2134             <symbol>&quot;⊕&quot;</symbol>
2135           </lookaheads>
2136         </item>
2137         <item rule-number="2" dot="1"/>
2138         <item rule-number="3" dot="1"/>
2139       </itemset>
2140       <actions>
2141         <transitions>
2142           <transition type="shift" symbol="&quot;+&quot;" state="5"/>
2143           <transition type="shift" symbol="&quot;⊕&quot;" state="6"/>
2144         </transitions>
2145         <errors/>
2146         <reductions>
2147           <reduction symbol="&quot;+&quot;" rule="1" enabled="false"/>
2148           <reduction symbol="&quot;⊕&quot;" rule="1" enabled="false"/>
2149           <reduction symbol="$default" rule="1" enabled="true"/>
2150         </reductions>
2151       </actions>
2152       <solved-conflicts/>
2153     </state>
2154   </automaton>
2155 </bison-xml-report>
2158 # Check HTML output.
2159 if test x"$XSLTPROC" != x""; then
2160   AT_CHECK([[$XSLTPROC \
2161            `]]AT_SET_ENV[[ bison --print-datadir`/xslt/xml2xhtml.xsl \
2162            input.xml | \
2163            sed -e 's/GNU Bison [0-9][-.0-9a-z]*/GNU Bison VERSION/' \
2164            >input.html]])
2166   AT_CHECK([cat input.html], [],
2167 [[<?xml version="1.0" encoding="UTF-8"?>
2168 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
2169 <html xmlns="http://www.w3.org/1999/xhtml" xmlns:bison="http://www.gnu.org/software/bison/">
2170   <head>
2171     <meta http-equiv="Content-Type" content="text/html;charset=UTF-8" />
2172     <title>input.y - GNU Bison XML Automaton Report</title>
2173     <style type="text/css">
2174       body {
2175         font-family: "Nimbus Sans L", Arial, sans-serif;
2176         font-size: 9pt;
2177       }
2178       a:link {
2179         color: #1f00ff;
2180         text-decoration: none;
2181       }
2182       a:visited {
2183         color: #1f00ff;
2184         text-decoration: none;
2185       }
2186       a:hover {
2187         color: red;
2188       }
2189       #menu a {
2190         text-decoration: underline;
2191       }
2192       .i {
2193         font-style: italic;
2194       }
2195       .pre {
2196         font-family: monospace;
2197         white-space: pre;
2198       }
2199       ol.decimal {
2200         list-style-type: decimal;
2201       }
2202       ol.lower-alpha {
2203         list-style-type: lower-alpha;
2204       }
2205       .dot {
2206         color: #cc0000;
2207       }
2208       #footer {
2209         margin-top: 3.5em;
2210         font-size: 7pt;
2211       }
2212       </style>
2213   </head>
2214   <body><h1>GNU Bison XML Automaton Report</h1><p>
2215     input grammar: <span class="i">input.y</span></p>
2217 <h3>Table of Contents</h3><ul id="menu"><li><a href="#reductions">Reductions</a><ul class="lower-alpha"><li><a href="#nonterminals_useless_in_grammar">Nonterminals useless in grammar</a></li><li><a href="#terminals_unused_in_grammar">Terminals unused in grammar</a></li><li><a href="#rules_useless_in_grammar">Rules useless in grammar</a></li><li><a href="#rules_useless_in_parser">Rules useless in parser due to conflicts</a></li></ul></li><li><a href="#conflicts">Conflicts</a></li><li><a href="#grammar">Grammar</a><ul class="lower-alpha"><li><a href="#grammar">Itemset</a></li><li><a href="#terminals">Terminal symbols</a></li><li><a href="#nonterminals">Nonterminal symbols</a></li></ul></li><li><a href="#automaton">Automaton</a></li></ul><h2><a name="reductions" id="reductions"></a> Reductions</h2><h3><a name="nonterminals_useless_in_grammar" id="nonterminals_useless_in_grammar"></a> Nonterminals useless in grammar</h3>
2219 <h3><a name="terminals_unused_in_grammar" id="terminals_unused_in_grammar"></a> Terminals unused in grammar</h3>
2221 <h3><a name="rules_useless_in_grammar" id="rules_useless_in_grammar"></a> Rules useless in grammar</h3>
2222 <h2><a name="rules_useless_in_parser" id="rules_useless_in_parser"></a> Rules useless in parser due to conflicts</h2>
2223 <p class="pre">
2224   <a href="#rule_3">  3</a> <span class="i">exp</span> → <span class="i">exp</span> <b>"+"</b> <span class="i">exp</span>
2225 </p>
2227 <h2><a name="conflicts" id="conflicts"></a> Conflicts</h2>
2229 <p class="pre"><a href="#state_7">State 7</a> conflicts: 1 shift/reduce, 3 reduce/reduce
2230 <a href="#state_8">State 8</a> conflicts: 2 shift/reduce
2233 </p><h2><a name="grammar" id="grammar"></a> Grammar</h2>
2234 <p class="pre">
2235   <a name="rule_0" id="rule_0">  0</a> <span class="i">$accept</span> → <span class="i">exp</span> <b>$end</b>
2237   <a name="rule_1" id="rule_1">  1</a> <span class="i">exp</span> → <span class="i">exp</span> <b>"⊕"</b> <span class="i">exp</span>
2238   <a name="rule_2" id="rule_2">  2</a>     | <span class="i">exp</span> <b>"+"</b> <span class="i">exp</span>
2239   <a name="rule_3" id="rule_3">  3</a>     | <span class="i">exp</span> <b>"+"</b> <span class="i">exp</span>
2240   <a name="rule_4" id="rule_4">  4</a>     | <b>"number"</b>
2241   <a name="rule_5" id="rule_5">  5</a>     | <b>"Ñùṃéℝô"</b>
2242 </p>
2244 <h3><a name="terminals" id="terminals"></a> Terminals, with rules where they appear</h3>
2246 <ul>
2247   <li><b>$end</b> (0) <a href="#rule_0">0</a></li>
2248   <li><b>error</b> (256)</li>
2249   <li><b>"+"</b> (258) <a href="#rule_2">2</a> <a href="#rule_3">3</a></li>
2250   <li><b>"⊕"</b> (259) <a href="#rule_1">1</a></li>
2251   <li><b>"number"</b> (260) <a href="#rule_4">4</a></li>
2252   <li><b>"Ñùṃéℝô"</b> (261) <a href="#rule_5">5</a></li>
2253 </ul>
2255 <h3><a name="nonterminals" id="nonterminals"></a> Nonterminals, with rules where they appear</h3>
2257 <ul>
2258   <li><b>$accept</b> (7)
2259     <ul>
2260       <li>on left: <a href="#rule_0">0</a></li>
2261     </ul>
2262   </li>
2263   <li><b>exp</b> (8)
2264     <ul>
2265       <li>on left: <a href="#rule_1">1</a> <a href="#rule_2">2</a> <a href="#rule_3">3</a> <a href="#rule_4">4</a> <a href="#rule_5">5</a></li>
2266       <li>on right: <a href="#rule_0">0</a> <a href="#rule_1">1</a> <a href="#rule_2">2</a> <a href="#rule_3">3</a></li>
2267     </ul>
2268   </li>
2269 </ul><h2><a name="automaton" id="automaton"></a> Automaton</h2>
2271 <h3><a name="state_0" id="state_0"></a>State 0</h3>
2273 <p class="pre">  <a href="#rule_0">  0</a> <span class="i">$accept</span> → <span class="dot">•</span> <span class="i">exp</span> <b>$end</b>
2274   <a href="#rule_1">  1</a> <span class="i">exp</span> → <span class="dot">•</span> <span class="i">exp</span> <b>"⊕"</b> <span class="i">exp</span>
2275   <a href="#rule_2">  2</a>     | <span class="dot">•</span> <span class="i">exp</span> <b>"+"</b> <span class="i">exp</span>
2276   <a href="#rule_3">  3</a>     | <span class="dot">•</span> <span class="i">exp</span> <b>"+"</b> <span class="i">exp</span>
2277   <a href="#rule_4">  4</a>     | <span class="dot">•</span> <b>"number"</b>
2278   <a href="#rule_5">  5</a>     | <span class="dot">•</span> <b>"Ñùṃéℝô"</b>
2280     "number"  <a href="#state_1">shift, and go to state 1</a>
2281     "Ñùṃéℝô"  <a href="#state_2">shift, and go to state 2</a>
2283     exp  <a href="#state_3">go to state 3</a>
2284 </p>
2286 <h3><a name="state_1" id="state_1"></a>State 1</h3>
2288 <p class="pre">  <a href="#rule_4">  4</a> <span class="i">exp</span> → <b>"number"</b> <span class="dot">•</span>
2290     $default  <a href="#rule_4">reduce using rule 4</a> (exp)
2291 </p>
2293 <h3><a name="state_2" id="state_2"></a>State 2</h3>
2295 <p class="pre">  <a href="#rule_5">  5</a> <span class="i">exp</span> → <b>"Ñùṃéℝô"</b> <span class="dot">•</span>
2297     $default  <a href="#rule_5">reduce using rule 5</a> (exp)
2298 </p>
2300 <h3><a name="state_3" id="state_3"></a>State 3</h3>
2302 <p class="pre">  <a href="#rule_0">  0</a> <span class="i">$accept</span> → <span class="i">exp</span> <span class="dot">•</span> <b>$end</b>
2303   <a href="#rule_1">  1</a> <span class="i">exp</span> → <span class="i">exp</span> <span class="dot">•</span> <b>"⊕"</b> <span class="i">exp</span>
2304   <a href="#rule_2">  2</a>     | <span class="i">exp</span> <span class="dot">•</span> <b>"+"</b> <span class="i">exp</span>
2305   <a href="#rule_3">  3</a>     | <span class="i">exp</span> <span class="dot">•</span> <b>"+"</b> <span class="i">exp</span>
2307     $end  <a href="#state_4">shift, and go to state 4</a>
2308     "+"   <a href="#state_5">shift, and go to state 5</a>
2309     "⊕"   <a href="#state_6">shift, and go to state 6</a>
2310 </p>
2312 <h3><a name="state_4" id="state_4"></a>State 4</h3>
2314 <p class="pre">  <a href="#rule_0">  0</a> <span class="i">$accept</span> → <span class="i">exp</span> <b>$end</b> <span class="dot">•</span>
2316     $default  accept
2317 </p>
2319 <h3><a name="state_5" id="state_5"></a>State 5</h3>
2321 <p class="pre">  <a href="#rule_1">  1</a> <span class="i">exp</span> → <span class="dot">•</span> <span class="i">exp</span> <b>"⊕"</b> <span class="i">exp</span>
2322   <a href="#rule_2">  2</a>     | <span class="dot">•</span> <span class="i">exp</span> <b>"+"</b> <span class="i">exp</span>
2323   <a href="#rule_2">  2</a>     | <span class="i">exp</span> <b>"+"</b> <span class="dot">•</span> <span class="i">exp</span>
2324   <a href="#rule_3">  3</a>     | <span class="dot">•</span> <span class="i">exp</span> <b>"+"</b> <span class="i">exp</span>
2325   <a href="#rule_3">  3</a>     | <span class="i">exp</span> <b>"+"</b> <span class="dot">•</span> <span class="i">exp</span>
2326   <a href="#rule_4">  4</a>     | <span class="dot">•</span> <b>"number"</b>
2327   <a href="#rule_5">  5</a>     | <span class="dot">•</span> <b>"Ñùṃéℝô"</b>
2329     "number"  <a href="#state_1">shift, and go to state 1</a>
2330     "Ñùṃéℝô"  <a href="#state_2">shift, and go to state 2</a>
2332     exp  <a href="#state_7">go to state 7</a>
2333 </p>
2335 <h3><a name="state_6" id="state_6"></a>State 6</h3>
2337 <p class="pre">  <a href="#rule_1">  1</a> <span class="i">exp</span> → <span class="dot">•</span> <span class="i">exp</span> <b>"⊕"</b> <span class="i">exp</span>
2338   <a href="#rule_1">  1</a>     | <span class="i">exp</span> <b>"⊕"</b> <span class="dot">•</span> <span class="i">exp</span>
2339   <a href="#rule_2">  2</a>     | <span class="dot">•</span> <span class="i">exp</span> <b>"+"</b> <span class="i">exp</span>
2340   <a href="#rule_3">  3</a>     | <span class="dot">•</span> <span class="i">exp</span> <b>"+"</b> <span class="i">exp</span>
2341   <a href="#rule_4">  4</a>     | <span class="dot">•</span> <b>"number"</b>
2342   <a href="#rule_5">  5</a>     | <span class="dot">•</span> <b>"Ñùṃéℝô"</b>
2344     "number"  <a href="#state_1">shift, and go to state 1</a>
2345     "Ñùṃéℝô"  <a href="#state_2">shift, and go to state 2</a>
2347     exp  <a href="#state_8">go to state 8</a>
2348 </p>
2350 <h3><a name="state_7" id="state_7"></a>State 7</h3>
2352 <p class="pre">  <a href="#rule_1">  1</a> <span class="i">exp</span> → <span class="i">exp</span> <span class="dot">•</span> <b>"⊕"</b> <span class="i">exp</span>
2353   <a href="#rule_2">  2</a>     | <span class="i">exp</span> <span class="dot">•</span> <b>"+"</b> <span class="i">exp</span>
2354   <a href="#rule_2">  2</a>     | <span class="i">exp</span> <b>"+"</b> <span class="i">exp</span> <span class="dot">•</span>  [$end, "+", "⊕"]
2355   <a href="#rule_3">  3</a>     | <span class="i">exp</span> <span class="dot">•</span> <b>"+"</b> <span class="i">exp</span>
2356   <a href="#rule_3">  3</a>     | <span class="i">exp</span> <b>"+"</b> <span class="i">exp</span> <span class="dot">•</span>  [$end, "+", "⊕"]
2358     "⊕"  <a href="#state_6">shift, and go to state 6</a>
2360     $end      <a href="#rule_2">reduce using rule 2</a> (exp)
2361     $end      [<a href="#rule_3">reduce using rule 3</a> (exp)]
2362     "+"       <a href="#rule_2">reduce using rule 2</a> (exp)
2363     "+"       [<a href="#rule_3">reduce using rule 3</a> (exp)]
2364     "⊕"       [<a href="#rule_2">reduce using rule 2</a> (exp)]
2365     "⊕"       [<a href="#rule_3">reduce using rule 3</a> (exp)]
2366     $default  <a href="#rule_2">reduce using rule 2</a> (exp)
2368     Conflict between <a href="#rule_2">rule 2</a> and token "+" resolved as reduce (%left "+").
2369 </p>
2371 <h3><a name="state_8" id="state_8"></a>State 8</h3>
2373 <p class="pre">  <a href="#rule_1">  1</a> <span class="i">exp</span> → <span class="i">exp</span> <span class="dot">•</span> <b>"⊕"</b> <span class="i">exp</span>
2374   <a href="#rule_1">  1</a>     | <span class="i">exp</span> <b>"⊕"</b> <span class="i">exp</span> <span class="dot">•</span>  [$end, "+", "⊕"]
2375   <a href="#rule_2">  2</a>     | <span class="i">exp</span> <span class="dot">•</span> <b>"+"</b> <span class="i">exp</span>
2376   <a href="#rule_3">  3</a>     | <span class="i">exp</span> <span class="dot">•</span> <b>"+"</b> <span class="i">exp</span>
2378     "+"  <a href="#state_5">shift, and go to state 5</a>
2379     "⊕"  <a href="#state_6">shift, and go to state 6</a>
2381     "+"       [<a href="#rule_1">reduce using rule 1</a> (exp)]
2382     "⊕"       [<a href="#rule_1">reduce using rule 1</a> (exp)]
2383     $default  <a href="#rule_1">reduce using rule 1</a> (exp)
2384 </p>
2386 <div id="footer"><hr />This document was generated using
2387       <a href="http://www.gnu.org/software/bison/" title="GNU Bison">
2388       GNU Bison VERSION</a>
2389       XML Automaton Report.<br />
2390       Verbatim copying and distribution of this entire page is
2391       permitted in any medium, provided this notice is preserved.</div></body>
2392 </html>
2396 AT_BISON_OPTION_POPDEFS
2397 AT_CLEANUP