Le 12 nov. 2012 à 17:05, Theophile Ranquet a écrit :
> The XML output combined with the XSL Transformations provided in data/ are
> incredibly useful, they should be documented.
>
> * doc/bison.texi (Xml): New node.
Thanks!
> +@cindex xml
> +
> +Bison supports two major report formats: textual output (
> +@pxref{Understanding}) when invoked with option @option{--verbose}, and DOT
Please don't leave ( alone. I fixed it.
> +(@pxref{Graphviz}) when invoked with option @option{--graph}. However, an
> +other alternative is to output an XML file that may then be, with xsltproc,
another (fixed)
@command{xsltproc} (fixed)
> +rendered as either a raw text format very similar to the verbose file, or as
> +an HTML version of the same file, with clickable transitions, or even as a
> +DOT.
> +
> +The textual file is generated when the options @option{-x} or
> +@option{--xml[=FILE]} are specified, see @ref{Invocation,,Invoking Bison}.
> +If not specified, its name is made by removing @samp{.tab.c} or @samp{.c}
> +from the parser implementation file name, and adding @samp{.xml} instead.
> +Therefore, if the grammar file is @file{foo.y}, then the parser
> +implementation file is called @file{foo.tab.c} by default. As a
> +consequence, the XML output file is called @file{foo.xml}.
I shorten this.
> +
> +Bison ships with a data/xslt
@file (fixed)
> directory, containing XSL Transformation files
> +to apply to the XML file. Their names are non-ambiguous:
> +
> +@table @file
> +@item xml2dot.xsl
> +Used to output a DOT version of the automaton. This might not be exactly the
> +same as the one obtained through @option{--graph}.
> +@item xml2text.xsl
> +Used to output a copy of the .output file.
> +@item xml2xhtml.xsl
> +Used to output an xhtml enhancement of the .output file.
> +@end table
> +
> +Sample usage (requires @code{xsltproc}):
@command, not @code.