]> git.saurik.com Git - bison.git/blame_incremental - ChangeLog
* src/conflicts.c (log_resolution): Correct typo:
[bison.git] / ChangeLog
... / ...
CommitLineData
12002-05-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
2
3 * src/conflicts.c (log_resolution): Correct typo:
4 obstack_printf should be obstack_fgrow1.
5
62002-05-26 Akim Demaille <akim@epita.fr>
7
8 * src/state.h (state_t): `solved_conflicts' is a new member.
9 * src/LR0.c (new_state): Set it to 0.
10 * src/conflicts.h, src/conflicts.c (print_conflicts)
11 (free_conflicts, solve_conflicts): Rename as...
12 (conflicts_print, conflicts_free, conflicts_solve): these.
13 Adjust callers.
14 * src/conflicts.c (enum conflict_resolution_e)
15 (solved_conflicts_obstack): New, used by...
16 (log_resolution): this.
17 Adjust to attach the conflict resolution to each state.
18 Complete the description with the precedence/associativity
19 information.
20 (resolve_sr_conflict): Adjust.
21 * src/print.c (print_state): Output its solved_conflicts.
22 * tests/conflicts.at (Unresolved SR Conflicts)
23 (Solved SR Conflicts): Exercise --report=all.
24
252002-05-26 Akim Demaille <akim@epita.fr>
26
27 * src/LR0.c, src/derives.c, src/gram.c, src/gram.h, src/lalr.c,
28 * src/nullable.c, src/output.c, src/print.c, src/print_graph.c,
29 * src/reader.c, src/reduce.c, src/state.h, src/symtab.h
30 (token_number_t, item_number_as_token_number)
31 (token_number_as_item_number, muscle_insert_token_number_table):
32 Rename as...
33 (symbol_number_t, item_number_as_symbol_number)
34 (symbol_number_as_item_number, muscle_insert_symbol_number_table):
35 these, since it is more appropriate.
36
372002-05-26 Akim Demaille <akim@epita.fr>
38
39 * tests/calc.at (AT_CHECK_CALC): Adjust: there are now additional
40 `Error:' lines.
41 * data/bison.simple (yystos) [YYDEBUG]: New.
42 (yyparse) [YYDEBUG]: Display the symbols which are popped during
43 error recovery.
44 * tests/regression.at (Web2c Actions): Adjust: yystos is output now.
45
462002-05-25 Akim Demaille <akim@epita.fr>
47
48 * doc/bison.texinfo (Debugging): Split into...
49 (Tracing): this new section, its former contents, and...
50 (Understanding): this new section.
51 * src/getargs.h, src/getargs.c (verbose_flag): Remove, replaced
52 by...
53 (report_flag): this.
54 Adjust all dependencies.
55 (report_args, report_types, report_argmatch): New.
56 (usage, getargs): Report/support -r, --report.
57 * src/options.h
58 (struct option_table_struct): Rename as..,
59 (struct option_table_s): this.
60 Rename the `set_flag' member to `flag' to match with getopt_long's
61 struct.
62 * src/options.c (option_table): Split verbose into an entry for
63 %verbose, and another for --verbose.
64 Support --report/-r, so remove -r from the obsolete --raw.
65 * src/print.c: Attach full item sets and lookaheads reports to
66 report_flag instead of trace_flag.
67 * lib/argmatch.h, lib/argmatch.c: New, from Fileutils 4.1.
68
692002-05-24 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
70 and Paul Eggert <eggert@twinsun.com>
71
72 * data/bison.simple (yyparse): Correct error handling to conform to
73 POSIX and yacc. Specifically, after syntax error is discovered,
74 do not reduce further before shifting the error token.
75 Clean up the code a bit by removing the labels yyerrdefault,
76 yyerrhandle, yyerrpop.
77 * NEWS: Document the above.
78
792002-05-20 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
80
81 * data/bison.simple (yyr1): Don't use yy_token_number_type as element
82 type; it isn't always big enough, since it doesn't necessarily
83 include non-terminals.
84 (yytranslate): Expand definition of yy_token_number_type, so that
85 the latter can be removed.
86 (yy_token_number_type): Remove, only one use.
87 * data/bison.c++ (r1_): Parallel change to yyr1 in bison.simple---
88 don't use TokenNumberType as element type.
89
90 * tests/regression.at: Modify expected output to agree with change
91 to yyr1 and yytranslate.
92
932002-05-13 Florian Krohm <florian@edamail.fishkill.ibm.com>
94
95 * src/reader.c (parse_action): Use copy_character instead of
96 obstack_1grow.
97
982002-05-13 Akim Demaille <akim@epita.fr>
99
100 * tests/regression.at (Token definitions): Prototype yylex and
101 yyerror.
102
1032002-05-12 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
104
105 * src/scan-skel.l: Correct off-by-one error in handling of __oline__.
106 * data/bison.simple (b4_sint_type, b4_uint_type): Correct to reflect
107 32-bit arithmetic.
108 * data/bison.c++ (b4_sint_type, b4_uint_type): Ditto.
109
1102002-05-07 Akim Demaille <akim@epita.fr>
111
112 * tests/synclines.at: Be sure to prototype yylex and yyerror to
113 avoid GCC warnings.
114
1152002-05-07 Akim Demaille <akim@epita.fr>
116
117 Kill GCC warnings.
118
119 * src/reduce.c (nonterminals_reduce): Don't loop over RITEM: loop
120 over the RHS of each rule.
121 * src/gram.h, src/gram.c (nritems): Is `unsigned int', not int.
122 * src/state.h (state_t): Member `nitems' is unsigned short.
123 * src/LR0.c (get_state): Adjust.
124 * src/reader.c (packgram): Likewise.
125 * src/output.c (GENERATE_MUSCLE_INSERT_TABLE): `max' is of type
126 `Type'.
127 (muscle_insert_int_table): Remove, unused.
128 (prepare_rules): Remove `max'.
129
1302002-05-06 Akim Demaille <akim@epita.fr>
131
132 * src/closure.c (print_firsts): Display of the symbol tags.
133 (bitmatrix_print): Move to...
134 * lib/bitsetv-print.h, lib/bitsetv-print.c (bitsetv_matrix_dump):
135 here.
136 * tests/sets.at (Nullable, Broken Closure, Firsts): Adjust.
137
1382002-05-06 Akim Demaille <akim@epita.fr>
139
140 * src/muscle_tab.c (muscle_m4_output): Must return TRUE for
141 hash_do_for_each.
142
1432002-05-06 Akim Demaille <akim@epita.fr>
144
145 * src/LR0.c (new_state, get_state): Instead of using the global
146 `kernel_size' and `kernel_base', have two new arguments:
147 `core_size' and `core'.
148 Adjust callers.
149
1502002-05-06 Akim Demaille <akim@epita.fr>
151
152 * src/reader.c (packgram): No longer end `ritem' with a 0
153 sentinel: it is not used.
154
1552002-05-05 Akim Demaille <akim@epita.fr>
156
157 New experimental feature: display the lookaheads in the report and
158 graph.
159
160 * src/print (print_core): When --trace-flag, display the rules
161 lookaheads.
162 * src/print_graph.c (print_core): Likewise.
163 Swap the arguments.
164 Adjust caller.
165
1662002-05-05 Akim Demaille <akim@epita.fr>
167
168 * tests/torture.at (Many lookaheads): New test.
169
1702002-05-05 Akim Demaille <akim@epita.fr>
171
172 * src/output.c (GENERATE_OUTPUT_TABLE): Replace with...
173 (GENERATE_MUSCLE_INSERT_TABLE): this.
174 (output_int_table, output_unsigned_int_table, output_short_table)
175 (output_token_number_table, output_item_number_table): Replace with...
176 (muscle_insert_int_table, muscle_insert_unsigned_int_table)
177 (muscle_insert_short_table, muscle_insert_token_number_table)
178 (muscle_insert_item_number_table): these.
179 Adjust all callers.
180 (prepare_tokens): Don't free `translations', since...
181 * src/reader.h, src/reader.c (grammar_free): do it.
182 Move to...
183 * src/gram.h, src/gram.c (grammar_free): here.
184 * data/bison.simple, data/bison.c++: b4_token_number_max is now
185 b4_translate_max.
186
1872002-05-05 Akim Demaille <akim@epita.fr>
188
189 * src/output.c (output_unsigned_int_table): New.
190 (prepare_rules): `i' is unsigned.
191 `prhs', `rline', `r2' are unsigned int.
192 Rename muscle `rhs_number_max' as `rhs_max'.
193 Output muscles `prhs_max', `rline_max', and `r2_max'.
194 Free rline and r1.
195 * data/bison.simple, data/bison.c++: Adjust to use these muscles
196 to compute types instead of constant types.
197 * tests/regression.at (Web2c Actions): Adjust.
198
1992002-05-04 Akim Demaille <akim@epita.fr>
200
201 * src/symtab.h (SALIAS, SUNDEF): Rename as...
202 (USER_NUMBER_ALIAS, USER_NUMBER_UNDEFINED): these.
203 Adjust dependencies.
204 * src/output.c (token_definitions_output): Be sure not to output a
205 `#define 'a'' when fed with `%token 'a' "a"'.
206 * tests/regression.at (Token definitions): New.
207
2082002-05-03 Paul Eggert <eggert@twinsun.com>
209
210 * data/bison.simple (b4_token_defines): Also define YYTOKENTYPE
211 for K&R C.
212
2132002-05-03 gettextize <bug-gnu-gettext@gnu.org>
214
215 * Makefile.am (SUBDIRS): Remove intl.
216 (EXTRA_DIST): Add config/config.rpath.
217
2182002-05-03 Akim Demaille <akim@epita.fr>
219
220 * data/bison.simple (m4_if): Don't output empty enums.
221 And actually, output valid enum definitions :(.
222
2232002-05-03 Akim Demaille <akim@epita.fr>
224
225 * configure.bat: Remove, completely obsolete.
226 * Makefile.am (EXTRA_DIST): Adjust.
227 Don't distribute config.rpath...
228 * config/Makefile.am (EXTRA_DIST): Do it.
229
2302002-05-03 Akim Demaille <akim@epita.fr>
231
232 * configure.in (GETTEXT_VERSION): New.
233 Suggested by Bruno Haible for the forthcoming Gettext 0.10.3.
234
2352002-05-03 Akim Demaille <akim@epita.fr>
236
237 * data/bison.simple (b4_token_enum): New.
238 (b4_token_defines): Use it to output tokens both as #define and
239 enums.
240 Suggested by Paul Eggert.
241 * src/output.c (token_definitions_output): Don't output spurious
242 white spaces.
243
2442002-05-03 Akim Demaille <akim@epita.fr>
245
246 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
247
2482002-05-02 Robert Anisko <robert@lrde.epita.fr>
249
250 * data/bison.c++: Adapt expansion of $s and @s to the C++ parser.
251 Update the stack class, give a try to deque as the default container.
252
2532002-05-02 Akim Demaille <akim@epita.fr>
254
255 * data/bison.simple (yyparse): Do not implement @$ = @1.
256 (YYLLOC_DEFAULT): Adjust to do it.
257 * doc/bison.texinfo (Location Default Action): Fix.
258
2592002-05-02 Akim Demaille <akim@epita.fr>
260
261 * src/reader.c (parse_braces): Merge into...
262 (parse_action): this.
263
2642002-05-02 Akim Demaille <akim@epita.fr>
265
266 * configure.in (ALL_LINGUAS): Remove.
267 * po/LINGUAS, hr.po: New.
268
2692002-05-02 Akim Demaille <akim@epita.fr>
270
271 Remove the so called hairy (semantic) parsers.
272
273 * src/system.h (EXT_GUARD_C, EXT_STYPE_H): Remove.
274 * src/gram.h, src/gram.c (semantic_parser): Remove.
275 (rule_t): Remove the guard and guard_line members.
276 * src/lex.h (token_t): remove tok_guard.
277 * src/options.c (option_table): Remove %guard and %semantic_parser
278 support.
279 * src/output.c, src/output.h (guards_output): Remove.
280 (prepare): Adjust.
281 (token_definitions_output): Don't output the `T'
282 tokens (???).
283 (output_skeleton): Don't output the guards.
284 * src/files.c, src/files.c (attrsfile): Remove.
285 * src/reader.c (symbol_list): Remove the guard and guard_line
286 members.
287 Adjust dependencies.
288 (parse_guard): Remove.
289 * data/bison.hairy: Remove.
290 * doc/bison.texinfo (Environment Variables): Remove occurrences of
291 BISON_HAIRY.
292
2932002-05-02 Akim Demaille <akim@epita.fr>
294
295 * src/reader.c (copy_at, copy_dollarm parse_braces, parse_action)
296 (parse_guard): Rename the formal argument `stack_offset' as
297 `rule_length', which is more readable.
298 Adjust callers.
299 (copy_at, copy_dollar): Instead of outputting the hard coded
300 values of $$, $n and so forth, output invocation to b4_lhs_value,
301 b4_lhs_location, b4_rhs_value, and b4_rhs_location.
302 Note: this patch partially drops `semantic-parser' support: it
303 always does `rule_length - n', where semantic parsers ought to
304 always use `-n'.
305 * data/bison.simple, data/bison.c++ (b4_lhs_value)
306 (b4_lhs_location, b4_rhs_value, and b4_rhs_location: New.
307
3082002-05-02 Akim Demaille <akim@epita.fr>
309
310 * configure.in (AC_INIT): Bump to 1.49b.
311 (AM_INIT_AUTOMAKE): Short invocation.
312
3132002-05-02 Akim Demaille <akim@epita.fr>
314
315 Version 1.49a.
316
3172002-05-01 Akim Demaille <akim@epita.fr>
318
319 * src/skeleton.h: Remove.
320
3212002-05-01 Akim Demaille <akim@epita.fr>
322
323 * src/skeleton.h: Fix the #endif.
324 Reported by Magnus Fromreide.
325
3262002-04-26 Paul Eggert <eggert@twinsun.com>
327
328 * data/bison.simple (YYSTYPE_IS_TRIVIAL, YYLTYPE_IS_TRIVIAL):
329 Define if we define YYSTYPE and YYLTYPE, respectively.
330 (YYCOPY): Fix [] quoting problem in the non-GCC case.
331
3322002-04-25 Robert Anisko <robert@lrde.epita.fr>
333
334 * src/scan-skel.l: Postprocess quadrigraphs.
335
336 * src/reader.c (copy_character): New function, used to output
337 single characters while replacing `[' and `]' with quadrigraphs, to
338 avoid troubles with M4 quotes.
339 (copy_comment): Output characters with copy_character.
340 (read_additionnal_code): Likewise.
341 (copy_string2): Likewise.
342 (copy_definition): Likewise.
343
344 * tests/calc.at: Exercise M4 quoting.
345
3462002-04-25 Akim Demaille <akim@epita.fr>
347
348 * tests/sets.at (AT_EXTRACT_SETS): Sed portability issue: no space
349 between `!' and the command.
350 Reported by Paul Eggert.
351
3522002-04-24 Robert Anisko <robert@lrde.epita.fr>
353
354 * tests/calc.at: Exercise prologue splitting.
355
356 * data/bison.simple, data/bison.c++: Use `b4_pre_prologue' and
357 `b4_post_prologue' instead of `b4_prologue'.
358
359 * src/output.c (prepare): Add the `pre_prologue' and `post_prologue'
360 muscles.
361 (output): Free pre_prologue_obstack and post_prologue_obstack.
362 * src/files.h, src/files.c (attrs_obstack): Remove.
363 (pre_prologue_obstack, post_prologue_obstack): New.
364 * src/reader.c (copy_definition): Add a parameter to specify the
365 obstack to fill, instead of using attrs_obstack unconditionally.
366 (read_declarations): Pass pre_prologue_obstack to copy_definition if
367 `%union' has not yet been seen, pass post_prologue_obstack otherwise.
368
3692002-04-23 Paul Eggert <eggert@twinsun.com>
370
371 * data/bison.simple: Remove unnecessary commentary and white
372 space differences from 1_29-branch.
373 Depend on YYERROR_VERBOSE, not defined (YYERROR_VERBOSE).
374
375 (union yyalloc, YYSTACK_GAP_MAX, YYSTACK_BYTES, YYCOPY,
376 YYSTACK_RELOCATE): Do not define if yyoverflow is defined, or
377 if this is a C++ parser and YYSTYPE or YYLTYPE has nontrivial
378 constructors or destructors.
379
380 (yyparse) [! defined YYSTACK_RELOCATE]: Do not relocate the stack.
381
3822002-04-23 Akim Demaille <akim@epita.fr>
383
384 * tests/sets.at (AT_EXTRACT_SETS): Don't use 8 char long sed labels.
385 * tests/synclines.at (AT_TEST_SYNCLINE): Be robust to GCC's
386 location with columns.
387 * tests/conflicts.at (%nonassoc and eof): Don't use `error.h'.
388 All reported by Paul Eggert.
389
3902002-04-22 Akim Demaille <akim@epita.fr>
391
392 * src/reduce.c (dump_grammar): Move to...
393 * src/gram.h, src/gram.c (grammar_dump): here.
394 Be sure to separate long item numbers.
395 Don't read the members of a rule's prec if its nil.
396
3972002-04-22 Akim Demaille <akim@epita.fr>
398
399 * src/output.c (table_size, table_grow): New.
400 (MAXTABLE): Remove, replace uses with table_size.
401 (pack_vector): Instead of dying when the table is too big, grow it.
402
4032002-04-22 Akim Demaille <akim@epita.fr>
404
405 * data/bison.simple (yyr1): Its type is that of a token number.
406 * data/bison.c++ (r1_): Likewise.
407 * tests/regression.at (Web2c Actions): Adjust.
408
4092002-04-22 Akim Demaille <akim@epita.fr>
410
411 * src/reader.c (token_translations_init): 256 is now the default
412 value for the error token, i.e., it will be assigned another
413 number if the user assigned 256 to one of her tokens.
414 (reader): Don't force 256 to error.
415 * doc/bison.texinfo (Symbols): Adjust.
416 * tests/torture.at (AT_DATA_HORIZONTAL_GRAMMAR)
417 (AT_DATA_TRIANGULAR_GRAMMAR): Number the tokens as 1, 2, 3
418 etc. instead of 10, 20, 30 (which was used to `jump' over error
419 (256) and undefined (2)).
420
4212002-04-22 Akim Demaille <akim@epita.fr>
422
423 Propagate more token_number_t.
424
425 * src/gram.h (token_number_as_item_number)
426 (item_number_as_token_number): New.
427 * src/output.c (GENERATE_OUTPUT_TABLE): New.
428 Use it to create output_item_number_table and
429 output_token_number_table.
430 * src/LR0.c, src/derives.c, src/gram.c, src/gram.h, src/lalr.c,
431 * src/lex.c, src/nullable.c, src/output.c, src/print.c,
432 * src/print_graph.c, src/reader.c, src/reduce.c, src/state.h,
433 * src/symtab.c, src/symtab.h: Use token_number_t instead of shorts.
434
4352002-04-22 Akim Demaille <akim@epita.fr>
436
437 * src/output.h, src/output.c (get_lines_number): Remove.
438
4392002-04-19 Akim Demaille <akim@epita.fr>
440
441 * doc/bison.texinfo (Actions): Make clear that `|' is not the same
442 as Lex/Flex'.
443 (Debugging): More details about enabling the debugging features.
444 (Table of Symbols): Describe $$, $n, @$, and @n.
445 Suggested by Tim Josling.
446
4472002-04-19 Akim Demaille <akim@epita.fr>
448
449 * doc/bison.texinfo: Remove the uses of the obsolete @refill.
450
4512002-04-10 Akim Demaille <akim@epita.fr>
452
453 * src/system.h: Rely on HAVE_LIMITS_H.
454 Suggested by Paul Eggert.
455
4562002-04-09 Akim Demaille <akim@epita.fr>
457
458 * tests/calc.at (_AT_CHECK_CALC_ERROR): Receive as argument the
459 full stderr, and strip it according to the bison options, instead
460 of composing the error message from different bits.
461 This makes it easier to check for several error messages.
462 Adjust all the invocations.
463 Add an invocation exercising the error token.
464 Add an invocation demonstrating a stupid error message.
465 (_AT_DATA_CALC_Y): Follow the GCS: initial column is 1, not 0.
466 Adjust the tests.
467 Error message are for stderr, not stdout.
468
4692002-04-09 Akim Demaille <akim@epita.fr>
470
471 * src/gram.h, src/gram.c (error_token_number): Remove, use
472 errtoken->number.
473 * src/reader.c (reader): Don't specify the user token number (2)
474 for $undefined, as it uselessly prevents using it.
475 * src/gram.h (token_number_t): Move to...
476 * src/symtab.h: here.
477 (state_t.number): Is a token_number_t.
478 * src/print.c, src/reader.c: Use undeftoken->number instead of
479 hard coded 2.
480 (Even though this 2 is not the same as above: the number of the
481 undeftoken remains being 2, it is its user token number which
482 might not be 2).
483 * src/output.c (prepare_tokens): Rename the `maxtok' muscle with
484 `user_token_number_max'.
485 Output `undef_token_number'.
486 * data/bison.simple, data/bison.c++: Use them.
487 Be sure to map invalid yylex return values to
488 `undef_token_number'. This saves us from gratuitous SEGV.
489
490 * tests/conflicts.at (Solved SR Conflicts)
491 (Unresolved SR Conflicts): Adjust.
492 * tests/regression.at (Web2c Actions): Adjust.
493
4942002-04-08 Akim Demaille <akim@epita.fr>
495
496 * data/bison.c++: s/b4_item_number_max/b4_rhs_number_max/.
497 Adding #line.
498 Remove the duplicate `typedefs'.
499 (RhsNumberType): Fix the declaration and various other typos.
500 Use __ofile__.
501 * data/bison.simple: Use __ofile__.
502 * src/scan-skel.l: Handle __ofile__.
503
5042002-04-08 Akim Demaille <akim@epita.fr>
505
506 * src/gram.h (item_number_t): New, the type of item numbers in
507 RITEM. Note that it must be able to code symbol numbers as
508 positive number, and the negation of rule numbers as negative
509 numbers.
510 Adjust all dependencies (pretty many).
511 * src/reduce.c (rule): Remove this `short *' pointer: use
512 item_number_t.
513 * src/system.h (MINSHORT, MAXSHORT): Remove.
514 Include `limits.h'.
515 Adjust dependencies to using SHRT_MAX and SHRT_MIN.
516 (shortcpy): Remove.
517 (MAXTABLE): Move to...
518 * src/output.c (MAXTABLE): here.
519 (prepare_rules): Use output_int_table to output rhs.
520 * data/bison.simple, data/bison.c++: Adjust.
521 * tests/torture.at (Big triangle): Move the limit from 254 to
522 500.
523 * tests/regression.at (Web2c Actions): Ajust.
524
525 Trying with bigger grammars shows various phenomena: at 3000 (28Mb
526 of grammar file) bison is killed by my system, at 2000 (12Mb) bison
527 passes, but produces negative #line number, once fixed, GCC is
528 killed while compiling 14Mb, at 1500 (6.7 Mb of grammar, 8.2Mb of
529 C), it passes.
530 * src/state.h (state_h): Code input lines on ints, not shorts.
531
5322002-04-08 Akim Demaille <akim@epita.fr>
533
534 * src/reduce.c (reduce_grammar): First reduce the nonterminals,
535 and then the grammar.
536
5372002-04-08 Akim Demaille <akim@epita.fr>
538
539 * src/system.h: No longer using strndup.
540
5412002-04-07 Akim Demaille <akim@epita.fr>
542
543 * src/muscle_tab.h (MUSCLE_INSERT_LONG_INT): New.
544 * src/output.c (output_table_data): Return the longest number.
545 (prepare_tokens): Output `token_number_max').
546 * data/bison.simple, data/bison.c++ (b4_sint_type, b4_uint_type):
547 New.
548 Use them to define yy_token_number_type/TokenNumberType.
549 Use this type for yytranslate.
550 * tests/torture.at (Big triangle): Push the limit from 124 to
551 253.
552 * tests/regression.at (Web2c Actions): Adjust.
553
5542002-04-07 Akim Demaille <akim@epita.fr>
555
556 * tests/torture.at (Big triangle): New.
557 (GNU AWK Grammar, GNU Cim Grammar): Move to...
558 * tests/existing.at: here.
559
5602002-04-07 Akim Demaille <akim@epita.fr>
561
562 * src/gram.h, src/gram.c (nitems): Remove, it is an alias of
563 nritems.
564 Adjust dependencies.
565
5662002-04-07 Akim Demaille <akim@epita.fr>
567
568 * src/reader.c: Normalize increments to prefix form.
569
5702002-04-07 Akim Demaille <akim@epita.fr>
571
572 * src/reader.c, symtab.c: Remove debugging code.
573
5742002-04-07 Akim Demaille <akim@epita.fr>
575
576 Rename all the `bucket's as `symbol_t'.
577
578 * src/gram.c, src/gram.h, src/lex.c, src/lex.h, src/output.c,
579 * src/reader.c, src/reader.h, src/reduce.c, src/state.h,
580 * src/symtab.c, src/symtab.h (bucket): Rename as...
581 (symbol_t): this.
582 (symbol_list_new, bucket_check_defined, bucket_make_alias)
583 (bucket_check_alias_consistence, bucket_pack, bucket_translation)
584 (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
585 (buckets_new, buckets_free, buckets_do): Rename as...
586 (symbol_list_new, symbol_check_defined, symbol_make_alias)
587 (symbol_check_alias_consistence, symbol_pack, symbol_translation)
588 (symbol_new, symbol_free, hash_compare_symbol_t, hash_symbol_t)
589 (symbols_new, symbols_free, symbols_do): these.
590
5912002-04-07 Akim Demaille <akim@epita.fr>
592
593 Use lib/hash for the symbol table.
594
595 * src/gram.c (ntokens): Initialize to 1, to reserve a slot for
596 EOF.
597 * src/lex.c (lex): Set the `number' member of new terminals.
598 * src/reader.c (bucket_check_defined, bucket_make_alias)
599 (bucket_check_alias_consistence, bucket_translation): New.
600 (reader, grammar_free, readgram, token_translations_init)
601 (packsymbols): Adjust.
602 (reader): Number the predefined tokens.
603 * src/reduce.c (inaccessable_symbols): Just use hard coded numbers
604 for predefined tokens.
605 * src/symtab.h (bucket): Remove all the hash table related
606 members.
607 * src/symtab.c (symtab): Replace by...
608 (bucket_table): this.
609 (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
610 (buckets_new, buckets_do): New.
611
6122002-04-07 Akim Demaille <akim@epita.fr>
613
614 * src/gram.c (nitems, nrules, nsyms, ntokens, nvars, nritems)
615 (start_symbol, max_user_token_number, semantic_parser)
616 (error_token_number): Initialize.
617 * src/reader.c (grammar, start_flag, startval, typed, lastprec):
618 Initialize.
619 (reader): Don't.
620 (errtoken, eoftoken, undeftoken, axiom): Extern.
621
6222002-04-07 Akim Demaille <akim@epita.fr>
623
624 * src/gram.h (rule_s): prec and precsym are now pointers
625 to the bucket giving the priority/associativity.
626 Member `associativity' removed: useless.
627 * src/reduce.c, src/conflicts.c: Adjust.
628
6292002-04-07 Akim Demaille <akim@epita.fr>
630
631 * src/lalr.c, src/LR0.c, src/closure.c, src/gram.c, src/reduce.c:
632 Properly escape the symbols' TAG when outputting them.
633
6342002-04-07 Akim Demaille <akim@epita.fr>
635
636 * src/lalr.h (LA): Is a bitsetv, not bitset*.
637
6382002-04-07 Akim Demaille <akim@epita.fr>
639
640 * src/lalr.h, src/lalr.c (LAruleno): Replace with...
641 (LArule): this, which is an array to rule_t*.
642 * src/print.c, src/conflicts.c: Adjust.
643
6442002-04-07 Akim Demaille <akim@epita.fr>
645
646 * src/gram.h (rule_t): Rename `number' as `user_number'.
647 `number' is a new member.
648 Adjust dependencies.
649 * src/reduce.c (reduce_grammar_tables): Renumber rule_t.number.
650
6512002-04-07 Akim Demaille <akim@epita.fr>
652
653 As a result of the previous patch, it is no longer needed
654 to reorder ritem itself.
655
656 * src/reduce.c (reduce_grammar_tables): Don't sort RITEM.
657
6582002-04-07 Akim Demaille <akim@epita.fr>
659
660 Be sure never to walk through RITEMS, but use only data related to
661 the rules themselves. RITEMS should be banished.
662
663 * src/output.c (output_token_translations): Rename as...
664 (prepare_tokens): this.
665 In addition to `translate', prepare the muscles `tname' and
666 `toknum', which were handled by...
667 (output_rule_data): this.
668 Remove, and move the remainder of its outputs into...
669 (prepare_rules): this new routines, which also merges content from
670 (output_gram): this.
671 (prepare_rules): Be sure never to walk through RITEMS.
672 (output_stos): Rename as...
673 (prepare_stos): this.
674 (output): Always invoke prepare_states, after all, just don't use it
675 in the output if you don't need it.
676
6772002-04-07 Akim Demaille <akim@epita.fr>
678
679 * src/LR0.c (new_state): Display `nstates' as the name of the
680 newly created state.
681 Adjust to initialize first_state and last_state if needed.
682 Be sure to distinguish the initial from the final state.
683 (new_states): Create the itemset of the initial state, and use
684 new_state.
685 * src/closure.c (closure): Now that the initial state has its
686 items properly set, there is no need for a special case when
687 creating `ruleset'.
688
689 As a result, now the rule 0, reducing to $axiom, is visible in the
690 outputs. Adjust the test suite.
691
692 * tests/conflicts.at (Solved SR Conflicts)
693 (Unresolved SR Conflicts): Adjust.
694 * tests/regression.at (Web2c Report, Rule Line Numbers): Idem.
695 * tests/conflicts.at (S/R in initial): New.
696
6972002-04-07 Akim Demaille <akim@epita.fr>
698
699 * src/LR0.c (allocate_itemsets): Don't loop over ritem: loop over
700 the RHS of the rules.
701 * src/output.c (output_gram): Likewise.
702
7032002-04-07 Akim Demaille <akim@epita.fr>
704
705 * src/gram.h (rule_t): `lhs' is now a pointer to the symbol's
706 bucket.
707 Adjust all dependencies.
708 * src/reduce.c (nonterminals_reduce): Don't forget to renumber the
709 `number' of the buckets too.
710 * src/gram.h: Include `symtab.h'.
711 (associativity): Move to...
712 * src/symtab.h: here.
713 No longer include `gram.h'.
714
7152002-04-07 Akim Demaille <akim@epita.fr>
716
717 * src/gram.h, src/gram.c (rules_rhs_length): New.
718 (ritem_longest_rhs): Use it.
719 * src/gram.h (rule_t): `number' is a new member.
720 * src/reader.c (packgram): Set it.
721 * src/reduce.c (reduce_grammar_tables): Move the useless rules at
722 the end of `rules', and count them out of `nrules'.
723 (reduce_output, dump_grammar): Adjust.
724 * src/print.c (print_grammar): It is no longer needed to check for
725 the usefulness of a rule, as useless rules are beyond `nrules + 1'.
726 * tests/reduce.at (Reduced Automaton): New test.
727
7282002-04-07 Akim Demaille <akim@epita.fr>
729
730 * src/reduce.c (inaccessable_symbols): Fix a buglet: because of a
731 lacking `+ 1' to nrules, Bison reported as useless a token if it
732 was used solely to set the precedence of the last rule...
733
7342002-04-07 Akim Demaille <akim@epita.fr>
735
736 * data/bison.c++, data/bison.simple: Don't output the current file
737 name in #line, to avoid useless diffs between two identical
738 outputs under different names.
739
7402002-04-07 Akim Demaille <akim@epita.fr>
741
742 * src/closure.c, src/print.c, src/reader.c, src/reduce.c:
743 Normalize loops to using `< nrules + 1', not `<= nrules'.
744
7452002-04-07 Akim Demaille <akim@epita.fr>
746
747 * TODO: Update.
748
7492002-04-07 Akim Demaille <akim@epita.fr>
750
751 * src/output.c, src/reader.c, src/symtab.c, src/symtab.h: Rename
752 bucket.value as bucket.number.
753
7542002-04-07 Akim Demaille <akim@epita.fr>
755
756 * src/closure.c, src/derives.c, src/gram.h, src/lalr.c,
757 * src/nullable.c, src/output.c, src/print.c, src/print_graph.c,
758 * src/reader.c, src/reduce.c: Let rule_t.rhs point directly to the
759 RHS, instead of being an index in RITEMS.
760
7612002-04-04 Paul Eggert <eggert@twinsun.com>
762
763 * doc/bison.texinfo: Update copyright date.
764 (Rpcalc Lexer, Symbols, Token Decl): Don't assume ASCII.
765 (Symbols): Warn about running Bison in one character set,
766 but compiling and/or running in an incompatible one.
767 Warn about character code 256, too.
768
7692002-04-03 Paul Eggert <eggert@twinsun.com>
770
771 * src/bison.data (YYSTACK_ALLOC): Depend on whether
772 YYERROR_VERBOSE is nonzero, not whether it is defined.
773
774 Merge changes from bison-1_29-branch.
775
7762002-03-20 Paul Eggert <eggert@twinsun.com>
777
778 Merge fixes from Debian bison_1.34-1.diff.
779
780 * configure.in (AC_PREREQ): 2.53.
781
7822002-03-20 Akim Demaille <akim@epita.fr>
783
784 * src/conflicts.c (log_resolution): Argument `resolution' is const.
785
7862002-03-19 Paul Eggert <eggert@twinsun.com>
787
788 * src/bison.simple (YYCOPY): New macro.
789 (YYSTACK_RELOCATE): Use it.
790 Remove Type arg; no longer needed. All callers changed.
791 (yymemcpy): Remove; no longer needed.
792
793 * Makefile.am (AUTOMAKE_OPTIONS): 1.6.
794 * doc/Makefile.am (AUTOMAKE_OPTIONS): Remove.
795
7962002-03-19 Akim Demaille <akim@epita.fr>
797
798 Test and fix the #line outputs.
799
800 * tests/atlocal.at (GCC): New.
801 * tests/synclines.at (AT_TEST_SYNCLINE): New macro.
802 (Prologue synch line, ,%union synch line, Postprologue synch line)
803 (Action synch line, Epilogue synch line): New tests.
804 * src/reader.c (parse_union_decl): Define the muscle stype_line.
805 * data/bison.simple, data/bison.c++: Use it.
806
8072002-03-19 Akim Demaille <akim@epita.fr>
808
809 * tests/regression.at (%nonassoc and eof, Unresolved SR Conflicts)
810 (Solved SR Conflicts, %expect not enough, %expect right)
811 (%expect too much): Move to...
812 * tests/conflicts.at: this new file.
813
8142002-03-19 Akim Demaille <akim@epita.fr>
815
816 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
817 * data/bison.simple, data/bison.c++: Handle the `#define' part, so
818 that we can move to enums for instance.
819 * src/output.c (token_definitions_output): Output a list of
820 `token-name, token-number' instead of the #define.
821 (output_skeleton): Name this list `b4_tokens', not `b4_tokendefs'.
822
8232002-03-14 Akim Demaille <akim@epita.fr>
824
825 Use Gettext 0.11.1.
826
8272002-03-09 Robert Anisko <robert@lrde.epita.fr>
828
829 * data/bison.c++: Make the user able to add members to the generated
830 parser by subclassing.
831
8322002-03-05 Robert Anisko <robert@lrde.epita.fr>
833
834 * src/reader.c (read_additionnal_code): `c' should be an integer, not
835 a character.
836 Reported by Nicolas Tisserand and Nicolas Burrus.
837
8382002-03-04 Robert Anisko <robert@lrde.epita.fr>
839
840 * src/reader.c: Warn about lacking semi-colons, do not complain.
841
8422002-03-04 Robert Anisko <robert@lrde.epita.fr>
843
844 * data/bison.c++: Remove a debug line.
845
8462002-03-04 Robert Anisko <robert@lrde.epita.fr>
847
848 * data/bison.c++: Unmerge value as yylval and value as yyval. Unmerge
849 location as yylloc and location as yyloc. Use YYLLOC_DEFAULT, and
850 provide a default implementation.
851
8522002-03-04 Akim Demaille <akim@epita.fr>
853
854 * tests/input.at (Invalid $n, Invalid @n): Add the ending `;'.
855 * tests/output.at (AT_CHECK_OUTPUT): Likewise.
856 * tests/headers.at (AT_TEST_CPP_GUARD_H): Ditto.
857 * tests/semantic.at (Parsing Guards): Similarly.
858 * src/reader.at (readgram): Complain if the last rule is not ended
859 with a semi-colon.
860
8612002-03-04 Akim Demaille <akim@epita.fr>
862
863 * src/warshall.h, src/warshall.c (bitmatrix_print): Move to...
864 * src/closure.c: here.
865 (set_firsts): Use bitsetv_reflexive_transitive_closure instead of
866 RTC.
867 * src/warshall.h, src/warshall.c: Remove.
868 * tests/sets.at (Broken Closure): Adjust.
869
8702002-03-04 Akim Demaille <akim@epita.fr>
871
872 * src/output.c (output_skeleton): tempdir is const.
873 bytes_read is unused.
874
8752002-03-04 Akim Demaille <akim@epita.fr>
876
877 * lib/bbitset.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
878 * lib/bitsetv.h, lib/ebitset.c, lib/lbitset.c, lib/sbitset.c:
879 Update.
880 From Michael Hayes.
881
8822002-03-04 Akim Demaille <akim@epita.fr>
883
884 * src/closure.c (closure): `r' is unused.
885
8862002-03-04 Akim Demaille <akim@epita.fr>
887
888 * tests/sets.at (Broken Closure): Add the ending `;'.
889 * src/reader.at (readgram): Complain if a rule is not ended with a
890 semi-colon.
891
8922002-03-04 Akim Demaille <akim@epita.fr>
893
894 * src/conflicts.c (set_conflicts): Use bitset_disjoint_p.
895 (count_sr_conflicts): Use bitset_count.
896 * src/reduce.c (inaccessable_symbols): Ditto.
897 (bits_size): Remove.
898 * src/warshall.h, src/warshall.c: Convert to bitsetv.
899
9002002-03-04 Akim Demaille <akim@epita.fr>
901
902 * src/closure.c, src/conflicts.c, src/lalr.c, src/print.c,
903 * src/reduce.c: Remove the `bitset_zero's following the
904 `bitset_create's, as now it is performed by the latter.
905
9062002-03-04 Akim Demaille <akim@epita.fr>
907
908 * lib/bitset.c, lib/bitset.h, lib/bitsetv.c, lib/bitsetv.h,
909 * lib/ebitset.c, lib/ebitset.h, lib/lbitset.c, lib/lbitset.h,
910 * lib/sbitset.c, lib/sbitset.h, lib/bbitset.h: Update from the
911 latest sources from Michael.
912
9132002-03-04 Akim Demaille <akim@epita.fr>
914
915 * src/output.c (output): Don't free the grammar.
916 * src/reader.c (grammar_free): New.
917 * src/main.c (main): Call it and don't free symtab here.
918
9192002-03-04 Akim Demaille <akim@epita.fr>
920
921 * src/lex.c (parse_percent_token): Be sure to 0-end token_buffer
922 before returning.
923 Reported by Benoit Perrot.
924
9252002-03-04 Akim Demaille <akim@epita.fr>
926
927 Use bitset operations when possible, not loops over bits.
928
929 * src/conflicts.c (set_conflicts, count_sr_conflicts): Use
930 bitset_or.
931 * src/print.c (print_reductions): Use bitset_and, bitset_andn.
932 * src/reduce.c (useless_nonterminals): Formatting changes.
933 * src/warshall.c (TC): Use bitset_or.
934
9352002-03-04 Akim Demaille <akim@epita.fr>
936
937 * src/lalr.h, src/lalr.c (tokensetsize): Remove, unused.
938 * src/system.h (BITS_PER_WORD, WORDSIZE, SETBIT, RESETBIT, BITISSET):
939 Ditto.
940
9412002-03-04 Akim Demaille <akim@epita.fr>
942
943 * src/lalr.c (F): Now a bitset*.
944 Adjust all dependencies.
945
9462002-03-04 Akim Demaille <akim@epita.fr>
947
948 * src/conflicts.c (shiftset, lookaheadset): Now bitset.
949 Adjust all dependencies.
950
9512002-03-04 Akim Demaille <akim@epita.fr>
952
953 * src/L0.c, src/LR0.h (nstates): Be size_t.
954 Adjust comparisons (signed vs unsigned).
955 * src/conflics.c, src/lalr.c, src/lalr.h, src/output.c (LA): Now a
956 bitset*.
957 Adjust all dependencies.
958
9592002-03-04 Akim Demaille <akim@epita.fr>
960
961 * src/closure.c (firsts): Now, also a bitset.
962 Adjust all dependencies.
963 (varsetsize): Remove, now unused.
964 * src/warshall.h, src/warshall.c: Now work on arrays of bitsets.
965
9662002-03-04 Akim Demaille <akim@epita.fr>
967
968 * src/print.c: Convert to use bitset.h, not hand coded iterations
969 over ints.
970
9712002-03-04 Akim Demaille <akim@epita.fr>
972
973 * src/reduce.c: Convert to use bitset.h, not hand coded BSet.
974
9752002-03-04 Akim Demaille <akim@epita.fr>
976
977 * src/closure.c (ruleset): Be a bitset.
978 (rulesetsize): Remove.
979
9802002-03-04 Akim Demaille <akim@epita.fr>
981
982 * lib/bitset-int.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
983 * lib/bitsetv.h, lib/ebitset.c, lib/ebitset.h, lib/lbitset.c,
984 * lib/lbitset.h, lib/sbitset.c, lib/sbitset.h: New.
985 * src/closure.c (fderives): Be an array of bitsets.
986
9872002-02-28 Robert Anisko <robert@lrde.epita.fr>
988
989 * data/bison.c++: Merge the two generated headers. Insert a copyright
990 notice in each output file.
991
9922002-02-28 Akim Demaille <akim@epita.fr>
993
994 * data/bison.c++: Copy the prologue of bison.simple to fetch
995 useful M4 definitions, such as b4_header_guard.
996
9972002-02-25 Akim Demaille <akim@epita.fr>
998
999 * src/getargs.c (version): Give the name of the authors, and use a
1000 translator friendly scheme for the bgr
1001 copyright notice.
1002
10032002-02-25 Akim Demaille <akim@epita.fr>
1004
1005 * src/output.c (header_output): Remove, now handled completely via
1006 M4.
1007
10082002-02-25 Akim Demaille <akim@epita.fr>
1009
1010 * m4/m4.m4: New, from CVS Autoconf.
1011 * configure.in: Invoke it.
1012 * src/output.c (output_skeleton): Use its result instead of the
1013 hard coded name.
1014
10152002-02-25 Akim Demaille <akim@epita.fr>
1016
1017 * lib/tempname.c, lib/mkstemp.c, m4/mkstemp.m4: New, stolen from
1018 Fileutils 4.1.5.
1019 * configure.in: Invoke UTILS_FUNC_MKSTEMP.
1020 * src/output.c (output_skeleton): Use mkstemp to create a real
1021 temporary file.
1022 Move the filling of `skeleton' and its muscle to...
1023 (prepare): here.
1024 (output): Move the definition of the prologue muscle to...
1025 (prepare): here.
1026 * src/system.h (DEFAULT_TMPDIR): New.
1027
10282002-02-14 Paul Eggert <eggert@twinsun.com>
1029
1030 Remove the support for C++ namespace cleanliness; it was
1031 causing more problems than it was curing, since it didn't work
1032 properly on some nonstandard C++ compilers. This can wait
1033 for a proper C++ parser.
1034
1035 * NEWS: Document this.
1036 * doc/bison.texinfo (Bison Parser, Debugging): Remove special mention
1037 of C++, as it's treated like C now.
1038 * src/bison.simple (YYSTD): Remove.
1039 (YYSIZE_T, YYFPRINTF, YYPARSE_PARAM_ARG, YYPARSE_PARAM_DECL):
1040 Treat C++ just like Standard C instead of trying to support
1041 namespace cleanliness.
1042
10432002-02-14 Akim Demaille <akim@epita.fr>
1044
1045 * tests/regression.at (else): Adjust to Andreas' change.
1046
10472002-02-14 Akim Demaille <akim@epita.fr>
1048
1049 * lib/Makefile.am (EXTRA_DIST): Ship strnlen.c.
1050
10512002-02-13 Andreas Schwab <schwab@suse.de>
1052
1053 * src/output.c (output_rule_data): Don't output NULL, it might
1054 not be defined yet.
1055
10562002-02-11 Robert Anisko <robert@lrde.epita.fr>
1057
1058 * data/bison.c++ (YYDEBUG, YYERROR_VERBOSE): After the prologue.
1059 (Copyright notice): Update.
1060
10612002-02-11 Akim Demaille <akim@epita.fr>
1062
1063 * tests/regression.at (%nonassoc and eof): Don't include
1064 nonportable headers.
1065
10662002-02-08 Robert Anisko <robert@lrde.epita.fr>
1067
1068 * data/bison.c++: Correct error recovery. Make the user able to
1069 initialize the starting location.
1070
10712002-02-07 Akim Demaille <akim@epita.fr>
1072
1073 * tests/input.at: New.
1074
10752002-02-07 Robert Anisko <robert@lrde.epita.fr>
1076
1077 * data/bison.c++: Replace some direct m4 expansions by constants. Be
1078 more consistent when naming methods and variables. Put preprocessor
1079 directives around tables only needed for debugging.
1080
10812002-02-07 Robert Anisko <robert@lrde.epita.fr>
1082
1083 * data/bison.c++ (yy::b4_name::print_): New method, replaces yyprint in
1084 C++ parsers.
1085 (yy::b4_name::parse): Use print_.
1086
10872002-02-07 Robert Anisko <robert@lrde.epita.fr>
1088
1089 * data/bison.c++ (yy::b4_name::parse): Error recovery is back.
1090
10912002-02-07 Robert Anisko <robert@lrde.epita.fr>
1092
1093 * data/bison.c++ (yy::b4_name::error_): New method, replaces yyerror in
1094 C++ parsers.
1095 (yy::b4_name::parse): Build verbose error messages, and use error_.
1096
10972002-02-06 Robert Anisko <robert@lrde.epita.fr>
1098
1099 * data/bison.c++: Fix m4 quoting in comments.
1100
11012002-02-06 Robert Anisko <robert@lrde.epita.fr>
1102
1103 * data/bison.c++: Adjust the parser code. Fix some muscles that were
1104 not expanded by m4.
1105
11062002-02-05 Akim Demaille <akim@epita.fr>
1107
1108 * data/bison.c++: Adjust to the M4 back end.
1109 More is certainly needed.
1110
11112002-02-05 Akim Demaille <akim@epita.fr>
1112
1113 Give a try to M4 as a back end.
1114
1115 * lib/readpipe.c: New, from wdiff.
1116 * src/Makefile.am (DEFS): Define PKGDATADIR, not BISON_SIMPLE and
1117 BISON_HAIRY.
1118 * src/system.h (BISON_HAIRY, BISON_SIMPLE): Remove the DOS and VMS
1119 specific values. Now it is m4 that performs the lookup.
1120 * src/parse-skel.y: Remove.
1121 * src/muscle_tab.c, src/muscle_tab.h (muscles_m4_output): New.
1122 * src/output.c (actions_output, guards_output)
1123 (token_definitions_output): No longer keeps track of the output
1124 line number, hence remove the second argument.
1125 (guards_output): Check against the guard member of a rule, not the
1126 action member.
1127 Adjust callers.
1128 (output_skeleton): Don't look for the skeleton location, let m4 do
1129 that.
1130 Create `/tmp/muscles.m4'. This is temporary, a proper temporary
1131 file will be used.
1132 Invoke `m4' on m4sugar.m4, muscles.m4, and the skeleton.
1133 (prepare): Given that for the time being changesyntax is not
1134 usable in M4, rename the muscles using `-' to `_'.
1135 Define `defines_flag', `output_parser_name' and `output_header_name'.
1136 * src/output.h (actions_output, guards_output)
1137 (token_definitions_output): Adjust prototypes.
1138 * src/scan-skel.l: Instead of scanning the skeletons, it now
1139 processes the output of m4: `__oline__' and `#output'.
1140 * data/bison.simple: Adjust to be used by M4(sugar).
1141 * tests/Makefile.am: Use check_SCRIPTS to make sure `bison' is up
1142 to date.
1143 * tests/bison.in: Use the secrete envvar `BISON_PKGDATADIR'
1144 instead of the dead `BISON_SIMPLE' and `BISON_HAIRY'.
1145 * data/m4sugar/m4sugar.m4, data/m4sugar/version.m4: New,
1146 shamelessly stolen from CVS Autoconf.
1147
11482002-02-05 Akim Demaille <akim@epita.fr>
1149
1150 * lib/hash.c, lib/hash.h: Replace with Fileutils 4.1's version.
1151 * configure.in: Check for the declarations of free and malloc.
1152 * src/muscle_tab.c: Adjust.
1153
11542002-02-05 Akim Demaille <akim@epita.fr>
1155
1156 * src/muscle_tab.c (muscle_init): Don't default to NULL muscle
1157 which have no values.
1158
11592002-02-05 Akim Demaille <akim@epita.fr>
1160
1161 * src/bison.simple, src/bison.hairy, src/bison.c++: Move to...
1162 * data/: here.
1163
11642002-01-29 Paul Eggert <eggert@twinsun.com>
1165
1166 * src/bison.simple (YYSIZE_T): Do not define merely because
1167 YYSTACK_USE_ALLOCA is nonzero or alloca or _ALLOCA_H are defined.
1168 On some platforms, <alloca.h> does not declare YYSTD (size_t).
1169
11702002-01-27 Akim Demaille <akim@epita.fr>
1171
1172 Fix `%nonassoc and eof'.
1173
1174 * src/state.c (errs_dup): Aaaah! The failure was due to bytes
1175 which were not properly copied! Replace
1176 memcpy (res->errs, src->errs, src->nerrs);
1177 with
1178 memcpy (res->errs, src->errs, src->nerrs * sizeof (src->errs[0]));
1179 !!!
1180 * tests/regression.at (%nonassoc and eof): Adjust to newest
1181 Autotest: `.' is not in the PATH.
1182
11832002-01-27 Akim Demaille <akim@epita.fr>
1184
1185 * tests/sets.at (AT_EXTRACT_SETS): New.
1186 (Nullable): Use it.
1187 (Firsts): New.
1188
11892002-01-26 Akim Demaille <akim@epita.fr>
1190
1191 * tests/actions.at, tests/calc.at, tests/headers.at,
1192 * tests/torture.at: Adjust to the newest Autotest which no longer
1193 forces `.' in the PATH.
1194
11952002-01-25 Akim Demaille <akim@epita.fr>
1196
1197 * tests/regression.at (%nonassoc and eof): New.
1198 Suggested by Robert Anisko.
1199
12002002-01-24 Akim Demaille <akim@epita.fr>
1201
1202 Bison dumps core when trying to complain about broken input files.
1203 Reported by Cris van Pelt.
1204
1205 * src/lex.c (parse_percent_token): Be sure to set token_buffer.
1206 * tests/regression.at (Invalid input: 1, Invalid input: 2): Merge
1207 into...
1208 (Invalid inputs): Strengthen: exercise parse_percent_token.
1209
12102002-01-24 Robert Anisko <robert.anisko@epita.fr>
1211
1212 * src/Makefile.am: Add bison.c++.
1213 * src/bison.c++: New skeleton.
1214
12152002-01-21 Paolo Bonzini <bonzini@gnu.org>
1216
1217 * po/it.po: New.
1218
12192002-01-21 Kees Zeelenberg <kzlg@users.sourceforge.net>
1220
1221 * src/files.c (skeleton_find) [MSDOS]: Fix cp definition.
1222
12232002-01-20 Marc Autret <marc@gnu.org>
1224
1225 * src/files.c (compute_output_file_names): Fix
1226
12272002-01-20 Marc Autret <marc@gnu.org>
1228
1229 * tests/output.at: New test.
1230 * src/files.c (compute_base_names): Don't map extensions when
1231 the YACC flag is set, use defaults.
1232 Reported by Evgeny Stambulchik.
1233
12342002-01-20 Marc Autret <marc@gnu.org>
1235
1236 * src/system.h: Need to define __attribute__ away for non-GCC
1237 compilers as well (i.e. the vendor C compiler).
1238 Suggested by Albert Chin-A-Young.
1239
12402002-01-11 Tim Van Holder <tim.van.holder@pandora.be>
1241
1242 * lib/hash.h, lib/hash.c: Renamed __P to PARAMS and used the
1243 canonical definition.
1244 * src/system.h: Use the canonical definition for PARAMS (avoids
1245 a conflict with the macro from lib/hash.h).
1246
12472002-01-11 Akim Demaille <akim@epita.fr>
1248
1249 * configure.in: Use AC_FUNC_STRNLEN.
1250 Fixes the failures observed on AIX 4.3 by H.Merijn Brand.
1251
12522002-01-09 Akim Demaille <akim@epita.fr>
1253
1254 * src/files.c, src/files.h (output_infix): New.
1255 (tab_extension): Remove.
1256 (compute_base_names): Compute the former, drop the latter.
1257 * src/output.c (prepare): Insert the muscles `output-infix', and
1258 `output-suffix'.
1259 * src/parse-skel.y (string, string.1): New.
1260 (section.header): Use it.
1261 (section.yacc): Remove.
1262 (prefix): Remove too.
1263 * src/scan-skel.l: Adjust.
1264 * src/bison.simple, src/bison.hairy: Adjust.
1265
12662002-01-09 Akim Demaille <akim@epita.fr>
1267
1268 * configure.in (WERROR_CFLAGS): Compute it.
1269 * src/Makefile.am (CFLAGS): Pass it.
1270 * tests/atlocal.in (CFLAGS): Idem.
1271 * src/files.c: Fix a few warnings.
1272 (get_extension_index): Remove, unused.
1273
12742002-01-08 Akim Demaille <akim@epita.fr>
1275
1276 * src/getargs.c (AS_FILE_NAME): New.
1277 (getargs): Use it to convert DOSish file names.
1278 * src/files.c (base_name): Rename as full_base_name to avoid
1279 clashes with `base_name ()'.
1280 (filename_split): New.
1281 (compute_base_names): N-th rewrite, using filename_split.
1282
12832002-01-08 Akim Demaille <akim@epita.fr>
1284
1285 * lib/basename.c, lib/dirname.h, lib/dirname.c, lib/memrchr.c:
1286 New, stolen from the Fileutils 4.1.
1287 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
1288 * configure.in: Check for the presence of memrchr, and of its
1289 prototype.
1290
12912002-01-07 Tim Van Holder <tim.van.holder@pandora.be>
1292
1293 * lib/hash.h (__P): Added definition for this macro.
1294 * src/Makefile.am: Add parse-skel.c and scan-skel.c to
1295 BUILT_SOURCES, to ensure they are generated first.
1296 * src/parse-skel.y: Use YYERROR_VERBOSE instead of
1297 %error-verbose to allow bootstrapping with bison 1.30x.
1298
12992002-01-06 Akim Demaille <akim@epita.fr>
1300
1301 * src/reader.c (parse_braces): Don't fetch the next char, the
1302 convention is to fetch on entry.
1303 * tests/torture.at (GNU Cim Grammar): Reintroduce their weird
1304 'switch' without a following semicolon.
1305 * tests/regression.at (braces parsing): New.
1306
13072002-01-06 Akim Demaille <akim@epita.fr>
1308
1309 Bison is dead wrong in its RR conflict reports.
1310
1311 * tests/torture.at (GNU Cim Grammar): New.
1312 * src/conflicts.c (count_rr_conflicts): Fix.
1313
13142002-01-06 Akim Demaille <akim@epita.fr>
1315
1316 Creating package.m4 from configure.ac causes too many problems.
1317
1318 * tests/Makefile.am (package.m4): Create it by hand,
1319 AC_CONFIG_TESTDIR no longer does in the most recent CVS Autoconf.
1320
13212002-01-06 Akim Demaille <akim@epita.fr>
1322
1323 * src/Makefile.am (bison_SOURCES): Add parse-skel.h and
1324 skeleton.h.
1325
13262002-01-04 Paul Eggert <eggert@twinsun.com>
1327
1328 * doc/bison.texinfo (Debugging):
1329 Remove YYSTDERR; it's no longer defined or used.
1330 Also, s/cstdio.h/cstdio/.
1331
13322002-01-03 Akim Demaille <akim@epita.fr>
1333
1334 * tests/bison.in, tests/atlocal.in: Adjust to CVS Autoconf.
1335
13362002-01-03 Akim Demaille <akim@epita.fr>
1337
1338 * src/parse-skel.y (process_skeleton): Don't bind the parser's
1339 tracing code to --trace, wait for a better --trace option, with
1340 args.
1341
13422002-01-03 Akim Demaille <akim@epita.fr>
1343
1344 * src/bison.simple (YYSTDERR): Remove, replace `stderr'.
1345 The ISO C++ standard is extremely clear about it: stderr is
1346 considered a macro, not a regular symbol (see table 94 `Header
1347 <cstdio> synopsis', [lib.c.files] 27.8.2 C Library files).
1348 Therefore std:: does not apply to it. It still does with fprintf.
1349 Also, s/cstdio.h/cstdio/.
1350
13512002-01-03 Akim Demaille <akim@epita.fr>
1352
1353 * lib/quotearg.c: Use `#include "..."' instead of `#include <...>'
1354 for non system headers.
1355
13562002-01-02 Akim Demaille <akim@epita.fr>
1357
1358 Equip the skeleton chain with location tracking, runtime trace,
1359 pure parser and scanner.
1360
1361 * src/parse-skel.y: Request a pure parser, locations, and prefix
1362 renaming.
1363 (%union): Having several members with the same type does not help
1364 type mismatches, simplify.
1365 (YYPRINT, yyprint): New.
1366 (yyerror): ``Rename'' (there is a #define yyerror skel_error) as...
1367 (skel_error): this.
1368 Handle locations.
1369 * src/scan-skel.l: Adjust to these changes.
1370 * src/skeleton.h (LOCATION_RESET, LOCATION_LINES, LOCATION_STEP)
1371 (LOCATION_PRINT, skel_control_t): New.
1372
13732001-12-30 Akim Demaille <akim@epita.fr>
1374
1375 * src/parse-skel.y: Get rid of the shift/reduce conflict:
1376 replace `gb' with BLANKS.
1377 * src/scan-skel.l: Adjust.
1378
13792001-12-30 Akim Demaille <akim@epita.fr>
1380
1381 * src/system.h: We don't need nor want bcopy.
1382 Throw away MS-DOS crap: we don't need getpid.
1383 * configure.in: We don't need strndup. It was even causing
1384 problems: because Flex includes the headers *before* us,
1385 _GNU_SOURCE is not defined by config.h, and therefore strndup was
1386 not visible.
1387 * lib/xstrndup.c: New.
1388 * src/scan-skel.l: Use it.
1389 Be sure to initialize yylval.muscle member when scanning a MUSCLE.
1390 * src/parse-skel.y: Use %directives instead of #defines.
1391
13922001-12-30 Akim Demaille <akim@epita.fr>
1393
1394 * src/skeleton.h: New.
1395 * src/output.c (output_parser, output_master_parser): Remove, dead
1396 code.
1397 * src/output.h (get_lines_number, actions_output, guards_output)
1398 (token_definitions_output): Prototype them.
1399 * src/parse-skel.y: Add the license notice.
1400 Include output.h and skeleton.h.
1401 (process_skeleton): Returns void, and takes a single parameter.
1402 * src/scan-skel.l: Add the license notice.
1403 Include skeleton.h.
1404 Don't use %option yylineno: it seems that then Flex imagines
1405 REJECT has been used, and therefore it won't reallocate its
1406 buffers (which makes no other sense to me than a bug). It results
1407 in warnings for `unused: yy_flex_realloc'.
1408
14092001-12-30 Robert Anisko <robert.anisko@epita.fr>
1410
1411 * src/muscle_tab.h (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
1412 (MUSCLE_INSERT_PREFIX): ...to there.
1413 * src/output.c (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
1414 (MUSCLE_INSERT_PREFIX): Move from here...
1415
1416 * src/bison.hairy: Add a section directive. Put braces around muscle
1417 names. This parser skeleton is still broken, but Bison should not
1418 choke on a bad muscle 'syntax'.
1419 * src/bison.simple: Add a section directive. Put braces around muscle
1420 names.
1421
1422 * src/files.h (strsuffix, stringappend): Add declarations.
1423 (tab_extension): Add declaration.
1424 (short_base_name): Add declaration.
1425
1426 * src/files.c (strsuffix, stringappend): No longer static. These
1427 functions are used in the skeleton parser.
1428 (tab_extension): New.
1429 (compute_base_names): Use the computations done in this function
1430 to guess if the generated parsers should have '.tab' in their
1431 names.
1432 (short_base_name): No longer static.
1433
1434 * src/output.c (output_skeleton): New.
1435 (output): Disable call to output_master_parser, and give a try to
1436 a new skeleton handling system.
1437 (guards_output, actions_output): No longer static.
1438 (token_definitions_output, get_lines_number): No longer static.
1439
1440 * configure.in: Use AM_PROG_LEX and AC_PROG_YACC.
1441
1442 * src/Makefile.am (bison_SOURCES): Add scan-skel.l and
1443 parse-skel.y.
1444
1445 * src/parse-skel.y: New file.
1446 * src/scan-skel.l: New file.
1447
14482001-12-29 Akim Demaille <akim@epita.fr>
1449
1450 %name-prefix is broken.
1451
1452 * src/files.c (spec_name_prefix): Initialize to NULL, not to "yy".
1453 Adjust all dependencies.
1454 * tests/headers.at (export YYLTYPE): Strengthen this test: use
1455 %name-prefix.
1456
1457 Renaming yylval but not yylloc is not consistent. Now we do.
1458
1459 * src/bison.simple: Prefix yylloc if used.
1460 * doc/bison.texinfo (Decl Summary): Document that.
1461
14622001-12-29 Akim Demaille <akim@epita.fr>
1463
1464 * doc/bison.texinfo: Promote `%long-directive' over
1465 `%long_directive'.
1466 Remove all references to fixed-output-files, yacc is enough.
1467
14682001-12-29 Akim Demaille <akim@epita.fr>
1469
1470 * src/bison.simple: Define YYDEBUG and YYERROR_VERBOSE *after* the
1471 user prologue. These are defaults.
1472 * tests/actions.at (Mid-rule actions): Make sure the user can
1473 define YYDEBUG and YYERROR_VERBOSE.
1474
14752001-12-29 Akim Demaille <akim@epita.fr>
1476
1477 * src/output.c (header_output): Don't forget to export YYLTYPE and
1478 yylloc.
1479 * tests/headers.at (export YYLTYPE): New, make sure it does.
1480 * tests/regression.at (%union and --defines, Invalid CPP headers):
1481 Move to...
1482 * tests/headers.at: here.
1483
14842001-12-29 Akim Demaille <akim@epita.fr>
1485
1486 * src/gram.h (rule_s): Member `assoc' is of type `associativity'.
1487
14882001-12-29 Akim Demaille <akim@epita.fr>
1489
1490 * tests/actions.at (Mid-rule actions): Output on a single line
1491 instead of several.
1492
14932001-12-29 Akim Demaille <akim@epita.fr>
1494
1495 * doc/bison.texinfo: Formatting changes.
1496
14972001-12-29 Akim Demaille <akim@epita.fr>
1498
1499 Don't store the token defs in a muscle, just be ready to output it
1500 on command. Now possible via `symbols'. Fixes a memory leak.
1501
1502 * src/output.c (token_definitions_output): New.
1503 (output_parser, header_output): Use it.
1504 * src/reader.c (symbols_save): Remove.
1505
15062001-12-29 Akim Demaille <akim@epita.fr>
1507
1508 * src/bison.simple: Do not provide a default for YYSTYPE and
1509 YYLTYPE before the user's prologue. Otherwise it's hardly... a
1510 default.
1511
15122001-12-29 Akim Demaille <akim@epita.fr>
1513
1514 Mid-rule actions are simply... ignored!
1515
1516 * src/reader.c (readgram): Be sure to attach mid-rule actions to
1517 the empty-rule associated to the dummy symbol, not to the host
1518 rule.
1519 * tests/actions.at (Mid-rule actions): New.
1520
15212001-12-29 Akim Demaille <akim@epita.fr>
1522
1523 Memory leak.
1524
1525 * src/reader.c (reader): Free grammar.
1526
15272001-12-29 Akim Demaille <akim@epita.fr>
1528
1529 Memory leak.
1530
1531 * src/LR0.c (new_itemsets): Don't allocate `shift_symbol' here,
1532 since it allocates it for each state, although only one is needed.
1533 (allocate_storage): Do it here.
1534
15352001-12-29 Akim Demaille <akim@epita.fr>
1536
1537 * src/options.h, src/options.c (create_long_option_table): Rename
1538 as...
1539 (long_option_table_new): this, with a clearer prototype.
1540 (percent_table): Remove, unused,
1541 * src/getargs.c (getargs): Adjust.
1542
15432001-12-29 Akim Demaille <akim@epita.fr>
1544
1545 * src/LR0.c, src/conflicts.c, src/lalr.c, src/lalr.h, src/output.c
1546 * src/print.c, src/print_graph.c, src/state.h: Rename state_table
1547 as states.
1548
15492001-12-29 Akim Demaille <akim@epita.fr>
1550
1551 * src/lalr.c (build_relations): Rename `states' as `states1'.
1552 Sorry, I don't understand exactly what it is, no better name...
1553
15542001-12-29 Akim Demaille <akim@epita.fr>
1555
1556 * src/closure.c, src/conflicts.c, src/derives.c, src/gram.c
1557 * src/gram.h, src/lalr.c, src/nullable.c, src/output.c, src/print.c
1558 * src/print_graph.c, src/reader.c, src/reduce.c: Rename rule_table
1559 as rules.
1560
15612001-12-29 Akim Demaille <akim@epita.fr>
1562
1563 * src/gram.c (rprec, rprecsym, rassoc): Remove, unused since long
1564 ago.
1565
15662001-12-29 Akim Demaille <akim@epita.fr>
1567
1568 * src/reader.c, src/reader.h (user_toknums): Remove.
1569 Adjust all users to use symbols[i]->user_token_number.
1570
15712001-12-29 Akim Demaille <akim@epita.fr>
1572
1573 * src/gram.c, src/gram.h (sprec, sassoc): Remove.
1574 Adjust all users to use symbols[i]->prec or ->assoc.
1575
15762001-12-29 Akim Demaille <akim@epita.fr>
1577
1578 * src/reader.c, src/reader.h (tags): Remove.
1579 Adjust all users to use symbols[i]->tag.
1580
15812001-12-29 Akim Demaille <akim@epita.fr>
1582
1583 * src/gram.h, src/gram.c (symbols): New, similar to state_table
1584 and rule_table.
1585 * src/reader.c (packsymbols): Fill this table.
1586 Drop sprec.
1587 * src/conflicts.c (resolve_sr_conflict): Adjust.
1588 * src/reduce.c (reduce_grammar): Adjust: just sort symbols, a
1589 single table.
1590 Use symbols[i]->tag instead of tags[i].
1591
15922001-12-29 Akim Demaille <akim@epita.fr>
1593
1594 * tests/calc.at (_AT_DATA_CALC_Y): Also use %union.
1595 In addition, put a comment in there, to replace...
1596 * tests/regression.at (%union and C comments): Remove.
1597
15982001-12-29 Akim Demaille <akim@epita.fr>
1599
1600 * tests/regression.at (Web2c Actions): Blindly move the actual
1601 output as expected output. The contents *seem* right to me, but I
1602 can't pretend reading perfectly parser tables... Nonetheless, all
1603 the other tests pass correctly, the table look OK, even though the
1604 presence of `$axiom' is to be noted: AFAICS it is useless (but
1605 harmless).
1606
16072001-12-29 Akim Demaille <akim@epita.fr>
1608
1609 * src/reader.c (readgram): Don't add the rule 0 if there were no
1610 rules read. In other words, add it _after_ having performed
1611 grammar sanity checks.
1612 Fixes the `tests/regression.at (Invalid input: 1)' Failure.
1613
16142001-12-29 Akim Demaille <akim@epita.fr>
1615
1616 * tests/regression.at (Web2c Report): Catch up: the rule 0 is now
1617 visible, and some states have now a different number.
1618
16192001-12-29 Akim Demaille <akim@epita.fr>
1620
1621 * src/reader.c (readgram): Bind the initial rule's lineno to that
1622 of the first rule.
1623 * tests/regression.at (Rule Line Numbers, Unresolved SR Conflicts):
1624 (Solved SR Conflicts): Adjust rule 0's line number.
1625
16262001-12-29 Akim Demaille <akim@epita.fr>
1627
1628 Fix the `GAWK Grammar' failure.
1629
1630 * src/LR0.c (final_state): Initialize to -1 so that we do compute
1631 the reductions of the first state which was mistakenly confused
1632 with the final state because precisely final_state was initialized
1633 to 0.
1634 * tests/sets.at (Nullable): Adjust: state 0 does have lookaheads,
1635 now noticed by Bison.
1636 * tests/regression.at (Rule Line Numbers): Adjust: state 0 does
1637 have a reduction on $default.
1638
16392001-12-29 Akim Demaille <akim@epita.fr>
1640
1641 * src/gram.c (ritem_print): Be sure to subtract 1 when displaying
1642 rule line numbers.
1643 * src/closure.c (print_closure): Likewise.
1644 * src/derives.c (print_derives): Likewise.
1645 * tests/sets.at (Nullable): Adjust: the rule numbers are correct
1646 now.
1647
16482001-12-29 Akim Demaille <akim@epita.fr>
1649
1650 * src/lalr.c (lookaheads_print): New.
1651 (lalr): Call it when --trace-flag.
1652 * tests/sets.at (Nullable): Adjust: when tracing, the lookaheads
1653 are dumped.
1654
16552001-12-29 Akim Demaille <akim@epita.fr>
1656
1657 * src/derives.c (print_derives): Be sure to use `>= 0', not `> 0',
1658 when walking through ritem, even via rule->rhs.
1659 * src/reduce.c (dump_grammar, useful_production, reduce_output)
1660 (useful_production, useless_nonterminals): Likewise.
1661 (reduce_grammar_tables): Likewise, plus update nritems.
1662 * src/nullable.c (set_nullable): Likewise.
1663 * src/lalr.c (build_relations): Likewise.
1664 * tests/sets.at (Nullable): Adjust.
1665 Fortunately, now, the $axiom is no longer nullable.
1666
16672001-12-29 Akim Demaille <akim@epita.fr>
1668
1669 * src/LR0.c (generate_states): Use nritems, not nitems, nor using
1670 the 0-sentinel.
1671 * src/gram.c (ritem_longest_rhs): Likewise.
1672 * src/reduce.c (nonterminals_reduce): Likewise.
1673 * src/print_graph.c (print_graph): Likewise.
1674 * src/output.c (output_rule_data): Likewise.
1675 * src/nullable.c (set_nullable): Likewise.
1676
16772001-12-29 Akim Demaille <akim@epita.fr>
1678
1679 * src/output.c: Comment changes.
1680
16812001-12-27 Paul Eggert <eggert@twinsun.com>
1682
1683 * src/bison.simple (YYSTACK_ALLOC, YYSIZE_T): Remove special
1684 cases for non-GNU systems like AIX, HP-UX, SGI, Sun, and
1685 Sparc, as they were causing more porting problems than the
1686 (minor) performance improvement was worth.
1687
1688 Also, catch up with 1.31's YYSTD.
1689
16902001-12-27 Akim Demaille <akim@epita.fr>
1691
1692 * src/output.c (output_gram): Rely on nritems, not the
1693 0-sentinel. See below.
1694 Use -1 as separator, not 0.
1695 * src/bison.simple (yyparse): Subtract 1 to the rule numbers.
1696 Rely on -1 as separator in yyrhs, instead of 0.
1697 * tests/calc.at (AT_CHECK_CALC): Now, the parsers no longer issue
1698 twice `Now at end of input', therefore there are two lines less to
1699 expect.
1700
17012001-12-27 Akim Demaille <akim@epita.fr>
1702
1703 * tests/regression.at (Unresolved SR Conflicts):
1704 (Solved SR Conflicts, Rule Line Numbers): Adjust to the changes
1705 below.
1706
17072001-12-27 Akim Demaille <akim@epita.fr>
1708
1709 * src/LR0.c (new_state): Recognize the final state by the fact it
1710 is reached by eoftoken.
1711 (insert_start_shifting_state, insert_eof_shifting_state)
1712 (insert_accepting_state, augment_automaton): Remove, since now
1713 these states are automatically computed from the initial state.
1714 (generate_states): Adjust.
1715 * src/print.c: When reporting a rule number to the user, substract
1716 1, so that the axiom rule is rule 0, and the first user rule is 1.
1717 * src/reduce.c: Likewise.
1718 * src/print_graph.c (print_core): For the time being, just as for
1719 the report, depend upon --trace-flags to dump the full set of
1720 items.
1721 * src/reader.c (readgram): Once the grammar read, insert the rule
1722 0: `$axiom: START-SYMBOL $'.
1723 * tests/set.at: Adjust: rule 0 is now displayed, and since the
1724 number of the states has changed (the final state is no longer
1725 necessarily the last), catch up.
1726
17272001-12-27 Akim Demaille <akim@epita.fr>
1728
1729 Try to make the use of the eoftoken valid. Given that its value
1730 is 0 which was also used as a sentinel in ritem, (i) make sure >= 0
1731 is used instead of > 0 where appropriate, (ii), depend upon nritems
1732 instead of the 0-sentinel.
1733
1734 * src/gram.h, src/gram.c (nritems): New.
1735 Expected to be duplication of nitems, but for the time being...
1736 * src/reader.c (packgram): Assert nritems and nitems are equal.
1737 * src/LR0.c (allocate_itemsets, new_itemsets): Adjust.
1738 * src/closure.c (print_closure, print_fderives): Likewise.
1739 * src/gram.c (ritem_print): Likewise.
1740 * src/print.c (print_core, print_grammar): Likewise.
1741 * src/print_graph.c: Likewise.
1742
17432001-12-27 Akim Demaille <akim@epita.fr>
1744
1745 * src/main.c (main): If there are complains after grammar
1746 reductions, then output the report anyway if requested, then die.
1747 * src/symtab.c (bucket_new): Initialize `value' to -1, not 0.
1748 * src/reader.c (eoftoken): New.
1749 (parse_token_decl): If the token being defined has value `0', it
1750 is the eoftoken.
1751 (packsymbols): No longer hack `tags' to insert `$' by hand.
1752 Be sure to preserve the value of the eoftoken.
1753 (reader): Make sure eoftoken is defined.
1754 Initialize nsyms to 0: now eoftoken is created just like the others.
1755 * src/print.c (print_grammar): Don't special case the eof token.
1756 * src/regression.at: Adjust: `$' has value 0, not -1, which was a
1757 lie anyway, albeit pleasant.
1758 * tests/calc.at: Exercise error messages with eoftoken.
1759 Change the grammar so that empty input is invalid.
1760 Adjust expectations.
1761 When yyungeting, be sure to use a valid yylloc: use last_yylloc.
1762
17632001-12-27 Akim Demaille <akim@epita.fr>
1764
1765 * configure.in: Check the protos of strchr ans strspn.
1766 Replace strchr if needed.
1767 * src/system.h: Provide the protos of strchr, strspn and memchr if
1768 missing.
1769 * lib/strchr.c: New.
1770 * src/reader.c (symbols_save): Use strchr.
1771
17722001-12-27 Akim Demaille <akim@epita.fr>
1773
1774 * src/print.c, src/print_graph.c (escape): New.
1775 Use it to quote the TAGS outputs.
1776 * src/print_graph.c (print_state): Now errors are in red, and
1777 reductions in green.
1778 Prefer high to wide: output the state number on a line of its own.
1779
17802001-12-27 Akim Demaille <akim@epita.fr>
1781
1782 * src/state.h, src/state.c (reductions_new): New.
1783 * src/LR0.c (set_state_table): Let all the states have a
1784 `reductions', even if reduced to 0.
1785 (save_reductions): Adjust.
1786 * src/lalr.c (initialize_LA, initialize_lookaheads): Adjust.
1787 * src/print.c (print_reductions, print_actions): Adjust.
1788 * src/output.c (action_row): Adjust.
1789
17902001-12-27 Akim Demaille <akim@epita.fr>
1791
1792 * src/state.h, src/state.c (errs_new, errs_dup): New.
1793 * src/LR0.c (set_state_table): Let all the states have an errs,
1794 even if reduced to 0.
1795 * src/print.c (print_errs, print_reductions): Adjust.
1796 * src/output.c (output_actions, action_row): Adjust.
1797 * src/conflicts.c (resolve_sr_conflict): Adjust.
1798
17992001-12-27 Akim Demaille <akim@epita.fr>
1800
1801 * src/lalr.c (set_goto_map, initialize_F): Use SHIFT_SYMBOL.
1802
18032001-12-27 Akim Demaille <akim@epita.fr>
1804
1805 * src/conflicts.c, src/conflicts.h (print_reductions): Move to...
1806 * src/print.c: here.
1807 (lookaheadset, shiftset): New, used as additional storage by
1808 print_reductions.
1809 (print_results): Adjust.
1810 (print_shifts, print_gotos, print_errs): New, extracted from...
1811 (print_actions): here.
1812 * src/print_graph.c (print_actions): Remove dead code.
1813
18142001-12-27 Akim Demaille <akim@epita.fr>
1815
1816 * src/reader.c (copy_dollar, copy_at): Better checking of `n' in
1817 `$n' and `@n'.
1818
18192001-12-27 Akim Demaille <akim@epita.fr>
1820
1821 * src/lalr.c (add_lookback_edge): Use state_t instead of ints.
1822 (build_relations): Adjust.
1823
18242001-12-27 Akim Demaille <akim@epita.fr>
1825
1826 * src/lalr.c (set_goto_map): Remove a wrong but benign loop
1827 duplication.
1828
18292001-12-27 Akim Demaille <akim@epita.fr>
1830
1831 * src/reader.c (packgram): Catch nitems overflows.
1832
18332001-12-27 Akim Demaille <akim@epita.fr>
1834
1835 * src/files.c, src/files.h (guard_obstack): Remove.
1836 * src/output.c (output): Adjust.
1837 * src/reader.c (parse_braces): New, factoring...
1838 (copy_action, copy_guard): these two which are renamed as...
1839 (parse_action, parse_guard): these.
1840 As a voluntary consequence, using braces around guards is now
1841 mandatory.
1842
18432001-12-27 Akim Demaille <akim@epita.fr>
1844
1845 * src/gram.h (rule_t): `guard' and `guard_line' are new members.
1846 * src/reader.c (symbol_list): `guard' and `guard_line' are new
1847 members.
1848 (symbol_list_new): Adjust.
1849 (copy_action): action_line is the first line, not the last.
1850 (copy_guard): Just as for actions, store the `action' only, not
1851 the switch/case/break flesh.
1852 Don't parse the user action that might follow the guard, let...
1853 (readgram): do it, i.e., now, there can be an action after a
1854 guard.
1855 In other words the guard is just explicitly optional.
1856 (packgram): Adjust.
1857 * src/output.c (guards_output): New.
1858 (output_parser): Call it when needed.
1859 (output): Also free the guard and attrs obstacks.
1860 * src/files.c, src/files.h (obstack_save): Remove.
1861 (output_files): Remove.
1862 As a result, if one needs the former `.act' file, using an
1863 appropriate skeleton which requires actions and guards is now
1864 required.
1865 * src/main.c (main): Adjust.
1866 * tests/semantic.at: New.
1867 * tests/regression.at: Use `input.y' as input file name.
1868 Avoid 8+3 problems by requiring input.c when the test needs the
1869 parser.
1870
18712001-12-27 Akim Demaille <akim@epita.fr>
1872
1873 * src/reader.c (symbol_list_new): Be sure to initialize all the
1874 fields.
1875
18762001-12-27 Akim Demaille <akim@epita.fr>
1877
1878 All the hacks using a final pseudo state are now useless.
1879
1880 * src/LR0.c (set_state_table): state_table holds exactly nstates.
1881 * src/lalr.c (nLA): New.
1882 (initialize_LA, compute_lookaheads, initialize_lookaheads): Use it
1883 instead of lookaheadsp from the pseudo state (nstate + 1).
1884
18852001-12-27 Akim Demaille <akim@epita.fr>
1886
1887 * src/output.c (action_row, token_actions): Use a state_t instead
1888 of a integer, and nlookaheads instead of the following state's
1889 lookaheadsp.
1890
18912001-12-27 Akim Demaille <akim@epita.fr>
1892
1893 * src/conflicts.c (log_resolution, flush_shift)
1894 (resolve_sr_conflict, set_conflicts, solve_conflicts)
1895 (count_sr_conflicts, count_rr_conflicts, conflicts_output)
1896 (conflicts_print, print_reductions): Use a state_t instead of an
1897 integer when referring to a state.
1898 As much as possible, depend upon nlookaheads, instead of the
1899 `lookaheadsp' member of the following state (since lookaheads of
1900 successive states are successive, the difference between state n + 1
1901 and n served as the number of lookaheads for state n).
1902 * src/lalr.c (add_lookback_edge): Likewise.
1903 * src/print.c (print_core, print_actions, print_state)
1904 (print_results): Likewise.
1905 * src/print_graph.c (print_core, print_actions, print_state)
1906 (print_graph): Likewise.
1907 * src/conflicts.h: Adjust.
1908
19092001-12-27 Akim Demaille <akim@epita.fr>
1910
1911 * src/bison.hairy: Formatting/comment changes.
1912 ANSIfy.
1913 Remove `register' indications.
1914 Add plenty of `static'.
1915
19162001-12-27 Akim Demaille <akim@epita.fr>
1917
1918 * src/output.c (prepare): Drop the muscle `ntbase' which
1919 duplicates ntokens.
1920 * src/bison.simple: Formatting/comment changes.
1921 Use YYNTOKENS only, which is documented, but not YYNTBASE, which
1922 is an undocumented synonym.
1923
19242001-12-22 Akim Demaille <akim@epita.fr>
1925
1926 * src/output.c (output_table_data): Change the prototype to use
1927 `int' for array ranges: some invocations do pass an int, not a
1928 short.
1929 Reported by Wayne Green.
1930
19312001-12-22 Akim Demaille <akim@epita.fr>
1932
1933 Some actions of web2c.y are improperly triggered.
1934 Reported by Mike Castle.
1935
1936 * src/lalr.c (traverse): s/F (i)[k] = F (j)[k]/F (j)[k] = F (i)[k]/.
1937 * tests/regression.at (Web2c): Rename as...
1938 (Web2c Report): this.
1939 (Web2c Actions): New.
1940
19412001-12-22 Akim Demaille <akim@epita.fr>
1942
1943 Reductions in web2c.y are improperly reported.
1944 Reported by Mike Castle.
1945
1946 * src/conflicts.c (print_reductions): Fix.
1947 * tests/regression.at (Web2c): New.
1948
19492001-12-18 Akim Demaille <akim@epita.fr>
1950
1951 Some host fail on `assert (!"foo")', which expands to
1952 ((!"foo") ? (void)0 : __assert("!"foo."", __FILE__, __LINE__))
1953 Reported by Nelson Beebee.
1954
1955 * src/output.c, src/vcg.c: Replace `assert (!"it succeeded")' with
1956 `#define it_succeeded 0' and `assert (it_succeeded)'.
1957
19582001-12-17 Marc Autret <autret_m@epita.fr>
1959
1960 * src/bison.simple: Don't hard code the skeleton line and filename.
1961 * src/output.c (output_parser): Rename 'line' as 'output_line'.
1962 New line counter 'skeleton_line' (skeleton-line muscle).
1963
19642001-12-17 Paul Eggert <eggert@twinsun.com>
1965
1966 * NEWS, doc/bison.texinfo, doc/bison.1, doc/bison.rnh: Document that
1967 YYDEBUG must be defined to a nonzero value.
1968
1969 * src/bison.simple (yytname): Do not assume that the user defines
1970 YYDEBUG to a properly parenthesized expression.
1971
19722001-12-17 Akim Demaille <akim@epita.fr>
1973
1974 * src/state.h (state_t): Rename lookaheads as lookaheadsp.
1975 nlookaheads is a new member.
1976 Adjust all users.
1977 * src/lalr.h (nlookaheads): Remove this orphan declaration.
1978 * src/lalr.c (initialize_lookaheads): Set nlookaheads for each
1979 state.
1980
19812001-12-17 Akim Demaille <akim@epita.fr>
1982
1983 * src/files.h, src/files.c (open_files, close_files): Remove.
1984 * src/main.c (main): Don't open/close files, nor invoke lex_free,
1985 let...
1986 * src/reader.c (reader): Do it.
1987
19882001-12-17 Akim Demaille <akim@epita.fr>
1989
1990 * src/conflicts.c (print_reductions): Formatting changes.
1991
19922001-12-17 Akim Demaille <akim@epita.fr>
1993
1994 * src/conflicts.c (flush_shift): Also adjust lookaheadset.
1995 (flush_reduce): New.
1996 (resolve_sr_conflict): Adjust.
1997
19982001-12-17 Akim Demaille <akim@epita.fr>
1999
2000 * src/output.c (output_obstack): Be static and rename as...
2001 (format_obstack): this, to avoid any confusion with files.c's
2002 output_obstack.
2003 * src/reader.h (muscle_obstack): Move to...
2004 * src/output.h: here, since it's defined in output.c.
2005
20062001-12-17 Akim Demaille <akim@epita.fr>
2007
2008 * src/output.c (action_row, save_column, default_goto)
2009 (sort_actions, matching_state, pack_vector): Better variable
2010 locality.
2011
20122001-12-17 Akim Demaille <akim@epita.fr>
2013
2014 * src/output.c: Various formatting changes.
2015
20162001-12-17 Akim Demaille <akim@epita.fr>
2017
2018 * src/files.c (output_files): Free the output_obstack.
2019 * src/main.c (main): Call print and print_graph conditionally.
2020 * src/print.c (print): Work unconditionally.
2021 * src/print_graph.c (print_graph): Work unconditionally.
2022 * src/conflicts.c (log_resolution): Output only if verbose_flag.
2023
20242001-12-16 Marc Autret <autret_m@epita.fr>
2025
2026 * src/output.c (actions_output): Fix. When we use %no-lines,
2027 there is one less line per action.
2028
20292001-12-16 Marc Autret <autret_m@epita.fr>
2030
2031 * src/bison.simple: Remove a useless #line directive.
2032 s/#line %%line %%skeleton/#line %%line "%%parser-file-name"/'.
2033 * src/output.c (get_lines_number): New.
2034 (output_parser): Adjust, now takes care about the lines of a
2035 output muscles.
2036 Fix line numbering.
2037 (actions_output): Computes the number of lines taken by actions.
2038 (output_master_parser): Insert new skeleton which is the name of
2039 the output parser file name.
2040
20412001-12-15 Marc Autret <autret_m@epita.fr>
2042
2043 * src/bison.simple [YYERROR_VERBOSE]: Restore backward compatibility.
2044
20452001-12-15 Marc Autret <autret_m@epita.fr>
2046
2047 * src/output.c (output_gram): Keep track of the hairy one.
2048
20492001-12-15 Akim Demaille <akim@epita.fr>
2050
2051 Make `make distcheck' work.
2052
2053 * lib/Makefile.am (INCLUDES): Add top_srcdir/intl, since hash uses
2054 system.h which uses libgettext.h.
2055
20562001-12-15 Akim Demaille <akim@epita.fr>
2057
2058 * src/nullable.c (set_nullable): Useless rules must be skipped,
2059 otherwise, since we range over their symbols, we might look at a
2060 nonterminal which no longer ``exists'', i.e., it is not counted in
2061 `nvars', hence we overflow our arrays.
2062
20632001-12-15 Akim Demaille <akim@epita.fr>
2064
2065 The header can also be produced directly, without any obstack!
2066 Yahoo!
2067
2068 * src/files.c, src/files.h (defines_obstack): Remove.
2069 (compute_header_macro): Global.
2070 (defines_obstack_save): Remove.
2071 * src/reader.c (parse_union_decl): No longer output to
2072 defines_obstack: its content can be found in the `stype' muscle
2073 anyway.
2074 (output_token_translations): Merge into...
2075 (symbols_output): this.
2076 Rename as...
2077 (symbols_save): this.
2078 (reader): Adjust.
2079 * src/output.c (header_output): New.
2080 (output): Call it.
2081
20822001-12-15 Akim Demaille <akim@epita.fr>
2083
2084 * src/reader.c (parse_union_decl): Instead of handling two obstack
2085 simultaneously, use one to define the `stype' muscle, and use the
2086 value of the latter to fill defines_obstack.
2087 (copy_comment): Remove.
2088 (copy_comment2): Work for a single obstack.
2089 Rename as...
2090 (copy_comment): this.
2091
20922001-12-15 Akim Demaille <akim@epita.fr>
2093
2094 * src/lex.c, src/lex.h (xgetc): No longer static.
2095 * src/reader.c (parse_union_decl): Revamp.
2096
20972001-12-15 Akim Demaille <akim@epita.fr>
2098
2099 Still making progress in separating Bison into (i) input, (ii)
2100 process, (iii) output: now we can directly output the parser file
2101 without using table_obstack at all.
2102
2103 * src/files.c, src/files.h (table_obstack): Bye bye.
2104 (parser_file_name): New.
2105 * src/files.c (compute_output_file_names): Compute it.
2106 * src/output.c (actions_output, output_parser)
2107 (output_master_parser): To a file instead of an obstack.
2108
21092001-12-15 Akim Demaille <akim@epita.fr>
2110
2111 Attach actions to rules, instead of pre-outputting them to
2112 actions_obstack.
2113
2114 * src/gram.h (rule_t): action and action_line are new members.
2115 * src/reader.c (symbol_list): Likewise.
2116 (copy_action): Save the actions within the rule.
2117 (packgram): Save them in rule_table.
2118 * src/output.c (actions_output): New.
2119 (output_parser): Use it on `%%actions'.
2120 (output_rule_data): Don't free rule_table.
2121 (output): Do it.
2122 (prepare): Don't save the `action' muscle.
2123 * src/bison.simple: s/%%action/%%actions/.
2124
21252001-12-15 Akim Demaille <akim@epita.fr>
2126
2127 * src/reader.c (copy_action): When --yacc, don't append a `;'
2128 to the user action: let it fail if lacking.
2129 Suggested by Arnold Robbins and Tom Tromey.
2130
21312001-12-14 Akim Demaille <akim@epita.fr>
2132
2133 * src/lex.c (literalchar): Simply return the char you decoded, non
2134 longer mess around with obstacks and int pointers.
2135 Adjust all callers.
2136
21372001-12-14 Akim Demaille <akim@epita.fr>
2138
2139 * src/lex.c (literalchar): Don't escape the special characters,
2140 just decode them, and keep them as char (before, eol was output as
2141 the 2 char string `\n' etc.).
2142 * src/output.c (output_rule_data): Use quotearg to output the
2143 token strings.
2144
21452001-12-13 Paul Eggert <eggert@twinsun.com>
2146
2147 * src/bison.simple (YYSIZE_T, YYSTACK_ALLOC, YYSTACK_FREE):
2148 Do not infringe on the global user namespace when using C++.
2149 (YYFPRINTF, YYSTDERR): New macros, needed for the above.
2150 All uses of `fprintf' and `stderr' changed.
2151
2152 * doc/bison.texinfo: Document YYFPRINTF, YYSTDERR.
2153
21542001-12-13 Akim Demaille <akim@epita.fr>
2155
2156 The computation of nullable is broken: it doesn't handle empty
2157 RHS's properly.
2158
2159 * tests/torture.at (GNU AWK Grammar): New.
2160 * tests/sets.at (Nullable): New.
2161 * src/nullable.c (set_nullable): Instead of blindly looping over
2162 `ritems', loop over the rules, and then over their rhs's.
2163
2164 Work around Autotest bugs.
2165
2166 * src/warshall.c (bitmatrix_print): Don't use `+--+' as table
2167 frame, because Autotest understand lines starting with a `+' as
2168 traces from the shell. Then, they are not processed properly.
2169 Admittedly an Autotest bug, but we don't have time to wait for
2170 Autotest to catch up.
2171 * tests/regression.at (Broken Closure): Adjust to the new table
2172 frames.
2173 Move to...
2174 * tests/sets.at: here.
2175
21762001-12-13 Akim Demaille <akim@epita.fr>
2177
2178 * src/closure.c (closure): Use nrules instead of playing tricks
2179 with BITS_PER_WORD.
2180
21812001-12-13 Akim Demaille <akim@epita.fr>
2182
2183 * src/print.c (print_actions): Output the handling of `$' as the
2184 traces do: shifting the token EOF. Before EOF was treated as a
2185 nonterminal.
2186 * tests/regression.at: Adjust some tests.
2187 * src/print_graph.c (print_core): Complete the set of items via
2188 closure. The next-to-final and final states are still unsatisfying,
2189 but that's to be addressed elsewhere.
2190 No longer output the rule numbers, but do output the state number.
2191 A single loop for the shifts + gotos is enough, but picked a
2192 distinct color for each.
2193 (print_graph): Initialize and finalize closure.
2194
21952001-12-13 Akim Demaille <akim@epita.fr>
2196
2197 * src/reader.c (readgram): Remove dead code, an strip useless
2198 braces.
2199 (get_type): Remove, unused.
2200
22012001-12-12 Akim Demaille <akim@epita.fr>
2202
2203 * src/complain.h, src/complain.c: Remove error_one_per_line, rely
2204 on that of lib/error.c.
2205
22062001-12-12 Akim Demaille <akim@epita.fr>
2207
2208 Some hosts don't like `/' in includes.
2209
2210 * src/system.h: Include libgettext.h without qualifying the path.
2211 * src/Makefile.am (INCLUDES): Add $(top_srcdir)/intl, remove
2212 $(top_srcdir).
2213
22142001-12-11 Marc Autret <autret_m@epita.fr>
2215
2216 * src/output.c (output_parser): Remove useless muscle.
2217
22182001-12-11 Marc Autret <autret_m@epita.fr>
2219
2220 * src/bison.simple: Remove #line just before %%epilogue. It
2221 is now handled in ...
2222 * src/reader.c (read_additionnal_code): Add the output of a
2223 #line for the epilogue.
2224
22252001-12-10 Marc Autret <autret_m@epita.fr>
2226
2227 * src/reader.c (copy_definition): Re-use CPP-outed code which
2228 replace precedent remove.
2229 * src/bison.simple: Remove #line before %%prologue because
2230 %%input-line is wrong at this time.
2231
22322001-12-10 Marc Autret <autret_m@epita.fr>
2233
2234 * src/reader.c (symbols_output): Clean up.
2235 * src/output.c (output_gram, output): Clean up.
2236
22372001-12-10 Akim Demaille <akim@epita.fr>
2238
2239 * src/lalr.c (initialize_lookaheads): New. Extracted from...
2240 * src/LR0.c (set_state_table): here.
2241 * src/lalr.c (lalr): Call it.
2242
22432001-12-10 Akim Demaille <akim@epita.fr>
2244
2245 * src/state.h (shifts): Remove the `number' member: shifts are
2246 attached to state, hence no longer need to be labelled with a
2247 state number.
2248
22492001-12-10 Akim Demaille <akim@epita.fr>
2250
2251 Now that states have a complete set of members, the linked list of
2252 shifts is useless: just fill directly the state's shifts member.
2253
2254 * src/state.h (shifts): Remove the `next' member.
2255 * src/LR0.c (first_state, last_state): Remove.
2256 Adjust the callers.
2257 (augment_automaton): Don't look for the shifts that must be added
2258 a shift on EOF: it is those of the state we looked for! But now,
2259 since shifts are attached, it is no longer needed to looking
2260 merely by its id: its number.
2261
22622001-12-10 Akim Demaille <akim@epita.fr>
2263
2264 * src/LR0.c (augment_automaton): Better variable locality.
2265 Remove an impossible branch: if there is a state corresponding to
2266 the start symbol being shifted, then there is shift for the start
2267 symbol from the initial state.
2268
22692001-12-10 Akim Demaille <akim@epita.fr>
2270
2271 * src/LR0.c (augment_automaton): Call `insert_eof_shifting_state'
2272 only when appropriate: when insert_start_shifting_state' is not
2273 invoked.
2274 * tests/regression.at (Rule Line Numbers): Adjust.
2275
22762001-12-10 Akim Demaille <akim@epita.fr>
2277
2278 * src/LR0.c (augment_automaton): Now that all states have shifts,
2279 merge the two cases addition shifts to the initial state.
2280
22812001-12-10 Akim Demaille <akim@epita.fr>
2282
2283 * src/lalr.c (set_state_table): Move to...
2284 * src/LR0.c: here.
2285 * src/lalr.c (lalr): Don't call it...
2286 * src/LR0.c (generate_states): do it.
2287 * src/LR0.h (first_state): Remove, only the table is used.
2288
22892001-12-10 Akim Demaille <akim@epita.fr>
2290
2291 * src/LR0.h (first_shift, first_reduction): Remove.
2292 * src/lalr.c: Don't use first_shift: find shifts through the
2293 states.
2294
22952001-12-10 Akim Demaille <akim@epita.fr>
2296
2297 * src/LR0.c: Attach shifts to states as soon as they are
2298 computed.
2299 * src/lalr.c (set_state_table): Instead of assigning shifts to
2300 state, just assert that the mapping was properly done.
2301
23022001-12-10 Akim Demaille <akim@epita.fr>
2303
2304 * src/LR0.c (insert_start_shift): Rename as...
2305 (insert_start_shifting_state): this.
2306 (insert_eof_shifting_state, insert_accepting_state): New.
2307 (augment_automaton): Adjust.
2308 Better locality of the variables.
2309 When looking if the start_symbol is shifted from the initial
2310 state, using `while (... symbol != start_symbol ...)' sounds
2311 better than `while (... symbol < start_symbol ...)': If fail
2312 to see how the order between symbols could be relevant!
2313
23142001-12-10 Akim Demaille <akim@epita.fr>
2315
2316 * src/getargs.h: Don't declare `spec_name_prefix' and
2317 `spec_file_prefix', declared by src/files.h.
2318 * src/files.c, src/files.h: Default for spec_name_prefix is "yy".
2319 * src/muscle_tab.c (muscle_init): Default prefix to NULL.
2320 * src/output.c (prepare): Adjust.
2321 * src/reader.c (symbols_output): Likewise.
2322 * src/vmsgetargs.c: Vaguely adjust, but who cares?
2323
23242001-12-10 Akim Demaille <akim@epita.fr>
2325
2326 * src/muscle_tab.c (muscle_init): NULL is a better default than
2327 `"0"'.
2328
23292001-12-10 Akim Demaille <akim@epita.fr>
2330
2331 * src/reader.c (reader): Calling symbols_output once is enough.
2332
23332001-12-10 Akim Demaille <akim@epita.fr>
2334
2335 Now that states have a complete set of members, the linked list of
2336 reductions is useless: just fill directly the state's reductions
2337 member.
2338
2339 * src/state.h (struct reductions): Remove member `number' and
2340 `next'.
2341 * src/LR0.c (first_reduction, last_reduction): Remove.
2342 (save_reductions): Don't link the new reductions, store them in
2343 this_state.
2344 * src/lalr.c (set_state_table): No need to attach reductions to
2345 states, it's already done.
2346 * src/output.c (output_actions): No longer free the shifts, then
2347 the reductions, then the states: free all the states and their
2348 members.
2349
23502001-12-10 Akim Demaille <akim@epita.fr>
2351
2352 * src/options.c (OPTN, DRTV, BOTH): New.
2353 (option_table): Use them.
2354
2355 * src/muscle_tab.c: Don't include xalloc.h and string.h: that's
2356 the job of system.h.
2357 * src/options.c: Don't include stdio.h and xalloc.h for the same
2358 reasons.
2359
23602001-12-10 Akim Demaille <akim@epita.fr>
2361
2362 * src/output.c (output, prepare): Make sure the values of the
2363 muscles `action' and `prologue' are 0-terminated.
2364
23652001-12-10 Akim Demaille <akim@epita.fr>
2366
2367 Clean up GCC warnings.
2368
2369 * src/reader.c (copy_action): `buf' is not used.
2370 (parse_skel_decl): Be static.
2371 * src/muscle_tab.c (mhash1, mhash2, muscle_insert): Preserve `const'.
2372 * src/options.h (create_long_option_table): Have a real prototype.
2373 * lib/hash.c, lib/hash.h (hash_insert, hash_insert_at, hash_delete)
2374 (hash_delete_at): Return const void *.
2375 Adjust casts to preserve the const.
2376
23772001-12-10 Akim Demaille <akim@epita.fr>
2378
2379 * configure.in: Require 2.52g.
2380 M4 is not needed, but AUTOM4TE is.
2381 * m4/m4.m4: Remove.
2382 * tests/Makefile.am: Adjust.
2383
23842001-12-10 Akim Demaille <akim@epita.fr>
2385
2386 One structure for states is enough, even though theoretically
2387 there are LR(0) states and LALR(1) states.
2388
2389 * src/lalr.h (state_t): Remove.
2390 (state_table): Be state_t **, not state_t *.
2391 * src/state.h (core, CORE_ALLOC): Rename as...
2392 (state_t, STATE_ALLOC): this.
2393 Add the LALR(1) members: shifts, reductions, errs.
2394 * src/LR0.c (state_table): Rename as...
2395 (state_hash): this, to avoid name clashes with the global
2396 `state_table'.
2397 * src/print_graph.c, src/LR0.c, src/LR0.h, src/conflicts.c
2398 * src/lalr.c, src/lalr.h, src/output.c, src/print.c: Adjust.
2399
24002001-12-10 Akim Demaille <akim@epita.fr>
2401
2402 Bison dumps core on bash.y.
2403 Reported by Pascal Bart.
2404
2405 * src/warshall.c (bitmatrix_print): New.
2406 (TC): Use it.
2407 When performing a transitive closure R(i, j) && R(j, k) => R(i, k),
2408 j must be the outer loop.
2409 * tests/regression.at (Broken Closure): New.
2410
24112001-12-05 Akim Demaille <akim@epita.fr>
2412
2413 * tests/atlocal.in (CPPFLAGS): Do not leave a space between -I and
2414 its argument.
2415