]> git.saurik.com Git - bison.git/commit
Make it easier to write deterministic tests.
authorJoel E. Denny <jdenny@clemson.edu>
Sun, 9 Aug 2009 00:19:01 +0000 (20:19 -0400)
committerJoel E. Denny <jdenny@clemson.edu>
Thu, 13 Aug 2009 05:24:58 +0000 (01:24 -0400)
commit24985964740b3b28ebfa2fe1de05c0e483947fbf
treed186198677727ad1f920ea9be9a22d42e6150b80
parent47076da5b6e1abd6807343ced4ea0cd009f03ea2
Make it easier to write deterministic tests.

Continues Akim's work from his 2009-06-10 commits.
* src/reader.c (check_and_convert_grammar): Don't add any
symbols after the first symbols_do invocation.
* src/symtab.c (symbols_sorted): New static global.
(user_token_number_redeclaration): Update comments.
(symbol_from_uniqstr): If a new symbol is being created, assert
that symbols_sorted hasn't been allocated yet.
(symbols_free): Free symbols_sorted.
(symbols_cmp, symbols_cmp_qsort): New functions.
(symbols_do): Sort symbol_table into symbols_sorted on first
invocation.
* tests/input.at (Numbered tokens): Recombine tests now that the
output should be deterministic across multiple numbers.
(cherry picked from commit 83b60c97ee1f98bb1f15ffa38acdc4cc765515f5)
ChangeLog
src/reader.c
src/symtab.c
tests/input.at