* src/gram.c, src/gram.h (ritem_print): New.

* src/gram.c (dummy): Remove, now there is actual code in gram.c.
(This useless function was defined only to work around VMS linkers
that can't handle compilation units with variables only).
* src/reduce.c (dump_grammar): Use it to trace the construction of
ritem.
This commit is contained in:
Akim Demaille
2001-12-05 09:16:07 +00:00
parent cc904af579
commit 2dfb4daf9b
14 changed files with 65 additions and 39 deletions

View File

@@ -21,6 +21,7 @@ Boston, MA 02111-1307, USA. */
#include "system.h"
#include "gram.h"
#include "reader.h"
void dummy PARAMS((void));
@@ -52,10 +53,15 @@ int pure_parser;
int error_token_number;
/* This is to avoid linker problems which occur on VMS when using GCC,
when the file in question contains data definitions only. */
void
dummy (void)
ritem_print (FILE *out)
{
int i;
fputs ("RITEM\n", out);
for (i = 0; ritem[i]; ++i)
if (ritem[i] > 0)
fprintf (out, " %s", tags[ritem[i]]);
else
fprintf (out, " (rule %d)\n", -ritem[i]);
fputs ("\n\n", out);
}