bison-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH 4/4] report: display the type of the symbols


From: Akim Demaille
Subject: [PATCH 4/4] report: display the type of the symbols
Date: Mon, 18 Jun 2018 07:33:22 +0200

* 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);
 
-- 
2.17.1




reply via email to

[Prev in Thread] Current Thread [Next in Thread]