]> git.saurik.com Git - bison.git/blame - ChangeLog
(b4_token_defines): Also define YYTOKENTYPE for K&R C.
[bison.git] / ChangeLog
CommitLineData
53c71a12
AD
12002-05-03 Akim Demaille <akim@epita.fr>
2
3 * data/bison.simple (m4_if): Don't output empty enums.
4 And actually, output valid enum definitions :(.
5
289dd0cf
AD
62002-05-03 Akim Demaille <akim@epita.fr>
7
8 * configure.bat: Remove, completely obsolete.
9 * Makefile.am (EXTRA_DIST): Adjust.
10 Don't distribute config.rpath...
11 * config/Makefile.am (EXTRA_DIST): Do it.
12
db85e524
AD
132002-05-03 Akim Demaille <akim@epita.fr>
14
15 * configure.in (GETTEXT_VERSION): New.
16 Suggested by Bruno Haible for the forthcoming Gettext 0.10.3.
17
83ccf991
AD
182002-05-03 Akim Demaille <akim@epita.fr>
19
20 * data/bison.simple (b4_token_enum): New.
21 (b4_token_defines): Use it to output tokens both as #define and
22 enums.
23 Suggested by Paul Eggert.
24 * src/output.c (token_definitions_output): Don't output spurious
25 white spaces.
26
1f418995
AD
272002-05-03 Akim Demaille <akim@epita.fr>
28
29 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
30
45119f04
RA
312002-05-02 Robert Anisko <robert@lrde.epita.fr>
32
33 * data/bison.c++: Adapt expansion of $s and @s to the C++ parser.
34 Update the stack class, give a try to deque as the default container.
35
b2d52318
AD
362002-05-02 Akim Demaille <akim@epita.fr>
37
38 * data/bison.simple (yyparse): Do not implement @$ = @1.
39 (YYLLOC_DEFAULT): Adjust to do it.
40 * doc/bison.texinfo (Location Default Action): Fix.
41
3a8b4109
AD
422002-05-02 Akim Demaille <akim@epita.fr>
43
44 * src/reader.c (parse_braces): Merge into...
45 (parse_action): this.
46
84614e13
AD
472002-05-02 Akim Demaille <akim@epita.fr>
48
49 * configure.in (ALL_LINGUAS): Remove.
50 * po/LINGUAS, hr.po: New.
51
fdbcd8e2
AD
522002-05-02 Akim Demaille <akim@epita.fr>
53
54 Remove the so called hairy (semantic) parsers.
55
56 * src/system.h (EXT_GUARD_C, EXT_STYPE_H): Remove.
57 * src/gram.h, src/gram.c (semantic_parser): Remove.
58 (rule_t): Remove the guard and guard_line members.
59 * src/lex.h (token_t): remove tok_guard.
60 * src/options.c (option_table): Remove %guard and %semantic_parser
61 support.
62 * src/output.c, src/output.h (guards_output): Remove.
63 (prepare): Adjust.
64 (token_definitions_output): Don't output the `T'
65 tokens (???).
66 (output_skeleton): Don't output the guards.
67 * src/files.c, src/files.c (attrsfile): Remove.
68 * src/reader.c (symbol_list): Remove the guard and guard_line
69 members.
70 Adjust dependencies.
71 (parse_guard): Remove.
72 * data/bison.hairy: Remove.
73 * doc/bison.texinfo (Environment Variables): Remove occurrences of
74 BISON_HAIRY.
75
82b6cb3f
AD
762002-05-02 Akim Demaille <akim@epita.fr>
77
78 * src/reader.c (copy_at, copy_dollarm parse_braces, parse_action)
79 (parse_guard): Rename the formal argument `stack_offset' as
80 `rule_length', which is more readable.
81 Adjust callers.
82 (copy_at, copy_dollar): Instead of outputting the hard coded
83 values of $$, $n and so forth, output invocation to b4_lhs_value,
84 b4_lhs_location, b4_rhs_value, and b4_rhs_location.
900c877b
AD
85 Note: this patch partially drops `semantic-parser' support: it
86 always does `rule_length - n', where semantic parsers ought to
87 always use `-n'.
82b6cb3f
AD
88 * data/bison.simple, data/bison.c++ (b4_lhs_value)
89 (b4_lhs_location, b4_rhs_value, and b4_rhs_location: New.
90
6cbfbcc5
AD
912002-05-02 Akim Demaille <akim@epita.fr>
92
93 * configure.in (AC_INIT): Bump to 1.49b.
94 (AM_INIT_AUTOMAKE): Short invocation.
95
b8548114
AD
962002-05-02 Akim Demaille <akim@epita.fr>
97
98 Version 1.49a.
99
c20cd1fa
AD
1002002-05-01 Akim Demaille <akim@epita.fr>
101
102 * src/skeleton.h: Remove.
103
8a9566d4
AD
1042002-05-01 Akim Demaille <akim@epita.fr>
105
106 * src/skeleton.h: Fix the #endif.
107 Reported by Magnus Fromreide.
108
8c6d399a
PE
1092002-04-26 Paul Eggert <eggert@twinsun.com>
110
111 * data/bison.simple (YYSTYPE_IS_TRIVIAL, YYLTYPE_IS_TRIVIAL):
112 Define if we define YYSTYPE and YYLTYPE, respectively.
b756bb75 113 (YYCOPY): Fix [] quoting problem in the non-GCC case.
8a9566d4 114
2b7ed18a
RA
1152002-04-25 Robert Anisko <robert@lrde.epita.fr>
116
117 * src/scan-skel.l: Postprocess quadrigraphs.
118
119 * src/reader.c (copy_character): New function, used to output
120 single characters while replacing `[' and `]' with quadrigraphs, to
121 avoid troubles with M4 quotes.
122 (copy_comment): Output characters with copy_character.
123 (read_additionnal_code): Likewise.
124 (copy_string2): Likewise.
125 (copy_definition): Likewise.
126
127 * tests/calc.at: Exercise M4 quoting.
128
34a89c50
AD
1292002-04-25 Akim Demaille <akim@epita.fr>
130
131 * tests/sets.at (AT_EXTRACT_SETS): Sed portability issue: no space
132 between `!' and the command.
133 Reported by Paul Eggert.
134
0dd1580a
RA
1352002-04-24 Robert Anisko <robert@lrde.epita.fr>
136
137 * tests/calc.at: Exercise prologue splitting.
138
139 * data/bison.simple, data/bison.c++: Use `b4_pre_prologue' and
140 `b4_post_prologue' instead of `b4_prologue'.
141
142 * src/output.c (prepare): Add the `pre_prologue' and `post_prologue'
143 muscles.
144 (output): Free pre_prologue_obstack and post_prologue_obstack.
145 * src/files.h, src/files.c (attrs_obstack): Remove.
146 (pre_prologue_obstack, post_prologue_obstack): New.
147 * src/reader.c (copy_definition): Add a parameter to specify the
148 obstack to fill, instead of using attrs_obstack unconditionally.
149 (read_declarations): Pass pre_prologue_obstack to copy_definition if
150 `%union' has not yet been seen, pass post_prologue_obstack otherwise.
151
83c1796f
PE
1522002-04-23 Paul Eggert <eggert@twinsun.com>
153
154 * data/bison.simple: Remove unnecessary commentary and white
155 space differences from 1_29-branch.
156 Depend on YYERROR_VERBOSE, not defined (YYERROR_VERBOSE).
157
158 (union yyalloc, YYSTACK_GAP_MAX, YYSTACK_BYTES, YYCOPY,
159 YYSTACK_RELOCATE): Do not define if yyoverflow is defined, or
160 if this is a C++ parser and YYSTYPE or YYLTYPE has nontrivial
161 constructors or destructors.
162
163 (yyparse) [! defined YYSTACK_RELOCATE]: Do not relocate the stack.
164
1207eeac
AD
1652002-04-23 Akim Demaille <akim@epita.fr>
166
167 * tests/sets.at (AT_EXTRACT_SETS): Don't use 8 char long sed labels.
168 * tests/synclines.at (AT_TEST_SYNCLINE): Be robust to GCC's
169 location with columns.
170 * tests/conflicts.at (%nonassoc and eof): Don't use `error.h'.
171 All reported by Paul Eggert.
172
78ab8f67
AD
1732002-04-22 Akim Demaille <akim@epita.fr>
174
175 * src/reduce.c (dump_grammar): Move to...
176 * src/gram.h, src/gram.c (grammar_dump): here.
177 Be sure to separate long item numbers.
178 Don't read the members of a rule's prec if its nil.
179
133c20e2
AD
1802002-04-22 Akim Demaille <akim@epita.fr>
181
182 * src/output.c (table_size, table_grow): New.
183 (MAXTABLE): Remove, replace uses with table_size.
184 (pack_vector): Instead of dying when the table is too big, grow it.
185
9515e8a7
AD
1862002-04-22 Akim Demaille <akim@epita.fr>
187
188 * data/bison.simple (yyr1): Its type is that of a token number.
189 * data/bison.c++ (r1_): Likewise.
190 * tests/regression.at (Web2c Actions): Adjust.
191
23c5a174
AD
1922002-04-22 Akim Demaille <akim@epita.fr>
193
194 * src/reader.c (token_translations_init): 256 is now the default
195 value for the error token, i.e., it will be assigned another
196 number if the user assigned 256 to one of her tokens.
197 (reader): Don't force 256 to error.
198 * doc/bison.texinfo (Symbols): Adjust.
199 * tests/torture.at (AT_DATA_HORIZONTAL_GRAMMAR)
200 (AT_DATA_TRIANGULAR_GRAMMAR): Number the tokens as 1, 2, 3
201 etc. instead of 10, 20, 30 (which was used to `jump' over error
202 (256) and undefined (2)).
203
5fbb0954
AD
2042002-04-22 Akim Demaille <akim@epita.fr>
205
206 Propagate more token_number_t.
207
208 * src/gram.h (token_number_as_item_number)
209 (item_number_as_token_number): New.
210 * src/output.c (GENERATE_OUTPUT_TABLE): New.
211 Use it to create output_item_number_table and
212 output_token_number_table.
213 * src/LR0.c, src/derives.c, src/gram.c, src/gram.h, src/lalr.c,
214 * src/lex.c, src/nullable.c, src/output.c, src/print.c,
215 * src/print_graph.c, src/reader.c, src/reduce.c, src/state.h,
216 * src/symtab.c, src/symtab.h: Use token_number_t instead of shorts.
217
4f940944
AD
2182002-04-22 Akim Demaille <akim@epita.fr>
219
220 * src/output.h, src/output.c (get_lines_number): Remove.
221
3ded9a63
AD
2222002-04-19 Akim Demaille <akim@epita.fr>
223
224 * doc/bison.texinfo (Actions): Make clear that `|' is not the same
225 as Lex/Flex'.
226 (Debugging): More details about enabling the debugging features.
227 (Table of Symbols): Describe $$, $n, @$, and @n.
228 Suggested by Tim Josling.
229
e0c471a9
AD
2302002-04-19 Akim Demaille <akim@epita.fr>
231
232 * doc/bison.texinfo: Remove the uses of the obsolete @refill.
233
fecc10cd
AD
2342002-04-10 Akim Demaille <akim@epita.fr>
235
236 * src/system.h: Rely on HAVE_LIMITS_H.
237 Suggested by Paul Eggert.
238
51dec47b
AD
2392002-04-09 Akim Demaille <akim@epita.fr>
240
241 * tests/calc.at (_AT_CHECK_CALC_ERROR): Receive as argument the
242 full stderr, and strip it according to the bison options, instead
243 of composing the error message from different bits.
244 This makes it easier to check for several error messages.
245 Adjust all the invocations.
246 Add an invocation exercising the error token.
247 Add an invocation demonstrating a stupid error message.
248 (_AT_DATA_CALC_Y): Follow the GCS: initial column is 1, not 0.
249 Adjust the tests.
250 Error message are for stderr, not stdout.
251
007a50a4
AD
2522002-04-09 Akim Demaille <akim@epita.fr>
253
254 * src/gram.h, src/gram.c (error_token_number): Remove, use
255 errtoken->number.
256 * src/reader.c (reader): Don't specify the user token number (2)
257 for $undefined, as it uselessly prevents using it.
258 * src/gram.h (token_number_t): Move to...
259 * src/symtab.h: here.
260 (state_t.number): Is a token_number_t.
261 * src/print.c, src/reader.c: Use undeftoken->number instead of
262 hard coded 2.
263 (Even though this 2 is not the same as above: the number of the
264 undeftoken remains being 2, it is its user token number which
265 might not be 2).
266 * src/output.c (prepare_tokens): Rename the `maxtok' muscle with
267 `user_token_number_max'.
268 Output `undef_token_number'.
269 * data/bison.simple, data/bison.c++: Use them.
270 Be sure to map invalid yylex return values to
271 `undef_token_number'. This saves us from gratuitous SEGV.
272
273 * tests/conflicts.at (Solved SR Conflicts)
274 (Unresolved SR Conflicts): Adjust.
275 * tests/regression.at (Web2c Actions): Adjust.
276
06446ccf
AD
2772002-04-08 Akim Demaille <akim@epita.fr>
278
279 * data/bison.c++: s/b4_item_number_max/b4_rhs_number_max/.
280 Adding #line.
281 Remove the duplicate `typedefs'.
282 (RhsNumberType): Fix the declaration and various other typos.
283 Use __ofile__.
284 * data/bison.simple: Use __ofile__.
285 * src/scan-skel.l: Handle __ofile__.
286
62a3e4f0
AD
2872002-04-08 Akim Demaille <akim@epita.fr>
288
289 * src/gram.h (item_number_t): New, the type of item numbers in
290 RITEM. Note that it must be able to code symbol numbers as
291 positive number, and the negation of rule numbers as negative
292 numbers.
293 Adjust all dependencies (pretty many).
294 * src/reduce.c (rule): Remove this `short *' pointer: use
295 item_number_t.
296 * src/system.h (MINSHORT, MAXSHORT): Remove.
297 Include `limits.h'.
298 Adjust dependencies to using SHRT_MAX and SHRT_MIN.
299 (shortcpy): Remove.
300 (MAXTABLE): Move to...
301 * src/output.c (MAXTABLE): here.
302 (prepare_rules): Use output_int_table to output rhs.
303 * data/bison.simple, data/bison.c++: Adjust.
304 * tests/torture.at (Big triangle): Move the limit from 254 to
305 500.
306 * tests/regression.at (Web2c Actions): Ajust.
307
308 Trying with bigger grammars shows various phenomena: at 3000 (28Mb
309 of grammar file) bison is killed by my system, at 2000 (12Mb) bison
310 passes, but produces negative #line number, once fixed, GCC is
311 killed while compiling 14Mb, at 1500 (6.7 Mb of grammar, 8.2Mb of
312 C), it passes.
313 * src/state.h (state_h): Code input lines on ints, not shorts.
314
bb88b0fc
AD
3152002-04-08 Akim Demaille <akim@epita.fr>
316
317 * src/reduce.c (reduce_grammar): First reduce the nonterminals,
318 and then the grammar.
319
9a636f47
AD
3202002-04-08 Akim Demaille <akim@epita.fr>
321
322 * src/system.h: No longer using strndup.
323
680e8701
AD
3242002-04-07 Akim Demaille <akim@epita.fr>
325
326 * src/muscle_tab.h (MUSCLE_INSERT_LONG_INT): New.
327 * src/output.c (output_table_data): Return the longest number.
328 (prepare_tokens): Output `token_number_max').
329 * data/bison.simple, data/bison.c++ (b4_sint_type, b4_uint_type):
330 New.
331 Use them to define yy_token_number_type/TokenNumberType.
332 Use this type for yytranslate.
333 * tests/torture.at (Big triangle): Push the limit from 124 to
334 253.
335 * tests/regression.at (Web2c Actions): Adjust.
336
817e9f41
AD
3372002-04-07 Akim Demaille <akim@epita.fr>
338
339 * tests/torture.at (Big triangle): New.
340 (GNU AWK Grammar, GNU Cim Grammar): Move to...
341 * tests/existing.at: here.
342
5123689b
AD
3432002-04-07 Akim Demaille <akim@epita.fr>
344
345 * src/gram.h, src/gram.c (nitems): Remove, it is an alias of
346 nritems.
347 Adjust dependencies.
348
f3849179
AD
3492002-04-07 Akim Demaille <akim@epita.fr>
350
351 * src/reader.c: Normalize increments to prefix form.
352
bd02036a
AD
3532002-04-07 Akim Demaille <akim@epita.fr>
354
355 * src/reader.c, symtab.c: Remove debugging code.
356
db8837cb
AD
3572002-04-07 Akim Demaille <akim@epita.fr>
358
359 Rename all the `bucket's as `symbol_t'.
360
361 * src/gram.c, src/gram.h, src/lex.c, src/lex.h, src/output.c,
362 * src/reader.c, src/reader.h, src/reduce.c, src/state.h,
363 * src/symtab.c, src/symtab.h (bucket): Rename as...
364 (symbol_t): this.
365 (symbol_list_new, bucket_check_defined, bucket_make_alias)
366 (bucket_check_alias_consistence, bucket_pack, bucket_translation)
367 (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
368 (buckets_new, buckets_free, buckets_do): Rename as...
369 (symbol_list_new, symbol_check_defined, symbol_make_alias)
370 (symbol_check_alias_consistence, symbol_pack, symbol_translation)
371 (symbol_new, symbol_free, hash_compare_symbol_t, hash_symbol_t)
372 (symbols_new, symbols_free, symbols_do): these.
373
72a23c97
AD
3742002-04-07 Akim Demaille <akim@epita.fr>
375
376 Use lib/hash for the symbol table.
377
378 * src/gram.c (ntokens): Initialize to 1, to reserve a slot for
379 EOF.
380 * src/lex.c (lex): Set the `number' member of new terminals.
381 * src/reader.c (bucket_check_defined, bucket_make_alias)
382 (bucket_check_alias_consistence, bucket_translation): New.
383 (reader, grammar_free, readgram, token_translations_init)
384 (packsymbols): Adjust.
385 (reader): Number the predefined tokens.
386 * src/reduce.c (inaccessable_symbols): Just use hard coded numbers
387 for predefined tokens.
388 * src/symtab.h (bucket): Remove all the hash table related
389 members.
390 * src/symtab.c (symtab): Replace by...
391 (bucket_table): this.
392 (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
393 (buckets_new, buckets_do): New.
394
280a38c3
AD
3952002-04-07 Akim Demaille <akim@epita.fr>
396
397 * src/gram.c (nitems, nrules, nsyms, ntokens, nvars, nritems)
398 (start_symbol, max_user_token_number, semantic_parser)
399 (error_token_number): Initialize.
400 * src/reader.c (grammar, start_flag, startval, typed, lastprec):
401 Initialize.
402 (reader): Don't.
403 (errtoken, eoftoken, undeftoken, axiom): Extern.
404
03b31c0c
AD
4052002-04-07 Akim Demaille <akim@epita.fr>
406
407 * src/gram.h (rule_s): prec and precsym are now pointers
408 to the bucket giving the priority/associativity.
409 Member `associativity' removed: useless.
410 * src/reduce.c, src/conflicts.c: Adjust.
411
8b3df748
AD
4122002-04-07 Akim Demaille <akim@epita.fr>
413
414 * src/lalr.c, src/LR0.c, src/closure.c, src/gram.c, src/reduce.c:
415 Properly escape the symbols' TAG when outputting them.
416
e601aa1d
AD
4172002-04-07 Akim Demaille <akim@epita.fr>
418
419 * src/lalr.h (LA): Is a bitsetv, not bitset*.
420
b0299a2e
AD
4212002-04-07 Akim Demaille <akim@epita.fr>
422
423 * src/lalr.h, src/lalr.c (LAruleno): Replace with...
424 (LArule): this, which is an array to rule_t*.
425 * src/print.c, src/conflicts.c: Adjust.
426
d7e1f00c
AD
4272002-04-07 Akim Demaille <akim@epita.fr>
428
429 * src/gram.h (rule_t): Rename `number' as `user_number'.
430 `number' is a new member.
431 Adjust dependencies.
432 * src/reduce.c (reduce_grammar_tables): Renumber rule_t.number.
433
cc9305dd
AD
4342002-04-07 Akim Demaille <akim@epita.fr>
435
436 As a result of the previous patch, it is no longer needed
437 to reorder ritem itself.
438
439 * src/reduce.c (reduce_grammar_tables): Don't sort RITEM.
440
b0940840
AD
4412002-04-07 Akim Demaille <akim@epita.fr>
442
443 Be sure never to walk through RITEMS, but use only data related to
444 the rules themselves. RITEMS should be banished.
445
446 * src/output.c (output_token_translations): Rename as...
447 (prepare_tokens): this.
448 In addition to `translate', prepare the muscles `tname' and
449 `toknum', which were handled by...
450 (output_rule_data): this.
451 Remove, and move the remainder of its outputs into...
452 (prepare_rules): this new routines, which also merges content from
453 (output_gram): this.
454 (prepare_rules): Be sure never to walk through RITEMS.
455 (output_stos): Rename as...
456 (prepare_stos): this.
457 (output): Always invoke prepare_states, after all, just don't use it
458 in the output if you don't need it.
459
643a5994
AD
4602002-04-07 Akim Demaille <akim@epita.fr>
461
462 * src/LR0.c (new_state): Display `nstates' as the name of the
463 newly created state.
464 Adjust to initialize first_state and last_state if needed.
465 Be sure to distinguish the initial from the final state.
466 (new_states): Create the itemset of the initial state, and use
467 new_state.
468 * src/closure.c (closure): Now that the initial state has its
469 items properly set, there is no need for a special case when
470 creating `ruleset'.
471
472 As a result, now the rule 0, reducing to $axiom, is visible in the
473 outputs. Adjust the test suite.
474
475 * tests/conflicts.at (Solved SR Conflicts)
476 (Unresolved SR Conflicts): Adjust.
477 * tests/regression.at (Web2c Report, Rule Line Numbers): Idem.
478 * tests/conflicts.at (S/R in initial): New.
479
b4c4ccc2
AD
4802002-04-07 Akim Demaille <akim@epita.fr>
481
482 * src/LR0.c (allocate_itemsets): Don't loop over ritem: loop over
483 the RHS of the rules.
484 * src/output.c (output_gram): Likewise.
485
bba97eb2
AD
4862002-04-07 Akim Demaille <akim@epita.fr>
487
488 * src/gram.h (rule_t): `lhs' is now a pointer to the symbol's
489 bucket.
490 Adjust all dependencies.
491 * src/reduce.c (nonterminals_reduce): Don't forget to renumber the
492 `number' of the buckets too.
493 * src/gram.h: Include `symtab.h'.
494 (associativity): Move to...
495 * src/symtab.h: here.
496 No longer include `gram.h'.
497
c3b407f4
AD
4982002-04-07 Akim Demaille <akim@epita.fr>
499
500 * src/gram.h, src/gram.c (rules_rhs_length): New.
501 (ritem_longest_rhs): Use it.
502 * src/gram.h (rule_t): `number' is a new member.
503 * src/reader.c (packgram): Set it.
504 * src/reduce.c (reduce_grammar_tables): Move the useless rules at
505 the end of `rules', and count them out of `nrules'.
506 (reduce_output, dump_grammar): Adjust.
507 * src/print.c (print_grammar): It is no longer needed to check for
508 the usefulness of a rule, as useless rules are beyond `nrules + 1'.
509 * tests/reduce.at (Reduced Automaton): New test.
510
11652ab3
AD
5112002-04-07 Akim Demaille <akim@epita.fr>
512
513 * src/reduce.c (inaccessable_symbols): Fix a buglet: because of a
514 lacking `+ 1' to nrules, Bison reported as useless a token if it
515 was used solely to set the precedence of the last rule...
516
26b23c1a
AD
5172002-04-07 Akim Demaille <akim@epita.fr>
518
519 * data/bison.c++, data/bison.simple: Don't output the current file
520 name in #line, to avoid useless diffs between two identical
521 outputs under different names.
522
18bcecb0
AD
5232002-04-07 Akim Demaille <akim@epita.fr>
524
525 * src/closure.c, src/print.c, src/reader.c, src/reduce.c:
526 Normalize loops to using `< nrules + 1', not `<= nrules'.
527
fa770c86
AD
5282002-04-07 Akim Demaille <akim@epita.fr>
529
530 * TODO: Update.
531
d9b739c3
AD
5322002-04-07 Akim Demaille <akim@epita.fr>
533
534 * src/output.c, src/reader.c, src/symtab.c, src/symtab.h: Rename
535 bucket.value as bucket.number.
536
99013900
AD
5372002-04-07 Akim Demaille <akim@epita.fr>
538
539 * src/closure.c, src/derives.c, src/gram.h, src/lalr.c,
540 * src/nullable.c, src/output.c, src/print.c, src/print_graph.c,
541 * src/reader.c, src/reduce.c: Let rule_t.rhs point directly to the
542 RHS, instead of being an index in RITEMS.
543
e966383b
PE
5442002-04-04 Paul Eggert <eggert@twinsun.com>
545
546 * doc/bison.texinfo: Update copyright date.
547 (Rpcalc Lexer, Symbols, Token Decl): Don't assume ASCII.
548 (Symbols): Warn about running Bison in one character set,
549 but compiling and/or running in an incompatible one.
550 Warn about character code 256, too.
551
5522002-04-03 Paul Eggert <eggert@twinsun.com>
553
554 * src/bison.data (YYSTACK_ALLOC): Depend on whether
555 YYERROR_VERBOSE is nonzero, not whether it is defined.
556
557 Merge changes from bison-1_29-branch.
c307773e 558
8d6c48b9
PE
5592002-03-20 Paul Eggert <eggert@twinsun.com>
560
561 Merge fixes from Debian bison_1.34-1.diff.
562
563 * configure.in (AC_PREREQ): 2.53.
564
e53c6322
AD
5652002-03-20 Akim Demaille <akim@epita.fr>
566
567 * src/conflicts.c (log_resolution): Argument `resolution' is const.
568
9ffbeca7
PE
5692002-03-19 Paul Eggert <eggert@twinsun.com>
570
21db0b2a
PE
571 * src/bison.simple (YYCOPY): New macro.
572 (YYSTACK_RELOCATE): Use it.
573 Remove Type arg; no longer needed. All callers changed.
574 (yymemcpy): Remove; no longer needed.
575
9ffbeca7
PE
576 * Makefile.am (AUTOMAKE_OPTIONS): 1.6.
577 * doc/Makefile.am (AUTOMAKE_OPTIONS): Remove.
578
642cb8f8
AD
5792002-03-19 Akim Demaille <akim@epita.fr>
580
581 Test and fix the #line outputs.
582
583 * tests/atlocal.at (GCC): New.
584 * tests/synclines.at (AT_TEST_SYNCLINE): New macro.
585 (Prologue synch line, ,%union synch line, Postprologue synch line)
586 (Action synch line, Epilogue synch line): New tests.
587 * src/reader.c (parse_union_decl): Define the muscle stype_line.
588 * data/bison.simple, data/bison.c++: Use it.
589
3c31a486
AD
5902002-03-19 Akim Demaille <akim@epita.fr>
591
592 * tests/regression.at (%nonassoc and eof, Unresolved SR Conflicts)
593 (Solved SR Conflicts, %expect not enough, %expect right)
594 (%expect too much): Move to...
595 * tests/conflicts.at: this new file.
596
0d8bed56
AD
5972002-03-19 Akim Demaille <akim@epita.fr>
598
599 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
600 * data/bison.simple, data/bison.c++: Handle the `#define' part, so
601 that we can move to enums for instance.
602 * src/output.c (token_definitions_output): Output a list of
603 `token-name, token-number' instead of the #define.
604 (output_skeleton): Name this list `b4_tokens', not `b4_tokendefs'.
605
9208d17f
AD
6062002-03-14 Akim Demaille <akim@epita.fr>
607
608 Use Gettext 0.11.1.
609
af27eacb
RA
6102002-03-09 Robert Anisko <robert@lrde.epita.fr>
611
612 * data/bison.c++: Make the user able to add members to the generated
613 parser by subclassing.
614
9101a310
RA
6152002-03-05 Robert Anisko <robert@lrde.epita.fr>
616
617 * src/reader.c (read_additionnal_code): `c' should be an integer, not
618 a character.
619 Reported by Nicolas Tisserand and Nicolas Burrus.
620
fff9bf0b
RA
6212002-03-04 Robert Anisko <robert@lrde.epita.fr>
622
623 * src/reader.c: Warn about lacking semi-colons, do not complain.
624
64dba31e
RA
6252002-03-04 Robert Anisko <robert@lrde.epita.fr>
626
627 * data/bison.c++: Remove a debug line.
628
374f5a14
RA
6292002-03-04 Robert Anisko <robert@lrde.epita.fr>
630
631 * data/bison.c++: Unmerge value as yylval and value as yyval. Unmerge
632 location as yylloc and location as yyloc. Use YYLLOC_DEFAULT, and
633 provide a default implementation.
634
bfcf1f3a
AD
6352002-03-04 Akim Demaille <akim@epita.fr>
636
637 * tests/input.at (Invalid $n, Invalid @n): Add the ending `;'.
638 * tests/output.at (AT_CHECK_OUTPUT): Likewise.
639 * tests/headers.at (AT_TEST_CPP_GUARD_H): Ditto.
640 * tests/semantic.at (Parsing Guards): Similarly.
641 * src/reader.at (readgram): Complain if the last rule is not ended
642 with a semi-colon.
643
65ccf9fc
AD
6442002-03-04 Akim Demaille <akim@epita.fr>
645
646 * src/warshall.h, src/warshall.c (bitmatrix_print): Move to...
647 * src/closure.c: here.
648 (set_firsts): Use bitsetv_reflexive_transitive_closure instead of
649 RTC.
650 * src/warshall.h, src/warshall.c: Remove.
651 * tests/sets.at (Broken Closure): Adjust.
652
d0039cbc
AD
6532002-03-04 Akim Demaille <akim@epita.fr>
654
655 * src/output.c (output_skeleton): tempdir is const.
656 bytes_read is unused.
657
345cea78
AD
6582002-03-04 Akim Demaille <akim@epita.fr>
659
660 * lib/bbitset.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
661 * lib/bitsetv.h, lib/ebitset.c, lib/lbitset.c, lib/sbitset.c:
662 Update.
663 From Michael Hayes.
664
564801f7
AD
6652002-03-04 Akim Demaille <akim@epita.fr>
666
667 * src/closure.c (closure): `r' is unused.
668
e5352bc7
AD
6692002-03-04 Akim Demaille <akim@epita.fr>
670
671 * tests/sets.at (Broken Closure): Add the ending `;'.
672 * src/reader.at (readgram): Complain if a rule is not ended with a
673 semi-colon.
674
914feea9
AD
6752002-03-04 Akim Demaille <akim@epita.fr>
676
677 * src/conflicts.c (set_conflicts): Use bitset_disjoint_p.
678 (count_sr_conflicts): Use bitset_count.
679 * src/reduce.c (inaccessable_symbols): Ditto.
680 (bits_size): Remove.
681 * src/warshall.h, src/warshall.c: Convert to bitsetv.
682
f0250de6
AD
6832002-03-04 Akim Demaille <akim@epita.fr>
684
685 * src/closure.c, src/conflicts.c, src/lalr.c, src/print.c,
686 * src/reduce.c: Remove the `bitset_zero's following the
687 `bitset_create's, as now it is performed by the latter.
688
ef017502
AD
6892002-03-04 Akim Demaille <akim@epita.fr>
690
691 * lib/bitset.c, lib/bitset.h, lib/bitsetv.c, lib/bitsetv.h,
692 * lib/ebitset.c, lib/ebitset.h, lib/lbitset.c, lib/lbitset.h,
693 * lib/sbitset.c, lib/sbitset.h, lib/bbitset.h: Update from the
694 latest sources from Michael.
695
76514394
AD
6962002-03-04 Akim Demaille <akim@epita.fr>
697
698 * src/output.c (output): Don't free the grammar.
699 * src/reader.c (grammar_free): New.
700 * src/main.c (main): Call it and don't free symtab here.
701
55024580
AD
7022002-03-04 Akim Demaille <akim@epita.fr>
703
704 * src/lex.c (parse_percent_token): Be sure to 0-end token_buffer
705 before returning.
706 Reported by Benoit Perrot.
707
f9abaa2c
AD
7082002-03-04 Akim Demaille <akim@epita.fr>
709
710 Use bitset operations when possible, not loops over bits.
711
712 * src/conflicts.c (set_conflicts, count_sr_conflicts): Use
713 bitset_or.
714 * src/print.c (print_reductions): Use bitset_and, bitset_andn.
715 * src/reduce.c (useless_nonterminals): Formatting changes.
716 * src/warshall.c (TC): Use bitset_or.
717
0e721e75
AD
7182002-03-04 Akim Demaille <akim@epita.fr>
719
720 * src/lalr.h, src/lalr.c (tokensetsize): Remove, unused.
721 * src/system.h (BITS_PER_WORD, WORDSIZE, SETBIT, RESETBIT, BITISSET):
722 Ditto.
723
0fb1ffb1
AD
7242002-03-04 Akim Demaille <akim@epita.fr>
725
726 * src/lalr.c (F): Now a bitset*.
727 Adjust all dependencies.
728
b86796bf
AD
7292002-03-04 Akim Demaille <akim@epita.fr>
730
731 * src/conflicts.c (shiftset, lookaheadset): Now bitset.
732 Adjust all dependencies.
733
602bbf31
AD
7342002-03-04 Akim Demaille <akim@epita.fr>
735
736 * src/L0.c, src/LR0.h (nstates): Be size_t.
737 Adjust comparisons (signed vs unsigned).
738 * src/conflics.c, src/lalr.c, src/lalr.h, src/output.c (LA): Now a
739 bitset*.
740 Adjust all dependencies.
741
d8a0245c
AD
7422002-03-04 Akim Demaille <akim@epita.fr>
743
744 * src/closure.c (firsts): Now, also a bitset.
745 Adjust all dependencies.
746 (varsetsize): Remove, now unused.
747 * src/warshall.h, src/warshall.c: Now work on arrays of bitsets.
748
34ba9743
AD
7492002-03-04 Akim Demaille <akim@epita.fr>
750
751 * src/print.c: Convert to use bitset.h, not hand coded iterations
752 over ints.
753
ed86e78c
AD
7542002-03-04 Akim Demaille <akim@epita.fr>
755
756 * src/reduce.c: Convert to use bitset.h, not hand coded BSet.
757
dfdb1797
AD
7582002-03-04 Akim Demaille <akim@epita.fr>
759
760 * src/closure.c (ruleset): Be a bitset.
761 (rulesetsize): Remove.
762
7086e707
AD
7632002-03-04 Akim Demaille <akim@epita.fr>
764
765 * lib/bitset-int.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
766 * lib/bitsetv.h, lib/ebitset.c, lib/ebitset.h, lib/lbitset.c,
767 * lib/lbitset.h, lib/sbitset.c, lib/sbitset.h: New.
768 * src/closure.c (fderives): Be an array of bitsets.
769
98254360
RA
7702002-02-28 Robert Anisko <robert@lrde.epita.fr>
771
772 * data/bison.c++: Merge the two generated headers. Insert a copyright
773 notice in each output file.
774
a75c057f
AD
7752002-02-28 Akim Demaille <akim@epita.fr>
776
777 * data/bison.c++: Copy the prologue of bison.simple to fetch
778 useful M4 definitions, such as b4_header_guard.
779
06b00abc
AD
7802002-02-25 Akim Demaille <akim@epita.fr>
781
782 * src/getargs.c (version): Give the name of the authors, and use a
a75c057f
AD
783 translator friendly scheme for the bgr
784 copyright notice.
06b00abc 785
70e7d534
AD
7862002-02-25 Akim Demaille <akim@epita.fr>
787
788 * src/output.c (header_output): Remove, now handled completely via
789 M4.
790
abe017f6
AD
7912002-02-25 Akim Demaille <akim@epita.fr>
792
793 * m4/m4.m4: New, from CVS Autoconf.
794 * configure.in: Invoke it.
795 * src/output.c (output_skeleton): Use its result instead of the
796 hard coded name.
797
381fb12e
AD
7982002-02-25 Akim Demaille <akim@epita.fr>
799
800 * lib/tempname.c, lib/mkstemp.c, m4/mkstemp.m4: New, stolen from
801 Fileutils 4.1.5.
802 * configure.in: Invoke UTILS_FUNC_MKSTEMP.
803 * src/output.c (output_skeleton): Use mkstemp to create a real
804 temporary file.
805 Move the filling of `skeleton' and its muscle to...
806 (prepare): here.
807 (output): Move the definition of the prologue muscle to...
808 (prepare): here.
809 * src/system.h (DEFAULT_TMPDIR): New.
810
6f38107f
PE
8112002-02-14 Paul Eggert <eggert@twinsun.com>
812
813 Remove the support for C++ namespace cleanliness; it was
814 causing more problems than it was curing, since it didn't work
815 properly on some nonstandard C++ compilers. This can wait
816 for a proper C++ parser.
817
818 * NEWS: Document this.
819 * doc/bison.texinfo (Bison Parser, Debugging): Remove special mention
820 of C++, as it's treated like C now.
821 * src/bison.simple (YYSTD): Remove.
822 (YYSIZE_T, YYFPRINTF, YYPARSE_PARAM_ARG, YYPARSE_PARAM_DECL):
823 Treat C++ just like Standard C instead of trying to support
824 namespace cleanliness.
825
80cce3da
AD
8262002-02-14 Akim Demaille <akim@epita.fr>
827
828 * tests/regression.at (else): Adjust to Andreas' change.
829
842e8679
AD
8302002-02-14 Akim Demaille <akim@epita.fr>
831
832 * lib/Makefile.am (EXTRA_DIST): Ship strnlen.c.
833
4bda3f10
AD
8342002-02-13 Andreas Schwab <schwab@suse.de>
835
836 * src/output.c (output_rule_data): Don't output NULL, it might
837 not be defined yet.
838
4162fa07 8392002-02-11 Robert Anisko <robert@lrde.epita.fr>
b418ecd8 840
4162fa07
RA
841 * data/bison.c++ (YYDEBUG, YYERROR_VERBOSE): After the prologue.
842 (Copyright notice): Update.
b418ecd8 843
bd16a5dc
AD
8442002-02-11 Akim Demaille <akim@epita.fr>
845
846 * tests/regression.at (%nonassoc and eof): Don't include
847 nonportable headers.
848
8d69a1a3
RA
8492002-02-08 Robert Anisko <robert@lrde.epita.fr>
850
851 * data/bison.c++: Correct error recovery. Make the user able to
852 initialize the starting location.
853
9b2d0677
AD
8542002-02-07 Akim Demaille <akim@epita.fr>
855
856 * tests/input.at: New.
857
69e2658b
RA
8582002-02-07 Robert Anisko <robert@lrde.epita.fr>
859
860 * data/bison.c++: Replace some direct m4 expansions by constants. Be
9b2d0677 861 more consistent when naming methods and variables. Put preprocessor
69e2658b
RA
862 directives around tables only needed for debugging.
863
4aacc3a7
RA
8642002-02-07 Robert Anisko <robert@lrde.epita.fr>
865
866 * data/bison.c++ (yy::b4_name::print_): New method, replaces yyprint in
867 C++ parsers.
868 (yy::b4_name::parse): Use print_.
869
762a801e
RA
8702002-02-07 Robert Anisko <robert@lrde.epita.fr>
871
872 * data/bison.c++ (yy::b4_name::parse): Error recovery is back.
873
4bb2bc3f
RA
8742002-02-07 Robert Anisko <robert@lrde.epita.fr>
875
876 * data/bison.c++ (yy::b4_name::error_): New method, replaces yyerror in
877 C++ parsers.
878 (yy::b4_name::parse): Build verbose error messages, and use error_.
879
6b45a3ca
RA
8802002-02-06 Robert Anisko <robert@lrde.epita.fr>
881
882 * data/bison.c++: Fix m4 quoting in comments.
883
50997c6e
RA
8842002-02-06 Robert Anisko <robert@lrde.epita.fr>
885
886 * data/bison.c++: Adjust the parser code. Fix some muscles that were
887 not expanded by m4.
888
3f3eed27
AD
8892002-02-05 Akim Demaille <akim@epita.fr>
890
891 * data/bison.c++: Adjust to the M4 back end.
892 More is certainly needed.
893
be2a1a68
AD
8942002-02-05 Akim Demaille <akim@epita.fr>
895
896 Give a try to M4 as a back end.
897
898 * lib/readpipe.c: New, from wdiff.
899 * src/Makefile.am (DEFS): Define PKGDATADIR, not BISON_SIMPLE and
900 BISON_HAIRY.
901 * src/system.h (BISON_HAIRY, BISON_SIMPLE): Remove the DOS and VMS
902 specific values. Now it is m4 that performs the lookup.
903 * src/parse-skel.y: Remove.
904 * src/muscle_tab.c, src/muscle_tab.h (muscles_m4_output): New.
905 * src/output.c (actions_output, guards_output)
906 (token_definitions_output): No longer keeps track of the output
907 line number, hence remove the second argument.
908 (guards_output): Check against the guard member of a rule, not the
909 action member.
910 Adjust callers.
911 (output_skeleton): Don't look for the skeleton location, let m4 do
912 that.
913 Create `/tmp/muscles.m4'. This is temporary, a proper temporary
914 file will be used.
915 Invoke `m4' on m4sugar.m4, muscles.m4, and the skeleton.
916 (prepare): Given that for the time being changesyntax is not
917 usable in M4, rename the muscles using `-' to `_'.
918 Define `defines_flag', `output_parser_name' and `output_header_name'.
919 * src/output.h (actions_output, guards_output)
920 (token_definitions_output): Adjust prototypes.
921 * src/scan-skel.l: Instead of scanning the skeletons, it now
922 processes the output of m4: `__oline__' and `#output'.
923 * data/bison.simple: Adjust to be used by M4(sugar).
924 * tests/Makefile.am: Use check_SCRIPTS to make sure `bison' is up
925 to date.
926 * tests/bison.in: Use the secrete envvar `BISON_PKGDATADIR'
927 instead of the dead `BISON_SIMPLE' and `BISON_HAIRY'.
928 * data/m4sugar/m4sugar.m4, data/m4sugar/version.m4: New,
929 shamelessly stolen from CVS Autoconf.
930
beda758b
AD
9312002-02-05 Akim Demaille <akim@epita.fr>
932
933 * lib/hash.c, lib/hash.h: Replace with Fileutils 4.1's version.
934 * configure.in: Check for the declarations of free and malloc.
935 * src/muscle_tab.c: Adjust.
936
5ece6d43
AD
9372002-02-05 Akim Demaille <akim@epita.fr>
938
939 * src/muscle_tab.c (muscle_init): Don't default to NULL muscle
940 which have no values.
941
5bb18f9a
AD
9422002-02-05 Akim Demaille <akim@epita.fr>
943
944 * src/bison.simple, src/bison.hairy, src/bison.c++: Move to...
945 * data/: here.
946
894dd62e
PE
9472002-01-29 Paul Eggert <eggert@twinsun.com>
948
949 * src/bison.simple (YYSIZE_T): Do not define merely because
950 YYSTACK_USE_ALLOCA is nonzero or alloca or _ALLOCA_H are defined.
951 On some platforms, <alloca.h> does not declare YYSTD (size_t).
952
82841af7
AD
9532002-01-27 Akim Demaille <akim@epita.fr>
954
955 Fix `%nonassoc and eof'.
956
957 * src/state.c (errs_dup): Aaaah! The failure was due to bytes
958 which were not properly copied! Replace
959 memcpy (res->errs, src->errs, src->nerrs);
960 with
961 memcpy (res->errs, src->errs, src->nerrs * sizeof (src->errs[0]));
962 !!!
963 * tests/regression.at (%nonassoc and eof): Adjust to newest
964 Autotest: `.' is not in the PATH.
965
318b76e9
AD
9662002-01-27 Akim Demaille <akim@epita.fr>
967
968 * tests/sets.at (AT_EXTRACT_SETS): New.
969 (Nullable): Use it.
970 (Firsts): New.
971
30d2f3d5
AD
9722002-01-26 Akim Demaille <akim@epita.fr>
973
974 * tests/actions.at, tests/calc.at, tests/headers.at,
975 * tests/torture.at: Adjust to the newest Autotest which no longer
976 forces `.' in the PATH.
977
30f8c395
AD
9782002-01-25 Akim Demaille <akim@epita.fr>
979
980 * tests/regression.at (%nonassoc and eof): New.
981 Suggested by Robert Anisko.
982
29ae55f1
AD
9832002-01-24 Akim Demaille <akim@epita.fr>
984
985 Bison dumps core when trying to complain about broken input files.
986 Reported by Cris van Pelt.
987
988 * src/lex.c (parse_percent_token): Be sure to set token_buffer.
989 * tests/regression.at (Invalid input: 1, Invalid input: 2): Merge
990 into...
991 (Invalid inputs): Strengthen: exercise parse_percent_token.
992
2b548aa6
RA
9932002-01-24 Robert Anisko <robert.anisko@epita.fr>
994
995 * src/Makefile.am: Add bison.c++.
996 * src/bison.c++: New skeleton.
997
bb0146c2
AD
9982002-01-21 Paolo Bonzini <bonzini@gnu.org>
999
1000 * po/it.po: New.
1001
bec30531
AD
10022002-01-21 Kees Zeelenberg <kzlg@users.sourceforge.net>
1003
1004 * src/files.c (skeleton_find) [MSDOS]: Fix cp definition.
1005
fc6edc45
MA
10062002-01-20 Marc Autret <marc@gnu.org>
1007
1008 * src/files.c (compute_output_file_names): Fix
1009
5e5d5415
MA
10102002-01-20 Marc Autret <marc@gnu.org>
1011
1012 * tests/output.at: New test.
1013 * src/files.c (compute_base_names): Don't map extensions when
1014 the YACC flag is set, use defaults.
1015 Reported by Evgeny Stambulchik.
1016
44ea3fbd
MA
10172002-01-20 Marc Autret <marc@gnu.org>
1018
bb0146c2 1019 * src/system.h: Need to define __attribute__ away for non-GCC
44ea3fbd
MA
1020 compilers as well (i.e. the vendor C compiler).
1021 Suggested by Albert Chin-A-Young.
1022
338963d1
TVH
10232002-01-11 Tim Van Holder <tim.van.holder@pandora.be>
1024
1025 * lib/hash.h, lib/hash.c: Renamed __P to PARAMS and used the
1026 canonical definition.
1027 * src/system.h: Use the canonical definition for PARAMS (avoids
1028 a conflict with the macro from lib/hash.h).
1029
c57b2479
AD
10302002-01-11 Akim Demaille <akim@epita.fr>
1031
1032 * configure.in: Use AC_FUNC_STRNLEN.
d9e9746c 1033 Fixes the failures observed on AIX 4.3 by H.Merijn Brand.
c57b2479 1034
b85810ae
AD
10352002-01-09 Akim Demaille <akim@epita.fr>
1036
1037 * src/files.c, src/files.h (output_infix): New.
1038 (tab_extension): Remove.
1039 (compute_base_names): Compute the former, drop the latter.
1040 * src/output.c (prepare): Insert the muscles `output-infix', and
1041 `output-suffix'.
1042 * src/parse-skel.y (string, string.1): New.
1043 (section.header): Use it.
1044 (section.yacc): Remove.
1045 (prefix): Remove too.
1046 * src/scan-skel.l: Adjust.
1047 * src/bison.simple, src/bison.hairy: Adjust.
1048
cae60122
AD
10492002-01-09 Akim Demaille <akim@epita.fr>
1050
1051 * configure.in (WERROR_CFLAGS): Compute it.
1052 * src/Makefile.am (CFLAGS): Pass it.
1053 * tests/atlocal.in (CFLAGS): Idem.
1054 * src/files.c: Fix a few warnings.
1055 (get_extension_index): Remove, unused.
1056
ae404801
AD
10572002-01-08 Akim Demaille <akim@epita.fr>
1058
1059 * src/getargs.c (AS_FILE_NAME): New.
1060 (getargs): Use it to convert DOSish file names.
1061 * src/files.c (base_name): Rename as full_base_name to avoid
1062 clashes with `base_name ()'.
1063 (filename_split): New.
1064 (compute_base_names): N-th rewrite, using filename_split.
1065
22312b71
AD
10662002-01-08 Akim Demaille <akim@epita.fr>
1067
1068 * lib/basename.c, lib/dirname.h, lib/dirname.c, lib/memrchr.c:
1069 New, stolen from the Fileutils 4.1.
1070 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
1071 * configure.in: Check for the presence of memrchr, and of its
1072 prototype.
1073
a67cef01
TVH
10742002-01-07 Tim Van Holder <tim.van.holder@pandora.be>
1075
1076 * lib/hash.h (__P): Added definition for this macro.
1077 * src/Makefile.am: Add parse-skel.c and scan-skel.c to
1078 BUILT_SOURCES, to ensure they are generated first.
1079 * src/parse-skel.y: Use YYERROR_VERBOSE instead of
1080 %error-verbose to allow bootstrapping with bison 1.30x.
1081
2b25d624
AD
10822002-01-06 Akim Demaille <akim@epita.fr>
1083
1084 * src/reader.c (parse_braces): Don't fetch the next char, the
1085 convention is to fetch on entry.
1086 * tests/torture.at (GNU Cim Grammar): Reintroduce their weird
1087 'switch' without a following semicolon.
1088 * tests/regression.at (braces parsing): New.
1089
3460813b
AD
10902002-01-06 Akim Demaille <akim@epita.fr>
1091
1092 Bison is dead wrong in its RR conflict reports.
1093
1094 * tests/torture.at (GNU Cim Grammar): New.
1095 * src/conflicts.c (count_rr_conflicts): Fix.
1096
73784c64
AD
10972002-01-06 Akim Demaille <akim@epita.fr>
1098
1099 Creating package.m4 from configure.ac causes too many problems.
1100
1101 * tests/Makefile.am (package.m4): Create it by hand,
1102 AC_CONFIG_TESTDIR no longer does in the most recent CVS Autoconf.
1103
25d81090
AD
11042002-01-06 Akim Demaille <akim@epita.fr>
1105
1106 * src/Makefile.am (bison_SOURCES): Add parse-skel.h and
1107 skeleton.h.
1108
a9b8959e
PE
11092002-01-04 Paul Eggert <eggert@twinsun.com>
1110
1111 * doc/bison.texinfo (Debugging):
1112 Remove YYSTDERR; it's no longer defined or used.
1113 Also, s/cstdio.h/cstdio/.
1114
25d81090
AD
11152002-01-03 Akim Demaille <akim@epita.fr>
1116
1117 * tests/bison.in, tests/atlocal.in: Adjust to CVS Autoconf.
1118
1109455c
AD
11192002-01-03 Akim Demaille <akim@epita.fr>
1120
1121 * src/parse-skel.y (process_skeleton): Don't bind the parser's
1122 tracing code to --trace, wait for a better --trace option, with
1123 args.
1124
7ea5e977
AD
11252002-01-03 Akim Demaille <akim@epita.fr>
1126
1127 * src/bison.simple (YYSTDERR): Remove, replace `stderr'.
1128 The ISO C++ standard is extremely clear about it: stderr is
1129 considered a macro, not a regular symbol (see table 94 `Header
1130 <cstdio> synopsis', [lib.c.files] 27.8.2 C Library files).
1131 Therefore std:: does not apply to it. It still does with fprintf.
1132 Also, s/cstdio.h/cstdio/.
1133
fab5b110
AD
11342002-01-03 Akim Demaille <akim@epita.fr>
1135
1136 * lib/quotearg.c: Use `#include "..."' instead of `#include <...>'
1137 for non system headers.
1138
aed7fd9b
AD
11392002-01-02 Akim Demaille <akim@epita.fr>
1140
1141 Equip the skeleton chain with location tracking, runtime trace,
1142 pure parser and scanner.
1143
1144 * src/parse-skel.y: Request a pure parser, locations, and prefix
1145 renaming.
1146 (%union): Having several members with the same type does not help
1147 type mismatches, simplify.
1148 (YYPRINT, yyprint): New.
1149 (yyerror): ``Rename'' (there is a #define yyerror skel_error) as...
1150 (skel_error): this.
1151 Handle locations.
1152 * src/scan-skel.l: Adjust to these changes.
1153 * src/skeleton.h (LOCATION_RESET, LOCATION_LINES, LOCATION_STEP)
1154 (LOCATION_PRINT, skel_control_t): New.
1155
24fad99e
AD
11562001-12-30 Akim Demaille <akim@epita.fr>
1157
1158 * src/parse-skel.y: Get rid of the shift/reduce conflict:
1159 replace `gb' with BLANKS.
1160 * src/scan-skel.l: Adjust.
1161
a4b36db4
AD
11622001-12-30 Akim Demaille <akim@epita.fr>
1163
1164 * src/system.h: We don't need nor want bcopy.
1165 Throw away MS-DOS crap: we don't need getpid.
1166 * configure.in: We don't need strndup. It was even causing
1167 problems: because Flex includes the headers *before* us,
1168 _GNU_SOURCE is not defined by config.h, and therefore strndup was
1169 not visible.
1170 * lib/xstrndup.c: New.
1171 * src/scan-skel.l: Use it.
1172 Be sure to initialize yylval.muscle member when scanning a MUSCLE.
1173 * src/parse-skel.y: Use %directives instead of #defines.
1174
1239777d
AD
11752001-12-30 Akim Demaille <akim@epita.fr>
1176
1177 * src/skeleton.h: New.
1178 * src/output.c (output_parser, output_master_parser): Remove, dead
1179 code.
1180 * src/output.h (get_lines_number, actions_output, guards_output)
1181 (token_definitions_output): Prototype them.
1182 * src/parse-skel.y: Add the license notice.
1183 Include output.h and skeleton.h.
1184 (process_skeleton): Returns void, and takes a single parameter.
1185 * src/scan-skel.l: Add the license notice.
1186 Include skeleton.h.
1187 Don't use %option yylineno: it seems that then Flex imagines
1188 REJECT has been used, and therefore it won't reallocate its
1189 buffers (which makes no other sense to me than a bug). It results
1190 in warnings for `unused: yy_flex_realloc'.
1191
9b3add5b
RA
11922001-12-30 Robert Anisko <robert.anisko@epita.fr>
1193
1194 * src/muscle_tab.h (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
1195 (MUSCLE_INSERT_PREFIX): ...to there.
1196 * src/output.c (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
1197 (MUSCLE_INSERT_PREFIX): Move from here...
1198
1199 * src/bison.hairy: Add a section directive. Put braces around muscle
1200 names. This parser skeleton is still broken, but Bison should not
1201 choke on a bad muscle 'syntax'.
1202 * src/bison.simple: Add a section directive. Put braces around muscle
1203 names.
1204
1205 * src/files.h (strsuffix, stringappend): Add declarations.
1206 (tab_extension): Add declaration.
1207 (short_base_name): Add declaration.
1208
1209 * src/files.c (strsuffix, stringappend): No longer static. These
1210 functions are used in the skeleton parser.
1211 (tab_extension): New.
1212 (compute_base_names): Use the computations done in this function
fab5b110 1213 to guess if the generated parsers should have '.tab' in their
9b3add5b
RA
1214 names.
1215 (short_base_name): No longer static.
1216
1217 * src/output.c (output_skeleton): New.
1218 (output): Disable call to output_master_parser, and give a try to
1219 a new skeleton handling system.
1220 (guards_output, actions_output): No longer static.
1221 (token_definitions_output, get_lines_number): No longer static.
1222
1223 * configure.in: Use AM_PROG_LEX and AC_PROG_YACC.
1224
fab5b110 1225 * src/Makefile.am (bison_SOURCES): Add scan-skel.l and
9b3add5b
RA
1226 parse-skel.y.
1227
1228 * src/parse-skel.y: New file.
1229 * src/scan-skel.l: New file.
1230
b5b61c61
AD
12312001-12-29 Akim Demaille <akim@epita.fr>
1232
1233 %name-prefix is broken.
1234
1235 * src/files.c (spec_name_prefix): Initialize to NULL, not to "yy".
1236 Adjust all dependencies.
1237 * tests/headers.at (export YYLTYPE): Strengthen this test: use
1238 %name-prefix.
1239
1240 Renaming yylval but not yylloc is not consistent. Now we do.
1241
1242 * src/bison.simple: Prefix yylloc if used.
1243 * doc/bison.texinfo (Decl Summary): Document that.
1244
8c9a50be
AD
12452001-12-29 Akim Demaille <akim@epita.fr>
1246
1247 * doc/bison.texinfo: Promote `%long-directive' over
1248 `%long_directive'.
1249 Remove all references to fixed-output-files, yacc is enough.
1250
d99361e6
AD
12512001-12-29 Akim Demaille <akim@epita.fr>
1252
1253 * src/bison.simple: Define YYDEBUG and YYERROR_VERBOSE *after* the
1254 user prologue. These are defaults.
1255 * tests/actions.at (Mid-rule actions): Make sure the user can
1256 define YYDEBUG and YYERROR_VERBOSE.
1257
b9cecb91
AD
12582001-12-29 Akim Demaille <akim@epita.fr>
1259
1260 * src/output.c (header_output): Don't forget to export YYLTYPE and
1261 yylloc.
1262 * tests/headers.at (export YYLTYPE): New, make sure it does.
1263 * tests/regression.at (%union and --defines, Invalid CPP headers):
1264 Move to...
1265 * tests/headers.at: here.
1266
aea13e97
AD
12672001-12-29 Akim Demaille <akim@epita.fr>
1268
1269 * src/gram.h (rule_s): Member `assoc' is of type `associativity'.
1270
931394cb
AD
12712001-12-29 Akim Demaille <akim@epita.fr>
1272
1273 * tests/actions.at (Mid-rule actions): Output on a single line
1274 instead of several.
1275
704a47c4
AD
12762001-12-29 Akim Demaille <akim@epita.fr>
1277
1278 * doc/bison.texinfo: Formatting changes.
1279
091e20bb
AD
12802001-12-29 Akim Demaille <akim@epita.fr>
1281
1282 Don't store the token defs in a muscle, just be ready to output it
1283 on command. Now possible via `symbols'. Fixes a memory leak.
1284
1285 * src/output.c (token_definitions_output): New.
1286 (output_parser, header_output): Use it.
1287 * src/reader.c (symbols_save): Remove.
1288
cce71710
AD
12892001-12-29 Akim Demaille <akim@epita.fr>
1290
1291 * src/bison.simple: Do not provide a default for YYSTYPE and
1292 YYLTYPE before the user's prologue. Otherwise it's hardly... a
1293 default.
1294
82c035a8
AD
12952001-12-29 Akim Demaille <akim@epita.fr>
1296
1297 Mid-rule actions are simply... ignored!
1298
1299 * src/reader.c (readgram): Be sure to attach mid-rule actions to
1300 the empty-rule associated to the dummy symbol, not to the host
1301 rule.
1302 * tests/actions.at (Mid-rule actions): New.
1303
8419d367
AD
13042001-12-29 Akim Demaille <akim@epita.fr>
1305
1306 Memory leak.
1307
1308 * src/reader.c (reader): Free grammar.
1309
375d5806
AD
13102001-12-29 Akim Demaille <akim@epita.fr>
1311
1312 Memory leak.
1313
1314 * src/LR0.c (new_itemsets): Don't allocate `shift_symbol' here,
1315 since it allocates it for each state, although only one is needed.
1316 (allocate_storage): Do it here.
1317
f51cb8ff
AD
13182001-12-29 Akim Demaille <akim@epita.fr>
1319
1320 * src/options.h, src/options.c (create_long_option_table): Rename
1321 as...
1322 (long_option_table_new): this, with a clearer prototype.
1323 (percent_table): Remove, unused,
1324 * src/getargs.c (getargs): Adjust.
1325
29e88316
AD
13262001-12-29 Akim Demaille <akim@epita.fr>
1327
1328 * src/LR0.c, src/conflicts.c, src/lalr.c, src/lalr.h, src/output.c
1329 * src/print.c, src/print_graph.c, src/state.h: Rename state_table
1330 as states.
1331
b9f71f19
AD
13322001-12-29 Akim Demaille <akim@epita.fr>
1333
1334 * src/lalr.c (build_relations): Rename `states' as `states1'.
1335 Sorry, I don't understand exactly what it is, no better name...
1336
1a2b5d37
AD
13372001-12-29 Akim Demaille <akim@epita.fr>
1338
1339 * src/closure.c, src/conflicts.c, src/derives.c, src/gram.c
1340 * src/gram.h, src/lalr.c, src/nullable.c, src/output.c, src/print.c
1341 * src/print_graph.c, src/reader.c, src/reduce.c: Rename rule_table
1342 as rules.
1343
1cca533e
AD
13442001-12-29 Akim Demaille <akim@epita.fr>
1345
1346 * src/gram.c (rprec, rprecsym, rassoc): Remove, unused since long
1347 ago.
1348
c03ae966
AD
13492001-12-29 Akim Demaille <akim@epita.fr>
1350
1351 * src/reader.c, src/reader.h (user_toknums): Remove.
1352 Adjust all users to use symbols[i]->user_token_number.
1353
5a670b1e
AD
13542001-12-29 Akim Demaille <akim@epita.fr>
1355
1356 * src/gram.c, src/gram.h (sprec, sassoc): Remove.
1357 Adjust all users to use symbols[i]->prec or ->assoc.
1358
ad949da9
AD
13592001-12-29 Akim Demaille <akim@epita.fr>
1360
1361 * src/reader.c, src/reader.h (tags): Remove.
1362 Adjust all users to use symbols[i]->tag.
1363
0e78e603
AD
13642001-12-29 Akim Demaille <akim@epita.fr>
1365
1366 * src/gram.h, src/gram.c (symbols): New, similar to state_table
1367 and rule_table.
1368 * src/reader.c (packsymbols): Fill this table.
1369 Drop sprec.
1370 * src/conflicts.c (resolve_sr_conflict): Adjust.
1371 * src/reduce.c (reduce_grammar): Adjust: just sort symbols, a
1372 single table.
1373 Use symbols[i]->tag instead of tags[i].
1374
213e640e
AD
13752001-12-29 Akim Demaille <akim@epita.fr>
1376
1377 * tests/calc.at (_AT_DATA_CALC_Y): Also use %union.
1378 In addition, put a comment in there, to replace...
1379 * tests/regression.at (%union and C comments): Remove.
1380
e7b8bef1
AD
13812001-12-29 Akim Demaille <akim@epita.fr>
1382
1383 * tests/regression.at (Web2c Actions): Blindly move the actual
1384 output as expected output. The contents *seem* right to me, but I
1385 can't pretend reading perfectly parser tables... Nonetheless, all
1386 the other tests pass correctly, the table look OK, even though the
1387 presence of `$axiom' is to be noted: AFAICS it is useless (but
1388 harmless).
1389
b68e7744
AD
13902001-12-29 Akim Demaille <akim@epita.fr>
1391
1392 * src/reader.c (readgram): Don't add the rule 0 if there were no
1393 rules read. In other words, add it _after_ having performed
1394 grammar sanity checks.
1395 Fixes the `tests/regression.at (Invalid input: 1)' Failure.
1396
78d5bae9
AD
13972001-12-29 Akim Demaille <akim@epita.fr>
1398
1399 * tests/regression.at (Web2c Report): Catch up: the rule 0 is now
1400 visible, and some states have now a different number.
1401
ff442794
AD
14022001-12-29 Akim Demaille <akim@epita.fr>
1403
1404 * src/reader.c (readgram): Bind the initial rule's lineno to that
1405 of the first rule.
1406 * tests/regression.at (Rule Line Numbers, Unresolved SR Conflicts):
1407 (Solved SR Conflicts): Adjust rule 0's line number.
1408
610ab194
AD
14092001-12-29 Akim Demaille <akim@epita.fr>
1410
1411 Fix the `GAWK Grammar' failure.
1412
1413 * src/LR0.c (final_state): Initialize to -1 so that we do compute
1414 the reductions of the first state which was mistakenly confused
1415 with the final state because precisely final_state was initialized
1416 to 0.
1417 * tests/sets.at (Nullable): Adjust: state 0 does have lookaheads,
1418 now noticed by Bison.
1419 * tests/regression.at (Rule Line Numbers): Adjust: state 0 does
1420 have a reduction on $default.
1421
29d29c8f
AD
14222001-12-29 Akim Demaille <akim@epita.fr>
1423
1424 * src/gram.c (ritem_print): Be sure to subtract 1 when displaying
1425 rule line numbers.
1426 * src/closure.c (print_closure): Likewise.
1427 * src/derives.c (print_derives): Likewise.
1428 * tests/sets.at (Nullable): Adjust: the rule numbers are correct
1429 now.
1430
7c6b64d0
AD
14312001-12-29 Akim Demaille <akim@epita.fr>
1432
1433 * src/lalr.c (lookaheads_print): New.
1434 (lalr): Call it when --trace-flag.
1435 * tests/sets.at (Nullable): Adjust: when tracing, the lookaheads
1436 are dumped.
1437
3d4daee3
AD
14382001-12-29 Akim Demaille <akim@epita.fr>
1439
1440 * src/derives.c (print_derives): Be sure to use `>= 0', not `> 0',
1441 when walking through ritem, even via rule->rhs.
1442 * src/reduce.c (dump_grammar, useful_production, reduce_output)
1443 (useful_production, useless_nonterminals): Likewise.
1444 (reduce_grammar_tables): Likewise, plus update nritems.
1445 * src/nullable.c (set_nullable): Likewise.
1446 * src/lalr.c (build_relations): Likewise.
1447 * tests/sets.at (Nullable): Adjust.
1448 Fortunately, now, the $axiom is no longer nullable.
1449
9e7f6bbd
AD
14502001-12-29 Akim Demaille <akim@epita.fr>
1451
1452 * src/LR0.c (generate_states): Use nritems, not nitems, nor using
1453 the 0-sentinel.
1454 * src/gram.c (ritem_longest_rhs): Likewise.
1455 * src/reduce.c (nonterminals_reduce): Likewise.
1456 * src/print_graph.c (print_graph): Likewise.
1457 * src/output.c (output_rule_data): Likewise.
1458 * src/nullable.c (set_nullable): Likewise.
1459
255ef638
AD
14602001-12-29 Akim Demaille <akim@epita.fr>
1461
1462 * src/output.c: Comment changes.
1463
0d8a7363
AD
14642001-12-27 Paul Eggert <eggert@twinsun.com>
1465
1466 * src/bison.simple (YYSTACK_ALLOC, YYSIZE_T): Remove special
1467 cases for non-GNU systems like AIX, HP-UX, SGI, Sun, and
1468 Sparc, as they were causing more porting problems than the
1469 (minor) performance improvement was worth.
1470
1471 Also, catch up with 1.31's YYSTD.
1472
3db472b9
AD
14732001-12-27 Akim Demaille <akim@epita.fr>
1474
1475 * src/output.c (output_gram): Rely on nritems, not the
1476 0-sentinel. See below.
1477 Use -1 as separator, not 0.
1478 * src/bison.simple (yyparse): Subtract 1 to the rule numbers.
1479 Rely on -1 as separator in yyrhs, instead of 0.
1480 * tests/calc.at (AT_CHECK_CALC): Now, the parsers no longer issue
1481 twice `Now at end of input', therefore there are two lines less to
1482 expect.
1483
b365aa05
AD
14842001-12-27 Akim Demaille <akim@epita.fr>
1485
1486 * tests/regression.at (Unresolved SR Conflicts):
1487 (Solved SR Conflicts, Rule Line Numbers): Adjust to the changes
1488 below.
1489
30171f79
AD
14902001-12-27 Akim Demaille <akim@epita.fr>
1491
1492 * src/LR0.c (new_state): Recognize the final state by the fact it
1493 is reached by eoftoken.
1494 (insert_start_shifting_state, insert_eof_shifting_state)
1495 (insert_accepting_state, augment_automaton): Remove, since now
1496 these states are automatically computed from the initial state.
1497 (generate_states): Adjust.
1498 * src/print.c: When reporting a rule number to the user, substract
1499 1, so that the axiom rule is rule 0, and the first user rule is 1.
1500 * src/reduce.c: Likewise.
1501 * src/print_graph.c (print_core): For the time being, just as for
1502 the report, depend upon --trace-flags to dump the full set of
1503 items.
1504 * src/reader.c (readgram): Once the grammar read, insert the rule
1505 0: `$axiom: START-SYMBOL $'.
1506 * tests/set.at: Adjust: rule 0 is now displayed, and since the
1507 number of the states has changed (the final state is no longer
1508 necessarily the last), catch up.
1509
75142d45
AD
15102001-12-27 Akim Demaille <akim@epita.fr>
1511
1512 Try to make the use of the eoftoken valid. Given that its value
1513 is 0 which was also used as a sentinel in ritem, (i) make sure >= 0
1514 is used instead of > 0 where appropriate, (ii), depend upon nritems
1515 instead of the 0-sentinel.
1516
1517 * src/gram.h, src/gram.c (nritems): New.
1518 Expected to be duplication of nitems, but for the time being...
1519 * src/reader.c (packgram): Assert nritems and nitems are equal.
1520 * src/LR0.c (allocate_itemsets, new_itemsets): Adjust.
1521 * src/closure.c (print_closure, print_fderives): Likewise.
1522 * src/gram.c (ritem_print): Likewise.
1523 * src/print.c (print_core, print_grammar): Likewise.
1524 * src/print_graph.c: Likewise.
1525
b7c49edf
AD
15262001-12-27 Akim Demaille <akim@epita.fr>
1527
1528 * src/main.c (main): If there are complains after grammar
1529 reductions, then output the report anyway if requested, then die.
1530 * src/symtab.c (bucket_new): Initialize `value' to -1, not 0.
1531 * src/reader.c (eoftoken): New.
1532 (parse_token_decl): If the token being defined has value `0', it
1533 is the eoftoken.
1534 (packsymbols): No longer hack `tags' to insert `$' by hand.
1535 Be sure to preserve the value of the eoftoken.
1536 (reader): Make sure eoftoken is defined.
1537 Initialize nsyms to 0: now eoftoken is created just like the others.
1538 * src/print.c (print_grammar): Don't special case the eof token.
1539 * src/regression.at: Adjust: `$' has value 0, not -1, which was a
1540 lie anyway, albeit pleasant.
1541 * tests/calc.at: Exercise error messages with eoftoken.
1542 Change the grammar so that empty input is invalid.
1543 Adjust expectations.
1544 When yyungeting, be sure to use a valid yylloc: use last_yylloc.
1545
ec2da99f
AD
15462001-12-27 Akim Demaille <akim@epita.fr>
1547
1548 * configure.in: Check the protos of strchr ans strspn.
1549 Replace strchr if needed.
1550 * src/system.h: Provide the protos of strchr, strspn and memchr if
1551 missing.
1552 * lib/strchr.c: New.
1553 * src/reader.c (symbols_save): Use strchr.
1554
8adfa272
AD
15552001-12-27 Akim Demaille <akim@epita.fr>
1556
1557 * src/print.c, src/print_graph.c (escape): New.
1558 Use it to quote the TAGS outputs.
1559 * src/print_graph.c (print_state): Now errors are in red, and
1560 reductions in green.
1561 Prefer high to wide: output the state number on a line of its own.
1562
80dac38c
AD
15632001-12-27 Akim Demaille <akim@epita.fr>
1564
1565 * src/state.h, src/state.c (reductions_new): New.
1566 * src/LR0.c (set_state_table): Let all the states have a
1567 `reductions', even if reduced to 0.
1568 (save_reductions): Adjust.
1569 * src/lalr.c (initialize_LA, initialize_lookaheads): Adjust.
1570 * src/print.c (print_reductions, print_actions): Adjust.
1571 * src/output.c (action_row): Adjust.
1572
2cec70b9
AD
15732001-12-27 Akim Demaille <akim@epita.fr>
1574
1575 * src/state.h, src/state.c (errs_new, errs_dup): New.
1576 * src/LR0.c (set_state_table): Let all the states have an errs,
1577 even if reduced to 0.
1578 * src/print.c (print_errs, print_reductions): Adjust.
1579 * src/output.c (output_actions, action_row): Adjust.
1580 * src/conflicts.c (resolve_sr_conflict): Adjust.
1581
13ca549a
AD
15822001-12-27 Akim Demaille <akim@epita.fr>
1583
1584 * src/lalr.c (set_goto_map, initialize_F): Use SHIFT_SYMBOL.
1585
5092aba5
AD
15862001-12-27 Akim Demaille <akim@epita.fr>
1587
1588 * src/conflicts.c, src/conflicts.h (print_reductions): Move to...
1589 * src/print.c: here.
1590 (lookaheadset, shiftset): New, used as additional storage by
1591 print_reductions.
1592 (print_results): Adjust.
1593 (print_shifts, print_gotos, print_errs): New, extracted from...
1594 (print_actions): here.
1595 * src/print_graph.c (print_actions): Remove dead code.
1596
11e2beca
AD
15972001-12-27 Akim Demaille <akim@epita.fr>
1598
1599 * src/reader.c (copy_dollar, copy_at): Better checking of `n' in
1600 `$n' and `@n'.
1601
dac3c910
AD
16022001-12-27 Akim Demaille <akim@epita.fr>
1603
1604 * src/lalr.c (add_lookback_edge): Use state_t instead of ints.
1605 (build_relations): Adjust.
1606
d0b0fefa
AD
16072001-12-27 Akim Demaille <akim@epita.fr>
1608
1609 * src/lalr.c (set_goto_map): Remove a wrong but benign loop
1610 duplication.
1611
adc8c848
AD
16122001-12-27 Akim Demaille <akim@epita.fr>
1613
1614 * src/reader.c (packgram): Catch nitems overflows.
1615
14d293ac
AD
16162001-12-27 Akim Demaille <akim@epita.fr>
1617
1618 * src/files.c, src/files.h (guard_obstack): Remove.
1619 * src/output.c (output): Adjust.
1620 * src/reader.c (parse_braces): New, factoring...
1621 (copy_action, copy_guard): these two which are renamed as...
1622 (parse_action, parse_guard): these.
1623 As a voluntary consequence, using braces around guards is now
1624 mandatory.
1625
f499b062
AD
16262001-12-27 Akim Demaille <akim@epita.fr>
1627
1628 * src/gram.h (rule_t): `guard' and `guard_line' are new members.
1629 * src/reader.c (symbol_list): `guard' and `guard_line' are new
1630 members.
1631 (symbol_list_new): Adjust.
1632 (copy_action): action_line is the first line, not the last.
1633 (copy_guard): Just as for actions, store the `action' only, not
1634 the switch/case/break flesh.
1635 Don't parse the user action that might follow the guard, let...
1636 (readgram): do it, i.e., now, there can be an action after a
1637 guard.
1638 In other words the guard is just explicitly optional.
1639 (packgram): Adjust.
1640 * src/output.c (guards_output): New.
1641 (output_parser): Call it when needed.
1642 (output): Also free the guard and attrs obstacks.
1643 * src/files.c, src/files.h (obstack_save): Remove.
1644 (output_files): Remove.
1645 As a result, if one needs the former `.act' file, using an
1646 appropriate skeleton which requires actions and guards is now
1647 required.
1648 * src/main.c (main): Adjust.
1649 * tests/semantic.at: New.
1650 * tests/regression.at: Use `input.y' as input file name.
1651 Avoid 8+3 problems by requiring input.c when the test needs the
1652 parser.
1653
d945f5cd
AD
16542001-12-27 Akim Demaille <akim@epita.fr>
1655
1656 * src/reader.c (symbol_list_new): Be sure to initialize all the
1657 fields.
1658
d200e455
AD
16592001-12-27 Akim Demaille <akim@epita.fr>
1660
1661 All the hacks using a final pseudo state are now useless.
1662
1663 * src/LR0.c (set_state_table): state_table holds exactly nstates.
1664 * src/lalr.c (nLA): New.
1665 (initialize_LA, compute_lookaheads, initialize_lookaheads): Use it
1666 instead of lookaheadsp from the pseudo state (nstate + 1).
1667
f9507c28
AD
16682001-12-27 Akim Demaille <akim@epita.fr>
1669
1670 * src/output.c (action_row, token_actions): Use a state_t instead
1671 of a integer, and nlookaheads instead of the following state's
1672 lookaheadsp.
1673
065fbd27
AD
16742001-12-27 Akim Demaille <akim@epita.fr>
1675
1676 * src/conflicts.c (log_resolution, flush_shift)
1677 (resolve_sr_conflict, set_conflicts, solve_conflicts)
1678 (count_sr_conflicts, count_rr_conflicts, conflicts_output)
1679 (conflicts_print, print_reductions): Use a state_t instead of an
1680 integer when referring to a state.
1681 As much as possible, depend upon nlookaheads, instead of the
1682 `lookaheadsp' member of the following state (since lookaheads of
1683 successive states are successive, the difference between state n + 1
1684 and n served as the number of lookaheads for state n).
1685 * src/lalr.c (add_lookback_edge): Likewise.
1686 * src/print.c (print_core, print_actions, print_state)
1687 (print_results): Likewise.
1688 * src/print_graph.c (print_core, print_actions, print_state)
1689 (print_graph): Likewise.
1690 * src/conflicts.h: Adjust.
1691
1b177bd7
AD
16922001-12-27 Akim Demaille <akim@epita.fr>
1693
1694 * src/bison.hairy: Formatting/comment changes.
1695 ANSIfy.
1696 Remove `register' indications.
1697 Add plenty of `static'.
1698
7742ddeb
AD
16992001-12-27 Akim Demaille <akim@epita.fr>
1700
1701 * src/output.c (prepare): Drop the muscle `ntbase' which
1702 duplicates ntokens.
1703 * src/bison.simple: Formatting/comment changes.
1704 Use YYNTOKENS only, which is documented, but not YYNTBASE, which
1705 is an undocumented synonym.
1706
1fa14068
AD
17072001-12-22 Akim Demaille <akim@epita.fr>
1708
1709 * src/output.c (output_table_data): Change the prototype to use
1710 `int' for array ranges: some invocations do pass an int, not a
1711 short.
1712 Reported by Wayne Green.
1713
b9752825
AD
17142001-12-22 Akim Demaille <akim@epita.fr>
1715
1716 Some actions of web2c.y are improperly triggered.
1717 Reported by Mike Castle.
1718
1719 * src/lalr.c (traverse): s/F (i)[k] = F (j)[k]/F (j)[k] = F (i)[k]/.
1720 * tests/regression.at (Web2c): Rename as...
1721 (Web2c Report): this.
1722 (Web2c Actions): New.
1723
776209d6
AD
17242001-12-22 Akim Demaille <akim@epita.fr>
1725
1726 Reductions in web2c.y are improperly reported.
1727 Reported by Mike Castle.
1728
1729 * src/conflicts.c (print_reductions): Fix.
1730 * tests/regression.at (Web2c): New.
1731
275fc3ad
AD
17322001-12-18 Akim Demaille <akim@epita.fr>
1733
1734 Some host fail on `assert (!"foo")', which expands to
1735 ((!"foo") ? (void)0 : __assert("!"foo."", __FILE__, __LINE__))
1736 Reported by Nelson Beebee.
1737
1738 * src/output.c, src/vcg.c: Replace `assert (!"it succeeded")' with
1739 `#define it_succeeded 0' and `assert (it_succeeded)'.
1740
897668ee
MA
17412001-12-17 Marc Autret <autret_m@epita.fr>
1742
1743 * src/bison.simple: Don't hard code the skeleton line and filename.
1744 * src/output.c (output_parser): Rename 'line' as 'output_line'.
1745 New line counter 'skeleton_line' (skeleton-line muscle).
1746
ab3399e0
PE
17472001-12-17 Paul Eggert <eggert@twinsun.com>
1748
1749 * NEWS, doc/bison.texinfo, doc/bison.1, doc/bison.rnh: Document that
1750 YYDEBUG must be defined to a nonzero value.
1751
1752 * src/bison.simple (yytname): Do not assume that the user defines
1753 YYDEBUG to a properly parenthesized expression.
1754
3877f72b
AD
17552001-12-17 Akim Demaille <akim@epita.fr>
1756
1757 * src/state.h (state_t): Rename lookaheads as lookaheadsp.
1758 nlookaheads is a new member.
1759 Adjust all users.
1760 * src/lalr.h (nlookaheads): Remove this orphan declaration.
1761 * src/lalr.c (initialize_lookaheads): Set nlookaheads for each
1762 state.
776209d6 1763
331dbc1b
AD
17642001-12-17 Akim Demaille <akim@epita.fr>
1765
1766 * src/files.h, src/files.c (open_files, close_files): Remove.
1767 * src/main.c (main): Don't open/close files, nor invoke lex_free,
1768 let...
1769 * src/reader.c (reader): Do it.
776209d6 1770
be750e4c
AD
17712001-12-17 Akim Demaille <akim@epita.fr>
1772
1773 * src/conflicts.c (print_reductions): Formatting changes.
776209d6 1774
709ae8c6
AD
17752001-12-17 Akim Demaille <akim@epita.fr>
1776
1777 * src/conflicts.c (flush_shift): Also adjust lookaheadset.
1778 (flush_reduce): New.
1779 (resolve_sr_conflict): Adjust.
776209d6 1780
f87685c3
AD
17812001-12-17 Akim Demaille <akim@epita.fr>
1782
1783 * src/output.c (output_obstack): Be static and rename as...
1784 (format_obstack): this, to avoid any confusion with files.c's
1785 output_obstack.
1786 * src/reader.h (muscle_obstack): Move to...
1787 * src/output.h: here, since it's defined in output.c.
1788
837491d8
AD
17892001-12-17 Akim Demaille <akim@epita.fr>
1790
1791 * src/output.c (action_row, save_column, default_goto)
1792 (sort_actions, matching_state, pack_vector): Better variable
1793 locality.
1794
796d61fb
AD
17952001-12-17 Akim Demaille <akim@epita.fr>
1796
1797 * src/output.c: Various formatting changes.
776209d6 1798
64d15509
AD
17992001-12-17 Akim Demaille <akim@epita.fr>
1800
1801 * src/files.c (output_files): Free the output_obstack.
1802 * src/main.c (main): Call print and print_graph conditionally.
1803 * src/print.c (print): Work unconditionally.
1804 * src/print_graph.c (print_graph): Work unconditionally.
1805 * src/conflicts.c (log_resolution): Output only if verbose_flag.
1806
fbc8ecb7
MA
18072001-12-16 Marc Autret <autret_m@epita.fr>
1808
1809 * src/output.c (actions_output): Fix. When we use %no-lines,
1810 there is one less line per action.
1811
f0440388
MA
18122001-12-16 Marc Autret <autret_m@epita.fr>
1813
1814 * src/bison.simple: Remove a useless #line directive.
1815 s/#line %%line %%skeleton/#line %%line "%%parser-file-name"/'.
1816 * src/output.c (get_lines_number): New.
776209d6 1817 (output_parser): Adjust, now takes care about the lines of a
f0440388
MA
1818 output muscles.
1819 Fix line numbering.
1820 (actions_output): Computes the number of lines taken by actions.
1821 (output_master_parser): Insert new skeleton which is the name of
1822 the output parser file name.
1823
a79986b8
MA
18242001-12-15 Marc Autret <autret_m@epita.fr>
1825
1826 * src/bison.simple [YYERROR_VERBOSE]: Restore backward compatibility.
1827
4ec8e00f
MA
18282001-12-15 Marc Autret <autret_m@epita.fr>
1829
1830 * src/output.c (output_gram): Keep track of the hairy one.
1831
1a4648ff
AD
18322001-12-15 Akim Demaille <akim@epita.fr>
1833
1834 Make `make distcheck' work.
1835
1836 * lib/Makefile.am (INCLUDES): Add top_srcdir/intl, since hash uses
1837 system.h which uses libgettext.h.
1838
9c2c67e6
AD
18392001-12-15 Akim Demaille <akim@epita.fr>
1840
1841 * src/nullable.c (set_nullable): Useless rules must be skipped,
1842 otherwise, since we range over their symbols, we might look at a
1843 nonterminal which no longer ``exists'', i.e., it is not counted in
1844 `nvars', hence we overflow our arrays.
1845
93ede233
AD
18462001-12-15 Akim Demaille <akim@epita.fr>
1847
1848 The header can also be produced directly, without any obstack!
1849 Yahoo!
1850
1851 * src/files.c, src/files.h (defines_obstack): Remove.
1852 (compute_header_macro): Global.
1853 (defines_obstack_save): Remove.
1854 * src/reader.c (parse_union_decl): No longer output to
1855 defines_obstack: its content can be found in the `stype' muscle
1856 anyway.
1857 (output_token_translations): Merge into...
1858 (symbols_output): this.
1859 Rename as...
1860 (symbols_save): this.
1861 (reader): Adjust.
1862 * src/output.c (header_output): New.
1863 (output): Call it.
1864
2666f928
AD
18652001-12-15 Akim Demaille <akim@epita.fr>
1866
1867 * src/reader.c (parse_union_decl): Instead of handling two obstack
1868 simultaneously, use one to define the `stype' muscle, and use the
1869 value of the latter to fill defines_obstack.
1870 (copy_comment): Remove.
1871 (copy_comment2): Work for a single obstack.
1872 Rename as...
1873 (copy_comment): this.
1874
428046f8
AD
18752001-12-15 Akim Demaille <akim@epita.fr>
1876
1877 * src/lex.c, src/lex.h (xgetc): No longer static.
1878 * src/reader.c (parse_union_decl): Revamp.
1879
ea52d706
AD
18802001-12-15 Akim Demaille <akim@epita.fr>
1881
1882 Still making progress in separating Bison into (i) input, (ii)
1883 process, (iii) output: now we can directly output the parser file
1884 without using table_obstack at all.
1885
1886 * src/files.c, src/files.h (table_obstack): Bye bye.
1887 (parser_file_name): New.
1888 * src/files.c (compute_output_file_names): Compute it.
1889 * src/output.c (actions_output, output_parser)
1890 (output_master_parser): To a file instead of an obstack.
1891
3f96f4dc
AD
18922001-12-15 Akim Demaille <akim@epita.fr>
1893
1894 Attach actions to rules, instead of pre-outputting them to
1895 actions_obstack.
1896
1897 * src/gram.h (rule_t): action and action_line are new members.
1898 * src/reader.c (symbol_list): Likewise.
1899 (copy_action): Save the actions within the rule.
1900 (packgram): Save them in rule_table.
1901 * src/output.c (actions_output): New.
1902 (output_parser): Use it on `%%actions'.
1903 (output_rule_data): Don't free rule_table.
1904 (output): Do it.
1905 (prepare): Don't save the `action' muscle.
1906 * src/bison.simple: s/%%action/%%actions/.
1907
51576fb3
AD
19082001-12-15 Akim Demaille <akim@epita.fr>
1909
1910 * src/reader.c (copy_action): When --yacc, don't append a `;'
1911 to the user action: let it fail if lacking.
dee049eb 1912 Suggested by Arnold Robbins and Tom Tromey.
51576fb3 1913
2648a72d
AD
19142001-12-14 Akim Demaille <akim@epita.fr>
1915
1916 * src/lex.c (literalchar): Simply return the char you decoded, non
1917 longer mess around with obstacks and int pointers.
1918 Adjust all callers.
1919
92790e5b
AD
19202001-12-14 Akim Demaille <akim@epita.fr>
1921
1922 * src/lex.c (literalchar): Don't escape the special characters,
1923 just decode them, and keep them as char (before, eol was output as
1924 the 2 char string `\n' etc.).
1925 * src/output.c (output_rule_data): Use quotearg to output the
1926 token strings.
1927
927c1557
PE
19282001-12-13 Paul Eggert <eggert@twinsun.com>
1929
1930 * src/bison.simple (YYSIZE_T, YYSTACK_ALLOC, YYSTACK_FREE):
1931 Do not infringe on the global user namespace when using C++.
1932 (YYFPRINTF, YYSTDERR): New macros, needed for the above.
1933 All uses of `fprintf' and `stderr' changed.
1934
1935 * doc/bison.texinfo: Document YYFPRINTF, YYSTDERR.
1936
ed8e1f68
AD
19372001-12-13 Akim Demaille <akim@epita.fr>
1938
1939 The computation of nullable is broken: it doesn't handle empty
1940 RHS's properly.
1941
1942 * tests/torture.at (GNU AWK Grammar): New.
1943 * tests/sets.at (Nullable): New.
1944 * src/nullable.c (set_nullable): Instead of blindly looping over
1945 `ritems', loop over the rules, and then over their rhs's.
1946
1947 Work around Autotest bugs.
1948
1949 * src/warshall.c (bitmatrix_print): Don't use `+--+' as table
1950 frame, because Autotest understand lines starting with a `+' as
1951 traces from the shell. Then, they are not processed properly.
1952 Admittedly an Autotest bug, but we don't have time to wait for
1953 Autotest to catch up.
1954 * tests/regression.at (Broken Closure): Adjust to the new table
1955 frames.
1956 Move to...
1957 * tests/sets.at: here.
1958
cb581495
AD
19592001-12-13 Akim Demaille <akim@epita.fr>
1960
1961 * src/closure.c (closure): Use nrules instead of playing tricks
1962 with BITS_PER_WORD.
1963
2e729273
AD
19642001-12-13 Akim Demaille <akim@epita.fr>
1965
1966 * src/print.c (print_actions): Output the handling of `$' as the
1967 traces do: shifting the token EOF. Before EOF was treated as a
1968 nonterminal.
1969 * tests/regression.at: Adjust some tests.
1970 * src/print_graph.c (print_core): Complete the set of items via
1971 closure. The next-to-final and final states are still unsatisfying,
1972 but that's to be addressed elsewhere.
1973 No longer output the rule numbers, but do output the state number.
1974 A single loop for the shifts + gotos is enough, but picked a
1975 distinct color for each.
1976 (print_graph): Initialize and finalize closure.
1977
107f7dfb
AD
19782001-12-13 Akim Demaille <akim@epita.fr>
1979
1980 * src/reader.c (readgram): Remove dead code, an strip useless
1981 braces.
1982 (get_type): Remove, unused.
1983
9b53a24f
AD
19842001-12-12 Akim Demaille <akim@epita.fr>
1985
1986 * src/complain.h, src/complain.c: Remove error_one_per_line, rely
1987 on that of lib/error.c.
1988
dbfb6dcd
AD
19892001-12-12 Akim Demaille <akim@epita.fr>
1990
1991 Some hosts don't like `/' in includes.
1992
1993 * src/system.h: Include libgettext.h without qualifying the path.
1994 * src/Makefile.am (INCLUDES): Add $(top_srcdir)/intl, remove
1995 $(top_srcdir).
1996
c25fb648
MA
19972001-12-11 Marc Autret <autret_m@epita.fr>
1998
1999 * src/output.c (output_parser): Remove useless muscle.
2000
710ddc4f
MA
20012001-12-11 Marc Autret <autret_m@epita.fr>
2002
2003 * src/bison.simple: Remove #line just before %%epilogue. It
2004 is now handled in ...
2005 * src/reader.c (read_additionnal_code): Add the output of a
2006 #line for the epilogue.
2007
e83d80b8
MA
20082001-12-10 Marc Autret <autret_m@epita.fr>
2009
927c1557 2010 * src/reader.c (copy_definition): Re-use CPP-outed code which
e83d80b8
MA
2011 replace precedent remove.
2012 * src/bison.simple: Remove #line before %%prologue because
2013 %%input-line is wrong at this time.
2014
971d5158
MA
20152001-12-10 Marc Autret <autret_m@epita.fr>
2016
2017 * src/reader.c (symbols_output): Clean up.
927c1557 2018 * src/output.c (output_gram, output): Clean up.
971d5158 2019
5edafffd
AD
20202001-12-10 Akim Demaille <akim@epita.fr>
2021
2022 * src/lalr.c (initialize_lookaheads): New. Extracted from...
2023 * src/LR0.c (set_state_table): here.
2024 * src/lalr.c (lalr): Call it.
2025
0279f8e9
AD
20262001-12-10 Akim Demaille <akim@epita.fr>
2027
2028 * src/state.h (shifts): Remove the `number' member: shifts are
2029 attached to state, hence no longer need to be labelled with a
2030 state number.
2031
190c4f5f
AD
20322001-12-10 Akim Demaille <akim@epita.fr>
2033
2034 Now that states have a complete set of members, the linked list of
2035 shifts is useless: just fill directly the state's shifts member.
2036
2037 * src/state.h (shifts): Remove the `next' member.
2038 * src/LR0.c (first_state, last_state): Remove.
2039 Adjust the callers.
2040 (augment_automaton): Don't look for the shifts that must be added
2041 a shift on EOF: it is those of the state we looked for! But now,
2042 since shifts are attached, it is no longer needed to looking
2043 merely by its id: its number.
2044
2a73b93d
AD
20452001-12-10 Akim Demaille <akim@epita.fr>
2046
2047 * src/LR0.c (augment_automaton): Better variable locality.
2048 Remove an impossible branch: if there is a state corresponding to
2049 the start symbol being shifted, then there is shift for the start
2050 symbol from the initial state.
2051
74392f6a
AD
20522001-12-10 Akim Demaille <akim@epita.fr>
2053
2054 * src/LR0.c (augment_automaton): Call `insert_eof_shifting_state'
2055 only when appropriate: when insert_start_shifting_state' is not
2056 invoked.
2057 * tests/regression.at (Rule Line Numbers): Adjust.
2058
37c82725
AD
20592001-12-10 Akim Demaille <akim@epita.fr>
2060
2061 * src/LR0.c (augment_automaton): Now that all states have shifts,
2062 merge the two cases addition shifts to the initial state.
2063
6a164e0c
AD
20642001-12-10 Akim Demaille <akim@epita.fr>
2065
2066 * src/lalr.c (set_state_table): Move to...
2067 * src/LR0.c: here.
2068 * src/lalr.c (lalr): Don't call it...
2069 * src/LR0.c (generate_states): do it.
2070 * src/LR0.h (first_state): Remove, only the table is used.
2071
7215de24
AD
20722001-12-10 Akim Demaille <akim@epita.fr>
2073
2074 * src/LR0.h (first_shift, first_reduction): Remove.
2075 * src/lalr.c: Don't use first_shift: find shifts through the
2076 states.
2077
80e25d4d
AD
20782001-12-10 Akim Demaille <akim@epita.fr>
2079
2080 * src/LR0.c: Attach shifts to states as soon as they are
2081 computed.
2082 * src/lalr.c (set_state_table): Instead of assigning shifts to
2083 state, just assert that the mapping was properly done.
2084
0ab3728b
AD
20852001-12-10 Akim Demaille <akim@epita.fr>
2086
2087 * src/LR0.c (insert_start_shift): Rename as...
2088 (insert_start_shifting_state): this.
2089 (insert_eof_shifting_state, insert_accepting_state): New.
2090 (augment_automaton): Adjust.
2091 Better locality of the variables.
2092 When looking if the start_symbol is shifted from the initial
2093 state, using `while (... symbol != start_symbol ...)' sounds
2094 better than `while (... symbol < start_symbol ...)': If fail
2095 to see how the order between symbols could be relevant!
2096
78af9bbc
AD
20972001-12-10 Akim Demaille <akim@epita.fr>
2098
2099 * src/getargs.h: Don't declare `spec_name_prefix' and
2100 `spec_file_prefix', declared by src/files.h.
2101 * src/files.c, src/files.h: Default for spec_name_prefix is "yy".
2102 * src/muscle_tab.c (muscle_init): Default prefix to NULL.
2103 * src/output.c (prepare): Adjust.
2104 * src/reader.c (symbols_output): Likewise.
2105 * src/vmsgetargs.c: Vaguely adjust, but who cares?
2106
bdef2a41
AD
21072001-12-10 Akim Demaille <akim@epita.fr>
2108
2109 * src/muscle_tab.c (muscle_init): NULL is a better default than
2110 `"0"'.
2111
3735969c
AD
21122001-12-10 Akim Demaille <akim@epita.fr>
2113
2114 * src/reader.c (reader): Calling symbols_output once is enough.
2115
49701457
AD
21162001-12-10 Akim Demaille <akim@epita.fr>
2117
2118 Now that states have a complete set of members, the linked list of
2119 reductions is useless: just fill directly the state's reductions
2120 member.
2121
2122 * src/state.h (struct reductions): Remove member `number' and
2123 `next'.
2124 * src/LR0.c (first_reduction, last_reduction): Remove.
2125 (save_reductions): Don't link the new reductions, store them in
2126 this_state.
2127 * src/lalr.c (set_state_table): No need to attach reductions to
2128 states, it's already done.
2129 * src/output.c (output_actions): No longer free the shifts, then
2130 the reductions, then the states: free all the states and their
2131 members.
2132
0edad749
AD
21332001-12-10 Akim Demaille <akim@epita.fr>
2134
2135 * src/options.c (OPTN, DRTV, BOTH): New.
2136 (option_table): Use them.
2137
0edad749
AD
2138 * src/muscle_tab.c: Don't include xalloc.h and string.h: that's
2139 the job of system.h.
2140 * src/options.c: Don't include stdio.h and xalloc.h for the same
2141 reasons.
2142
5449dd0f
AD
21432001-12-10 Akim Demaille <akim@epita.fr>
2144
2145 * src/output.c (output, prepare): Make sure the values of the
2146 muscles `action' and `prologue' are 0-terminated.
2147
a870c567
AD
21482001-12-10 Akim Demaille <akim@epita.fr>
2149
2150 Clean up GCC warnings.
2151
2152 * src/reader.c (copy_action): `buf' is not used.
2153 (parse_skel_decl): Be static.
2154 * src/muscle_tab.c (mhash1, mhash2, muscle_insert): Preserve `const'.
2155 * src/options.h (create_long_option_table): Have a real prototype.
2156 * lib/hash.c, lib/hash.h (hash_insert, hash_insert_at, hash_delete)
2157 (hash_delete_at): Return const void *.
2158 Adjust casts to preserve the const.
2159
80df8768
AD
21602001-12-10 Akim Demaille <akim@epita.fr>
2161
2162 * configure.in: Require 2.52g.
2163 M4 is not needed, but AUTOM4TE is.
2164 * m4/m4.m4: Remove.
2165 * tests/Makefile.am: Adjust.
2166
f693ad14
AD
21672001-12-10 Akim Demaille <akim@epita.fr>
2168
2169 One structure for states is enough, even though theoretically
2170 there are LR(0) states and LALR(1) states.
2171
2172 * src/lalr.h (state_t): Remove.
2173 (state_table): Be state_t **, not state_t *.
2174 * src/state.h (core, CORE_ALLOC): Rename as...
2175 (state_t, STATE_ALLOC): this.
2176 Add the LALR(1) members: shifts, reductions, errs.
2177 * src/LR0.c (state_table): Rename as...
2178 (state_hash): this, to avoid name clashes with the global
2179 `state_table'.
2180 * src/print_graph.c, src/LR0.c, src/LR0.h, src/conflicts.c
2181 * src/lalr.c, src/lalr.h, src/output.c, src/print.c: Adjust.
2182
74ffbcb6
AD
21832001-12-10 Akim Demaille <akim@epita.fr>
2184
2185 Bison dumps core on bash.y.
2186 Reported by Pascal Bart.
2187
2188 * src/warshall.c (bitmatrix_print): New.
2189 (TC): Use it.
2190 When performing a transitive closure R(i, j) && R(j, k) => R(i, k),
2191 j must be the outer loop.
2192 * tests/regression.at (Broken Closure): New.
2193
07708e19
AD
21942001-12-05 Akim Demaille <akim@epita.fr>
2195
2196 * tests/atlocal.in (CPPFLAGS): Do not leave a space between -I and
2197 its argument.
2198