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