From 27767290da059416b4c19ae50c9ccda0528f0686 Mon Sep 17 00:00:00 2001 From: Akim Demaille Date: Sun, 17 Jun 2018 18:34:31 +0200 Subject: [PATCH] report: display the type of the symbols * src/print.c (print_nonterminal_symbols, print_terminal_symbols): Also should the type of the symbols. --- src/print.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/print.c b/src/print.c index 1fd86db0..9d77e1a1 100644 --- a/src/print.c +++ b/src/print.c @@ -420,6 +420,12 @@ print_terminal_symbols (FILE *out) buffer[0] = 0; fputs (tag, out); END_TEST (65); + if (symbols[token_translations[i]]->content->type_name) + { + column += fprintf (out, " <%s>", + symbols[token_translations[i]]->content->type_name); + END_TEST (65); + } sprintf (buffer, " (%d)", i); for (r = 0; r < nrules; r++) @@ -465,6 +471,9 @@ print_nonterminal_symbols (FILE *out) } fputs (tag, out); + if (symbols[i]->content->type_name) + column += fprintf (out, " <%s>", + symbols[i]->content->type_name); sprintf (buffer, " (%d)", i); END_TEST (0);