]> git.saurik.com Git - bison.git/blame - ChangeLog
* tests/calc.at (AT_CHECK_CALC): Adjust: there are now additional
[bison.git] / ChangeLog
CommitLineData
5504898e
AD
12002-05-26 Akim Demaille <akim@epita.fr>
2
3 * tests/calc.at (AT_CHECK_CALC): Adjust: there are now additional
4 `Error:' lines.
5 * data/bison.simple (yystos) [YYDEBUG]: New.
6 (yyparse) [YYDEBUG]: Display the symbols which are popped during
7 error recovery.
8 * tests/regression.at (Web2c Actions): Adjust: yystos is output now.
9
ec3bc396
AD
102002-05-25 Akim Demaille <akim@epita.fr>
11
12 * doc/bison.texinfo (Debugging): Split into...
13 (Tracing): this new section, its former contents, and...
14 (Understanding): this new section.
15 * src/getargs.h, src/getargs.c (verbose_flag): Remove, replaced
16 by...
17 (report_flag): this.
18 Adjust all dependencies.
19 (report_args, report_types, report_argmatch): New.
20 (usage, getargs): Report/support -r, --report.
21 * src/options.h
22 (struct option_table_struct): Rename as..,
23 (struct option_table_s): this.
24 Rename the `set_flag' member to `flag' to match with getopt_long's
25 struct.
26 * src/options.c (option_table): Split verbose into an entry for
27 %verbose, and another for --verbose.
28 Support --report/-r, so remove -r from the obsolete --raw.
29 * src/print.c: Attach full item sets and lookaheads reports to
30 report_flag instead of trace_flag.
31 * lib/argmatch.h, lib/argmatch.c: New, from Fileutils 4.1.
32
78df8250
PE
332002-05-24 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
34 and Paul Eggert <eggert@twinsun.com>
35
36 * data/bison.simple (yyparse): Correct error handling to conform to
37 POSIX and yacc. Specifically, after syntax error is discovered,
38 do not reduce further before shifting the error token.
39 Clean up the code a bit by removing the labels yyerrdefault,
40 yyerrhandle, yyerrpop.
41 * NEWS: Document the above.
42
c0c9ea05
PH
432002-05-20 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
44
45 * data/bison.simple (yyr1): Don't use yy_token_number_type as element
46 type; it isn't always big enough, since it doesn't necessarily
47 include non-terminals.
48 (yytranslate): Expand definition of yy_token_number_type, so that
49 the latter can be removed.
50 (yy_token_number_type): Remove, only one use.
51 * data/bison.c++ (r1_): Parallel change to yyr1 in bison.simple---
52 don't use TokenNumberType as element type.
53
54 * tests/regression.at: Modify expected output to agree with change
55 to yyr1 and yytranslate.
56
6390a83f
FK
572002-05-13 Florian Krohm <florian@edamail.fishkill.ibm.com>
58
59 * src/reader.c (parse_action): Use copy_character instead of
60 obstack_1grow.
61
db7c8e9a
AD
622002-05-13 Akim Demaille <akim@epita.fr>
63
64 * tests/regression.at (Token definitions): Prototype yylex and
65 yyerror.
66
fcc61800
PH
672002-05-12 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
68
158c687b 69 * src/scan-skel.l: Correct off-by-one error in handling of __oline__.
fcc61800
PH
70 * data/bison.simple (b4_sint_type, b4_uint_type): Correct to reflect
71 32-bit arithmetic.
72 * data/bison.c++ (b4_sint_type, b4_uint_type): Ditto.
73
5683e9b2
AD
742002-05-07 Akim Demaille <akim@epita.fr>
75
76 * tests/synclines.at: Be sure to prototype yylex and yyerror to
77 avoid GCC warnings.
78
0c2d3f4c
AD
792002-05-07 Akim Demaille <akim@epita.fr>
80
81 Kill GCC warnings.
82
83 * src/reduce.c (nonterminals_reduce): Don't loop over RITEM: loop
84 over the RHS of each rule.
85 * src/gram.h, src/gram.c (nritems): Is `unsigned int', not int.
86 * src/state.h (state_t): Member `nitems' is unsigned short.
87 * src/LR0.c (get_state): Adjust.
88 * src/reader.c (packgram): Likewise.
89 * src/output.c (GENERATE_MUSCLE_INSERT_TABLE): `max' is of type
90 `Type'.
91 (muscle_insert_int_table): Remove, unused.
92 (prepare_rules): Remove `max'.
93
1565b720
AD
942002-05-06 Akim Demaille <akim@epita.fr>
95
96 * src/closure.c (print_firsts): Display of the symbol tags.
97 (bitmatrix_print): Move to...
98 * lib/bitsetv-print.h, lib/bitsetv-print.c (bitsetv_matrix_dump):
99 here.
100 * tests/sets.at (Nullable, Broken Closure, Firsts): Adjust.
101
cfaee611
AD
1022002-05-06 Akim Demaille <akim@epita.fr>
103
104 * src/muscle_tab.c (muscle_m4_output): Must return TRUE for
105 hash_do_for_each.
106
458be8e0
AD
1072002-05-06 Akim Demaille <akim@epita.fr>
108
109 * src/LR0.c (new_state, get_state): Instead of using the global
110 `kernel_size' and `kernel_base', have two new arguments:
111 `core_size' and `core'.
112 Adjust callers.
113
a900a624
AD
1142002-05-06 Akim Demaille <akim@epita.fr>
115
116 * src/reader.c (packgram): No longer end `ritem' with a 0
117 sentinel: it is not used.
118
d4e7d3a1
AD
1192002-05-05 Akim Demaille <akim@epita.fr>
120
121 New experimental feature: display the lookaheads in the report and
122 graph.
123
124 * src/print (print_core): When --trace-flag, display the rules
125 lookaheads.
126 * src/print_graph.c (print_core): Likewise.
127 Swap the arguments.
128 Adjust caller.
129
39ceb25b
AD
1302002-05-05 Akim Demaille <akim@epita.fr>
131
132 * tests/torture.at (Many lookaheads): New test.
133
5372019f
AD
1342002-05-05 Akim Demaille <akim@epita.fr>
135
136 * src/output.c (GENERATE_OUTPUT_TABLE): Replace with...
137 (GENERATE_MUSCLE_INSERT_TABLE): this.
138 (output_int_table, output_unsigned_int_table, output_short_table)
139 (output_token_number_table, output_item_number_table): Replace with...
140 (muscle_insert_int_table, muscle_insert_unsigned_int_table)
141 (muscle_insert_short_table, muscle_insert_token_number_table)
142 (muscle_insert_item_number_table): these.
143 Adjust all callers.
144 (prepare_tokens): Don't free `translations', since...
145 * src/reader.h, src/reader.c (grammar_free): do it.
146 Move to...
147 * src/gram.h, src/gram.c (grammar_free): here.
148 * data/bison.simple, data/bison.c++: b4_token_number_max is now
149 b4_translate_max.
150
5df5f6d5
AD
1512002-05-05 Akim Demaille <akim@epita.fr>
152
153 * src/output.c (output_unsigned_int_table): New.
154 (prepare_rules): `i' is unsigned.
155 `prhs', `rline', `r2' are unsigned int.
156 Rename muscle `rhs_number_max' as `rhs_max'.
157 Output muscles `prhs_max', `rline_max', and `r2_max'.
158 Free rline and r1.
159 * data/bison.simple, data/bison.c++: Adjust to use these muscles
160 to compute types instead of constant types.
161 * tests/regression.at (Web2c Actions): Adjust.
162
b87f8b21
AD
1632002-05-04 Akim Demaille <akim@epita.fr>
164
165 * src/symtab.h (SALIAS, SUNDEF): Rename as...
166 (USER_NUMBER_ALIAS, USER_NUMBER_UNDEFINED): these.
167 Adjust dependencies.
168 * src/output.c (token_definitions_output): Be sure not to output a
169 `#define 'a'' when fed with `%token 'a' "a"'.
170 * tests/regression.at (Token definitions): New.
171
8bb936e4
PE
1722002-05-03 Paul Eggert <eggert@twinsun.com>
173
174 * data/bison.simple (b4_token_defines): Also define YYTOKENTYPE
175 for K&R C.
176
1772002-05-03 gettextize <bug-gnu-gettext@gnu.org>
178
179 * Makefile.am (SUBDIRS): Remove intl.
180 (EXTRA_DIST): Add config/config.rpath.
181
53c71a12
AD
1822002-05-03 Akim Demaille <akim@epita.fr>
183
184 * data/bison.simple (m4_if): Don't output empty enums.
185 And actually, output valid enum definitions :(.
186
289dd0cf
AD
1872002-05-03 Akim Demaille <akim@epita.fr>
188
189 * configure.bat: Remove, completely obsolete.
190 * Makefile.am (EXTRA_DIST): Adjust.
191 Don't distribute config.rpath...
192 * config/Makefile.am (EXTRA_DIST): Do it.
193
db85e524
AD
1942002-05-03 Akim Demaille <akim@epita.fr>
195
196 * configure.in (GETTEXT_VERSION): New.
197 Suggested by Bruno Haible for the forthcoming Gettext 0.10.3.
198
83ccf991
AD
1992002-05-03 Akim Demaille <akim@epita.fr>
200
201 * data/bison.simple (b4_token_enum): New.
202 (b4_token_defines): Use it to output tokens both as #define and
203 enums.
204 Suggested by Paul Eggert.
205 * src/output.c (token_definitions_output): Don't output spurious
206 white spaces.
207
1f418995
AD
2082002-05-03 Akim Demaille <akim@epita.fr>
209
210 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
211
45119f04
RA
2122002-05-02 Robert Anisko <robert@lrde.epita.fr>
213
214 * data/bison.c++: Adapt expansion of $s and @s to the C++ parser.
215 Update the stack class, give a try to deque as the default container.
216
b2d52318
AD
2172002-05-02 Akim Demaille <akim@epita.fr>
218
219 * data/bison.simple (yyparse): Do not implement @$ = @1.
220 (YYLLOC_DEFAULT): Adjust to do it.
221 * doc/bison.texinfo (Location Default Action): Fix.
222
3a8b4109
AD
2232002-05-02 Akim Demaille <akim@epita.fr>
224
225 * src/reader.c (parse_braces): Merge into...
226 (parse_action): this.
227
84614e13
AD
2282002-05-02 Akim Demaille <akim@epita.fr>
229
230 * configure.in (ALL_LINGUAS): Remove.
231 * po/LINGUAS, hr.po: New.
232
fdbcd8e2
AD
2332002-05-02 Akim Demaille <akim@epita.fr>
234
235 Remove the so called hairy (semantic) parsers.
236
237 * src/system.h (EXT_GUARD_C, EXT_STYPE_H): Remove.
238 * src/gram.h, src/gram.c (semantic_parser): Remove.
239 (rule_t): Remove the guard and guard_line members.
240 * src/lex.h (token_t): remove tok_guard.
241 * src/options.c (option_table): Remove %guard and %semantic_parser
242 support.
243 * src/output.c, src/output.h (guards_output): Remove.
244 (prepare): Adjust.
245 (token_definitions_output): Don't output the `T'
246 tokens (???).
247 (output_skeleton): Don't output the guards.
248 * src/files.c, src/files.c (attrsfile): Remove.
249 * src/reader.c (symbol_list): Remove the guard and guard_line
250 members.
251 Adjust dependencies.
252 (parse_guard): Remove.
253 * data/bison.hairy: Remove.
254 * doc/bison.texinfo (Environment Variables): Remove occurrences of
255 BISON_HAIRY.
256
82b6cb3f
AD
2572002-05-02 Akim Demaille <akim@epita.fr>
258
259 * src/reader.c (copy_at, copy_dollarm parse_braces, parse_action)
260 (parse_guard): Rename the formal argument `stack_offset' as
261 `rule_length', which is more readable.
262 Adjust callers.
263 (copy_at, copy_dollar): Instead of outputting the hard coded
264 values of $$, $n and so forth, output invocation to b4_lhs_value,
265 b4_lhs_location, b4_rhs_value, and b4_rhs_location.
900c877b
AD
266 Note: this patch partially drops `semantic-parser' support: it
267 always does `rule_length - n', where semantic parsers ought to
268 always use `-n'.
82b6cb3f
AD
269 * data/bison.simple, data/bison.c++ (b4_lhs_value)
270 (b4_lhs_location, b4_rhs_value, and b4_rhs_location: New.
271
6cbfbcc5
AD
2722002-05-02 Akim Demaille <akim@epita.fr>
273
274 * configure.in (AC_INIT): Bump to 1.49b.
275 (AM_INIT_AUTOMAKE): Short invocation.
276
b8548114
AD
2772002-05-02 Akim Demaille <akim@epita.fr>
278
279 Version 1.49a.
280
c20cd1fa
AD
2812002-05-01 Akim Demaille <akim@epita.fr>
282
283 * src/skeleton.h: Remove.
284
8a9566d4
AD
2852002-05-01 Akim Demaille <akim@epita.fr>
286
287 * src/skeleton.h: Fix the #endif.
288 Reported by Magnus Fromreide.
289
8c6d399a
PE
2902002-04-26 Paul Eggert <eggert@twinsun.com>
291
292 * data/bison.simple (YYSTYPE_IS_TRIVIAL, YYLTYPE_IS_TRIVIAL):
293 Define if we define YYSTYPE and YYLTYPE, respectively.
b756bb75 294 (YYCOPY): Fix [] quoting problem in the non-GCC case.
8a9566d4 295
2b7ed18a
RA
2962002-04-25 Robert Anisko <robert@lrde.epita.fr>
297
298 * src/scan-skel.l: Postprocess quadrigraphs.
299
300 * src/reader.c (copy_character): New function, used to output
301 single characters while replacing `[' and `]' with quadrigraphs, to
302 avoid troubles with M4 quotes.
303 (copy_comment): Output characters with copy_character.
304 (read_additionnal_code): Likewise.
305 (copy_string2): Likewise.
306 (copy_definition): Likewise.
307
308 * tests/calc.at: Exercise M4 quoting.
309
34a89c50
AD
3102002-04-25 Akim Demaille <akim@epita.fr>
311
312 * tests/sets.at (AT_EXTRACT_SETS): Sed portability issue: no space
313 between `!' and the command.
314 Reported by Paul Eggert.
315
0dd1580a
RA
3162002-04-24 Robert Anisko <robert@lrde.epita.fr>
317
318 * tests/calc.at: Exercise prologue splitting.
319
320 * data/bison.simple, data/bison.c++: Use `b4_pre_prologue' and
321 `b4_post_prologue' instead of `b4_prologue'.
322
323 * src/output.c (prepare): Add the `pre_prologue' and `post_prologue'
324 muscles.
325 (output): Free pre_prologue_obstack and post_prologue_obstack.
326 * src/files.h, src/files.c (attrs_obstack): Remove.
327 (pre_prologue_obstack, post_prologue_obstack): New.
328 * src/reader.c (copy_definition): Add a parameter to specify the
329 obstack to fill, instead of using attrs_obstack unconditionally.
330 (read_declarations): Pass pre_prologue_obstack to copy_definition if
331 `%union' has not yet been seen, pass post_prologue_obstack otherwise.
332
83c1796f
PE
3332002-04-23 Paul Eggert <eggert@twinsun.com>
334
335 * data/bison.simple: Remove unnecessary commentary and white
336 space differences from 1_29-branch.
337 Depend on YYERROR_VERBOSE, not defined (YYERROR_VERBOSE).
338
339 (union yyalloc, YYSTACK_GAP_MAX, YYSTACK_BYTES, YYCOPY,
340 YYSTACK_RELOCATE): Do not define if yyoverflow is defined, or
341 if this is a C++ parser and YYSTYPE or YYLTYPE has nontrivial
342 constructors or destructors.
343
344 (yyparse) [! defined YYSTACK_RELOCATE]: Do not relocate the stack.
345
1207eeac
AD
3462002-04-23 Akim Demaille <akim@epita.fr>
347
348 * tests/sets.at (AT_EXTRACT_SETS): Don't use 8 char long sed labels.
349 * tests/synclines.at (AT_TEST_SYNCLINE): Be robust to GCC's
350 location with columns.
351 * tests/conflicts.at (%nonassoc and eof): Don't use `error.h'.
352 All reported by Paul Eggert.
353
78ab8f67
AD
3542002-04-22 Akim Demaille <akim@epita.fr>
355
356 * src/reduce.c (dump_grammar): Move to...
357 * src/gram.h, src/gram.c (grammar_dump): here.
358 Be sure to separate long item numbers.
359 Don't read the members of a rule's prec if its nil.
360
133c20e2
AD
3612002-04-22 Akim Demaille <akim@epita.fr>
362
363 * src/output.c (table_size, table_grow): New.
364 (MAXTABLE): Remove, replace uses with table_size.
365 (pack_vector): Instead of dying when the table is too big, grow it.
366
9515e8a7
AD
3672002-04-22 Akim Demaille <akim@epita.fr>
368
369 * data/bison.simple (yyr1): Its type is that of a token number.
370 * data/bison.c++ (r1_): Likewise.
371 * tests/regression.at (Web2c Actions): Adjust.
372
23c5a174
AD
3732002-04-22 Akim Demaille <akim@epita.fr>
374
375 * src/reader.c (token_translations_init): 256 is now the default
376 value for the error token, i.e., it will be assigned another
377 number if the user assigned 256 to one of her tokens.
378 (reader): Don't force 256 to error.
379 * doc/bison.texinfo (Symbols): Adjust.
380 * tests/torture.at (AT_DATA_HORIZONTAL_GRAMMAR)
381 (AT_DATA_TRIANGULAR_GRAMMAR): Number the tokens as 1, 2, 3
382 etc. instead of 10, 20, 30 (which was used to `jump' over error
383 (256) and undefined (2)).
384
5fbb0954
AD
3852002-04-22 Akim Demaille <akim@epita.fr>
386
387 Propagate more token_number_t.
388
389 * src/gram.h (token_number_as_item_number)
390 (item_number_as_token_number): New.
391 * src/output.c (GENERATE_OUTPUT_TABLE): New.
392 Use it to create output_item_number_table and
393 output_token_number_table.
394 * src/LR0.c, src/derives.c, src/gram.c, src/gram.h, src/lalr.c,
395 * src/lex.c, src/nullable.c, src/output.c, src/print.c,
396 * src/print_graph.c, src/reader.c, src/reduce.c, src/state.h,
397 * src/symtab.c, src/symtab.h: Use token_number_t instead of shorts.
398
4f940944
AD
3992002-04-22 Akim Demaille <akim@epita.fr>
400
401 * src/output.h, src/output.c (get_lines_number): Remove.
402
3ded9a63
AD
4032002-04-19 Akim Demaille <akim@epita.fr>
404
405 * doc/bison.texinfo (Actions): Make clear that `|' is not the same
406 as Lex/Flex'.
407 (Debugging): More details about enabling the debugging features.
408 (Table of Symbols): Describe $$, $n, @$, and @n.
409 Suggested by Tim Josling.
410
e0c471a9
AD
4112002-04-19 Akim Demaille <akim@epita.fr>
412
413 * doc/bison.texinfo: Remove the uses of the obsolete @refill.
414
fecc10cd
AD
4152002-04-10 Akim Demaille <akim@epita.fr>
416
417 * src/system.h: Rely on HAVE_LIMITS_H.
418 Suggested by Paul Eggert.
419
51dec47b
AD
4202002-04-09 Akim Demaille <akim@epita.fr>
421
422 * tests/calc.at (_AT_CHECK_CALC_ERROR): Receive as argument the
423 full stderr, and strip it according to the bison options, instead
424 of composing the error message from different bits.
425 This makes it easier to check for several error messages.
426 Adjust all the invocations.
427 Add an invocation exercising the error token.
428 Add an invocation demonstrating a stupid error message.
429 (_AT_DATA_CALC_Y): Follow the GCS: initial column is 1, not 0.
430 Adjust the tests.
431 Error message are for stderr, not stdout.
432
007a50a4
AD
4332002-04-09 Akim Demaille <akim@epita.fr>
434
435 * src/gram.h, src/gram.c (error_token_number): Remove, use
436 errtoken->number.
437 * src/reader.c (reader): Don't specify the user token number (2)
438 for $undefined, as it uselessly prevents using it.
439 * src/gram.h (token_number_t): Move to...
440 * src/symtab.h: here.
441 (state_t.number): Is a token_number_t.
442 * src/print.c, src/reader.c: Use undeftoken->number instead of
443 hard coded 2.
444 (Even though this 2 is not the same as above: the number of the
445 undeftoken remains being 2, it is its user token number which
446 might not be 2).
447 * src/output.c (prepare_tokens): Rename the `maxtok' muscle with
448 `user_token_number_max'.
449 Output `undef_token_number'.
450 * data/bison.simple, data/bison.c++: Use them.
451 Be sure to map invalid yylex return values to
452 `undef_token_number'. This saves us from gratuitous SEGV.
453
454 * tests/conflicts.at (Solved SR Conflicts)
455 (Unresolved SR Conflicts): Adjust.
456 * tests/regression.at (Web2c Actions): Adjust.
457
06446ccf
AD
4582002-04-08 Akim Demaille <akim@epita.fr>
459
460 * data/bison.c++: s/b4_item_number_max/b4_rhs_number_max/.
461 Adding #line.
462 Remove the duplicate `typedefs'.
463 (RhsNumberType): Fix the declaration and various other typos.
464 Use __ofile__.
465 * data/bison.simple: Use __ofile__.
466 * src/scan-skel.l: Handle __ofile__.
467
62a3e4f0
AD
4682002-04-08 Akim Demaille <akim@epita.fr>
469
470 * src/gram.h (item_number_t): New, the type of item numbers in
471 RITEM. Note that it must be able to code symbol numbers as
472 positive number, and the negation of rule numbers as negative
473 numbers.
474 Adjust all dependencies (pretty many).
475 * src/reduce.c (rule): Remove this `short *' pointer: use
476 item_number_t.
477 * src/system.h (MINSHORT, MAXSHORT): Remove.
478 Include `limits.h'.
479 Adjust dependencies to using SHRT_MAX and SHRT_MIN.
480 (shortcpy): Remove.
481 (MAXTABLE): Move to...
482 * src/output.c (MAXTABLE): here.
483 (prepare_rules): Use output_int_table to output rhs.
484 * data/bison.simple, data/bison.c++: Adjust.
485 * tests/torture.at (Big triangle): Move the limit from 254 to
486 500.
487 * tests/regression.at (Web2c Actions): Ajust.
488
489 Trying with bigger grammars shows various phenomena: at 3000 (28Mb
490 of grammar file) bison is killed by my system, at 2000 (12Mb) bison
491 passes, but produces negative #line number, once fixed, GCC is
492 killed while compiling 14Mb, at 1500 (6.7 Mb of grammar, 8.2Mb of
493 C), it passes.
494 * src/state.h (state_h): Code input lines on ints, not shorts.
495
bb88b0fc
AD
4962002-04-08 Akim Demaille <akim@epita.fr>
497
498 * src/reduce.c (reduce_grammar): First reduce the nonterminals,
499 and then the grammar.
500
9a636f47
AD
5012002-04-08 Akim Demaille <akim@epita.fr>
502
503 * src/system.h: No longer using strndup.
504
680e8701
AD
5052002-04-07 Akim Demaille <akim@epita.fr>
506
507 * src/muscle_tab.h (MUSCLE_INSERT_LONG_INT): New.
508 * src/output.c (output_table_data): Return the longest number.
509 (prepare_tokens): Output `token_number_max').
510 * data/bison.simple, data/bison.c++ (b4_sint_type, b4_uint_type):
511 New.
512 Use them to define yy_token_number_type/TokenNumberType.
513 Use this type for yytranslate.
514 * tests/torture.at (Big triangle): Push the limit from 124 to
515 253.
516 * tests/regression.at (Web2c Actions): Adjust.
517
817e9f41
AD
5182002-04-07 Akim Demaille <akim@epita.fr>
519
520 * tests/torture.at (Big triangle): New.
521 (GNU AWK Grammar, GNU Cim Grammar): Move to...
522 * tests/existing.at: here.
523
5123689b
AD
5242002-04-07 Akim Demaille <akim@epita.fr>
525
526 * src/gram.h, src/gram.c (nitems): Remove, it is an alias of
527 nritems.
528 Adjust dependencies.
529
f3849179
AD
5302002-04-07 Akim Demaille <akim@epita.fr>
531
532 * src/reader.c: Normalize increments to prefix form.
533
bd02036a
AD
5342002-04-07 Akim Demaille <akim@epita.fr>
535
536 * src/reader.c, symtab.c: Remove debugging code.
537
db8837cb
AD
5382002-04-07 Akim Demaille <akim@epita.fr>
539
540 Rename all the `bucket's as `symbol_t'.
541
542 * src/gram.c, src/gram.h, src/lex.c, src/lex.h, src/output.c,
543 * src/reader.c, src/reader.h, src/reduce.c, src/state.h,
544 * src/symtab.c, src/symtab.h (bucket): Rename as...
545 (symbol_t): this.
546 (symbol_list_new, bucket_check_defined, bucket_make_alias)
547 (bucket_check_alias_consistence, bucket_pack, bucket_translation)
548 (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
549 (buckets_new, buckets_free, buckets_do): Rename as...
550 (symbol_list_new, symbol_check_defined, symbol_make_alias)
551 (symbol_check_alias_consistence, symbol_pack, symbol_translation)
552 (symbol_new, symbol_free, hash_compare_symbol_t, hash_symbol_t)
553 (symbols_new, symbols_free, symbols_do): these.
554
72a23c97
AD
5552002-04-07 Akim Demaille <akim@epita.fr>
556
557 Use lib/hash for the symbol table.
558
559 * src/gram.c (ntokens): Initialize to 1, to reserve a slot for
560 EOF.
561 * src/lex.c (lex): Set the `number' member of new terminals.
562 * src/reader.c (bucket_check_defined, bucket_make_alias)
563 (bucket_check_alias_consistence, bucket_translation): New.
564 (reader, grammar_free, readgram, token_translations_init)
565 (packsymbols): Adjust.
566 (reader): Number the predefined tokens.
567 * src/reduce.c (inaccessable_symbols): Just use hard coded numbers
568 for predefined tokens.
569 * src/symtab.h (bucket): Remove all the hash table related
570 members.
571 * src/symtab.c (symtab): Replace by...
572 (bucket_table): this.
573 (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
574 (buckets_new, buckets_do): New.
575
280a38c3
AD
5762002-04-07 Akim Demaille <akim@epita.fr>
577
578 * src/gram.c (nitems, nrules, nsyms, ntokens, nvars, nritems)
579 (start_symbol, max_user_token_number, semantic_parser)
580 (error_token_number): Initialize.
581 * src/reader.c (grammar, start_flag, startval, typed, lastprec):
582 Initialize.
583 (reader): Don't.
584 (errtoken, eoftoken, undeftoken, axiom): Extern.
585
03b31c0c
AD
5862002-04-07 Akim Demaille <akim@epita.fr>
587
588 * src/gram.h (rule_s): prec and precsym are now pointers
589 to the bucket giving the priority/associativity.
590 Member `associativity' removed: useless.
591 * src/reduce.c, src/conflicts.c: Adjust.
592
8b3df748
AD
5932002-04-07 Akim Demaille <akim@epita.fr>
594
595 * src/lalr.c, src/LR0.c, src/closure.c, src/gram.c, src/reduce.c:
596 Properly escape the symbols' TAG when outputting them.
597
e601aa1d
AD
5982002-04-07 Akim Demaille <akim@epita.fr>
599
600 * src/lalr.h (LA): Is a bitsetv, not bitset*.
601
b0299a2e
AD
6022002-04-07 Akim Demaille <akim@epita.fr>
603
604 * src/lalr.h, src/lalr.c (LAruleno): Replace with...
605 (LArule): this, which is an array to rule_t*.
606 * src/print.c, src/conflicts.c: Adjust.
607
d7e1f00c
AD
6082002-04-07 Akim Demaille <akim@epita.fr>
609
610 * src/gram.h (rule_t): Rename `number' as `user_number'.
611 `number' is a new member.
612 Adjust dependencies.
613 * src/reduce.c (reduce_grammar_tables): Renumber rule_t.number.
614
cc9305dd
AD
6152002-04-07 Akim Demaille <akim@epita.fr>
616
617 As a result of the previous patch, it is no longer needed
618 to reorder ritem itself.
619
620 * src/reduce.c (reduce_grammar_tables): Don't sort RITEM.
621
b0940840
AD
6222002-04-07 Akim Demaille <akim@epita.fr>
623
624 Be sure never to walk through RITEMS, but use only data related to
625 the rules themselves. RITEMS should be banished.
626
627 * src/output.c (output_token_translations): Rename as...
628 (prepare_tokens): this.
629 In addition to `translate', prepare the muscles `tname' and
630 `toknum', which were handled by...
631 (output_rule_data): this.
632 Remove, and move the remainder of its outputs into...
633 (prepare_rules): this new routines, which also merges content from
634 (output_gram): this.
635 (prepare_rules): Be sure never to walk through RITEMS.
636 (output_stos): Rename as...
637 (prepare_stos): this.
638 (output): Always invoke prepare_states, after all, just don't use it
639 in the output if you don't need it.
640
643a5994
AD
6412002-04-07 Akim Demaille <akim@epita.fr>
642
643 * src/LR0.c (new_state): Display `nstates' as the name of the
644 newly created state.
645 Adjust to initialize first_state and last_state if needed.
646 Be sure to distinguish the initial from the final state.
647 (new_states): Create the itemset of the initial state, and use
648 new_state.
649 * src/closure.c (closure): Now that the initial state has its
650 items properly set, there is no need for a special case when
651 creating `ruleset'.
652
653 As a result, now the rule 0, reducing to $axiom, is visible in the
654 outputs. Adjust the test suite.
655
656 * tests/conflicts.at (Solved SR Conflicts)
657 (Unresolved SR Conflicts): Adjust.
658 * tests/regression.at (Web2c Report, Rule Line Numbers): Idem.
659 * tests/conflicts.at (S/R in initial): New.
660
b4c4ccc2
AD
6612002-04-07 Akim Demaille <akim@epita.fr>
662
663 * src/LR0.c (allocate_itemsets): Don't loop over ritem: loop over
664 the RHS of the rules.
665 * src/output.c (output_gram): Likewise.
666
bba97eb2
AD
6672002-04-07 Akim Demaille <akim@epita.fr>
668
669 * src/gram.h (rule_t): `lhs' is now a pointer to the symbol's
670 bucket.
671 Adjust all dependencies.
672 * src/reduce.c (nonterminals_reduce): Don't forget to renumber the
673 `number' of the buckets too.
674 * src/gram.h: Include `symtab.h'.
675 (associativity): Move to...
676 * src/symtab.h: here.
677 No longer include `gram.h'.
678
c3b407f4
AD
6792002-04-07 Akim Demaille <akim@epita.fr>
680
681 * src/gram.h, src/gram.c (rules_rhs_length): New.
682 (ritem_longest_rhs): Use it.
683 * src/gram.h (rule_t): `number' is a new member.
684 * src/reader.c (packgram): Set it.
685 * src/reduce.c (reduce_grammar_tables): Move the useless rules at
686 the end of `rules', and count them out of `nrules'.
687 (reduce_output, dump_grammar): Adjust.
688 * src/print.c (print_grammar): It is no longer needed to check for
689 the usefulness of a rule, as useless rules are beyond `nrules + 1'.
690 * tests/reduce.at (Reduced Automaton): New test.
691
11652ab3
AD
6922002-04-07 Akim Demaille <akim@epita.fr>
693
694 * src/reduce.c (inaccessable_symbols): Fix a buglet: because of a
695 lacking `+ 1' to nrules, Bison reported as useless a token if it
696 was used solely to set the precedence of the last rule...
697
26b23c1a
AD
6982002-04-07 Akim Demaille <akim@epita.fr>
699
700 * data/bison.c++, data/bison.simple: Don't output the current file
701 name in #line, to avoid useless diffs between two identical
702 outputs under different names.
703
18bcecb0
AD
7042002-04-07 Akim Demaille <akim@epita.fr>
705
706 * src/closure.c, src/print.c, src/reader.c, src/reduce.c:
707 Normalize loops to using `< nrules + 1', not `<= nrules'.
708
fa770c86
AD
7092002-04-07 Akim Demaille <akim@epita.fr>
710
711 * TODO: Update.
712
d9b739c3
AD
7132002-04-07 Akim Demaille <akim@epita.fr>
714
715 * src/output.c, src/reader.c, src/symtab.c, src/symtab.h: Rename
716 bucket.value as bucket.number.
717
99013900
AD
7182002-04-07 Akim Demaille <akim@epita.fr>
719
720 * src/closure.c, src/derives.c, src/gram.h, src/lalr.c,
721 * src/nullable.c, src/output.c, src/print.c, src/print_graph.c,
722 * src/reader.c, src/reduce.c: Let rule_t.rhs point directly to the
723 RHS, instead of being an index in RITEMS.
724
e966383b
PE
7252002-04-04 Paul Eggert <eggert@twinsun.com>
726
727 * doc/bison.texinfo: Update copyright date.
728 (Rpcalc Lexer, Symbols, Token Decl): Don't assume ASCII.
729 (Symbols): Warn about running Bison in one character set,
730 but compiling and/or running in an incompatible one.
731 Warn about character code 256, too.
732
7332002-04-03 Paul Eggert <eggert@twinsun.com>
734
735 * src/bison.data (YYSTACK_ALLOC): Depend on whether
736 YYERROR_VERBOSE is nonzero, not whether it is defined.
737
738 Merge changes from bison-1_29-branch.
c307773e 739
8d6c48b9
PE
7402002-03-20 Paul Eggert <eggert@twinsun.com>
741
742 Merge fixes from Debian bison_1.34-1.diff.
743
744 * configure.in (AC_PREREQ): 2.53.
745
e53c6322
AD
7462002-03-20 Akim Demaille <akim@epita.fr>
747
748 * src/conflicts.c (log_resolution): Argument `resolution' is const.
749
9ffbeca7
PE
7502002-03-19 Paul Eggert <eggert@twinsun.com>
751
21db0b2a
PE
752 * src/bison.simple (YYCOPY): New macro.
753 (YYSTACK_RELOCATE): Use it.
754 Remove Type arg; no longer needed. All callers changed.
755 (yymemcpy): Remove; no longer needed.
756
9ffbeca7
PE
757 * Makefile.am (AUTOMAKE_OPTIONS): 1.6.
758 * doc/Makefile.am (AUTOMAKE_OPTIONS): Remove.
759
642cb8f8
AD
7602002-03-19 Akim Demaille <akim@epita.fr>
761
762 Test and fix the #line outputs.
763
764 * tests/atlocal.at (GCC): New.
765 * tests/synclines.at (AT_TEST_SYNCLINE): New macro.
766 (Prologue synch line, ,%union synch line, Postprologue synch line)
767 (Action synch line, Epilogue synch line): New tests.
768 * src/reader.c (parse_union_decl): Define the muscle stype_line.
769 * data/bison.simple, data/bison.c++: Use it.
770
3c31a486
AD
7712002-03-19 Akim Demaille <akim@epita.fr>
772
773 * tests/regression.at (%nonassoc and eof, Unresolved SR Conflicts)
774 (Solved SR Conflicts, %expect not enough, %expect right)
775 (%expect too much): Move to...
776 * tests/conflicts.at: this new file.
777
0d8bed56
AD
7782002-03-19 Akim Demaille <akim@epita.fr>
779
780 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
781 * data/bison.simple, data/bison.c++: Handle the `#define' part, so
782 that we can move to enums for instance.
783 * src/output.c (token_definitions_output): Output a list of
784 `token-name, token-number' instead of the #define.
785 (output_skeleton): Name this list `b4_tokens', not `b4_tokendefs'.
786
9208d17f
AD
7872002-03-14 Akim Demaille <akim@epita.fr>
788
789 Use Gettext 0.11.1.
790
af27eacb
RA
7912002-03-09 Robert Anisko <robert@lrde.epita.fr>
792
793 * data/bison.c++: Make the user able to add members to the generated
794 parser by subclassing.
795
9101a310
RA
7962002-03-05 Robert Anisko <robert@lrde.epita.fr>
797
798 * src/reader.c (read_additionnal_code): `c' should be an integer, not
799 a character.
800 Reported by Nicolas Tisserand and Nicolas Burrus.
801
fff9bf0b
RA
8022002-03-04 Robert Anisko <robert@lrde.epita.fr>
803
804 * src/reader.c: Warn about lacking semi-colons, do not complain.
805
64dba31e
RA
8062002-03-04 Robert Anisko <robert@lrde.epita.fr>
807
808 * data/bison.c++: Remove a debug line.
809
374f5a14
RA
8102002-03-04 Robert Anisko <robert@lrde.epita.fr>
811
812 * data/bison.c++: Unmerge value as yylval and value as yyval. Unmerge
813 location as yylloc and location as yyloc. Use YYLLOC_DEFAULT, and
814 provide a default implementation.
815
bfcf1f3a
AD
8162002-03-04 Akim Demaille <akim@epita.fr>
817
818 * tests/input.at (Invalid $n, Invalid @n): Add the ending `;'.
819 * tests/output.at (AT_CHECK_OUTPUT): Likewise.
820 * tests/headers.at (AT_TEST_CPP_GUARD_H): Ditto.
821 * tests/semantic.at (Parsing Guards): Similarly.
822 * src/reader.at (readgram): Complain if the last rule is not ended
823 with a semi-colon.
824
65ccf9fc
AD
8252002-03-04 Akim Demaille <akim@epita.fr>
826
827 * src/warshall.h, src/warshall.c (bitmatrix_print): Move to...
828 * src/closure.c: here.
829 (set_firsts): Use bitsetv_reflexive_transitive_closure instead of
830 RTC.
831 * src/warshall.h, src/warshall.c: Remove.
832 * tests/sets.at (Broken Closure): Adjust.
833
d0039cbc
AD
8342002-03-04 Akim Demaille <akim@epita.fr>
835
836 * src/output.c (output_skeleton): tempdir is const.
837 bytes_read is unused.
838
345cea78
AD
8392002-03-04 Akim Demaille <akim@epita.fr>
840
841 * lib/bbitset.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
842 * lib/bitsetv.h, lib/ebitset.c, lib/lbitset.c, lib/sbitset.c:
843 Update.
844 From Michael Hayes.
845
564801f7
AD
8462002-03-04 Akim Demaille <akim@epita.fr>
847
848 * src/closure.c (closure): `r' is unused.
849
e5352bc7
AD
8502002-03-04 Akim Demaille <akim@epita.fr>
851
852 * tests/sets.at (Broken Closure): Add the ending `;'.
853 * src/reader.at (readgram): Complain if a rule is not ended with a
854 semi-colon.
855
914feea9
AD
8562002-03-04 Akim Demaille <akim@epita.fr>
857
858 * src/conflicts.c (set_conflicts): Use bitset_disjoint_p.
859 (count_sr_conflicts): Use bitset_count.
860 * src/reduce.c (inaccessable_symbols): Ditto.
861 (bits_size): Remove.
862 * src/warshall.h, src/warshall.c: Convert to bitsetv.
863
f0250de6
AD
8642002-03-04 Akim Demaille <akim@epita.fr>
865
866 * src/closure.c, src/conflicts.c, src/lalr.c, src/print.c,
867 * src/reduce.c: Remove the `bitset_zero's following the
868 `bitset_create's, as now it is performed by the latter.
869
ef017502
AD
8702002-03-04 Akim Demaille <akim@epita.fr>
871
872 * lib/bitset.c, lib/bitset.h, lib/bitsetv.c, lib/bitsetv.h,
873 * lib/ebitset.c, lib/ebitset.h, lib/lbitset.c, lib/lbitset.h,
874 * lib/sbitset.c, lib/sbitset.h, lib/bbitset.h: Update from the
875 latest sources from Michael.
876
76514394
AD
8772002-03-04 Akim Demaille <akim@epita.fr>
878
879 * src/output.c (output): Don't free the grammar.
880 * src/reader.c (grammar_free): New.
881 * src/main.c (main): Call it and don't free symtab here.
882
55024580
AD
8832002-03-04 Akim Demaille <akim@epita.fr>
884
885 * src/lex.c (parse_percent_token): Be sure to 0-end token_buffer
886 before returning.
887 Reported by Benoit Perrot.
888
f9abaa2c
AD
8892002-03-04 Akim Demaille <akim@epita.fr>
890
891 Use bitset operations when possible, not loops over bits.
892
893 * src/conflicts.c (set_conflicts, count_sr_conflicts): Use
894 bitset_or.
895 * src/print.c (print_reductions): Use bitset_and, bitset_andn.
896 * src/reduce.c (useless_nonterminals): Formatting changes.
897 * src/warshall.c (TC): Use bitset_or.
898
0e721e75
AD
8992002-03-04 Akim Demaille <akim@epita.fr>
900
901 * src/lalr.h, src/lalr.c (tokensetsize): Remove, unused.
902 * src/system.h (BITS_PER_WORD, WORDSIZE, SETBIT, RESETBIT, BITISSET):
903 Ditto.
904
0fb1ffb1
AD
9052002-03-04 Akim Demaille <akim@epita.fr>
906
907 * src/lalr.c (F): Now a bitset*.
908 Adjust all dependencies.
909
b86796bf
AD
9102002-03-04 Akim Demaille <akim@epita.fr>
911
912 * src/conflicts.c (shiftset, lookaheadset): Now bitset.
913 Adjust all dependencies.
914
602bbf31
AD
9152002-03-04 Akim Demaille <akim@epita.fr>
916
917 * src/L0.c, src/LR0.h (nstates): Be size_t.
918 Adjust comparisons (signed vs unsigned).
919 * src/conflics.c, src/lalr.c, src/lalr.h, src/output.c (LA): Now a
920 bitset*.
921 Adjust all dependencies.
922
d8a0245c
AD
9232002-03-04 Akim Demaille <akim@epita.fr>
924
925 * src/closure.c (firsts): Now, also a bitset.
926 Adjust all dependencies.
927 (varsetsize): Remove, now unused.
928 * src/warshall.h, src/warshall.c: Now work on arrays of bitsets.
929
34ba9743
AD
9302002-03-04 Akim Demaille <akim@epita.fr>
931
932 * src/print.c: Convert to use bitset.h, not hand coded iterations
933 over ints.
934
ed86e78c
AD
9352002-03-04 Akim Demaille <akim@epita.fr>
936
937 * src/reduce.c: Convert to use bitset.h, not hand coded BSet.
938
dfdb1797
AD
9392002-03-04 Akim Demaille <akim@epita.fr>
940
941 * src/closure.c (ruleset): Be a bitset.
942 (rulesetsize): Remove.
943
7086e707
AD
9442002-03-04 Akim Demaille <akim@epita.fr>
945
946 * lib/bitset-int.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
947 * lib/bitsetv.h, lib/ebitset.c, lib/ebitset.h, lib/lbitset.c,
948 * lib/lbitset.h, lib/sbitset.c, lib/sbitset.h: New.
949 * src/closure.c (fderives): Be an array of bitsets.
950
98254360
RA
9512002-02-28 Robert Anisko <robert@lrde.epita.fr>
952
953 * data/bison.c++: Merge the two generated headers. Insert a copyright
954 notice in each output file.
955
a75c057f
AD
9562002-02-28 Akim Demaille <akim@epita.fr>
957
958 * data/bison.c++: Copy the prologue of bison.simple to fetch
959 useful M4 definitions, such as b4_header_guard.
960
06b00abc
AD
9612002-02-25 Akim Demaille <akim@epita.fr>
962
963 * src/getargs.c (version): Give the name of the authors, and use a
a75c057f
AD
964 translator friendly scheme for the bgr
965 copyright notice.
06b00abc 966
70e7d534
AD
9672002-02-25 Akim Demaille <akim@epita.fr>
968
969 * src/output.c (header_output): Remove, now handled completely via
970 M4.
971
abe017f6
AD
9722002-02-25 Akim Demaille <akim@epita.fr>
973
974 * m4/m4.m4: New, from CVS Autoconf.
975 * configure.in: Invoke it.
976 * src/output.c (output_skeleton): Use its result instead of the
977 hard coded name.
978
381fb12e
AD
9792002-02-25 Akim Demaille <akim@epita.fr>
980
981 * lib/tempname.c, lib/mkstemp.c, m4/mkstemp.m4: New, stolen from
982 Fileutils 4.1.5.
983 * configure.in: Invoke UTILS_FUNC_MKSTEMP.
984 * src/output.c (output_skeleton): Use mkstemp to create a real
985 temporary file.
986 Move the filling of `skeleton' and its muscle to...
987 (prepare): here.
988 (output): Move the definition of the prologue muscle to...
989 (prepare): here.
990 * src/system.h (DEFAULT_TMPDIR): New.
991
6f38107f
PE
9922002-02-14 Paul Eggert <eggert@twinsun.com>
993
994 Remove the support for C++ namespace cleanliness; it was
995 causing more problems than it was curing, since it didn't work
996 properly on some nonstandard C++ compilers. This can wait
997 for a proper C++ parser.
998
999 * NEWS: Document this.
1000 * doc/bison.texinfo (Bison Parser, Debugging): Remove special mention
1001 of C++, as it's treated like C now.
1002 * src/bison.simple (YYSTD): Remove.
1003 (YYSIZE_T, YYFPRINTF, YYPARSE_PARAM_ARG, YYPARSE_PARAM_DECL):
1004 Treat C++ just like Standard C instead of trying to support
1005 namespace cleanliness.
1006
80cce3da
AD
10072002-02-14 Akim Demaille <akim@epita.fr>
1008
1009 * tests/regression.at (else): Adjust to Andreas' change.
1010
842e8679
AD
10112002-02-14 Akim Demaille <akim@epita.fr>
1012
1013 * lib/Makefile.am (EXTRA_DIST): Ship strnlen.c.
1014
4bda3f10
AD
10152002-02-13 Andreas Schwab <schwab@suse.de>
1016
1017 * src/output.c (output_rule_data): Don't output NULL, it might
1018 not be defined yet.
1019
4162fa07 10202002-02-11 Robert Anisko <robert@lrde.epita.fr>
b418ecd8 1021
4162fa07
RA
1022 * data/bison.c++ (YYDEBUG, YYERROR_VERBOSE): After the prologue.
1023 (Copyright notice): Update.
b418ecd8 1024
bd16a5dc
AD
10252002-02-11 Akim Demaille <akim@epita.fr>
1026
1027 * tests/regression.at (%nonassoc and eof): Don't include
1028 nonportable headers.
1029
8d69a1a3
RA
10302002-02-08 Robert Anisko <robert@lrde.epita.fr>
1031
1032 * data/bison.c++: Correct error recovery. Make the user able to
1033 initialize the starting location.
1034
9b2d0677
AD
10352002-02-07 Akim Demaille <akim@epita.fr>
1036
1037 * tests/input.at: New.
1038
69e2658b
RA
10392002-02-07 Robert Anisko <robert@lrde.epita.fr>
1040
1041 * data/bison.c++: Replace some direct m4 expansions by constants. Be
9b2d0677 1042 more consistent when naming methods and variables. Put preprocessor
69e2658b
RA
1043 directives around tables only needed for debugging.
1044
4aacc3a7
RA
10452002-02-07 Robert Anisko <robert@lrde.epita.fr>
1046
1047 * data/bison.c++ (yy::b4_name::print_): New method, replaces yyprint in
1048 C++ parsers.
1049 (yy::b4_name::parse): Use print_.
1050
762a801e
RA
10512002-02-07 Robert Anisko <robert@lrde.epita.fr>
1052
1053 * data/bison.c++ (yy::b4_name::parse): Error recovery is back.
1054
4bb2bc3f
RA
10552002-02-07 Robert Anisko <robert@lrde.epita.fr>
1056
1057 * data/bison.c++ (yy::b4_name::error_): New method, replaces yyerror in
1058 C++ parsers.
1059 (yy::b4_name::parse): Build verbose error messages, and use error_.
1060
6b45a3ca
RA
10612002-02-06 Robert Anisko <robert@lrde.epita.fr>
1062
1063 * data/bison.c++: Fix m4 quoting in comments.
1064
50997c6e
RA
10652002-02-06 Robert Anisko <robert@lrde.epita.fr>
1066
1067 * data/bison.c++: Adjust the parser code. Fix some muscles that were
1068 not expanded by m4.
1069
3f3eed27
AD
10702002-02-05 Akim Demaille <akim@epita.fr>
1071
1072 * data/bison.c++: Adjust to the M4 back end.
1073 More is certainly needed.
1074
be2a1a68
AD
10752002-02-05 Akim Demaille <akim@epita.fr>
1076
1077 Give a try to M4 as a back end.
1078
1079 * lib/readpipe.c: New, from wdiff.
1080 * src/Makefile.am (DEFS): Define PKGDATADIR, not BISON_SIMPLE and
1081 BISON_HAIRY.
1082 * src/system.h (BISON_HAIRY, BISON_SIMPLE): Remove the DOS and VMS
1083 specific values. Now it is m4 that performs the lookup.
1084 * src/parse-skel.y: Remove.
1085 * src/muscle_tab.c, src/muscle_tab.h (muscles_m4_output): New.
1086 * src/output.c (actions_output, guards_output)
1087 (token_definitions_output): No longer keeps track of the output
1088 line number, hence remove the second argument.
1089 (guards_output): Check against the guard member of a rule, not the
1090 action member.
1091 Adjust callers.
1092 (output_skeleton): Don't look for the skeleton location, let m4 do
1093 that.
1094 Create `/tmp/muscles.m4'. This is temporary, a proper temporary
1095 file will be used.
1096 Invoke `m4' on m4sugar.m4, muscles.m4, and the skeleton.
1097 (prepare): Given that for the time being changesyntax is not
1098 usable in M4, rename the muscles using `-' to `_'.
1099 Define `defines_flag', `output_parser_name' and `output_header_name'.
1100 * src/output.h (actions_output, guards_output)
1101 (token_definitions_output): Adjust prototypes.
1102 * src/scan-skel.l: Instead of scanning the skeletons, it now
1103 processes the output of m4: `__oline__' and `#output'.
1104 * data/bison.simple: Adjust to be used by M4(sugar).
1105 * tests/Makefile.am: Use check_SCRIPTS to make sure `bison' is up
1106 to date.
1107 * tests/bison.in: Use the secrete envvar `BISON_PKGDATADIR'
1108 instead of the dead `BISON_SIMPLE' and `BISON_HAIRY'.
1109 * data/m4sugar/m4sugar.m4, data/m4sugar/version.m4: New,
1110 shamelessly stolen from CVS Autoconf.
1111
beda758b
AD
11122002-02-05 Akim Demaille <akim@epita.fr>
1113
1114 * lib/hash.c, lib/hash.h: Replace with Fileutils 4.1's version.
1115 * configure.in: Check for the declarations of free and malloc.
1116 * src/muscle_tab.c: Adjust.
1117
5ece6d43
AD
11182002-02-05 Akim Demaille <akim@epita.fr>
1119
1120 * src/muscle_tab.c (muscle_init): Don't default to NULL muscle
1121 which have no values.
1122
5bb18f9a
AD
11232002-02-05 Akim Demaille <akim@epita.fr>
1124
1125 * src/bison.simple, src/bison.hairy, src/bison.c++: Move to...
1126 * data/: here.
1127
894dd62e
PE
11282002-01-29 Paul Eggert <eggert@twinsun.com>
1129
1130 * src/bison.simple (YYSIZE_T): Do not define merely because
1131 YYSTACK_USE_ALLOCA is nonzero or alloca or _ALLOCA_H are defined.
1132 On some platforms, <alloca.h> does not declare YYSTD (size_t).
1133
82841af7
AD
11342002-01-27 Akim Demaille <akim@epita.fr>
1135
1136 Fix `%nonassoc and eof'.
1137
1138 * src/state.c (errs_dup): Aaaah! The failure was due to bytes
1139 which were not properly copied! Replace
1140 memcpy (res->errs, src->errs, src->nerrs);
1141 with
1142 memcpy (res->errs, src->errs, src->nerrs * sizeof (src->errs[0]));
1143 !!!
1144 * tests/regression.at (%nonassoc and eof): Adjust to newest
1145 Autotest: `.' is not in the PATH.
1146
318b76e9
AD
11472002-01-27 Akim Demaille <akim@epita.fr>
1148
1149 * tests/sets.at (AT_EXTRACT_SETS): New.
1150 (Nullable): Use it.
1151 (Firsts): New.
1152
30d2f3d5
AD
11532002-01-26 Akim Demaille <akim@epita.fr>
1154
1155 * tests/actions.at, tests/calc.at, tests/headers.at,
1156 * tests/torture.at: Adjust to the newest Autotest which no longer
1157 forces `.' in the PATH.
1158
30f8c395
AD
11592002-01-25 Akim Demaille <akim@epita.fr>
1160
1161 * tests/regression.at (%nonassoc and eof): New.
1162 Suggested by Robert Anisko.
1163
29ae55f1
AD
11642002-01-24 Akim Demaille <akim@epita.fr>
1165
1166 Bison dumps core when trying to complain about broken input files.
1167 Reported by Cris van Pelt.
1168
1169 * src/lex.c (parse_percent_token): Be sure to set token_buffer.
1170 * tests/regression.at (Invalid input: 1, Invalid input: 2): Merge
1171 into...
1172 (Invalid inputs): Strengthen: exercise parse_percent_token.
1173
2b548aa6
RA
11742002-01-24 Robert Anisko <robert.anisko@epita.fr>
1175
1176 * src/Makefile.am: Add bison.c++.
1177 * src/bison.c++: New skeleton.
1178
bb0146c2
AD
11792002-01-21 Paolo Bonzini <bonzini@gnu.org>
1180
1181 * po/it.po: New.
1182
bec30531
AD
11832002-01-21 Kees Zeelenberg <kzlg@users.sourceforge.net>
1184
1185 * src/files.c (skeleton_find) [MSDOS]: Fix cp definition.
1186
fc6edc45
MA
11872002-01-20 Marc Autret <marc@gnu.org>
1188
1189 * src/files.c (compute_output_file_names): Fix
1190
5e5d5415
MA
11912002-01-20 Marc Autret <marc@gnu.org>
1192
1193 * tests/output.at: New test.
1194 * src/files.c (compute_base_names): Don't map extensions when
1195 the YACC flag is set, use defaults.
1196 Reported by Evgeny Stambulchik.
1197
44ea3fbd
MA
11982002-01-20 Marc Autret <marc@gnu.org>
1199
bb0146c2 1200 * src/system.h: Need to define __attribute__ away for non-GCC
44ea3fbd
MA
1201 compilers as well (i.e. the vendor C compiler).
1202 Suggested by Albert Chin-A-Young.
1203
338963d1
TVH
12042002-01-11 Tim Van Holder <tim.van.holder@pandora.be>
1205
1206 * lib/hash.h, lib/hash.c: Renamed __P to PARAMS and used the
1207 canonical definition.
1208 * src/system.h: Use the canonical definition for PARAMS (avoids
1209 a conflict with the macro from lib/hash.h).
1210
c57b2479
AD
12112002-01-11 Akim Demaille <akim@epita.fr>
1212
1213 * configure.in: Use AC_FUNC_STRNLEN.
d9e9746c 1214 Fixes the failures observed on AIX 4.3 by H.Merijn Brand.
c57b2479 1215
b85810ae
AD
12162002-01-09 Akim Demaille <akim@epita.fr>
1217
1218 * src/files.c, src/files.h (output_infix): New.
1219 (tab_extension): Remove.
1220 (compute_base_names): Compute the former, drop the latter.
1221 * src/output.c (prepare): Insert the muscles `output-infix', and
1222 `output-suffix'.
1223 * src/parse-skel.y (string, string.1): New.
1224 (section.header): Use it.
1225 (section.yacc): Remove.
1226 (prefix): Remove too.
1227 * src/scan-skel.l: Adjust.
1228 * src/bison.simple, src/bison.hairy: Adjust.
1229
cae60122
AD
12302002-01-09 Akim Demaille <akim@epita.fr>
1231
1232 * configure.in (WERROR_CFLAGS): Compute it.
1233 * src/Makefile.am (CFLAGS): Pass it.
1234 * tests/atlocal.in (CFLAGS): Idem.
1235 * src/files.c: Fix a few warnings.
1236 (get_extension_index): Remove, unused.
1237
ae404801
AD
12382002-01-08 Akim Demaille <akim@epita.fr>
1239
1240 * src/getargs.c (AS_FILE_NAME): New.
1241 (getargs): Use it to convert DOSish file names.
1242 * src/files.c (base_name): Rename as full_base_name to avoid
1243 clashes with `base_name ()'.
1244 (filename_split): New.
1245 (compute_base_names): N-th rewrite, using filename_split.
1246
22312b71
AD
12472002-01-08 Akim Demaille <akim@epita.fr>
1248
1249 * lib/basename.c, lib/dirname.h, lib/dirname.c, lib/memrchr.c:
1250 New, stolen from the Fileutils 4.1.
1251 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
1252 * configure.in: Check for the presence of memrchr, and of its
1253 prototype.
1254
a67cef01
TVH
12552002-01-07 Tim Van Holder <tim.van.holder@pandora.be>
1256
1257 * lib/hash.h (__P): Added definition for this macro.
1258 * src/Makefile.am: Add parse-skel.c and scan-skel.c to
1259 BUILT_SOURCES, to ensure they are generated first.
1260 * src/parse-skel.y: Use YYERROR_VERBOSE instead of
1261 %error-verbose to allow bootstrapping with bison 1.30x.
1262
2b25d624
AD
12632002-01-06 Akim Demaille <akim@epita.fr>
1264
1265 * src/reader.c (parse_braces): Don't fetch the next char, the
1266 convention is to fetch on entry.
1267 * tests/torture.at (GNU Cim Grammar): Reintroduce their weird
1268 'switch' without a following semicolon.
1269 * tests/regression.at (braces parsing): New.
1270
3460813b
AD
12712002-01-06 Akim Demaille <akim@epita.fr>
1272
1273 Bison is dead wrong in its RR conflict reports.
1274
1275 * tests/torture.at (GNU Cim Grammar): New.
1276 * src/conflicts.c (count_rr_conflicts): Fix.
1277
73784c64
AD
12782002-01-06 Akim Demaille <akim@epita.fr>
1279
1280 Creating package.m4 from configure.ac causes too many problems.
1281
1282 * tests/Makefile.am (package.m4): Create it by hand,
1283 AC_CONFIG_TESTDIR no longer does in the most recent CVS Autoconf.
1284
25d81090
AD
12852002-01-06 Akim Demaille <akim@epita.fr>
1286
1287 * src/Makefile.am (bison_SOURCES): Add parse-skel.h and
1288 skeleton.h.
1289
a9b8959e
PE
12902002-01-04 Paul Eggert <eggert@twinsun.com>
1291
1292 * doc/bison.texinfo (Debugging):
1293 Remove YYSTDERR; it's no longer defined or used.
1294 Also, s/cstdio.h/cstdio/.
1295
25d81090
AD
12962002-01-03 Akim Demaille <akim@epita.fr>
1297
1298 * tests/bison.in, tests/atlocal.in: Adjust to CVS Autoconf.
1299
1109455c
AD
13002002-01-03 Akim Demaille <akim@epita.fr>
1301
1302 * src/parse-skel.y (process_skeleton): Don't bind the parser's
1303 tracing code to --trace, wait for a better --trace option, with
1304 args.
1305
7ea5e977
AD
13062002-01-03 Akim Demaille <akim@epita.fr>
1307
1308 * src/bison.simple (YYSTDERR): Remove, replace `stderr'.
1309 The ISO C++ standard is extremely clear about it: stderr is
1310 considered a macro, not a regular symbol (see table 94 `Header
1311 <cstdio> synopsis', [lib.c.files] 27.8.2 C Library files).
1312 Therefore std:: does not apply to it. It still does with fprintf.
1313 Also, s/cstdio.h/cstdio/.
1314
fab5b110
AD
13152002-01-03 Akim Demaille <akim@epita.fr>
1316
1317 * lib/quotearg.c: Use `#include "..."' instead of `#include <...>'
1318 for non system headers.
1319
aed7fd9b
AD
13202002-01-02 Akim Demaille <akim@epita.fr>
1321
1322 Equip the skeleton chain with location tracking, runtime trace,
1323 pure parser and scanner.
1324
1325 * src/parse-skel.y: Request a pure parser, locations, and prefix
1326 renaming.
1327 (%union): Having several members with the same type does not help
1328 type mismatches, simplify.
1329 (YYPRINT, yyprint): New.
1330 (yyerror): ``Rename'' (there is a #define yyerror skel_error) as...
1331 (skel_error): this.
1332 Handle locations.
1333 * src/scan-skel.l: Adjust to these changes.
1334 * src/skeleton.h (LOCATION_RESET, LOCATION_LINES, LOCATION_STEP)
1335 (LOCATION_PRINT, skel_control_t): New.
1336
24fad99e
AD
13372001-12-30 Akim Demaille <akim@epita.fr>
1338
1339 * src/parse-skel.y: Get rid of the shift/reduce conflict:
1340 replace `gb' with BLANKS.
1341 * src/scan-skel.l: Adjust.
1342
a4b36db4
AD
13432001-12-30 Akim Demaille <akim@epita.fr>
1344
1345 * src/system.h: We don't need nor want bcopy.
1346 Throw away MS-DOS crap: we don't need getpid.
1347 * configure.in: We don't need strndup. It was even causing
1348 problems: because Flex includes the headers *before* us,
1349 _GNU_SOURCE is not defined by config.h, and therefore strndup was
1350 not visible.
1351 * lib/xstrndup.c: New.
1352 * src/scan-skel.l: Use it.
1353 Be sure to initialize yylval.muscle member when scanning a MUSCLE.
1354 * src/parse-skel.y: Use %directives instead of #defines.
1355
1239777d
AD
13562001-12-30 Akim Demaille <akim@epita.fr>
1357
1358 * src/skeleton.h: New.
1359 * src/output.c (output_parser, output_master_parser): Remove, dead
1360 code.
1361 * src/output.h (get_lines_number, actions_output, guards_output)
1362 (token_definitions_output): Prototype them.
1363 * src/parse-skel.y: Add the license notice.
1364 Include output.h and skeleton.h.
1365 (process_skeleton): Returns void, and takes a single parameter.
1366 * src/scan-skel.l: Add the license notice.
1367 Include skeleton.h.
1368 Don't use %option yylineno: it seems that then Flex imagines
1369 REJECT has been used, and therefore it won't reallocate its
1370 buffers (which makes no other sense to me than a bug). It results
1371 in warnings for `unused: yy_flex_realloc'.
1372
9b3add5b
RA
13732001-12-30 Robert Anisko <robert.anisko@epita.fr>
1374
1375 * src/muscle_tab.h (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
1376 (MUSCLE_INSERT_PREFIX): ...to there.
1377 * src/output.c (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
1378 (MUSCLE_INSERT_PREFIX): Move from here...
1379
1380 * src/bison.hairy: Add a section directive. Put braces around muscle
1381 names. This parser skeleton is still broken, but Bison should not
1382 choke on a bad muscle 'syntax'.
1383 * src/bison.simple: Add a section directive. Put braces around muscle
1384 names.
1385
1386 * src/files.h (strsuffix, stringappend): Add declarations.
1387 (tab_extension): Add declaration.
1388 (short_base_name): Add declaration.
1389
1390 * src/files.c (strsuffix, stringappend): No longer static. These
1391 functions are used in the skeleton parser.
1392 (tab_extension): New.
1393 (compute_base_names): Use the computations done in this function
fab5b110 1394 to guess if the generated parsers should have '.tab' in their
9b3add5b
RA
1395 names.
1396 (short_base_name): No longer static.
1397
1398 * src/output.c (output_skeleton): New.
1399 (output): Disable call to output_master_parser, and give a try to
1400 a new skeleton handling system.
1401 (guards_output, actions_output): No longer static.
1402 (token_definitions_output, get_lines_number): No longer static.
1403
1404 * configure.in: Use AM_PROG_LEX and AC_PROG_YACC.
1405
fab5b110 1406 * src/Makefile.am (bison_SOURCES): Add scan-skel.l and
9b3add5b
RA
1407 parse-skel.y.
1408
1409 * src/parse-skel.y: New file.
1410 * src/scan-skel.l: New file.
1411
b5b61c61
AD
14122001-12-29 Akim Demaille <akim@epita.fr>
1413
1414 %name-prefix is broken.
1415
1416 * src/files.c (spec_name_prefix): Initialize to NULL, not to "yy".
1417 Adjust all dependencies.
1418 * tests/headers.at (export YYLTYPE): Strengthen this test: use
1419 %name-prefix.
1420
1421 Renaming yylval but not yylloc is not consistent. Now we do.
1422
1423 * src/bison.simple: Prefix yylloc if used.
1424 * doc/bison.texinfo (Decl Summary): Document that.
1425
8c9a50be
AD
14262001-12-29 Akim Demaille <akim@epita.fr>
1427
1428 * doc/bison.texinfo: Promote `%long-directive' over
1429 `%long_directive'.
1430 Remove all references to fixed-output-files, yacc is enough.
1431
d99361e6
AD
14322001-12-29 Akim Demaille <akim@epita.fr>
1433
1434 * src/bison.simple: Define YYDEBUG and YYERROR_VERBOSE *after* the
1435 user prologue. These are defaults.
1436 * tests/actions.at (Mid-rule actions): Make sure the user can
1437 define YYDEBUG and YYERROR_VERBOSE.
1438
b9cecb91
AD
14392001-12-29 Akim Demaille <akim@epita.fr>
1440
1441 * src/output.c (header_output): Don't forget to export YYLTYPE and
1442 yylloc.
1443 * tests/headers.at (export YYLTYPE): New, make sure it does.
1444 * tests/regression.at (%union and --defines, Invalid CPP headers):
1445 Move to...
1446 * tests/headers.at: here.
1447
aea13e97
AD
14482001-12-29 Akim Demaille <akim@epita.fr>
1449
1450 * src/gram.h (rule_s): Member `assoc' is of type `associativity'.
1451
931394cb
AD
14522001-12-29 Akim Demaille <akim@epita.fr>
1453
1454 * tests/actions.at (Mid-rule actions): Output on a single line
1455 instead of several.
1456
704a47c4
AD
14572001-12-29 Akim Demaille <akim@epita.fr>
1458
1459 * doc/bison.texinfo: Formatting changes.
1460
091e20bb
AD
14612001-12-29 Akim Demaille <akim@epita.fr>
1462
1463 Don't store the token defs in a muscle, just be ready to output it
1464 on command. Now possible via `symbols'. Fixes a memory leak.
1465
1466 * src/output.c (token_definitions_output): New.
1467 (output_parser, header_output): Use it.
1468 * src/reader.c (symbols_save): Remove.
1469
cce71710
AD
14702001-12-29 Akim Demaille <akim@epita.fr>
1471
1472 * src/bison.simple: Do not provide a default for YYSTYPE and
1473 YYLTYPE before the user's prologue. Otherwise it's hardly... a
1474 default.
1475
82c035a8
AD
14762001-12-29 Akim Demaille <akim@epita.fr>
1477
1478 Mid-rule actions are simply... ignored!
1479
1480 * src/reader.c (readgram): Be sure to attach mid-rule actions to
1481 the empty-rule associated to the dummy symbol, not to the host
1482 rule.
1483 * tests/actions.at (Mid-rule actions): New.
1484
8419d367
AD
14852001-12-29 Akim Demaille <akim@epita.fr>
1486
1487 Memory leak.
1488
1489 * src/reader.c (reader): Free grammar.
1490
375d5806
AD
14912001-12-29 Akim Demaille <akim@epita.fr>
1492
1493 Memory leak.
1494
1495 * src/LR0.c (new_itemsets): Don't allocate `shift_symbol' here,
1496 since it allocates it for each state, although only one is needed.
1497 (allocate_storage): Do it here.
1498
f51cb8ff
AD
14992001-12-29 Akim Demaille <akim@epita.fr>
1500
1501 * src/options.h, src/options.c (create_long_option_table): Rename
1502 as...
1503 (long_option_table_new): this, with a clearer prototype.
1504 (percent_table): Remove, unused,
1505 * src/getargs.c (getargs): Adjust.
1506
29e88316
AD
15072001-12-29 Akim Demaille <akim@epita.fr>
1508
1509 * src/LR0.c, src/conflicts.c, src/lalr.c, src/lalr.h, src/output.c
1510 * src/print.c, src/print_graph.c, src/state.h: Rename state_table
1511 as states.
1512
b9f71f19
AD
15132001-12-29 Akim Demaille <akim@epita.fr>
1514
1515 * src/lalr.c (build_relations): Rename `states' as `states1'.
1516 Sorry, I don't understand exactly what it is, no better name...
1517
1a2b5d37
AD
15182001-12-29 Akim Demaille <akim@epita.fr>
1519
1520 * src/closure.c, src/conflicts.c, src/derives.c, src/gram.c
1521 * src/gram.h, src/lalr.c, src/nullable.c, src/output.c, src/print.c
1522 * src/print_graph.c, src/reader.c, src/reduce.c: Rename rule_table
1523 as rules.
1524
1cca533e
AD
15252001-12-29 Akim Demaille <akim@epita.fr>
1526
1527 * src/gram.c (rprec, rprecsym, rassoc): Remove, unused since long
1528 ago.
1529
c03ae966
AD
15302001-12-29 Akim Demaille <akim@epita.fr>
1531
1532 * src/reader.c, src/reader.h (user_toknums): Remove.
1533 Adjust all users to use symbols[i]->user_token_number.
1534
5a670b1e
AD
15352001-12-29 Akim Demaille <akim@epita.fr>
1536
1537 * src/gram.c, src/gram.h (sprec, sassoc): Remove.
1538 Adjust all users to use symbols[i]->prec or ->assoc.
1539
ad949da9
AD
15402001-12-29 Akim Demaille <akim@epita.fr>
1541
1542 * src/reader.c, src/reader.h (tags): Remove.
1543 Adjust all users to use symbols[i]->tag.
1544
0e78e603
AD
15452001-12-29 Akim Demaille <akim@epita.fr>
1546
1547 * src/gram.h, src/gram.c (symbols): New, similar to state_table
1548 and rule_table.
1549 * src/reader.c (packsymbols): Fill this table.
1550 Drop sprec.
1551 * src/conflicts.c (resolve_sr_conflict): Adjust.
1552 * src/reduce.c (reduce_grammar): Adjust: just sort symbols, a
1553 single table.
1554 Use symbols[i]->tag instead of tags[i].
1555
213e640e
AD
15562001-12-29 Akim Demaille <akim@epita.fr>
1557
1558 * tests/calc.at (_AT_DATA_CALC_Y): Also use %union.
1559 In addition, put a comment in there, to replace...
1560 * tests/regression.at (%union and C comments): Remove.
1561
e7b8bef1
AD
15622001-12-29 Akim Demaille <akim@epita.fr>
1563
1564 * tests/regression.at (Web2c Actions): Blindly move the actual
1565 output as expected output. The contents *seem* right to me, but I
1566 can't pretend reading perfectly parser tables... Nonetheless, all
1567 the other tests pass correctly, the table look OK, even though the
1568 presence of `$axiom' is to be noted: AFAICS it is useless (but
1569 harmless).
1570
b68e7744
AD
15712001-12-29 Akim Demaille <akim@epita.fr>
1572
1573 * src/reader.c (readgram): Don't add the rule 0 if there were no
1574 rules read. In other words, add it _after_ having performed
1575 grammar sanity checks.
1576 Fixes the `tests/regression.at (Invalid input: 1)' Failure.
1577
78d5bae9
AD
15782001-12-29 Akim Demaille <akim@epita.fr>
1579
1580 * tests/regression.at (Web2c Report): Catch up: the rule 0 is now
1581 visible, and some states have now a different number.
1582
ff442794
AD
15832001-12-29 Akim Demaille <akim@epita.fr>
1584
1585 * src/reader.c (readgram): Bind the initial rule's lineno to that
1586 of the first rule.
1587 * tests/regression.at (Rule Line Numbers, Unresolved SR Conflicts):
1588 (Solved SR Conflicts): Adjust rule 0's line number.
1589
610ab194
AD
15902001-12-29 Akim Demaille <akim@epita.fr>
1591
1592 Fix the `GAWK Grammar' failure.
1593
1594 * src/LR0.c (final_state): Initialize to -1 so that we do compute
1595 the reductions of the first state which was mistakenly confused
1596 with the final state because precisely final_state was initialized
1597 to 0.
1598 * tests/sets.at (Nullable): Adjust: state 0 does have lookaheads,
1599 now noticed by Bison.
1600 * tests/regression.at (Rule Line Numbers): Adjust: state 0 does
1601 have a reduction on $default.
1602
29d29c8f
AD
16032001-12-29 Akim Demaille <akim@epita.fr>
1604
1605 * src/gram.c (ritem_print): Be sure to subtract 1 when displaying
1606 rule line numbers.
1607 * src/closure.c (print_closure): Likewise.
1608 * src/derives.c (print_derives): Likewise.
1609 * tests/sets.at (Nullable): Adjust: the rule numbers are correct
1610 now.
1611
7c6b64d0
AD
16122001-12-29 Akim Demaille <akim@epita.fr>
1613
1614 * src/lalr.c (lookaheads_print): New.
1615 (lalr): Call it when --trace-flag.
1616 * tests/sets.at (Nullable): Adjust: when tracing, the lookaheads
1617 are dumped.
1618
3d4daee3
AD
16192001-12-29 Akim Demaille <akim@epita.fr>
1620
1621 * src/derives.c (print_derives): Be sure to use `>= 0', not `> 0',
1622 when walking through ritem, even via rule->rhs.
1623 * src/reduce.c (dump_grammar, useful_production, reduce_output)
1624 (useful_production, useless_nonterminals): Likewise.
1625 (reduce_grammar_tables): Likewise, plus update nritems.
1626 * src/nullable.c (set_nullable): Likewise.
1627 * src/lalr.c (build_relations): Likewise.
1628 * tests/sets.at (Nullable): Adjust.
1629 Fortunately, now, the $axiom is no longer nullable.
1630
9e7f6bbd
AD
16312001-12-29 Akim Demaille <akim@epita.fr>
1632
1633 * src/LR0.c (generate_states): Use nritems, not nitems, nor using
1634 the 0-sentinel.
1635 * src/gram.c (ritem_longest_rhs): Likewise.
1636 * src/reduce.c (nonterminals_reduce): Likewise.
1637 * src/print_graph.c (print_graph): Likewise.
1638 * src/output.c (output_rule_data): Likewise.
1639 * src/nullable.c (set_nullable): Likewise.
1640
255ef638
AD
16412001-12-29 Akim Demaille <akim@epita.fr>
1642
1643 * src/output.c: Comment changes.
1644
0d8a7363
AD
16452001-12-27 Paul Eggert <eggert@twinsun.com>
1646
1647 * src/bison.simple (YYSTACK_ALLOC, YYSIZE_T): Remove special
1648 cases for non-GNU systems like AIX, HP-UX, SGI, Sun, and
1649 Sparc, as they were causing more porting problems than the
1650 (minor) performance improvement was worth.
1651
1652 Also, catch up with 1.31's YYSTD.
1653
3db472b9
AD
16542001-12-27 Akim Demaille <akim@epita.fr>
1655
1656 * src/output.c (output_gram): Rely on nritems, not the
1657 0-sentinel. See below.
1658 Use -1 as separator, not 0.
1659 * src/bison.simple (yyparse): Subtract 1 to the rule numbers.
1660 Rely on -1 as separator in yyrhs, instead of 0.
1661 * tests/calc.at (AT_CHECK_CALC): Now, the parsers no longer issue
1662 twice `Now at end of input', therefore there are two lines less to
1663 expect.
1664
b365aa05
AD
16652001-12-27 Akim Demaille <akim@epita.fr>
1666
1667 * tests/regression.at (Unresolved SR Conflicts):
1668 (Solved SR Conflicts, Rule Line Numbers): Adjust to the changes
1669 below.
1670
30171f79
AD
16712001-12-27 Akim Demaille <akim@epita.fr>
1672
1673 * src/LR0.c (new_state): Recognize the final state by the fact it
1674 is reached by eoftoken.
1675 (insert_start_shifting_state, insert_eof_shifting_state)
1676 (insert_accepting_state, augment_automaton): Remove, since now
1677 these states are automatically computed from the initial state.
1678 (generate_states): Adjust.
1679 * src/print.c: When reporting a rule number to the user, substract
1680 1, so that the axiom rule is rule 0, and the first user rule is 1.
1681 * src/reduce.c: Likewise.
1682 * src/print_graph.c (print_core): For the time being, just as for
1683 the report, depend upon --trace-flags to dump the full set of
1684 items.
1685 * src/reader.c (readgram): Once the grammar read, insert the rule
1686 0: `$axiom: START-SYMBOL $'.
1687 * tests/set.at: Adjust: rule 0 is now displayed, and since the
1688 number of the states has changed (the final state is no longer
1689 necessarily the last), catch up.
1690
75142d45
AD
16912001-12-27 Akim Demaille <akim@epita.fr>
1692
1693 Try to make the use of the eoftoken valid. Given that its value
1694 is 0 which was also used as a sentinel in ritem, (i) make sure >= 0
1695 is used instead of > 0 where appropriate, (ii), depend upon nritems
1696 instead of the 0-sentinel.
1697
1698 * src/gram.h, src/gram.c (nritems): New.
1699 Expected to be duplication of nitems, but for the time being...
1700 * src/reader.c (packgram): Assert nritems and nitems are equal.
1701 * src/LR0.c (allocate_itemsets, new_itemsets): Adjust.
1702 * src/closure.c (print_closure, print_fderives): Likewise.
1703 * src/gram.c (ritem_print): Likewise.
1704 * src/print.c (print_core, print_grammar): Likewise.
1705 * src/print_graph.c: Likewise.
1706
b7c49edf
AD
17072001-12-27 Akim Demaille <akim@epita.fr>
1708
1709 * src/main.c (main): If there are complains after grammar
1710 reductions, then output the report anyway if requested, then die.
1711 * src/symtab.c (bucket_new): Initialize `value' to -1, not 0.
1712 * src/reader.c (eoftoken): New.
1713 (parse_token_decl): If the token being defined has value `0', it
1714 is the eoftoken.
1715 (packsymbols): No longer hack `tags' to insert `$' by hand.
1716 Be sure to preserve the value of the eoftoken.
1717 (reader): Make sure eoftoken is defined.
1718 Initialize nsyms to 0: now eoftoken is created just like the others.
1719 * src/print.c (print_grammar): Don't special case the eof token.
1720 * src/regression.at: Adjust: `$' has value 0, not -1, which was a
1721 lie anyway, albeit pleasant.
1722 * tests/calc.at: Exercise error messages with eoftoken.
1723 Change the grammar so that empty input is invalid.
1724 Adjust expectations.
1725 When yyungeting, be sure to use a valid yylloc: use last_yylloc.
1726
ec2da99f
AD
17272001-12-27 Akim Demaille <akim@epita.fr>
1728
1729 * configure.in: Check the protos of strchr ans strspn.
1730 Replace strchr if needed.
1731 * src/system.h: Provide the protos of strchr, strspn and memchr if
1732 missing.
1733 * lib/strchr.c: New.
1734 * src/reader.c (symbols_save): Use strchr.
1735
8adfa272
AD
17362001-12-27 Akim Demaille <akim@epita.fr>
1737
1738 * src/print.c, src/print_graph.c (escape): New.
1739 Use it to quote the TAGS outputs.
1740 * src/print_graph.c (print_state): Now errors are in red, and
1741 reductions in green.
1742 Prefer high to wide: output the state number on a line of its own.
1743
80dac38c
AD
17442001-12-27 Akim Demaille <akim@epita.fr>
1745
1746 * src/state.h, src/state.c (reductions_new): New.
1747 * src/LR0.c (set_state_table): Let all the states have a
1748 `reductions', even if reduced to 0.
1749 (save_reductions): Adjust.
1750 * src/lalr.c (initialize_LA, initialize_lookaheads): Adjust.
1751 * src/print.c (print_reductions, print_actions): Adjust.
1752 * src/output.c (action_row): Adjust.
1753
2cec70b9
AD
17542001-12-27 Akim Demaille <akim@epita.fr>
1755
1756 * src/state.h, src/state.c (errs_new, errs_dup): New.
1757 * src/LR0.c (set_state_table): Let all the states have an errs,
1758 even if reduced to 0.
1759 * src/print.c (print_errs, print_reductions): Adjust.
1760 * src/output.c (output_actions, action_row): Adjust.
1761 * src/conflicts.c (resolve_sr_conflict): Adjust.
1762
13ca549a
AD
17632001-12-27 Akim Demaille <akim@epita.fr>
1764
1765 * src/lalr.c (set_goto_map, initialize_F): Use SHIFT_SYMBOL.
1766
5092aba5
AD
17672001-12-27 Akim Demaille <akim@epita.fr>
1768
1769 * src/conflicts.c, src/conflicts.h (print_reductions): Move to...
1770 * src/print.c: here.
1771 (lookaheadset, shiftset): New, used as additional storage by
1772 print_reductions.
1773 (print_results): Adjust.
1774 (print_shifts, print_gotos, print_errs): New, extracted from...
1775 (print_actions): here.
1776 * src/print_graph.c (print_actions): Remove dead code.
1777
11e2beca
AD
17782001-12-27 Akim Demaille <akim@epita.fr>
1779
1780 * src/reader.c (copy_dollar, copy_at): Better checking of `n' in
1781 `$n' and `@n'.
1782
dac3c910
AD
17832001-12-27 Akim Demaille <akim@epita.fr>
1784
1785 * src/lalr.c (add_lookback_edge): Use state_t instead of ints.
1786 (build_relations): Adjust.
1787
d0b0fefa
AD
17882001-12-27 Akim Demaille <akim@epita.fr>
1789
1790 * src/lalr.c (set_goto_map): Remove a wrong but benign loop
1791 duplication.
1792
adc8c848
AD
17932001-12-27 Akim Demaille <akim@epita.fr>
1794
1795 * src/reader.c (packgram): Catch nitems overflows.
1796
14d293ac
AD
17972001-12-27 Akim Demaille <akim@epita.fr>
1798
1799 * src/files.c, src/files.h (guard_obstack): Remove.
1800 * src/output.c (output): Adjust.
1801 * src/reader.c (parse_braces): New, factoring...
1802 (copy_action, copy_guard): these two which are renamed as...
1803 (parse_action, parse_guard): these.
1804 As a voluntary consequence, using braces around guards is now
1805 mandatory.
1806
f499b062
AD
18072001-12-27 Akim Demaille <akim@epita.fr>
1808
1809 * src/gram.h (rule_t): `guard' and `guard_line' are new members.
1810 * src/reader.c (symbol_list): `guard' and `guard_line' are new
1811 members.
1812 (symbol_list_new): Adjust.
1813 (copy_action): action_line is the first line, not the last.
1814 (copy_guard): Just as for actions, store the `action' only, not
1815 the switch/case/break flesh.
1816 Don't parse the user action that might follow the guard, let...
1817 (readgram): do it, i.e., now, there can be an action after a
1818 guard.
1819 In other words the guard is just explicitly optional.
1820 (packgram): Adjust.
1821 * src/output.c (guards_output): New.
1822 (output_parser): Call it when needed.
1823 (output): Also free the guard and attrs obstacks.
1824 * src/files.c, src/files.h (obstack_save): Remove.
1825 (output_files): Remove.
1826 As a result, if one needs the former `.act' file, using an
1827 appropriate skeleton which requires actions and guards is now
1828 required.
1829 * src/main.c (main): Adjust.
1830 * tests/semantic.at: New.
1831 * tests/regression.at: Use `input.y' as input file name.
1832 Avoid 8+3 problems by requiring input.c when the test needs the
1833 parser.
1834
d945f5cd
AD
18352001-12-27 Akim Demaille <akim@epita.fr>
1836
1837 * src/reader.c (symbol_list_new): Be sure to initialize all the
1838 fields.
1839
d200e455
AD
18402001-12-27 Akim Demaille <akim@epita.fr>
1841
1842 All the hacks using a final pseudo state are now useless.
1843
1844 * src/LR0.c (set_state_table): state_table holds exactly nstates.
1845 * src/lalr.c (nLA): New.
1846 (initialize_LA, compute_lookaheads, initialize_lookaheads): Use it
1847 instead of lookaheadsp from the pseudo state (nstate + 1).
1848
f9507c28
AD
18492001-12-27 Akim Demaille <akim@epita.fr>
1850
1851 * src/output.c (action_row, token_actions): Use a state_t instead
1852 of a integer, and nlookaheads instead of the following state's
1853 lookaheadsp.
1854
065fbd27
AD
18552001-12-27 Akim Demaille <akim@epita.fr>
1856
1857 * src/conflicts.c (log_resolution, flush_shift)
1858 (resolve_sr_conflict, set_conflicts, solve_conflicts)
1859 (count_sr_conflicts, count_rr_conflicts, conflicts_output)
1860 (conflicts_print, print_reductions): Use a state_t instead of an
1861 integer when referring to a state.
1862 As much as possible, depend upon nlookaheads, instead of the
1863 `lookaheadsp' member of the following state (since lookaheads of
1864 successive states are successive, the difference between state n + 1
1865 and n served as the number of lookaheads for state n).
1866 * src/lalr.c (add_lookback_edge): Likewise.
1867 * src/print.c (print_core, print_actions, print_state)
1868 (print_results): Likewise.
1869 * src/print_graph.c (print_core, print_actions, print_state)
1870 (print_graph): Likewise.
1871 * src/conflicts.h: Adjust.
1872
1b177bd7
AD
18732001-12-27 Akim Demaille <akim@epita.fr>
1874
1875 * src/bison.hairy: Formatting/comment changes.
1876 ANSIfy.
1877 Remove `register' indications.
1878 Add plenty of `static'.
1879
7742ddeb
AD
18802001-12-27 Akim Demaille <akim@epita.fr>
1881
1882 * src/output.c (prepare): Drop the muscle `ntbase' which
1883 duplicates ntokens.
1884 * src/bison.simple: Formatting/comment changes.
1885 Use YYNTOKENS only, which is documented, but not YYNTBASE, which
1886 is an undocumented synonym.
1887
1fa14068
AD
18882001-12-22 Akim Demaille <akim@epita.fr>
1889
1890 * src/output.c (output_table_data): Change the prototype to use
1891 `int' for array ranges: some invocations do pass an int, not a
1892 short.
1893 Reported by Wayne Green.
1894
b9752825
AD
18952001-12-22 Akim Demaille <akim@epita.fr>
1896
1897 Some actions of web2c.y are improperly triggered.
1898 Reported by Mike Castle.
1899
1900 * src/lalr.c (traverse): s/F (i)[k] = F (j)[k]/F (j)[k] = F (i)[k]/.
1901 * tests/regression.at (Web2c): Rename as...
1902 (Web2c Report): this.
1903 (Web2c Actions): New.
1904
776209d6
AD
19052001-12-22 Akim Demaille <akim@epita.fr>
1906
1907 Reductions in web2c.y are improperly reported.
1908 Reported by Mike Castle.
1909
1910 * src/conflicts.c (print_reductions): Fix.
1911 * tests/regression.at (Web2c): New.
1912
275fc3ad
AD
19132001-12-18 Akim Demaille <akim@epita.fr>
1914
1915 Some host fail on `assert (!"foo")', which expands to
1916 ((!"foo") ? (void)0 : __assert("!"foo."", __FILE__, __LINE__))
1917 Reported by Nelson Beebee.
1918
1919 * src/output.c, src/vcg.c: Replace `assert (!"it succeeded")' with
1920 `#define it_succeeded 0' and `assert (it_succeeded)'.
1921
897668ee
MA
19222001-12-17 Marc Autret <autret_m@epita.fr>
1923
1924 * src/bison.simple: Don't hard code the skeleton line and filename.
1925 * src/output.c (output_parser): Rename 'line' as 'output_line'.
1926 New line counter 'skeleton_line' (skeleton-line muscle).
1927
ab3399e0
PE
19282001-12-17 Paul Eggert <eggert@twinsun.com>
1929
1930 * NEWS, doc/bison.texinfo, doc/bison.1, doc/bison.rnh: Document that
1931 YYDEBUG must be defined to a nonzero value.
1932
1933 * src/bison.simple (yytname): Do not assume that the user defines
1934 YYDEBUG to a properly parenthesized expression.
1935
3877f72b
AD
19362001-12-17 Akim Demaille <akim@epita.fr>
1937
1938 * src/state.h (state_t): Rename lookaheads as lookaheadsp.
1939 nlookaheads is a new member.
1940 Adjust all users.
1941 * src/lalr.h (nlookaheads): Remove this orphan declaration.
1942 * src/lalr.c (initialize_lookaheads): Set nlookaheads for each
1943 state.
776209d6 1944
331dbc1b
AD
19452001-12-17 Akim Demaille <akim@epita.fr>
1946
1947 * src/files.h, src/files.c (open_files, close_files): Remove.
1948 * src/main.c (main): Don't open/close files, nor invoke lex_free,
1949 let...
1950 * src/reader.c (reader): Do it.
776209d6 1951
be750e4c
AD
19522001-12-17 Akim Demaille <akim@epita.fr>
1953
1954 * src/conflicts.c (print_reductions): Formatting changes.
776209d6 1955
709ae8c6
AD
19562001-12-17 Akim Demaille <akim@epita.fr>
1957
1958 * src/conflicts.c (flush_shift): Also adjust lookaheadset.
1959 (flush_reduce): New.
1960 (resolve_sr_conflict): Adjust.
776209d6 1961
f87685c3
AD
19622001-12-17 Akim Demaille <akim@epita.fr>
1963
1964 * src/output.c (output_obstack): Be static and rename as...
1965 (format_obstack): this, to avoid any confusion with files.c's
1966 output_obstack.
1967 * src/reader.h (muscle_obstack): Move to...
1968 * src/output.h: here, since it's defined in output.c.
1969
837491d8
AD
19702001-12-17 Akim Demaille <akim@epita.fr>
1971
1972 * src/output.c (action_row, save_column, default_goto)
1973 (sort_actions, matching_state, pack_vector): Better variable
1974 locality.
1975
796d61fb
AD
19762001-12-17 Akim Demaille <akim@epita.fr>
1977
1978 * src/output.c: Various formatting changes.
776209d6 1979
64d15509
AD
19802001-12-17 Akim Demaille <akim@epita.fr>
1981
1982 * src/files.c (output_files): Free the output_obstack.
1983 * src/main.c (main): Call print and print_graph conditionally.
1984 * src/print.c (print): Work unconditionally.
1985 * src/print_graph.c (print_graph): Work unconditionally.
1986 * src/conflicts.c (log_resolution): Output only if verbose_flag.
1987
fbc8ecb7
MA
19882001-12-16 Marc Autret <autret_m@epita.fr>
1989
1990 * src/output.c (actions_output): Fix. When we use %no-lines,
1991 there is one less line per action.
1992
f0440388
MA
19932001-12-16 Marc Autret <autret_m@epita.fr>
1994
1995 * src/bison.simple: Remove a useless #line directive.
1996 s/#line %%line %%skeleton/#line %%line "%%parser-file-name"/'.
1997 * src/output.c (get_lines_number): New.
776209d6 1998 (output_parser): Adjust, now takes care about the lines of a
f0440388
MA
1999 output muscles.
2000 Fix line numbering.
2001 (actions_output): Computes the number of lines taken by actions.
2002 (output_master_parser): Insert new skeleton which is the name of
2003 the output parser file name.
2004
a79986b8
MA
20052001-12-15 Marc Autret <autret_m@epita.fr>
2006
2007 * src/bison.simple [YYERROR_VERBOSE]: Restore backward compatibility.
2008
4ec8e00f
MA
20092001-12-15 Marc Autret <autret_m@epita.fr>
2010
2011 * src/output.c (output_gram): Keep track of the hairy one.
2012
1a4648ff
AD
20132001-12-15 Akim Demaille <akim@epita.fr>
2014
2015 Make `make distcheck' work.
2016
2017 * lib/Makefile.am (INCLUDES): Add top_srcdir/intl, since hash uses
2018 system.h which uses libgettext.h.
2019
9c2c67e6
AD
20202001-12-15 Akim Demaille <akim@epita.fr>
2021
2022 * src/nullable.c (set_nullable): Useless rules must be skipped,
2023 otherwise, since we range over their symbols, we might look at a
2024 nonterminal which no longer ``exists'', i.e., it is not counted in
2025 `nvars', hence we overflow our arrays.
2026
93ede233
AD
20272001-12-15 Akim Demaille <akim@epita.fr>
2028
2029 The header can also be produced directly, without any obstack!
2030 Yahoo!
2031
2032 * src/files.c, src/files.h (defines_obstack): Remove.
2033 (compute_header_macro): Global.
2034 (defines_obstack_save): Remove.
2035 * src/reader.c (parse_union_decl): No longer output to
2036 defines_obstack: its content can be found in the `stype' muscle
2037 anyway.
2038 (output_token_translations): Merge into...
2039 (symbols_output): this.
2040 Rename as...
2041 (symbols_save): this.
2042 (reader): Adjust.
2043 * src/output.c (header_output): New.
2044 (output): Call it.
2045
2666f928
AD
20462001-12-15 Akim Demaille <akim@epita.fr>
2047
2048 * src/reader.c (parse_union_decl): Instead of handling two obstack
2049 simultaneously, use one to define the `stype' muscle, and use the
2050 value of the latter to fill defines_obstack.
2051 (copy_comment): Remove.
2052 (copy_comment2): Work for a single obstack.
2053 Rename as...
2054 (copy_comment): this.
2055
428046f8
AD
20562001-12-15 Akim Demaille <akim@epita.fr>
2057
2058 * src/lex.c, src/lex.h (xgetc): No longer static.
2059 * src/reader.c (parse_union_decl): Revamp.
2060
ea52d706
AD
20612001-12-15 Akim Demaille <akim@epita.fr>
2062
2063 Still making progress in separating Bison into (i) input, (ii)
2064 process, (iii) output: now we can directly output the parser file
2065 without using table_obstack at all.
2066
2067 * src/files.c, src/files.h (table_obstack): Bye bye.
2068 (parser_file_name): New.
2069 * src/files.c (compute_output_file_names): Compute it.
2070 * src/output.c (actions_output, output_parser)
2071 (output_master_parser): To a file instead of an obstack.
2072
3f96f4dc
AD
20732001-12-15 Akim Demaille <akim@epita.fr>
2074
2075 Attach actions to rules, instead of pre-outputting them to
2076 actions_obstack.
2077
2078 * src/gram.h (rule_t): action and action_line are new members.
2079 * src/reader.c (symbol_list): Likewise.
2080 (copy_action): Save the actions within the rule.
2081 (packgram): Save them in rule_table.
2082 * src/output.c (actions_output): New.
2083 (output_parser): Use it on `%%actions'.
2084 (output_rule_data): Don't free rule_table.
2085 (output): Do it.
2086 (prepare): Don't save the `action' muscle.
2087 * src/bison.simple: s/%%action/%%actions/.
2088
51576fb3
AD
20892001-12-15 Akim Demaille <akim@epita.fr>
2090
2091 * src/reader.c (copy_action): When --yacc, don't append a `;'
2092 to the user action: let it fail if lacking.
dee049eb 2093 Suggested by Arnold Robbins and Tom Tromey.
51576fb3 2094
2648a72d
AD
20952001-12-14 Akim Demaille <akim@epita.fr>
2096
2097 * src/lex.c (literalchar): Simply return the char you decoded, non
2098 longer mess around with obstacks and int pointers.
2099 Adjust all callers.
2100
92790e5b
AD
21012001-12-14 Akim Demaille <akim@epita.fr>
2102
2103 * src/lex.c (literalchar): Don't escape the special characters,
2104 just decode them, and keep them as char (before, eol was output as
2105 the 2 char string `\n' etc.).
2106 * src/output.c (output_rule_data): Use quotearg to output the
2107 token strings.
2108
927c1557
PE
21092001-12-13 Paul Eggert <eggert@twinsun.com>
2110
2111 * src/bison.simple (YYSIZE_T, YYSTACK_ALLOC, YYSTACK_FREE):
2112 Do not infringe on the global user namespace when using C++.
2113 (YYFPRINTF, YYSTDERR): New macros, needed for the above.
2114 All uses of `fprintf' and `stderr' changed.
2115
2116 * doc/bison.texinfo: Document YYFPRINTF, YYSTDERR.
2117
ed8e1f68
AD
21182001-12-13 Akim Demaille <akim@epita.fr>
2119
2120 The computation of nullable is broken: it doesn't handle empty
2121 RHS's properly.
2122
2123 * tests/torture.at (GNU AWK Grammar): New.
2124 * tests/sets.at (Nullable): New.
2125 * src/nullable.c (set_nullable): Instead of blindly looping over
2126 `ritems', loop over the rules, and then over their rhs's.
2127
2128 Work around Autotest bugs.
2129
2130 * src/warshall.c (bitmatrix_print): Don't use `+--+' as table
2131 frame, because Autotest understand lines starting with a `+' as
2132 traces from the shell. Then, they are not processed properly.
2133 Admittedly an Autotest bug, but we don't have time to wait for
2134 Autotest to catch up.
2135 * tests/regression.at (Broken Closure): Adjust to the new table
2136 frames.
2137 Move to...
2138 * tests/sets.at: here.
2139
cb581495
AD
21402001-12-13 Akim Demaille <akim@epita.fr>
2141
2142 * src/closure.c (closure): Use nrules instead of playing tricks
2143 with BITS_PER_WORD.
2144
2e729273
AD
21452001-12-13 Akim Demaille <akim@epita.fr>
2146
2147 * src/print.c (print_actions): Output the handling of `$' as the
2148 traces do: shifting the token EOF. Before EOF was treated as a
2149 nonterminal.
2150 * tests/regression.at: Adjust some tests.
2151 * src/print_graph.c (print_core): Complete the set of items via
2152 closure. The next-to-final and final states are still unsatisfying,
2153 but that's to be addressed elsewhere.
2154 No longer output the rule numbers, but do output the state number.
2155 A single loop for the shifts + gotos is enough, but picked a
2156 distinct color for each.
2157 (print_graph): Initialize and finalize closure.
2158
107f7dfb
AD
21592001-12-13 Akim Demaille <akim@epita.fr>
2160
2161 * src/reader.c (readgram): Remove dead code, an strip useless
2162 braces.
2163 (get_type): Remove, unused.
2164
9b53a24f
AD
21652001-12-12 Akim Demaille <akim@epita.fr>
2166
2167 * src/complain.h, src/complain.c: Remove error_one_per_line, rely
2168 on that of lib/error.c.
2169
dbfb6dcd
AD
21702001-12-12 Akim Demaille <akim@epita.fr>
2171
2172 Some hosts don't like `/' in includes.
2173
2174 * src/system.h: Include libgettext.h without qualifying the path.
2175 * src/Makefile.am (INCLUDES): Add $(top_srcdir)/intl, remove
2176 $(top_srcdir).
2177
c25fb648
MA
21782001-12-11 Marc Autret <autret_m@epita.fr>
2179
2180 * src/output.c (output_parser): Remove useless muscle.
2181
710ddc4f
MA
21822001-12-11 Marc Autret <autret_m@epita.fr>
2183
2184 * src/bison.simple: Remove #line just before %%epilogue. It
2185 is now handled in ...
2186 * src/reader.c (read_additionnal_code): Add the output of a
2187 #line for the epilogue.
2188
e83d80b8
MA
21892001-12-10 Marc Autret <autret_m@epita.fr>
2190
927c1557 2191 * src/reader.c (copy_definition): Re-use CPP-outed code which
e83d80b8
MA
2192 replace precedent remove.
2193 * src/bison.simple: Remove #line before %%prologue because
2194 %%input-line is wrong at this time.
2195
971d5158
MA
21962001-12-10 Marc Autret <autret_m@epita.fr>
2197
2198 * src/reader.c (symbols_output): Clean up.
927c1557 2199 * src/output.c (output_gram, output): Clean up.
971d5158 2200
5edafffd
AD
22012001-12-10 Akim Demaille <akim@epita.fr>
2202
2203 * src/lalr.c (initialize_lookaheads): New. Extracted from...
2204 * src/LR0.c (set_state_table): here.
2205 * src/lalr.c (lalr): Call it.
2206
0279f8e9
AD
22072001-12-10 Akim Demaille <akim@epita.fr>
2208
2209 * src/state.h (shifts): Remove the `number' member: shifts are
2210 attached to state, hence no longer need to be labelled with a
2211 state number.
2212
190c4f5f
AD
22132001-12-10 Akim Demaille <akim@epita.fr>
2214
2215 Now that states have a complete set of members, the linked list of
2216 shifts is useless: just fill directly the state's shifts member.
2217
2218 * src/state.h (shifts): Remove the `next' member.
2219 * src/LR0.c (first_state, last_state): Remove.
2220 Adjust the callers.
2221 (augment_automaton): Don't look for the shifts that must be added
2222 a shift on EOF: it is those of the state we looked for! But now,
2223 since shifts are attached, it is no longer needed to looking
2224 merely by its id: its number.
2225
2a73b93d
AD
22262001-12-10 Akim Demaille <akim@epita.fr>
2227
2228 * src/LR0.c (augment_automaton): Better variable locality.
2229 Remove an impossible branch: if there is a state corresponding to
2230 the start symbol being shifted, then there is shift for the start
2231 symbol from the initial state.
2232
74392f6a
AD
22332001-12-10 Akim Demaille <akim@epita.fr>
2234
2235 * src/LR0.c (augment_automaton): Call `insert_eof_shifting_state'
2236 only when appropriate: when insert_start_shifting_state' is not
2237 invoked.
2238 * tests/regression.at (Rule Line Numbers): Adjust.
2239
37c82725
AD
22402001-12-10 Akim Demaille <akim@epita.fr>
2241
2242 * src/LR0.c (augment_automaton): Now that all states have shifts,
2243 merge the two cases addition shifts to the initial state.
2244
6a164e0c
AD
22452001-12-10 Akim Demaille <akim@epita.fr>
2246
2247 * src/lalr.c (set_state_table): Move to...
2248 * src/LR0.c: here.
2249 * src/lalr.c (lalr): Don't call it...
2250 * src/LR0.c (generate_states): do it.
2251 * src/LR0.h (first_state): Remove, only the table is used.
2252
7215de24
AD
22532001-12-10 Akim Demaille <akim@epita.fr>
2254
2255 * src/LR0.h (first_shift, first_reduction): Remove.
2256 * src/lalr.c: Don't use first_shift: find shifts through the
2257 states.
2258
80e25d4d
AD
22592001-12-10 Akim Demaille <akim@epita.fr>
2260
2261 * src/LR0.c: Attach shifts to states as soon as they are
2262 computed.
2263 * src/lalr.c (set_state_table): Instead of assigning shifts to
2264 state, just assert that the mapping was properly done.
2265
0ab3728b
AD
22662001-12-10 Akim Demaille <akim@epita.fr>
2267
2268 * src/LR0.c (insert_start_shift): Rename as...
2269 (insert_start_shifting_state): this.
2270 (insert_eof_shifting_state, insert_accepting_state): New.
2271 (augment_automaton): Adjust.
2272 Better locality of the variables.
2273 When looking if the start_symbol is shifted from the initial
2274 state, using `while (... symbol != start_symbol ...)' sounds
2275 better than `while (... symbol < start_symbol ...)': If fail
2276 to see how the order between symbols could be relevant!
2277
78af9bbc
AD
22782001-12-10 Akim Demaille <akim@epita.fr>
2279
2280 * src/getargs.h: Don't declare `spec_name_prefix' and
2281 `spec_file_prefix', declared by src/files.h.
2282 * src/files.c, src/files.h: Default for spec_name_prefix is "yy".
2283 * src/muscle_tab.c (muscle_init): Default prefix to NULL.
2284 * src/output.c (prepare): Adjust.
2285 * src/reader.c (symbols_output): Likewise.
2286 * src/vmsgetargs.c: Vaguely adjust, but who cares?
2287
bdef2a41
AD
22882001-12-10 Akim Demaille <akim@epita.fr>
2289
2290 * src/muscle_tab.c (muscle_init): NULL is a better default than
2291 `"0"'.
2292
3735969c
AD
22932001-12-10 Akim Demaille <akim@epita.fr>
2294
2295 * src/reader.c (reader): Calling symbols_output once is enough.
2296
49701457
AD
22972001-12-10 Akim Demaille <akim@epita.fr>
2298
2299 Now that states have a complete set of members, the linked list of
2300 reductions is useless: just fill directly the state's reductions
2301 member.
2302
2303 * src/state.h (struct reductions): Remove member `number' and
2304 `next'.
2305 * src/LR0.c (first_reduction, last_reduction): Remove.
2306 (save_reductions): Don't link the new reductions, store them in
2307 this_state.
2308 * src/lalr.c (set_state_table): No need to attach reductions to
2309 states, it's already done.
2310 * src/output.c (output_actions): No longer free the shifts, then
2311 the reductions, then the states: free all the states and their
2312 members.
2313
0edad749
AD
23142001-12-10 Akim Demaille <akim@epita.fr>
2315
2316 * src/options.c (OPTN, DRTV, BOTH): New.
2317 (option_table): Use them.
2318
0edad749
AD
2319 * src/muscle_tab.c: Don't include xalloc.h and string.h: that's
2320 the job of system.h.
2321 * src/options.c: Don't include stdio.h and xalloc.h for the same
2322 reasons.
2323
5449dd0f
AD
23242001-12-10 Akim Demaille <akim@epita.fr>
2325
2326 * src/output.c (output, prepare): Make sure the values of the
2327 muscles `action' and `prologue' are 0-terminated.
2328
a870c567
AD
23292001-12-10 Akim Demaille <akim@epita.fr>
2330
2331 Clean up GCC warnings.
2332
2333 * src/reader.c (copy_action): `buf' is not used.
2334 (parse_skel_decl): Be static.
2335 * src/muscle_tab.c (mhash1, mhash2, muscle_insert): Preserve `const'.
2336 * src/options.h (create_long_option_table): Have a real prototype.
2337 * lib/hash.c, lib/hash.h (hash_insert, hash_insert_at, hash_delete)
2338 (hash_delete_at): Return const void *.
2339 Adjust casts to preserve the const.
2340
80df8768
AD
23412001-12-10 Akim Demaille <akim@epita.fr>
2342
2343 * configure.in: Require 2.52g.
2344 M4 is not needed, but AUTOM4TE is.
2345 * m4/m4.m4: Remove.
2346 * tests/Makefile.am: Adjust.
2347
f693ad14
AD
23482001-12-10 Akim Demaille <akim@epita.fr>
2349
2350 One structure for states is enough, even though theoretically
2351 there are LR(0) states and LALR(1) states.
2352
2353 * src/lalr.h (state_t): Remove.
2354 (state_table): Be state_t **, not state_t *.
2355 * src/state.h (core, CORE_ALLOC): Rename as...
2356 (state_t, STATE_ALLOC): this.
2357 Add the LALR(1) members: shifts, reductions, errs.
2358 * src/LR0.c (state_table): Rename as...
2359 (state_hash): this, to avoid name clashes with the global
2360 `state_table'.
2361 * src/print_graph.c, src/LR0.c, src/LR0.h, src/conflicts.c
2362 * src/lalr.c, src/lalr.h, src/output.c, src/print.c: Adjust.
2363
74ffbcb6
AD
23642001-12-10 Akim Demaille <akim@epita.fr>
2365
2366 Bison dumps core on bash.y.
2367 Reported by Pascal Bart.
2368
2369 * src/warshall.c (bitmatrix_print): New.
2370 (TC): Use it.
2371 When performing a transitive closure R(i, j) && R(j, k) => R(i, k),
2372 j must be the outer loop.
2373 * tests/regression.at (Broken Closure): New.
2374
07708e19
AD
23752001-12-05 Akim Demaille <akim@epita.fr>
2376
2377 * tests/atlocal.in (CPPFLAGS): Do not leave a space between -I and
2378 its argument.
2379