]> git.saurik.com Git - bison.git/blame - ChangeLog
* data/bison.c++: Catch up with bison.simple:
[bison.git] / ChangeLog
CommitLineData
769b430f
AD
12002-05-28 Akim Demaille <akim@epita.fr>
2
3 * data/bison.c++: Catch up with bison.simple:
4 2002-05-24 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
5 and Paul Eggert <eggert@twinsun.com>: `error' handing.
6 2002-05-26 Akim Demaille <akim@epita.fr>: stos_, token_number_,
7 and popping traces.
8
7067cb36
PH
92002-05-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
10
11 * src/output.c (output_skeleton): Put an explicit path in front of
12 the skeleton file name, rather than relying on the -I directory,
13 to partially alleviate effects of having a skeleton file lying around
14 in the current directory.
769b430f 15
4a713ec2
PH
162002-05-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
17
769b430f 18 * src/conflicts.c (log_resolution): Correct typo:
4a713ec2
PH
19 obstack_printf should be obstack_fgrow1.
20
b408954b
AD
212002-05-26 Akim Demaille <akim@epita.fr>
22
23 * src/state.h (state_t): `solved_conflicts' is a new member.
24 * src/LR0.c (new_state): Set it to 0.
25 * src/conflicts.h, src/conflicts.c (print_conflicts)
26 (free_conflicts, solve_conflicts): Rename as...
27 (conflicts_print, conflicts_free, conflicts_solve): these.
28 Adjust callers.
29 * src/conflicts.c (enum conflict_resolution_e)
30 (solved_conflicts_obstack): New, used by...
31 (log_resolution): this.
32 Adjust to attach the conflict resolution to each state.
33 Complete the description with the precedence/associativity
34 information.
35 (resolve_sr_conflict): Adjust.
36 * src/print.c (print_state): Output its solved_conflicts.
37 * tests/conflicts.at (Unresolved SR Conflicts)
38 (Solved SR Conflicts): Exercise --report=all.
39
a49aecd5
AD
402002-05-26 Akim Demaille <akim@epita.fr>
41
42 * src/LR0.c, src/derives.c, src/gram.c, src/gram.h, src/lalr.c,
43 * src/nullable.c, src/output.c, src/print.c, src/print_graph.c,
44 * src/reader.c, src/reduce.c, src/state.h, src/symtab.h
45 (token_number_t, item_number_as_token_number)
46 (token_number_as_item_number, muscle_insert_token_number_table):
47 Rename as...
48 (symbol_number_t, item_number_as_symbol_number)
49 (symbol_number_as_item_number, muscle_insert_symbol_number_table):
50 these, since it is more appropriate.
51
5504898e
AD
522002-05-26 Akim Demaille <akim@epita.fr>
53
54 * tests/calc.at (AT_CHECK_CALC): Adjust: there are now additional
55 `Error:' lines.
56 * data/bison.simple (yystos) [YYDEBUG]: New.
57 (yyparse) [YYDEBUG]: Display the symbols which are popped during
58 error recovery.
59 * tests/regression.at (Web2c Actions): Adjust: yystos is output now.
60
ec3bc396
AD
612002-05-25 Akim Demaille <akim@epita.fr>
62
63 * doc/bison.texinfo (Debugging): Split into...
64 (Tracing): this new section, its former contents, and...
65 (Understanding): this new section.
66 * src/getargs.h, src/getargs.c (verbose_flag): Remove, replaced
67 by...
68 (report_flag): this.
69 Adjust all dependencies.
70 (report_args, report_types, report_argmatch): New.
71 (usage, getargs): Report/support -r, --report.
72 * src/options.h
73 (struct option_table_struct): Rename as..,
74 (struct option_table_s): this.
75 Rename the `set_flag' member to `flag' to match with getopt_long's
76 struct.
77 * src/options.c (option_table): Split verbose into an entry for
78 %verbose, and another for --verbose.
79 Support --report/-r, so remove -r from the obsolete --raw.
80 * src/print.c: Attach full item sets and lookaheads reports to
81 report_flag instead of trace_flag.
82 * lib/argmatch.h, lib/argmatch.c: New, from Fileutils 4.1.
83
78df8250
PE
842002-05-24 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
85 and Paul Eggert <eggert@twinsun.com>
769b430f 86
78df8250
PE
87 * data/bison.simple (yyparse): Correct error handling to conform to
88 POSIX and yacc. Specifically, after syntax error is discovered,
89 do not reduce further before shifting the error token.
90 Clean up the code a bit by removing the labels yyerrdefault,
91 yyerrhandle, yyerrpop.
92 * NEWS: Document the above.
93
c0c9ea05
PH
942002-05-20 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
95
96 * data/bison.simple (yyr1): Don't use yy_token_number_type as element
97 type; it isn't always big enough, since it doesn't necessarily
98 include non-terminals.
769b430f 99 (yytranslate): Expand definition of yy_token_number_type, so that
c0c9ea05
PH
100 the latter can be removed.
101 (yy_token_number_type): Remove, only one use.
102 * data/bison.c++ (r1_): Parallel change to yyr1 in bison.simple---
103 don't use TokenNumberType as element type.
769b430f 104
c0c9ea05
PH
105 * tests/regression.at: Modify expected output to agree with change
106 to yyr1 and yytranslate.
769b430f 107
6390a83f
FK
1082002-05-13 Florian Krohm <florian@edamail.fishkill.ibm.com>
109
110 * src/reader.c (parse_action): Use copy_character instead of
111 obstack_1grow.
112
db7c8e9a
AD
1132002-05-13 Akim Demaille <akim@epita.fr>
114
115 * tests/regression.at (Token definitions): Prototype yylex and
116 yyerror.
117
fcc61800
PH
1182002-05-12 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
119
158c687b 120 * src/scan-skel.l: Correct off-by-one error in handling of __oline__.
fcc61800
PH
121 * data/bison.simple (b4_sint_type, b4_uint_type): Correct to reflect
122 32-bit arithmetic.
123 * data/bison.c++ (b4_sint_type, b4_uint_type): Ditto.
124
5683e9b2
AD
1252002-05-07 Akim Demaille <akim@epita.fr>
126
127 * tests/synclines.at: Be sure to prototype yylex and yyerror to
128 avoid GCC warnings.
129
0c2d3f4c
AD
1302002-05-07 Akim Demaille <akim@epita.fr>
131
132 Kill GCC warnings.
133
134 * src/reduce.c (nonterminals_reduce): Don't loop over RITEM: loop
135 over the RHS of each rule.
136 * src/gram.h, src/gram.c (nritems): Is `unsigned int', not int.
137 * src/state.h (state_t): Member `nitems' is unsigned short.
138 * src/LR0.c (get_state): Adjust.
139 * src/reader.c (packgram): Likewise.
140 * src/output.c (GENERATE_MUSCLE_INSERT_TABLE): `max' is of type
141 `Type'.
142 (muscle_insert_int_table): Remove, unused.
143 (prepare_rules): Remove `max'.
144
1565b720
AD
1452002-05-06 Akim Demaille <akim@epita.fr>
146
147 * src/closure.c (print_firsts): Display of the symbol tags.
148 (bitmatrix_print): Move to...
149 * lib/bitsetv-print.h, lib/bitsetv-print.c (bitsetv_matrix_dump):
150 here.
151 * tests/sets.at (Nullable, Broken Closure, Firsts): Adjust.
152
cfaee611
AD
1532002-05-06 Akim Demaille <akim@epita.fr>
154
155 * src/muscle_tab.c (muscle_m4_output): Must return TRUE for
156 hash_do_for_each.
157
458be8e0
AD
1582002-05-06 Akim Demaille <akim@epita.fr>
159
160 * src/LR0.c (new_state, get_state): Instead of using the global
161 `kernel_size' and `kernel_base', have two new arguments:
162 `core_size' and `core'.
163 Adjust callers.
164
a900a624
AD
1652002-05-06 Akim Demaille <akim@epita.fr>
166
167 * src/reader.c (packgram): No longer end `ritem' with a 0
168 sentinel: it is not used.
169
d4e7d3a1
AD
1702002-05-05 Akim Demaille <akim@epita.fr>
171
172 New experimental feature: display the lookaheads in the report and
173 graph.
174
175 * src/print (print_core): When --trace-flag, display the rules
176 lookaheads.
177 * src/print_graph.c (print_core): Likewise.
178 Swap the arguments.
179 Adjust caller.
180
39ceb25b
AD
1812002-05-05 Akim Demaille <akim@epita.fr>
182
183 * tests/torture.at (Many lookaheads): New test.
184
5372019f
AD
1852002-05-05 Akim Demaille <akim@epita.fr>
186
187 * src/output.c (GENERATE_OUTPUT_TABLE): Replace with...
188 (GENERATE_MUSCLE_INSERT_TABLE): this.
189 (output_int_table, output_unsigned_int_table, output_short_table)
190 (output_token_number_table, output_item_number_table): Replace with...
191 (muscle_insert_int_table, muscle_insert_unsigned_int_table)
192 (muscle_insert_short_table, muscle_insert_token_number_table)
193 (muscle_insert_item_number_table): these.
194 Adjust all callers.
195 (prepare_tokens): Don't free `translations', since...
196 * src/reader.h, src/reader.c (grammar_free): do it.
197 Move to...
198 * src/gram.h, src/gram.c (grammar_free): here.
199 * data/bison.simple, data/bison.c++: b4_token_number_max is now
200 b4_translate_max.
201
5df5f6d5
AD
2022002-05-05 Akim Demaille <akim@epita.fr>
203
204 * src/output.c (output_unsigned_int_table): New.
205 (prepare_rules): `i' is unsigned.
206 `prhs', `rline', `r2' are unsigned int.
207 Rename muscle `rhs_number_max' as `rhs_max'.
208 Output muscles `prhs_max', `rline_max', and `r2_max'.
209 Free rline and r1.
210 * data/bison.simple, data/bison.c++: Adjust to use these muscles
211 to compute types instead of constant types.
212 * tests/regression.at (Web2c Actions): Adjust.
213
b87f8b21
AD
2142002-05-04 Akim Demaille <akim@epita.fr>
215
216 * src/symtab.h (SALIAS, SUNDEF): Rename as...
217 (USER_NUMBER_ALIAS, USER_NUMBER_UNDEFINED): these.
218 Adjust dependencies.
219 * src/output.c (token_definitions_output): Be sure not to output a
220 `#define 'a'' when fed with `%token 'a' "a"'.
221 * tests/regression.at (Token definitions): New.
222
8bb936e4
PE
2232002-05-03 Paul Eggert <eggert@twinsun.com>
224
225 * data/bison.simple (b4_token_defines): Also define YYTOKENTYPE
226 for K&R C.
227
2282002-05-03 gettextize <bug-gnu-gettext@gnu.org>
229
230 * Makefile.am (SUBDIRS): Remove intl.
231 (EXTRA_DIST): Add config/config.rpath.
232
53c71a12
AD
2332002-05-03 Akim Demaille <akim@epita.fr>
234
235 * data/bison.simple (m4_if): Don't output empty enums.
236 And actually, output valid enum definitions :(.
237
289dd0cf
AD
2382002-05-03 Akim Demaille <akim@epita.fr>
239
240 * configure.bat: Remove, completely obsolete.
241 * Makefile.am (EXTRA_DIST): Adjust.
242 Don't distribute config.rpath...
243 * config/Makefile.am (EXTRA_DIST): Do it.
244
db85e524
AD
2452002-05-03 Akim Demaille <akim@epita.fr>
246
247 * configure.in (GETTEXT_VERSION): New.
248 Suggested by Bruno Haible for the forthcoming Gettext 0.10.3.
249
83ccf991
AD
2502002-05-03 Akim Demaille <akim@epita.fr>
251
252 * data/bison.simple (b4_token_enum): New.
253 (b4_token_defines): Use it to output tokens both as #define and
254 enums.
255 Suggested by Paul Eggert.
256 * src/output.c (token_definitions_output): Don't output spurious
257 white spaces.
258
1f418995
AD
2592002-05-03 Akim Demaille <akim@epita.fr>
260
261 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
262
45119f04
RA
2632002-05-02 Robert Anisko <robert@lrde.epita.fr>
264
265 * data/bison.c++: Adapt expansion of $s and @s to the C++ parser.
266 Update the stack class, give a try to deque as the default container.
267
b2d52318
AD
2682002-05-02 Akim Demaille <akim@epita.fr>
269
270 * data/bison.simple (yyparse): Do not implement @$ = @1.
271 (YYLLOC_DEFAULT): Adjust to do it.
272 * doc/bison.texinfo (Location Default Action): Fix.
273
3a8b4109
AD
2742002-05-02 Akim Demaille <akim@epita.fr>
275
276 * src/reader.c (parse_braces): Merge into...
277 (parse_action): this.
278
84614e13
AD
2792002-05-02 Akim Demaille <akim@epita.fr>
280
281 * configure.in (ALL_LINGUAS): Remove.
282 * po/LINGUAS, hr.po: New.
283
fdbcd8e2
AD
2842002-05-02 Akim Demaille <akim@epita.fr>
285
286 Remove the so called hairy (semantic) parsers.
287
288 * src/system.h (EXT_GUARD_C, EXT_STYPE_H): Remove.
289 * src/gram.h, src/gram.c (semantic_parser): Remove.
290 (rule_t): Remove the guard and guard_line members.
291 * src/lex.h (token_t): remove tok_guard.
292 * src/options.c (option_table): Remove %guard and %semantic_parser
293 support.
294 * src/output.c, src/output.h (guards_output): Remove.
295 (prepare): Adjust.
296 (token_definitions_output): Don't output the `T'
297 tokens (???).
298 (output_skeleton): Don't output the guards.
299 * src/files.c, src/files.c (attrsfile): Remove.
300 * src/reader.c (symbol_list): Remove the guard and guard_line
301 members.
302 Adjust dependencies.
303 (parse_guard): Remove.
304 * data/bison.hairy: Remove.
305 * doc/bison.texinfo (Environment Variables): Remove occurrences of
306 BISON_HAIRY.
307
82b6cb3f
AD
3082002-05-02 Akim Demaille <akim@epita.fr>
309
310 * src/reader.c (copy_at, copy_dollarm parse_braces, parse_action)
311 (parse_guard): Rename the formal argument `stack_offset' as
312 `rule_length', which is more readable.
313 Adjust callers.
314 (copy_at, copy_dollar): Instead of outputting the hard coded
315 values of $$, $n and so forth, output invocation to b4_lhs_value,
316 b4_lhs_location, b4_rhs_value, and b4_rhs_location.
900c877b
AD
317 Note: this patch partially drops `semantic-parser' support: it
318 always does `rule_length - n', where semantic parsers ought to
319 always use `-n'.
82b6cb3f
AD
320 * data/bison.simple, data/bison.c++ (b4_lhs_value)
321 (b4_lhs_location, b4_rhs_value, and b4_rhs_location: New.
322
6cbfbcc5
AD
3232002-05-02 Akim Demaille <akim@epita.fr>
324
325 * configure.in (AC_INIT): Bump to 1.49b.
326 (AM_INIT_AUTOMAKE): Short invocation.
327
b8548114
AD
3282002-05-02 Akim Demaille <akim@epita.fr>
329
330 Version 1.49a.
331
c20cd1fa
AD
3322002-05-01 Akim Demaille <akim@epita.fr>
333
334 * src/skeleton.h: Remove.
335
8a9566d4
AD
3362002-05-01 Akim Demaille <akim@epita.fr>
337
338 * src/skeleton.h: Fix the #endif.
339 Reported by Magnus Fromreide.
340
8c6d399a
PE
3412002-04-26 Paul Eggert <eggert@twinsun.com>
342
343 * data/bison.simple (YYSTYPE_IS_TRIVIAL, YYLTYPE_IS_TRIVIAL):
344 Define if we define YYSTYPE and YYLTYPE, respectively.
b756bb75 345 (YYCOPY): Fix [] quoting problem in the non-GCC case.
8a9566d4 346
2b7ed18a
RA
3472002-04-25 Robert Anisko <robert@lrde.epita.fr>
348
349 * src/scan-skel.l: Postprocess quadrigraphs.
350
351 * src/reader.c (copy_character): New function, used to output
352 single characters while replacing `[' and `]' with quadrigraphs, to
353 avoid troubles with M4 quotes.
354 (copy_comment): Output characters with copy_character.
355 (read_additionnal_code): Likewise.
356 (copy_string2): Likewise.
357 (copy_definition): Likewise.
358
359 * tests/calc.at: Exercise M4 quoting.
360
34a89c50
AD
3612002-04-25 Akim Demaille <akim@epita.fr>
362
363 * tests/sets.at (AT_EXTRACT_SETS): Sed portability issue: no space
364 between `!' and the command.
365 Reported by Paul Eggert.
366
0dd1580a
RA
3672002-04-24 Robert Anisko <robert@lrde.epita.fr>
368
369 * tests/calc.at: Exercise prologue splitting.
370
371 * data/bison.simple, data/bison.c++: Use `b4_pre_prologue' and
372 `b4_post_prologue' instead of `b4_prologue'.
373
374 * src/output.c (prepare): Add the `pre_prologue' and `post_prologue'
375 muscles.
376 (output): Free pre_prologue_obstack and post_prologue_obstack.
377 * src/files.h, src/files.c (attrs_obstack): Remove.
378 (pre_prologue_obstack, post_prologue_obstack): New.
379 * src/reader.c (copy_definition): Add a parameter to specify the
380 obstack to fill, instead of using attrs_obstack unconditionally.
381 (read_declarations): Pass pre_prologue_obstack to copy_definition if
382 `%union' has not yet been seen, pass post_prologue_obstack otherwise.
383
83c1796f
PE
3842002-04-23 Paul Eggert <eggert@twinsun.com>
385
386 * data/bison.simple: Remove unnecessary commentary and white
387 space differences from 1_29-branch.
388 Depend on YYERROR_VERBOSE, not defined (YYERROR_VERBOSE).
389
390 (union yyalloc, YYSTACK_GAP_MAX, YYSTACK_BYTES, YYCOPY,
391 YYSTACK_RELOCATE): Do not define if yyoverflow is defined, or
392 if this is a C++ parser and YYSTYPE or YYLTYPE has nontrivial
393 constructors or destructors.
394
395 (yyparse) [! defined YYSTACK_RELOCATE]: Do not relocate the stack.
396
1207eeac
AD
3972002-04-23 Akim Demaille <akim@epita.fr>
398
399 * tests/sets.at (AT_EXTRACT_SETS): Don't use 8 char long sed labels.
400 * tests/synclines.at (AT_TEST_SYNCLINE): Be robust to GCC's
401 location with columns.
402 * tests/conflicts.at (%nonassoc and eof): Don't use `error.h'.
403 All reported by Paul Eggert.
404
78ab8f67
AD
4052002-04-22 Akim Demaille <akim@epita.fr>
406
407 * src/reduce.c (dump_grammar): Move to...
408 * src/gram.h, src/gram.c (grammar_dump): here.
409 Be sure to separate long item numbers.
410 Don't read the members of a rule's prec if its nil.
411
133c20e2
AD
4122002-04-22 Akim Demaille <akim@epita.fr>
413
414 * src/output.c (table_size, table_grow): New.
415 (MAXTABLE): Remove, replace uses with table_size.
416 (pack_vector): Instead of dying when the table is too big, grow it.
417
9515e8a7
AD
4182002-04-22 Akim Demaille <akim@epita.fr>
419
420 * data/bison.simple (yyr1): Its type is that of a token number.
421 * data/bison.c++ (r1_): Likewise.
422 * tests/regression.at (Web2c Actions): Adjust.
423
23c5a174
AD
4242002-04-22 Akim Demaille <akim@epita.fr>
425
426 * src/reader.c (token_translations_init): 256 is now the default
427 value for the error token, i.e., it will be assigned another
428 number if the user assigned 256 to one of her tokens.
429 (reader): Don't force 256 to error.
430 * doc/bison.texinfo (Symbols): Adjust.
431 * tests/torture.at (AT_DATA_HORIZONTAL_GRAMMAR)
432 (AT_DATA_TRIANGULAR_GRAMMAR): Number the tokens as 1, 2, 3
433 etc. instead of 10, 20, 30 (which was used to `jump' over error
434 (256) and undefined (2)).
435
5fbb0954
AD
4362002-04-22 Akim Demaille <akim@epita.fr>
437
438 Propagate more token_number_t.
439
440 * src/gram.h (token_number_as_item_number)
441 (item_number_as_token_number): New.
442 * src/output.c (GENERATE_OUTPUT_TABLE): New.
443 Use it to create output_item_number_table and
444 output_token_number_table.
445 * src/LR0.c, src/derives.c, src/gram.c, src/gram.h, src/lalr.c,
446 * src/lex.c, src/nullable.c, src/output.c, src/print.c,
447 * src/print_graph.c, src/reader.c, src/reduce.c, src/state.h,
448 * src/symtab.c, src/symtab.h: Use token_number_t instead of shorts.
449
4f940944
AD
4502002-04-22 Akim Demaille <akim@epita.fr>
451
452 * src/output.h, src/output.c (get_lines_number): Remove.
453
3ded9a63
AD
4542002-04-19 Akim Demaille <akim@epita.fr>
455
456 * doc/bison.texinfo (Actions): Make clear that `|' is not the same
457 as Lex/Flex'.
458 (Debugging): More details about enabling the debugging features.
459 (Table of Symbols): Describe $$, $n, @$, and @n.
460 Suggested by Tim Josling.
461
e0c471a9
AD
4622002-04-19 Akim Demaille <akim@epita.fr>
463
464 * doc/bison.texinfo: Remove the uses of the obsolete @refill.
465
fecc10cd
AD
4662002-04-10 Akim Demaille <akim@epita.fr>
467
468 * src/system.h: Rely on HAVE_LIMITS_H.
469 Suggested by Paul Eggert.
470
51dec47b
AD
4712002-04-09 Akim Demaille <akim@epita.fr>
472
473 * tests/calc.at (_AT_CHECK_CALC_ERROR): Receive as argument the
474 full stderr, and strip it according to the bison options, instead
475 of composing the error message from different bits.
476 This makes it easier to check for several error messages.
477 Adjust all the invocations.
478 Add an invocation exercising the error token.
479 Add an invocation demonstrating a stupid error message.
480 (_AT_DATA_CALC_Y): Follow the GCS: initial column is 1, not 0.
481 Adjust the tests.
482 Error message are for stderr, not stdout.
483
007a50a4
AD
4842002-04-09 Akim Demaille <akim@epita.fr>
485
486 * src/gram.h, src/gram.c (error_token_number): Remove, use
487 errtoken->number.
488 * src/reader.c (reader): Don't specify the user token number (2)
489 for $undefined, as it uselessly prevents using it.
490 * src/gram.h (token_number_t): Move to...
491 * src/symtab.h: here.
492 (state_t.number): Is a token_number_t.
493 * src/print.c, src/reader.c: Use undeftoken->number instead of
494 hard coded 2.
495 (Even though this 2 is not the same as above: the number of the
496 undeftoken remains being 2, it is its user token number which
497 might not be 2).
498 * src/output.c (prepare_tokens): Rename the `maxtok' muscle with
499 `user_token_number_max'.
500 Output `undef_token_number'.
501 * data/bison.simple, data/bison.c++: Use them.
502 Be sure to map invalid yylex return values to
503 `undef_token_number'. This saves us from gratuitous SEGV.
504
505 * tests/conflicts.at (Solved SR Conflicts)
506 (Unresolved SR Conflicts): Adjust.
507 * tests/regression.at (Web2c Actions): Adjust.
508
06446ccf
AD
5092002-04-08 Akim Demaille <akim@epita.fr>
510
511 * data/bison.c++: s/b4_item_number_max/b4_rhs_number_max/.
512 Adding #line.
513 Remove the duplicate `typedefs'.
514 (RhsNumberType): Fix the declaration and various other typos.
515 Use __ofile__.
516 * data/bison.simple: Use __ofile__.
517 * src/scan-skel.l: Handle __ofile__.
518
62a3e4f0
AD
5192002-04-08 Akim Demaille <akim@epita.fr>
520
521 * src/gram.h (item_number_t): New, the type of item numbers in
522 RITEM. Note that it must be able to code symbol numbers as
523 positive number, and the negation of rule numbers as negative
524 numbers.
525 Adjust all dependencies (pretty many).
526 * src/reduce.c (rule): Remove this `short *' pointer: use
527 item_number_t.
528 * src/system.h (MINSHORT, MAXSHORT): Remove.
529 Include `limits.h'.
530 Adjust dependencies to using SHRT_MAX and SHRT_MIN.
531 (shortcpy): Remove.
532 (MAXTABLE): Move to...
533 * src/output.c (MAXTABLE): here.
534 (prepare_rules): Use output_int_table to output rhs.
535 * data/bison.simple, data/bison.c++: Adjust.
536 * tests/torture.at (Big triangle): Move the limit from 254 to
537 500.
538 * tests/regression.at (Web2c Actions): Ajust.
539
540 Trying with bigger grammars shows various phenomena: at 3000 (28Mb
541 of grammar file) bison is killed by my system, at 2000 (12Mb) bison
542 passes, but produces negative #line number, once fixed, GCC is
543 killed while compiling 14Mb, at 1500 (6.7 Mb of grammar, 8.2Mb of
544 C), it passes.
545 * src/state.h (state_h): Code input lines on ints, not shorts.
546
bb88b0fc
AD
5472002-04-08 Akim Demaille <akim@epita.fr>
548
549 * src/reduce.c (reduce_grammar): First reduce the nonterminals,
550 and then the grammar.
551
9a636f47
AD
5522002-04-08 Akim Demaille <akim@epita.fr>
553
554 * src/system.h: No longer using strndup.
555
680e8701
AD
5562002-04-07 Akim Demaille <akim@epita.fr>
557
558 * src/muscle_tab.h (MUSCLE_INSERT_LONG_INT): New.
559 * src/output.c (output_table_data): Return the longest number.
560 (prepare_tokens): Output `token_number_max').
561 * data/bison.simple, data/bison.c++ (b4_sint_type, b4_uint_type):
562 New.
563 Use them to define yy_token_number_type/TokenNumberType.
564 Use this type for yytranslate.
565 * tests/torture.at (Big triangle): Push the limit from 124 to
566 253.
567 * tests/regression.at (Web2c Actions): Adjust.
568
817e9f41
AD
5692002-04-07 Akim Demaille <akim@epita.fr>
570
571 * tests/torture.at (Big triangle): New.
572 (GNU AWK Grammar, GNU Cim Grammar): Move to...
573 * tests/existing.at: here.
574
5123689b
AD
5752002-04-07 Akim Demaille <akim@epita.fr>
576
577 * src/gram.h, src/gram.c (nitems): Remove, it is an alias of
578 nritems.
579 Adjust dependencies.
580
f3849179
AD
5812002-04-07 Akim Demaille <akim@epita.fr>
582
583 * src/reader.c: Normalize increments to prefix form.
584
bd02036a
AD
5852002-04-07 Akim Demaille <akim@epita.fr>
586
587 * src/reader.c, symtab.c: Remove debugging code.
588
db8837cb
AD
5892002-04-07 Akim Demaille <akim@epita.fr>
590
591 Rename all the `bucket's as `symbol_t'.
592
593 * src/gram.c, src/gram.h, src/lex.c, src/lex.h, src/output.c,
594 * src/reader.c, src/reader.h, src/reduce.c, src/state.h,
595 * src/symtab.c, src/symtab.h (bucket): Rename as...
596 (symbol_t): this.
597 (symbol_list_new, bucket_check_defined, bucket_make_alias)
598 (bucket_check_alias_consistence, bucket_pack, bucket_translation)
599 (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
600 (buckets_new, buckets_free, buckets_do): Rename as...
601 (symbol_list_new, symbol_check_defined, symbol_make_alias)
602 (symbol_check_alias_consistence, symbol_pack, symbol_translation)
603 (symbol_new, symbol_free, hash_compare_symbol_t, hash_symbol_t)
604 (symbols_new, symbols_free, symbols_do): these.
605
72a23c97
AD
6062002-04-07 Akim Demaille <akim@epita.fr>
607
608 Use lib/hash for the symbol table.
609
610 * src/gram.c (ntokens): Initialize to 1, to reserve a slot for
611 EOF.
612 * src/lex.c (lex): Set the `number' member of new terminals.
613 * src/reader.c (bucket_check_defined, bucket_make_alias)
614 (bucket_check_alias_consistence, bucket_translation): New.
615 (reader, grammar_free, readgram, token_translations_init)
616 (packsymbols): Adjust.
617 (reader): Number the predefined tokens.
618 * src/reduce.c (inaccessable_symbols): Just use hard coded numbers
619 for predefined tokens.
620 * src/symtab.h (bucket): Remove all the hash table related
621 members.
622 * src/symtab.c (symtab): Replace by...
623 (bucket_table): this.
624 (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
625 (buckets_new, buckets_do): New.
626
280a38c3
AD
6272002-04-07 Akim Demaille <akim@epita.fr>
628
629 * src/gram.c (nitems, nrules, nsyms, ntokens, nvars, nritems)
630 (start_symbol, max_user_token_number, semantic_parser)
631 (error_token_number): Initialize.
632 * src/reader.c (grammar, start_flag, startval, typed, lastprec):
633 Initialize.
634 (reader): Don't.
635 (errtoken, eoftoken, undeftoken, axiom): Extern.
636
03b31c0c
AD
6372002-04-07 Akim Demaille <akim@epita.fr>
638
639 * src/gram.h (rule_s): prec and precsym are now pointers
640 to the bucket giving the priority/associativity.
641 Member `associativity' removed: useless.
642 * src/reduce.c, src/conflicts.c: Adjust.
643
8b3df748
AD
6442002-04-07 Akim Demaille <akim@epita.fr>
645
646 * src/lalr.c, src/LR0.c, src/closure.c, src/gram.c, src/reduce.c:
647 Properly escape the symbols' TAG when outputting them.
648
e601aa1d
AD
6492002-04-07 Akim Demaille <akim@epita.fr>
650
651 * src/lalr.h (LA): Is a bitsetv, not bitset*.
652
b0299a2e
AD
6532002-04-07 Akim Demaille <akim@epita.fr>
654
655 * src/lalr.h, src/lalr.c (LAruleno): Replace with...
656 (LArule): this, which is an array to rule_t*.
657 * src/print.c, src/conflicts.c: Adjust.
658
d7e1f00c
AD
6592002-04-07 Akim Demaille <akim@epita.fr>
660
661 * src/gram.h (rule_t): Rename `number' as `user_number'.
662 `number' is a new member.
663 Adjust dependencies.
664 * src/reduce.c (reduce_grammar_tables): Renumber rule_t.number.
665
cc9305dd
AD
6662002-04-07 Akim Demaille <akim@epita.fr>
667
668 As a result of the previous patch, it is no longer needed
669 to reorder ritem itself.
670
671 * src/reduce.c (reduce_grammar_tables): Don't sort RITEM.
672
b0940840
AD
6732002-04-07 Akim Demaille <akim@epita.fr>
674
675 Be sure never to walk through RITEMS, but use only data related to
676 the rules themselves. RITEMS should be banished.
677
678 * src/output.c (output_token_translations): Rename as...
679 (prepare_tokens): this.
680 In addition to `translate', prepare the muscles `tname' and
681 `toknum', which were handled by...
682 (output_rule_data): this.
683 Remove, and move the remainder of its outputs into...
684 (prepare_rules): this new routines, which also merges content from
685 (output_gram): this.
686 (prepare_rules): Be sure never to walk through RITEMS.
687 (output_stos): Rename as...
688 (prepare_stos): this.
689 (output): Always invoke prepare_states, after all, just don't use it
690 in the output if you don't need it.
691
643a5994
AD
6922002-04-07 Akim Demaille <akim@epita.fr>
693
694 * src/LR0.c (new_state): Display `nstates' as the name of the
695 newly created state.
696 Adjust to initialize first_state and last_state if needed.
697 Be sure to distinguish the initial from the final state.
698 (new_states): Create the itemset of the initial state, and use
699 new_state.
700 * src/closure.c (closure): Now that the initial state has its
701 items properly set, there is no need for a special case when
702 creating `ruleset'.
703
704 As a result, now the rule 0, reducing to $axiom, is visible in the
705 outputs. Adjust the test suite.
706
707 * tests/conflicts.at (Solved SR Conflicts)
708 (Unresolved SR Conflicts): Adjust.
709 * tests/regression.at (Web2c Report, Rule Line Numbers): Idem.
710 * tests/conflicts.at (S/R in initial): New.
711
b4c4ccc2
AD
7122002-04-07 Akim Demaille <akim@epita.fr>
713
714 * src/LR0.c (allocate_itemsets): Don't loop over ritem: loop over
715 the RHS of the rules.
716 * src/output.c (output_gram): Likewise.
717
bba97eb2
AD
7182002-04-07 Akim Demaille <akim@epita.fr>
719
720 * src/gram.h (rule_t): `lhs' is now a pointer to the symbol's
721 bucket.
722 Adjust all dependencies.
723 * src/reduce.c (nonterminals_reduce): Don't forget to renumber the
724 `number' of the buckets too.
725 * src/gram.h: Include `symtab.h'.
726 (associativity): Move to...
727 * src/symtab.h: here.
728 No longer include `gram.h'.
729
c3b407f4
AD
7302002-04-07 Akim Demaille <akim@epita.fr>
731
732 * src/gram.h, src/gram.c (rules_rhs_length): New.
733 (ritem_longest_rhs): Use it.
734 * src/gram.h (rule_t): `number' is a new member.
735 * src/reader.c (packgram): Set it.
736 * src/reduce.c (reduce_grammar_tables): Move the useless rules at
737 the end of `rules', and count them out of `nrules'.
738 (reduce_output, dump_grammar): Adjust.
739 * src/print.c (print_grammar): It is no longer needed to check for
740 the usefulness of a rule, as useless rules are beyond `nrules + 1'.
741 * tests/reduce.at (Reduced Automaton): New test.
742
11652ab3
AD
7432002-04-07 Akim Demaille <akim@epita.fr>
744
745 * src/reduce.c (inaccessable_symbols): Fix a buglet: because of a
746 lacking `+ 1' to nrules, Bison reported as useless a token if it
747 was used solely to set the precedence of the last rule...
748
26b23c1a
AD
7492002-04-07 Akim Demaille <akim@epita.fr>
750
751 * data/bison.c++, data/bison.simple: Don't output the current file
752 name in #line, to avoid useless diffs between two identical
753 outputs under different names.
754
18bcecb0
AD
7552002-04-07 Akim Demaille <akim@epita.fr>
756
757 * src/closure.c, src/print.c, src/reader.c, src/reduce.c:
758 Normalize loops to using `< nrules + 1', not `<= nrules'.
759
fa770c86
AD
7602002-04-07 Akim Demaille <akim@epita.fr>
761
762 * TODO: Update.
763
d9b739c3
AD
7642002-04-07 Akim Demaille <akim@epita.fr>
765
766 * src/output.c, src/reader.c, src/symtab.c, src/symtab.h: Rename
767 bucket.value as bucket.number.
768
99013900
AD
7692002-04-07 Akim Demaille <akim@epita.fr>
770
771 * src/closure.c, src/derives.c, src/gram.h, src/lalr.c,
772 * src/nullable.c, src/output.c, src/print.c, src/print_graph.c,
773 * src/reader.c, src/reduce.c: Let rule_t.rhs point directly to the
774 RHS, instead of being an index in RITEMS.
775
e966383b
PE
7762002-04-04 Paul Eggert <eggert@twinsun.com>
777
778 * doc/bison.texinfo: Update copyright date.
779 (Rpcalc Lexer, Symbols, Token Decl): Don't assume ASCII.
780 (Symbols): Warn about running Bison in one character set,
781 but compiling and/or running in an incompatible one.
782 Warn about character code 256, too.
783
7842002-04-03 Paul Eggert <eggert@twinsun.com>
785
786 * src/bison.data (YYSTACK_ALLOC): Depend on whether
787 YYERROR_VERBOSE is nonzero, not whether it is defined.
788
789 Merge changes from bison-1_29-branch.
c307773e 790
8d6c48b9
PE
7912002-03-20 Paul Eggert <eggert@twinsun.com>
792
793 Merge fixes from Debian bison_1.34-1.diff.
794
795 * configure.in (AC_PREREQ): 2.53.
796
e53c6322
AD
7972002-03-20 Akim Demaille <akim@epita.fr>
798
799 * src/conflicts.c (log_resolution): Argument `resolution' is const.
800
9ffbeca7
PE
8012002-03-19 Paul Eggert <eggert@twinsun.com>
802
21db0b2a
PE
803 * src/bison.simple (YYCOPY): New macro.
804 (YYSTACK_RELOCATE): Use it.
805 Remove Type arg; no longer needed. All callers changed.
806 (yymemcpy): Remove; no longer needed.
807
9ffbeca7
PE
808 * Makefile.am (AUTOMAKE_OPTIONS): 1.6.
809 * doc/Makefile.am (AUTOMAKE_OPTIONS): Remove.
810
642cb8f8
AD
8112002-03-19 Akim Demaille <akim@epita.fr>
812
813 Test and fix the #line outputs.
814
815 * tests/atlocal.at (GCC): New.
816 * tests/synclines.at (AT_TEST_SYNCLINE): New macro.
817 (Prologue synch line, ,%union synch line, Postprologue synch line)
818 (Action synch line, Epilogue synch line): New tests.
819 * src/reader.c (parse_union_decl): Define the muscle stype_line.
820 * data/bison.simple, data/bison.c++: Use it.
821
3c31a486
AD
8222002-03-19 Akim Demaille <akim@epita.fr>
823
824 * tests/regression.at (%nonassoc and eof, Unresolved SR Conflicts)
825 (Solved SR Conflicts, %expect not enough, %expect right)
826 (%expect too much): Move to...
827 * tests/conflicts.at: this new file.
828
0d8bed56
AD
8292002-03-19 Akim Demaille <akim@epita.fr>
830
831 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
832 * data/bison.simple, data/bison.c++: Handle the `#define' part, so
833 that we can move to enums for instance.
834 * src/output.c (token_definitions_output): Output a list of
835 `token-name, token-number' instead of the #define.
836 (output_skeleton): Name this list `b4_tokens', not `b4_tokendefs'.
837
9208d17f
AD
8382002-03-14 Akim Demaille <akim@epita.fr>
839
840 Use Gettext 0.11.1.
841
af27eacb
RA
8422002-03-09 Robert Anisko <robert@lrde.epita.fr>
843
844 * data/bison.c++: Make the user able to add members to the generated
845 parser by subclassing.
846
9101a310
RA
8472002-03-05 Robert Anisko <robert@lrde.epita.fr>
848
849 * src/reader.c (read_additionnal_code): `c' should be an integer, not
850 a character.
851 Reported by Nicolas Tisserand and Nicolas Burrus.
852
fff9bf0b
RA
8532002-03-04 Robert Anisko <robert@lrde.epita.fr>
854
855 * src/reader.c: Warn about lacking semi-colons, do not complain.
856
64dba31e
RA
8572002-03-04 Robert Anisko <robert@lrde.epita.fr>
858
859 * data/bison.c++: Remove a debug line.
860
374f5a14
RA
8612002-03-04 Robert Anisko <robert@lrde.epita.fr>
862
863 * data/bison.c++: Unmerge value as yylval and value as yyval. Unmerge
864 location as yylloc and location as yyloc. Use YYLLOC_DEFAULT, and
865 provide a default implementation.
866
bfcf1f3a
AD
8672002-03-04 Akim Demaille <akim@epita.fr>
868
869 * tests/input.at (Invalid $n, Invalid @n): Add the ending `;'.
870 * tests/output.at (AT_CHECK_OUTPUT): Likewise.
871 * tests/headers.at (AT_TEST_CPP_GUARD_H): Ditto.
872 * tests/semantic.at (Parsing Guards): Similarly.
873 * src/reader.at (readgram): Complain if the last rule is not ended
874 with a semi-colon.
875
65ccf9fc
AD
8762002-03-04 Akim Demaille <akim@epita.fr>
877
878 * src/warshall.h, src/warshall.c (bitmatrix_print): Move to...
879 * src/closure.c: here.
880 (set_firsts): Use bitsetv_reflexive_transitive_closure instead of
881 RTC.
882 * src/warshall.h, src/warshall.c: Remove.
883 * tests/sets.at (Broken Closure): Adjust.
884
d0039cbc
AD
8852002-03-04 Akim Demaille <akim@epita.fr>
886
887 * src/output.c (output_skeleton): tempdir is const.
888 bytes_read is unused.
889
345cea78
AD
8902002-03-04 Akim Demaille <akim@epita.fr>
891
892 * lib/bbitset.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
893 * lib/bitsetv.h, lib/ebitset.c, lib/lbitset.c, lib/sbitset.c:
894 Update.
895 From Michael Hayes.
896
564801f7
AD
8972002-03-04 Akim Demaille <akim@epita.fr>
898
899 * src/closure.c (closure): `r' is unused.
900
e5352bc7
AD
9012002-03-04 Akim Demaille <akim@epita.fr>
902
903 * tests/sets.at (Broken Closure): Add the ending `;'.
904 * src/reader.at (readgram): Complain if a rule is not ended with a
905 semi-colon.
906
914feea9
AD
9072002-03-04 Akim Demaille <akim@epita.fr>
908
909 * src/conflicts.c (set_conflicts): Use bitset_disjoint_p.
910 (count_sr_conflicts): Use bitset_count.
911 * src/reduce.c (inaccessable_symbols): Ditto.
912 (bits_size): Remove.
913 * src/warshall.h, src/warshall.c: Convert to bitsetv.
914
f0250de6
AD
9152002-03-04 Akim Demaille <akim@epita.fr>
916
917 * src/closure.c, src/conflicts.c, src/lalr.c, src/print.c,
918 * src/reduce.c: Remove the `bitset_zero's following the
919 `bitset_create's, as now it is performed by the latter.
920
ef017502
AD
9212002-03-04 Akim Demaille <akim@epita.fr>
922
923 * lib/bitset.c, lib/bitset.h, lib/bitsetv.c, lib/bitsetv.h,
924 * lib/ebitset.c, lib/ebitset.h, lib/lbitset.c, lib/lbitset.h,
925 * lib/sbitset.c, lib/sbitset.h, lib/bbitset.h: Update from the
926 latest sources from Michael.
927
76514394
AD
9282002-03-04 Akim Demaille <akim@epita.fr>
929
930 * src/output.c (output): Don't free the grammar.
931 * src/reader.c (grammar_free): New.
932 * src/main.c (main): Call it and don't free symtab here.
933
55024580
AD
9342002-03-04 Akim Demaille <akim@epita.fr>
935
936 * src/lex.c (parse_percent_token): Be sure to 0-end token_buffer
937 before returning.
938 Reported by Benoit Perrot.
939
f9abaa2c
AD
9402002-03-04 Akim Demaille <akim@epita.fr>
941
942 Use bitset operations when possible, not loops over bits.
943
944 * src/conflicts.c (set_conflicts, count_sr_conflicts): Use
945 bitset_or.
946 * src/print.c (print_reductions): Use bitset_and, bitset_andn.
947 * src/reduce.c (useless_nonterminals): Formatting changes.
948 * src/warshall.c (TC): Use bitset_or.
949
0e721e75
AD
9502002-03-04 Akim Demaille <akim@epita.fr>
951
952 * src/lalr.h, src/lalr.c (tokensetsize): Remove, unused.
953 * src/system.h (BITS_PER_WORD, WORDSIZE, SETBIT, RESETBIT, BITISSET):
954 Ditto.
955
0fb1ffb1
AD
9562002-03-04 Akim Demaille <akim@epita.fr>
957
958 * src/lalr.c (F): Now a bitset*.
959 Adjust all dependencies.
960
b86796bf
AD
9612002-03-04 Akim Demaille <akim@epita.fr>
962
963 * src/conflicts.c (shiftset, lookaheadset): Now bitset.
964 Adjust all dependencies.
965
602bbf31
AD
9662002-03-04 Akim Demaille <akim@epita.fr>
967
968 * src/L0.c, src/LR0.h (nstates): Be size_t.
969 Adjust comparisons (signed vs unsigned).
970 * src/conflics.c, src/lalr.c, src/lalr.h, src/output.c (LA): Now a
971 bitset*.
972 Adjust all dependencies.
973
d8a0245c
AD
9742002-03-04 Akim Demaille <akim@epita.fr>
975
976 * src/closure.c (firsts): Now, also a bitset.
977 Adjust all dependencies.
978 (varsetsize): Remove, now unused.
979 * src/warshall.h, src/warshall.c: Now work on arrays of bitsets.
980
34ba9743
AD
9812002-03-04 Akim Demaille <akim@epita.fr>
982
983 * src/print.c: Convert to use bitset.h, not hand coded iterations
984 over ints.
985
ed86e78c
AD
9862002-03-04 Akim Demaille <akim@epita.fr>
987
988 * src/reduce.c: Convert to use bitset.h, not hand coded BSet.
989
dfdb1797
AD
9902002-03-04 Akim Demaille <akim@epita.fr>
991
992 * src/closure.c (ruleset): Be a bitset.
993 (rulesetsize): Remove.
994
7086e707
AD
9952002-03-04 Akim Demaille <akim@epita.fr>
996
997 * lib/bitset-int.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
998 * lib/bitsetv.h, lib/ebitset.c, lib/ebitset.h, lib/lbitset.c,
999 * lib/lbitset.h, lib/sbitset.c, lib/sbitset.h: New.
1000 * src/closure.c (fderives): Be an array of bitsets.
1001
98254360
RA
10022002-02-28 Robert Anisko <robert@lrde.epita.fr>
1003
1004 * data/bison.c++: Merge the two generated headers. Insert a copyright
1005 notice in each output file.
1006
a75c057f
AD
10072002-02-28 Akim Demaille <akim@epita.fr>
1008
1009 * data/bison.c++: Copy the prologue of bison.simple to fetch
1010 useful M4 definitions, such as b4_header_guard.
1011
06b00abc
AD
10122002-02-25 Akim Demaille <akim@epita.fr>
1013
1014 * src/getargs.c (version): Give the name of the authors, and use a
a75c057f
AD
1015 translator friendly scheme for the bgr
1016 copyright notice.
06b00abc 1017
70e7d534
AD
10182002-02-25 Akim Demaille <akim@epita.fr>
1019
1020 * src/output.c (header_output): Remove, now handled completely via
1021 M4.
1022
abe017f6
AD
10232002-02-25 Akim Demaille <akim@epita.fr>
1024
1025 * m4/m4.m4: New, from CVS Autoconf.
1026 * configure.in: Invoke it.
1027 * src/output.c (output_skeleton): Use its result instead of the
1028 hard coded name.
1029
381fb12e
AD
10302002-02-25 Akim Demaille <akim@epita.fr>
1031
1032 * lib/tempname.c, lib/mkstemp.c, m4/mkstemp.m4: New, stolen from
1033 Fileutils 4.1.5.
1034 * configure.in: Invoke UTILS_FUNC_MKSTEMP.
1035 * src/output.c (output_skeleton): Use mkstemp to create a real
1036 temporary file.
1037 Move the filling of `skeleton' and its muscle to...
1038 (prepare): here.
1039 (output): Move the definition of the prologue muscle to...
1040 (prepare): here.
1041 * src/system.h (DEFAULT_TMPDIR): New.
1042
6f38107f
PE
10432002-02-14 Paul Eggert <eggert@twinsun.com>
1044
1045 Remove the support for C++ namespace cleanliness; it was
1046 causing more problems than it was curing, since it didn't work
1047 properly on some nonstandard C++ compilers. This can wait
1048 for a proper C++ parser.
1049
1050 * NEWS: Document this.
1051 * doc/bison.texinfo (Bison Parser, Debugging): Remove special mention
1052 of C++, as it's treated like C now.
1053 * src/bison.simple (YYSTD): Remove.
1054 (YYSIZE_T, YYFPRINTF, YYPARSE_PARAM_ARG, YYPARSE_PARAM_DECL):
1055 Treat C++ just like Standard C instead of trying to support
1056 namespace cleanliness.
1057
80cce3da
AD
10582002-02-14 Akim Demaille <akim@epita.fr>
1059
1060 * tests/regression.at (else): Adjust to Andreas' change.
1061
842e8679
AD
10622002-02-14 Akim Demaille <akim@epita.fr>
1063
1064 * lib/Makefile.am (EXTRA_DIST): Ship strnlen.c.
1065
4bda3f10
AD
10662002-02-13 Andreas Schwab <schwab@suse.de>
1067
1068 * src/output.c (output_rule_data): Don't output NULL, it might
1069 not be defined yet.
1070
4162fa07 10712002-02-11 Robert Anisko <robert@lrde.epita.fr>
b418ecd8 1072
4162fa07
RA
1073 * data/bison.c++ (YYDEBUG, YYERROR_VERBOSE): After the prologue.
1074 (Copyright notice): Update.
b418ecd8 1075
bd16a5dc
AD
10762002-02-11 Akim Demaille <akim@epita.fr>
1077
1078 * tests/regression.at (%nonassoc and eof): Don't include
1079 nonportable headers.
1080
8d69a1a3
RA
10812002-02-08 Robert Anisko <robert@lrde.epita.fr>
1082
1083 * data/bison.c++: Correct error recovery. Make the user able to
1084 initialize the starting location.
1085
9b2d0677
AD
10862002-02-07 Akim Demaille <akim@epita.fr>
1087
1088 * tests/input.at: New.
1089
69e2658b
RA
10902002-02-07 Robert Anisko <robert@lrde.epita.fr>
1091
1092 * data/bison.c++: Replace some direct m4 expansions by constants. Be
9b2d0677 1093 more consistent when naming methods and variables. Put preprocessor
69e2658b
RA
1094 directives around tables only needed for debugging.
1095
4aacc3a7
RA
10962002-02-07 Robert Anisko <robert@lrde.epita.fr>
1097
1098 * data/bison.c++ (yy::b4_name::print_): New method, replaces yyprint in
1099 C++ parsers.
1100 (yy::b4_name::parse): Use print_.
1101
762a801e
RA
11022002-02-07 Robert Anisko <robert@lrde.epita.fr>
1103
1104 * data/bison.c++ (yy::b4_name::parse): Error recovery is back.
1105
4bb2bc3f
RA
11062002-02-07 Robert Anisko <robert@lrde.epita.fr>
1107
1108 * data/bison.c++ (yy::b4_name::error_): New method, replaces yyerror in
1109 C++ parsers.
1110 (yy::b4_name::parse): Build verbose error messages, and use error_.
1111
6b45a3ca
RA
11122002-02-06 Robert Anisko <robert@lrde.epita.fr>
1113
1114 * data/bison.c++: Fix m4 quoting in comments.
1115
50997c6e
RA
11162002-02-06 Robert Anisko <robert@lrde.epita.fr>
1117
1118 * data/bison.c++: Adjust the parser code. Fix some muscles that were
1119 not expanded by m4.
1120
3f3eed27
AD
11212002-02-05 Akim Demaille <akim@epita.fr>
1122
1123 * data/bison.c++: Adjust to the M4 back end.
1124 More is certainly needed.
1125
be2a1a68
AD
11262002-02-05 Akim Demaille <akim@epita.fr>
1127
1128 Give a try to M4 as a back end.
1129
1130 * lib/readpipe.c: New, from wdiff.
1131 * src/Makefile.am (DEFS): Define PKGDATADIR, not BISON_SIMPLE and
1132 BISON_HAIRY.
1133 * src/system.h (BISON_HAIRY, BISON_SIMPLE): Remove the DOS and VMS
1134 specific values. Now it is m4 that performs the lookup.
1135 * src/parse-skel.y: Remove.
1136 * src/muscle_tab.c, src/muscle_tab.h (muscles_m4_output): New.
1137 * src/output.c (actions_output, guards_output)
1138 (token_definitions_output): No longer keeps track of the output
1139 line number, hence remove the second argument.
1140 (guards_output): Check against the guard member of a rule, not the
1141 action member.
1142 Adjust callers.
1143 (output_skeleton): Don't look for the skeleton location, let m4 do
1144 that.
1145 Create `/tmp/muscles.m4'. This is temporary, a proper temporary
1146 file will be used.
1147 Invoke `m4' on m4sugar.m4, muscles.m4, and the skeleton.
1148 (prepare): Given that for the time being changesyntax is not
1149 usable in M4, rename the muscles using `-' to `_'.
1150 Define `defines_flag', `output_parser_name' and `output_header_name'.
1151 * src/output.h (actions_output, guards_output)
1152 (token_definitions_output): Adjust prototypes.
1153 * src/scan-skel.l: Instead of scanning the skeletons, it now
1154 processes the output of m4: `__oline__' and `#output'.
1155 * data/bison.simple: Adjust to be used by M4(sugar).
1156 * tests/Makefile.am: Use check_SCRIPTS to make sure `bison' is up
1157 to date.
1158 * tests/bison.in: Use the secrete envvar `BISON_PKGDATADIR'
1159 instead of the dead `BISON_SIMPLE' and `BISON_HAIRY'.
1160 * data/m4sugar/m4sugar.m4, data/m4sugar/version.m4: New,
1161 shamelessly stolen from CVS Autoconf.
1162
beda758b
AD
11632002-02-05 Akim Demaille <akim@epita.fr>
1164
1165 * lib/hash.c, lib/hash.h: Replace with Fileutils 4.1's version.
1166 * configure.in: Check for the declarations of free and malloc.
1167 * src/muscle_tab.c: Adjust.
1168
5ece6d43
AD
11692002-02-05 Akim Demaille <akim@epita.fr>
1170
1171 * src/muscle_tab.c (muscle_init): Don't default to NULL muscle
1172 which have no values.
1173
5bb18f9a
AD
11742002-02-05 Akim Demaille <akim@epita.fr>
1175
1176 * src/bison.simple, src/bison.hairy, src/bison.c++: Move to...
1177 * data/: here.
1178
894dd62e
PE
11792002-01-29 Paul Eggert <eggert@twinsun.com>
1180
1181 * src/bison.simple (YYSIZE_T): Do not define merely because
1182 YYSTACK_USE_ALLOCA is nonzero or alloca or _ALLOCA_H are defined.
1183 On some platforms, <alloca.h> does not declare YYSTD (size_t).
1184
82841af7
AD
11852002-01-27 Akim Demaille <akim@epita.fr>
1186
1187 Fix `%nonassoc and eof'.
1188
1189 * src/state.c (errs_dup): Aaaah! The failure was due to bytes
1190 which were not properly copied! Replace
1191 memcpy (res->errs, src->errs, src->nerrs);
1192 with
1193 memcpy (res->errs, src->errs, src->nerrs * sizeof (src->errs[0]));
1194 !!!
1195 * tests/regression.at (%nonassoc and eof): Adjust to newest
1196 Autotest: `.' is not in the PATH.
1197
318b76e9
AD
11982002-01-27 Akim Demaille <akim@epita.fr>
1199
1200 * tests/sets.at (AT_EXTRACT_SETS): New.
1201 (Nullable): Use it.
1202 (Firsts): New.
1203
30d2f3d5
AD
12042002-01-26 Akim Demaille <akim@epita.fr>
1205
1206 * tests/actions.at, tests/calc.at, tests/headers.at,
1207 * tests/torture.at: Adjust to the newest Autotest which no longer
1208 forces `.' in the PATH.
1209
30f8c395
AD
12102002-01-25 Akim Demaille <akim@epita.fr>
1211
1212 * tests/regression.at (%nonassoc and eof): New.
1213 Suggested by Robert Anisko.
1214
29ae55f1
AD
12152002-01-24 Akim Demaille <akim@epita.fr>
1216
1217 Bison dumps core when trying to complain about broken input files.
1218 Reported by Cris van Pelt.
1219
1220 * src/lex.c (parse_percent_token): Be sure to set token_buffer.
1221 * tests/regression.at (Invalid input: 1, Invalid input: 2): Merge
1222 into...
1223 (Invalid inputs): Strengthen: exercise parse_percent_token.
1224
2b548aa6
RA
12252002-01-24 Robert Anisko <robert.anisko@epita.fr>
1226
1227 * src/Makefile.am: Add bison.c++.
1228 * src/bison.c++: New skeleton.
1229
bb0146c2
AD
12302002-01-21 Paolo Bonzini <bonzini@gnu.org>
1231
1232 * po/it.po: New.
1233
bec30531
AD
12342002-01-21 Kees Zeelenberg <kzlg@users.sourceforge.net>
1235
1236 * src/files.c (skeleton_find) [MSDOS]: Fix cp definition.
1237
fc6edc45
MA
12382002-01-20 Marc Autret <marc@gnu.org>
1239
1240 * src/files.c (compute_output_file_names): Fix
1241
5e5d5415
MA
12422002-01-20 Marc Autret <marc@gnu.org>
1243
1244 * tests/output.at: New test.
1245 * src/files.c (compute_base_names): Don't map extensions when
1246 the YACC flag is set, use defaults.
1247 Reported by Evgeny Stambulchik.
1248
44ea3fbd
MA
12492002-01-20 Marc Autret <marc@gnu.org>
1250
bb0146c2 1251 * src/system.h: Need to define __attribute__ away for non-GCC
44ea3fbd
MA
1252 compilers as well (i.e. the vendor C compiler).
1253 Suggested by Albert Chin-A-Young.
1254
338963d1
TVH
12552002-01-11 Tim Van Holder <tim.van.holder@pandora.be>
1256
1257 * lib/hash.h, lib/hash.c: Renamed __P to PARAMS and used the
1258 canonical definition.
1259 * src/system.h: Use the canonical definition for PARAMS (avoids
1260 a conflict with the macro from lib/hash.h).
1261
c57b2479
AD
12622002-01-11 Akim Demaille <akim@epita.fr>
1263
1264 * configure.in: Use AC_FUNC_STRNLEN.
d9e9746c 1265 Fixes the failures observed on AIX 4.3 by H.Merijn Brand.
c57b2479 1266
b85810ae
AD
12672002-01-09 Akim Demaille <akim@epita.fr>
1268
1269 * src/files.c, src/files.h (output_infix): New.
1270 (tab_extension): Remove.
1271 (compute_base_names): Compute the former, drop the latter.
1272 * src/output.c (prepare): Insert the muscles `output-infix', and
1273 `output-suffix'.
1274 * src/parse-skel.y (string, string.1): New.
1275 (section.header): Use it.
1276 (section.yacc): Remove.
1277 (prefix): Remove too.
1278 * src/scan-skel.l: Adjust.
1279 * src/bison.simple, src/bison.hairy: Adjust.
1280
cae60122
AD
12812002-01-09 Akim Demaille <akim@epita.fr>
1282
1283 * configure.in (WERROR_CFLAGS): Compute it.
1284 * src/Makefile.am (CFLAGS): Pass it.
1285 * tests/atlocal.in (CFLAGS): Idem.
1286 * src/files.c: Fix a few warnings.
1287 (get_extension_index): Remove, unused.
1288
ae404801
AD
12892002-01-08 Akim Demaille <akim@epita.fr>
1290
1291 * src/getargs.c (AS_FILE_NAME): New.
1292 (getargs): Use it to convert DOSish file names.
1293 * src/files.c (base_name): Rename as full_base_name to avoid
1294 clashes with `base_name ()'.
1295 (filename_split): New.
1296 (compute_base_names): N-th rewrite, using filename_split.
1297
22312b71
AD
12982002-01-08 Akim Demaille <akim@epita.fr>
1299
1300 * lib/basename.c, lib/dirname.h, lib/dirname.c, lib/memrchr.c:
1301 New, stolen from the Fileutils 4.1.
1302 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
1303 * configure.in: Check for the presence of memrchr, and of its
1304 prototype.
1305
a67cef01
TVH
13062002-01-07 Tim Van Holder <tim.van.holder@pandora.be>
1307
1308 * lib/hash.h (__P): Added definition for this macro.
1309 * src/Makefile.am: Add parse-skel.c and scan-skel.c to
1310 BUILT_SOURCES, to ensure they are generated first.
1311 * src/parse-skel.y: Use YYERROR_VERBOSE instead of
1312 %error-verbose to allow bootstrapping with bison 1.30x.
1313
2b25d624
AD
13142002-01-06 Akim Demaille <akim@epita.fr>
1315
1316 * src/reader.c (parse_braces): Don't fetch the next char, the
1317 convention is to fetch on entry.
1318 * tests/torture.at (GNU Cim Grammar): Reintroduce their weird
1319 'switch' without a following semicolon.
1320 * tests/regression.at (braces parsing): New.
1321
3460813b
AD
13222002-01-06 Akim Demaille <akim@epita.fr>
1323
1324 Bison is dead wrong in its RR conflict reports.
1325
1326 * tests/torture.at (GNU Cim Grammar): New.
1327 * src/conflicts.c (count_rr_conflicts): Fix.
1328
73784c64
AD
13292002-01-06 Akim Demaille <akim@epita.fr>
1330
1331 Creating package.m4 from configure.ac causes too many problems.
1332
1333 * tests/Makefile.am (package.m4): Create it by hand,
1334 AC_CONFIG_TESTDIR no longer does in the most recent CVS Autoconf.
1335
25d81090
AD
13362002-01-06 Akim Demaille <akim@epita.fr>
1337
1338 * src/Makefile.am (bison_SOURCES): Add parse-skel.h and
1339 skeleton.h.
1340
a9b8959e
PE
13412002-01-04 Paul Eggert <eggert@twinsun.com>
1342
1343 * doc/bison.texinfo (Debugging):
1344 Remove YYSTDERR; it's no longer defined or used.
1345 Also, s/cstdio.h/cstdio/.
1346
25d81090
AD
13472002-01-03 Akim Demaille <akim@epita.fr>
1348
1349 * tests/bison.in, tests/atlocal.in: Adjust to CVS Autoconf.
1350
1109455c
AD
13512002-01-03 Akim Demaille <akim@epita.fr>
1352
1353 * src/parse-skel.y (process_skeleton): Don't bind the parser's
1354 tracing code to --trace, wait for a better --trace option, with
1355 args.
1356
7ea5e977
AD
13572002-01-03 Akim Demaille <akim@epita.fr>
1358
1359 * src/bison.simple (YYSTDERR): Remove, replace `stderr'.
1360 The ISO C++ standard is extremely clear about it: stderr is
1361 considered a macro, not a regular symbol (see table 94 `Header
1362 <cstdio> synopsis', [lib.c.files] 27.8.2 C Library files).
1363 Therefore std:: does not apply to it. It still does with fprintf.
1364 Also, s/cstdio.h/cstdio/.
1365
fab5b110
AD
13662002-01-03 Akim Demaille <akim@epita.fr>
1367
1368 * lib/quotearg.c: Use `#include "..."' instead of `#include <...>'
1369 for non system headers.
1370
aed7fd9b
AD
13712002-01-02 Akim Demaille <akim@epita.fr>
1372
1373 Equip the skeleton chain with location tracking, runtime trace,
1374 pure parser and scanner.
1375
1376 * src/parse-skel.y: Request a pure parser, locations, and prefix
1377 renaming.
1378 (%union): Having several members with the same type does not help
1379 type mismatches, simplify.
1380 (YYPRINT, yyprint): New.
1381 (yyerror): ``Rename'' (there is a #define yyerror skel_error) as...
1382 (skel_error): this.
1383 Handle locations.
1384 * src/scan-skel.l: Adjust to these changes.
1385 * src/skeleton.h (LOCATION_RESET, LOCATION_LINES, LOCATION_STEP)
1386 (LOCATION_PRINT, skel_control_t): New.
1387
24fad99e
AD
13882001-12-30 Akim Demaille <akim@epita.fr>
1389
1390 * src/parse-skel.y: Get rid of the shift/reduce conflict:
1391 replace `gb' with BLANKS.
1392 * src/scan-skel.l: Adjust.
1393
a4b36db4
AD
13942001-12-30 Akim Demaille <akim@epita.fr>
1395
1396 * src/system.h: We don't need nor want bcopy.
1397 Throw away MS-DOS crap: we don't need getpid.
1398 * configure.in: We don't need strndup. It was even causing
1399 problems: because Flex includes the headers *before* us,
1400 _GNU_SOURCE is not defined by config.h, and therefore strndup was
1401 not visible.
1402 * lib/xstrndup.c: New.
1403 * src/scan-skel.l: Use it.
1404 Be sure to initialize yylval.muscle member when scanning a MUSCLE.
1405 * src/parse-skel.y: Use %directives instead of #defines.
1406
1239777d
AD
14072001-12-30 Akim Demaille <akim@epita.fr>
1408
1409 * src/skeleton.h: New.
1410 * src/output.c (output_parser, output_master_parser): Remove, dead
1411 code.
1412 * src/output.h (get_lines_number, actions_output, guards_output)
1413 (token_definitions_output): Prototype them.
1414 * src/parse-skel.y: Add the license notice.
1415 Include output.h and skeleton.h.
1416 (process_skeleton): Returns void, and takes a single parameter.
1417 * src/scan-skel.l: Add the license notice.
1418 Include skeleton.h.
1419 Don't use %option yylineno: it seems that then Flex imagines
1420 REJECT has been used, and therefore it won't reallocate its
1421 buffers (which makes no other sense to me than a bug). It results
1422 in warnings for `unused: yy_flex_realloc'.
1423
9b3add5b
RA
14242001-12-30 Robert Anisko <robert.anisko@epita.fr>
1425
1426 * src/muscle_tab.h (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
1427 (MUSCLE_INSERT_PREFIX): ...to there.
1428 * src/output.c (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
1429 (MUSCLE_INSERT_PREFIX): Move from here...
1430
1431 * src/bison.hairy: Add a section directive. Put braces around muscle
1432 names. This parser skeleton is still broken, but Bison should not
1433 choke on a bad muscle 'syntax'.
1434 * src/bison.simple: Add a section directive. Put braces around muscle
1435 names.
1436
1437 * src/files.h (strsuffix, stringappend): Add declarations.
1438 (tab_extension): Add declaration.
1439 (short_base_name): Add declaration.
1440
1441 * src/files.c (strsuffix, stringappend): No longer static. These
1442 functions are used in the skeleton parser.
1443 (tab_extension): New.
1444 (compute_base_names): Use the computations done in this function
fab5b110 1445 to guess if the generated parsers should have '.tab' in their
9b3add5b
RA
1446 names.
1447 (short_base_name): No longer static.
1448
1449 * src/output.c (output_skeleton): New.
1450 (output): Disable call to output_master_parser, and give a try to
1451 a new skeleton handling system.
1452 (guards_output, actions_output): No longer static.
1453 (token_definitions_output, get_lines_number): No longer static.
1454
1455 * configure.in: Use AM_PROG_LEX and AC_PROG_YACC.
1456
fab5b110 1457 * src/Makefile.am (bison_SOURCES): Add scan-skel.l and
9b3add5b
RA
1458 parse-skel.y.
1459
1460 * src/parse-skel.y: New file.
1461 * src/scan-skel.l: New file.
1462
b5b61c61
AD
14632001-12-29 Akim Demaille <akim@epita.fr>
1464
1465 %name-prefix is broken.
1466
1467 * src/files.c (spec_name_prefix): Initialize to NULL, not to "yy".
1468 Adjust all dependencies.
1469 * tests/headers.at (export YYLTYPE): Strengthen this test: use
1470 %name-prefix.
1471
1472 Renaming yylval but not yylloc is not consistent. Now we do.
1473
1474 * src/bison.simple: Prefix yylloc if used.
1475 * doc/bison.texinfo (Decl Summary): Document that.
1476
8c9a50be
AD
14772001-12-29 Akim Demaille <akim@epita.fr>
1478
1479 * doc/bison.texinfo: Promote `%long-directive' over
1480 `%long_directive'.
1481 Remove all references to fixed-output-files, yacc is enough.
1482
d99361e6
AD
14832001-12-29 Akim Demaille <akim@epita.fr>
1484
1485 * src/bison.simple: Define YYDEBUG and YYERROR_VERBOSE *after* the
1486 user prologue. These are defaults.
1487 * tests/actions.at (Mid-rule actions): Make sure the user can
1488 define YYDEBUG and YYERROR_VERBOSE.
1489
b9cecb91
AD
14902001-12-29 Akim Demaille <akim@epita.fr>
1491
1492 * src/output.c (header_output): Don't forget to export YYLTYPE and
1493 yylloc.
1494 * tests/headers.at (export YYLTYPE): New, make sure it does.
1495 * tests/regression.at (%union and --defines, Invalid CPP headers):
1496 Move to...
1497 * tests/headers.at: here.
1498
aea13e97
AD
14992001-12-29 Akim Demaille <akim@epita.fr>
1500
1501 * src/gram.h (rule_s): Member `assoc' is of type `associativity'.
1502
931394cb
AD
15032001-12-29 Akim Demaille <akim@epita.fr>
1504
1505 * tests/actions.at (Mid-rule actions): Output on a single line
1506 instead of several.
1507
704a47c4
AD
15082001-12-29 Akim Demaille <akim@epita.fr>
1509
1510 * doc/bison.texinfo: Formatting changes.
1511
091e20bb
AD
15122001-12-29 Akim Demaille <akim@epita.fr>
1513
1514 Don't store the token defs in a muscle, just be ready to output it
1515 on command. Now possible via `symbols'. Fixes a memory leak.
1516
1517 * src/output.c (token_definitions_output): New.
1518 (output_parser, header_output): Use it.
1519 * src/reader.c (symbols_save): Remove.
1520
cce71710
AD
15212001-12-29 Akim Demaille <akim@epita.fr>
1522
1523 * src/bison.simple: Do not provide a default for YYSTYPE and
1524 YYLTYPE before the user's prologue. Otherwise it's hardly... a
1525 default.
1526
82c035a8
AD
15272001-12-29 Akim Demaille <akim@epita.fr>
1528
1529 Mid-rule actions are simply... ignored!
1530
1531 * src/reader.c (readgram): Be sure to attach mid-rule actions to
1532 the empty-rule associated to the dummy symbol, not to the host
1533 rule.
1534 * tests/actions.at (Mid-rule actions): New.
1535
8419d367
AD
15362001-12-29 Akim Demaille <akim@epita.fr>
1537
1538 Memory leak.
1539
1540 * src/reader.c (reader): Free grammar.
1541
375d5806
AD
15422001-12-29 Akim Demaille <akim@epita.fr>
1543
1544 Memory leak.
1545
1546 * src/LR0.c (new_itemsets): Don't allocate `shift_symbol' here,
1547 since it allocates it for each state, although only one is needed.
1548 (allocate_storage): Do it here.
1549
f51cb8ff
AD
15502001-12-29 Akim Demaille <akim@epita.fr>
1551
1552 * src/options.h, src/options.c (create_long_option_table): Rename
1553 as...
1554 (long_option_table_new): this, with a clearer prototype.
1555 (percent_table): Remove, unused,
1556 * src/getargs.c (getargs): Adjust.
1557
29e88316
AD
15582001-12-29 Akim Demaille <akim@epita.fr>
1559
1560 * src/LR0.c, src/conflicts.c, src/lalr.c, src/lalr.h, src/output.c
1561 * src/print.c, src/print_graph.c, src/state.h: Rename state_table
1562 as states.
1563
b9f71f19
AD
15642001-12-29 Akim Demaille <akim@epita.fr>
1565
1566 * src/lalr.c (build_relations): Rename `states' as `states1'.
1567 Sorry, I don't understand exactly what it is, no better name...
1568
1a2b5d37
AD
15692001-12-29 Akim Demaille <akim@epita.fr>
1570
1571 * src/closure.c, src/conflicts.c, src/derives.c, src/gram.c
1572 * src/gram.h, src/lalr.c, src/nullable.c, src/output.c, src/print.c
1573 * src/print_graph.c, src/reader.c, src/reduce.c: Rename rule_table
1574 as rules.
1575
1cca533e
AD
15762001-12-29 Akim Demaille <akim@epita.fr>
1577
1578 * src/gram.c (rprec, rprecsym, rassoc): Remove, unused since long
1579 ago.
1580
c03ae966
AD
15812001-12-29 Akim Demaille <akim@epita.fr>
1582
1583 * src/reader.c, src/reader.h (user_toknums): Remove.
1584 Adjust all users to use symbols[i]->user_token_number.
1585
5a670b1e
AD
15862001-12-29 Akim Demaille <akim@epita.fr>
1587
1588 * src/gram.c, src/gram.h (sprec, sassoc): Remove.
1589 Adjust all users to use symbols[i]->prec or ->assoc.
1590
ad949da9
AD
15912001-12-29 Akim Demaille <akim@epita.fr>
1592
1593 * src/reader.c, src/reader.h (tags): Remove.
1594 Adjust all users to use symbols[i]->tag.
1595
0e78e603
AD
15962001-12-29 Akim Demaille <akim@epita.fr>
1597
1598 * src/gram.h, src/gram.c (symbols): New, similar to state_table
1599 and rule_table.
1600 * src/reader.c (packsymbols): Fill this table.
1601 Drop sprec.
1602 * src/conflicts.c (resolve_sr_conflict): Adjust.
1603 * src/reduce.c (reduce_grammar): Adjust: just sort symbols, a
1604 single table.
1605 Use symbols[i]->tag instead of tags[i].
1606
213e640e
AD
16072001-12-29 Akim Demaille <akim@epita.fr>
1608
1609 * tests/calc.at (_AT_DATA_CALC_Y): Also use %union.
1610 In addition, put a comment in there, to replace...
1611 * tests/regression.at (%union and C comments): Remove.
1612
e7b8bef1
AD
16132001-12-29 Akim Demaille <akim@epita.fr>
1614
1615 * tests/regression.at (Web2c Actions): Blindly move the actual
1616 output as expected output. The contents *seem* right to me, but I
1617 can't pretend reading perfectly parser tables... Nonetheless, all
1618 the other tests pass correctly, the table look OK, even though the
1619 presence of `$axiom' is to be noted: AFAICS it is useless (but
1620 harmless).
1621
b68e7744
AD
16222001-12-29 Akim Demaille <akim@epita.fr>
1623
1624 * src/reader.c (readgram): Don't add the rule 0 if there were no
1625 rules read. In other words, add it _after_ having performed
1626 grammar sanity checks.
1627 Fixes the `tests/regression.at (Invalid input: 1)' Failure.
1628
78d5bae9
AD
16292001-12-29 Akim Demaille <akim@epita.fr>
1630
1631 * tests/regression.at (Web2c Report): Catch up: the rule 0 is now
1632 visible, and some states have now a different number.
1633
ff442794
AD
16342001-12-29 Akim Demaille <akim@epita.fr>
1635
1636 * src/reader.c (readgram): Bind the initial rule's lineno to that
1637 of the first rule.
1638 * tests/regression.at (Rule Line Numbers, Unresolved SR Conflicts):
1639 (Solved SR Conflicts): Adjust rule 0's line number.
1640
610ab194
AD
16412001-12-29 Akim Demaille <akim@epita.fr>
1642
1643 Fix the `GAWK Grammar' failure.
1644
1645 * src/LR0.c (final_state): Initialize to -1 so that we do compute
1646 the reductions of the first state which was mistakenly confused
1647 with the final state because precisely final_state was initialized
1648 to 0.
1649 * tests/sets.at (Nullable): Adjust: state 0 does have lookaheads,
1650 now noticed by Bison.
1651 * tests/regression.at (Rule Line Numbers): Adjust: state 0 does
1652 have a reduction on $default.
1653
29d29c8f
AD
16542001-12-29 Akim Demaille <akim@epita.fr>
1655
1656 * src/gram.c (ritem_print): Be sure to subtract 1 when displaying
1657 rule line numbers.
1658 * src/closure.c (print_closure): Likewise.
1659 * src/derives.c (print_derives): Likewise.
1660 * tests/sets.at (Nullable): Adjust: the rule numbers are correct
1661 now.
1662
7c6b64d0
AD
16632001-12-29 Akim Demaille <akim@epita.fr>
1664
1665 * src/lalr.c (lookaheads_print): New.
1666 (lalr): Call it when --trace-flag.
1667 * tests/sets.at (Nullable): Adjust: when tracing, the lookaheads
1668 are dumped.
1669
3d4daee3
AD
16702001-12-29 Akim Demaille <akim@epita.fr>
1671
1672 * src/derives.c (print_derives): Be sure to use `>= 0', not `> 0',
1673 when walking through ritem, even via rule->rhs.
1674 * src/reduce.c (dump_grammar, useful_production, reduce_output)
1675 (useful_production, useless_nonterminals): Likewise.
1676 (reduce_grammar_tables): Likewise, plus update nritems.
1677 * src/nullable.c (set_nullable): Likewise.
1678 * src/lalr.c (build_relations): Likewise.
1679 * tests/sets.at (Nullable): Adjust.
1680 Fortunately, now, the $axiom is no longer nullable.
1681
9e7f6bbd
AD
16822001-12-29 Akim Demaille <akim@epita.fr>
1683
1684 * src/LR0.c (generate_states): Use nritems, not nitems, nor using
1685 the 0-sentinel.
1686 * src/gram.c (ritem_longest_rhs): Likewise.
1687 * src/reduce.c (nonterminals_reduce): Likewise.
1688 * src/print_graph.c (print_graph): Likewise.
1689 * src/output.c (output_rule_data): Likewise.
1690 * src/nullable.c (set_nullable): Likewise.
1691
255ef638
AD
16922001-12-29 Akim Demaille <akim@epita.fr>
1693
1694 * src/output.c: Comment changes.
1695
0d8a7363
AD
16962001-12-27 Paul Eggert <eggert@twinsun.com>
1697
1698 * src/bison.simple (YYSTACK_ALLOC, YYSIZE_T): Remove special
1699 cases for non-GNU systems like AIX, HP-UX, SGI, Sun, and
1700 Sparc, as they were causing more porting problems than the
1701 (minor) performance improvement was worth.
1702
1703 Also, catch up with 1.31's YYSTD.
1704
3db472b9
AD
17052001-12-27 Akim Demaille <akim@epita.fr>
1706
1707 * src/output.c (output_gram): Rely on nritems, not the
1708 0-sentinel. See below.
1709 Use -1 as separator, not 0.
1710 * src/bison.simple (yyparse): Subtract 1 to the rule numbers.
1711 Rely on -1 as separator in yyrhs, instead of 0.
1712 * tests/calc.at (AT_CHECK_CALC): Now, the parsers no longer issue
1713 twice `Now at end of input', therefore there are two lines less to
1714 expect.
1715
b365aa05
AD
17162001-12-27 Akim Demaille <akim@epita.fr>
1717
1718 * tests/regression.at (Unresolved SR Conflicts):
1719 (Solved SR Conflicts, Rule Line Numbers): Adjust to the changes
1720 below.
1721
30171f79
AD
17222001-12-27 Akim Demaille <akim@epita.fr>
1723
1724 * src/LR0.c (new_state): Recognize the final state by the fact it
1725 is reached by eoftoken.
1726 (insert_start_shifting_state, insert_eof_shifting_state)
1727 (insert_accepting_state, augment_automaton): Remove, since now
1728 these states are automatically computed from the initial state.
1729 (generate_states): Adjust.
1730 * src/print.c: When reporting a rule number to the user, substract
1731 1, so that the axiom rule is rule 0, and the first user rule is 1.
1732 * src/reduce.c: Likewise.
1733 * src/print_graph.c (print_core): For the time being, just as for
1734 the report, depend upon --trace-flags to dump the full set of
1735 items.
1736 * src/reader.c (readgram): Once the grammar read, insert the rule
1737 0: `$axiom: START-SYMBOL $'.
1738 * tests/set.at: Adjust: rule 0 is now displayed, and since the
1739 number of the states has changed (the final state is no longer
1740 necessarily the last), catch up.
1741
75142d45
AD
17422001-12-27 Akim Demaille <akim@epita.fr>
1743
1744 Try to make the use of the eoftoken valid. Given that its value
1745 is 0 which was also used as a sentinel in ritem, (i) make sure >= 0
1746 is used instead of > 0 where appropriate, (ii), depend upon nritems
1747 instead of the 0-sentinel.
1748
1749 * src/gram.h, src/gram.c (nritems): New.
1750 Expected to be duplication of nitems, but for the time being...
1751 * src/reader.c (packgram): Assert nritems and nitems are equal.
1752 * src/LR0.c (allocate_itemsets, new_itemsets): Adjust.
1753 * src/closure.c (print_closure, print_fderives): Likewise.
1754 * src/gram.c (ritem_print): Likewise.
1755 * src/print.c (print_core, print_grammar): Likewise.
1756 * src/print_graph.c: Likewise.
1757
b7c49edf
AD
17582001-12-27 Akim Demaille <akim@epita.fr>
1759
1760 * src/main.c (main): If there are complains after grammar
1761 reductions, then output the report anyway if requested, then die.
1762 * src/symtab.c (bucket_new): Initialize `value' to -1, not 0.
1763 * src/reader.c (eoftoken): New.
1764 (parse_token_decl): If the token being defined has value `0', it
1765 is the eoftoken.
1766 (packsymbols): No longer hack `tags' to insert `$' by hand.
1767 Be sure to preserve the value of the eoftoken.
1768 (reader): Make sure eoftoken is defined.
1769 Initialize nsyms to 0: now eoftoken is created just like the others.
1770 * src/print.c (print_grammar): Don't special case the eof token.
1771 * src/regression.at: Adjust: `$' has value 0, not -1, which was a
1772 lie anyway, albeit pleasant.
1773 * tests/calc.at: Exercise error messages with eoftoken.
1774 Change the grammar so that empty input is invalid.
1775 Adjust expectations.
1776 When yyungeting, be sure to use a valid yylloc: use last_yylloc.
1777
ec2da99f
AD
17782001-12-27 Akim Demaille <akim@epita.fr>
1779
1780 * configure.in: Check the protos of strchr ans strspn.
1781 Replace strchr if needed.
1782 * src/system.h: Provide the protos of strchr, strspn and memchr if
1783 missing.
1784 * lib/strchr.c: New.
1785 * src/reader.c (symbols_save): Use strchr.
1786
8adfa272
AD
17872001-12-27 Akim Demaille <akim@epita.fr>
1788
1789 * src/print.c, src/print_graph.c (escape): New.
1790 Use it to quote the TAGS outputs.
1791 * src/print_graph.c (print_state): Now errors are in red, and
1792 reductions in green.
1793 Prefer high to wide: output the state number on a line of its own.
1794
80dac38c
AD
17952001-12-27 Akim Demaille <akim@epita.fr>
1796
1797 * src/state.h, src/state.c (reductions_new): New.
1798 * src/LR0.c (set_state_table): Let all the states have a
1799 `reductions', even if reduced to 0.
1800 (save_reductions): Adjust.
1801 * src/lalr.c (initialize_LA, initialize_lookaheads): Adjust.
1802 * src/print.c (print_reductions, print_actions): Adjust.
1803 * src/output.c (action_row): Adjust.
1804
2cec70b9
AD
18052001-12-27 Akim Demaille <akim@epita.fr>
1806
1807 * src/state.h, src/state.c (errs_new, errs_dup): New.
1808 * src/LR0.c (set_state_table): Let all the states have an errs,
1809 even if reduced to 0.
1810 * src/print.c (print_errs, print_reductions): Adjust.
1811 * src/output.c (output_actions, action_row): Adjust.
1812 * src/conflicts.c (resolve_sr_conflict): Adjust.
1813
13ca549a
AD
18142001-12-27 Akim Demaille <akim@epita.fr>
1815
1816 * src/lalr.c (set_goto_map, initialize_F): Use SHIFT_SYMBOL.
1817
5092aba5
AD
18182001-12-27 Akim Demaille <akim@epita.fr>
1819
1820 * src/conflicts.c, src/conflicts.h (print_reductions): Move to...
1821 * src/print.c: here.
1822 (lookaheadset, shiftset): New, used as additional storage by
1823 print_reductions.
1824 (print_results): Adjust.
1825 (print_shifts, print_gotos, print_errs): New, extracted from...
1826 (print_actions): here.
1827 * src/print_graph.c (print_actions): Remove dead code.
1828
11e2beca
AD
18292001-12-27 Akim Demaille <akim@epita.fr>
1830
1831 * src/reader.c (copy_dollar, copy_at): Better checking of `n' in
1832 `$n' and `@n'.
1833
dac3c910
AD
18342001-12-27 Akim Demaille <akim@epita.fr>
1835
1836 * src/lalr.c (add_lookback_edge): Use state_t instead of ints.
1837 (build_relations): Adjust.
1838
d0b0fefa
AD
18392001-12-27 Akim Demaille <akim@epita.fr>
1840
1841 * src/lalr.c (set_goto_map): Remove a wrong but benign loop
1842 duplication.
1843
adc8c848
AD
18442001-12-27 Akim Demaille <akim@epita.fr>
1845
1846 * src/reader.c (packgram): Catch nitems overflows.
1847
14d293ac
AD
18482001-12-27 Akim Demaille <akim@epita.fr>
1849
1850 * src/files.c, src/files.h (guard_obstack): Remove.
1851 * src/output.c (output): Adjust.
1852 * src/reader.c (parse_braces): New, factoring...
1853 (copy_action, copy_guard): these two which are renamed as...
1854 (parse_action, parse_guard): these.
1855 As a voluntary consequence, using braces around guards is now
1856 mandatory.
1857
f499b062
AD
18582001-12-27 Akim Demaille <akim@epita.fr>
1859
1860 * src/gram.h (rule_t): `guard' and `guard_line' are new members.
1861 * src/reader.c (symbol_list): `guard' and `guard_line' are new
1862 members.
1863 (symbol_list_new): Adjust.
1864 (copy_action): action_line is the first line, not the last.
1865 (copy_guard): Just as for actions, store the `action' only, not
1866 the switch/case/break flesh.
1867 Don't parse the user action that might follow the guard, let...
1868 (readgram): do it, i.e., now, there can be an action after a
1869 guard.
1870 In other words the guard is just explicitly optional.
1871 (packgram): Adjust.
1872 * src/output.c (guards_output): New.
1873 (output_parser): Call it when needed.
1874 (output): Also free the guard and attrs obstacks.
1875 * src/files.c, src/files.h (obstack_save): Remove.
1876 (output_files): Remove.
1877 As a result, if one needs the former `.act' file, using an
1878 appropriate skeleton which requires actions and guards is now
1879 required.
1880 * src/main.c (main): Adjust.
1881 * tests/semantic.at: New.
1882 * tests/regression.at: Use `input.y' as input file name.
1883 Avoid 8+3 problems by requiring input.c when the test needs the
1884 parser.
1885
d945f5cd
AD
18862001-12-27 Akim Demaille <akim@epita.fr>
1887
1888 * src/reader.c (symbol_list_new): Be sure to initialize all the
1889 fields.
1890
d200e455
AD
18912001-12-27 Akim Demaille <akim@epita.fr>
1892
1893 All the hacks using a final pseudo state are now useless.
1894
1895 * src/LR0.c (set_state_table): state_table holds exactly nstates.
1896 * src/lalr.c (nLA): New.
1897 (initialize_LA, compute_lookaheads, initialize_lookaheads): Use it
1898 instead of lookaheadsp from the pseudo state (nstate + 1).
1899
f9507c28
AD
19002001-12-27 Akim Demaille <akim@epita.fr>
1901
1902 * src/output.c (action_row, token_actions): Use a state_t instead
1903 of a integer, and nlookaheads instead of the following state's
1904 lookaheadsp.
1905
065fbd27
AD
19062001-12-27 Akim Demaille <akim@epita.fr>
1907
1908 * src/conflicts.c (log_resolution, flush_shift)
1909 (resolve_sr_conflict, set_conflicts, solve_conflicts)
1910 (count_sr_conflicts, count_rr_conflicts, conflicts_output)
1911 (conflicts_print, print_reductions): Use a state_t instead of an
1912 integer when referring to a state.
1913 As much as possible, depend upon nlookaheads, instead of the
1914 `lookaheadsp' member of the following state (since lookaheads of
1915 successive states are successive, the difference between state n + 1
1916 and n served as the number of lookaheads for state n).
1917 * src/lalr.c (add_lookback_edge): Likewise.
1918 * src/print.c (print_core, print_actions, print_state)
1919 (print_results): Likewise.
1920 * src/print_graph.c (print_core, print_actions, print_state)
1921 (print_graph): Likewise.
1922 * src/conflicts.h: Adjust.
1923
1b177bd7
AD
19242001-12-27 Akim Demaille <akim@epita.fr>
1925
1926 * src/bison.hairy: Formatting/comment changes.
1927 ANSIfy.
1928 Remove `register' indications.
1929 Add plenty of `static'.
1930
7742ddeb
AD
19312001-12-27 Akim Demaille <akim@epita.fr>
1932
1933 * src/output.c (prepare): Drop the muscle `ntbase' which
1934 duplicates ntokens.
1935 * src/bison.simple: Formatting/comment changes.
1936 Use YYNTOKENS only, which is documented, but not YYNTBASE, which
1937 is an undocumented synonym.
1938
1fa14068
AD
19392001-12-22 Akim Demaille <akim@epita.fr>
1940
1941 * src/output.c (output_table_data): Change the prototype to use
1942 `int' for array ranges: some invocations do pass an int, not a
1943 short.
1944 Reported by Wayne Green.
1945
b9752825
AD
19462001-12-22 Akim Demaille <akim@epita.fr>
1947
1948 Some actions of web2c.y are improperly triggered.
1949 Reported by Mike Castle.
1950
1951 * src/lalr.c (traverse): s/F (i)[k] = F (j)[k]/F (j)[k] = F (i)[k]/.
1952 * tests/regression.at (Web2c): Rename as...
1953 (Web2c Report): this.
1954 (Web2c Actions): New.
1955
776209d6
AD
19562001-12-22 Akim Demaille <akim@epita.fr>
1957
1958 Reductions in web2c.y are improperly reported.
1959 Reported by Mike Castle.
1960
1961 * src/conflicts.c (print_reductions): Fix.
1962 * tests/regression.at (Web2c): New.
1963
275fc3ad
AD
19642001-12-18 Akim Demaille <akim@epita.fr>
1965
1966 Some host fail on `assert (!"foo")', which expands to
1967 ((!"foo") ? (void)0 : __assert("!"foo."", __FILE__, __LINE__))
1968 Reported by Nelson Beebee.
1969
1970 * src/output.c, src/vcg.c: Replace `assert (!"it succeeded")' with
1971 `#define it_succeeded 0' and `assert (it_succeeded)'.
1972
897668ee
MA
19732001-12-17 Marc Autret <autret_m@epita.fr>
1974
1975 * src/bison.simple: Don't hard code the skeleton line and filename.
1976 * src/output.c (output_parser): Rename 'line' as 'output_line'.
1977 New line counter 'skeleton_line' (skeleton-line muscle).
1978
ab3399e0
PE
19792001-12-17 Paul Eggert <eggert@twinsun.com>
1980
1981 * NEWS, doc/bison.texinfo, doc/bison.1, doc/bison.rnh: Document that
1982 YYDEBUG must be defined to a nonzero value.
1983
1984 * src/bison.simple (yytname): Do not assume that the user defines
1985 YYDEBUG to a properly parenthesized expression.
1986
3877f72b
AD
19872001-12-17 Akim Demaille <akim@epita.fr>
1988
1989 * src/state.h (state_t): Rename lookaheads as lookaheadsp.
1990 nlookaheads is a new member.
1991 Adjust all users.
1992 * src/lalr.h (nlookaheads): Remove this orphan declaration.
1993 * src/lalr.c (initialize_lookaheads): Set nlookaheads for each
1994 state.
776209d6 1995
331dbc1b
AD
19962001-12-17 Akim Demaille <akim@epita.fr>
1997
1998 * src/files.h, src/files.c (open_files, close_files): Remove.
1999 * src/main.c (main): Don't open/close files, nor invoke lex_free,
2000 let...
2001 * src/reader.c (reader): Do it.
776209d6 2002
be750e4c
AD
20032001-12-17 Akim Demaille <akim@epita.fr>
2004
2005 * src/conflicts.c (print_reductions): Formatting changes.
776209d6 2006
709ae8c6
AD
20072001-12-17 Akim Demaille <akim@epita.fr>
2008
2009 * src/conflicts.c (flush_shift): Also adjust lookaheadset.
2010 (flush_reduce): New.
2011 (resolve_sr_conflict): Adjust.
776209d6 2012
f87685c3
AD
20132001-12-17 Akim Demaille <akim@epita.fr>
2014
2015 * src/output.c (output_obstack): Be static and rename as...
2016 (format_obstack): this, to avoid any confusion with files.c's
2017 output_obstack.
2018 * src/reader.h (muscle_obstack): Move to...
2019 * src/output.h: here, since it's defined in output.c.
2020
837491d8
AD
20212001-12-17 Akim Demaille <akim@epita.fr>
2022
2023 * src/output.c (action_row, save_column, default_goto)
2024 (sort_actions, matching_state, pack_vector): Better variable
2025 locality.
2026
796d61fb
AD
20272001-12-17 Akim Demaille <akim@epita.fr>
2028
2029 * src/output.c: Various formatting changes.
776209d6 2030
64d15509
AD
20312001-12-17 Akim Demaille <akim@epita.fr>
2032
2033 * src/files.c (output_files): Free the output_obstack.
2034 * src/main.c (main): Call print and print_graph conditionally.
2035 * src/print.c (print): Work unconditionally.
2036 * src/print_graph.c (print_graph): Work unconditionally.
2037 * src/conflicts.c (log_resolution): Output only if verbose_flag.
2038
fbc8ecb7
MA
20392001-12-16 Marc Autret <autret_m@epita.fr>
2040
2041 * src/output.c (actions_output): Fix. When we use %no-lines,
2042 there is one less line per action.
2043
f0440388
MA
20442001-12-16 Marc Autret <autret_m@epita.fr>
2045
2046 * src/bison.simple: Remove a useless #line directive.
2047 s/#line %%line %%skeleton/#line %%line "%%parser-file-name"/'.
2048 * src/output.c (get_lines_number): New.
776209d6 2049 (output_parser): Adjust, now takes care about the lines of a
f0440388
MA
2050 output muscles.
2051 Fix line numbering.
2052 (actions_output): Computes the number of lines taken by actions.
2053 (output_master_parser): Insert new skeleton which is the name of
2054 the output parser file name.
2055
a79986b8
MA
20562001-12-15 Marc Autret <autret_m@epita.fr>
2057
2058 * src/bison.simple [YYERROR_VERBOSE]: Restore backward compatibility.
2059
4ec8e00f
MA
20602001-12-15 Marc Autret <autret_m@epita.fr>
2061
2062 * src/output.c (output_gram): Keep track of the hairy one.
2063
1a4648ff
AD
20642001-12-15 Akim Demaille <akim@epita.fr>
2065
2066 Make `make distcheck' work.
2067
2068 * lib/Makefile.am (INCLUDES): Add top_srcdir/intl, since hash uses
2069 system.h which uses libgettext.h.
2070
9c2c67e6
AD
20712001-12-15 Akim Demaille <akim@epita.fr>
2072
2073 * src/nullable.c (set_nullable): Useless rules must be skipped,
2074 otherwise, since we range over their symbols, we might look at a
2075 nonterminal which no longer ``exists'', i.e., it is not counted in
2076 `nvars', hence we overflow our arrays.
2077
93ede233
AD
20782001-12-15 Akim Demaille <akim@epita.fr>
2079
2080 The header can also be produced directly, without any obstack!
2081 Yahoo!
2082
2083 * src/files.c, src/files.h (defines_obstack): Remove.
2084 (compute_header_macro): Global.
2085 (defines_obstack_save): Remove.
2086 * src/reader.c (parse_union_decl): No longer output to
2087 defines_obstack: its content can be found in the `stype' muscle
2088 anyway.
2089 (output_token_translations): Merge into...
2090 (symbols_output): this.
2091 Rename as...
2092 (symbols_save): this.
2093 (reader): Adjust.
2094 * src/output.c (header_output): New.
2095 (output): Call it.
2096
2666f928
AD
20972001-12-15 Akim Demaille <akim@epita.fr>
2098
2099 * src/reader.c (parse_union_decl): Instead of handling two obstack
2100 simultaneously, use one to define the `stype' muscle, and use the
2101 value of the latter to fill defines_obstack.
2102 (copy_comment): Remove.
2103 (copy_comment2): Work for a single obstack.
2104 Rename as...
2105 (copy_comment): this.
2106
428046f8
AD
21072001-12-15 Akim Demaille <akim@epita.fr>
2108
2109 * src/lex.c, src/lex.h (xgetc): No longer static.
2110 * src/reader.c (parse_union_decl): Revamp.
2111
ea52d706
AD
21122001-12-15 Akim Demaille <akim@epita.fr>
2113
2114 Still making progress in separating Bison into (i) input, (ii)
2115 process, (iii) output: now we can directly output the parser file
2116 without using table_obstack at all.
2117
2118 * src/files.c, src/files.h (table_obstack): Bye bye.
2119 (parser_file_name): New.
2120 * src/files.c (compute_output_file_names): Compute it.
2121 * src/output.c (actions_output, output_parser)
2122 (output_master_parser): To a file instead of an obstack.
2123
3f96f4dc
AD
21242001-12-15 Akim Demaille <akim@epita.fr>
2125
2126 Attach actions to rules, instead of pre-outputting them to
2127 actions_obstack.
2128
2129 * src/gram.h (rule_t): action and action_line are new members.
2130 * src/reader.c (symbol_list): Likewise.
2131 (copy_action): Save the actions within the rule.
2132 (packgram): Save them in rule_table.
2133 * src/output.c (actions_output): New.
2134 (output_parser): Use it on `%%actions'.
2135 (output_rule_data): Don't free rule_table.
2136 (output): Do it.
2137 (prepare): Don't save the `action' muscle.
2138 * src/bison.simple: s/%%action/%%actions/.
2139
51576fb3
AD
21402001-12-15 Akim Demaille <akim@epita.fr>
2141
2142 * src/reader.c (copy_action): When --yacc, don't append a `;'
2143 to the user action: let it fail if lacking.
dee049eb 2144 Suggested by Arnold Robbins and Tom Tromey.
51576fb3 2145
2648a72d
AD
21462001-12-14 Akim Demaille <akim@epita.fr>
2147
2148 * src/lex.c (literalchar): Simply return the char you decoded, non
2149 longer mess around with obstacks and int pointers.
2150 Adjust all callers.
2151
92790e5b
AD
21522001-12-14 Akim Demaille <akim@epita.fr>
2153
2154 * src/lex.c (literalchar): Don't escape the special characters,
2155 just decode them, and keep them as char (before, eol was output as
2156 the 2 char string `\n' etc.).
2157 * src/output.c (output_rule_data): Use quotearg to output the
2158 token strings.
2159
927c1557
PE
21602001-12-13 Paul Eggert <eggert@twinsun.com>
2161
2162 * src/bison.simple (YYSIZE_T, YYSTACK_ALLOC, YYSTACK_FREE):
2163 Do not infringe on the global user namespace when using C++.
2164 (YYFPRINTF, YYSTDERR): New macros, needed for the above.
2165 All uses of `fprintf' and `stderr' changed.
2166
2167 * doc/bison.texinfo: Document YYFPRINTF, YYSTDERR.
2168
ed8e1f68
AD
21692001-12-13 Akim Demaille <akim@epita.fr>
2170
2171 The computation of nullable is broken: it doesn't handle empty
2172 RHS's properly.
2173
2174 * tests/torture.at (GNU AWK Grammar): New.
2175 * tests/sets.at (Nullable): New.
2176 * src/nullable.c (set_nullable): Instead of blindly looping over
2177 `ritems', loop over the rules, and then over their rhs's.
2178
2179 Work around Autotest bugs.
2180
2181 * src/warshall.c (bitmatrix_print): Don't use `+--+' as table
2182 frame, because Autotest understand lines starting with a `+' as
2183 traces from the shell. Then, they are not processed properly.
2184 Admittedly an Autotest bug, but we don't have time to wait for
2185 Autotest to catch up.
2186 * tests/regression.at (Broken Closure): Adjust to the new table
2187 frames.
2188 Move to...
2189 * tests/sets.at: here.
2190
cb581495
AD
21912001-12-13 Akim Demaille <akim@epita.fr>
2192
2193 * src/closure.c (closure): Use nrules instead of playing tricks
2194 with BITS_PER_WORD.
2195
2e729273
AD
21962001-12-13 Akim Demaille <akim@epita.fr>
2197
2198 * src/print.c (print_actions): Output the handling of `$' as the
2199 traces do: shifting the token EOF. Before EOF was treated as a
2200 nonterminal.
2201 * tests/regression.at: Adjust some tests.
2202 * src/print_graph.c (print_core): Complete the set of items via
2203 closure. The next-to-final and final states are still unsatisfying,
2204 but that's to be addressed elsewhere.
2205 No longer output the rule numbers, but do output the state number.
2206 A single loop for the shifts + gotos is enough, but picked a
2207 distinct color for each.
2208 (print_graph): Initialize and finalize closure.
2209
107f7dfb
AD
22102001-12-13 Akim Demaille <akim@epita.fr>
2211
2212 * src/reader.c (readgram): Remove dead code, an strip useless
2213 braces.
2214 (get_type): Remove, unused.
2215
9b53a24f
AD
22162001-12-12 Akim Demaille <akim@epita.fr>
2217
2218 * src/complain.h, src/complain.c: Remove error_one_per_line, rely
2219 on that of lib/error.c.
2220
dbfb6dcd
AD
22212001-12-12 Akim Demaille <akim@epita.fr>
2222
2223 Some hosts don't like `/' in includes.
2224
2225 * src/system.h: Include libgettext.h without qualifying the path.
2226 * src/Makefile.am (INCLUDES): Add $(top_srcdir)/intl, remove
2227 $(top_srcdir).
2228
c25fb648
MA
22292001-12-11 Marc Autret <autret_m@epita.fr>
2230
2231 * src/output.c (output_parser): Remove useless muscle.
2232
710ddc4f
MA
22332001-12-11 Marc Autret <autret_m@epita.fr>
2234
2235 * src/bison.simple: Remove #line just before %%epilogue. It
2236 is now handled in ...
2237 * src/reader.c (read_additionnal_code): Add the output of a
2238 #line for the epilogue.
2239
e83d80b8
MA
22402001-12-10 Marc Autret <autret_m@epita.fr>
2241
927c1557 2242 * src/reader.c (copy_definition): Re-use CPP-outed code which
e83d80b8
MA
2243 replace precedent remove.
2244 * src/bison.simple: Remove #line before %%prologue because
2245 %%input-line is wrong at this time.
2246
971d5158
MA
22472001-12-10 Marc Autret <autret_m@epita.fr>
2248
2249 * src/reader.c (symbols_output): Clean up.
927c1557 2250 * src/output.c (output_gram, output): Clean up.
971d5158 2251
5edafffd
AD
22522001-12-10 Akim Demaille <akim@epita.fr>
2253
2254 * src/lalr.c (initialize_lookaheads): New. Extracted from...
2255 * src/LR0.c (set_state_table): here.
2256 * src/lalr.c (lalr): Call it.
2257
0279f8e9
AD
22582001-12-10 Akim Demaille <akim@epita.fr>
2259
2260 * src/state.h (shifts): Remove the `number' member: shifts are
2261 attached to state, hence no longer need to be labelled with a
2262 state number.
2263
190c4f5f
AD
22642001-12-10 Akim Demaille <akim@epita.fr>
2265
2266 Now that states have a complete set of members, the linked list of
2267 shifts is useless: just fill directly the state's shifts member.
2268
2269 * src/state.h (shifts): Remove the `next' member.
2270 * src/LR0.c (first_state, last_state): Remove.
2271 Adjust the callers.
2272 (augment_automaton): Don't look for the shifts that must be added
2273 a shift on EOF: it is those of the state we looked for! But now,
2274 since shifts are attached, it is no longer needed to looking
2275 merely by its id: its number.
2276
2a73b93d
AD
22772001-12-10 Akim Demaille <akim@epita.fr>
2278
2279 * src/LR0.c (augment_automaton): Better variable locality.
2280 Remove an impossible branch: if there is a state corresponding to
2281 the start symbol being shifted, then there is shift for the start
2282 symbol from the initial state.
2283
74392f6a
AD
22842001-12-10 Akim Demaille <akim@epita.fr>
2285
2286 * src/LR0.c (augment_automaton): Call `insert_eof_shifting_state'
2287 only when appropriate: when insert_start_shifting_state' is not
2288 invoked.
2289 * tests/regression.at (Rule Line Numbers): Adjust.
2290
37c82725
AD
22912001-12-10 Akim Demaille <akim@epita.fr>
2292
2293 * src/LR0.c (augment_automaton): Now that all states have shifts,
2294 merge the two cases addition shifts to the initial state.
2295
6a164e0c
AD
22962001-12-10 Akim Demaille <akim@epita.fr>
2297
2298 * src/lalr.c (set_state_table): Move to...
2299 * src/LR0.c: here.
2300 * src/lalr.c (lalr): Don't call it...
2301 * src/LR0.c (generate_states): do it.
2302 * src/LR0.h (first_state): Remove, only the table is used.
2303
7215de24
AD
23042001-12-10 Akim Demaille <akim@epita.fr>
2305
2306 * src/LR0.h (first_shift, first_reduction): Remove.
2307 * src/lalr.c: Don't use first_shift: find shifts through the
2308 states.
2309
80e25d4d
AD
23102001-12-10 Akim Demaille <akim@epita.fr>
2311
2312 * src/LR0.c: Attach shifts to states as soon as they are
2313 computed.
2314 * src/lalr.c (set_state_table): Instead of assigning shifts to
2315 state, just assert that the mapping was properly done.
2316
0ab3728b
AD
23172001-12-10 Akim Demaille <akim@epita.fr>
2318
2319 * src/LR0.c (insert_start_shift): Rename as...
2320 (insert_start_shifting_state): this.
2321 (insert_eof_shifting_state, insert_accepting_state): New.
2322 (augment_automaton): Adjust.
2323 Better locality of the variables.
2324 When looking if the start_symbol is shifted from the initial
2325 state, using `while (... symbol != start_symbol ...)' sounds
2326 better than `while (... symbol < start_symbol ...)': If fail
2327 to see how the order between symbols could be relevant!
2328
78af9bbc
AD
23292001-12-10 Akim Demaille <akim@epita.fr>
2330
2331 * src/getargs.h: Don't declare `spec_name_prefix' and
2332 `spec_file_prefix', declared by src/files.h.
2333 * src/files.c, src/files.h: Default for spec_name_prefix is "yy".
2334 * src/muscle_tab.c (muscle_init): Default prefix to NULL.
2335 * src/output.c (prepare): Adjust.
2336 * src/reader.c (symbols_output): Likewise.
2337 * src/vmsgetargs.c: Vaguely adjust, but who cares?
2338
bdef2a41
AD
23392001-12-10 Akim Demaille <akim@epita.fr>
2340
2341 * src/muscle_tab.c (muscle_init): NULL is a better default than
2342 `"0"'.
2343
3735969c
AD
23442001-12-10 Akim Demaille <akim@epita.fr>
2345
2346 * src/reader.c (reader): Calling symbols_output once is enough.
2347
49701457
AD
23482001-12-10 Akim Demaille <akim@epita.fr>
2349
2350 Now that states have a complete set of members, the linked list of
2351 reductions is useless: just fill directly the state's reductions
2352 member.
2353
2354 * src/state.h (struct reductions): Remove member `number' and
2355 `next'.
2356 * src/LR0.c (first_reduction, last_reduction): Remove.
2357 (save_reductions): Don't link the new reductions, store them in
2358 this_state.
2359 * src/lalr.c (set_state_table): No need to attach reductions to
2360 states, it's already done.
2361 * src/output.c (output_actions): No longer free the shifts, then
2362 the reductions, then the states: free all the states and their
2363 members.
2364
0edad749
AD
23652001-12-10 Akim Demaille <akim@epita.fr>
2366
2367 * src/options.c (OPTN, DRTV, BOTH): New.
2368 (option_table): Use them.
2369
0edad749
AD
2370 * src/muscle_tab.c: Don't include xalloc.h and string.h: that's
2371 the job of system.h.
2372 * src/options.c: Don't include stdio.h and xalloc.h for the same
2373 reasons.
2374
5449dd0f
AD
23752001-12-10 Akim Demaille <akim@epita.fr>
2376
2377 * src/output.c (output, prepare): Make sure the values of the
2378 muscles `action' and `prologue' are 0-terminated.
2379
a870c567
AD
23802001-12-10 Akim Demaille <akim@epita.fr>
2381
2382 Clean up GCC warnings.
2383
2384 * src/reader.c (copy_action): `buf' is not used.
2385 (parse_skel_decl): Be static.
2386 * src/muscle_tab.c (mhash1, mhash2, muscle_insert): Preserve `const'.
2387 * src/options.h (create_long_option_table): Have a real prototype.
2388 * lib/hash.c, lib/hash.h (hash_insert, hash_insert_at, hash_delete)
2389 (hash_delete_at): Return const void *.
2390 Adjust casts to preserve the const.
2391
80df8768
AD
23922001-12-10 Akim Demaille <akim@epita.fr>
2393
2394 * configure.in: Require 2.52g.
2395 M4 is not needed, but AUTOM4TE is.
2396 * m4/m4.m4: Remove.
2397 * tests/Makefile.am: Adjust.
2398
f693ad14
AD
23992001-12-10 Akim Demaille <akim@epita.fr>
2400
2401 One structure for states is enough, even though theoretically
2402 there are LR(0) states and LALR(1) states.
2403
2404 * src/lalr.h (state_t): Remove.
2405 (state_table): Be state_t **, not state_t *.
2406 * src/state.h (core, CORE_ALLOC): Rename as...
2407 (state_t, STATE_ALLOC): this.
2408 Add the LALR(1) members: shifts, reductions, errs.
2409 * src/LR0.c (state_table): Rename as...
2410 (state_hash): this, to avoid name clashes with the global
2411 `state_table'.
2412 * src/print_graph.c, src/LR0.c, src/LR0.h, src/conflicts.c
2413 * src/lalr.c, src/lalr.h, src/output.c, src/print.c: Adjust.
2414
74ffbcb6
AD
24152001-12-10 Akim Demaille <akim@epita.fr>
2416
2417 Bison dumps core on bash.y.
2418 Reported by Pascal Bart.
2419
2420 * src/warshall.c (bitmatrix_print): New.
2421 (TC): Use it.
2422 When performing a transitive closure R(i, j) && R(j, k) => R(i, k),
2423 j must be the outer loop.
2424 * tests/regression.at (Broken Closure): New.
2425
07708e19
AD
24262001-12-05 Akim Demaille <akim@epita.fr>
2427
2428 * tests/atlocal.in (CPPFLAGS): Do not leave a space between -I and
2429 its argument.
2430