]> git.saurik.com Git - bison.git/commit - src/symtab.c
Use lib/hash for the symbol table.
authorAkim Demaille <akim@epita.fr>
Sun, 7 Apr 2002 17:43:21 +0000 (17:43 +0000)
committerAkim Demaille <akim@epita.fr>
Sun, 7 Apr 2002 17:43:21 +0000 (17:43 +0000)
commit72a23c9797290f1f2c948cf3027d80fa5c9370bc
tree2fc946052d66a821d99136e6d9ac0ff2a4ab55e6
parent280a38c306200177ef15e0f52775312edc057065
Use lib/hash for the symbol table.
* src/gram.c (ntokens): Initialize to 1, to reserve a slot for
EOF.
* src/lex.c (lex): Set the `number' member of new terminals.
* src/reader.c (bucket_check_defined, bucket_make_alias)
(bucket_check_alias_consistence, bucket_translation): New.
(reader, grammar_free, readgram, token_translations_init)
(packsymbols): Adjust.
(reader): Number the predefined tokens.
* src/reduce.c (inaccessable_symbols): Just use hard coded numbers
for predefined tokens.
* src/symtab.h (bucket): Remove all the hash table related
members.
* src/symtab.c (symtab): Replace by...
(bucket_table): this.
(bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
(buckets_new, buckets_do): New.
ChangeLog
src/gram.c
src/lex.c
src/reader.c
src/reduce.c
src/symtab.c
src/symtab.h