* src/closure.c (print_firsts, print_fderives): De-obfuscate.

This commit is contained in:
Akim Demaille
2001-12-05 09:22:40 +00:00
parent 78fc5ce865
commit 09b2117db7
2 changed files with 8 additions and 12 deletions

View File

@@ -1,3 +1,8 @@
2001-12-05 Akim Demaille <akim@epita.fr>
* src/closure.c (print_firsts, print_fderives): De-obfuscate.
2001-12-05 Akim Demaille <akim@epita.fr> 2001-12-05 Akim Demaille <akim@epita.fr>
* src/closure.c (set_firsts): De-obfuscate. * src/closure.c (set_firsts): De-obfuscate.

View File

@@ -64,20 +64,14 @@ print_closure (int n)
static void static void
print_firsts (void) print_firsts (void)
{ {
int i; int i, j;
int j;
unsigned *rowp;
fprintf (stderr, "FIRSTS\n"); fprintf (stderr, "FIRSTS\n");
for (i = ntokens; i < nsyms; i++) for (i = ntokens; i < nsyms; i++)
{ {
fprintf (stderr, "\t%s firsts\n", tags[i]); fprintf (stderr, "\t%s firsts\n", tags[i]);
rowp = FIRSTS (i - ntokens);
for (j = 0; j < nvars; j++) for (j = 0; j < nvars; j++)
if (BITISSET (rowp, j)) if (BITISSET (FIRSTS (i - ntokens), j))
fprintf (stderr, "\t\t%d (%s)\n", j + ntokens, tags[j + ntokens]); fprintf (stderr, "\t\t%d (%s)\n", j + ntokens, tags[j + ntokens]);
} }
fprintf (stderr, "\n\n"); fprintf (stderr, "\n\n");
@@ -89,17 +83,14 @@ print_fderives (void)
{ {
int i; int i;
int j; int j;
unsigned *rp;
fprintf (stderr, "FDERIVES\n"); fprintf (stderr, "FDERIVES\n");
for (i = ntokens; i < nsyms; i++) for (i = ntokens; i < nsyms; i++)
{ {
fprintf (stderr, "\t%s derives\n", tags[i]); fprintf (stderr, "\t%s derives\n", tags[i]);
rp = FDERIVES (i);
for (j = 0; j <= nrules; j++) for (j = 0; j <= nrules; j++)
if (BITISSET (rp, j)) if (BITISSET (FDERIVES (i), j))
{ {
short *rhsp; short *rhsp;
fprintf (stderr, "\t\t%d:", j); fprintf (stderr, "\t\t%d:", j);