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/grammar.c | |
parent | 226d79eb4a776dd54c9e4544b17deaf928bcef3a (diff) | |
download | cpython-3f5da24ea304e674a9abbdcffc4d671e32aa70f1.zip cpython-3f5da24ea304e674a9abbdcffc4d671e32aa70f1.tar.gz cpython-3f5da24ea304e674a9abbdcffc4d671e32aa70f1.tar.bz2 |
"Compiling" version
Diffstat (limited to 'Parser/grammar.c')
-rw-r--r-- | Parser/grammar.c | 32 |
1 files changed, 17 insertions, 15 deletions
diff --git a/Parser/grammar.c b/Parser/grammar.c index ad9c2b0..221bf64 100644 --- a/Parser/grammar.c +++ b/Parser/grammar.c @@ -1,10 +1,9 @@ /* Grammar implementation */ -#include <stdio.h> +#include "pgenheaders.h" + #include <ctype.h> -#include "PROTO.h" -#include "malloc.h" #include "assert.h" #include "token.h" #include "grammar.h" @@ -127,6 +126,21 @@ findlabel(ll, type, str) abort(); } +/* Forward */ +static void translabel PROTO((grammar *, label *)); + +void +translatelabels(g) + grammar *g; +{ + int i; + + printf("Translating labels ...\n"); + /* Don't translate EMPTY */ + for (i = EMPTY+1; i < g->g_ll.ll_nlabels; i++) + translabel(g, &g->g_ll.ll_label[i]); +} + static void translabel(g, lb) grammar *g; @@ -193,15 +207,3 @@ translabel(g, lb) else printf("Can't translate label '%s'\n", labelrepr(lb)); } - -void -translatelabels(g) - grammar *g; -{ - int i; - - printf("Translating labels ...\n"); - /* Don't translate EMPTY */ - for (i = EMPTY+1; i < g->g_ll.ll_nlabels; i++) - translabel(g, &g->g_ll.ll_label[i]); -} |