doc: various minor improvements and fixes

* doc/figs/example.dot, doc/figs/example.y: New.
* doc/bison.texi: Prefer "token" to TOKEN.
Use @group where appropriate.
Adjust with style changes in the output (State 0, not state 0).
Fix some @ref that were missing the third argument.
Fix some incorrect line numbers.
Use "nonterminal", not "non-terminal".
Fix overfull and underfull TeX hboxes.
Put the comments in the index.
Remove duplicate index entries.
Fuse glossary entries where appropriate.
(Understanding): Improve the continuity between sections.
Use example.dot to show the whole graph.
* doc/Makefile.am: Adjust.
This commit is contained in:
Akim Demaille
2012-12-08 16:18:07 +01:00
parent d4dcde2b75
commit c949ada3da
4 changed files with 180 additions and 96 deletions

35
doc/figs/example.dot Normal file
View File

@@ -0,0 +1,35 @@
// Generated by GNU Bison 2.6.90.
// Report bugs to <bug-bison@gnu.org>.
// Home page: <http://www.gnu.org/software/bison/>.
digraph "/tmp/fo.y"
{
node [fontname = courier, shape = box, colorscheme = paired6]
edge [fontname = courier]
0 [label="State 0\n\l 0 $accept: . exp $end\l 1 exp: . a \";\"\l 2 | . b \".\"\l 3 a: . \"0\"\l 4 b: . \"0\"\l"]
0 -> 1 [style=solid label="\"0\""]
0 -> 2 [style=dashed label="exp"]
0 -> 3 [style=dashed label="a"]
0 -> 4 [style=dashed label="b"]
1 [label="State 1\n\l 3 a: \"0\" . [\";\"]\l 4 b: \"0\" . [\".\"]\l"]
1 -> "1R3" [style=solid]
"1R3" [label="R3", fillcolor=3, shape=diamond, style=filled]
1 -> "1R4" [label="[\".\"]", style=solid]
"1R4" [label="R4", fillcolor=3, shape=diamond, style=filled]
2 [label="State 2\n\l 0 $accept: exp . $end\l"]
2 -> 5 [style=solid label="$end"]
3 [label="State 3\n\l 1 exp: a . \";\"\l"]
3 -> 6 [style=solid label="\";\""]
4 [label="State 4\n\l 2 exp: b . \".\"\l"]
4 -> 7 [style=solid label="\".\""]
5 [label="State 5\n\l 0 $accept: exp $end .\l"]
5 -> "5R0" [style=solid]
"5R0" [label="Acc", fillcolor=1, shape=diamond, style=filled]
6 [label="State 6\n\l 1 exp: a \";\" .\l"]
6 -> "6R1" [style=solid]
"6R1" [label="R1", fillcolor=3, shape=diamond, style=filled]
7 [label="State 7\n\l 2 exp: b \".\" .\l"]
7 -> "7R2" [style=solid]
"7R2" [label="R2", fillcolor=3, shape=diamond, style=filled]
}

4
doc/figs/example.y Normal file
View File

@@ -0,0 +1,4 @@
%%
exp: a ";" | b ".";
a: "0";
b: "0";