summaryrefslogtreecommitdiff
path: root/src/print-xml.h
Commit message (Collapse)AuthorAgeFilesLines
* maint: run "make update-copyright"Joel E. Denny2009-08-061-1/+1
|
* In XML output, remove redundant class attribute on symbol element.Joel E. Denny2007-12-151-0/+1
| | | | | | | | | | | | | | | | | | | | | * data/xslt/bison.xsl (xsl:key name="bison:symbolByName"): New. * data/xslt/xml2xhtml.xsl (xsl:template match="symbol"): Use it to look up a symbol to determine whether it's a nonterminal or terminal. * src/gram.c (rule_rhs_print_xml): Remove class attribute. * src/state.c (state_rule_lookahead_tokens_print_xml): Likewise. Add prec/assoc information to XML output. * src/gram.c (grammar_rules_print_xml): For each rule that has a %prec, add a percent_prec attribute. * src/print-xml.c (print_grammar): For each terminal that has a precedence or associativity, add a prec or assoc attribute. (xml_indent): New. (xml_puts): Use xml_indent. (xml_printf): Use xml_indent. * src/print-xml.h (xml_indent): Prototype. * tests/existing.at (GNU pic Grammar): Fix a rule miscopied from <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00026.html>.
* Pacify ./configure --enable-gcc-warnings.Joel E. Denny2007-09-241-1/+1
| | | | | | | * src/print-xml.c, src/print-xml.h (xml_puts): Make third argument `char const *' instead of `char *'. * src/state.c (state_rule_lookahead_tokens_print_xml): Remove unused local variable `sep'.
* * src/gram.c (rule_rhs_print_xml): Now static, since it isn't usedPaul Eggert2007-09-211-0/+31
elsewhere. * src/print-xml.c: Prefer "const" after types; that's more consistent. (xml_printf): Indent just 1 space for level. (e_char, xlate_char): Remove. (xml_escape_string): Rewrite to avoid undefined behavior (used storage that was freed from the stack). (xml_escape_n): Don't bother checking for subscript error. 2007-09-21 Wojciech Polak <polak@gnu.org> Add support for an -x option to generate an XML report. It is not documented yet. * src/print-xml.c: New file. * src/print-xml.h: Likewise. * lib/timevar.def (TV_XML): New var. * src/Makefile.am (bison_SOURCES): Add print-xml.c, print-xml.h. * src/conflicts.c: Include print-xml.h. (solved_conflicts_xml_obstack): New var. (log_resolution, conflicts_solve, conflicts_free): Add support for XML report. (conflicts_output_val): New function. * src/conflicts.h (conflicts_output_val): New decl. * src/files.c (spec_xml_file): New var. (compute_output_file_names, output_file_names_free): Add XML support. * src/files.h (spec_xml_file): New decl. * src/getargs.c (xml_flag): New var. (usage, short_options, long_options, getargs): Add XML support. * src/getargs.h (xml_flag): New decl. * src/gram.c: Include print-xml.h. (rule_lhs_print_xml, rule_rhs_print_xml): (grammar_rules_partial_print_xml, grammar_rules_print_xml): New functions. * src/gram.h: Declare external ones. * src/main.c: Include print-xml.h. (main): Add XML support. * src/reduce.c: Include print-xml.h. (reduce_xml): New function. * src/reduce.h: Declare it. * src/state.c: Include print-xml.h. (state_new): Add XML support. (state_rule_lookahead_tokens_print_xml): New function. * src/state.h: Declare it. (struct state): New member solved_conflicts_xml. * src/symtab.c (symbol_class_get_string): New function. * src/symtab.h: Declare it. 2007-09-21 Paul Eggert <eggert@cs.ucla.edu>