diff options
author | Guido van Rossum <guido@python.org> | 1990-12-20 15:06:42 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 1990-12-20 15:06:42 (GMT) |
commit | 3f5da24ea304e674a9abbdcffc4d671e32aa70f1 (patch) | |
tree | e932e31cb9381f40b7c87c377638216c043b5cfc /Parser/firstsets.c | |
parent | 226d79eb4a776dd54c9e4544b17deaf928bcef3a (diff) | |
download | cpython-3f5da24ea304e674a9abbdcffc4d671e32aa70f1.zip cpython-3f5da24ea304e674a9abbdcffc4d671e32aa70f1.tar.gz cpython-3f5da24ea304e674a9abbdcffc4d671e32aa70f1.tar.bz2 |
"Compiling" version
Diffstat (limited to 'Parser/firstsets.c')
-rw-r--r-- | Parser/firstsets.c | 38 |
1 files changed, 19 insertions, 19 deletions
diff --git a/Parser/firstsets.c b/Parser/firstsets.c index 0f28dd0..b4a9e3c 100644 --- a/Parser/firstsets.c +++ b/Parser/firstsets.c @@ -1,14 +1,29 @@ /* Computation of FIRST stets */ -#include <stdio.h> - -#include "PROTO.h" -#include "malloc.h" +#include "pgenheaders.h" #include "grammar.h" #include "token.h" extern int debugging; +/* Forward */ +static void calcfirstset PROTO((grammar *, dfa *)); + +void +addfirstsets(g) + grammar *g; +{ + int i; + dfa *d; + + printf("Adding FIRST sets ...\n"); + for (i = 0; i < g->g_ndfas; i++) { + d = &g->g_dfa[i]; + if (d->d_first == NULL) + calcfirstset(g, d); + } +} + static void calcfirstset(g, d) grammar *g; @@ -92,18 +107,3 @@ calcfirstset(g, d) printf(" }\n"); } } - -void -addfirstsets(g) - grammar *g; -{ - int i; - dfa *d; - - printf("Adding FIRST sets ...\n"); - for (i = 0; i < g->g_ndfas; i++) { - d = &g->g_dfa[i]; - if (d->d_first == NULL) - calcfirstset(g, d); - } -} |