traces: add some colors

This is an experiment.  Maybe more styles will be used (in which case
a short-hand function will be useful), maybe it will be just reverted.
* data/bison-default.css (.traces0): New.
* src/lalr.c (lalr): Use it.
This commit is contained in:
Akim Demaille
2019-04-14 08:41:16 +02:00
parent d84b245c63
commit ec4d49e129
3 changed files with 20 additions and 1 deletions

View File

@@ -550,6 +550,14 @@ lookahead_tokens_print (FILE *out)
void
lalr (void)
{
if (trace_flag & trace_automaton)
{
fputc ('\n', stderr);
begin_use_class ("trace0", stderr);
fprintf (stderr, "lalr: begin");
end_use_class ("trace0", stderr);
fputc ('\n', stderr);
}
initialize_LA ();
set_goto_map ();
initialize_goto_follows ();
@@ -560,6 +568,13 @@ lalr (void)
if (trace_flag & trace_sets)
lookahead_tokens_print (stderr);
if (trace_flag & trace_automaton)
{
begin_use_class ("trace0", stderr);
fprintf (stderr, "lalr: done");
end_use_class ("trace0", stderr);
fputc ('\n', stderr);
}
}