In some (weird) cases, the final state number is incorrect.

Reported by Alexandre Duret-Lutz.
* src/LR0.c (state_list_append): Remove the computation of
final_state.
(save_reductions): Do it here.
(get_state): Alpha conversion.
(generate_states): Use a for loop.
* src/gram.h (item_number_is_rule_number)
(item_number_is_symbol_number): New.
* src/state.c: Use assert.
* src/system.h: Include assert.h.
* tests/sets.at (Accept): New.
This commit is contained in:
Akim Demaille
2005-11-09 15:48:05 +00:00
parent 317fce927c
commit 36b5e963e6
5 changed files with 59 additions and 34 deletions

View File

@@ -52,6 +52,8 @@
typedef size_t uintptr_t;
#endif
#include <assert.h>
#include <verify.h>
#include <xalloc.h>