]> git.saurik.com Git - bison.git/blame - ChangeLog
Kill GCC warnings.
[bison.git] / ChangeLog
CommitLineData
0c2d3f4c
AD
12002-05-07 Akim Demaille <akim@epita.fr>
2
3 Kill GCC warnings.
4
5 * src/reduce.c (nonterminals_reduce): Don't loop over RITEM: loop
6 over the RHS of each rule.
7 * src/gram.h, src/gram.c (nritems): Is `unsigned int', not int.
8 * src/state.h (state_t): Member `nitems' is unsigned short.
9 * src/LR0.c (get_state): Adjust.
10 * src/reader.c (packgram): Likewise.
11 * src/output.c (GENERATE_MUSCLE_INSERT_TABLE): `max' is of type
12 `Type'.
13 (muscle_insert_int_table): Remove, unused.
14 (prepare_rules): Remove `max'.
15
1565b720
AD
162002-05-06 Akim Demaille <akim@epita.fr>
17
18 * src/closure.c (print_firsts): Display of the symbol tags.
19 (bitmatrix_print): Move to...
20 * lib/bitsetv-print.h, lib/bitsetv-print.c (bitsetv_matrix_dump):
21 here.
22 * tests/sets.at (Nullable, Broken Closure, Firsts): Adjust.
23
cfaee611
AD
242002-05-06 Akim Demaille <akim@epita.fr>
25
26 * src/muscle_tab.c (muscle_m4_output): Must return TRUE for
27 hash_do_for_each.
28
458be8e0
AD
292002-05-06 Akim Demaille <akim@epita.fr>
30
31 * src/LR0.c (new_state, get_state): Instead of using the global
32 `kernel_size' and `kernel_base', have two new arguments:
33 `core_size' and `core'.
34 Adjust callers.
35
a900a624
AD
362002-05-06 Akim Demaille <akim@epita.fr>
37
38 * src/reader.c (packgram): No longer end `ritem' with a 0
39 sentinel: it is not used.
40
d4e7d3a1
AD
412002-05-05 Akim Demaille <akim@epita.fr>
42
43 New experimental feature: display the lookaheads in the report and
44 graph.
45
46 * src/print (print_core): When --trace-flag, display the rules
47 lookaheads.
48 * src/print_graph.c (print_core): Likewise.
49 Swap the arguments.
50 Adjust caller.
51
39ceb25b
AD
522002-05-05 Akim Demaille <akim@epita.fr>
53
54 * tests/torture.at (Many lookaheads): New test.
55
5372019f
AD
562002-05-05 Akim Demaille <akim@epita.fr>
57
58 * src/output.c (GENERATE_OUTPUT_TABLE): Replace with...
59 (GENERATE_MUSCLE_INSERT_TABLE): this.
60 (output_int_table, output_unsigned_int_table, output_short_table)
61 (output_token_number_table, output_item_number_table): Replace with...
62 (muscle_insert_int_table, muscle_insert_unsigned_int_table)
63 (muscle_insert_short_table, muscle_insert_token_number_table)
64 (muscle_insert_item_number_table): these.
65 Adjust all callers.
66 (prepare_tokens): Don't free `translations', since...
67 * src/reader.h, src/reader.c (grammar_free): do it.
68 Move to...
69 * src/gram.h, src/gram.c (grammar_free): here.
70 * data/bison.simple, data/bison.c++: b4_token_number_max is now
71 b4_translate_max.
72
5df5f6d5
AD
732002-05-05 Akim Demaille <akim@epita.fr>
74
75 * src/output.c (output_unsigned_int_table): New.
76 (prepare_rules): `i' is unsigned.
77 `prhs', `rline', `r2' are unsigned int.
78 Rename muscle `rhs_number_max' as `rhs_max'.
79 Output muscles `prhs_max', `rline_max', and `r2_max'.
80 Free rline and r1.
81 * data/bison.simple, data/bison.c++: Adjust to use these muscles
82 to compute types instead of constant types.
83 * tests/regression.at (Web2c Actions): Adjust.
84
b87f8b21
AD
852002-05-04 Akim Demaille <akim@epita.fr>
86
87 * src/symtab.h (SALIAS, SUNDEF): Rename as...
88 (USER_NUMBER_ALIAS, USER_NUMBER_UNDEFINED): these.
89 Adjust dependencies.
90 * src/output.c (token_definitions_output): Be sure not to output a
91 `#define 'a'' when fed with `%token 'a' "a"'.
92 * tests/regression.at (Token definitions): New.
93
8bb936e4
PE
942002-05-03 Paul Eggert <eggert@twinsun.com>
95
96 * data/bison.simple (b4_token_defines): Also define YYTOKENTYPE
97 for K&R C.
98
992002-05-03 gettextize <bug-gnu-gettext@gnu.org>
100
101 * Makefile.am (SUBDIRS): Remove intl.
102 (EXTRA_DIST): Add config/config.rpath.
103
53c71a12
AD
1042002-05-03 Akim Demaille <akim@epita.fr>
105
106 * data/bison.simple (m4_if): Don't output empty enums.
107 And actually, output valid enum definitions :(.
108
289dd0cf
AD
1092002-05-03 Akim Demaille <akim@epita.fr>
110
111 * configure.bat: Remove, completely obsolete.
112 * Makefile.am (EXTRA_DIST): Adjust.
113 Don't distribute config.rpath...
114 * config/Makefile.am (EXTRA_DIST): Do it.
115
db85e524
AD
1162002-05-03 Akim Demaille <akim@epita.fr>
117
118 * configure.in (GETTEXT_VERSION): New.
119 Suggested by Bruno Haible for the forthcoming Gettext 0.10.3.
120
83ccf991
AD
1212002-05-03 Akim Demaille <akim@epita.fr>
122
123 * data/bison.simple (b4_token_enum): New.
124 (b4_token_defines): Use it to output tokens both as #define and
125 enums.
126 Suggested by Paul Eggert.
127 * src/output.c (token_definitions_output): Don't output spurious
128 white spaces.
129
1f418995
AD
1302002-05-03 Akim Demaille <akim@epita.fr>
131
132 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
133
45119f04
RA
1342002-05-02 Robert Anisko <robert@lrde.epita.fr>
135
136 * data/bison.c++: Adapt expansion of $s and @s to the C++ parser.
137 Update the stack class, give a try to deque as the default container.
138
b2d52318
AD
1392002-05-02 Akim Demaille <akim@epita.fr>
140
141 * data/bison.simple (yyparse): Do not implement @$ = @1.
142 (YYLLOC_DEFAULT): Adjust to do it.
143 * doc/bison.texinfo (Location Default Action): Fix.
144
3a8b4109
AD
1452002-05-02 Akim Demaille <akim@epita.fr>
146
147 * src/reader.c (parse_braces): Merge into...
148 (parse_action): this.
149
84614e13
AD
1502002-05-02 Akim Demaille <akim@epita.fr>
151
152 * configure.in (ALL_LINGUAS): Remove.
153 * po/LINGUAS, hr.po: New.
154
fdbcd8e2
AD
1552002-05-02 Akim Demaille <akim@epita.fr>
156
157 Remove the so called hairy (semantic) parsers.
158
159 * src/system.h (EXT_GUARD_C, EXT_STYPE_H): Remove.
160 * src/gram.h, src/gram.c (semantic_parser): Remove.
161 (rule_t): Remove the guard and guard_line members.
162 * src/lex.h (token_t): remove tok_guard.
163 * src/options.c (option_table): Remove %guard and %semantic_parser
164 support.
165 * src/output.c, src/output.h (guards_output): Remove.
166 (prepare): Adjust.
167 (token_definitions_output): Don't output the `T'
168 tokens (???).
169 (output_skeleton): Don't output the guards.
170 * src/files.c, src/files.c (attrsfile): Remove.
171 * src/reader.c (symbol_list): Remove the guard and guard_line
172 members.
173 Adjust dependencies.
174 (parse_guard): Remove.
175 * data/bison.hairy: Remove.
176 * doc/bison.texinfo (Environment Variables): Remove occurrences of
177 BISON_HAIRY.
178
82b6cb3f
AD
1792002-05-02 Akim Demaille <akim@epita.fr>
180
181 * src/reader.c (copy_at, copy_dollarm parse_braces, parse_action)
182 (parse_guard): Rename the formal argument `stack_offset' as
183 `rule_length', which is more readable.
184 Adjust callers.
185 (copy_at, copy_dollar): Instead of outputting the hard coded
186 values of $$, $n and so forth, output invocation to b4_lhs_value,
187 b4_lhs_location, b4_rhs_value, and b4_rhs_location.
900c877b
AD
188 Note: this patch partially drops `semantic-parser' support: it
189 always does `rule_length - n', where semantic parsers ought to
190 always use `-n'.
82b6cb3f
AD
191 * data/bison.simple, data/bison.c++ (b4_lhs_value)
192 (b4_lhs_location, b4_rhs_value, and b4_rhs_location: New.
193
6cbfbcc5
AD
1942002-05-02 Akim Demaille <akim@epita.fr>
195
196 * configure.in (AC_INIT): Bump to 1.49b.
197 (AM_INIT_AUTOMAKE): Short invocation.
198
b8548114
AD
1992002-05-02 Akim Demaille <akim@epita.fr>
200
201 Version 1.49a.
202
c20cd1fa
AD
2032002-05-01 Akim Demaille <akim@epita.fr>
204
205 * src/skeleton.h: Remove.
206
8a9566d4
AD
2072002-05-01 Akim Demaille <akim@epita.fr>
208
209 * src/skeleton.h: Fix the #endif.
210 Reported by Magnus Fromreide.
211
8c6d399a
PE
2122002-04-26 Paul Eggert <eggert@twinsun.com>
213
214 * data/bison.simple (YYSTYPE_IS_TRIVIAL, YYLTYPE_IS_TRIVIAL):
215 Define if we define YYSTYPE and YYLTYPE, respectively.
b756bb75 216 (YYCOPY): Fix [] quoting problem in the non-GCC case.
8a9566d4 217
2b7ed18a
RA
2182002-04-25 Robert Anisko <robert@lrde.epita.fr>
219
220 * src/scan-skel.l: Postprocess quadrigraphs.
221
222 * src/reader.c (copy_character): New function, used to output
223 single characters while replacing `[' and `]' with quadrigraphs, to
224 avoid troubles with M4 quotes.
225 (copy_comment): Output characters with copy_character.
226 (read_additionnal_code): Likewise.
227 (copy_string2): Likewise.
228 (copy_definition): Likewise.
229
230 * tests/calc.at: Exercise M4 quoting.
231
34a89c50
AD
2322002-04-25 Akim Demaille <akim@epita.fr>
233
234 * tests/sets.at (AT_EXTRACT_SETS): Sed portability issue: no space
235 between `!' and the command.
236 Reported by Paul Eggert.
237
0dd1580a
RA
2382002-04-24 Robert Anisko <robert@lrde.epita.fr>
239
240 * tests/calc.at: Exercise prologue splitting.
241
242 * data/bison.simple, data/bison.c++: Use `b4_pre_prologue' and
243 `b4_post_prologue' instead of `b4_prologue'.
244
245 * src/output.c (prepare): Add the `pre_prologue' and `post_prologue'
246 muscles.
247 (output): Free pre_prologue_obstack and post_prologue_obstack.
248 * src/files.h, src/files.c (attrs_obstack): Remove.
249 (pre_prologue_obstack, post_prologue_obstack): New.
250 * src/reader.c (copy_definition): Add a parameter to specify the
251 obstack to fill, instead of using attrs_obstack unconditionally.
252 (read_declarations): Pass pre_prologue_obstack to copy_definition if
253 `%union' has not yet been seen, pass post_prologue_obstack otherwise.
254
83c1796f
PE
2552002-04-23 Paul Eggert <eggert@twinsun.com>
256
257 * data/bison.simple: Remove unnecessary commentary and white
258 space differences from 1_29-branch.
259 Depend on YYERROR_VERBOSE, not defined (YYERROR_VERBOSE).
260
261 (union yyalloc, YYSTACK_GAP_MAX, YYSTACK_BYTES, YYCOPY,
262 YYSTACK_RELOCATE): Do not define if yyoverflow is defined, or
263 if this is a C++ parser and YYSTYPE or YYLTYPE has nontrivial
264 constructors or destructors.
265
266 (yyparse) [! defined YYSTACK_RELOCATE]: Do not relocate the stack.
267
1207eeac
AD
2682002-04-23 Akim Demaille <akim@epita.fr>
269
270 * tests/sets.at (AT_EXTRACT_SETS): Don't use 8 char long sed labels.
271 * tests/synclines.at (AT_TEST_SYNCLINE): Be robust to GCC's
272 location with columns.
273 * tests/conflicts.at (%nonassoc and eof): Don't use `error.h'.
274 All reported by Paul Eggert.
275
78ab8f67
AD
2762002-04-22 Akim Demaille <akim@epita.fr>
277
278 * src/reduce.c (dump_grammar): Move to...
279 * src/gram.h, src/gram.c (grammar_dump): here.
280 Be sure to separate long item numbers.
281 Don't read the members of a rule's prec if its nil.
282
133c20e2
AD
2832002-04-22 Akim Demaille <akim@epita.fr>
284
285 * src/output.c (table_size, table_grow): New.
286 (MAXTABLE): Remove, replace uses with table_size.
287 (pack_vector): Instead of dying when the table is too big, grow it.
288
9515e8a7
AD
2892002-04-22 Akim Demaille <akim@epita.fr>
290
291 * data/bison.simple (yyr1): Its type is that of a token number.
292 * data/bison.c++ (r1_): Likewise.
293 * tests/regression.at (Web2c Actions): Adjust.
294
23c5a174
AD
2952002-04-22 Akim Demaille <akim@epita.fr>
296
297 * src/reader.c (token_translations_init): 256 is now the default
298 value for the error token, i.e., it will be assigned another
299 number if the user assigned 256 to one of her tokens.
300 (reader): Don't force 256 to error.
301 * doc/bison.texinfo (Symbols): Adjust.
302 * tests/torture.at (AT_DATA_HORIZONTAL_GRAMMAR)
303 (AT_DATA_TRIANGULAR_GRAMMAR): Number the tokens as 1, 2, 3
304 etc. instead of 10, 20, 30 (which was used to `jump' over error
305 (256) and undefined (2)).
306
5fbb0954
AD
3072002-04-22 Akim Demaille <akim@epita.fr>
308
309 Propagate more token_number_t.
310
311 * src/gram.h (token_number_as_item_number)
312 (item_number_as_token_number): New.
313 * src/output.c (GENERATE_OUTPUT_TABLE): New.
314 Use it to create output_item_number_table and
315 output_token_number_table.
316 * src/LR0.c, src/derives.c, src/gram.c, src/gram.h, src/lalr.c,
317 * src/lex.c, src/nullable.c, src/output.c, src/print.c,
318 * src/print_graph.c, src/reader.c, src/reduce.c, src/state.h,
319 * src/symtab.c, src/symtab.h: Use token_number_t instead of shorts.
320
4f940944
AD
3212002-04-22 Akim Demaille <akim@epita.fr>
322
323 * src/output.h, src/output.c (get_lines_number): Remove.
324
3ded9a63
AD
3252002-04-19 Akim Demaille <akim@epita.fr>
326
327 * doc/bison.texinfo (Actions): Make clear that `|' is not the same
328 as Lex/Flex'.
329 (Debugging): More details about enabling the debugging features.
330 (Table of Symbols): Describe $$, $n, @$, and @n.
331 Suggested by Tim Josling.
332
e0c471a9
AD
3332002-04-19 Akim Demaille <akim@epita.fr>
334
335 * doc/bison.texinfo: Remove the uses of the obsolete @refill.
336
fecc10cd
AD
3372002-04-10 Akim Demaille <akim@epita.fr>
338
339 * src/system.h: Rely on HAVE_LIMITS_H.
340 Suggested by Paul Eggert.
341
51dec47b
AD
3422002-04-09 Akim Demaille <akim@epita.fr>
343
344 * tests/calc.at (_AT_CHECK_CALC_ERROR): Receive as argument the
345 full stderr, and strip it according to the bison options, instead
346 of composing the error message from different bits.
347 This makes it easier to check for several error messages.
348 Adjust all the invocations.
349 Add an invocation exercising the error token.
350 Add an invocation demonstrating a stupid error message.
351 (_AT_DATA_CALC_Y): Follow the GCS: initial column is 1, not 0.
352 Adjust the tests.
353 Error message are for stderr, not stdout.
354
007a50a4
AD
3552002-04-09 Akim Demaille <akim@epita.fr>
356
357 * src/gram.h, src/gram.c (error_token_number): Remove, use
358 errtoken->number.
359 * src/reader.c (reader): Don't specify the user token number (2)
360 for $undefined, as it uselessly prevents using it.
361 * src/gram.h (token_number_t): Move to...
362 * src/symtab.h: here.
363 (state_t.number): Is a token_number_t.
364 * src/print.c, src/reader.c: Use undeftoken->number instead of
365 hard coded 2.
366 (Even though this 2 is not the same as above: the number of the
367 undeftoken remains being 2, it is its user token number which
368 might not be 2).
369 * src/output.c (prepare_tokens): Rename the `maxtok' muscle with
370 `user_token_number_max'.
371 Output `undef_token_number'.
372 * data/bison.simple, data/bison.c++: Use them.
373 Be sure to map invalid yylex return values to
374 `undef_token_number'. This saves us from gratuitous SEGV.
375
376 * tests/conflicts.at (Solved SR Conflicts)
377 (Unresolved SR Conflicts): Adjust.
378 * tests/regression.at (Web2c Actions): Adjust.
379
06446ccf
AD
3802002-04-08 Akim Demaille <akim@epita.fr>
381
382 * data/bison.c++: s/b4_item_number_max/b4_rhs_number_max/.
383 Adding #line.
384 Remove the duplicate `typedefs'.
385 (RhsNumberType): Fix the declaration and various other typos.
386 Use __ofile__.
387 * data/bison.simple: Use __ofile__.
388 * src/scan-skel.l: Handle __ofile__.
389
62a3e4f0
AD
3902002-04-08 Akim Demaille <akim@epita.fr>
391
392 * src/gram.h (item_number_t): New, the type of item numbers in
393 RITEM. Note that it must be able to code symbol numbers as
394 positive number, and the negation of rule numbers as negative
395 numbers.
396 Adjust all dependencies (pretty many).
397 * src/reduce.c (rule): Remove this `short *' pointer: use
398 item_number_t.
399 * src/system.h (MINSHORT, MAXSHORT): Remove.
400 Include `limits.h'.
401 Adjust dependencies to using SHRT_MAX and SHRT_MIN.
402 (shortcpy): Remove.
403 (MAXTABLE): Move to...
404 * src/output.c (MAXTABLE): here.
405 (prepare_rules): Use output_int_table to output rhs.
406 * data/bison.simple, data/bison.c++: Adjust.
407 * tests/torture.at (Big triangle): Move the limit from 254 to
408 500.
409 * tests/regression.at (Web2c Actions): Ajust.
410
411 Trying with bigger grammars shows various phenomena: at 3000 (28Mb
412 of grammar file) bison is killed by my system, at 2000 (12Mb) bison
413 passes, but produces negative #line number, once fixed, GCC is
414 killed while compiling 14Mb, at 1500 (6.7 Mb of grammar, 8.2Mb of
415 C), it passes.
416 * src/state.h (state_h): Code input lines on ints, not shorts.
417
bb88b0fc
AD
4182002-04-08 Akim Demaille <akim@epita.fr>
419
420 * src/reduce.c (reduce_grammar): First reduce the nonterminals,
421 and then the grammar.
422
9a636f47
AD
4232002-04-08 Akim Demaille <akim@epita.fr>
424
425 * src/system.h: No longer using strndup.
426
680e8701
AD
4272002-04-07 Akim Demaille <akim@epita.fr>
428
429 * src/muscle_tab.h (MUSCLE_INSERT_LONG_INT): New.
430 * src/output.c (output_table_data): Return the longest number.
431 (prepare_tokens): Output `token_number_max').
432 * data/bison.simple, data/bison.c++ (b4_sint_type, b4_uint_type):
433 New.
434 Use them to define yy_token_number_type/TokenNumberType.
435 Use this type for yytranslate.
436 * tests/torture.at (Big triangle): Push the limit from 124 to
437 253.
438 * tests/regression.at (Web2c Actions): Adjust.
439
817e9f41
AD
4402002-04-07 Akim Demaille <akim@epita.fr>
441
442 * tests/torture.at (Big triangle): New.
443 (GNU AWK Grammar, GNU Cim Grammar): Move to...
444 * tests/existing.at: here.
445
5123689b
AD
4462002-04-07 Akim Demaille <akim@epita.fr>
447
448 * src/gram.h, src/gram.c (nitems): Remove, it is an alias of
449 nritems.
450 Adjust dependencies.
451
f3849179
AD
4522002-04-07 Akim Demaille <akim@epita.fr>
453
454 * src/reader.c: Normalize increments to prefix form.
455
bd02036a
AD
4562002-04-07 Akim Demaille <akim@epita.fr>
457
458 * src/reader.c, symtab.c: Remove debugging code.
459
db8837cb
AD
4602002-04-07 Akim Demaille <akim@epita.fr>
461
462 Rename all the `bucket's as `symbol_t'.
463
464 * src/gram.c, src/gram.h, src/lex.c, src/lex.h, src/output.c,
465 * src/reader.c, src/reader.h, src/reduce.c, src/state.h,
466 * src/symtab.c, src/symtab.h (bucket): Rename as...
467 (symbol_t): this.
468 (symbol_list_new, bucket_check_defined, bucket_make_alias)
469 (bucket_check_alias_consistence, bucket_pack, bucket_translation)
470 (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
471 (buckets_new, buckets_free, buckets_do): Rename as...
472 (symbol_list_new, symbol_check_defined, symbol_make_alias)
473 (symbol_check_alias_consistence, symbol_pack, symbol_translation)
474 (symbol_new, symbol_free, hash_compare_symbol_t, hash_symbol_t)
475 (symbols_new, symbols_free, symbols_do): these.
476
72a23c97
AD
4772002-04-07 Akim Demaille <akim@epita.fr>
478
479 Use lib/hash for the symbol table.
480
481 * src/gram.c (ntokens): Initialize to 1, to reserve a slot for
482 EOF.
483 * src/lex.c (lex): Set the `number' member of new terminals.
484 * src/reader.c (bucket_check_defined, bucket_make_alias)
485 (bucket_check_alias_consistence, bucket_translation): New.
486 (reader, grammar_free, readgram, token_translations_init)
487 (packsymbols): Adjust.
488 (reader): Number the predefined tokens.
489 * src/reduce.c (inaccessable_symbols): Just use hard coded numbers
490 for predefined tokens.
491 * src/symtab.h (bucket): Remove all the hash table related
492 members.
493 * src/symtab.c (symtab): Replace by...
494 (bucket_table): this.
495 (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
496 (buckets_new, buckets_do): New.
497
280a38c3
AD
4982002-04-07 Akim Demaille <akim@epita.fr>
499
500 * src/gram.c (nitems, nrules, nsyms, ntokens, nvars, nritems)
501 (start_symbol, max_user_token_number, semantic_parser)
502 (error_token_number): Initialize.
503 * src/reader.c (grammar, start_flag, startval, typed, lastprec):
504 Initialize.
505 (reader): Don't.
506 (errtoken, eoftoken, undeftoken, axiom): Extern.
507
03b31c0c
AD
5082002-04-07 Akim Demaille <akim@epita.fr>
509
510 * src/gram.h (rule_s): prec and precsym are now pointers
511 to the bucket giving the priority/associativity.
512 Member `associativity' removed: useless.
513 * src/reduce.c, src/conflicts.c: Adjust.
514
8b3df748
AD
5152002-04-07 Akim Demaille <akim@epita.fr>
516
517 * src/lalr.c, src/LR0.c, src/closure.c, src/gram.c, src/reduce.c:
518 Properly escape the symbols' TAG when outputting them.
519
e601aa1d
AD
5202002-04-07 Akim Demaille <akim@epita.fr>
521
522 * src/lalr.h (LA): Is a bitsetv, not bitset*.
523
b0299a2e
AD
5242002-04-07 Akim Demaille <akim@epita.fr>
525
526 * src/lalr.h, src/lalr.c (LAruleno): Replace with...
527 (LArule): this, which is an array to rule_t*.
528 * src/print.c, src/conflicts.c: Adjust.
529
d7e1f00c
AD
5302002-04-07 Akim Demaille <akim@epita.fr>
531
532 * src/gram.h (rule_t): Rename `number' as `user_number'.
533 `number' is a new member.
534 Adjust dependencies.
535 * src/reduce.c (reduce_grammar_tables): Renumber rule_t.number.
536
cc9305dd
AD
5372002-04-07 Akim Demaille <akim@epita.fr>
538
539 As a result of the previous patch, it is no longer needed
540 to reorder ritem itself.
541
542 * src/reduce.c (reduce_grammar_tables): Don't sort RITEM.
543
b0940840
AD
5442002-04-07 Akim Demaille <akim@epita.fr>
545
546 Be sure never to walk through RITEMS, but use only data related to
547 the rules themselves. RITEMS should be banished.
548
549 * src/output.c (output_token_translations): Rename as...
550 (prepare_tokens): this.
551 In addition to `translate', prepare the muscles `tname' and
552 `toknum', which were handled by...
553 (output_rule_data): this.
554 Remove, and move the remainder of its outputs into...
555 (prepare_rules): this new routines, which also merges content from
556 (output_gram): this.
557 (prepare_rules): Be sure never to walk through RITEMS.
558 (output_stos): Rename as...
559 (prepare_stos): this.
560 (output): Always invoke prepare_states, after all, just don't use it
561 in the output if you don't need it.
562
643a5994
AD
5632002-04-07 Akim Demaille <akim@epita.fr>
564
565 * src/LR0.c (new_state): Display `nstates' as the name of the
566 newly created state.
567 Adjust to initialize first_state and last_state if needed.
568 Be sure to distinguish the initial from the final state.
569 (new_states): Create the itemset of the initial state, and use
570 new_state.
571 * src/closure.c (closure): Now that the initial state has its
572 items properly set, there is no need for a special case when
573 creating `ruleset'.
574
575 As a result, now the rule 0, reducing to $axiom, is visible in the
576 outputs. Adjust the test suite.
577
578 * tests/conflicts.at (Solved SR Conflicts)
579 (Unresolved SR Conflicts): Adjust.
580 * tests/regression.at (Web2c Report, Rule Line Numbers): Idem.
581 * tests/conflicts.at (S/R in initial): New.
582
b4c4ccc2
AD
5832002-04-07 Akim Demaille <akim@epita.fr>
584
585 * src/LR0.c (allocate_itemsets): Don't loop over ritem: loop over
586 the RHS of the rules.
587 * src/output.c (output_gram): Likewise.
588
bba97eb2
AD
5892002-04-07 Akim Demaille <akim@epita.fr>
590
591 * src/gram.h (rule_t): `lhs' is now a pointer to the symbol's
592 bucket.
593 Adjust all dependencies.
594 * src/reduce.c (nonterminals_reduce): Don't forget to renumber the
595 `number' of the buckets too.
596 * src/gram.h: Include `symtab.h'.
597 (associativity): Move to...
598 * src/symtab.h: here.
599 No longer include `gram.h'.
600
c3b407f4
AD
6012002-04-07 Akim Demaille <akim@epita.fr>
602
603 * src/gram.h, src/gram.c (rules_rhs_length): New.
604 (ritem_longest_rhs): Use it.
605 * src/gram.h (rule_t): `number' is a new member.
606 * src/reader.c (packgram): Set it.
607 * src/reduce.c (reduce_grammar_tables): Move the useless rules at
608 the end of `rules', and count them out of `nrules'.
609 (reduce_output, dump_grammar): Adjust.
610 * src/print.c (print_grammar): It is no longer needed to check for
611 the usefulness of a rule, as useless rules are beyond `nrules + 1'.
612 * tests/reduce.at (Reduced Automaton): New test.
613
11652ab3
AD
6142002-04-07 Akim Demaille <akim@epita.fr>
615
616 * src/reduce.c (inaccessable_symbols): Fix a buglet: because of a
617 lacking `+ 1' to nrules, Bison reported as useless a token if it
618 was used solely to set the precedence of the last rule...
619
26b23c1a
AD
6202002-04-07 Akim Demaille <akim@epita.fr>
621
622 * data/bison.c++, data/bison.simple: Don't output the current file
623 name in #line, to avoid useless diffs between two identical
624 outputs under different names.
625
18bcecb0
AD
6262002-04-07 Akim Demaille <akim@epita.fr>
627
628 * src/closure.c, src/print.c, src/reader.c, src/reduce.c:
629 Normalize loops to using `< nrules + 1', not `<= nrules'.
630
fa770c86
AD
6312002-04-07 Akim Demaille <akim@epita.fr>
632
633 * TODO: Update.
634
d9b739c3
AD
6352002-04-07 Akim Demaille <akim@epita.fr>
636
637 * src/output.c, src/reader.c, src/symtab.c, src/symtab.h: Rename
638 bucket.value as bucket.number.
639
99013900
AD
6402002-04-07 Akim Demaille <akim@epita.fr>
641
642 * src/closure.c, src/derives.c, src/gram.h, src/lalr.c,
643 * src/nullable.c, src/output.c, src/print.c, src/print_graph.c,
644 * src/reader.c, src/reduce.c: Let rule_t.rhs point directly to the
645 RHS, instead of being an index in RITEMS.
646
e966383b
PE
6472002-04-04 Paul Eggert <eggert@twinsun.com>
648
649 * doc/bison.texinfo: Update copyright date.
650 (Rpcalc Lexer, Symbols, Token Decl): Don't assume ASCII.
651 (Symbols): Warn about running Bison in one character set,
652 but compiling and/or running in an incompatible one.
653 Warn about character code 256, too.
654
6552002-04-03 Paul Eggert <eggert@twinsun.com>
656
657 * src/bison.data (YYSTACK_ALLOC): Depend on whether
658 YYERROR_VERBOSE is nonzero, not whether it is defined.
659
660 Merge changes from bison-1_29-branch.
c307773e 661
8d6c48b9
PE
6622002-03-20 Paul Eggert <eggert@twinsun.com>
663
664 Merge fixes from Debian bison_1.34-1.diff.
665
666 * configure.in (AC_PREREQ): 2.53.
667
e53c6322
AD
6682002-03-20 Akim Demaille <akim@epita.fr>
669
670 * src/conflicts.c (log_resolution): Argument `resolution' is const.
671
9ffbeca7
PE
6722002-03-19 Paul Eggert <eggert@twinsun.com>
673
21db0b2a
PE
674 * src/bison.simple (YYCOPY): New macro.
675 (YYSTACK_RELOCATE): Use it.
676 Remove Type arg; no longer needed. All callers changed.
677 (yymemcpy): Remove; no longer needed.
678
9ffbeca7
PE
679 * Makefile.am (AUTOMAKE_OPTIONS): 1.6.
680 * doc/Makefile.am (AUTOMAKE_OPTIONS): Remove.
681
642cb8f8
AD
6822002-03-19 Akim Demaille <akim@epita.fr>
683
684 Test and fix the #line outputs.
685
686 * tests/atlocal.at (GCC): New.
687 * tests/synclines.at (AT_TEST_SYNCLINE): New macro.
688 (Prologue synch line, ,%union synch line, Postprologue synch line)
689 (Action synch line, Epilogue synch line): New tests.
690 * src/reader.c (parse_union_decl): Define the muscle stype_line.
691 * data/bison.simple, data/bison.c++: Use it.
692
3c31a486
AD
6932002-03-19 Akim Demaille <akim@epita.fr>
694
695 * tests/regression.at (%nonassoc and eof, Unresolved SR Conflicts)
696 (Solved SR Conflicts, %expect not enough, %expect right)
697 (%expect too much): Move to...
698 * tests/conflicts.at: this new file.
699
0d8bed56
AD
7002002-03-19 Akim Demaille <akim@epita.fr>
701
702 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
703 * data/bison.simple, data/bison.c++: Handle the `#define' part, so
704 that we can move to enums for instance.
705 * src/output.c (token_definitions_output): Output a list of
706 `token-name, token-number' instead of the #define.
707 (output_skeleton): Name this list `b4_tokens', not `b4_tokendefs'.
708
9208d17f
AD
7092002-03-14 Akim Demaille <akim@epita.fr>
710
711 Use Gettext 0.11.1.
712
af27eacb
RA
7132002-03-09 Robert Anisko <robert@lrde.epita.fr>
714
715 * data/bison.c++: Make the user able to add members to the generated
716 parser by subclassing.
717
9101a310
RA
7182002-03-05 Robert Anisko <robert@lrde.epita.fr>
719
720 * src/reader.c (read_additionnal_code): `c' should be an integer, not
721 a character.
722 Reported by Nicolas Tisserand and Nicolas Burrus.
723
fff9bf0b
RA
7242002-03-04 Robert Anisko <robert@lrde.epita.fr>
725
726 * src/reader.c: Warn about lacking semi-colons, do not complain.
727
64dba31e
RA
7282002-03-04 Robert Anisko <robert@lrde.epita.fr>
729
730 * data/bison.c++: Remove a debug line.
731
374f5a14
RA
7322002-03-04 Robert Anisko <robert@lrde.epita.fr>
733
734 * data/bison.c++: Unmerge value as yylval and value as yyval. Unmerge
735 location as yylloc and location as yyloc. Use YYLLOC_DEFAULT, and
736 provide a default implementation.
737
bfcf1f3a
AD
7382002-03-04 Akim Demaille <akim@epita.fr>
739
740 * tests/input.at (Invalid $n, Invalid @n): Add the ending `;'.
741 * tests/output.at (AT_CHECK_OUTPUT): Likewise.
742 * tests/headers.at (AT_TEST_CPP_GUARD_H): Ditto.
743 * tests/semantic.at (Parsing Guards): Similarly.
744 * src/reader.at (readgram): Complain if the last rule is not ended
745 with a semi-colon.
746
65ccf9fc
AD
7472002-03-04 Akim Demaille <akim@epita.fr>
748
749 * src/warshall.h, src/warshall.c (bitmatrix_print): Move to...
750 * src/closure.c: here.
751 (set_firsts): Use bitsetv_reflexive_transitive_closure instead of
752 RTC.
753 * src/warshall.h, src/warshall.c: Remove.
754 * tests/sets.at (Broken Closure): Adjust.
755
d0039cbc
AD
7562002-03-04 Akim Demaille <akim@epita.fr>
757
758 * src/output.c (output_skeleton): tempdir is const.
759 bytes_read is unused.
760
345cea78
AD
7612002-03-04 Akim Demaille <akim@epita.fr>
762
763 * lib/bbitset.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
764 * lib/bitsetv.h, lib/ebitset.c, lib/lbitset.c, lib/sbitset.c:
765 Update.
766 From Michael Hayes.
767
564801f7
AD
7682002-03-04 Akim Demaille <akim@epita.fr>
769
770 * src/closure.c (closure): `r' is unused.
771
e5352bc7
AD
7722002-03-04 Akim Demaille <akim@epita.fr>
773
774 * tests/sets.at (Broken Closure): Add the ending `;'.
775 * src/reader.at (readgram): Complain if a rule is not ended with a
776 semi-colon.
777
914feea9
AD
7782002-03-04 Akim Demaille <akim@epita.fr>
779
780 * src/conflicts.c (set_conflicts): Use bitset_disjoint_p.
781 (count_sr_conflicts): Use bitset_count.
782 * src/reduce.c (inaccessable_symbols): Ditto.
783 (bits_size): Remove.
784 * src/warshall.h, src/warshall.c: Convert to bitsetv.
785
f0250de6
AD
7862002-03-04 Akim Demaille <akim@epita.fr>
787
788 * src/closure.c, src/conflicts.c, src/lalr.c, src/print.c,
789 * src/reduce.c: Remove the `bitset_zero's following the
790 `bitset_create's, as now it is performed by the latter.
791
ef017502
AD
7922002-03-04 Akim Demaille <akim@epita.fr>
793
794 * lib/bitset.c, lib/bitset.h, lib/bitsetv.c, lib/bitsetv.h,
795 * lib/ebitset.c, lib/ebitset.h, lib/lbitset.c, lib/lbitset.h,
796 * lib/sbitset.c, lib/sbitset.h, lib/bbitset.h: Update from the
797 latest sources from Michael.
798
76514394
AD
7992002-03-04 Akim Demaille <akim@epita.fr>
800
801 * src/output.c (output): Don't free the grammar.
802 * src/reader.c (grammar_free): New.
803 * src/main.c (main): Call it and don't free symtab here.
804
55024580
AD
8052002-03-04 Akim Demaille <akim@epita.fr>
806
807 * src/lex.c (parse_percent_token): Be sure to 0-end token_buffer
808 before returning.
809 Reported by Benoit Perrot.
810
f9abaa2c
AD
8112002-03-04 Akim Demaille <akim@epita.fr>
812
813 Use bitset operations when possible, not loops over bits.
814
815 * src/conflicts.c (set_conflicts, count_sr_conflicts): Use
816 bitset_or.
817 * src/print.c (print_reductions): Use bitset_and, bitset_andn.
818 * src/reduce.c (useless_nonterminals): Formatting changes.
819 * src/warshall.c (TC): Use bitset_or.
820
0e721e75
AD
8212002-03-04 Akim Demaille <akim@epita.fr>
822
823 * src/lalr.h, src/lalr.c (tokensetsize): Remove, unused.
824 * src/system.h (BITS_PER_WORD, WORDSIZE, SETBIT, RESETBIT, BITISSET):
825 Ditto.
826
0fb1ffb1
AD
8272002-03-04 Akim Demaille <akim@epita.fr>
828
829 * src/lalr.c (F): Now a bitset*.
830 Adjust all dependencies.
831
b86796bf
AD
8322002-03-04 Akim Demaille <akim@epita.fr>
833
834 * src/conflicts.c (shiftset, lookaheadset): Now bitset.
835 Adjust all dependencies.
836
602bbf31
AD
8372002-03-04 Akim Demaille <akim@epita.fr>
838
839 * src/L0.c, src/LR0.h (nstates): Be size_t.
840 Adjust comparisons (signed vs unsigned).
841 * src/conflics.c, src/lalr.c, src/lalr.h, src/output.c (LA): Now a
842 bitset*.
843 Adjust all dependencies.
844
d8a0245c
AD
8452002-03-04 Akim Demaille <akim@epita.fr>
846
847 * src/closure.c (firsts): Now, also a bitset.
848 Adjust all dependencies.
849 (varsetsize): Remove, now unused.
850 * src/warshall.h, src/warshall.c: Now work on arrays of bitsets.
851
34ba9743
AD
8522002-03-04 Akim Demaille <akim@epita.fr>
853
854 * src/print.c: Convert to use bitset.h, not hand coded iterations
855 over ints.
856
ed86e78c
AD
8572002-03-04 Akim Demaille <akim@epita.fr>
858
859 * src/reduce.c: Convert to use bitset.h, not hand coded BSet.
860
dfdb1797
AD
8612002-03-04 Akim Demaille <akim@epita.fr>
862
863 * src/closure.c (ruleset): Be a bitset.
864 (rulesetsize): Remove.
865
7086e707
AD
8662002-03-04 Akim Demaille <akim@epita.fr>
867
868 * lib/bitset-int.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
869 * lib/bitsetv.h, lib/ebitset.c, lib/ebitset.h, lib/lbitset.c,
870 * lib/lbitset.h, lib/sbitset.c, lib/sbitset.h: New.
871 * src/closure.c (fderives): Be an array of bitsets.
872
98254360
RA
8732002-02-28 Robert Anisko <robert@lrde.epita.fr>
874
875 * data/bison.c++: Merge the two generated headers. Insert a copyright
876 notice in each output file.
877
a75c057f
AD
8782002-02-28 Akim Demaille <akim@epita.fr>
879
880 * data/bison.c++: Copy the prologue of bison.simple to fetch
881 useful M4 definitions, such as b4_header_guard.
882
06b00abc
AD
8832002-02-25 Akim Demaille <akim@epita.fr>
884
885 * src/getargs.c (version): Give the name of the authors, and use a
a75c057f
AD
886 translator friendly scheme for the bgr
887 copyright notice.
06b00abc 888
70e7d534
AD
8892002-02-25 Akim Demaille <akim@epita.fr>
890
891 * src/output.c (header_output): Remove, now handled completely via
892 M4.
893
abe017f6
AD
8942002-02-25 Akim Demaille <akim@epita.fr>
895
896 * m4/m4.m4: New, from CVS Autoconf.
897 * configure.in: Invoke it.
898 * src/output.c (output_skeleton): Use its result instead of the
899 hard coded name.
900
381fb12e
AD
9012002-02-25 Akim Demaille <akim@epita.fr>
902
903 * lib/tempname.c, lib/mkstemp.c, m4/mkstemp.m4: New, stolen from
904 Fileutils 4.1.5.
905 * configure.in: Invoke UTILS_FUNC_MKSTEMP.
906 * src/output.c (output_skeleton): Use mkstemp to create a real
907 temporary file.
908 Move the filling of `skeleton' and its muscle to...
909 (prepare): here.
910 (output): Move the definition of the prologue muscle to...
911 (prepare): here.
912 * src/system.h (DEFAULT_TMPDIR): New.
913
6f38107f
PE
9142002-02-14 Paul Eggert <eggert@twinsun.com>
915
916 Remove the support for C++ namespace cleanliness; it was
917 causing more problems than it was curing, since it didn't work
918 properly on some nonstandard C++ compilers. This can wait
919 for a proper C++ parser.
920
921 * NEWS: Document this.
922 * doc/bison.texinfo (Bison Parser, Debugging): Remove special mention
923 of C++, as it's treated like C now.
924 * src/bison.simple (YYSTD): Remove.
925 (YYSIZE_T, YYFPRINTF, YYPARSE_PARAM_ARG, YYPARSE_PARAM_DECL):
926 Treat C++ just like Standard C instead of trying to support
927 namespace cleanliness.
928
80cce3da
AD
9292002-02-14 Akim Demaille <akim@epita.fr>
930
931 * tests/regression.at (else): Adjust to Andreas' change.
932
842e8679
AD
9332002-02-14 Akim Demaille <akim@epita.fr>
934
935 * lib/Makefile.am (EXTRA_DIST): Ship strnlen.c.
936
4bda3f10
AD
9372002-02-13 Andreas Schwab <schwab@suse.de>
938
939 * src/output.c (output_rule_data): Don't output NULL, it might
940 not be defined yet.
941
4162fa07 9422002-02-11 Robert Anisko <robert@lrde.epita.fr>
b418ecd8 943
4162fa07
RA
944 * data/bison.c++ (YYDEBUG, YYERROR_VERBOSE): After the prologue.
945 (Copyright notice): Update.
b418ecd8 946
bd16a5dc
AD
9472002-02-11 Akim Demaille <akim@epita.fr>
948
949 * tests/regression.at (%nonassoc and eof): Don't include
950 nonportable headers.
951
8d69a1a3
RA
9522002-02-08 Robert Anisko <robert@lrde.epita.fr>
953
954 * data/bison.c++: Correct error recovery. Make the user able to
955 initialize the starting location.
956
9b2d0677
AD
9572002-02-07 Akim Demaille <akim@epita.fr>
958
959 * tests/input.at: New.
960
69e2658b
RA
9612002-02-07 Robert Anisko <robert@lrde.epita.fr>
962
963 * data/bison.c++: Replace some direct m4 expansions by constants. Be
9b2d0677 964 more consistent when naming methods and variables. Put preprocessor
69e2658b
RA
965 directives around tables only needed for debugging.
966
4aacc3a7
RA
9672002-02-07 Robert Anisko <robert@lrde.epita.fr>
968
969 * data/bison.c++ (yy::b4_name::print_): New method, replaces yyprint in
970 C++ parsers.
971 (yy::b4_name::parse): Use print_.
972
762a801e
RA
9732002-02-07 Robert Anisko <robert@lrde.epita.fr>
974
975 * data/bison.c++ (yy::b4_name::parse): Error recovery is back.
976
4bb2bc3f
RA
9772002-02-07 Robert Anisko <robert@lrde.epita.fr>
978
979 * data/bison.c++ (yy::b4_name::error_): New method, replaces yyerror in
980 C++ parsers.
981 (yy::b4_name::parse): Build verbose error messages, and use error_.
982
6b45a3ca
RA
9832002-02-06 Robert Anisko <robert@lrde.epita.fr>
984
985 * data/bison.c++: Fix m4 quoting in comments.
986
50997c6e
RA
9872002-02-06 Robert Anisko <robert@lrde.epita.fr>
988
989 * data/bison.c++: Adjust the parser code. Fix some muscles that were
990 not expanded by m4.
991
3f3eed27
AD
9922002-02-05 Akim Demaille <akim@epita.fr>
993
994 * data/bison.c++: Adjust to the M4 back end.
995 More is certainly needed.
996
be2a1a68
AD
9972002-02-05 Akim Demaille <akim@epita.fr>
998
999 Give a try to M4 as a back end.
1000
1001 * lib/readpipe.c: New, from wdiff.
1002 * src/Makefile.am (DEFS): Define PKGDATADIR, not BISON_SIMPLE and
1003 BISON_HAIRY.
1004 * src/system.h (BISON_HAIRY, BISON_SIMPLE): Remove the DOS and VMS
1005 specific values. Now it is m4 that performs the lookup.
1006 * src/parse-skel.y: Remove.
1007 * src/muscle_tab.c, src/muscle_tab.h (muscles_m4_output): New.
1008 * src/output.c (actions_output, guards_output)
1009 (token_definitions_output): No longer keeps track of the output
1010 line number, hence remove the second argument.
1011 (guards_output): Check against the guard member of a rule, not the
1012 action member.
1013 Adjust callers.
1014 (output_skeleton): Don't look for the skeleton location, let m4 do
1015 that.
1016 Create `/tmp/muscles.m4'. This is temporary, a proper temporary
1017 file will be used.
1018 Invoke `m4' on m4sugar.m4, muscles.m4, and the skeleton.
1019 (prepare): Given that for the time being changesyntax is not
1020 usable in M4, rename the muscles using `-' to `_'.
1021 Define `defines_flag', `output_parser_name' and `output_header_name'.
1022 * src/output.h (actions_output, guards_output)
1023 (token_definitions_output): Adjust prototypes.
1024 * src/scan-skel.l: Instead of scanning the skeletons, it now
1025 processes the output of m4: `__oline__' and `#output'.
1026 * data/bison.simple: Adjust to be used by M4(sugar).
1027 * tests/Makefile.am: Use check_SCRIPTS to make sure `bison' is up
1028 to date.
1029 * tests/bison.in: Use the secrete envvar `BISON_PKGDATADIR'
1030 instead of the dead `BISON_SIMPLE' and `BISON_HAIRY'.
1031 * data/m4sugar/m4sugar.m4, data/m4sugar/version.m4: New,
1032 shamelessly stolen from CVS Autoconf.
1033
beda758b
AD
10342002-02-05 Akim Demaille <akim@epita.fr>
1035
1036 * lib/hash.c, lib/hash.h: Replace with Fileutils 4.1's version.
1037 * configure.in: Check for the declarations of free and malloc.
1038 * src/muscle_tab.c: Adjust.
1039
5ece6d43
AD
10402002-02-05 Akim Demaille <akim@epita.fr>
1041
1042 * src/muscle_tab.c (muscle_init): Don't default to NULL muscle
1043 which have no values.
1044
5bb18f9a
AD
10452002-02-05 Akim Demaille <akim@epita.fr>
1046
1047 * src/bison.simple, src/bison.hairy, src/bison.c++: Move to...
1048 * data/: here.
1049
894dd62e
PE
10502002-01-29 Paul Eggert <eggert@twinsun.com>
1051
1052 * src/bison.simple (YYSIZE_T): Do not define merely because
1053 YYSTACK_USE_ALLOCA is nonzero or alloca or _ALLOCA_H are defined.
1054 On some platforms, <alloca.h> does not declare YYSTD (size_t).
1055
82841af7
AD
10562002-01-27 Akim Demaille <akim@epita.fr>
1057
1058 Fix `%nonassoc and eof'.
1059
1060 * src/state.c (errs_dup): Aaaah! The failure was due to bytes
1061 which were not properly copied! Replace
1062 memcpy (res->errs, src->errs, src->nerrs);
1063 with
1064 memcpy (res->errs, src->errs, src->nerrs * sizeof (src->errs[0]));
1065 !!!
1066 * tests/regression.at (%nonassoc and eof): Adjust to newest
1067 Autotest: `.' is not in the PATH.
1068
318b76e9
AD
10692002-01-27 Akim Demaille <akim@epita.fr>
1070
1071 * tests/sets.at (AT_EXTRACT_SETS): New.
1072 (Nullable): Use it.
1073 (Firsts): New.
1074
30d2f3d5
AD
10752002-01-26 Akim Demaille <akim@epita.fr>
1076
1077 * tests/actions.at, tests/calc.at, tests/headers.at,
1078 * tests/torture.at: Adjust to the newest Autotest which no longer
1079 forces `.' in the PATH.
1080
30f8c395
AD
10812002-01-25 Akim Demaille <akim@epita.fr>
1082
1083 * tests/regression.at (%nonassoc and eof): New.
1084 Suggested by Robert Anisko.
1085
29ae55f1
AD
10862002-01-24 Akim Demaille <akim@epita.fr>
1087
1088 Bison dumps core when trying to complain about broken input files.
1089 Reported by Cris van Pelt.
1090
1091 * src/lex.c (parse_percent_token): Be sure to set token_buffer.
1092 * tests/regression.at (Invalid input: 1, Invalid input: 2): Merge
1093 into...
1094 (Invalid inputs): Strengthen: exercise parse_percent_token.
1095
2b548aa6
RA
10962002-01-24 Robert Anisko <robert.anisko@epita.fr>
1097
1098 * src/Makefile.am: Add bison.c++.
1099 * src/bison.c++: New skeleton.
1100
bb0146c2
AD
11012002-01-21 Paolo Bonzini <bonzini@gnu.org>
1102
1103 * po/it.po: New.
1104
bec30531
AD
11052002-01-21 Kees Zeelenberg <kzlg@users.sourceforge.net>
1106
1107 * src/files.c (skeleton_find) [MSDOS]: Fix cp definition.
1108
fc6edc45
MA
11092002-01-20 Marc Autret <marc@gnu.org>
1110
1111 * src/files.c (compute_output_file_names): Fix
1112
5e5d5415
MA
11132002-01-20 Marc Autret <marc@gnu.org>
1114
1115 * tests/output.at: New test.
1116 * src/files.c (compute_base_names): Don't map extensions when
1117 the YACC flag is set, use defaults.
1118 Reported by Evgeny Stambulchik.
1119
44ea3fbd
MA
11202002-01-20 Marc Autret <marc@gnu.org>
1121
bb0146c2 1122 * src/system.h: Need to define __attribute__ away for non-GCC
44ea3fbd
MA
1123 compilers as well (i.e. the vendor C compiler).
1124 Suggested by Albert Chin-A-Young.
1125
338963d1
TVH
11262002-01-11 Tim Van Holder <tim.van.holder@pandora.be>
1127
1128 * lib/hash.h, lib/hash.c: Renamed __P to PARAMS and used the
1129 canonical definition.
1130 * src/system.h: Use the canonical definition for PARAMS (avoids
1131 a conflict with the macro from lib/hash.h).
1132
c57b2479
AD
11332002-01-11 Akim Demaille <akim@epita.fr>
1134
1135 * configure.in: Use AC_FUNC_STRNLEN.
d9e9746c 1136 Fixes the failures observed on AIX 4.3 by H.Merijn Brand.
c57b2479 1137
b85810ae
AD
11382002-01-09 Akim Demaille <akim@epita.fr>
1139
1140 * src/files.c, src/files.h (output_infix): New.
1141 (tab_extension): Remove.
1142 (compute_base_names): Compute the former, drop the latter.
1143 * src/output.c (prepare): Insert the muscles `output-infix', and
1144 `output-suffix'.
1145 * src/parse-skel.y (string, string.1): New.
1146 (section.header): Use it.
1147 (section.yacc): Remove.
1148 (prefix): Remove too.
1149 * src/scan-skel.l: Adjust.
1150 * src/bison.simple, src/bison.hairy: Adjust.
1151
cae60122
AD
11522002-01-09 Akim Demaille <akim@epita.fr>
1153
1154 * configure.in (WERROR_CFLAGS): Compute it.
1155 * src/Makefile.am (CFLAGS): Pass it.
1156 * tests/atlocal.in (CFLAGS): Idem.
1157 * src/files.c: Fix a few warnings.
1158 (get_extension_index): Remove, unused.
1159
ae404801
AD
11602002-01-08 Akim Demaille <akim@epita.fr>
1161
1162 * src/getargs.c (AS_FILE_NAME): New.
1163 (getargs): Use it to convert DOSish file names.
1164 * src/files.c (base_name): Rename as full_base_name to avoid
1165 clashes with `base_name ()'.
1166 (filename_split): New.
1167 (compute_base_names): N-th rewrite, using filename_split.
1168
22312b71
AD
11692002-01-08 Akim Demaille <akim@epita.fr>
1170
1171 * lib/basename.c, lib/dirname.h, lib/dirname.c, lib/memrchr.c:
1172 New, stolen from the Fileutils 4.1.
1173 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
1174 * configure.in: Check for the presence of memrchr, and of its
1175 prototype.
1176
a67cef01
TVH
11772002-01-07 Tim Van Holder <tim.van.holder@pandora.be>
1178
1179 * lib/hash.h (__P): Added definition for this macro.
1180 * src/Makefile.am: Add parse-skel.c and scan-skel.c to
1181 BUILT_SOURCES, to ensure they are generated first.
1182 * src/parse-skel.y: Use YYERROR_VERBOSE instead of
1183 %error-verbose to allow bootstrapping with bison 1.30x.
1184
2b25d624
AD
11852002-01-06 Akim Demaille <akim@epita.fr>
1186
1187 * src/reader.c (parse_braces): Don't fetch the next char, the
1188 convention is to fetch on entry.
1189 * tests/torture.at (GNU Cim Grammar): Reintroduce their weird
1190 'switch' without a following semicolon.
1191 * tests/regression.at (braces parsing): New.
1192
3460813b
AD
11932002-01-06 Akim Demaille <akim@epita.fr>
1194
1195 Bison is dead wrong in its RR conflict reports.
1196
1197 * tests/torture.at (GNU Cim Grammar): New.
1198 * src/conflicts.c (count_rr_conflicts): Fix.
1199
73784c64
AD
12002002-01-06 Akim Demaille <akim@epita.fr>
1201
1202 Creating package.m4 from configure.ac causes too many problems.
1203
1204 * tests/Makefile.am (package.m4): Create it by hand,
1205 AC_CONFIG_TESTDIR no longer does in the most recent CVS Autoconf.
1206
25d81090
AD
12072002-01-06 Akim Demaille <akim@epita.fr>
1208
1209 * src/Makefile.am (bison_SOURCES): Add parse-skel.h and
1210 skeleton.h.
1211
a9b8959e
PE
12122002-01-04 Paul Eggert <eggert@twinsun.com>
1213
1214 * doc/bison.texinfo (Debugging):
1215 Remove YYSTDERR; it's no longer defined or used.
1216 Also, s/cstdio.h/cstdio/.
1217
25d81090
AD
12182002-01-03 Akim Demaille <akim@epita.fr>
1219
1220 * tests/bison.in, tests/atlocal.in: Adjust to CVS Autoconf.
1221
1109455c
AD
12222002-01-03 Akim Demaille <akim@epita.fr>
1223
1224 * src/parse-skel.y (process_skeleton): Don't bind the parser's
1225 tracing code to --trace, wait for a better --trace option, with
1226 args.
1227
7ea5e977
AD
12282002-01-03 Akim Demaille <akim@epita.fr>
1229
1230 * src/bison.simple (YYSTDERR): Remove, replace `stderr'.
1231 The ISO C++ standard is extremely clear about it: stderr is
1232 considered a macro, not a regular symbol (see table 94 `Header
1233 <cstdio> synopsis', [lib.c.files] 27.8.2 C Library files).
1234 Therefore std:: does not apply to it. It still does with fprintf.
1235 Also, s/cstdio.h/cstdio/.
1236
fab5b110
AD
12372002-01-03 Akim Demaille <akim@epita.fr>
1238
1239 * lib/quotearg.c: Use `#include "..."' instead of `#include <...>'
1240 for non system headers.
1241
aed7fd9b
AD
12422002-01-02 Akim Demaille <akim@epita.fr>
1243
1244 Equip the skeleton chain with location tracking, runtime trace,
1245 pure parser and scanner.
1246
1247 * src/parse-skel.y: Request a pure parser, locations, and prefix
1248 renaming.
1249 (%union): Having several members with the same type does not help
1250 type mismatches, simplify.
1251 (YYPRINT, yyprint): New.
1252 (yyerror): ``Rename'' (there is a #define yyerror skel_error) as...
1253 (skel_error): this.
1254 Handle locations.
1255 * src/scan-skel.l: Adjust to these changes.
1256 * src/skeleton.h (LOCATION_RESET, LOCATION_LINES, LOCATION_STEP)
1257 (LOCATION_PRINT, skel_control_t): New.
1258
24fad99e
AD
12592001-12-30 Akim Demaille <akim@epita.fr>
1260
1261 * src/parse-skel.y: Get rid of the shift/reduce conflict:
1262 replace `gb' with BLANKS.
1263 * src/scan-skel.l: Adjust.
1264
a4b36db4
AD
12652001-12-30 Akim Demaille <akim@epita.fr>
1266
1267 * src/system.h: We don't need nor want bcopy.
1268 Throw away MS-DOS crap: we don't need getpid.
1269 * configure.in: We don't need strndup. It was even causing
1270 problems: because Flex includes the headers *before* us,
1271 _GNU_SOURCE is not defined by config.h, and therefore strndup was
1272 not visible.
1273 * lib/xstrndup.c: New.
1274 * src/scan-skel.l: Use it.
1275 Be sure to initialize yylval.muscle member when scanning a MUSCLE.
1276 * src/parse-skel.y: Use %directives instead of #defines.
1277
1239777d
AD
12782001-12-30 Akim Demaille <akim@epita.fr>
1279
1280 * src/skeleton.h: New.
1281 * src/output.c (output_parser, output_master_parser): Remove, dead
1282 code.
1283 * src/output.h (get_lines_number, actions_output, guards_output)
1284 (token_definitions_output): Prototype them.
1285 * src/parse-skel.y: Add the license notice.
1286 Include output.h and skeleton.h.
1287 (process_skeleton): Returns void, and takes a single parameter.
1288 * src/scan-skel.l: Add the license notice.
1289 Include skeleton.h.
1290 Don't use %option yylineno: it seems that then Flex imagines
1291 REJECT has been used, and therefore it won't reallocate its
1292 buffers (which makes no other sense to me than a bug). It results
1293 in warnings for `unused: yy_flex_realloc'.
1294
9b3add5b
RA
12952001-12-30 Robert Anisko <robert.anisko@epita.fr>
1296
1297 * src/muscle_tab.h (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
1298 (MUSCLE_INSERT_PREFIX): ...to there.
1299 * src/output.c (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
1300 (MUSCLE_INSERT_PREFIX): Move from here...
1301
1302 * src/bison.hairy: Add a section directive. Put braces around muscle
1303 names. This parser skeleton is still broken, but Bison should not
1304 choke on a bad muscle 'syntax'.
1305 * src/bison.simple: Add a section directive. Put braces around muscle
1306 names.
1307
1308 * src/files.h (strsuffix, stringappend): Add declarations.
1309 (tab_extension): Add declaration.
1310 (short_base_name): Add declaration.
1311
1312 * src/files.c (strsuffix, stringappend): No longer static. These
1313 functions are used in the skeleton parser.
1314 (tab_extension): New.
1315 (compute_base_names): Use the computations done in this function
fab5b110 1316 to guess if the generated parsers should have '.tab' in their
9b3add5b
RA
1317 names.
1318 (short_base_name): No longer static.
1319
1320 * src/output.c (output_skeleton): New.
1321 (output): Disable call to output_master_parser, and give a try to
1322 a new skeleton handling system.
1323 (guards_output, actions_output): No longer static.
1324 (token_definitions_output, get_lines_number): No longer static.
1325
1326 * configure.in: Use AM_PROG_LEX and AC_PROG_YACC.
1327
fab5b110 1328 * src/Makefile.am (bison_SOURCES): Add scan-skel.l and
9b3add5b
RA
1329 parse-skel.y.
1330
1331 * src/parse-skel.y: New file.
1332 * src/scan-skel.l: New file.
1333
b5b61c61
AD
13342001-12-29 Akim Demaille <akim@epita.fr>
1335
1336 %name-prefix is broken.
1337
1338 * src/files.c (spec_name_prefix): Initialize to NULL, not to "yy".
1339 Adjust all dependencies.
1340 * tests/headers.at (export YYLTYPE): Strengthen this test: use
1341 %name-prefix.
1342
1343 Renaming yylval but not yylloc is not consistent. Now we do.
1344
1345 * src/bison.simple: Prefix yylloc if used.
1346 * doc/bison.texinfo (Decl Summary): Document that.
1347
8c9a50be
AD
13482001-12-29 Akim Demaille <akim@epita.fr>
1349
1350 * doc/bison.texinfo: Promote `%long-directive' over
1351 `%long_directive'.
1352 Remove all references to fixed-output-files, yacc is enough.
1353
d99361e6
AD
13542001-12-29 Akim Demaille <akim@epita.fr>
1355
1356 * src/bison.simple: Define YYDEBUG and YYERROR_VERBOSE *after* the
1357 user prologue. These are defaults.
1358 * tests/actions.at (Mid-rule actions): Make sure the user can
1359 define YYDEBUG and YYERROR_VERBOSE.
1360
b9cecb91
AD
13612001-12-29 Akim Demaille <akim@epita.fr>
1362
1363 * src/output.c (header_output): Don't forget to export YYLTYPE and
1364 yylloc.
1365 * tests/headers.at (export YYLTYPE): New, make sure it does.
1366 * tests/regression.at (%union and --defines, Invalid CPP headers):
1367 Move to...
1368 * tests/headers.at: here.
1369
aea13e97
AD
13702001-12-29 Akim Demaille <akim@epita.fr>
1371
1372 * src/gram.h (rule_s): Member `assoc' is of type `associativity'.
1373
931394cb
AD
13742001-12-29 Akim Demaille <akim@epita.fr>
1375
1376 * tests/actions.at (Mid-rule actions): Output on a single line
1377 instead of several.
1378
704a47c4
AD
13792001-12-29 Akim Demaille <akim@epita.fr>
1380
1381 * doc/bison.texinfo: Formatting changes.
1382
091e20bb
AD
13832001-12-29 Akim Demaille <akim@epita.fr>
1384
1385 Don't store the token defs in a muscle, just be ready to output it
1386 on command. Now possible via `symbols'. Fixes a memory leak.
1387
1388 * src/output.c (token_definitions_output): New.
1389 (output_parser, header_output): Use it.
1390 * src/reader.c (symbols_save): Remove.
1391
cce71710
AD
13922001-12-29 Akim Demaille <akim@epita.fr>
1393
1394 * src/bison.simple: Do not provide a default for YYSTYPE and
1395 YYLTYPE before the user's prologue. Otherwise it's hardly... a
1396 default.
1397
82c035a8
AD
13982001-12-29 Akim Demaille <akim@epita.fr>
1399
1400 Mid-rule actions are simply... ignored!
1401
1402 * src/reader.c (readgram): Be sure to attach mid-rule actions to
1403 the empty-rule associated to the dummy symbol, not to the host
1404 rule.
1405 * tests/actions.at (Mid-rule actions): New.
1406
8419d367
AD
14072001-12-29 Akim Demaille <akim@epita.fr>
1408
1409 Memory leak.
1410
1411 * src/reader.c (reader): Free grammar.
1412
375d5806
AD
14132001-12-29 Akim Demaille <akim@epita.fr>
1414
1415 Memory leak.
1416
1417 * src/LR0.c (new_itemsets): Don't allocate `shift_symbol' here,
1418 since it allocates it for each state, although only one is needed.
1419 (allocate_storage): Do it here.
1420
f51cb8ff
AD
14212001-12-29 Akim Demaille <akim@epita.fr>
1422
1423 * src/options.h, src/options.c (create_long_option_table): Rename
1424 as...
1425 (long_option_table_new): this, with a clearer prototype.
1426 (percent_table): Remove, unused,
1427 * src/getargs.c (getargs): Adjust.
1428
29e88316
AD
14292001-12-29 Akim Demaille <akim@epita.fr>
1430
1431 * src/LR0.c, src/conflicts.c, src/lalr.c, src/lalr.h, src/output.c
1432 * src/print.c, src/print_graph.c, src/state.h: Rename state_table
1433 as states.
1434
b9f71f19
AD
14352001-12-29 Akim Demaille <akim@epita.fr>
1436
1437 * src/lalr.c (build_relations): Rename `states' as `states1'.
1438 Sorry, I don't understand exactly what it is, no better name...
1439
1a2b5d37
AD
14402001-12-29 Akim Demaille <akim@epita.fr>
1441
1442 * src/closure.c, src/conflicts.c, src/derives.c, src/gram.c
1443 * src/gram.h, src/lalr.c, src/nullable.c, src/output.c, src/print.c
1444 * src/print_graph.c, src/reader.c, src/reduce.c: Rename rule_table
1445 as rules.
1446
1cca533e
AD
14472001-12-29 Akim Demaille <akim@epita.fr>
1448
1449 * src/gram.c (rprec, rprecsym, rassoc): Remove, unused since long
1450 ago.
1451
c03ae966
AD
14522001-12-29 Akim Demaille <akim@epita.fr>
1453
1454 * src/reader.c, src/reader.h (user_toknums): Remove.
1455 Adjust all users to use symbols[i]->user_token_number.
1456
5a670b1e
AD
14572001-12-29 Akim Demaille <akim@epita.fr>
1458
1459 * src/gram.c, src/gram.h (sprec, sassoc): Remove.
1460 Adjust all users to use symbols[i]->prec or ->assoc.
1461
ad949da9
AD
14622001-12-29 Akim Demaille <akim@epita.fr>
1463
1464 * src/reader.c, src/reader.h (tags): Remove.
1465 Adjust all users to use symbols[i]->tag.
1466
0e78e603
AD
14672001-12-29 Akim Demaille <akim@epita.fr>
1468
1469 * src/gram.h, src/gram.c (symbols): New, similar to state_table
1470 and rule_table.
1471 * src/reader.c (packsymbols): Fill this table.
1472 Drop sprec.
1473 * src/conflicts.c (resolve_sr_conflict): Adjust.
1474 * src/reduce.c (reduce_grammar): Adjust: just sort symbols, a
1475 single table.
1476 Use symbols[i]->tag instead of tags[i].
1477
213e640e
AD
14782001-12-29 Akim Demaille <akim@epita.fr>
1479
1480 * tests/calc.at (_AT_DATA_CALC_Y): Also use %union.
1481 In addition, put a comment in there, to replace...
1482 * tests/regression.at (%union and C comments): Remove.
1483
e7b8bef1
AD
14842001-12-29 Akim Demaille <akim@epita.fr>
1485
1486 * tests/regression.at (Web2c Actions): Blindly move the actual
1487 output as expected output. The contents *seem* right to me, but I
1488 can't pretend reading perfectly parser tables... Nonetheless, all
1489 the other tests pass correctly, the table look OK, even though the
1490 presence of `$axiom' is to be noted: AFAICS it is useless (but
1491 harmless).
1492
b68e7744
AD
14932001-12-29 Akim Demaille <akim@epita.fr>
1494
1495 * src/reader.c (readgram): Don't add the rule 0 if there were no
1496 rules read. In other words, add it _after_ having performed
1497 grammar sanity checks.
1498 Fixes the `tests/regression.at (Invalid input: 1)' Failure.
1499
78d5bae9
AD
15002001-12-29 Akim Demaille <akim@epita.fr>
1501
1502 * tests/regression.at (Web2c Report): Catch up: the rule 0 is now
1503 visible, and some states have now a different number.
1504
ff442794
AD
15052001-12-29 Akim Demaille <akim@epita.fr>
1506
1507 * src/reader.c (readgram): Bind the initial rule's lineno to that
1508 of the first rule.
1509 * tests/regression.at (Rule Line Numbers, Unresolved SR Conflicts):
1510 (Solved SR Conflicts): Adjust rule 0's line number.
1511
610ab194
AD
15122001-12-29 Akim Demaille <akim@epita.fr>
1513
1514 Fix the `GAWK Grammar' failure.
1515
1516 * src/LR0.c (final_state): Initialize to -1 so that we do compute
1517 the reductions of the first state which was mistakenly confused
1518 with the final state because precisely final_state was initialized
1519 to 0.
1520 * tests/sets.at (Nullable): Adjust: state 0 does have lookaheads,
1521 now noticed by Bison.
1522 * tests/regression.at (Rule Line Numbers): Adjust: state 0 does
1523 have a reduction on $default.
1524
29d29c8f
AD
15252001-12-29 Akim Demaille <akim@epita.fr>
1526
1527 * src/gram.c (ritem_print): Be sure to subtract 1 when displaying
1528 rule line numbers.
1529 * src/closure.c (print_closure): Likewise.
1530 * src/derives.c (print_derives): Likewise.
1531 * tests/sets.at (Nullable): Adjust: the rule numbers are correct
1532 now.
1533
7c6b64d0
AD
15342001-12-29 Akim Demaille <akim@epita.fr>
1535
1536 * src/lalr.c (lookaheads_print): New.
1537 (lalr): Call it when --trace-flag.
1538 * tests/sets.at (Nullable): Adjust: when tracing, the lookaheads
1539 are dumped.
1540
3d4daee3
AD
15412001-12-29 Akim Demaille <akim@epita.fr>
1542
1543 * src/derives.c (print_derives): Be sure to use `>= 0', not `> 0',
1544 when walking through ritem, even via rule->rhs.
1545 * src/reduce.c (dump_grammar, useful_production, reduce_output)
1546 (useful_production, useless_nonterminals): Likewise.
1547 (reduce_grammar_tables): Likewise, plus update nritems.
1548 * src/nullable.c (set_nullable): Likewise.
1549 * src/lalr.c (build_relations): Likewise.
1550 * tests/sets.at (Nullable): Adjust.
1551 Fortunately, now, the $axiom is no longer nullable.
1552
9e7f6bbd
AD
15532001-12-29 Akim Demaille <akim@epita.fr>
1554
1555 * src/LR0.c (generate_states): Use nritems, not nitems, nor using
1556 the 0-sentinel.
1557 * src/gram.c (ritem_longest_rhs): Likewise.
1558 * src/reduce.c (nonterminals_reduce): Likewise.
1559 * src/print_graph.c (print_graph): Likewise.
1560 * src/output.c (output_rule_data): Likewise.
1561 * src/nullable.c (set_nullable): Likewise.
1562
255ef638
AD
15632001-12-29 Akim Demaille <akim@epita.fr>
1564
1565 * src/output.c: Comment changes.
1566
0d8a7363
AD
15672001-12-27 Paul Eggert <eggert@twinsun.com>
1568
1569 * src/bison.simple (YYSTACK_ALLOC, YYSIZE_T): Remove special
1570 cases for non-GNU systems like AIX, HP-UX, SGI, Sun, and
1571 Sparc, as they were causing more porting problems than the
1572 (minor) performance improvement was worth.
1573
1574 Also, catch up with 1.31's YYSTD.
1575
3db472b9
AD
15762001-12-27 Akim Demaille <akim@epita.fr>
1577
1578 * src/output.c (output_gram): Rely on nritems, not the
1579 0-sentinel. See below.
1580 Use -1 as separator, not 0.
1581 * src/bison.simple (yyparse): Subtract 1 to the rule numbers.
1582 Rely on -1 as separator in yyrhs, instead of 0.
1583 * tests/calc.at (AT_CHECK_CALC): Now, the parsers no longer issue
1584 twice `Now at end of input', therefore there are two lines less to
1585 expect.
1586
b365aa05
AD
15872001-12-27 Akim Demaille <akim@epita.fr>
1588
1589 * tests/regression.at (Unresolved SR Conflicts):
1590 (Solved SR Conflicts, Rule Line Numbers): Adjust to the changes
1591 below.
1592
30171f79
AD
15932001-12-27 Akim Demaille <akim@epita.fr>
1594
1595 * src/LR0.c (new_state): Recognize the final state by the fact it
1596 is reached by eoftoken.
1597 (insert_start_shifting_state, insert_eof_shifting_state)
1598 (insert_accepting_state, augment_automaton): Remove, since now
1599 these states are automatically computed from the initial state.
1600 (generate_states): Adjust.
1601 * src/print.c: When reporting a rule number to the user, substract
1602 1, so that the axiom rule is rule 0, and the first user rule is 1.
1603 * src/reduce.c: Likewise.
1604 * src/print_graph.c (print_core): For the time being, just as for
1605 the report, depend upon --trace-flags to dump the full set of
1606 items.
1607 * src/reader.c (readgram): Once the grammar read, insert the rule
1608 0: `$axiom: START-SYMBOL $'.
1609 * tests/set.at: Adjust: rule 0 is now displayed, and since the
1610 number of the states has changed (the final state is no longer
1611 necessarily the last), catch up.
1612
75142d45
AD
16132001-12-27 Akim Demaille <akim@epita.fr>
1614
1615 Try to make the use of the eoftoken valid. Given that its value
1616 is 0 which was also used as a sentinel in ritem, (i) make sure >= 0
1617 is used instead of > 0 where appropriate, (ii), depend upon nritems
1618 instead of the 0-sentinel.
1619
1620 * src/gram.h, src/gram.c (nritems): New.
1621 Expected to be duplication of nitems, but for the time being...
1622 * src/reader.c (packgram): Assert nritems and nitems are equal.
1623 * src/LR0.c (allocate_itemsets, new_itemsets): Adjust.
1624 * src/closure.c (print_closure, print_fderives): Likewise.
1625 * src/gram.c (ritem_print): Likewise.
1626 * src/print.c (print_core, print_grammar): Likewise.
1627 * src/print_graph.c: Likewise.
1628
b7c49edf
AD
16292001-12-27 Akim Demaille <akim@epita.fr>
1630
1631 * src/main.c (main): If there are complains after grammar
1632 reductions, then output the report anyway if requested, then die.
1633 * src/symtab.c (bucket_new): Initialize `value' to -1, not 0.
1634 * src/reader.c (eoftoken): New.
1635 (parse_token_decl): If the token being defined has value `0', it
1636 is the eoftoken.
1637 (packsymbols): No longer hack `tags' to insert `$' by hand.
1638 Be sure to preserve the value of the eoftoken.
1639 (reader): Make sure eoftoken is defined.
1640 Initialize nsyms to 0: now eoftoken is created just like the others.
1641 * src/print.c (print_grammar): Don't special case the eof token.
1642 * src/regression.at: Adjust: `$' has value 0, not -1, which was a
1643 lie anyway, albeit pleasant.
1644 * tests/calc.at: Exercise error messages with eoftoken.
1645 Change the grammar so that empty input is invalid.
1646 Adjust expectations.
1647 When yyungeting, be sure to use a valid yylloc: use last_yylloc.
1648
ec2da99f
AD
16492001-12-27 Akim Demaille <akim@epita.fr>
1650
1651 * configure.in: Check the protos of strchr ans strspn.
1652 Replace strchr if needed.
1653 * src/system.h: Provide the protos of strchr, strspn and memchr if
1654 missing.
1655 * lib/strchr.c: New.
1656 * src/reader.c (symbols_save): Use strchr.
1657
8adfa272
AD
16582001-12-27 Akim Demaille <akim@epita.fr>
1659
1660 * src/print.c, src/print_graph.c (escape): New.
1661 Use it to quote the TAGS outputs.
1662 * src/print_graph.c (print_state): Now errors are in red, and
1663 reductions in green.
1664 Prefer high to wide: output the state number on a line of its own.
1665
80dac38c
AD
16662001-12-27 Akim Demaille <akim@epita.fr>
1667
1668 * src/state.h, src/state.c (reductions_new): New.
1669 * src/LR0.c (set_state_table): Let all the states have a
1670 `reductions', even if reduced to 0.
1671 (save_reductions): Adjust.
1672 * src/lalr.c (initialize_LA, initialize_lookaheads): Adjust.
1673 * src/print.c (print_reductions, print_actions): Adjust.
1674 * src/output.c (action_row): Adjust.
1675
2cec70b9
AD
16762001-12-27 Akim Demaille <akim@epita.fr>
1677
1678 * src/state.h, src/state.c (errs_new, errs_dup): New.
1679 * src/LR0.c (set_state_table): Let all the states have an errs,
1680 even if reduced to 0.
1681 * src/print.c (print_errs, print_reductions): Adjust.
1682 * src/output.c (output_actions, action_row): Adjust.
1683 * src/conflicts.c (resolve_sr_conflict): Adjust.
1684
13ca549a
AD
16852001-12-27 Akim Demaille <akim@epita.fr>
1686
1687 * src/lalr.c (set_goto_map, initialize_F): Use SHIFT_SYMBOL.
1688
5092aba5
AD
16892001-12-27 Akim Demaille <akim@epita.fr>
1690
1691 * src/conflicts.c, src/conflicts.h (print_reductions): Move to...
1692 * src/print.c: here.
1693 (lookaheadset, shiftset): New, used as additional storage by
1694 print_reductions.
1695 (print_results): Adjust.
1696 (print_shifts, print_gotos, print_errs): New, extracted from...
1697 (print_actions): here.
1698 * src/print_graph.c (print_actions): Remove dead code.
1699
11e2beca
AD
17002001-12-27 Akim Demaille <akim@epita.fr>
1701
1702 * src/reader.c (copy_dollar, copy_at): Better checking of `n' in
1703 `$n' and `@n'.
1704
dac3c910
AD
17052001-12-27 Akim Demaille <akim@epita.fr>
1706
1707 * src/lalr.c (add_lookback_edge): Use state_t instead of ints.
1708 (build_relations): Adjust.
1709
d0b0fefa
AD
17102001-12-27 Akim Demaille <akim@epita.fr>
1711
1712 * src/lalr.c (set_goto_map): Remove a wrong but benign loop
1713 duplication.
1714
adc8c848
AD
17152001-12-27 Akim Demaille <akim@epita.fr>
1716
1717 * src/reader.c (packgram): Catch nitems overflows.
1718
14d293ac
AD
17192001-12-27 Akim Demaille <akim@epita.fr>
1720
1721 * src/files.c, src/files.h (guard_obstack): Remove.
1722 * src/output.c (output): Adjust.
1723 * src/reader.c (parse_braces): New, factoring...
1724 (copy_action, copy_guard): these two which are renamed as...
1725 (parse_action, parse_guard): these.
1726 As a voluntary consequence, using braces around guards is now
1727 mandatory.
1728
f499b062
AD
17292001-12-27 Akim Demaille <akim@epita.fr>
1730
1731 * src/gram.h (rule_t): `guard' and `guard_line' are new members.
1732 * src/reader.c (symbol_list): `guard' and `guard_line' are new
1733 members.
1734 (symbol_list_new): Adjust.
1735 (copy_action): action_line is the first line, not the last.
1736 (copy_guard): Just as for actions, store the `action' only, not
1737 the switch/case/break flesh.
1738 Don't parse the user action that might follow the guard, let...
1739 (readgram): do it, i.e., now, there can be an action after a
1740 guard.
1741 In other words the guard is just explicitly optional.
1742 (packgram): Adjust.
1743 * src/output.c (guards_output): New.
1744 (output_parser): Call it when needed.
1745 (output): Also free the guard and attrs obstacks.
1746 * src/files.c, src/files.h (obstack_save): Remove.
1747 (output_files): Remove.
1748 As a result, if one needs the former `.act' file, using an
1749 appropriate skeleton which requires actions and guards is now
1750 required.
1751 * src/main.c (main): Adjust.
1752 * tests/semantic.at: New.
1753 * tests/regression.at: Use `input.y' as input file name.
1754 Avoid 8+3 problems by requiring input.c when the test needs the
1755 parser.
1756
d945f5cd
AD
17572001-12-27 Akim Demaille <akim@epita.fr>
1758
1759 * src/reader.c (symbol_list_new): Be sure to initialize all the
1760 fields.
1761
d200e455
AD
17622001-12-27 Akim Demaille <akim@epita.fr>
1763
1764 All the hacks using a final pseudo state are now useless.
1765
1766 * src/LR0.c (set_state_table): state_table holds exactly nstates.
1767 * src/lalr.c (nLA): New.
1768 (initialize_LA, compute_lookaheads, initialize_lookaheads): Use it
1769 instead of lookaheadsp from the pseudo state (nstate + 1).
1770
f9507c28
AD
17712001-12-27 Akim Demaille <akim@epita.fr>
1772
1773 * src/output.c (action_row, token_actions): Use a state_t instead
1774 of a integer, and nlookaheads instead of the following state's
1775 lookaheadsp.
1776
065fbd27
AD
17772001-12-27 Akim Demaille <akim@epita.fr>
1778
1779 * src/conflicts.c (log_resolution, flush_shift)
1780 (resolve_sr_conflict, set_conflicts, solve_conflicts)
1781 (count_sr_conflicts, count_rr_conflicts, conflicts_output)
1782 (conflicts_print, print_reductions): Use a state_t instead of an
1783 integer when referring to a state.
1784 As much as possible, depend upon nlookaheads, instead of the
1785 `lookaheadsp' member of the following state (since lookaheads of
1786 successive states are successive, the difference between state n + 1
1787 and n served as the number of lookaheads for state n).
1788 * src/lalr.c (add_lookback_edge): Likewise.
1789 * src/print.c (print_core, print_actions, print_state)
1790 (print_results): Likewise.
1791 * src/print_graph.c (print_core, print_actions, print_state)
1792 (print_graph): Likewise.
1793 * src/conflicts.h: Adjust.
1794
1b177bd7
AD
17952001-12-27 Akim Demaille <akim@epita.fr>
1796
1797 * src/bison.hairy: Formatting/comment changes.
1798 ANSIfy.
1799 Remove `register' indications.
1800 Add plenty of `static'.
1801
7742ddeb
AD
18022001-12-27 Akim Demaille <akim@epita.fr>
1803
1804 * src/output.c (prepare): Drop the muscle `ntbase' which
1805 duplicates ntokens.
1806 * src/bison.simple: Formatting/comment changes.
1807 Use YYNTOKENS only, which is documented, but not YYNTBASE, which
1808 is an undocumented synonym.
1809
1fa14068
AD
18102001-12-22 Akim Demaille <akim@epita.fr>
1811
1812 * src/output.c (output_table_data): Change the prototype to use
1813 `int' for array ranges: some invocations do pass an int, not a
1814 short.
1815 Reported by Wayne Green.
1816
b9752825
AD
18172001-12-22 Akim Demaille <akim@epita.fr>
1818
1819 Some actions of web2c.y are improperly triggered.
1820 Reported by Mike Castle.
1821
1822 * src/lalr.c (traverse): s/F (i)[k] = F (j)[k]/F (j)[k] = F (i)[k]/.
1823 * tests/regression.at (Web2c): Rename as...
1824 (Web2c Report): this.
1825 (Web2c Actions): New.
1826
776209d6
AD
18272001-12-22 Akim Demaille <akim@epita.fr>
1828
1829 Reductions in web2c.y are improperly reported.
1830 Reported by Mike Castle.
1831
1832 * src/conflicts.c (print_reductions): Fix.
1833 * tests/regression.at (Web2c): New.
1834
275fc3ad
AD
18352001-12-18 Akim Demaille <akim@epita.fr>
1836
1837 Some host fail on `assert (!"foo")', which expands to
1838 ((!"foo") ? (void)0 : __assert("!"foo."", __FILE__, __LINE__))
1839 Reported by Nelson Beebee.
1840
1841 * src/output.c, src/vcg.c: Replace `assert (!"it succeeded")' with
1842 `#define it_succeeded 0' and `assert (it_succeeded)'.
1843
897668ee
MA
18442001-12-17 Marc Autret <autret_m@epita.fr>
1845
1846 * src/bison.simple: Don't hard code the skeleton line and filename.
1847 * src/output.c (output_parser): Rename 'line' as 'output_line'.
1848 New line counter 'skeleton_line' (skeleton-line muscle).
1849
ab3399e0
PE
18502001-12-17 Paul Eggert <eggert@twinsun.com>
1851
1852 * NEWS, doc/bison.texinfo, doc/bison.1, doc/bison.rnh: Document that
1853 YYDEBUG must be defined to a nonzero value.
1854
1855 * src/bison.simple (yytname): Do not assume that the user defines
1856 YYDEBUG to a properly parenthesized expression.
1857
3877f72b
AD
18582001-12-17 Akim Demaille <akim@epita.fr>
1859
1860 * src/state.h (state_t): Rename lookaheads as lookaheadsp.
1861 nlookaheads is a new member.
1862 Adjust all users.
1863 * src/lalr.h (nlookaheads): Remove this orphan declaration.
1864 * src/lalr.c (initialize_lookaheads): Set nlookaheads for each
1865 state.
776209d6 1866
331dbc1b
AD
18672001-12-17 Akim Demaille <akim@epita.fr>
1868
1869 * src/files.h, src/files.c (open_files, close_files): Remove.
1870 * src/main.c (main): Don't open/close files, nor invoke lex_free,
1871 let...
1872 * src/reader.c (reader): Do it.
776209d6 1873
be750e4c
AD
18742001-12-17 Akim Demaille <akim@epita.fr>
1875
1876 * src/conflicts.c (print_reductions): Formatting changes.
776209d6 1877
709ae8c6
AD
18782001-12-17 Akim Demaille <akim@epita.fr>
1879
1880 * src/conflicts.c (flush_shift): Also adjust lookaheadset.
1881 (flush_reduce): New.
1882 (resolve_sr_conflict): Adjust.
776209d6 1883
f87685c3
AD
18842001-12-17 Akim Demaille <akim@epita.fr>
1885
1886 * src/output.c (output_obstack): Be static and rename as...
1887 (format_obstack): this, to avoid any confusion with files.c's
1888 output_obstack.
1889 * src/reader.h (muscle_obstack): Move to...
1890 * src/output.h: here, since it's defined in output.c.
1891
837491d8
AD
18922001-12-17 Akim Demaille <akim@epita.fr>
1893
1894 * src/output.c (action_row, save_column, default_goto)
1895 (sort_actions, matching_state, pack_vector): Better variable
1896 locality.
1897
796d61fb
AD
18982001-12-17 Akim Demaille <akim@epita.fr>
1899
1900 * src/output.c: Various formatting changes.
776209d6 1901
64d15509
AD
19022001-12-17 Akim Demaille <akim@epita.fr>
1903
1904 * src/files.c (output_files): Free the output_obstack.
1905 * src/main.c (main): Call print and print_graph conditionally.
1906 * src/print.c (print): Work unconditionally.
1907 * src/print_graph.c (print_graph): Work unconditionally.
1908 * src/conflicts.c (log_resolution): Output only if verbose_flag.
1909
fbc8ecb7
MA
19102001-12-16 Marc Autret <autret_m@epita.fr>
1911
1912 * src/output.c (actions_output): Fix. When we use %no-lines,
1913 there is one less line per action.
1914
f0440388
MA
19152001-12-16 Marc Autret <autret_m@epita.fr>
1916
1917 * src/bison.simple: Remove a useless #line directive.
1918 s/#line %%line %%skeleton/#line %%line "%%parser-file-name"/'.
1919 * src/output.c (get_lines_number): New.
776209d6 1920 (output_parser): Adjust, now takes care about the lines of a
f0440388
MA
1921 output muscles.
1922 Fix line numbering.
1923 (actions_output): Computes the number of lines taken by actions.
1924 (output_master_parser): Insert new skeleton which is the name of
1925 the output parser file name.
1926
a79986b8
MA
19272001-12-15 Marc Autret <autret_m@epita.fr>
1928
1929 * src/bison.simple [YYERROR_VERBOSE]: Restore backward compatibility.
1930
4ec8e00f
MA
19312001-12-15 Marc Autret <autret_m@epita.fr>
1932
1933 * src/output.c (output_gram): Keep track of the hairy one.
1934
1a4648ff
AD
19352001-12-15 Akim Demaille <akim@epita.fr>
1936
1937 Make `make distcheck' work.
1938
1939 * lib/Makefile.am (INCLUDES): Add top_srcdir/intl, since hash uses
1940 system.h which uses libgettext.h.
1941
9c2c67e6
AD
19422001-12-15 Akim Demaille <akim@epita.fr>
1943
1944 * src/nullable.c (set_nullable): Useless rules must be skipped,
1945 otherwise, since we range over their symbols, we might look at a
1946 nonterminal which no longer ``exists'', i.e., it is not counted in
1947 `nvars', hence we overflow our arrays.
1948
93ede233
AD
19492001-12-15 Akim Demaille <akim@epita.fr>
1950
1951 The header can also be produced directly, without any obstack!
1952 Yahoo!
1953
1954 * src/files.c, src/files.h (defines_obstack): Remove.
1955 (compute_header_macro): Global.
1956 (defines_obstack_save): Remove.
1957 * src/reader.c (parse_union_decl): No longer output to
1958 defines_obstack: its content can be found in the `stype' muscle
1959 anyway.
1960 (output_token_translations): Merge into...
1961 (symbols_output): this.
1962 Rename as...
1963 (symbols_save): this.
1964 (reader): Adjust.
1965 * src/output.c (header_output): New.
1966 (output): Call it.
1967
2666f928
AD
19682001-12-15 Akim Demaille <akim@epita.fr>
1969
1970 * src/reader.c (parse_union_decl): Instead of handling two obstack
1971 simultaneously, use one to define the `stype' muscle, and use the
1972 value of the latter to fill defines_obstack.
1973 (copy_comment): Remove.
1974 (copy_comment2): Work for a single obstack.
1975 Rename as...
1976 (copy_comment): this.
1977
428046f8
AD
19782001-12-15 Akim Demaille <akim@epita.fr>
1979
1980 * src/lex.c, src/lex.h (xgetc): No longer static.
1981 * src/reader.c (parse_union_decl): Revamp.
1982
ea52d706
AD
19832001-12-15 Akim Demaille <akim@epita.fr>
1984
1985 Still making progress in separating Bison into (i) input, (ii)
1986 process, (iii) output: now we can directly output the parser file
1987 without using table_obstack at all.
1988
1989 * src/files.c, src/files.h (table_obstack): Bye bye.
1990 (parser_file_name): New.
1991 * src/files.c (compute_output_file_names): Compute it.
1992 * src/output.c (actions_output, output_parser)
1993 (output_master_parser): To a file instead of an obstack.
1994
3f96f4dc
AD
19952001-12-15 Akim Demaille <akim@epita.fr>
1996
1997 Attach actions to rules, instead of pre-outputting them to
1998 actions_obstack.
1999
2000 * src/gram.h (rule_t): action and action_line are new members.
2001 * src/reader.c (symbol_list): Likewise.
2002 (copy_action): Save the actions within the rule.
2003 (packgram): Save them in rule_table.
2004 * src/output.c (actions_output): New.
2005 (output_parser): Use it on `%%actions'.
2006 (output_rule_data): Don't free rule_table.
2007 (output): Do it.
2008 (prepare): Don't save the `action' muscle.
2009 * src/bison.simple: s/%%action/%%actions/.
2010
51576fb3
AD
20112001-12-15 Akim Demaille <akim@epita.fr>
2012
2013 * src/reader.c (copy_action): When --yacc, don't append a `;'
2014 to the user action: let it fail if lacking.
dee049eb 2015 Suggested by Arnold Robbins and Tom Tromey.
51576fb3 2016
2648a72d
AD
20172001-12-14 Akim Demaille <akim@epita.fr>
2018
2019 * src/lex.c (literalchar): Simply return the char you decoded, non
2020 longer mess around with obstacks and int pointers.
2021 Adjust all callers.
2022
92790e5b
AD
20232001-12-14 Akim Demaille <akim@epita.fr>
2024
2025 * src/lex.c (literalchar): Don't escape the special characters,
2026 just decode them, and keep them as char (before, eol was output as
2027 the 2 char string `\n' etc.).
2028 * src/output.c (output_rule_data): Use quotearg to output the
2029 token strings.
2030
927c1557
PE
20312001-12-13 Paul Eggert <eggert@twinsun.com>
2032
2033 * src/bison.simple (YYSIZE_T, YYSTACK_ALLOC, YYSTACK_FREE):
2034 Do not infringe on the global user namespace when using C++.
2035 (YYFPRINTF, YYSTDERR): New macros, needed for the above.
2036 All uses of `fprintf' and `stderr' changed.
2037
2038 * doc/bison.texinfo: Document YYFPRINTF, YYSTDERR.
2039
ed8e1f68
AD
20402001-12-13 Akim Demaille <akim@epita.fr>
2041
2042 The computation of nullable is broken: it doesn't handle empty
2043 RHS's properly.
2044
2045 * tests/torture.at (GNU AWK Grammar): New.
2046 * tests/sets.at (Nullable): New.
2047 * src/nullable.c (set_nullable): Instead of blindly looping over
2048 `ritems', loop over the rules, and then over their rhs's.
2049
2050 Work around Autotest bugs.
2051
2052 * src/warshall.c (bitmatrix_print): Don't use `+--+' as table
2053 frame, because Autotest understand lines starting with a `+' as
2054 traces from the shell. Then, they are not processed properly.
2055 Admittedly an Autotest bug, but we don't have time to wait for
2056 Autotest to catch up.
2057 * tests/regression.at (Broken Closure): Adjust to the new table
2058 frames.
2059 Move to...
2060 * tests/sets.at: here.
2061
cb581495
AD
20622001-12-13 Akim Demaille <akim@epita.fr>
2063
2064 * src/closure.c (closure): Use nrules instead of playing tricks
2065 with BITS_PER_WORD.
2066
2e729273
AD
20672001-12-13 Akim Demaille <akim@epita.fr>
2068
2069 * src/print.c (print_actions): Output the handling of `$' as the
2070 traces do: shifting the token EOF. Before EOF was treated as a
2071 nonterminal.
2072 * tests/regression.at: Adjust some tests.
2073 * src/print_graph.c (print_core): Complete the set of items via
2074 closure. The next-to-final and final states are still unsatisfying,
2075 but that's to be addressed elsewhere.
2076 No longer output the rule numbers, but do output the state number.
2077 A single loop for the shifts + gotos is enough, but picked a
2078 distinct color for each.
2079 (print_graph): Initialize and finalize closure.
2080
107f7dfb
AD
20812001-12-13 Akim Demaille <akim@epita.fr>
2082
2083 * src/reader.c (readgram): Remove dead code, an strip useless
2084 braces.
2085 (get_type): Remove, unused.
2086
9b53a24f
AD
20872001-12-12 Akim Demaille <akim@epita.fr>
2088
2089 * src/complain.h, src/complain.c: Remove error_one_per_line, rely
2090 on that of lib/error.c.
2091
dbfb6dcd
AD
20922001-12-12 Akim Demaille <akim@epita.fr>
2093
2094 Some hosts don't like `/' in includes.
2095
2096 * src/system.h: Include libgettext.h without qualifying the path.
2097 * src/Makefile.am (INCLUDES): Add $(top_srcdir)/intl, remove
2098 $(top_srcdir).
2099
c25fb648
MA
21002001-12-11 Marc Autret <autret_m@epita.fr>
2101
2102 * src/output.c (output_parser): Remove useless muscle.
2103
710ddc4f
MA
21042001-12-11 Marc Autret <autret_m@epita.fr>
2105
2106 * src/bison.simple: Remove #line just before %%epilogue. It
2107 is now handled in ...
2108 * src/reader.c (read_additionnal_code): Add the output of a
2109 #line for the epilogue.
2110
e83d80b8
MA
21112001-12-10 Marc Autret <autret_m@epita.fr>
2112
927c1557 2113 * src/reader.c (copy_definition): Re-use CPP-outed code which
e83d80b8
MA
2114 replace precedent remove.
2115 * src/bison.simple: Remove #line before %%prologue because
2116 %%input-line is wrong at this time.
2117
971d5158
MA
21182001-12-10 Marc Autret <autret_m@epita.fr>
2119
2120 * src/reader.c (symbols_output): Clean up.
927c1557 2121 * src/output.c (output_gram, output): Clean up.
971d5158 2122
5edafffd
AD
21232001-12-10 Akim Demaille <akim@epita.fr>
2124
2125 * src/lalr.c (initialize_lookaheads): New. Extracted from...
2126 * src/LR0.c (set_state_table): here.
2127 * src/lalr.c (lalr): Call it.
2128
0279f8e9
AD
21292001-12-10 Akim Demaille <akim@epita.fr>
2130
2131 * src/state.h (shifts): Remove the `number' member: shifts are
2132 attached to state, hence no longer need to be labelled with a
2133 state number.
2134
190c4f5f
AD
21352001-12-10 Akim Demaille <akim@epita.fr>
2136
2137 Now that states have a complete set of members, the linked list of
2138 shifts is useless: just fill directly the state's shifts member.
2139
2140 * src/state.h (shifts): Remove the `next' member.
2141 * src/LR0.c (first_state, last_state): Remove.
2142 Adjust the callers.
2143 (augment_automaton): Don't look for the shifts that must be added
2144 a shift on EOF: it is those of the state we looked for! But now,
2145 since shifts are attached, it is no longer needed to looking
2146 merely by its id: its number.
2147
2a73b93d
AD
21482001-12-10 Akim Demaille <akim@epita.fr>
2149
2150 * src/LR0.c (augment_automaton): Better variable locality.
2151 Remove an impossible branch: if there is a state corresponding to
2152 the start symbol being shifted, then there is shift for the start
2153 symbol from the initial state.
2154
74392f6a
AD
21552001-12-10 Akim Demaille <akim@epita.fr>
2156
2157 * src/LR0.c (augment_automaton): Call `insert_eof_shifting_state'
2158 only when appropriate: when insert_start_shifting_state' is not
2159 invoked.
2160 * tests/regression.at (Rule Line Numbers): Adjust.
2161
37c82725
AD
21622001-12-10 Akim Demaille <akim@epita.fr>
2163
2164 * src/LR0.c (augment_automaton): Now that all states have shifts,
2165 merge the two cases addition shifts to the initial state.
2166
6a164e0c
AD
21672001-12-10 Akim Demaille <akim@epita.fr>
2168
2169 * src/lalr.c (set_state_table): Move to...
2170 * src/LR0.c: here.
2171 * src/lalr.c (lalr): Don't call it...
2172 * src/LR0.c (generate_states): do it.
2173 * src/LR0.h (first_state): Remove, only the table is used.
2174
7215de24
AD
21752001-12-10 Akim Demaille <akim@epita.fr>
2176
2177 * src/LR0.h (first_shift, first_reduction): Remove.
2178 * src/lalr.c: Don't use first_shift: find shifts through the
2179 states.
2180
80e25d4d
AD
21812001-12-10 Akim Demaille <akim@epita.fr>
2182
2183 * src/LR0.c: Attach shifts to states as soon as they are
2184 computed.
2185 * src/lalr.c (set_state_table): Instead of assigning shifts to
2186 state, just assert that the mapping was properly done.
2187
0ab3728b
AD
21882001-12-10 Akim Demaille <akim@epita.fr>
2189
2190 * src/LR0.c (insert_start_shift): Rename as...
2191 (insert_start_shifting_state): this.
2192 (insert_eof_shifting_state, insert_accepting_state): New.
2193 (augment_automaton): Adjust.
2194 Better locality of the variables.
2195 When looking if the start_symbol is shifted from the initial
2196 state, using `while (... symbol != start_symbol ...)' sounds
2197 better than `while (... symbol < start_symbol ...)': If fail
2198 to see how the order between symbols could be relevant!
2199
78af9bbc
AD
22002001-12-10 Akim Demaille <akim@epita.fr>
2201
2202 * src/getargs.h: Don't declare `spec_name_prefix' and
2203 `spec_file_prefix', declared by src/files.h.
2204 * src/files.c, src/files.h: Default for spec_name_prefix is "yy".
2205 * src/muscle_tab.c (muscle_init): Default prefix to NULL.
2206 * src/output.c (prepare): Adjust.
2207 * src/reader.c (symbols_output): Likewise.
2208 * src/vmsgetargs.c: Vaguely adjust, but who cares?
2209
bdef2a41
AD
22102001-12-10 Akim Demaille <akim@epita.fr>
2211
2212 * src/muscle_tab.c (muscle_init): NULL is a better default than
2213 `"0"'.
2214
3735969c
AD
22152001-12-10 Akim Demaille <akim@epita.fr>
2216
2217 * src/reader.c (reader): Calling symbols_output once is enough.
2218
49701457
AD
22192001-12-10 Akim Demaille <akim@epita.fr>
2220
2221 Now that states have a complete set of members, the linked list of
2222 reductions is useless: just fill directly the state's reductions
2223 member.
2224
2225 * src/state.h (struct reductions): Remove member `number' and
2226 `next'.
2227 * src/LR0.c (first_reduction, last_reduction): Remove.
2228 (save_reductions): Don't link the new reductions, store them in
2229 this_state.
2230 * src/lalr.c (set_state_table): No need to attach reductions to
2231 states, it's already done.
2232 * src/output.c (output_actions): No longer free the shifts, then
2233 the reductions, then the states: free all the states and their
2234 members.
2235
0edad749
AD
22362001-12-10 Akim Demaille <akim@epita.fr>
2237
2238 * src/options.c (OPTN, DRTV, BOTH): New.
2239 (option_table): Use them.
2240
0edad749
AD
2241 * src/muscle_tab.c: Don't include xalloc.h and string.h: that's
2242 the job of system.h.
2243 * src/options.c: Don't include stdio.h and xalloc.h for the same
2244 reasons.
2245
5449dd0f
AD
22462001-12-10 Akim Demaille <akim@epita.fr>
2247
2248 * src/output.c (output, prepare): Make sure the values of the
2249 muscles `action' and `prologue' are 0-terminated.
2250
a870c567
AD
22512001-12-10 Akim Demaille <akim@epita.fr>
2252
2253 Clean up GCC warnings.
2254
2255 * src/reader.c (copy_action): `buf' is not used.
2256 (parse_skel_decl): Be static.
2257 * src/muscle_tab.c (mhash1, mhash2, muscle_insert): Preserve `const'.
2258 * src/options.h (create_long_option_table): Have a real prototype.
2259 * lib/hash.c, lib/hash.h (hash_insert, hash_insert_at, hash_delete)
2260 (hash_delete_at): Return const void *.
2261 Adjust casts to preserve the const.
2262
80df8768
AD
22632001-12-10 Akim Demaille <akim@epita.fr>
2264
2265 * configure.in: Require 2.52g.
2266 M4 is not needed, but AUTOM4TE is.
2267 * m4/m4.m4: Remove.
2268 * tests/Makefile.am: Adjust.
2269
f693ad14
AD
22702001-12-10 Akim Demaille <akim@epita.fr>
2271
2272 One structure for states is enough, even though theoretically
2273 there are LR(0) states and LALR(1) states.
2274
2275 * src/lalr.h (state_t): Remove.
2276 (state_table): Be state_t **, not state_t *.
2277 * src/state.h (core, CORE_ALLOC): Rename as...
2278 (state_t, STATE_ALLOC): this.
2279 Add the LALR(1) members: shifts, reductions, errs.
2280 * src/LR0.c (state_table): Rename as...
2281 (state_hash): this, to avoid name clashes with the global
2282 `state_table'.
2283 * src/print_graph.c, src/LR0.c, src/LR0.h, src/conflicts.c
2284 * src/lalr.c, src/lalr.h, src/output.c, src/print.c: Adjust.
2285
74ffbcb6
AD
22862001-12-10 Akim Demaille <akim@epita.fr>
2287
2288 Bison dumps core on bash.y.
2289 Reported by Pascal Bart.
2290
2291 * src/warshall.c (bitmatrix_print): New.
2292 (TC): Use it.
2293 When performing a transitive closure R(i, j) && R(j, k) => R(i, k),
2294 j must be the outer loop.
2295 * tests/regression.at (Broken Closure): New.
2296
07708e19
AD
22972001-12-05 Akim Demaille <akim@epita.fr>
2298
2299 * tests/atlocal.in (CPPFLAGS): Do not leave a space between -I and
2300 its argument.
2301