mirror of
https://github.com/python/cpython.git
synced 2025-08-02 16:13:13 +00:00
Silence parser generator output.
This commit is contained in:
parent
2732cb4269
commit
25dfe2c095
3 changed files with 11 additions and 7 deletions
|
@ -16,7 +16,8 @@ addfirstsets(grammar *g)
|
|||
int i;
|
||||
dfa *d;
|
||||
|
||||
printf("Adding FIRST sets ...\n");
|
||||
if (Py_DebugFlag)
|
||||
printf("Adding FIRST sets ...\n");
|
||||
for (i = 0; i < g->g_ndfas; i++) {
|
||||
d = &g->g_dfa[i];
|
||||
if (d->d_first == NULL)
|
||||
|
|
|
@ -150,7 +150,8 @@ metacompile(node *n)
|
|||
nfagrammar *gr;
|
||||
int i;
|
||||
|
||||
printf("Compiling (meta-) parse tree into NFA grammar\n");
|
||||
if (Py_DebugFlag)
|
||||
printf("Compiling (meta-) parse tree into NFA grammar\n");
|
||||
gr = newnfagrammar();
|
||||
REQ(n, MSTART);
|
||||
i = n->n_nchildren - 1; /* Last child is ENDMARKER */
|
||||
|
@ -645,8 +646,8 @@ maketables(nfagrammar *gr)
|
|||
if (Py_DebugFlag) {
|
||||
printf("Dump of NFA for '%s' ...\n", nf->nf_name);
|
||||
dumpnfa(&gr->gr_ll, nf);
|
||||
printf("Making DFA for '%s' ...\n", nf->nf_name);
|
||||
}
|
||||
printf("Making DFA for '%s' ...\n", nf->nf_name);
|
||||
d = adddfa(g, nf->nf_type, nf->nf_name);
|
||||
makedfa(gr, gr->gr_nfa[i], d);
|
||||
}
|
||||
|
|
|
@ -62,7 +62,8 @@ main(int argc, char **argv)
|
|||
perror(graminit_c);
|
||||
Py_Exit(1);
|
||||
}
|
||||
printf("Writing %s ...\n", graminit_c);
|
||||
if (Py_DebugFlag)
|
||||
printf("Writing %s ...\n", graminit_c);
|
||||
printgrammar(g, fp);
|
||||
fclose(fp);
|
||||
fp = fopen(graminit_h, "w");
|
||||
|
@ -70,7 +71,8 @@ main(int argc, char **argv)
|
|||
perror(graminit_h);
|
||||
Py_Exit(1);
|
||||
}
|
||||
printf("Writing %s ...\n", graminit_h);
|
||||
if (Py_DebugFlag)
|
||||
printf("Writing %s ...\n", graminit_h);
|
||||
printnonterminals(g, fp);
|
||||
fclose(fp);
|
||||
Py_Exit(0);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue