Kaydet (Commit) 820b51c1 authored tarafından Benjamin Peterson's avatar Benjamin Peterson

#2627 Let it be known what pgen generates

üst c477427e
/* Generated by Parser/pgen */
#define single_input 256
#define file_input 257
#define eval_input 258
......
......@@ -13,6 +13,7 @@ static void printlabels(grammar *, FILE *);
void
printgrammar(grammar *g, FILE *fp)
{
fprintf(fp, "/* Generated by Parser/pgen */\n\n");
fprintf(fp, "#include \"pgenheaders.h\"\n");
fprintf(fp, "#include \"grammar.h\"\n");
printdfas(g, fp);
......@@ -31,6 +32,8 @@ printnonterminals(grammar *g, FILE *fp)
dfa *d;
int i;
fprintf(fp, "/* Generated by Parser/pgen */\n\n");
d = g->g_dfa;
for (i = g->g_ndfas; --i >= 0; d++)
fprintf(fp, "#define %s %d\n", d->d_name, d->d_type);
......
/* Generated by Parser/pgen */
#include "pgenheaders.h"
#include "grammar.h"
static arc arcs_0_0[3] = {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment