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