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