From: Akim Demaille Date: Sun, 7 Apr 2002 17:43:53 +0000 (+0000) Subject: * src/reader.c, symtab.c: Remove debugging code. X-Git-Tag: BISON-1_49a~62 X-Git-Url: https://git.saurik.com/bison.git/commitdiff_plain/bd02036a4e579ac2d43edb966e66297ad5e32310?ds=sidebyside;hp=db8837cbe1210e9df3da80472abee9b9896fd152 * src/reader.c, symtab.c: Remove debugging code. --- diff --git a/ChangeLog b/ChangeLog index 401bea13..2e5e0c27 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2002-04-07 Akim Demaille + + * src/reader.c, symtab.c: Remove debugging code. + 2002-04-07 Akim Demaille Rename all the `bucket's as `symbol_t'. diff --git a/src/reader.c b/src/reader.c index df7415d1..db168b68 100644 --- a/src/reader.c +++ b/src/reader.c @@ -190,11 +190,6 @@ symbol_check_alias_consistence (symbol_t *this) static bool symbol_pack (symbol_t *this) { - if (getenv ("DEBUG")) - fprintf (stderr, "Packing %s, %s, number = %d\n", - this->tag, - this->class == nterm_sym ? "nterm" : "TERM", - this->number); if (this->class == nterm_sym) { this->number += ntokens; @@ -223,8 +218,6 @@ symbol_pack (symbol_t *this) assert (this->number != -1); } - if (getenv ("DEBUG")) - fprintf (stderr, "Setting %d = %s\n", this->number, this->tag); symbols[this->number] = this; return TRUE; } @@ -239,10 +232,6 @@ symbol_pack (symbol_t *this) static bool symbol_translation (symbol_t *this) { - if (getenv ("DEBUG")) - fprintf (stderr, "Considering Setting UserVal %s = %d (val = %d)\n", - this->tag, this->user_token_number, this->number); - /* Non-terminal? */ if (this->class == token_sym && this->user_token_number != SALIAS) @@ -253,9 +242,6 @@ symbol_translation (symbol_t *this) symbols[token_translations[this->user_token_number]]->tag, this->tag, this->user_token_number); - if (getenv ("DEBUG")) - fprintf (stderr, "Setting UserVal %s = %d (val = %d)\n", - this->tag, this->user_token_number, this->number); token_translations[this->user_token_number] = this->number; } @@ -720,12 +706,7 @@ parse_token_decl (symbol_class what_is, symbol_class what_is_not) if (what_is == nterm_sym && oldclass != nterm_sym) symbol->number = nvars++; if (what_is == token_sym && symbol->number == -1) - { - symbol->number = ntokens++; - if (getenv ("DEBUG")) - fprintf (stderr, "Set %s to %d\n", - symbol->tag, symbol->number); - } + symbol->number = ntokens++; if (typename) { @@ -1659,9 +1640,6 @@ readgram (void) fatal (_("too many symbols (tokens plus nonterminals); maximum %d"), MAXSHORT); - if (getenv ("DEBUG")) - fprintf (stderr, "nsyms == ntokens + nvars: %d == %d + %d\n", - nsyms, ntokens, nvars); assert (nsyms == ntokens + nvars); } @@ -1706,16 +1684,10 @@ token_translations_init (void) for (i = 0; i < ntokens; ++i) { symbol_t *this = symbols[i]; - if (getenv ("DEBUG")) - fprintf (stderr, "UserVal %s = %d (val = %d)\n", - this->tag, this->user_token_number, this->number); if (this->user_token_number == SUNDEF) this->user_token_number = ++last_user_token_number; if (this->user_token_number > max_user_token_number) max_user_token_number = this->user_token_number; - if (getenv ("DEBUG")) - fprintf (stderr, "Now: UserVal %s = %d (val = %d)\n", - this->tag, this->user_token_number, this->number); } token_translations = XCALLOC (short, max_user_token_number + 1); diff --git a/src/symtab.c b/src/symtab.c index 12aabb72..01cf9202 100644 --- a/src/symtab.c +++ b/src/symtab.c @@ -42,9 +42,6 @@ symbol_new (const char *tag) res->alias = NULL; res->class = unknown_sym; - if (getenv ("DEBUG")) - fprintf (stderr, "Creating: nsyms = %d, ntokens = %d: %s\n", - nsyms, ntokens, tag); nsyms++; return res;