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