mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-09 20:33:03 +00:00
traces: use colors for the semantic values
This makes reading the trace slightly easier. It would be very nice to highlight the "big steps", especially reductions. But this is a private experiment: do not use it. * data/diagnostics.css (value): New. * src/parse-gram.y: Use no delimiters and no c quotation for strings to facilitate debugging. (tron, troff, TRACE): New. Not very elegant, but until there is support for printf-formats in libtextstyle, it shall be enough.
This commit is contained in:
@@ -6,3 +6,5 @@
|
||||
.warning { color: purple; }
|
||||
.error { color: red; }
|
||||
.note { color: cyan; }
|
||||
/* Semantic values in Bison's parser traces. */
|
||||
.value { color: green; }
|
||||
|
||||
@@ -544,8 +544,10 @@ m4_if(b4_skeleton, ["yacc.c"],
|
||||
YYPRINT (yyo, yytoknum[yytype], *yyvaluep);
|
||||
# endif
|
||||
]])dnl
|
||||
b4_symbol_actions([printer])[
|
||||
}
|
||||
b4_percent_code_get([[pre-printer]])dnl
|
||||
b4_symbol_actions([printer])
|
||||
b4_percent_code_get([[post-printer]])dnl
|
||||
[}
|
||||
|
||||
|
||||
/*---------------------------.
|
||||
|
||||
@@ -87,8 +87,8 @@ b4_output_begin([b4_parser_file_name])[
|
||||
]])[
|
||||
]b4_user_pre_prologue[
|
||||
]b4_user_post_prologue[
|
||||
]b4_percent_code_get([[imports]])
|
||||
[/**
|
||||
]b4_percent_code_get([[imports]])[
|
||||
/**
|
||||
* A Bison parser, automatically generated from <tt>]m4_bpatsubst(b4_file_name, [^"\(.*\)"$], [\1])[</tt>.
|
||||
*
|
||||
* @@author LALR (1) parser skeleton written by Paolo Bonzini.
|
||||
|
||||
Reference in New Issue
Block a user