* NEWS: The -g and --graph options now output graphs in Graphviz

DOT format, not VCG format.
* doc/bison.1: Likewise.
* doc/bison.texinfo (Understanding, Bison Options): Likewise.
* TODO: Remove Graphviz entry.
* src/Makefile.am (bison_SOURCES): Add graphviz.c and graphviz.h;
remove vcg.c, vcg.h, vcg_defaults.h.
* src/vcg.c, src/vcg.h, src/vcg_defaults.h: Remove.
* src/graphviz.c, src/graphviz.h: New files.
* src/files.c (compute_output_file_names): Output .dot, not .vcg.
* src/files.h: Make comment more generic.
* src/main.c (main): Likewise.
* src/print_graph.h: Likewise.
* src/getargs.c (usage): Make usage description more generic.
* src/print_graph.c: Include graphviz.h rather than vcg.h.
(static_graph, fgraph): Remove.  All uses changed to pass
arguments instead of sharing a static var.
(print_core, print_actions, print_state, print_graph):
Output graphviz format rather than VCG format.
* tests/.cvsignore: Remove *.vcg; add *.dot.
* tests/output.at: Expect *.dot files, not *.vcg files.
This commit is contained in:
Paul Eggert
2006-10-12 23:29:52 +00:00
parent dd4bf07827
commit 35fe08345e
19 changed files with 157 additions and 2081 deletions

View File

@@ -164,11 +164,11 @@ the name of the output filename.
.BI \-g
.br
.ns
Output a VCG definition of the LALR(1) grammar automaton computed by
Output a graph of the grammar automaton computed by
Bison. If the grammar file is
.BR foo.y
, the VCG output file will be
.BR foo.vcg .
, the output file will be
.BR foo.dot .
.TP
.BI \-\-graph= graph-file
The behavior of

View File

@@ -6374,8 +6374,7 @@ As documented elsewhere (@pxref{Algorithm, ,The Bison Parser Algorithm})
Bison parsers are @dfn{shift/reduce automata}. In some cases (much more
frequent than one would hope), looking at this automaton is required to
tune or simply fix a parser. Bison provides two different
representation of it, either textually or graphically (as a @acronym{VCG}
file).
representation of it, either textually or graphically (as a DOT file).
The textual file is generated when the options @option{--report} or
@option{--verbose} are specified, see @xref{Invocation, , Invoking
@@ -7073,10 +7072,11 @@ The other output files' names are constructed from @var{file} as
described under the @samp{-v} and @samp{-d} options.
@item -g
Output a @acronym{VCG} definition of the @acronym{LALR}(1) grammar
automaton computed by Bison. If the grammar file is @file{foo.y}, the
@acronym{VCG} output file will
be @file{foo.vcg}.
Output a graphical representation of the @acronym{LALR}(1) grammar
automaton computed by Bison, in @uref{http://www.graphviz.org/, Graphviz}
@uref{http://www.graphviz.org/doc/info/lang.html, @acronym{DOT}} format.
If the grammar file is @file{foo.y}, the output file will
be @file{foo.dot}.
@item --graph=@var{graph-file}
The behavior of @var{--graph} is the same than @samp{-g}. The only
@@ -8931,9 +8931,9 @@ grammatically indivisible. The piece of text it represents is a token.
@c LocalWords: strncmp intval tindex lvalp locp llocp typealt YYBACKUP
@c LocalWords: YYEMPTY YYEOF YYRECOVERING yyclearin GE def UMINUS maybeword
@c LocalWords: Johnstone Shamsa Sadaf Hussain Tomita TR uref YYMAXDEPTH
@c LocalWords: YYINITDEPTH stmnts ref stmnt initdcl maybeasm VCG notype
@c LocalWords: YYINITDEPTH stmnts ref stmnt initdcl maybeasm notype
@c LocalWords: hexflag STR exdent itemset asis DYYDEBUG YYFPRINTF args
@c LocalWords: infile ypp yxx outfile itemx vcg tex leaderfill
@c LocalWords: infile ypp yxx outfile itemx tex leaderfill
@c LocalWords: hbox hss hfill tt ly yyin fopen fclose ofirst gcc ll
@c LocalWords: yyrestart nbar yytext fst snd osplit ntwo strdup AST
@c LocalWords: YYSTACK DVI fdl printindex