]> git.saurik.com Git - bison.git/blame - ChangeLog
(YYLLOC_DEFAULT): Use GNU spacing conventions.
[bison.git] / ChangeLog
CommitLineData
9bec482e
PE
12004-12-19 Paul Eggert <eggert@cs.ucla.edu>
2
3 * data/glr.c (YYLLOC_DEFAULT): Use GNU spacing conventions.
4 * data/yacc.c (YYLLOC_DEFAULT): Likewise.
5
f6fbd3da
PE
62004-12-17 Paul Eggert <eggert@cs.ucla.edu>
7
8 Remove uses of 'short int' and 'unsigned short int'. This raises
9 some arbitrary limits. It uses more memory but nowadays that's
10 not much of an issue.
11
12 This change does not affect the generated parsers; that's a different
13 task, as some users will want to conserve memory there.
14
15 Ideally we should use size_t to represent all object counts, and
16 something like ptrdiff_t to represent signed differences of object
17 counts; but that will require more code-cleanup than I have the
18 time to do right now.
19
20 * src/LR0.c (allocate_itemsets, new_itemsets, save_reductions):
21 Use size_t, not int or short int, to count objects.
22 * src/closure.c (nritemset, closure): Likewise.
23 * src/closure.h (nritemset, closure): Likewise.
24 * src/nullable.c (nullable_compute): Likewise.
25 * src/print.c (print_core): Likewise.
26 * src/print_graph.c (print_core): Likewise.
27 * src/state.c (state_compare, state_hash): Likewise.
28 * src/state.h (struct state): Likewise.
29 * src/tables.c (default_goto, goto_actions): Likewise.
30
31 * src/gram.h (rule_number, rule): Use int, not short int.
32 * src/output.c (prepare_rules): Likewise.
33 * src/state.h (state_number, STATE_NUMBER_MAXIMUM, transitions,
34 errs, reductions): Likewise.
35 * src/symtab.h (symbol_number, SYMBOL_NUMBER_MAXIMUM, struct symbol):
36 Likewise.
37 * src/tables.c (vector_number, tally, action_number,
38 ACTION_NUMBER_MINIMUM): Likewise.
39 * src/output.c (muscle_insert_short_int_table): Remove.
40
efeed023
AD
412004-12-17 Akim Demaille <akim@epita.fr>
42
43 * data/lalr1.cc: Extensive Doxygenation.
44 (error_): Rename as...
45 (error): this, since it is visible to the user.
46 Adjust callers.
47 (Parser::message): Now an automatic variable from...
48 (Parser::yyreport_syntax_error_): here.
49 * tests/actions.at, tests/calc.at, tests/regression.at: Adjust to
50 Parser::error.
51 * tests/input.at: Escape $.
52
bc82c5a5
PE
532004-12-16 Paul Eggert <eggert@cs.ucla.edu>
54
55 * data/glr.c (b4_lhs_value, b4_rhs_value, b4_rhs-location):
56 Parenthesize rhs to avoid obscure problems with mistakes like
57 "foo$$bar = foo$1bar;". Problem reported by twlevo at xs4all.
58 * data/lalr1.cc (b4_lhs_value, b4_rhs_value, b4_lhs_location,
59 b4_rhs_location): Likewise.
60 * data/yacc.c (b4_lhs_value, b4_rhs_value, b4_lhs_location,
61 b4_rhs_location): Likewise.
62
fd19f271
AD
632004-12-16 Akim Demaille <akim@epita.fr>
64
65 * data/lalr1.cc (yyreport_syntax_error_): Catch up with glr.c and
66 yacc.c: be sure to stay within yycheck_.
67 * tests/actions.at: Re-enable C++ tests.
68
10454ea4
AD
692004-12-16 Akim Demaille <akim@epita.fr>
70
71 * src/print_graph.c (print_graph): Remove layoutalgorithm uses for
72 real.
73
c5b95ccf
AD
742004-12-16 Akim Demaille <akim@epita.fr>
75
76 Use #define to handle the %name-prefix.
77
78 * data/glr.c, data/yacc.c: Comment changes.
79 * data/lalr1.cc (yylex): Use #define to select the name of yylex,
80 so that one can refer to yylex in the parser file, and have it
81 renamed, as is the case with other skeletons.
82
617a8f12
AD
832004-12-16 Akim Demaille <akim@epita.fr>
84
85 Move lalr1.cc internals into yy*.
86
87 * data/lalr1.cc (semantic_stack_, location_stack_, state_stack_)
88 (semantic_stack_, location_stack_, pact_, pact_ninf_, defact_)
89 (pgoto_, defgoto_, table_, table_ninf_, check_, stos_, r1_, r2_)
90 (name_, rhs_, prhs_, rline_, token_number_, eof_, last_, nnts_)
91 (empty_, final_, terror_, errcode_, ntokens_)
92 (user_token_number_max_, undef_token_, n_, len_, state_, nerrs_)
93 (looka_, ilooka_, error_range_, nerrs_):
94 Rename as...
95 (yysemantic_stack_, yylocation_stack_, yystate_stack_)
96 (yysemantic_stack_, yylocation_stack_, yypact_, yypact_ninf_)
97 (yydefact_, yypgoto_, yydefgoto_, yytable_, yytable_ninf_)
98 (yycheck_, yystos_, yyr1_, yyr2_, yyname_, yyrhs_, yyprhs_)
99 (yyrline_, yytoken_number_, yyeof_, yylast_, yynnts_, yyempty_)
100 (yyfinal_, yyterror_, yyerrcode_, yyntokens_)
101 (yyuser_token_number_max_, yyundef_token_, yyn_, yylen_, yystate_)
102 (yynerrs_, yylooka_, yyilooka_, yyerror_range_, yynerrs_):
103 these.
104
1e547e6e
PE
1052004-12-15 Paul Eggert <eggert@cs.ucla.edu>
106
107 Fix some problems reported by twlevo at xs4all.
108 * src/symtab.c (symbol_new): Report an error if the input grammar
109 contains too many symbols. This is better than calling abort() later.
110 * src/vcg.h (enum layoutalgorithm): Remove. All uses removed.
111 (struct node, struct graph):
112 Rename member expand to stretch. All uses changed.
113 (struct graph): Remove member layoutalgorithm. All uses removed.
114 * src/vcg.c (get_layoutalgorithm_str): Remove. All uses removed.
115 * src/vcg_defaults.h (G_STRETCH): Renamed from G_EXPAND.
116 All uses changed.
117 (N_STRETCH): Rename from N_EXPAND. All uses changed.
118
735d6bd4
AD
1192004-12-15 Akim Demaille <akim@epita.fr>
120
121 * data/lalr1.cc: Normalize /** \brief ... */ to ///.
122 Add more Doxygen comments.
123 (symprint_, stack_print_, reduce_print_, destruct_, pop)
124 (report_syntax_error_, translate_): Rename as...
125 (yysymprint_, yystack_print_, yyreduce_print_, yydestruct_)
126 (yypop_, yyreport_syntax_error_, yytranslate_): this.
127
2e1f5829
AD
1282004-12-15 Akim Demaille <akim@epita.fr>
129
130 * data/lalr1.cc (lex_): Rename as...
131 (yylex_): this.
132 Move the trace here.
133 Take the %name-prefix into account.
134 Reported by Alexandre Duret-Lutz.
135
a3cb6248
AD
1362004-12-15 Akim Demaille <akim@epita.fr>
137
138 Simplify the C++ parser constructor.
139
140 * data/lalr1.cc (debug_): Rename as...
141 (yydebug_): so that the parser's internals are always in the yy*
142 pseudo namespace.
143 Adjust uses.
144 (b4_parse_param_decl): Remove the leading comma as it is now only
145 called as unique argument list.
146 (Parser::Parser): Remove the constructor accepting a location and
147 an initial debugging level.
148 Remove from the other ctor the argument for the debugging level.
149 (debug_level_type, debug_level, set_debug_level): New.
150
151 * tests/actions.at, tests/calc.at, tests/regression.at: Adjust
152 constructor calls.
153
07fed891
AD
1542004-12-15 Akim Demaille <akim@epita.fr>
155
156 Remove b4_root related material: failure experiment
a3cb6248 157 (which goal was to allow to derive from a class).
07fed891
AD
158
159 * data/lalr1.cc (b4_root, b4_param, b4_constructor): Remove
160 definitions and uses.
161
e603eaa5
PE
1622004-12-14 Paul Eggert <eggert@cs.ucla.edu>
163
164 * data/glr.c (struct yyGLRStack): yyerror_range now has 3 items,
165 not 2, since it's not portable to subtract 1 from the start of an
166 array. The new item 0 is never set or used. All uses changed.
167
168 (yyrecoverSyntaxError): Use YYLLOC_DEFAULT instead of assuming
169 the default definition of YYLLOC_DEFAULT. Problem reported
170 by Frank Heckenbach.
171
fafb007d
PE
1722004-12-12 Paul Eggert <eggert@cs.ucla.edu>
173
174 * data/glr.c (YYRHSLOC): Don't have two definitions, one for
175 the normal case and one for the error case. Just use the
176 first one uniformly. Problem reported by Frank Heckenbach.
177 (YYLLOC_DEFAULT): Use the conventions of yacc.c, so we can
178 use exactly the same macro in both places.
179 (yyerror_range): Now of type yyGLRStackItem, not YYLTYPE,
180 so that the normal-case YYRHSLOC works for the error case too.
181 All uses changed.
182 * data/yacc.c (YYRHSLOC): New macro, taken from glr.c.
183 (YYLLOC_DEFAULT): Use the same macro as glr.c.
184 * doc/bison.texinfo (Location Default Action): Don't claim that
185 we have an array of locations. Use the same macro for both glr
186 and lalr parsers. Mention YYRHSLOC. Mention what happens when
187 the index is 0.
188
48814dcd
PE
1892004-12-10 Paul Eggert <eggert@cs.ucla.edu>
190
a4e1a53b
PE
191 * HACKING: Update email addresses to send announcements to.
192
48814dcd
PE
193 * configure.ac (AC_INIT): Bump version to 1.875f.
194
337116ba
PE
1952004-12-10 Paul Eggert <eggert@cs.ucla.edu>
196
197 * NEWS: Version 1.875e.
198 * src/parse-gram.c, src/parse-gram.h: Regenerate with 1.875e.
199
200 * src/scan-skel.l: Include "complain.h", for "fatal".
201
202 * src/relation.h (relation_print, relation_digraph):
203 Relation sizes are of type relation_node, not size_t (this is
204 merely a doc fix, since the two types are equivalent).
205 (relation_transpose): Relation sizes are of type relation_node,
206 not int.
207 * src/relation.c: Likewise.
208 (top, infinity): Now of type relation_node, not int.
209 (traverse, relation_transpose): Use relation_node, not int.
210
211 * data/glr.c (yyuserAction, yyrecoverSyntaxError): Mark args
212 with ATTRIBUTE_UNUSED if they're not used, to avoid GCC warning.
213 (yyparse): Remove unused local introduced in 2004-10-25 patch.
214
215 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): New arg
68b082af 216 specifying whether the test should be skipped. Use it tp
337116ba 217 specify that the [%defines %skeleton "lalr1.cc"] tests currently
68b082af 218 fail on some hosts, and should be skipped.
337116ba 219
da2a7671
PE
2202004-12-08 Paul Eggert <eggert@cs.ucla.edu>
221
222 * src/system.h (CALLOC, MALLOC, REALLOC): Remove. All callers
223 changed to use xcalloc, xnmalloc, xnrealloc, respectively,
224 unless otherwise specified below.
225
226 * src/LR0.c (allocate_itemsets): Use xnmalloc, not xcalloc,
227 to allocate kernel_base, kernel_items, kernel_size, since
228 they needn't be initialized to 0.
229 (allocate_storgae): Likewise, for shiftset, redset, shift_symbol.
230 * src/closure.c (new_closure): Likewise, for itemset.
231 * src/derives.c (derives_compute): Likewise, for delts, derives, q.
232 * src/lalr.c (set_goto_map): Likewise, for temp_map.
233 (initialize_F): Likewise, for reads, edge, reads[i], includes[i].
234 (build_relations): Likewise for edge, states1, includes.
235 * src/nullable.c (nullable_compute): Likewise, for squeue, relts.
236 * src/reader.c (packgram): Likewise, for ritem, rules.
237 * src/reduce.c (nonterminals_reduce): Likewise for nontermmap.
238 * src/relation.c (relation_digraph): Likewise for VERTICES.
239 (relation_transpose): Likewise for new_R, end_R.
240 * src/symtab.c (symbols_token_translations_init): Likewise for
241 token_translations.
242 * src/tables.c (save_row): Likewise for froms, tos, conflict_tos.
243 (token_actions): Likewise for yydefact, actrow, conflrow,
244 conflict_list.
245 (save_column): Likewise for froms[symno], tos[symno].
246 (goto_actions): Likewise for state_count.
247 (pack_table): Likewise for base, pos, check.
248 (tables_generate): Likewise for width.
249
250 * src/LR0.c (set_states): Don't reuse kernel_size and kernel_base
251 for initial core. Just have a separate core, so we needn't worry
252 about whether kernel_size and kernel_base are initialized.
253
254 * src/LR0.c (shift_symbol, redset, shiftset, kernel_base,
255 kernel_size, kernel_items): Remove unnecessary initialization.
256 * src/conflicts.c (conflicts): Likewise.
257 * src/derives.c (derives): Likewise.
258 * src/muscle_tablc (muscle_insert): Likewise.
259 * src/relation.c (relation_digraph): Likewise.
260 * src/tables.c (froms, tos, conflict_tos, tally, width, actrow, order,
261 conflrow, conflict_table, conflict_list, table, check):
262 Likewise.
263
264 * src/closure.c (new_closure): Arg is of type unsigned int, not int.
265 This is because all callers pass unsigned int.
266 * src/closure.h (new_closure): Likewise.
267
268 * src/lalr.c (initialize_F): Initialize reads[i] in all cases.
269 (build_relations): Initialize includes[i] in all cases.
270 * src/reader.c (packgram): Always initialize rules[ruleno].prec
271 and rules[ruleno].precsym. Initialize members in order.
272 * src/relation.c (relation_transpose): Always initialize new_R[i]
273 and end_R[i].
274 * src/table.c (conflict_row): Initialize 0 at end of conflict_list.
275
276 * src/output.c (prepare_actions): Pass 0 instead of conflict_list[0];
277 conflict_list[0] was always 0, but now it isn't initialized.
278
279 * src/table.c (table_grow): When conflict_table grew, the grown
280 area wasn't cleared. Fix this.
281
282 * lib/.cvsignore: Add strdup.c, strdup.h.
283 * m4/.cvsignore: Add strdup.m4.
284
00baeeac
PE
2852004-12-07 Paul Eggert <eggert@cs.ucla.edu>
286
287 * src/lalr.h (GOTO_NUMBER_MAXIMUM): New macro.
288 * src/lalr.c (set_goto_map): Don't allow ngotos to equal
289 GOTO_NUMBER_MAXIMUM, since we occasionally compute
290 ngotos + 1 without checking for overflow.
291 (build_relations): Use END_NODE, not -1, to denote end of edges.
292 * src/lalr.c (set_goto_map, map_goto, initialize_F, add_loopback_edge,
293 build_relations): Use goto_number, not int, for goto numbers.
294 * src/tables.c (save_column, default_goto): Likewise.
295
be3d9d42
AD
2962004-11-23 Akim Demaille <akim@epita.fr>
297
298 * data/lalr1.cc (YYSTYPE): Define it as is done for C, instead
299 of #defining from yystype.
300 Don't typedef yystype, C++ does not need it.
301 This lets it possible to forward declare it as union.
302
78e526d5
PE
3032004-11-23 Paul Eggert <eggert@cs.ucla.edu>
304
305 * bootstrap (gnulib_modules): Add extensions.
306 Problem reported by Jim Meyering.
307
afbb696d
PE
3082004-11-22 Paul Eggert <eggert@cs.ucla.edu>
309
310 * src/LR0.c, src/closure.c, src/derives.c, src/gram.c,
311 src/lalr.c, src/nullable.c, src/relation.c, src/scan-skel.l,
312 src/system.h, src/tables.c: XFREE -> free, to accommodate
313 recent change to gnulib xalloc.h.
78e526d5 314 Problem reported by Jim Meyering.
afbb696d 315
c1f8f16a
AD
3162004-11-17 Akim Demaille <akim@epita.fr>
317
318 * data/lalr1.cc (symprint_): Use cdebug_ to avoid warnings.
319
3202004-10-28 Akim Demaille <akim@epita.fr>,
9a1e9989
AD
321 Alexandre Duret-Lutz <adl@gnu.org>
322
323 * data/lalr1.cc (Parser::yycdebug_): New, a pointer, to allow
324 changes.
325 (YYCDEBUG): Adjust.
326 Use it instead of cdebug_.
327 (Parser::debug_stream, Parser::set_debug_stream): New.
328 (Parser::symprint_): Define cdebug_ for temporary backward
329 compatibility.
330 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Use
331 debug_stream ().
332
68e11668
AD
3332004-11-17 Akim Demaille <akim@epita.fr>
334
335 * data/lalr1.cc (Parser:print_): Remove, use %printer instead.
336 * tests/regression.at (_AT_DATA_DANCER_Y): Adjust.
337 * tests/calc.at (_AT_DATA_CALC_Y): Ditto.
338 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise.
339
97cbc73e
PE
3402004-10-27 Paul Eggert <eggert@cs.ucla.edu>
341
342 * data/glr.c (yyloc_default): Remove; not used.
343 Problem reported by Frank Heckenbach.
344
e342c3be
AD
3452004-10-25 Akim Demaille <akim@epita.fr>
346
347 * data/glr.c (YYRHSLOC): Move its definition next to its uses.
348 Introduce another definition to address simple location arrays.
349 (yyGLRStack): New member: yyerror_range.
350 (yyrecoverSyntaxError, yyparse): Update it.
351 (yyrecoverSyntaxError): Use it when shifting the error token to
352 have an accurate range, equivalent to the one computed by both
353 yacc.c and lalr1.cc.
354 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Change its yylex so
355 that column numbers start at column 0, as per GNU Coding
356 Standards, the others tests, and the doc.
357 (_AT_RESOLVED_GLR_OUTPUT_WITH_LOC, _AT_AMBIG_GLR_OUTPUT_WITH_LOC):
358 Adjust to the above change (first column is 0).
359 And adjust the location of the "<error>", now covering the whole
360 line.
361
93602feb
PE
3622004-10-22 Akim Demaille <akim@epita.fr>
363 and Paul Eggert <eggert@cs.ucla.edu>
364
365 Remove some arbitrary limits on goto numbers and relations.
366 * src/lalr.c (goto_map, ngotos, from_state, to_state): Omit
367 initial values, since they're never used.
368 (set_goto_map): ngotos is now unsigned, so test for overflow
369 by seeing whether it wraps around to zero.
370 * src/lalr.h (goto_number): Now size_t, not short int.
371 (GOTO_NUMBER_MAXIMUM): Remove.
372 * src/relation.c (relation_print, traverse, relation_transpose):
373 Check for END_NODE rather than looking at sign.
374 * src/relation.h (END_NODE): New macro.
375 (relation_node): Now size_t, not short int.
376
dba08b04
PE
3772004-10-22 Paul Eggert <eggert@cs.ucla.edu>
378
379 * doc/bison.texinfo (Language and Grammar): In example, "int" is a
380 keyword, not an identifier. Problem reported by Baron Schwartz in
381 <http://lists.gnu.org/archive/html/bug-bison/2004-10/msg00017.html>.
382
df09ef2e
AD
3832004-10-11 Akim Demaille <akim@epita.fr>
384
385 * src/symtab.c (symbol_check_alias_consistency): Also check
386 type names, destructors, and printers.
387 Reported by Alexandre Duret-Lutz.
388 Recode the handling of associativity and precedence in terms
389 of symbol_precedence_set.
390 Accept no redeclaration at all, not even equal to the previous
391 value.
392 (redeclaration): New.
393 Use it to factor redeclaration complaints.
394 (symbol_make_alias): Don't set the type of the alias, let
395 symbol_check_alias_consistency do it as for other features.
396 * src/symtab.h (symbol): Add new member prec_location, and
397 type_location.
398 * src/symtab.c (symbol_precedence_set, symbol_type_set): Set them.
399 * tests/input.at (Incompatible Aliases): New.
400
146bc99d
PE
4012004-10-09 Paul Eggert <eggert@cs.ucla.edu>
402
403 .cvsignore fixes to accommodate gnulib changes,
404 and the practice of naming build directories "_build".
405 * .cvsignore: Add "_*". Sort.
406 * lib/.cvsignore: Add getopt_.h, xalloc-die.c.
407 * m4/.cvsignore: Add "*_gl.m4".
408
e503aa60
AD
4092004-10-06 Akim Demaille <akim@epita.fr>
410
411 * src/parse-gram.y (add_param): Fix the truncation of trailing
412 spaces.
413
b4a20338
AD
4142004-10-05 Akim Demaille <akim@epita.fr>
415
416 In Bison 1.875's yacc.c, YYLLOC_DEFAULT was called regardless
417 whether the reducion was empty or not. This leaves room to
418 improve the use of YYLLOC_DEFAULT in such a case.
419 lalr1.cc is still experimental, so changing this is acceptable.
420 And finally, there are probably not many users who changed the
421 handling of locations in GLR, so changing is admissible too.
422
423 * data/glr.c, data/lalr1.cc, data/yacc.c (YYLLOC_DEFAULT): On an
424 empty reduction, set @$ to an empty location ending the previously
425 stacked symbol.
426 Adjust uses to make sure the code is triggered on empty
427 reductions.
428 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust the
429 expected output: empty reductions have empty locations.
430
f85a5e6f
AD
4312004-09-29 Akim Demaille <akim@epita.fr>
432
433 * data/lalr1.cc: Move towards a more standard C++ coding style
434 for templates: Class < T > -> Class<T>.
435
b203fc2c
AD
4362004-09-29 Akim Demaille <akim@epita.fr>
437
438 * data/lalr1.cc: Reinstall the former ctor, for sake of
439 compatibility, but warn it will be removed.
440 Move towards a more standard C++ coding style (i.e., type *var ->
441 type* var).
442
5b7e1e73
PE
4432004-09-27 Paul Eggert <eggert@cs.ucla.edu>
444
3fee967f
PE
445 * src/parse-gram.y (add_param): Rewrite to avoid strchr,
446 since it's less likely to work if NULs are involved in the future.
5b7e1e73 447
0dcca5c2
AD
4482004-09-27 Akim Demaille <akim@epita.fr>
449
450 * data/yacc.c (YY_LOCATION_PRINT): Fix its default declaration.
451
6dde1c82
AD
4522004-09-27 Akim Demaille <akim@epita.fr>
453
454 * data/lalr1.cc (b4_parse_param_decl_1): New.
b203fc2c 455 (b4_parse_param_decl): Use it to have different names between attribute
6dde1c82
AD
456 and argument names.
457 (b4_cc_constructor_call): Likewise.
458
b233d555
AD
4592004-09-24 Akim Demaille <akim@epita.fr>
460
461 * src/parse-gram.y (add_param): Strip the leading and trailing
462 blanks from a formal argument declaration.
463 (YY_LOCATION_PRINT): New.
464
619404e3
AD
4652004-09-24 Akim Demaille <akim@epita.fr>
466
467 * data/c.m4 (b4_yysymprint_generate): Move the YYINPUT invocation
468 after the location.
469
dd8d9022
AD
4702004-09-24 Akim Demaille <akim@epita.fr>
471
472 * doc/bison.texinfo (Table of Symbols): Sort.
473
0092f063
AD
4742004-09-21 Akim Demaille <akim@epita.fr>
475
476 * data/yacc.c, data/glr.c (b4_at_dollar, b4_dollar_dollar): Remove
477 the useless parentheses.
478 Suggested by Paul Eggert.
479
451364ed
AD
4802004-09-20 Akim Demaille <akim@epita.fr>
481
482 Let the initial-action act on the look-ahead, and use it for the
483 "initial push" (corresponding to an hypothetical beginning-of-file).
484 And let lalr1.cc honor %initial-action.
485
486 * doc/bison.texinfo (Initial Action Decl): Clarify, and add an
487 example.
488 * data/lalr1.cc (Parser::initlocation_): Remove, bad experiment.
489 (Parser::Parser): Remove the ctor that used to initialize it.
490 (Parser::parse): Like in the other skeletons, issue the "starting
491 parse" message before any action.
492 Honor %initial-action.
493 Initialize the stacks with the lookahead.
494 * data/yacc.c: Let $$ and @$ in %initial-action designate the
495 look-ahead.
496 Push them in the stacks.
497 * tests/actions.at, tests/calc.at: Adjust the C++ ctor invocations.
498
18d192f0
AD
4992004-09-20 Akim Demaille <akim@epita.fr>
500
501 * doc/bison.texinfo (Initial Action Decl): New.
502
b8458aa5
AD
5032004-09-20 Akim Demaille <akim@epita.fr>
504
505 * data/yacc.c (YY_LOCATION_PRINT): Use YYLTYPE_IS_TRIVIAL as a
506 clearer criterion to define it.
507 (parse): Initialize the initial location when YYLTYPE_IS_TRIVIAL.
508 When reducing on an empty RHS, use the latest stacked location as
509 location.
510 yylloc is not always available.
511 * data/glr.c: Likewise.
512 Also, honor initial-actions.
513
3fc16193
AD
5142004-09-20 Akim Demaille <akim@epita.fr>
515
516 * data/yacc.c (YY_LOCATION_PRINT): New.
517 Define when we know YYLTYPE's structure, i.e., when the default
518 YYLLOC_DEFAULT is used.
519 * data/c.m4 (b4_yysymprint_generate): Use it.
520 * data/lalr1.cc (YYLLOC_DEFAULT): Stop relying on the initial
521 value of the result.
522 (error_start_): Replace with...
523 (error_range_): this location array.
524 This allows to replace code relying on the implementation of
525 locations by portable code.
526 * data/yacc.c (yylerrsp): Replace with...
527 (yyerror_range): this.
528 Every time a token is popped, update yyerror_range[0], to have an
529 accurate location for the error token.
530 * data/glr.c (YY_LOCATION_PRINT): New.
531 (yyprocessOneStack): Fix an invocation of YY_SYMBOL_PRINT:
532 deference a pointer.
533 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): No longer
534 report the location in %printers.
535
536 * src/scan-skel.l: Instead of abort, report error messages to ease
537 understanding skeleton scanning failures.
538
ecfe33e7
AD
5392004-09-16 Akim Demaille <akim@epita.fr>
540
541 * data/lalr1.cc (Stack::Iterator, Stack::ConstIterator): Rename as...
542 (iterator, const_iterator): these, to be more in the C++ spirit.
543 Also, return reverse iterators so that when displaying the stack
544 we display its bottom first.
545 (Parser::stack_print_, Parser::reduce_print_): Match the messages
546 from yacc.c.
547 We should probably use vector here though.
548
1576d44d
AD
5492004-09-16 Akim Demaille <akim@epita.fr>
550
551 Have more complete shift traces.
552
553 * data/yacc.c, data/lalr1.c, data/glr.c: Use YY_SYMBOL_PRINT
554 to report Shifts instead of ad hoc YYDPRINTF invocations,
555 including for the error token.
556 * data/lalr1.cc (symprint_): Output the location.
557 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): In C++, don't
558 output the location within the %printer.
559 Activate GLR tests, at least to make sure they compile properly.
560 They still don't pass though.
561 * tests/calc.at: Adjust expect verbose output, since now "Entering
562 state..." is on a different line than the "Shifting" message.
563
9c66f418
AD
5642004-09-08 Akim Demaille <akim@epita.fr>
565
566 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Move the
567 Bison directive from the Bison file to the invocation of this
568 macro, so that these directives are passed to
569 AT_BISON_OPTION_PUSHDEFS to get correct help macros.
570 Use these helping macros (e.g., AT_LOC, AT_VAL and so forth).
571 Move the AT_SETUP/AT_CLEANUP outside, to report as test title
572 the extra Bison directives instead of the whole series.
573 Change the grammar so that there are recoverable errors, and
574 unrecoverable errors. Now we can have the parser give up before
575 consuming the whole input. As a result we now can observe that
576 the lookahead is freed when needed.
577 Change the parser source to parse argv[1] instead of a hard coded
578 string.
579 Simplify yylex, and give a value and location to EOF.
580 Simplify some invocations of AT_CHECK_PRINTER_AND_DESTRUCTOR that
581 passed directives already coded in the file.
582 Add some tests to check the location of "error".
583 For some tests, the C++ parser is correct, and not yacc.c.
584 For other tests, they provide different, but unsatisfying, values,
585 so keep the C++ value so that at least one parser is "correct"
586 according to the test suite.
587 (Actions after errors): Remove, this is subsumed by the
588 AT_CHECK_PRINTER_AND_DESTRUCTOR series.
589
52d5733f
AD
5902004-09-06 Akim Demaille <akim@epita.fr>
591
592 * data/lalr1.cc: Adjust the indentation of the labels.
593 (Parser::pop): New.
594 Use it.
595
a0e68930
AD
5962004-09-06 Akim Demaille <akim@epita.fr>
597
598 * data/yacc.cc, data/glr.cc (yydestruct): Accept an additional
599 argument, an informative message.
600 Call YY_SYMBOL_PRINT.
601 Adjust all callers: integrate the associated YY_SYMBOL_PRINT.
602 * data/lalr1.cc (destruct_): Likewise.
603 In addition, no longer depend on b4_yysymprint_generate and
604 b4_yydestruct_generate to generate these functions, do it "by
605 hand".
606
e757bb10
AD
6072004-09-03 Akim Demaille <akim@epita.fr>
608
609 * data/glr.c, data/lalr1.cc, data/yacc.c: When YYABORT was
610 invoked, yydestruct the lookahead.
611 * tests/calc.at (Calculator $1): Update the expected lengths of
612 traces: there is an added line for the discarded lookahead.
613 * doc/bison.texinfo (Destructor Decl): Some rewording.
614 Define "discarded" symbols.
615
0fe1f06d
AD
6162004-09-02 Akim Demaille <akim@epita.fr>
617
618 * data/lalr1.cc (translate_, destruct_): No reason to be static.
619
284acc8b
AD
6202004-09-02 Akim Demaille <akim@epita.fr>
621
622 * data/glr.c, yacc.c (YYDSYMPRINT): Remove, not used.
623 (YYDSYMPRINTF): Rename as...
624 (YY_SYMBOL_PRINT): this.
625 * data/lalr1.cc (YY_SYMBOL_PRINT): New, modeled after the previous
626 two.
627 Use it instead of direct symprint_ calls.
628 (yybackup): Tweak the "Now at end of input" case to match yacc.c's
629 one.
630
a5eb1ed2
AD
6312004-09-02 Akim Demaille <akim@epita.fr>
632
b7c72fe1
AD
633 * data/lalr1.cc (b4_yysymprint_generate): New.
634 (symprint_): New member function, defined when YYDEBUG.
635 Use it consistently instead of token/nterm debugging output by
636 hand.
a5eb1ed2
AD
637 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust
638 %printer calls to use cdebug_ when using lalr1.cc.
639
417141dd
AD
6402004-08-30 Florian Krohm <florian@edamail.fishkill.ibm.com>
641
642 * data/glr.c: Guard the declarations of yypstack and yypdumpstack
643 with #ifdef YYDEBUG.
644
2fa09258
AD
6452004-08-26 Akim Demaille <akim@epita.fr>
646
647 * doc/bison.texinfo (Implementing Loops): Rename as...
648 (Implementing Gotos/Loops): this.
649
9378b508
PE
6502004-08-13 Paul Eggert <eggert@cs.ucla.edu>
651
652 Adjust to latest gnulib.
653 * bootstrap (gnulib_modules): Add xalloc-die.
654 Set LC_ALL=C so that file names sort consistently.
655 Prefer the gnulib copies of gettext.m4, glibc21.m4,
656 inttypes_h.m4, lib-ld.m4, lib-prefix.m4, po.m4, stdint_h.m4,
657 uintmax_t.m4, ulonglong.m4.
658 (intl_files_to_remove): Add gettext.m4, lib-ld.m4, lib-prefix.m4,
659 po.m4 since we are now using _gl.m4 instead.
660
87a8ad5c
PE
6612004-08-10 Florian Krohm <florian@edamail.fishkill.ibm.com>
662
663 * src/scan-action.l: Remove. Scanning of semantic actions is
664 handled in scan-gram.l.
665
dca81a78
PE
6662004-08-07 Florian Krohm <florian@edamail.fishkill.ibm.com>
667
668 * src/scan-gram.l (handle_syncline): Use uniqstr_new not xstrdup.
669
670 * src/location.h (struct): The file member is a uniqstr.
671 (equal_boundaries): Use UNIQSTR_EQ for comparison.
672
c9cbf7c5
PE
6732004-07-22 Paul Eggert <eggert@cs.ucla.edu>
674
675 Fix bug with non-%union parsers that have printers or destructors,
676 which led to a Bison core dump. Reported by Peter Fales in
677 <http://lists.gnu.org/archive/html/bug-bison/2004-07/msg00014.html>.
2fa09258 678
c9cbf7c5
PE
679 * data/c.m4 (b4_symbol_actions): Don't assume %union was used.
680 * data/lalr1.cc (yystype) [defined YYSTYPE]: Define to YYSTYPE,
681 not to our own type.
682 * src/output.c (symbol_destructors_output, symbol_printers_output):
683 Don't assume %union.
684 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR,
685 AT_CHECK_PRINTER_AND_DESTRUCTOR): New argument
686 UNION-FLAG. All callers changed.
687 (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Don't assume %union.
688 Use type char, not unsigned int, when declaring an array of char;
689 this lets us remove a cast.
690 (Printers and Destructors): Add non-%union test cases.
691
fa7e68c3
PE
6922004-06-21 Paul Eggert <eggert@cs.ucla.edu>
693
694 * doc/bison.texinfo: Minor editorial changes, mostly to the new
695 GLR writeups. E.g., avoid frenchspacing and the future tense,
696 change "lookahead" to "look-ahead", and change "wrt" to "with
697 respect to".
2fa09258 698
fa7e68c3
PE
6992004-06-21 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
700
701 * doc/bison.texinfo (Merging GLR Parses, Compiler Requirements):
702 New sections, split off from the GLR Parsers section. Put the new
703 Simple GLR Parser near the start of the GLR section, for clarity.
704 Rewrite connective text.
705
99a9344e
PE
7062004-06-21 Frank Heckenbach <frank@g-n-u.de>
707
708 * doc/bison.texinfo (Simple GLR Parsers): New section.
709
8dd162d3
PE
7102004-06-21 Paul Eggert <eggert@cs.ucla.edu>
711
712 * NEWS, TODO, doc/bison.texinfo:
713 Use "look-ahead" instead of "lookahead", to be consistent.
714 * REFERENCES: Fix incorrect reference to DeRemer and Pennello,
715 while we're fixing "look-ahead".
716 * src/conflicts.c (shift_set): Renamed from shiftset.
717 (look_ahead_set): Renamed from lookaheadset.
718 * src/print.c: Likewise.
719 * src/getargs.c (report_args): Add "look-ahead" as the new canonical
720 name for "lookahead".
721 (report_types, usage): Likewise.
722 * src/getargs.h (report_look_ahead_tokens): Renamed from
723 report_lookaheads.
724 * src/lalr.c (compute_look_ahead_tokens): Renamed from
725 compute_lookaheads.
726 (state_look_ahead_tokens_count): Renamed from state_lookaheads_count.
727 (look_ahead_tokens_print): Renamed from lookaheads_print.
728 * src/state.c (state_rule_look_ahead_tokens_print): Renamed from
729 state_rule_lookaheads_print.
730 * src/state.h: Likewise.
731 (reductions.look_ahead_tokens): Renamed from lookaheads.
732 * tests/torture.at (AT_DATA_LOOK_AHEAD_TOKENS_GRAMMAR): Renamed from
733 AT_DATA_LOOKAHEADS_GRAMMAR.
734
57a90331
PE
7352004-06-03 Paul Eggert <eggert@cs.ucla.edu>
736
737 * README: Update location of patched M4 distribution.
738
8ed3234a
PE
7392004-05-30 Albert Chin-A-Young <china@thewrittenword.com>
740
741 Don't assume the C++ compiler takes the same arguments as the C compiler
742 (trivial change).
743 * configure.ac (O0CXXFLAGS): New var.
744 * tests/atlocal.in (CXXFLAGS): Use it.
745
07971983
PE
7462004-05-29 Paul Eggert <eggert@cs.ucla.edu>
747
748 Fix some "make check" problems with C++ reported by
749 Albert Chin-A-Young for Tru64 C++ in this thread:
750 http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00049.html
751
752 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check for std::cerr.
753 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
754 Output to a .cc file for C++, not to a .c file.
755 * tests/calc.at (AT_CHECK_CALC): Likewise.
756 * tests/regression.at (AT_CHECK_DANCER): Likewise.
757 * tests/local.at (AT_COMPILE_CXX): Default to OUTPUT.cc, not OUTPUT.c.
758
29058652
PE
7592004-05-28 Albert Chin-A-Young <china@thewrittenword.com>
760
761 * tests/calc.at, tests/actions.at: Workaround for SGI
762 C++ compiler. (trivial change)
763
62cb8a99
PE
7642004-05-27 Paul Eggert <eggert@cs.ucla.edu>
765
fd418816
PE
766 Spent a few hours checking out which prerequisite versions the
767 current sources actually require. I went all the way back to
768 Gettext 0.10.40, Automake 1.4, and Autoconf 2.57 and investigated
769 a seemingly endless set of combinations of versions more recent
770 than that. The bottom line is that the current sources require
771 fairly recent versions of the build tools, and it'll be some work
772 to change this.
773 * configure.ac (AC_PREREQ): Increase from 2.58 to 2.59.
774 (AM_INIT_AUTOMAKE): Increase from 1.7 to 1.8.
775 (AM_GNU_GETTEXT_VERSION): Increase from 0.11.5 to 0.12.
776 Add comments explaining why those particular versions are
777 currently needed.
2fa09258 778
62cb8a99
PE
779 * src/parse-gram.y (lloc_default): Rewrite to avoid compiler bug
780 in SGI MIPSpro 7.4.1m. Problem reported by Albert Chin-A-Young in
161a71f3 781 <http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00037.html>.
62cb8a99
PE
782
783 * configure.ac (AC_PREREQ): Bump to 2.58, since 2.57 doesn't work
784 (it fails with a Autoconf-without-aclocal-m4 diagnostic).
785
caa52c10
PE
7862004-05-26 Paul Eggert <eggert@cs.ucla.edu>
787
788 * configure.ac (AM_GNU_GETTEXT_VERSION): Lower it from 0.14.1 to
789 0.11.5. Suggested by Bruno Haible.
790 * bootstrap: Remove gettext version checking.
791
792 * doc/bison.texinfo (Decl Summary): Also mention that %union
793 can depend on prerequisite types. Problem reported by Tim
794 Van Holder.
795
4bfd5e4e
PE
7962004-05-25 Paul Eggert <eggert@cs.ucla.edu>
797
2cef3017
PE
798 * README: Mention GNU m4 1.4 bugs and Akim's patched version.
799 * README-alpha: Don't tell people not to package this.
800
b9c85d5c
PE
801 * bootstrap: Don't assume $(...) works; use `...` instead.
802 Problem reported by Paul Hilfinger. Also, diagnose non-GNU
803 gettext better.
804
4bfd5e4e
PE
805 * doc/bison.texinfo (Decl Summary, Bison Options): Clarify what's
806 put into the -d output file, and mention what to do if YYSTYPE is
807 defined as a macro.
808
6a36ff94
PE
8092004-05-24 Paul Eggert <eggert@cs.ucla.edu>
810
6712933e
PE
811 Undo change made earlier today: it caused autopoint to not bring
812 in ABOUT-NLS. Ouch. Instead, substitute our own diagnostic for
813 autopoint's.
814
815 * bootstrap: Check that gettext version matches what's in
816 configure.ac. Warn users to ignore robots.txt ERROR 404.
817 * bootstrap: Undo today's earlier change (logged below).
818 * configure.ac (AM_GNU_GETTEXT_VERSION): Likewise.
b9c85d5c 819
6a36ff94
PE
820 The gettext version checking is causing more trouble than it's
821 curing; remove it. Problem reported by Paul Hilfinger.
822
823 * bootstrap: Issue a warning that one can expect a message
824 'AM_GNU_GETTEXT is used, but not AM_GNU_GETTEXT_VERSION'.
825 * configure.ac (AM_GNU_GETTEXT_VERSION): Remove.
826
209ea708
PE
8272004-05-23 Paul Eggert <eggert@cs.ucla.edu>
828
829 Ensure that the C++ compiler used for testing actually works on a
830 simple test program; if not, skip the C++-related tests. Problem
831 reported by Vin Shelton in:
161a71f3 832 http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00026.html
209ea708
PE
833
834 * m4/cxx.m4: New file.
835 * configure.ac (BISON_TEST_FOR_WORKING_CXX_COMPILER): Add.
836 * tests/atlocal.in (BISON_CXX_WORKS): Add.
837 * tests/local.at (AT_COMPILE_CXX): Use it.
838
41ca2549
PE
8392004-05-21 Paul Eggert <eggert@cs.ucla.edu>
840
383e69dc
PE
841 * data/glr.c (yylloc): Output this macro even if locations are not
842 being generated, as the GLR parser needs it even in that case.
843 Problem reported by Troy A. Johnson
844 <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=195946>.
845
41ca2549
PE
846 * configure.ac (AC_INIT): Update to 1.875e.
847
e476c87d
PE
8482004-05-21 Paul Eggert <eggert@cs.ucla.edu>
849
850 * NEWS: Version 1.875d.
851 * configure.ac (AC_INIT): Likewise.
852 * src/parse-gram.c, src/parse-gram.h: Regenerate with 1.875d.
853
854 * configure.ac (--enable-gcc-warnings): Do not enable -Wshadow,
855 -Wmissing-prototypes, or -Wstrict-prototypes for C++. The current
856 lalr1.cc runs afoul of the first, and the last two are no longer
857 supported by GCC 3.4.0.
858 * README: Mention GNU m4 1.4 or later; mention m4 patches.
859 * HACKING: Use ./bootstrap, not "make update" to import foreign files.
860
233a88ad
PE
8612004-05-06 Paul Eggert <eggert@cs.ucla.edu>
862
863 * src/muscle_tab.c (hash_muscle): Accept and return size_t, not
864 unsigned int, for compatibility with latest gnulib hash module.
865 * src/state.c (state_hash, state_hasher): Likewise.
866 * src/symtab.c (hash_symbol, hash_symbol_hasher): Likewise.
867 * src/uniqstr.c (hash_uniqstr): Likewise.
e476c87d 868
12ffdd28
PE
8692004-05-03 Paul Eggert <eggert@cs.ucla.edu>
870
871 * NEWS: Unescaped newlines are no longer allowed in char & strings.
872
873 * src/scan-gram.l (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER,
874 SC_CHARACTER,SC_STRING>): Reject unescaped newlines in
875 character and string literals.
876 (unexpected_end): New function.
877 (unexpected_eof): Use it.
878 (unexpected_newline): New function.
879 (<INITIAL,SC_AFTER_IDENTIFIER,SC_PRE_CODE>): Coalesce duplicate
880 actions.
e476c87d 881
12ffdd28
PE
882 * NEWS: Document %expect-rr.
883
884 * bootstrap (--gnulib-srcdir=*, --cvs-user=*):
885 Fix typo by replacing $1 with $option.
886 Remove more 'intl'-related files.
9668e2be 887 Don't DEFUN AM_INTL_SUBDIR twice.
12ffdd28
PE
888
889 * lib/.cvsignore: Add strndup.h. Remove memchr.c, memcmp.c,
890 memrchr.c, strcasecmp.c, strchr.c, strrchr.c, strspn.c, strtol.c,
891 strtoul.c.
892 * m4/.cvsignore: Add exitfail.m4, extensions.m4, gnulib.m4,
893 hard-locale.m4, mbstate_t.m4, strerror_r.m4, strndup.m4,
894 xstrndup.m4. Remove glibc21.m4, intdiv0.m4, inttypes-pri.m4,
895 inttypes.m4, inttypes_h.m4, isc-posix.m4, lcmessage.m4,
896 stdint_h.m4, uintmax_t.m4, ulonglong.m4.
897 * src/.cvsignore: Add *.output.
898
899 * src/parse-gram.y: Put copyright notice inside %{ %} so it
900 gets copied to the output file.
e476c87d 901
1f65350a
PE
9022004-04-28 Paul Eggert <eggert@twinsun.com>
903
904 Get files from the gnulib and po repositories, instead of relying
905 on them being in our CVS. Upgrade to latest versions of gnulib
906 and Automake.
907
908 * Makefile.am (SUBDIRS): Remove m4; Automake now does m4.
909 * bootstrap: Bootstrap from gnulib and po repositories.
910 Much of this code was stolen from GNU diff and GNU tar's bootstrap.
911 * README-cvs: Document these changes. Remove version numbers from
912 mentions of build tools, since they change so often. Mention Flex.
913
914 * configure.ac (AC_CONFIG_MACRO_DIR): Add, with m4 as arg.
915 (gl_USE_SYSTEM_EXTENSIONS): Add.
12ffdd28
PE
916 (AC_GNU_SOURCE, AC_AIX, AC_MINIX):
917 Remove; no longer needed, as gl_USE_SYSTEM_EXTENSIONS
1f65350a 918 does this for us.
12ffdd28
PE
919 (AC_ISC_POSIX): Remove; we no longer support this
920 ancient OS, as it gets in the way of latest Autoconf & gnulib.
1f65350a
PE
921 (AC_HEADER_STDC): Remove: we now assume C89 or better.
922 (AC_CHECK_HEADERS_ONCE): Use instead of AC_CHECK_HEADERS.
923 Do not check for C89 headers, except for locale.h which is used
924 by the Yacc library and must port to K&R hosts.
925 (AC_CHECK_FUNCS_ONCE): Use instead of AC_CHECK_FUNCS.
926 Do not check for C89 functions, except for setlocale which is
927 used by the Yacc library.
928 (AC_CHECK_DECLS, AC_REPLACE_FUNCS): Remove; no longer needed.
929 (gl_DIRNAME, gl_ERROR, gl_FUNC_ALLOCA, gl_FUNC_MEMCHR,
930 gl_FUNC_MEMRCHR, gl_FUNC_STPCPY, gl_FUNC_STRNLEN, gl_FUNC_STRTOL,
931 gl_GETOPT, gl_HASH, gl_MBSWIDTH, gl_OBSTACK, gl_QUOTE,
932 gl_QUOTEARG, gl_XALLOC, jm_FUNC_GLIBC_UNLOCKED_IO, jm_FUNC_MALLOC,
933 AM_GNU_GETTEXT): Remove; now done by:
934 (GNULIB_AUTOCONF_SNIPPET): Add. "bootstrap" builds this for us.
935 (AC_CONFIG_FILES): Remove m4/Makefile, as Automake now does this
936 for us.
937
938 * lib/Makefile.am: Include gnulib.mk, built for us by "bootstrap".
939 (BUILT_SOURCES, EXTRA_DIST, MOSTLYCLEANFILES):
940 Define to empty, as gnulib.mk will do the rest for us.
941 ($(libbison_a_OBJECTS), stdbool.h): Remove, as gnulib.mk does this
942 for us.
943 (libbison_a_SOURCES): Define to $(lib_SOURCES) now.
944 (lib_SOURCES): New symbol, containing only the non-gnulib libs.
945
946 * src/files.c: Include gnulib's xstrndup.h.
947
948 * src/system.h (MALLOC): Use xnmalloc, for better overflow checking.
949 (REALLOC): Use xnrealloc, for likewise.
950 (xstrndup, stpcpy): Remove decls, as gnulib does this for us now.
951 (strnlen, memrchr): Remove decls; functions no longer used.
952 Include <stpcpy.h>.
953
954 * config/depcomp, config/install-sh, lib/alloca.c, lib/argmatch.c,
955 lib/argmatch.h, lib/basename.c, lib/dirname.c, lib/dirname.h,
956 lib/error.c, lib/error.h, lib/getopt.c, lib/getopt.h,
957 lib/getopt1.c, lib/gettext.h, lib/hash.c, lib/hash.h,
958 lib/malloc.c, lib/mbswidth.c, lib/mbswidth.h, lib/memchr.c,
959 lib/memcmp.c, lib/memrchr.c, lib/obstack.c, lib/obstack.h,
960 lib/quote.c, lib/quote.h, lib/quotearg.c, lib/quotearg.h,
961 lib/realloc.c, lib/stdbool_.h, lib/stpcpy.c, lib/strcasecmp.c,
962 lib/strchr.c, lib/strncasecmp.c, lib/strnlen.c, lib/strrchr.c,
963 lib/strspn.c, lib/strtol.c, lib/strtoul.c, lib/unlocked-io.h,
964 lib/xalloc.h, lib/xmalloc.c, lib/xstrdup.c, lib/xstrndup.c,
965 m4/Makefile.am, m4/alloca.m4, m4/dirname.m4, m4/dos.m4,
966 m4/error.m4, m4/getopt.m4, m4/hash.m4, m4/malloc.m4,
967 m4/mbrtowc.m4, m4/mbswidth.m4, m4/memchr.m4, m4/memcmp.m4,
968 m4/memrchr.m4, m4/obstack.m4, m4/onceonly.m4, m4/prereq.m4,
969 m4/quote.m4, m4/quotearg.m4, m4/realloc.m4, m4/stdbool.m4,
970 m4/stpcpy.m4, m4/strnlen.m4, m4/strtol.m4, m4/strtoul.m4,
971 m4/unlocked-io.m4, m4/xalloc.m4, po/LINGUAS, po/Makefile.in.in,
972 po/Makevars, po/da.po, po/de.po, po/es.po, po/et.po, po/fr.po,
973 po/hr.po, po/id.po, po/it.po, po/ja.po, po/ms.po, po/nl.po,
974 po/pt_BR.po, po/ro.po, po/ru.po, po/sv.po, po/tr.po:
975 Remove, as these files are now generated automatically
976 by bootstrap or automake.
977
978 * po/ChangeLog: Remove: all but one entry was a duplicate
979 of this file, and I moved that 2000-11-02 entry here.
980
981 * config/.cvsignore: Add Makefile, depcomp, install-sh.
982 * lib/.cvsignore: Add alloca.c, alloca.h, alloca_.h, argmatch.c,
983 argmatch.h, basename.c, dirname.c, dirname.h, error.c, error.h,
984 exit.h, exitfail.c, exitfail.h, getopt.c, getopt.h, getopt1.c,
985 getopt_int.h, gettext.h, gnulib.mk, hard-locale.c, hard-locale.h,
986 hash.c, hash.h, malloc.c, mbswidth.c, mbswidth.h, memchr.c,
987 memcmp.c, memrchr.c, obstack.c, obstack.h, quote.c, quote.h,
988 quotearg.c, quotearg.h, realloc.c, stdbool_.h, stpcpy.c, stpcpy.h,
989 strcasecmp.c, strchr.c, stripslash.c, strncasecmp.c, strndup.c,
990 strnlen.c, strrchr.c, strspn.c, strtol.c, strtoul.c,
991 unlocked-io.h, xalloc.h, xmalloc.c, xstrdup.c, xstrndup.c,
992 xstrndup.h.
993 * m4/.cvsignore: Remove Makefile, Makefile.in. Add alloca.m4,
994 dirname.m4, dos.m4, error.m4, getopt.m4, hash.m4, mbrtowc.m4,
995 mbswidth.m4, obstack.m4, onceonly.m4, quote.m4, quotearg.m4,
996 stdbool.m4, stpcpy.m4, strnlen.m4, unlocked-io.m4, xalloc.m4.
997 * po/.cvsignore: Add *.po, LINGUAS, Makefile.in.in, Makevars.
998 * src/.cvsignore: Remove *_.c.
999
1000
1001 * Makefile.maint (GZIP_ENV): Don't use --rsyncable if gzip doesn't
1002 support it. (The latest stable gzip doesn't.)
1003
10042004-04-27 Paul Eggert <eggert@twinsun.com>
1005
1006 * data/lalr1.cc (Parser::stos_) [! YYDEBUG]: Define even in this
1007 case, as stos_ is now used by destructors due to the 2004-02-09
1008 change.
1009
1010 Remove more K&R C support.
1011 * lib/libiberty.y (PARAMS): Remove. All uses removed.
1012 * lib/subpipe.c (errno): Remove decl.
1013 Include <stdlib.h> unconditionally.
1014 (EXIT_FAILURE): Remove macro.
1015 * src/complain.c (vfprintf, strerror): Remove.
1016 * src/system.h: Include limits.h, stdlib.h, string.h, locale.h
1017 unconditionally.
1018 (EXIT_FAILURE, EXIT_SUCCESS, setlocale): Remove defns.
1019 Use latest Autoconf recommendations for including inttypes.h, stdint.h.
1020 (strchr, strspn, memchr): Remove decls.
1021 * tests/calc.at (_AT_DATA_CALC_Y): Include stdlib.h, string.h
1022 unconditionally. Do not declare perror.
1023 * tests/conflicts.at (%nonassoc and eof): Include stdlib.h
1024 unconditionally.
1025
1026 * src/complain.c (_): Remove useless defn, as system.h defines this.
1027
1028 * lib/bitset.h (__INT_TO_PTR): Remove; workaround no longer needed
1029 with latest obstack.h.
1030 * lib/ebitset.c (ebitset_elt_alloc): Don't bother to cast args
1031 to procedure types, as obstack.h now does that for us.
1032 * lib/lbitset.c (lbitset_elt_alloc): Likewise.
1033
1034 * lib/subpipe.h [HAVE_SYS_TYPES_H]: Include <sys/types.h>,
1035 so that this include file can stand alone.
1036 * lib/subpipe.c: Do not include <sys/types.h>, as subpipe.h
1037 does this now. Include subpipe.h first after config.h, to
1038 test whether it can stand alone.
1039
1040 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Don't
1041 declare yyerror when using lalr.cc, as GCC 3.4.0 warns about the
1042 unused declaration.
1043
1044 * tests/synclines.at (%union synch line): Put a dummy member in
1045 the union, because empty unions aren't allowed in C. Caught
1046 by GCC 3.4.0.
1047
4f16766c
PE
10482004-04-13 Jim Meyering <jim@meyering.net>
1049
1050 * src/conflicts.c (conflicts_print): Correct format string typo:
1051 use `%%' to produce literal `%'. (trivial change)
1052
779e7ceb
PE
10532004-03-30 Paul Eggert <eggert@twinsun.com>
1054
1055 * src/getargs.c (version): Update copyright year to 2004.
1056
1057 * data/c.m4 (b4_int_type): Use 'short int' rather than
1058 'short', and similarly for 'long', 'unsigned', etc.
1059 * data/glr.c (YYTRANSLATE, yyconfl, yySymbol, yyItemNum,
1060 yygetLRActions, yyprocessOneStack, yyrecoverSyntaxError,
1061 yy_yypstack, yydumpstack): Likewise.
1062 * data/lalr1.cc (user_token_number_max_, user_token_number_max_,
1063 translate_, seq_, [], pop, Slice, range_, operator+, operator+=):
1064 Likewise.
1065 * data/yacc.c (b4_int_type, yyss, YYSTACK_BYTES, yysigned_char,
1066 yy_stack_print, yyparse): Likewise.
1067 * doc/bison.texinfo (Prologue, Multiple Types): Likewise.
1068 * lib/bbitset.h (bitset_word, BITSET_WORD_BITS): Likewise.
1069 * lib/bitset.c (bitset_print): Likewise.
1070 * lib/bitset_stats.c (bitste_log_histogram_print): Likewise.
1071 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
1072 * lib/bitsetv.c (bitsetv_dump): Likewise.
1073 * lib/ebitset.c (EBITSET_ELT_BITS, ebitset_elt_alloc): Likewise.
1074 * lib/lbitset.c (LBITSET_ELT_BITS, lbitset_elt_alloc, debug_lbitset):
1075 Likewise.
1076 * src/LR0.c (allocate_itemsets): Likewise.
1077 * src/gram.h (rule_number, rule): Likewise.
1078 * src/lalr.h (goto_number): Likewise.
1079 * src/nullable.c (nullable_compute): Likewise.
1080 * src/output.c (prepare_rules): Likewise.
1081 * src/relation.c (relation_print, relation_digraph): Likewise.
1082 * src/relation.h (relation_node): Likewise.
1083 * src/state.h (state_number, transitions, errs, reductions,
1084 struct state): Likewise.
1085 * src/symtab.h (symbol_number, struct symbol): Likewise.
1086 * src/tables.c (vector_number, tally, action_number,
1087 default_goto, goto_actions): Likewise.
1088 * tests/existing.at (GNU Cim Grammar): Likewise.
1089 * tests/regression.at (Web2c Actions): Likewise.
1090
1091 * src/output.c (muscle_insert_short_int_table): Renamed from
1092 muscle_insert_short_table. All uses changed.
1093
d6328241
PH
10942004-03-25 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
1095
1096 * src/parse-gram.y: Define PERCENT_EXPECT_RR.
1097 (declaration): Replace expected_conflicts with expected_sr_conflicts.
1098 Add %expect-rr rule.
4f16766c 1099
d6328241
PH
1100 * src/scan-gram.l: Recognize %expect-rr.
1101
4f16766c 1102 * src/conflicts.h (expected_sr_conflicts): Rename from
d6328241 1103 expected_conflicts.
4f16766c 1104 (expected_rr_conflicts): Declare.
d6328241
PH
1105
1106 * src/conflicts.c (expected_sr_conflicts): Rename from
1107 expected_conflicts.
1108 (expected_rr_conflicts): Define.
1109 (conflicts_print): Check r/r conflicts against expected_rr_conflicts
1110 for GLR parsers.
1111 Use expected_sr_conflicts in place of expected_conflicts.
1112 Warn if expected_rr_conflicts used in non-GLR parser.
4f16766c 1113
d6328241 1114 * doc/bison.texinfo: Add documentation for %expect-rr.
4f16766c 1115
1452af69
PE
11162004-03-08 Paul Eggert <eggert@gnu.org>
1117
1118 Add support for hex token numbers. Suggested by Odd Arild Olsen in
161a71f3 1119 <http://lists.gnu.org/archive/html/bison-patches/2004-03/msg00000.html>.
1452af69
PE
1120
1121 * NEWS: Document hexadecimal tokens, no NUL bytes, %destructor
1122 in lalr1.cc.
1123 * doc/bison.texinfo (Token Decl): Add hexadecimal token numbers.
1124 * src/scan-gram.l (scan_integer): New function.
1125 ({int}): Use it.
1126 (0[xX][0-9abcdefABCDEF]+): New pattern, to support hex numbers.
1127 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>, \\x[0-9abcdefABCDEF]+,
1128 handle_action_dollar, handle_action_at, convert_ucn_to_byte):
1129 Say "long int", not "long", for uniformity with GNU style.
1130
006d217d
PE
11312004-02-25 Paul Eggert <eggert@twinsun.com>
1132
1133 * tests/local.at (AT_COMPILE, AT_COMPILE_CXX): Ignore stdout from
1134 compilers. This fixes a problem with Intel's C++ compiler being
1135 chatty, reported by Guido Trentalancia in
161a71f3 1136 <http://lists.gnu.org/archive/html/bug-bison/2004-02/msg00030.html>.
006d217d 1137
c2729758
ADL
11382004-02-09 Alexandre Duret-Lutz <adl@gnu.org>
1139
1140 Support %destructor and merge error locations in lalr1.cc.
1141
1142 * data/lalr1.cc (b4_cxx_destruct_def): New macro.
1143 (Parser::stos_): Define unconditionally.
1144 (Parser::destruct_): New method. Generate its body with
1145 b4_yydestruct_generate.
1146 (Parser::error_start_): New attribute.
1147 (Parser::parse) <yyerrlab, yyerrlab1>: Call destruct_ on erroneous
1148 token which are discarded.
1149 (Parser::parse) <yyerrlab, yyerrorlab, yyerrlab1>: Update
1150 error_start_ when erroneous token are discarded.
1151 (Parser::parse) <yyerrlab1>: Compute the location of the error
1152 token so that it covers all the discarded tokens.
1153 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust so
1154 it can be called with `%skeleton "lalr1.cc"', and do that.
1155
dd0e0635
PE
11562004-02-02 Paul Eggert <eggert@twinsun.com>
1157
1158 * src/Makefile.am (AM_CPPFLAGS): New macro. It mentions
1159 $(top_srcdir)/lib and ../lib. This fixes a bug reported
1160 by Paul Hilfinger; the old INCLUDES value didn't mention ../lib.
1161 There's no need to mention top_builddir since Automake does that
1162 for us.
1163 (INCLUDES): Remove, as Automake says it's obsolescent.
1164 Contents migrated into AM_CPPFLAGS as described above.
1165 * lib/Makefile.am (INCLUDES): Remove; obsolescent.
1166
11672004-01-14 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
1168
1169 * data/glr.c (yytokenName): Bullet-proof against YYEMPTY token.
1170 (yyreportSyntaxError): Handle case where lookahead token is
1171 YYEMPTY.
1172
be16239b
PH
11732004-01-13 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
1174
1175 * data/glr.c: Put casts on uses of YYREALLOC and YYMALLOC so that
1176 resulting parsers are compilable with C++.
1177
5fa90832
PE
11782003-12-23 Paul Eggert <eggert@twinsun.com>
1179
1180 * config/depcomp, config/install-sh: Sync with Automake 1.8.
1181 * src/output.c (output_skeleton): Rename local var.
1182 * tests/input.at (Torturing the Scanner): Don't use \x0 or \0 in
1183 Bison tokens, as this runs afoul of the 2003-10-07 change that
1184 disallowed NUL bytes in character constants or string literals.
1185
1186 * tests/local.at: Require Autoconf 2.59's Autotest.
1187 * tests/testsuite.at: Don't include local.at, since we now assume
1188 Autoconf 2.59 or later. Autoconf 2.59 had some problems with
1189 including it.
1190 * tests/Makefile.am ($(TESTSUITE)): Remove warning about ignoring
1191 multiple inclusion warnings.
dd0e0635 1192
b165c324
AD
11932003-12-02 Akim Demaille <akim@epita.fr>
1194
1195 * doc/bison.texinfo (How Can I Reset the Parser): More about start
1196 conditions.
1197 From Bruno Haible.
1198
26e06a21
ADL
11992003-11-18 Alexandre Duret-Lutz <adl@gnu.org>
1200
1201 * doc/bison.texinfo (Bison Options): Escape `@' in `$@'.
1202
92ac3705
PE
12032003-10-07 Paul Eggert <eggert@twinsun.com>
1204
6a5ecb38
PE
1205 * tests/Makefile.am (clean-local): Don't run 'testsuite --clean'
1206 if testsuite doesn't exist.
1207
92ac3705
PE
1208 * doc/bison.texinfo (Symbols): NUL bytes are not allowed in string
1209 literals, unfortunately.
1210 * src/scan-gram.l (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>):
1211 Complain about NUL bytes in character constants or string literals.
1212
91d2c560
PE
12132003-10-05 Paul Eggert <eggert@twinsun.com>
1214
1215 * NEWS: Don't document %no-default-prec, as it's still
1216 too experimental.
1217 * doc/bison.texinfo: Document %no-default-prec only if
1218 the defaultprec flag is set. Normally it's not.
1219
0cc3da3a
PE
12202003-10-04 Paul Eggert <eggert@twinsun.com>
1221
1222 * data/glr.c (b4_rhs_value, b4_rhs_location): Yield a
1223 non-modifiable lvalue, instead of a modifiable one.
1224 * doc/bison.texinfo (Actions): Document that $$ can
1225 be assigned to. Do not claim that $$ and $N are
1226 array element references: user code should not rely on this.
1227
22fccf95
PE
12282003-10-01 Paul Eggert <eggert@twinsun.com>
1229
1230 * src/parse-gram.h (PERCENT_NO_DEFAULT_PREC): New token.
1231 (grammar_declaration): Use it.
1232 * src/scan-gram.l: New token %no-default-prec.
1233 * tests/conflicts.at: Revamp tests to use %no-default-prec.
1234 * NEWS, doc/bison.texinfo: Document the above.
1235
fc8f2965
AD
12362003-10-01 Akim Demaille <akim@epita.fr>
1237
1238 VCG no longer supports long_straight_phase.
1239
1240 * src/vcg.c, src/vcg.h: Remove the handling of long_straight_phase.
1241 * src/print_graph.c (print_graph): Adjust.
1242
39a06c25
PE
12432003-09-30 Frank Heckenbach <frank@g-n-u.de>
1244 and Paul Eggert <eggert@twinsun.com>
1245
1246 * doc/bison.texinfo (Decl Summary, Contextual Precedence,
1247 Table of Symbols): Document %default-prec.
1248 * src/parse-gram.y (PERCENT_DEFAULT_PREC): New token.
1249 (grammar_declaration): Set default_prec on %default-prec.
1250 * src/scan-gram.l (%default-prec): New token.
1251 * src/reader.h (default_prec): New flag.
1252 * src/reader.c: Likewise.
1253 (packgram): Handle it.
1254 * tests/conflicts.at (%default-prec without %prec,
1255 %default-prec with %prec, %default-prec 1): New tests.
fc8f2965 1256
39a06c25
PE
12572003-09-30 Paul Eggert <eggert@twinsun.com>
1258
1259 * tests/testsuite.at: Include local.at, not input.at, fixing
1260 a typo in the 2003-08-25 patch.
1261
62b6aef9
AD
12622003-08-27 Akim Demaille <akim@epita.fr>
1263
1264 * data/lalr1.cc (yyparse) [__GNUC__]: "Use" yyerrorlab to pacify
1265 GCC warnings.
1266
89e1cc61
AD
12672003-08-26 Akim Demaille <akim@epita.fr>
1268
1269 * config/announce-gen (print_changelog_deltas): Neutralize "<#" as
1270 "<\#" to avoid magic from Gnus when posting parts of this script.
1271
a08460b0
AD
12722003-08-26 Akim Demaille <akim@epita.fr>
1273
1274 * data/lalr1.cc (Parser::report_syntax_error_): New, extracted from
1275 (Parser::parse): here.
1276 Adjust: nerrs and errstatus is now replaced by...
1277 (Parser::nerrs_, Parser::errstatus_): New.
1278
603f1cfd
AD
12792003-08-25 Akim Demaille <akim@epita.fr>
1280
1281 * config/announce-gen, Makefile.cfg: New.
1282 * Makefile.am: Adjust.
1283 * GNUmakefile, Makefile.maint: Update from CVS Autoconf, but
1284 keeping local WGET and WGETFLAGS modifications from Paul Eggert.
1285
cd3684cf
AD
12862003-08-25 Akim Demaille <akim@epita.fr>
1287
1288 When reducing initial empty rules, Bison parser read an initial
1289 location that is not defined. This results in garbage, and that
1290 affects Bison's own parser. Therefore we need (i) to extend Bison
1291 to support a means to initialize this location, and (ii) to use
1292 this CVS Bison to fix CVS Bison's parser.
1293
1294 * src/reader.h, reader.c (epilogue_augment): Remove, replace
1295 with...
1296 * src/muscle_tab.h, src/muscle_tab.c (muscle_code_grow): this.
1297 * src/parse-gram.y: Adjust.
1298 (%initial-action): New.
1299 (%error-verbose): Since we require CVS Bison, there is no reason
1300 not to use it.
1301 * src/scan-gram.l: Adjust.
1302 * src/Makefile.am (YACC): New, to make sure we use our own parser.
1303 * data/yacc.c (yyparse): Use b4_initial_action.
1304
4e03e201
AD
13052003-08-25 Akim Demaille <akim@epita.fr>
1306
1307 * doc/bison.texinfo: Don't promote stdout for error messages.
1308
8c182d05
AD
13092003-08-25 Akim Demaille <akim@epita.fr>
1310
1311 * data/lalr1.cc (Parser::reduce_print_): Remove unused yyi.
1312 From Alexandre Duret-Lutz.
1313
6a60c4cf
PE
13142003-08-25 Akim Demaille <akim@epita.fr>
1315
1316 Version 1.875c.
1317
25f66e1a
AD
13182003-08-25 Akim Demaille <akim@epita.fr>
1319
1320 * data/lalr1.cc (Parser::stack_print_, YY_STACK_PRINT): New.
1321 Use them.
1322
5348bfbe
AD
13232003-08-25 Akim Demaille <akim@epita.fr>
1324
1325 * data/lalr1.cc (Parser::reduce_print_): New.
1326 Use it.
1327
47301314
AD
13282003-08-25 Akim Demaille <akim@epita.fr>
1329
1330 Have lalr1.cc catch with Paul Eggert's patch to fix the infinite
1331 error recovery loops. This patch is based on
161a71f3 1332 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00000.html>.
47301314
AD
1333 Also, augment the similarity between lalr1.cc and yacc.c.
1334 Note: the locations of error recovery rules are not correct yet.
1335
1336 * data/lalr1.cc: Comment changes to augment the similarity between
1337 lalr1.cc and yacc.c.
1338 (YYERROR): Goto to yyerrorlab, not yyerrlab1.
1339 (yyerrlab1): Remove, but where it used to be (now the bottom part of
1340 yyerrlab), when hitting EOF, pop the whole stack here instead of
1341 merely falling thru the default error handling mechanism.
1342 (yyerrorlab): New label, with the old contents of YYERROR,
1343 plus the following change: pop the stack of rhs corresponding
1344 to the production that invoked YYERROR. That is how Yacc
1345 behaves (required by POSIX).
1346 * tests/calc.at (AT_CHECK_CALC_LALR1_CC): No longer expected to
1347 fail.
1348
1f7a61ff
AD
13492003-08-25 Akim Demaille <akim@epita.fr>
1350
1351 Tune local.at so that people can "autom4te -l autotest calc.at -o
1352 calc" for instance, to extract a sub test suite.
1353
1354 * tests/testsuite.at: Move the initialization, Autotest version
1355 requirement, and AT_TESTED invocation into...
1356 * tests/local.at: here.
1357 * tests/testsuite.at: Include it for compatibility with Autoconf
1358 2.57.
1359 * tests/Makefile.am ($(TESTSUITE)): Report that the warning should
1360 be ignore.
1361
327b5b56
PE
13622003-08-04 Paul Eggert <eggert@twinsun.com>
1363
1364 Rework code slightly to avoid gcc -Wtraditional warnings.
1365 * data/glr.c (yyuserMerge): Return void, not YYSTYPE.
1366 The returned value is now stored in *YY0. All callers changed.
1367 * src/output.c (merge_output): Adjust to the above change.
1368
0051e3ed
PE
13692003-07-26 Paul Eggert <eggert@twinsun.com>
1370
1371 * data/glr.c (YYASSERT): New macro.
1372 (yyfillin, yydoAction, yyglrReduce, yysplitStack,
1373 yyresolveStates, yyprocessOneStack):
1374 Use `YYASSERT (FOO);' rather than `if (! (FOO)) abort ();'.
1375 Derived from a suggestion by Frank Heckenbach.
1f7a61ff 1376
137437c6
PE
13772003-07-25 Paul Eggert <eggert@twinsun.com>
1378
5b620e06
PE
1379 * data/glr.c (yyglrReduce): Don't use C89 string concatenation,
1380 for portability to K&R C (after ansi2knr, presumably). See
161a71f3 1381 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00041.html>
5b620e06
PE
1382 by Frank Heckenbach, though I have omitted the structure-initialization
1383 part of his glr-knr.diff patch since I recall that the Portable
1384 C Compiler didn't require that change.
1385
137437c6
PE
1386 Let the user specify how to allocate and free memory.
1387 Derived from a suggestion by Frank Heckenbach in
161a71f3 1388 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00041.html>.
137437c6
PE
1389 * data/glr.c (YYFREE, YYMALLOC, YYREALLOC): New macros.
1390 All uses of free, malloc, realloc changed to use these macros,
1391 and unnecessary casts removed.
1392 * data/yacc.c (YYFREE, YYMALLOC): Likewise.
1393
ddb85ca5
PE
13942003-07-06 Matthias Mann <MatthiasMann@gmx.de>
1395
1396 * data/lalr1.cc (operator<<(std::ostream&, const Position&)):
1397 use s.empty() rather than s == "" to test for empty string; see
161a71f3 1398 <http://lists.gnu.org/archive/html/bison-patches/2003-07/msg00003.html>
ddb85ca5
PE
1399 (trivial change)
1400
39910e09
AD
14012003-06-25 Akim Demaille <akim@epita.fr>
1402
1403 * config/depcomp, config/install-sh: Update from masters.
1404
0ae99356
PE
14052003-06-20 Paul Eggert <eggert@twinsun.com>
1406
1407 * data/glr.c (YYLLOC_DEFAULT): Parenthesize arguments as needed,
1408 and return properly parenthesized result.
1409 * data/lalar1.cc (YYLLOC_DEFAULT): Likewise.
1410 * data/yacc.c (YYLLOC_DEFAULT): Likewise.
1411 Remove unnecessary parentheses from uses.
1412 * doc/bison.texinfo (Location Default Action): Describe the
1413 conventions for parentheses.
1414
cd05d13c
PE
14152003-06-19 Paul Eggert <eggert@twinsun.com>
1416
81fd08ca
PE
1417 * data/glr.c (yyremoveDeletes, yy_reduce_print, yyglrReduce,
1418 yyreportTree): Do not assume that size_t is the same width as int,
1419 when printing sizes. Print sizes using an unsigned format.
1420 Problem reported by Frank Heckenbach in
161a71f3 1421 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00035.html>.
4dcf140b 1422
cd05d13c
PE
1423 Port to Forte Developer 7 C compiler.
1424 * data/glr.c (struct YYLTYPE): If locations are not being used,
1425 declare a single dummy member, as empty structs do not conform
1426 to the C standard.
1427 (YYERROR, YYBACKUP): Do not use "do { ...; return foo; } while (0)";
1428 the Forte Developer 7 C compiler complains that end-of-loop
1429 code is not reached.
1430
4dcf140b
PE
14312003-06-17 Paul Eggert <eggert@twinsun.com>
1432
1433 * lib/libiberty.h (PARAMS): Spell argument as Args, not as X, to
1434 avoid warnings from picky compilers about redefinition of PARAMS.
1435
8dd76bee
PE
14362003-06-17 Paul Eggert <eggert@twinsun.com>
1437
1438 Version 1.875b.
1439
1440 * NEWS: Document 1.875b.
1441
1442 * lib/bbitset.h: Do not include config.h; that's the includer's job.
1443 Do not include <sys/types.h>; shouldn't be needed on a C89 host.
1444 * lib/bitset.h (bitset_compatible_p): Indent as per GNU standard.
1445 Don't use 'index' in comments, as it's a builtin fn on some hosts.
1446 * lib/bitset_stats.c: Include gettext.h unconditionally, as
1447 per recent gettext manual's suggestion.
1448 * lib/ebitset.c (ebitset_resize, ebitset_unused_clear):
1449 Use prototypes, not old-style definitions.
1450 * lib/lbitset.c (lbitset_unused_clear): Likewise.
1451 * lib/vbitset.c (vbitset_resize, vbitset_ones, vbitset_zero,
1452 vbitset_empty_p, vbitset_copy1, vbitset_not, vbitset_equal_p,
1453 vbitset_subset_p, vbitset_disjoint_p, vbitset_and, vbitset_and_cmp,
1454 vbitset_andn, vbitset_andn_cmp, vbitset_or, vbitset_or_cmp,
1455 vbitset_xor, vbitset_xor_cmp, vbitset_and_or, vbitset_and_or_cmp,
1456 vbitset_andn_or, vbitset_andn_or_cmp, vbitset_or_and,
1457 vbitset_or_and_cmp, vbitset_copy): Likewise.
1458
1459 * lib/libiberty.h: Do not include config.h; that's the includer's job.
1460 Do not include <stdlib.h>.
1461 (PARAMS): Define unconditionally for C89.
1462 (ATTRIBUTE_NORETURN): Remove.
1463 (ATTRIBUTE_UNUSED): Define unconditionally.
1464
1465 Upgrade to 2003-06-08 libbitset, submitted by Michael Hayes in:
161a71f3 1466 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00005.html>
8dd76bee
PE
1467 * lib/Makefile.am (bitsets_sources): Add vbitset.c, vbitset.h.
1468 * lib/vbitset.c, lib/vbitset.h: New files.
1469 * lib/abitset.c, lib/bbitset.h, lib/bitset.c, lib/bitset.h,
1470 lib/bitset_stats.c, lib/ebitset.c, lib/lbitset.c: Import
1471 from libbitset.
1472
1473 * doc/bison.texinfo (How Can I Reset the Parser): Renamed from
1474 `How Can I Reset @code{yyparse}', since texinfo does not allow
1475 arbitrary @ in node names.
1476
1477 * m4/Makefile.am (EXTRA_DIST): Add the following files, which
1478 shouldn't be needed according to the gettext 0.12.1 documentation
1479 but which seem to be needed anyway: codeset.m4 glibc21.m4
f8e8262e 1480 intdiv0.m4 inttypes-pri.m4 inttypes.m4 inttypes_h.m4 isc-posix.m4
8dd76bee 1481 lcmessage.m4 nls.m4 po.m4 stdint_h.m4 uintmax_t.m4 ulonglong.m4.
f8e8262e 1482 * po/Makefile.in.in: Upgrade to gettext 0.12.1 version.
cd05d13c 1483
8dd76bee
PE
1484 * lib/.cvsignore: Add stdbool.h.
1485 * m4/.cvsignore: Add nls.m4, po.m4.
1486
1487 Upgrade to CVS gnulib.
1488 * stdbool_.h: File renamed from stdbool.h.in.
1489 * configure.ac (AM_STDBOOL_H): Invoke this instead of
1490 AC_HEADER_STDBOOL.
1491 (AM_GNU_GETTEXT): Put brackets around args, as latest manual suggests.
1492 (AM_GNU_GETTEXT_VERSION): Update to 0.12.1.
1493 * lib/Makefile.am (EXTRA_DIST): Add stdbool_.h.
1494 (MOSTLYCLEANFILES): New var.
1495 ($(libbison_a_OBJECTS)): Depend on $(STDBOOL_H).
1496 (stdbool.h): New rule.
1497 * lib/dirname.c, lib/dirname.h, lib/hash.c, lib/hash.h,
1498 lib/malloc.c, lib/obstack.h, lib/quote.c, lib/realloc.c,
1499 lib/strcasecmp.c, lib/xalloc.h, m4/alloca.m4, m4/onceonly.m4,
1500 m4/quote.m4: Upgrade to today's gnulib.
1501
1502 * tests/calc.at (AT_CHECK_CALC): New option EXPECTED-TO-FAIL.
1503 (AT_CHECK_CALC_LALR1_CC): Use it, since the C++ LALR parser fails
1504 the tests right now.
1505 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Ensure yylex and
1506 yyerror are declared before use; C99 requires this.
1507
25005f6a
PH
15082003-06-09 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
1509
1510 * data/glr.c (YYERROR): Update definition to reset yyerrState to 0
1511 first.
1512 (yyrecoverSyntaxError): Correct the logic for setting and testing
1513 yyerrState.
1514 Correct comment on handling EOF.
1515 Allow states with only a default reduction, rather than failing
8dd76bee 1516 (I can't quite reconstruct why these were not allowed before).
25005f6a 1517
137437c6 1518 Fixes to avoid problem that $-N rules in GLR parsers can cause
25005f6a 1519 buffer overruns, corrupting state.
8dd76bee
PE
1520
1521 * src/output.c (prepare_rules): Output max_left_semantic_context
25005f6a
PH
1522 definition.
1523 * src/reader.h (max_left_semantic_context): New variable declaration.
1524 * src/scan-gram.l (max_left_semantic_context): Define.
1525 (handle_action_dollar): Update max_left_semantic_context.
1526 * data/glr.c (YYMAXLEFT): New definition.
1527 (yydoAction): Increase size of yyrhsVals by YYMAXLEFT.
1528 (yyresolveAction): Ditto.
1529
1530 Fixes to problems with location handling in GLR parsers reported by
1531 Frank Heckenbach (2003/06/05).
1532
1533 * data/glr.c (YYLTYPE): Make trivial if locations not used.
1534 (YYRHSLOC): Add parentheses, and define only if locations used.
1535 (YYLLOC_DEFAULT): Add parentheses, and give trivial definition if
1536 locations not used.
1537 (yyuserAction): Use YYLLOC_DEFAULT to set *yylocp.
1538 (yydoAction): Remove redundant initialization of *yyvalp and *yylocp.
8dd76bee 1539
25005f6a
PH
1540 * tests/cxx-type.at: Exercise location information; update tests
1541 to differentiate output with and without locations.
8dd76bee 1542 Remove forward declarations of yylex and yyerror---caused errors
25005f6a
PH
1543 because default YYLTYPE not yet defined.
1544 Change semantic actions to compute strings, rather than printing
1545 them directly (to test proper passing of semantics values). Change
1546 output to prefix notation and update test data and expected results.
1547 (yylex): Track locations.
1548 (stmtMerge): Return value rather than printing, and include arguments
1549 in value.
8dd76bee 1550
711f40b7
PE
15512003-06-03 Paul Eggert <eggert@twinsun.com>
1552
1553 Avoid warnings generated by GCC 2.95.4 when Bison is
1554 configured with --enable-gcc-warnings.
1555 * data/lalr1.cc (yy::]b4_parser_class_name[::parse,
1556 yy::]b4_parser_class_name[::translate_,
1557 yy::Stack::operator[] (unsigned),
1558 yy::Stack::operator[] (unsigned) const,
1559 yy::Slice::operator[] (unsigned),
1560 yy::Slice::operator[] (unsigned) const):
1561 Rename local vars to avoid warnings.
1562 * tests/glr-regression.at (Improper handling of embedded actions
1563 and $-N in GLR parsers): Remove unused local variable from yylex.
1564 * tests/regression.at (_AT_DATA_DANCER_Y): Declare yylex to take
1565 (void) as arg when not pure, since we now assume C89 when building
1566 Bison. Pacify GCC by using parameter.
1567
ac695f7d
PE
15682003-06-02 Paul Eggert <eggert@twinsun.com>
1569
1570 * data/lalr1.cc (yy::Position::lines, yy::Position::columns,
1571 yy::Location::lines, yy::Location::columns): Rename arguments
1572 to avoid shadowing; this removes a warning generated by GCC 3.3.
1573
26ec81e0
PE
15742003-06-01 Paul Eggert <eggert@twinsun.com>
1575
1576 Don't pass C-only warning optins (e.g., -Wmissing-declarations)
1577 to g++, as GCC 3.3 complains if you do it.
1578 * configure.ac (WARNING_CXXFLAGS): New subst. Set it to
1579 everything that WARNING_CFLAGS has, except omit warnings
1580 not suitable for C++.
1581 (AC_PROG_CXX): Use this instead of AC_CHECK_PROGS([CXX], [g++]).
1582 * tests/atlocal.in (CXXFLAGS): New var.
1583 * tests/local.at (AT_COMPILE_CXX): Use it instead of CFLAGS.
1584
1585 Fix a GLR parser bug I reported in February; see
161a71f3 1586 <http://lists.gnu.org/archive/html/bison-patches/2003-02/msg00008.html>.
26ec81e0
PE
1587 The problem was that GLR parsers did not conform to the C standard,
1588 because actions like { $1 = $2 + $3; } expanded to expressions
1589 that invoked YYFILL in separate subexpressions, and YYFILL assigned
1590 to a local variable. The C standard says that expressions
1591 like (var = f ()) + (var = f ()) have undefined behavior.
1592 Another problem was that GCC sometimes issues warnings that
1593 yyfill and its parameters are unused.
1594
1595 * data/glr.c (yyfillin): Renamed from the old yyfill. Mark
1596 as possibly unused.
1597 (yyfill): New function.
1598 (YYFILL): Use it.
1599 (yyuserAction): Change type of yynormal to bool, so that it matches
1600 the new yyfill signature. Mark it as possibly unused.
1601
1602
1603 Follow up on a bug I reported in February, where a Bison-generated
1604 parser can loop. Provide a test case and a fix for yacc.c. I
1605 don't have a fix for lalr1.cc or for glr.c, unfortunately.
1606 The original bug report is in:
161a71f3 1607 <http://lists.gnu.org/archive/html/bison-patches/2003-02/msg00044.html>
26ec81e0
PE
1608
1609 * data/yacc.c (YYERROR): Now just 'goto yyerrorlab', since the
1610 macro's size was becoming unwieldy.
1611 (yyerrlab): Do not discard an empty lookahead symbol, as this
1612 might destroy garbage.
1613 (yyerrorlab): New label, with the old contents of YYERROR,
1614 plus the following change: pop the stack of rhs corresponding
1615 to the production that invoked YYERROR. That is how Yacc
1616 behaves, and POSIX requires this behavior.
1617 (yyerrlab1): Use YYPOPSTACK instead of its definiens.
1618 * tests/calc.at (_AT_DATA_CALC_Y): Include unistd.h if available.
1619 Define 'alarm' to do nothing if unistd.h is not available.
1620 Add a new rule "exp: '-' error;" to test the above change to
1621 data/yacc.c. Use 'alarm' to abort any test taking longer than
1622 10 seconds, as it's probably looping.
1623 (AT_CHECK_CALC): Test recovery from error in new grammar rule.
1624 Also, the new yacc.c generates two fewer diagnostics for an
1625 existing test.
1626
d0829076
PE
16272003-05-24 Paul Eggert <eggert@twinsun.com>
1628
c6ae27df
PE
1629 * data/glr.c (YYSTACKEXPANDABLE): Do not evaluate
1630 YYSTYPE_IS_TRIVIAL or YYSTYPE_IS_TRIVIAL unless they are defined.
1631 This fixes a problem reported by John Bowman when the Compaq/HP
1632 Alpha cxx compiler happy (e.g. using cxx -D__USE_STD_IOSTREAM
1633 -ansi -Wall -gall).
1634 * data/yacc.c (union yyalloc): Likewise.
1635 (YYCOPY): Do not evaluate __GNUC__ unless it is defined.
26ec81e0 1636
d0829076
PE
1637 Switch from 'int' to 'bool' where that makes sense.
1638
1639 * lib/abitset.c (abitset_test, abitset_empty_p, abitset_equal_p,
1640 abitset_subset_p, abitset_disjoint_p, abitset_and_cmp,
1641 abitset_andn_cmp, abitset_or_cmp, abitset_xor_cmp, abitset_and_or,
1642 abitset_and_or_cmp, abitset_andn_or_cmp, abitset_or_and_cmp):
1643 Return or accept bool, not int. All callers changed.
1644 * lib/bbitset.h: (bitset_toggle_, bitset_copy_, bitset_and_or_cmp_,
1645 bitset_andn_or_cmp_, bitset_or_and_cmp_): Likewise.
1646 * lib/bitset.c (bitset_only_set_p, bitset_print, bitset_toggle_,
1647 bitset_copy_, bitset_op4_cmp, bitset_and_or_cmp_, bitset_andn_or_cmp_,
1648 bitset_or_and_cmp_): Likewise.
1649 * lib/bitset.h (bitset_test, bitset_only_set_p): Likewise.
1650 * lib/bitset_stats.c (bitset_stats_print, bitset_stats_toggle,
1651 bitset_stats_test, bitset_stats_empty_p, bitset_stats_disjoint_p,
1652 bitset_stats_equal_p, bitset_stats_subset_p, bitset_stats_and_cmp,
1653 bitset_stats_andn_cmp, bitset_stats_or_cmp, bitset_stats_xor_cmp,
1654 bitset_stats_and_or_cmp, bitset_stats_andn_or_cmp,
1655 bitset_stats_or_and_cmp): Likewise.
1656 * lib/ebitset.c (ebitset_elt_zero_p, ebitset_equal_p, ebitset_copy_cmp,
1657 ebitset_test, ebitset_empty_p, ebitset_subset_p, ebitset_disjoint_p,
1658 ebitset_op3_cmp, ebitset_and_cmp, ebitset_andn_cmp, ebitset_or_cmp,
1659 ebitset_xor_cmp): Likewise.
1660 * lib/lbitset.c (lbitset_elt_zero_p, lbitset_equal_p, lbitset_copy_cmp,
1661 lbitset_test, lbitset_empty_p, lbitset_subset_p, lbitset_disjoint_p,
1662 lbitset_op3_cmp, lbitset_and_cmp, lbitset_andn_cmp, lbitset_or_cmp,
1663 lbitset_xor_cmp): Likewise.
1664 * lib/bbitset.h: Include <stdbool.h>.
1665 (struct bitset_vtable): The following members now return bool, not
1666 int: toggle, test, empty_p, disjoint_p, equal_p, subset_p,
1667 and_cmp, andn_cmp, or_cmp, xor_cmp, and_or_cmp, andn_or_cmp,
1668 or_and_cmp).
1669 * src/conflicts.c (count_rr_conflicts): Likewise.
1670 * lib/bitset_stats.h (bitset_stats_enabled): Now bool, not int.
1671 All uses changed.
1672 * lib/ebitset.c (ebitset_obstack_init): Likewise.
1673 * lib/lbitset.c (lbitset_obstack_init): Likewise.
1674 * src/getargs.c (debug_flag, defines_flag, locations_flag,
1675 no_lines_flag, no_parser_flag, token_table_flag, yacc_flag,
1676 graph_flag): Likewise.
1677 * src/getargs.h (debug_flag, defines_flag, locations_flag,
1678 no_lines_flag, no_parser_flag, token_table_flag, yacc_flag,
1679 graph_flag): Likewise.
1680 * src/output.c (error_verbose): Likewise.
1681 * src/output.h (error_verbose): Likewise.
1682 * src/reader.c (start_flag, typed): Likewise.
1683 * src/reader.h (typed): Likewise.
1684 * src/getargs.c (LOCATIONS_OPTION): New constant.
1685 (long_options, getargs): Use it.
1686 * src/lalr.c (build_relations): Use bool, not int.
1687 * src/nullable.c (nullable_compute): Likewise.
1688 * src/print.c (print_reductions): Likewise.
1689 * src/tables.c (action_row, pack_vector): Likewise.
1690 * src/muscle_tab.h (MUSCLE_INSERT_BOOL): New macro.
1691 * src/output.c (prepare): Use it.
1692 * src/output.c (token_definitions_output,
1693 symbol_destructors_output, symbol_destructors_output): Use string,
1694 not boolean integer, to keep track of whether to output separator.
1695 * src/print_graph.c (print_core): Likewise.
1696 * src/state.c (state_rule_lookaheads_print): Likewise.
1697
1698 * config/install-sh: Sync from automake 1.7.5.
1699
6b2584b7
PE
17002003-05-14 Paul Eggert <eggert@twinsun.com>
1701
1702 * src/parse-gram.y (rules_or_grammar_declaration): Require a
1703 semicolon after a grammar declaration, in the interest of possible
1704 future changes to the Bison input language.
1705 Do not allow a stray semicolon at the start of the grammar.
1706 (rhses.1): Allow one or more semicolons after any rule, including
1707 just before "|" as required by POSIX.
1708 * tests/input.at (Torturing the Scanner): Add tests for ";|" in a
1709 grammar.
1710
caf37a36
ADL
17112003-05-14 Alexandre Duret-Lutz <adl@gnu.org>
1712
1713 %parse-param support for lalr1.cc.
1714
1715 * data/lalr1.cc (b4_parse_param_decl, b4_parse_param_cons,
1716 b4_cc_constructor_calls, b4_cc_constructor_call,
1717 b4_parse_param_vars, b4_cc_var_decls, b4_cc_var_decl): New m4
1718 definitions.
1719 (yy::b4_parser_class_name::b4_parser_class_name): Take extra
1720 parse-param arguments.
1721 (yy::b4_parser_class_name): Declare instance variables to
1722 hold parse-param arguments.
1723 * tests/calc.at: s/value/semantic_value/ because value clashes
1724 with a member of yy::b4_parser_class_name. Adjust C++ code
1725 to handle %parse-param. Enable %parse-param test in C++.
1726
3ab37077
PE
17272003-05-12 Paul Eggert <eggert@twinsun.com>
1728
1729 * doc/bison.texinfo (How Can I Reset @code{yyparse}): Reword the
1730 English a bit. Fix fclose typo. Change "const char" to "char
1731 const", and use ANSI C rather than K&R for "main". Suggest
1732 YY_FLUSH_BUFFER over yyrestart (as that is what Flex recommends)
1733 and suggest yy_switch_to_buffer.
1734
17352003-05-05 Paul Eggert <eggert@twinsun.com>
163ab321
PE
1736
1737 * lib/bitset.h (__INT_TO_PTR): Define to a value that presumes
1738 C89. This avoids a diagnostic on compilers that define __STDC__
1739 to 0, fixing a problem with Tru64 cc reported by Martin Mokrejs in
161a71f3 1740 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00041.html>.
163ab321 1741
e743727f
PE
17422003-05-03 Paul Eggert <eggert@twinsun.com>
1743
1744 * lib/bitset.h (BITSET_FOR_EACH, BITSET_FOR_EACH_REVERSE):
1745 Do not overrun array bounds.
1746 This should fix a bug reported today by Olatunji Oluwabukunmi in
161a71f3 1747 <http://lists.gnu.org/archive/html/bug-bison/2003-05/msg00004.html>.
e743727f 1748
916708d5
AD
17492003-04-29 Akim Demaille <akim@epita.fr>
1750
1751 * src/gram.h, src/gram.c (pure_parser, glr_parser): Move to...
1752 * src/getargs.c, src/getargs.h: here, as bool, not int.
1753 (nondeterministic_parser): New.
1754 * src/parse-gram.y, src/scan-gram.l: Support
1755 %nondeterministic-parser.
1756 * src/output.c (prepare): Use nondeterministic_parser instead
1757 of glr_parser where appropriate.
1758 * src/tables.c (conflict_row, action_row, save_row)
1759 (token_actions, token_actions, pack_vector): Ditto.
1760
a06ea4aa
AD
17612003-04-29 Akim Demaille <akim@epita.fr>
1762
1763 * doc/bison.texinfo (C++ Parsers, Implementing Loops): New.
1764
211074ca
AD
17652003-04-29 Akim Demaille <akim@epita.fr>
1766
1767 * tests/calc.at: Also test yacc.c and glr.c (but not lalr1.cc yet)
1768 with %pure-parser and %locations to exercise the patch from Yakov
1769 Markovitch below.
1770
6175ffe3
PE
17712003-04-28 Tim Van Holder <tim.van.holder@pandora.be>
1772
1773 * data/yacc.c: (b4_lex_param): Corrected for the case where
1774 %lex-param is provided and %pure-parser isn't.
1775
b1e95857
PE
17762003-04-27 Paul Eggert <eggert@twinsun.com>
1777
1778 Avoid gcc -Wundef warnings reported by Gerald Pfeifer in
161a71f3 1779 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00044.html>.
b1e95857
PE
1780 * data/yacc.c (YYSTACK_ALLOC): Don't evaluate YYSTACK_USE_ALLOCA
1781 if it is not defined.
1782 (YYMAXDEPTH): Don't evaluate YYMAXDEPTH if it is not defined.
1783
acda9df6
PE
17842003-04-26 Paul Eggert <eggert@twinsun.com>
1785
3470c57b
PE
1786 * data/lalr1.cc (yy::Parser::pact_ninf_, yy::Parser::table_ninf_):
1787 Declare to be of type suitable for the ninf value itself, not of
1788 type suitable for the corresponding table, since the latter might
1789 be unsigned but the ninf value might be negative. This fixes a
1790 bug reported by Alexandre Duret-Lutz in
161a71f3 1791 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00017.html>.
3470c57b 1792
acda9df6
PE
1793 * configure.ac (AC_FUNC_ERROR_AT_LINE): Remove, since gl_ERROR
1794 invokes it. We shouldn't invoke it twice because it will attempt
1795 to put error.o in the archive twice. This fixes a glitch reported
1796 by Martin Mokrejs in
161a71f3 1797 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00041.html>.
acda9df6 1798
b5250f26
PE
17992003-04-21 Paul Eggert <eggert@twinsun.com>
1800
1801 * m4/error.m4: Update from Bruno Haible's 2003-04-14 patch
1802 to gnulib.
1803
089ac0f1
PE
18042003-04-21 Yakov Markovitch <Markovitch@iso.ru>
1805
1806 * data/glr.c (yyexpandGLRStack) [!YYSTACKEXPANDABLE]:
1807 Fix obvious typo that results in uncompilable GLR parsers
1808 when both %pure-parser and %locations are used. (trivial change)
1809
5ededac6
PE
18102003-04-17 Paul Eggert <eggert@twinsun.com>
1811
1b8f2fff
PE
1812 * src/scan-gram.l: Add %option nounput, since we no longer use unput.
1813 (unexpected_eof): Renamed from unexpected_end_of_file, for brevity.
1814 Do not insert the expected token via unput, as this runs afoul
1815 of a POSIX-compatibility bug in flex 2.5.31.
1816 All uses changed to BEGIN the parent state,
1817 since we no longer insert the expected token via unput.
1818 * tests/regression.at (Invalid inputs): Remove cascaded diagnostic
1819 that is no longer emitted after the above change.
1820
5ededac6
PE
1821 * src/conflicts.c (set_conflicts): Resolve all conflicts, not just
1822 the first one. This change is from Paul Hilfinger, and it fixes
1823 regression reported by Werner Lemberg in
161a71f3 1824 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00026.html>.
5ededac6
PE
1825
1826 (resolve_sr_conflict): Don't invoke state_errs_set
1827 unless one or more tokens have been explicitly made errors.
1828 Otherwise, the above change causes Bison to abort.
1829
1830 * tests/existing.at (GNU pic Grammar): New test case, taken from
1831 Lemberg's email.
1832
b8be9132
AD
18332003-03-31 Akim Demaille <akim@epita.fr>
1834
1835 * doc/Makefile.am (AM_MAKEINFOFLAGS): Don't split the info file.
1836
d423d460
AD
18372003-03-31 Akim Demaille <akim@epita.fr>
1838
1839 * src/output.c (prepare_symbols): Avoid trailing spaces in the
1840 output.
1841
c7e441b4
AD
18422003-03-31 Akim Demaille <akim@epita.fr>
1843
1844 * doc/bison.texinfo (Strings are Destroyed): s/losses/loses/.
1845 From Paul Hilfinger.
1846
231897ad
AD
18472003-03-29 Akim Demaille <akim@epita.fr>
1848
1849 * m4/error.m4: Do not put under dynamic conditions some code which
1850 expansion is under static control.
1851
5b066063
AD
18522003-03-29 Akim Demaille <akim@epita.fr>
1853
1854 * doc/bison.texinfo (How Can I Reset @code{yyparse}): New.
1855
22a74fec
AD
18562003-03-29 Akim Demaille <akim@epita.fr>
1857
1858 * doc/bison.texinfo (Strings are Destroyed): New.
1859
0eee27e7
PE
18602003-03-13 Paul Eggert <eggert@twinsun.com>
1861
1862 * .cvsignore: Add configure.lineno.
1863 * src/.cvsignore: Add yacc.
1864 * tests/.cvsignore: Add testsuite.log.
1865 * doc/fdl.texi: Sync with latest FSF version.
1866
f61aad93
PE
18672003-03-12 Paul Eggert <eggert@twinsun.com>
1868
537636c7
PE
1869 * scan-gram.l (YY_USER_INIT): Initialize code_start, too.
1870 (<INITIAL><<EOF>>, <SC_PRE_CODE><<EOF>>): Set *loc to the scanner
1871 cursor, instead of leaving it undefined. This fixes a bug
1872 reported by Tim Van Holder in
161a71f3 1873 <http://lists.gnu.org/archive/html/bug-bison/2003-03/msg00023.html>.
537636c7
PE
1874 * tests/input.at (Torturing the Scanner): Test the scanner on
1875 an empty input file, which was Tim Van Holder's test case.
1876
1877 * m4/timevar.m4 (BISON_PREREQ_TIMEVAR): When checking whether
1878 <sys/resource.h> can be included, include sys/time.h and
1879 sys/times.h first, if available. This works around the SunOS
1880 4.1.4 porting bug reported by Bruce Becker in
161a71f3 1881 <http://lists.gnu.org/archive/html/bug-bison/2003-03/msg00018.html>.
537636c7
PE
1882
1883 * m4/subpipe.m4 (BISON_PREREQ_SUBPIPE): Don't
1884 AC_CHECK_HEADERS([sys/wait.h]), as this interferes with
1885 AC_HEADER_SYS_WAIT.
1886
f61aad93
PE
1887 Merge changes from gnulib. This was prompted because the CVS
1888 snapshot didn't build on Solaris 7 due to strnlen problems.
1889
1890 These changes need to be merged back into gnulib:
1891 * lib/hash.c: Include <stdbool.h> unconditionally.
1892 * m4/onceonly.m4 (m4_quote): New macro.
1893 (AC_CHECK_HEADERS_ONCE, AC_CHECK_FUNCS_ONCE, AC_CHECK_DECLS_ONCE):
1894 Quote AC_FOREACH variable-expansions properly.
1895 The 2003-01-03 obstack.h change also needs merging.
1896 {end of changes requiring merging}
5b066063 1897
f61aad93
PE
1898 * lib/stdbool.h.in, m4/alloca.m4, m4/dirname.m4, m4/dos.m4,
1899 m4/getopt.m4, m4/hash.m4, m4/malloc.m4, m4/memchr.m4,
1900 m4/memrchr.m4, m4/obstack.m4, m4/onceonly.m4, m4/quote.m4,
1901 m4/quotearg.m4, m4/realloc.m4, m4/stpcpy.m4, m4/strnlen.m4,
1902 m4/strtol.m4, m4/strtoul.m4, m4/unlocked-io.m4, m4/xalloc.m4:
1903 New files, imported from gnulib.
1904 * m4/Makefile.am (EXTRA_DIST): Add the new m4/*.m4 files mentioned
1905 above.
1906
1907 * lib/mbswidth.c, m4/error.m4, m4/mbrtowc.m4, m4/mbswidth.m4,
1908 m4/memcmp.m4, m4/prereq.m4, m4/stdbool.m4: Update to current
1909 gnulib sources.
1910
1911 * configure.ac (gl_DIRNAME, gl_GETOPT, gl_HASH, gl_QUOTE, gl_XALLOC):
1912 Add.
1913 (gl_ERROR): New, replacing jm_PREREQ_ERROR.
1914 (gl_FUNC_ALLOCA): New, replacing AC_FUNC_ALLOCA.
1915 (gl_FUNC_STPCPY): New, replacing AC_REPLACE_FUNCS(stpcpy).
1916 (gl_FUNC_STRNLEN): New, replacing AC_FUNC_STRNLEN.
1917 (gl_MBSWIDTH): New, replacing jm_PREREQ_MBSWIDTH.
1918 (gl_OBSTACK): New, replacing AC_FUNC_OBSTACK.
1919 (gl_QUOTEARG): New, replacing jm_PREREQ_QUOTEARG.
1920 (jm_FUNC_GLIBC_UNLOCKED_IO, gl_FUNC_STPCPY, gl_FUNC_STRTOL): New.
1921 (jm_FUNC_MALLOC): New, replacing AC_FUNC_MALLOC.
1922 (jm_FUNC_REALLOC): New, replacing AC_FUNC_REALLOC.
1923 (jm_PREREQ_ARGMATCH): Remove.
1924 (AC_REPLACE_FUNCS): Remove memchr, memrchr, stpcpy, strtol, strtoul.
1925 * lib/Makefile.am (libbison_a_SOURCES): Add argmatch.c, argmatch.h.
1926
1927 * src/system.h: Include <stdbool.h> unconditionally.
1928
1929 * lib/bbitset.h: Include <limits.h> unconditionally. We have been
1930 assuming at least C89 in the bitset code for some time now.
1931
d2ffe116
AD
19322003-03-03 Akim Demaille <akim@epita.fr>
1933
1934 * ro.po: New.
1935
052826fd
AD
19362003-03-02 Akim Demaille <akim@epita.fr>
1937
1938 * doc/bison.texinfo (Table of Symbols): Reactivate the
1939 documentation for %lex-param, and %parse-param.
1940
c4749565
AD
19412003-03-02 Akim Demaille <akim@epita.fr>
1942
1943 * data/yacc.c, data/glr.c, data/lal1.cc: Use similar code to
1944 generate verbose error messages.
1945 Use the number of tokens as an upper bound in yytname, as it
1946 cannot be a non terminal.
1947
d5286af1
AD
19482003-03-02 Akim Demaille <akim@epita.fr>
1949
1950 * tests/regression.at (_AT_DATA_DANCER_Y): Fix the expected error
1951 message.
1952
22e304a6
AD
19532003-03-02 Akim Demaille <akim@epita.fr>
1954
22e304a6
AD
1955 * tests/regression.at (_AT_DATA_DANCER_Y, AT_CHECK_DANCER): New.
1956 Use them to exercise yycheck overrun.
1957 Based on Andrew Suffield's grammar.
1958
67a25fed
AD
19592003-03-02 Akim Demaille <akim@epita.fr>
1960
1961 Create tests/local.at for Bison generic testing macros.
1962
1963 * tests/calc.at (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): Move to...
1964 * tests/local.at (AT_BISON_OPTION_PUSHDEFS, AT_BISON_OPTION_POPDEFS):
1965 This new file.
1966 * tests/calc.at (AT_CHECK_CALC): Adjust.
1967 * tests/testsuite.at (AT_DATA_GRAMMAR_PROLOGUE, AT_DATA_GRAMMAR)
1968 (AT_COMPILE, AT_COMPILE_CXX, AT_PARSER_CHECK): Move to...
1969 * tests/local.at: here.
1970 (AT_COMPILE_CXX): Tags the tests using it as c++.
1971 Ignore the test if CXX is not functional.
1972
9c2b381f
PE
19732003-03-01 Paul Eggert <eggert@twinsun.com>
1974
1975 * src/scan-gram.l (code_start): Initialize it to scanner_cursor,
1976 not loc->end, since loc->end might contain garbage and this leads
1977 to undefined behavior on some platforms.
1978 (id_loc, token_start): Use (IF_LINTed) initial values that do not
1979 depend on *loc, so that the reader doesn't give the the false
1980 impression that *loc is initialized.
1981 (<INITIAL>"%%"): Do not bother setting code_start, since its value
1982 does not survive the return.
1983
0433ba88
AD
19842003-03-01 Akim Demaille <akim@epita.fr>
1985
1986 * src/scan-gram.l (code_start): Always initialize it when entering
1987 into yylex, as SC_EPILOGUE is activated *before* the corresponding
1988 yylex invocation. An alternative would be making it static, but
1989 then it starts with the second %%'s beginning, instead of its end.
1990
b305ea69
PE
19912003-02-28 Paul Eggert <eggert@twinsun.com>
1992
1993 * lib/mbswidth.c: Include <wchar.h> before "mbswidth.h", to work
1994 around a UnixWare 7.1.1 porting bug reported by John Hughes in
161a71f3 1995 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00030.html>.
b305ea69 1996
c3d25e01
PE
19972003-02-26 Paul Eggert <eggert@twinsun.com>
1998
1999 * README: Mention compiler bug in Sun Forte Developer 6 update 2.
2000 Remove Sequent/Pyramid discussion (nobody uses them any more).
2001 Merge VMS and MS-DOS discussion; these ports may well be dead
2002 but let's keep mentioning them for now. Put <> around email
2003 addresses. Add copyright notice.
2004
c267ffbc
PE
20052003-02-24 Paul Eggert <eggert@twinsun.com>
2006
2007 * data/glr.c (yy_reduce_print): yylineno -> yylno,
2008 to avoid collision with flex use of yylineno.
2009 Problem reported by Bruce Lilly in
161a71f3 2010 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00016.html>.
c267ffbc
PE
2011 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Likewise.
2012 * data/yacc.c (yy_reduce_print): Likewise.
2013
2014 * config/depcomp: Sync with Automake 1.7.3.
2015
f939fc12
AD
20162003-02-21 Akim Demaille <akim@epita.fr>
2017
2018 * data/lalr1.cc: Use temporary variables instead of casts to
2019 change integer types.
2020 Suggested by Paul Eggert.
2021
95923bd6
AD
20222003-02-21 Akim Demaille <akim@epita.fr>
2023
2024 * doc/bison.texinfo: Use "location" consistently to refer to @n,
2025 to avoid confusions with lalr1.cc's notion of Position.
2026 Suggested by Paul Eggert.
2027
2cdc240e
AD
20282003-02-20 Akim Demaille <akim@epita.fr>
2029
2030 * data/lalr1.cc (position.hh): Make sure "columns" never pushes
2031 before initial_columns.
2032 (location.hh): Use consistent variable names when defining the
2033 operator<<.
2034 Use "last" so that we subtract from Positions, not from unsigned.
2035
5d003116
AD
20362003-02-20 Akim Demaille <akim@epita.fr>
2037
2038 * data/lalr1.cc (position.hh): New subfile, including the extended
2039 and Doxygen'ed documentation of class Position.
2040 (location.hh): Use it.
2041 Document a` la Doxygen.
ba1ecc07 2042 With the help of Benoit Perrot.
5d003116 2043
d02b25f9
AD
20442003-02-20 Akim Demaille <akim@epita.fr>
2045
2046 * tests/calc.at (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): Define
2047 AT_YACC_IF.
2048 Redefine AT_YYERROR_SEES_LOC_IF using it.
2049 (_AT_DATA_CALC_Y): Don't declare yyerror when lalr1.cc, as it is
2050 not defined.
2051 Don't use the location in yy::Parser::error_ and
2052 yy::Parser::print_ when not %locations.
2053 Activate more lalr1.cc tests.
2054
0d1c3a04
AD
20552003-02-19 Akim Demaille <akim@epita.fr>
2056
2057 * data/lalr1.cc: When displaying a line number, be sure to make it
2058 an int.
2059
60a777aa
AD
20602003-02-19 Akim Demaille <akim@epita.fr>
2061
2062 * data/lalr1.cc (b4_stack_depth_init, yy::Parser::initdepth_):
2063 Remove, useless.
2064 (YYABORT, YYACCEPT, YYERROR): New.
2065 * tests/calc.at: Renable the lalr1.cc test.
2066
0b86fc41
AD
20672003-02-19 Akim Demaille <akim@epita.fr>
2068
2069 * tests/calc.at (AT_CHECK_CALC): Check different scenarios of
2070 error recovery, mixing with/without pops and discarding of the
2071 lookahead.
2072 Exercise YYERROR.
2073 Disable the lalr1.cc tests as currently it doesn't support YYERROR.
2074
da99a5dc
PE
20752003-02-17 Paul Eggert <eggert@twinsun.com>
2076
2077 * tests/atlocal.in (LDFLAGS, LIBS): New vars.
2078 * tests/testsuite.at (AT_COMPILE): Use them.
2079 This fixes the testsuite problem reported by Robert Lentz in
161a71f3 2080 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00011.html>.
da99a5dc 2081
93b8c255
PE
20822003-02-12 Paul Eggert <eggert@twinsun.com>
2083
2084 * data/yacc.c (yyerrlab) [YYERROR_VERBOSE]:
2085 Avoid subscript error in yycheck. Bug reported by Andrew Suffield in
161a71f3 2086 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00003.html>.
93b8c255
PE
2087 * data/glr.c (yyreportSyntaxError) [YYERROR_VERBOSE]: Likewise.
2088 Check for malloc failure, for consistency with yacc.c.
2089 (yytname_size): Remove, for consistency with yacc.c.
2090
2091 The bug still remains in data/lalr1.cc, as I didn't have time
2092 to fix it there.
2093
7548fed2
AD
20942003-02-06 Akim Demaille <akim@epita.fr>
2095
2096 * configure.ac (GXX): Rename as...
2097 (CXX): this, to keep the original Autoconf semantics.
2098 Require 2.57.
2099 * data/lalr1.cc: Fix b4_copyright invocations.
2100 If YYDEBUG is not defined, don't depend upon name_ being defined.
2101 (location.hh): Include string and iostream.
2102 (Position::filename): New member.
2103 (Position::Position ()): New.
2104 (operator<< (Position)): New.
2105 (operator- (Position, int)): New.
2106 (Location::first, Location::last): Rename as...
2107 (Location::begin, Location::end): these, to mock the conventional
2108 iterator names.
2109 (operator<< (Location)): New.
2110 * tests/atlocal.in (CXX): New.
2111 * tests/testsuite.at (AT_COMPILE_CXX): New.
2112 * tests/calc.at (_AT_DATA_CALC_Y): Adjust yyerror to report the
2113 locations in a more synthetic way.
2114 (AT_CHECK_PUSHDEFS): AT_YYERROR_SEES_LOC_IF is positive if
2115 lalr1.cc is used.
2116 Adjust the C locations to match those from Emacs: first column is
2117 column 0.
2118 Change all the expected results.
2119 Conform to the GCS: simplify the locations when applicable.
2120 (LOC, VAL, YYLLOC_FORMAL, YYLLOC_ARG, USE_YYLLOC, LEX_FORMALS)
2121 (LEX_ARGS, USE_LEX_ARGS, LEX_PRE_FORMALS, LEX_PRE_ARGS): Replace
2122 these CPP macros with the m4 macros new defined by...
2123 (AT_CHECK_PUSHDEFS): this, i.e.:
2124 (AT_LALR1_CC_IF, AT_PURE_LEX_IF, AT_LOC, AT_VAL, AT_LEX_FORMALS)
d02b25f9 2125 (AT_LEX_ARGS, AT_USE_LEX_ARGS, AT_LEX_PRE_FORMALS, AT_LEX_PRE_ARGS)
7548fed2
AD
2126 New macros.
2127 (AT_CHECK_POPDEFS): Undefine them.
2128 (AT_CHECK_CALC_LALR1_CC): New.
2129 Use it for the first lalr1.cc test.
2130
43a176ef
AD
21312003-02-04 Akim Demaille <akim@epita.fr>
2132
2133 * data/lalr1.cc (YYLLOC_DEFAULT): Fix its definition: be based on
2134 Location as is defined.
2135
fc049e9c
AD
21362003-02-04 Akim Demaille <akim@epita.fr>
2137
2138 * data/lalr1.cc: If YYDEBUG is not defined, don't depend upon
2139 name_ being defined.
2140
a737b216
PE
21412003-02-03 Paul Eggert <eggert@twinsun.com>
2142
2143 * src/gram.h (start_symbol): Remove unused decl.
2144
2145 Use more-consistent naming conventions for local vars.
2146
2147 * src/derives.c (derives_compute): Change type of local var from
2148 int to rule_number.
2149 * src/gram.c (grammar_rules_partial_print): Likewise.
2150 * src/print.c (print_core): Likewise.
2151 * src/reduce.c (reduce_grammar_tables): Likewise.
2152
2153 * src/gram.c (grammar_dump): Change name of item_number *
2154 local var from r to rp.
2155 * src/nullable.c (nullable_compute): Likewise.
2156
2157 * src/gram.h (ISTOKEN, ISVAR): Use i, not s, for int var.
2158
2159 * src/gram.h (symbol_number_as_item_number): Use sym, not s,
2160 for symbol or symbol_number var.
2161 * src/reader.c (grammar_start_symbol_set): Likewise.
2162 * src/reader.h (grammar_start_symbol_set, grammar_symbol_append):
2163 Likewise.
2164 * src/state.c (transitions_to): Likewise.
2165 * src/state.h: Likewise.
2166 * src/tables.c (symbol_number_to_vector_number): Likewise.
2167
2168 * src/muscle_tab.h (MUSCLE_OBSTACK_SGROW): Use p, not s, for
2169 char * var.
2170
2171 * src/parse-gram.y (lloc_default): Use loc, not r, for YYLTYPE
2172 var.
2173
2174 * src/scan-gram.l (no_cr_read): Use bytes_read, not s, for size
2175 var.
2176
2177 * src/system.h (xstrndup, strchr, strspn, strnlen, memchr, memrchr):
2178 Use str, not s, for char * var. Use ch, not c, for character var.
2179 Use size for size var.
2180
2181 * src/uniqstr.c (uniqstr_new, uniqstr_assert): Use str, not s, for
2182 char * var.
2183 (uniqstr_print, uniqst_print_processor): Use ustr, not s, for
2184 uniqstr var.
2185 * src/uniqstr.h: Likewise.
2186
2187 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str,
2188 get_layoutalgorithm_str, get_decision_str, get_orientation_str,
2189 get_node_alignment_str, get_arrow_mode_str, get_crossing_type_str,
2190 get_view_str, get_linestyle_str, get_arrowstyle_str): Rename
2191 param to have same name as that of enum, so that we don't use
2192 "s" to stand for a non-state.
2193
68e93ad5
AD
21942003-02-02 Akim Demaille <akim@epita.fr>
2195
2196 * src/scan-skel.l: Scan more than one inert character per yylex
2197 invocation.
2198
92898986
PE
21992003-02-01 Paul Eggert <eggert@twinsun.com>
2200
2201 Version 1.875a.
2202
1d9d5d71
PE
2203 * po/LINGUAS: Add ms.
2204
0435d061
AD
22052003-01-30 Akim Demaille <akim@epita.fr>
2206
2207 * doc/Makefile.am (CLEANFILES): Add bison.fns for distcheck.
2208
6029a57f
PH
22092003-01-29 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
2210
2211 * tests/cxx-type.at: Correct apparent typo in Bison input: $$ instead
2212 of $1.
0435d061
AD
2213
2214 Changes in response to error report by S. Eken: GLR mode does not
6029a57f 2215 handle negative $ indices or $ indices in embedded rules correctly.
161a71f3 2216 See <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00076.html>.
0435d061 2217
6029a57f
PH
2218 * data/glr.c (b4_rhs_value): Change to use YYFILL macro.
2219 (b4_rhs_location): Ditto.
0435d061 2220 (yyfill): New function to copy from stack tree into array
6029a57f 2221 incrementally.
0435d061
AD
2222 (yyuserAction): Modify to allow incremental move of semantic values
2223 to rhs array when in GLR mode.
2224 Define YYFILL to use in user-defined actions to fill semantic array
6029a57f
PH
2225 as needed.
2226 Remove dummy use of yystack, as there is now a guaranteed use.
2227 (yydoAction): Modify to allow incremental move of semantic values
2228 to rhs array when in GLR mode.
2229 (yyresolveAction): Ditto.
2230 (yyglrShiftDefer): Update comment.
0435d061 2231 (yyresolveStates): Use X == NULL for pointers, not !X.
6029a57f
PH
2232 (yyglrReduce): Ditto.
2233 (yydoAction): Ditto
0435d061 2234
6029a57f
PH
2235 * tests/glr-regr1.at: Rename to ...
2236 * tests/glr-regression.at: Add new regression test for the problems
2237 described above (adapted from S. Eken).
2238 Update copyright notice.
2239 * tests/testsuite.at: Rename glr-regr1.at to glr-regression.at.
2240 * tests/Makefile.am: Ditto.
2241
6cee6297
PE
22422003-01-28 Paul Eggert <eggert@twinsun.com>
2243
2244 * data/lalr1.cc: Do not use @output_header_name@ unless
2245 b4_defines_flag is set. This fixes two bugs reported by
2246 Tim Van Holder in
161a71f3
PE
2247 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00071.html>
2248 and <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00073.html>.
6cee6297 2249
b2a836b5
PE
22502003-01-21 Paul Eggert <eggert@twinsun.com>
2251
2252 * data/yacc.c (YYERROR): Move code from yyerrlab1 to here, so that
2253 we don't need to worry about yyerrlab1 being reported as an
2254 "unused label" by non-GCC C compilers. The downside is that if
2255 locations are used then a couple of statements are duplicated each
2256 time YYERROR is invoked, but the upside is that the warnings
2257 should vanish.
2258 (yyerrlab1): Move code to YERROR.
2259 (yyerrlab2): Remove. Change uses back to yyerrlab1.
2260 This reverts some of the 2002-12-27 change.
2261
4196b931
PE
22622003-01-17 Paul Eggert <eggert@twinsun.com>
2263
2264 * src/output.c (symbol_printers_output): Fix typo that led
2265 to core dump. Problem reported by Antonio Rus in
161a71f3 2266 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00058.html>.
4196b931 2267
3ae831b4
AD
22682003-01-13 Akim Demaille <akim@epita.fr>,
2269 Quoc Peyrot <chojin@lrde.epita.fr>,
2270 Robert Anisko <anisko_r@lrde.epita.fr>
2271
2272 * data/lalr1.cc (parse::yyerrlab1): When popping the stack, stop
2273 when the stacks contain one element, as the loop would otherwise
2274 free the last state, and then use the top state (the one we just
2275 popped). This means that the initial elements will not be freed
2276 explicitly, as is the case in yacc.c; it is not a problem, as
2277 these elements have fake values.
2278
e3aa65c5
PE
22792003-01-11 Paul Eggert <eggert@twinsun.com>
2280
2281 * NEWS: %expect-violations are now just warnings, reverting
2282 to Bison 1.30 and 1.75 behavior. This fixes the GCC 3.2
2283 bootstrapping problem reported by Matthias Klose; see
161a71f3 2284 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00053.html>.
e3aa65c5
PE
2285 * src/conflicts.c (conflicts_print): Likewise.
2286 * tests/conflicts.at (%expect not enough, %expect too much,
2287 %expect with reduce conflicts): Likewise.
2288 * doc/bison.texinfo (Expect Decl): Document this. Also mention
2289 that the warning is enabled if the number of conflicts changes
2290 (not necessarily increases).
2291
2292 * src/getargs.c (version): Update copyright year.
2293
f0057011
AD
22942003-01-09 Akim Demaille <akim@epita.fr>
2295
2296 * src/Makefile.am, lib/Makefile.am: Use $(VAR) instead of @VAR@.
2297
1ee6d2a0
PE
22982003-01-08 Paul Eggert <eggert@twinsun.com>
2299
2300 * Makefile.maint (WGETFLAGS):
2301 New macro, containing "-C off" to disable proxy caches.
2302 All uses of $(WGET) changed to $(WGET) $(WGETFLAGS).
2303 (rel-check): Use $(WGET) instead of wget.
2304
d4fd77c4
PE
23052003-01-06 Paul Eggert <eggert@twinsun.com>
2306
2307 * doc/bison.texinfo (Generalized LR Parsing): Add a reference to
2308 the GLR paper of Scott, Johnstone and Hussain.
2309
464c6927
PE
23102003-01-04 Paul Eggert <eggert@twinsun.com>
2311
d600ee67
PE
2312 * configure.ac (AC_ARG_ENABLE): Add --disable-yacc.
2313 (YACC_SCRIPT, YACC_LIBRARY): New vars to AC_SUBST.
2314 * lib/Makefile.am (lib_LIBRARIES): liby.a -> @YACC_LIBRARY@.
2315 (EXTRA_LIBRARIES): New var, for liby.a.
2316 * src/Makefile.am (bin_SCRIPTS): yacc -> @YACC_SCRIPT@.
2317 (EXTRA_SCRIPTS): New var, for yacc.
2318
464c6927
PE
2319 * data/yacc.c (yyerrlab1): Omit attribute if __cplusplus is defined,
2320 since GNU C++ (as of 3.2.1) does not allow attributes on labels.
2321 Problem reported by Nelson H. F. Beebe.
2322
23232003-01-03 Paul Eggert <eggert@twinsun.com>
2324
2325 * lib/obstack.h (__INT_TO_PTR) [__STDC__]: Cast result to
2326 (void *) to avoid diagnostic with native c89 on SGI IRIX 6.5
2327 when compiling Bison 1.875's `bitset bset = obstack_alloc
2328 (bobstack, bytes);'. Problem reported by Nelson H. F. Beebe.
2329
2330 * src/scan-skel.l (QPUTS): Omit redundant `;' from macro definition.
2331 ([^@\n]): Renamed from [^@\n]+ so that the token buffer does not
2332 grow to a huge size with typical invocation.
d600ee67 2333
464c6927
PE
2334 * lib/hash.c (_Bool, bool, false, true, __bool_true_false_are_defined):
2335 Use the pattern recommended by Autoconf 2.57, except also protect
2336 against double-definition.
2337 * src/system.h: Likewise.
2338 Portability issues reported by Nelson H. F. Beebe.
d600ee67 2339
464c6927
PE
2340 * data/glr.c (yybool): Renamed from bool, to avoid collisions in C.
2341 All uses changed. Provide a definition in both C and C++.
2342 (yytrue, yyfalse): Define even if defined (__cplusplus).
2343
2344 * lib/bitset_stats.c (bitset_stats_list): Remove unused var.
2345 Reported by Nelson H. F. Beebe.
d600ee67 2346
464c6927
PE
2347 * src/scan-skel.l ("@oline@"): Output lineno+1, not lineno.
2348
0f42c7d5
PE
23492003-01-02 Paul Eggert <eggert@twinsun.com>
2350
2351 * data/yacc.c (yyerrlab1): Append `;' after attribute, to
2352 pacify the buggy "smart preprocessor" in MacOS 10.2.3.
2353 Bug reported by Nelson H. F. Beebe.
2354
dc546b0f
PE
23552003-01-01 Paul Eggert <eggert@twinsun.com>
2356
2357 * Version 1.875.
2358
2c09b6a7
PE
23592002-12-30 Paul Eggert <eggert@twinsun.com>
2360
2361 * src/scan-gram.l (<INITIAL,SC_AFTER_IDENTIFIER,SC_PRE_CODE>","):
2362 Moved here from...
2363 (<INITIAL>","): Here. This causes stray "," to be treated
2364 more uniformly.
2365
dc546b0f 2366 * src/scan-gram.l (<SC_BRACED_CODE>"}"): Output ";" before the
2c09b6a7
PE
2367 last brace in braced code when not in Yacc mode, for compatibility
2368 with Bison 1.35. This resurrects the 2001-12-15 patch to
2369 src/reader.c.
2370
2371 * src/reader.h (YYDECL): Use YYSTYPE, not its deprecated alias
2372 yystype. This follows up the 2002-12-24 YYSTYPE bug fix.
2373
535c0f63
PE
23742002-12-28 Paul Eggert <eggert@twinsun.com>
2375
2376 * src/symtab.c (symbol_make_alias): Set type of SYMVAL to be
2377 that of SYM's type. This fixes Debian bug 168069, reported by
2378 Thomas Olsson.
d600ee67 2379
963fcc17
PE
23802002-12-28 Paul Eggert <eggert@twinsun.com>
2381
2382 Version 1.75f.
2383
2384 Switch back to the Yacc style of conflict reports, undoing some
2385 of the 2002-07-30 change.
2386 * doc/bison.texinfo (Understanding): Use Yacc style for
2387 conflict reports. Also, use new way of locating rules.
2388 * src/conflicts.c (conflict_report):
2389 Renamed from conflict_report_yacc, removing the old
2390 'conflict_report'. Translate the entire conflict report at once,
2391 so that we don't assume that "," has the same interpretation in
2392 all languages.
2393 (conflicts_output): Use Yacc-style conflict report for each state,
2394 instead of our more-complicated style.
2395 (conflicts_print): Use Yacc-style conflict report, except print
2396 the input file name when not emulating Yacc.
2397 * tests/conflicts.at (Unresolved SR Conflicts, Defaulted
2398 Conflicted Reduction, %expect not enough, %expect too much,
2399 %expect with reduce conflicts): Switch to Yacc-style conflict reports.
2400 * tests/existing.at (GNU Cim Grammar): Likewise.
2401 * tests/glr-regr1.at (Badly Collapsed GLR States): Likewise.
2402
2403 * src/complain.c (warn_at, warn, complain_at, complain, fatal_at,
2404 fatal): Don't invoke fflush; it's not needed and it might even be
2405 harmful for stdout, as stdout might not be open.
2406 * src/reduce.c (reduce_print): Likewise.
2407
b1efe548
PE
24082002-12-27 Paul Eggert <eggert@twinsun.com>
2409
2410 Fix a bug where error locations were not being recorded correctly.
2411 This problem was originally reported by Paul Hilfinger in
161a71f3 2412 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00086.html>.
b1efe548
PE
2413
2414 * data/yacc.c (yyparse): New local var yylerrsp, to record the
2415 top of the location stack's error locations.
2416 (yyerrlab): Set it. When discarding a token, push its location
2417 onto yylerrsp so that we don't lose track of the error's end.
2418 (yyerrlab1): Now is only the target of YYERROR, so that we can
2419 properly record the location of the action that failed. For GCC
2420 2.93 and later, insert an __attribute__ ((__unused__)) to avoid
2421 GCC warning about yyerrlab1 being unused if YYERROR is unused.
2422 (yyerrlab2): New label, which yyerrlab now falls through to.
2423 Compute the error's location by applying YYLLOC_DEFAULT to
2424 the locations of all the symbols that went into the error.
2425 * doc/bison.texinfo (Location Default Action): Mention that
2426 YYLLOC_DEFAULT is also invoked for syntax errors.
2427 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
2428 Error locations include the locations of all the tokens that were
2429 discarded, not just the last token.
d600ee67 2430
983c5c2c
PE
24312002-12-26 Paul Eggert <eggert@twinsun.com>
2432
b1efe548
PE
2433 * src/files.c: Include quote.h.
2434 (compute_output_file_names): Warn if we detect conflicting
2435 outputs to the same file. This should catch the misunderstanding
2436 exemplified by Debian Bug 165349, reported by Bruce Stephens..
2437
2438 * src/conflicts.c (conflicts_print): If the user specifies
2439 "%expect N", report an error if there are any reduce/reduce
2440 conflicts. This is what the manual says should happen.
2441 This fixes Debian bug 130890, reported by Anthony DeRobertis.
2442 * tests/conflicts.at (%expect with reduce conflicts): New test.
2443
983c5c2c
PE
2444 Don't use m4_include on relative file names, as it doesn't work as
2445 desired if there happens to be a file with that name under ".".
d600ee67 2446
983c5c2c
PE
2447 * m4sugar/version.m4: Remove; it was included but it wasn't used.
2448 * data/Makefile.am (dist_m4sugar_DATA): Remove m4sugar/version.m4.
2449 * data/m4sugar/m4sugar.m4: Don't include m4sugar/version.m4.
2450 * data/glr.c, data/lalr1.cc, data/yacc.c: Don't include c.m4.
2451 * src/output.c (output_skeleton): Use full path names when
2452 specifying a file to include; don't rely on include path, as
2453 it's unreliable when the working file contains a file with
2454 that name.
d600ee67 2455
983c5c2c
PE
24562002-12-25 Paul Eggert <eggert@twinsun.com>
2457
2458 Remove obsolete references to bison.simple and bison.hairy.
2459 Problem mentioned by Aubin Mahe in
161a71f3 2460 <http://lists.gnu.org/archive/html/help-bison/2002-12/msg00010.html>.
983c5c2c
PE
2461 * data/glr.c: Comment fix.
2462 * doc/bison.1: Remove references. Also, mention "yacc".
2463
2464 * src/getargs.c (getargs) [MSDOS]: Don't assume optarg != NULL
2465 with -g option.
2466
2467 * src/parse-gram.y (declaration): Use enum "report_states" rather
2468 than its numeric value 1.
2469
2470 * src/scan-skel.l ("@output ".*\n): Close any old yyout before
2471 opening a new one. This fixes Debian bug 165349, reported by
2472 Bruce Stephens.
2473
23f2d9dc
PE
24742002-12-24 Paul Eggert <eggert@twinsun.com>
2475
2476 Version 1.75e.
2477
2478 * Makefile.maint (cvs-update): Don't assume that the shell
2479 supports $(...), as Solaris sh doesn't.
2480
2481 * src/parse-gram.y (lloc_default): Remove test for empty
2482 nonterminals at the end, since it didn't change the result.
2483
24842002-12-24 Paul Eggert <eggert@twinsun.com>
33167b8b
PE
2485
2486 If the user does not define YYSTYPE as a macro, Bison now declares it
2487 using typedef instead of defining it as a macro. POSIX requires this.
2488 For consistency, YYLTYPE is also declared instead of defined.
2489
2490 %union directives can now have a tag before the `{', e.g., the
2491 directive `%union foo {...}' now generates the C code
2492 `typedef union foo { ... } YYSTYPE;'; this is for Yacc compatibility.
2493 The default union tag is `YYSTYPE', for compatibility with Solaris 9
2494 Yacc. For consistency, YYLTYPE's struct tag is now `YYLTYPE'
2495 instead of `yyltype'.
2496
2497 `yystype' and `yyltype' are now obsolescent macros instead of being
2498 typedefs or tags; they are no longer documented and will be
2499 withdrawn in a future release.
2500
2501 * data/glr.c (b4_location_type): Remove.
2502 (YYSTYPE): Renamed from yystype.
2503 (YYSTYPE_IS_DECLARED): New macro, used to prevent double-typedef.
2504 (struct YYLTYPE): Renamed from struct yyltype.
2505 (YYLTYPE): Renamed from yyltype.
2506 (yyltype, yystype): New (and obsolescent) macros,
2507 for backward compatibility.
2508 * data/yacc.c: Likewise.
2509
2510 * data/yacc.c (YYSTYPE): Declare as union YYSTYPE if the user
2511 does not specify a union tag. This is for compatibility with
2512 Solaris 9 yacc.
2513
2514 * src/parse-gram.y (add_param): 2nd arg is now char * not char
2515 const *, since it is now modified by stripping surrounding { }.
2516 (current_braced_code): Remove.
2517 (PERCENT_DESTRUCTOR, PERCENT_PRINTER, PERCENT_UNION,
2518 PERCENT_LEX_PARAM, PERCENT_PARSE_PARAM): Change names to include
2519 trailing " {...}". Now of type <chars>.
2520 (grammar_declaration): Adjust to bundled tokens.
2521 (code_content): Remove; stripping is now done by add_param.
2522 (print_token_value): Print contents of bundled tokens.
2523 (token_name): New function.
2524
2525 * src/reader.h (braced_code, current_braced_code): Remove.
2526 (token_name): New decl.
2527
2528 * src/scan-gram.l (handle_dollar, handle_at): Now takes int
2529 token_type, not braced_code code_kind. All uses changed.
2530 (SC_PRE_CODE): New state, for scanning after a keyword that
2531 has (or usually has) an immediately-following braced code.
2532 (token_type): New local var, to keep track of which token type
2533 to return when scanning braced code.
2534 (<INITIAL>"%destructor", <INITIAL>"%lex-param",
dc546b0f 2535 <INITIAL>"%parse-param", <INITIAL>"%printer",
33167b8b
PE
2536 <INITIAL>"%union"): Set token type and BEGIN SC_PRE_CODE
2537 instead of returning a token type immediately.
2538 (<INITIAL>"{"): Set token type.
2539 (<SC_BRACED_CODE>"}"): Use it.
2540 (handle_action_dollar, handle_action_at): Now returns bool
2541 indicating success. Fail if ! current_rule; this prevents a core dump.
2542 (handle_symbol_code_dollar, handle_symbol_code_at):
2543 Remove; merge body into caller.
2544 (handle_dollar, handle_at): Complain in invalid contexts.
2545
2546 * NEWS, doc/bison.texinfo: Document the above.
2547 * NEWS: Fix years and program names in copyright notice.
2548
879ca4f8
PE
25492002-12-17 Paul Eggert <eggert@twinsun.com>
2550
2551 * NEWS, doc/bison.texinfo (Parser Function, Pure Calling, Error
2552 Reporting, Table of Symbols): Omit mentions of %lex-param and
2553 %parse-param from the documentation for now.
2554
1c5fe69d
PE
25552002-12-15 Paul Eggert <eggert@twinsun.com>
2556
2557 Undo most of the 2002-11-12 yychar -> yytoken patch, as it broke
2558 GCC 3.2.1 (which depends on yychar == YYEMPTY when there is no
2559 lookahead symbol, and which sets yychar in parser actions) and it
7ea9026a
PE
2560 disagreed with the Bison documentation. Bug
2561 reported by Andrew Walrond.
d600ee67 2562
1c5fe69d
PE
2563 * data/yacc.c (YYTRANSLATE): Don't check for negative argument,
2564 as the caller now does that.
2565 (yyclearin, YYBACKUP, yyparse): Use yychar, not yytoken.
2566 (YYEMPTY): Parenthesize right hand side, since others use it.
2567 (yyparse): Don't assume that our generated code is the only code
2568 that sets yychar.
2569
d1de5372
PE
25702002-12-13 Paul Eggert <eggert@twinsun.com>
2571
2572 Version 1.75d.
2573
2574 POSIX requires a "yacc" command.
2575 * src/Makefile.am (bin_SCRIPTS): New macro, for yacc.
2576 (MOSTLYCLEANFILES): Add yacc.
2577 (yacc): New rule.
1c5fe69d 2578 * doc/bison.texinfo (Invocation, Bison Options): Mention yacc
d1de5372
PE
2579 as an alias for bison y.
2580
2581 * po/LINGUAS: Add da.
d600ee67 2582
d1de5372
PE
2583 * src/getargs.c (__GNU_LIBRARY__) [lint]: Define to work around
2584 problem with latest <getopt.h>.
2585 (HACK_FOR___GNU_LIBRARY___PROTOTYPE): New macro.
2586
2587 * doc/fdl.texi: Upgrade to 1.2.
2588 * lib/alloca.c, lib/error.c, lib/getopt.c, lib/getopt.h
2589 lib/getopt1.c, lib/gettext.h, lib/memrchr.c, lib/obstack.c,
2590 lib/obstack.h, lib/strnlen.c, lib/unlocked-io.h: Sync with
2591 gnulib.
2592 * config/install-sh: Sync with autotools.
2593
2594 Fix a bad interaction with flex 2.5.23 reported by Bruce Lilly in
161a71f3 2595 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00114.html>.
d1de5372
PE
2596 * data/yacc.c (YYLTYPE, struct yyltype): Do not define unless
2597 locations are requested.
2598 (union yyalloc): Do not depend on YYLTYPE_IS_TRIVIAL unless
2599 locations are requested.
2600
d0f3fe23
PE
26012002-12-12 Paul Eggert <eggert@twinsun.com>
2602
2603 Remove unportable casts and storage allocation tricks.
2604 While we're at it, remove almost all casts, since they
2605 usually aren't needed and are a sign of trouble.
2606
2607 * configure.ac (AC_CHECK_TYPES): Check for uintptr_t.
2608
2609 * src/derives.c (derives_compute): Do not subtract NTOKENS from
2610 the pointer DSET returned by malloc; this isn't portable.
2611 Instead, always use DSET[i - NTOKENS] rather than DSET[i].
2612 Similarly for DERIVES.
2613 * src/lalr.c (set_goto_map): Likewise, for GOTO_MAP and TEMP_MAP.
2614 * src/nullable.c (nullable_compute): Likewise, for RSETS and NULLABLE.
2615 * src/reduce.c (reduce_grammar_tables): Likewise, for nontermmap
2616
2617 * src/derives.c (derives_compute): Do not bother invoking
2618 int_of_rule_number, since rule numbers are integers.
2619
2620 * src/files.c (concat2, tr, compute_base_name): Use xmalloc (N)
2621 rather than XMALLOC (char, N).
2622
2623 * src/files.c (filename_split): Rewrite to avoid cast.
2624
2625 * src/gram.h (symbol_number_as_item_number,
2626 item_number_as_symbol_number, rule_number_as_item_number,
2627 item_number_as_rule_number):
2628 Now inline functions rather than macros, to avoid casts.
2629 * src/state.h (state_number_as_int): Likewise.
2630 * src/tables.c (state_number_to_vector_number,
2631 symbol_number_to_vector_number): Likewise.
2632
2633 * src/gram.h (int_of_rule_number): Remove; no longer used.
2634
2635 * src/lalr.c (add_lookback_edge): Use malloc rather than calloc,
2636 since the resulting storage is always stored into.
2637
2638 * src/main.c (alloca) [C_ALLOCA]: Add decl here, the only place
2639 where it's needed.
2640
2641 * src/muscle_tab.c (muscle_m4_output):
2642 Now inline. Return bool, not int.
2643 * src/state.c (state_compare): Likewise.
2644 * src/symtab.c (symbol_check_defined,
2645 symbol_check_alias_consistency, symbol_pack, symbol_translation,
2646 hash_compare_symbol, hash_symbol):
2647 Likewise.
2648 * src/uniqstr.c (uniqstr_print): Likewise.
2649 * src/muscle_tab.c (muscle_m4_output_processor):
2650 New function, to avoid casts.
2651 * src/state.c (state_comparator, stage_hasher): Likewise.
2652 * src/symtab.c (symbol_check_defined_processor,
2653 symbol_check_alias_consistency_processor, symbol_pack_processor,
2654 symbol_translation_processor, hash_symbol_comparator,
2655 hash_symbol_hasher): Likewise.
2656 * src/uniqstr.c (uniqstr_print_processor): Likewise.
2657 * src/muscle_tab.c (muscles_m4_output):
2658 Use new functions instead of casting old functions unportably.
2659 * src/state.c (state_hash_new): Likewise.
2660 * src/symtab.c (symbols_new, symbols_do, symbols_check_defined,
2661 symbols_token_translations_init):
2662 Likewise.
2663 * src/uniqstr.c (uniqstrs_new, hash_initialize, uniqstrs_do): Likewise.
2664
2665 * src/output.c (GENERATE_MUSCLE_INSERT_TABLE): Use long local
2666 var instead of casting to long, to avoid casts.
2667 (prepare_states): Use MALLOC rather than alloca, so that we don't
2668 have to worry about alloca.
2669 * src/state.c (state_hash_lookup): Likewise.
2670
2671 * src/scan-gram.l (<SC_ESCAPED_CHARACTER>"'"): Use unsigned char
2672 local var instead of casting to unsigned char, to avoid casts.
2673
2674 * src/state.c (TRANSITIONS_ALLOC, ERRS_ALLOC, REDUCTIONS_ALLOC,
2675 STATE_ALLOC): Remove.
2676 (transitions_new, errs_new, reductions_new, state_new): Use malloc
2677 rather than calloc, and use offsetof to avoid allocating slightly
2678 too much storage.
2679 (state_new): Initialize all members.
2680
2681 * src/state.c (state_hash): Use unsigned accumulator, not signed.
2682
2683 * src/symtab.c (symbol_free): Remove; unused.
2684 (symbol_get): Remove cast in lhs of assignment.
2685 (symbols_do): Now static. Accept generic arguments, not
2686 hashing-related ones.
2687
2688 * src/symtab.h: (NUMBER_UNDEFINED): Remove unnecessary cast.
2689 (symbol_processor): Remove.
2690 (symbols_do): Remove decl; now static.
2691
2692 * src/system.h (alloca): Remove; decl no longer needed.
2693 (<stddef.h>): Include, for offsetof.
2694 (<inttypes.>, <stdint.h>): Include if available.
2695 (uintptr_t): New type, if system lacks it.
2696 (CALLOC, MALLOC, REALLOC): New macros.
2697 All uses of XCALLOC, XMALLOC, and XREALLOC changed to use these
2698 new macros.
2699
2700 * src/tables.c (table_size): Now int, to pacify GCC.
2701 (table_grow, table_ninf_remap): Use signed table size.
2702 (save_row): Don't bother initializing locals when not needed.
2703 (default_goto, goto_actions, pack_vector): Remove unnecessary casts.
2704 * src/uniqstr.c (hash_compare_uniqstr): Likewise.
2705
2706 * src/vcg.h: Correct misspellings.
2707
2708 * src/vcg_defaults.h (G_CMAX): Now INT_MAX.
2709
2710
2711 * src/getargs.c (getargs): Don't assume EOF == -1.
2712
26b4a969
PE
27132002-12-09 Paul Eggert <eggert@twinsun.com>
2714
2715 Change identifier spellings to avoid collisions with names
2716 that are reserved by POSIX.
2717
2718 Don't use names ending in _t, since POSIX reserves them.
2719 For consistency, remove _e and _s endings -- they're weren't
2720 needed to remove ambiguity. All uses changed.
2721 * src/uniqstr.h (uniqstr): Renamed from uniqstr_t, which in
2722 turn was just renamed from struniq_t.
2723 * src/uniqstr.c (uniqstr_processor): Renamed from struniq_processor,
2724 which in turn was just renamed from struniq_processor_t.
2725 (hash_compare_uniqstr): Renamed from hash_compare_struniq, which
2726 in turn was renamed from hash_compare_struniq_t.
2727 * src/LR0.c (struct state_list): Renamed from struct state_list_s.
2728 (state_list): Renamed from state_list_t.
2729 * src/assoc.h (assoc): Renamed from assoc_t.
2730 * src/conflicts.c (enum conflict_resolution): Renamed from
2731 enum conflict_resolution_e.
2732 * src/derives.c (struct rule_list): Renamed from struct rule_list_s.
2733 (rule_list): Renamed from rule_list_t.
2734 * src/getargs.h (enum trace): Renamed from enum trace_e.
2735 (enum report): Renamed from enum report_e.
2736 * src/gram.h (item_number): Renamed from item_number_t.
2737 (rule_number): Renamed from rule_number_t.
2738 (struct rule_s): Remove the "rule_s" part; not used.
2739 (rule): Renamed from rule_t.
2740 (rule_filter): Renamed from rule_filter_t.
2741 * src/lalr.c (struct goto_list): Renamed from struct goto_list_s.
2742 (goto_list): Renamed from goto_list_t.
2743 * src/lalr.h (goto_number): Renamed from goto_number_t.
2744 * src/location.h (location): Renamed from location_t.
2745 * src/muscle_tab.c (muscle_entry): Renamed from muscle_entry_t,
2746 and moved here from:
2747 * src/muscle_tab.h (muscle_entry_t): here.
2748 * src/nullable.c (struct rule_list): Renamed from struct rule_list_s.
2749 (rule_list): Renamed from rule_list_t.
2750 * src/print_graph.c (static_graph): Renamed from graph.
2751 * src/reader.h (braced_code): Renamed from braced_code_t.
2752 Remove brace_code_e tag.
2753 * src/relation.h (relation_node): Renamed from relation_node_t.
2754 (relation_nodes): Renamed from relation_nodes_t.
2755 (relation): Renamed from relation_t.
2756 * src/state.h (state_number): Renamed from state_number_t.
2757 (struct state): Renamed from struct state_s.
2758 (state): Renamed from state_t.
2759 (transitions): Renamed from transitions_t. Unused (and
2760 misspelled) transtion_s tag removed.
2761 (errs): Renamed from errs_t. Unused errs_s tag removed.
2762 (reductions): Renamed from reductions_t. Unused tag
2763 reductions_s removed.
2764 * src/symlist.h (symbol_list): Renamed from symbol_list_t.
2765 (struct symbol_list): Renamed from struct symbol_list_s.
2766 * src/symtab.h (symbol_number): Renamed from symbol_number_t.
2767 (struct symbol): Renamed from struct symbol_s.
2768 (symbol): Renamed from symbol_t.
2769 * src/tables.c (vector_number): Renamed from vector_number_t.
2770 (action_number): Renamed from action_t.
2771 * src/tables.h (base_number): Renamed from base_t.
2772 * src/vcg.h (enum color): Renamed from enum color_e.
2773 (enum textmode): Renamed from enum textmode_e.
2774 (enum shape): Renamed from enum shape_e.
2775 (struct colorentry): Renamed from struct colorentry_s.
2776 (struct classname): Renamed from struct classname_s.
2777 (struct infoname): Renamed from struct infoname_s.
2778 (enum layoutalgorithm): Renamed from enum layoutalgorithm_e.
2779 (enum decision): Renamed from enum decision_e.
2780 (enum orientation): Renamed from enum orientation_e.
2781 (enum alignment): Renamed from enum alignment_e.
2782 (enum arrow_mode): Renamed from enum arrow_mode_e.
2783 (enum crossing_type): Renamed from enum crossing_type_e.
2784 (enum view): Renamed from enum view_e.
2785 (struct node): Renamed from struct node_s.
2786 (node): Renamed from node_t.
2787 (enum linestyle): Renamed from enum linestyle_e.
2788 (enum arrowstyle): Renamed from enum arrowstyle_e.
2789 (struct edge): Renamed from struct edge.
2790 (edge): Renamed from edge_t.
2791 (struct graph): Renamed from struct graph_s.
2792 (graph): Renamed from graph_t.
2793 * tests/calc.at (_AT_DATA_CALC_Y, Simple LALR Calculator):
2794 Rename value_t -> value.
2795 * tests/input.at (Torturing the Scanner): Rename value_t -> value,
2796 value_t_as_yystype -> value_as_yystype.
2797
2798 Don't include <errno.h> in the mainstream code, since it
2799 reserves E[A-Z0-9]* and we want to use symbols like 'EQUALS'.
2800 * lib/get-errno.c, lib/get-errno.h: New files.
2801 * lib/Makefile.am (libbison_a_SOURCES): Add get-errno.h,
2802 get-errno.c.
2803 * src/files.c (xfopen, xfclose): Use get_errno instead of errno.
2804 * src/output.c (output_skeleton): Likewise.
2805 * src/scan-gram.l (<INITIAL>{int}): Use set_errno and get_errno
2806 instead of errno.
2807 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>\\x[0-9abcdefABCDEF]+):
2808 Likewise.
2809 (handle_action_dollar, handle_action_at): Likewise.
2810 * src/system.h: Do not include <errno.h>.
2811 (TAB_EXT): Renamed from EXT_TAB.
2812 (OUTPUT_EXT): Renamed from EXT_OUTPUT.
2813
2814 Avoid str[a-z]*, since <string.h> reserves that name space.
2815 Change all instances of "struniq" in names to "uniqstr", and
2816 likewise for "STRUNIQ" and "UNIQSTR".
2817 * src/uniqstr.c: Renamed from src/struniq.c.
2818 * src/uniqstr.h: Renamed from src/struniq.h.
2819 * src/Makefile.am (bison_SOURCES): Adjust to these renamings.
2820 * src/files.c (strsuffix): Remove; unused.
2821 (concat2): Renamed from stringappend. Now static.
2822 * src/files.h (strsuffix, stringappend): Remove; unused.
2823 * src/parse-gram.y (<chars>): Renamed from <string>.
2824 (<uniqstr>): Renamed from <struniq>.
2825 * src/scan-gram.l (obstack_for_string): Renamed from string_obstack.
2826 * src/vcg.h (struct node_s.expand): Renamed from struct node_s.stretch.
2827 (struct graph_s.expand): Renamed from struct graph_s.stretch.
2828 * src/vcg_defaults.h (G_EXPAND): Renamed from G_STRETCH.
2829 (G_LONG_STRAIGHT_PHASE): Renamed from G_STRAIGHT_PHASE.
2830 (N_EXPAND): Renamed from N_STRETCH.
2831
2832 Avoid *_MAX and *_MIN, since <limits.h> reserves that name space.
2833 * data/yacc.c (YYSTACK_GAP_MAXIMUM): Renamed from YYSTACK_GAP_MAX.
2834 * src/gram.h (ITEM_NUMBER_MAX, ITEM_NUMBER_MIN, RULE_NUMBER_MAX):
2835 Remove; unused.
2836 * src/lalr.h (GOTO_NUMBER_MAXIMUM): Renamed from GOTO_NUMBER_MAX.
2837 * src/state.h (STATE_NUMBER_MAXIMUM): Renamed from STATE_NUMBER_MAX.
2838 * src/symtab.h (SYMBOL_NUMBER_MAXIMUM): Renamed from SYMBOL_NUMBER_MAX.
2839 * src/tables.c (VECTOR_NUMBER_MAX, VECTOR_NUMBER_MIN): Remove; unused.
2840 (BASE_MAXIMUM): Renamed from BASE_MAX.
2841 (BASE_MINIMUM): Renamed from BASE_MIN.
2842 (ACTION_MAX): Remove; unused.
2843 (ACTION_NUMBER_MINIMUM): Renamed from ACTION_MIN.
2844 Unnecessary casts removed from above defines.
2845
2846
2847 Fix misspelling in names.
2848 * src/vcg.h (enum_alignment_e): Renamed from enum_alignement_e.
2849 * src/vcg_defaults.h (G_NODE_ALIGNMENT): Renamed from
2850 G_NODE_ALIGNEMENT.
2851
2852
2853 * lib/timevar.c (timevar_report): Renamed from time_report,
2854 for consistency with other names.
2855 * lib/timevar.h (timevar_report): New decl.
2856 * src/system.h (time_report): Remove; decl is now in lib/timevar.h.
2857
2858
2859 Sort include-file uses.
2860
2861 Reorder all include files under src to be in the order "system.h".
2862 then the ../lib include files in angle brackets (alphabetized),
2863 then the . include files in double-quotes (alphabetized). Fix
2864 dependency breakages encountered in this process, as follows:
2865 * src/closure.h, src/derives.h, src/state.h: Include "gram.h".
2866 * src/complain.c: Don't include stdlib.h, string.h _LIBC stuff.
2867 * src/state.h: Include "symtab.h".
2868
996b1c7e
PE
28692002-12-08 Paul Eggert <eggert@twinsun.com>
2870
2871 * data/glr.c, data/lalr1.cc, data/yacc.c: Do not use __file__,
2872 since this causes problems when __file__ contains character
2873 sequences like "@" that are treated specially by src/scan-skel.l.
2874 Instead, just use the file's basename. This fixes the bug
2875 reported by Martin Mokrejs in
161a71f3 2876 <http://lists.gnu.org/archive/html/bug-bison/2002-12/msg00007.html>.
996b1c7e 2877
e19c4e5d
PE
28782002-12-06 Paul Eggert <eggert@twinsun.com>
2879
2880 Add support for rules that do not have trailing semicolons, as
2881 POSIX requires. Improve the quality of locations in Bison
2882 diagnostics.
26b4a969 2883
e19c4e5d
PE
2884 * src/location.c: Include <quotearg.h>.
2885 (empty_location): Now const.
2886 (location_print): New function. Follow the recommendation of the
2887 GNU Coding Standards for locations that span file boundaries.
2888 * src/location.h: Do not include <quotearg.h>; no longer needed.
2889 (boundary): New type.
2890 (location_t): Use it. This allows locations to span file boundaries.
2891 All member uses changed: file -> start.file or end.file (as needed),
2892 first_line -> start.line, first_column -> start.column,
2893 last_line -> end.line, last_column -> end.column.
2894 (equal_boundaries): New function.
2895 (LOCATION_RESET, LOCATION_STEP): Remove.
2896 (LOCATION_PRINT): Remove. All callers changed to use location_print.
2897 (empty_location): Now const.
2898 (location_print): New decl.
2899 * src/parse-gram.y (lloc_default): New function, which handles
2900 empty locations more accurately.
2901 (YYLLOC_DEFAULT): Use it.
2902 (%token COLON): Remove.
2903 (%token ID_COLON): New token.
26b4a969 2904 (rules): Use it.
e19c4e5d
PE
2905 (declarations, rules): Remove trailing semicolon.
2906 (declaration, rules_or_grammar_declaration):
2907 Allow empty (";") declaration.
2908 (symbol_def): Remove empty actions; no longer needed.
2909 (rules_or_grammar_declaration): Remove trailing semicolon.
2910 (semi_colon.opt): Remove.
2911 * src/reader.h: Include location.h.
2912 (scanner_cursor): New decl.
2913 * src/reduce.c (nonterminals_reduce): Use warn_at rather than
2914 rolling our own.
2915 * src/scan-gram.l (YY_USER_INIT): Initialize scanner_cursor instead
2916 of *loc.
2917 (STEP): Remove. No longer needed, now that adjust_location does
2918 the work. All uses removed.
2919 (scanner_cursor): New var.
2920 (adjust_location): Renamed from extend_location. It now sets
2921 *loc and adjusts the scanner cursor. All uses changed.
2922 Don't bother testing for CR.
2923 (handle_syncline): Remove location arg; now updates scanner cursor.
2924 All callers changed.
2925 (unexpected_end_of_file): Now accepts start boundary of token or
2926 comment, not location. All callers changed. Update scanner cursor,
2927 not the location.
2928 (SC_AFTER_IDENTIFIER): New state.
2929 (context_state): Renamed from c_context. All uses changed.
2930 (id_loc, code_start, token_start): New local vars.
2931 (<INITIAL,SC_AFTER_IDENTIFIER>): New initial context. Move all
2932 processing of Yacc white space and equivalents here.
2933 (<INITIAL>{id}): Save id_loc. Begin state SC_AFTER_IDENTIFIER
2934 instead of returning ID immediately, since we need to search for
2935 a subsequent colon.
2936 (<INITIAL>"'", "\""): Save token_start.
2937 (<INITIAL>"%{", "{", "%%"): Save code_start.
2938 (<SC_AFTER_IDENTIFIER>): New state, looking for a colon.
2939 (<SC_YACC_COMMENT>, <SC_COMMENT>, <SC_LINE_COMMENT>):
2940 BEGIN context_state at end, not INITIAL.
2941 (<SC_ESCAPED_STRING>"\"", <SC_ESCAPED_CHARACTER>"'",
2942 <SC_BRACED_CODE>"}", <SC_PROLOGUE>"%}", <SC_EPILOGUE><<EOF>>):
2943 Return correct token start.
2944 (<SC_BRACED_CODE,SC_PROLOGUE,SC_EPILOGUE>): Save start boundary when
2945 the start of a character, string or multiline comment is found.
2946 * tests/conflicts.at (S/R in initial, Defaulted Conflicted
2947 Reduction): Adjust reported locations to match the more-precise
2948 results now expected.
2949 * tests/input.at (Invalid $n, Invalid @n, Type Clashes): Likewise.
2950 * tests/reduce.at (Useless Rules, Reduced Automaton,
2951 Underivable Rules): Likewise.
2952 * tests/regression.at (Invalid inputs): No longer `expecting ";"
2953 or "|"' now that so many other tokens are allowed by the new grammar.
2954
2955 * src/complain.h (current_file): Remove duplicate decl;
2956 current_file is now owned by files.h.
2957 * src/complain.c, src/scan-gram.l: Include files.h.
2958
29592002-12-06 Paul Eggert <eggert@twinsun.com>
26b4a969 2960
e19c4e5d
PE
2961 * data/glr.c (yy_reduce_print): Don't assume that yyrline[yyrule]
2962 promotes to int; it might be unsigned int.
2963 * data/yacc.c (yy_reduce_print): Likewise.
2964
2965 * doc/bison.texinfo (Table of Symbols): YYERROR_VERBOSE should
2966 be #defined in the prologue, not in the Bison declarations.
2967 This fixes Debian Bug 102878, reported by Shaul Karl.
26b4a969 2968
b64755e3
PE
29692002-12-02 Paul Eggert <eggert@twinsun.com>
2970
2971 * configure.ac (AC_REPLACE_FUNCS): Add strtoul.
2972 * lib/strtoul.c: New file, from gnulib.
2973 This fixes a porting bug reported by Peter Klein in
161a71f3 2974 <http://lists.gnu.org/archive/html/bug-bison/2002-12/msg00000.html>.
b64755e3 2975
6e746484
PE
29762002-11-30 Paul Eggert <eggert@twinsun.com>
2977
b64755e3
PE
2978 * src/scan-gram.l (no_cr_read, extend_location): Move to epilogue,
2979 and put only a forward declaration in the prologue. This is for
2980 consistency with the other scanner helper functions.
2981
6ba55592
PE
2982 Type clashes now generate warnings, not errors, since it
2983 appears that POSIX may allow some grammars with type clashes.
2984 * src/reader.c (grammar_current_rule_check): Warn about
2985 type clashes instead of complaining.
2986 * tests/input.at (Type Clashes): Expect warnings, not complaints.
2987
6e746484
PE
2988 Add Yacc library, since POSIX requires it.
2989 * doc/bison.texinfo (Yacc Library): New node. Regenerate top menu.
2990 * lib/Makefile.am (lib_LIBRARIES, liby_a_SOURCES): New macros.
2991 * lib/main.c, lib/yyerror.c: New files.
2992
2993 gram_error can be static; it need not be extern.
2994 * src/reader.h (gram_error): Remove decl.
2995 * src/parse-gram.y (gram_error): Now static. Add static decl.
2996 (print_token_value): Omit parameter names from forward decl,
2997 for consistency.
2998
88510f9c
PE
29992002-11-29 Paul Eggert <eggert@twinsun.com>
3000
6e746484
PE
3001 * doc/bison.texinfo: Emphasize that yylex and yyerror must
3002 be declared before being used. E.g., one should typically
3003 declare them in the prologue. Use GNU coding style in examples.
3004 Put "const" consistently after the type it modifies. Mention
3005 that C99 supports "inline". Mention that yyerror traditionally
3006 returns "int".
3007
88510f9c
PE
3008 %parse-param and %lex-param now take just one argument, the
3009 declaration; the argument name is deduced from the declaration.
3010
3011 * doc/bison.texinfo (Parser Function, Pure Calling, Error
3012 Reporting, Table of Symbols): Document this.
3013 * src/parse-gram.y (add_param): New function.
3014 (COMMA): Remove.
3015 (declaration): Implement new rule for %parse-param and %lex-param.
3016 * src/scan-gram.l: "," now elicits a warning, rather than being
3017 a token; this is more compatible with byacc.
3018 * tests/calc.at (Simple LALR Calculator): Adopt new convention.
3019
bb92250c
PE
30202002-11-27 Paul Eggert <eggert@twinsun.com>
3021
3022 Rename identifiers to avoid real and potential collisions.
3023
3024 * data/c.m4 (b4_yysymprint_generate): yyout -> yyoutput,
3025 to avoid collision with lex macro described by Bruce Lilly in
161a71f3 3026 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00114.html>.
bb92250c
PE
3027 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise.
3028 * doc/bison.texinfo (Prologue, Tracing): yyprint -> print_token_value.
3029 * src/parse-gram.y (print_token_value): Renamed from yyprint.
3030 All uses changed.
3031 (YYPARSE_PARAM, YYLEX_PARAM, yycontrol): Remove. All uses changed.
3032 The name "yycontrol" violates the name space rules, and this stuff
3033 wasn't being used anyway.
3034 (input): Remove action; this stuff wasn't being used.
3035 (gram_error): Rename local variable yylloc -> loc.
3036 * src/reader.h (struct gram_control_s, gram_control_t): Remove.
3037 (YY_DECL): Don't use "yy" at start of local variables.
3038 All uses changed, e.g., yylloc -> loc.
3039 * src/scan-gram.l (STEP): Renamed from YY_STEP. All uses changed.
3040 (STRING_GROW): Renamed from YY_OBS_GROW. All uses changed.
3041 (STRING_FINISH): Renamed from YY_OBS_FINISH. All uses changed.
3042 (STRING_FREE): Renamed from YY_OBS_FREE. All uses changed.
3043
3044 * src/parse-gram.y (gram_error): loc is now const *.
3045 * src/reader.h (gram_error): Likewise.
3046
3af4feb2
PE
30472002-11-24 Paul Eggert <eggert@twinsun.com>
3048
3049 Version 1.75c.
3050
3051 * tests/actions.at (Actions after errors): Use an output format
3052 more similar to that of the Printers and Destructors test.
3053 Test the position of the ';' token too.
3054 (Printers and Destructors): Likewise.
3055 (Printers and Destructors: %glr-parser): Remove for now, to avoid
3056 unnecessarily alarming people when the test fails.
3057
3058 * data/yacc.c (yyerrlab1): Move this label down, so that the
3059 parser does not discard the lookahead token if the user code
3060 invokes YYERROR. This change is required for POSIX conformance.
3061
3062 * lib/error.c: Sync with gnulib.
3063
30642002-11-22 Paul Eggert <eggert@twinsun.com>
3065
3066 * lib/quotearg.c, lib/quotearg.h: Sync with gnulib.
3067 * lib/mbswidth.c, lib/mbswidth.h: Likewise.
3068 * lib/xmalloc.c: Likewise.
26b4a969 3069
58004308
PE
30702002-11-20 Paul Eggert <eggert@twinsun.com>
3071
3072 * lib/argmatch.c, lib/argmatch.h: Sync with gnulib.
3073
30742002-11-20 Paul Eggert <eggert@twinsun.com>
26b4a969 3075
58004308
PE
3076 Avoid use of <assert.h>, as the GNU Coding Standards hint that one
3077 should use `if (! x) abort ();' rather than `assert (x);', and
3078 anyway it's one less thing to worry about configuring.
3079
3080 * data/glr.c, lib/hash.c, src/system.h: Do not include <assert.h>.
3081 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise,
3082 and replace all instances of assert with abort.
3083 * tests/calc.at (_AT_DATA_CALC_Y): Likewise.
3084 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Likewise.
3085
3086 * data/glr.c (yydoAction, yyglrReduce, yysplitStack, yyresolveStates,
3087 yyresolveAction, yyprocessOneStack): Use abort rather than assert.
3088 * lib/hash.c (hash_lookup, hash_get_first, hash_get_next,
3089 hash_find_entry, hash_rehash, hash_insert): Likewise.
3090 * src/conflicts.c (resolve_sr_conflict): Likewise.
3091 * src/lalr.c (set_goto_map, map_goto): Likewise.
3092 * src/nullable.c (nullable_compute): Likewise.
3093 * src/output.c (prepare_rules, token_definitions_output): Likewise.
3094 * src/reader.c (packgram, reader): Likewise.
3095 * src/state.c (state_new, state_free, state_transitions_set,
3096 state_reduction_find): Likewise.
3097 * src/symtab.c (symbol_user_token_number_set, symbol_make_alias,
3098 symbol_pack): Likewise.
3099 * src/tables.c (conflict_row, pack_vector): Likewise.
3100 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str,
3101 get_layoutalgorithm_str, get_decision_str, get_orientation_str,
3102 get_node_alignement_str, get_arrow_mode_str, get_crossing_type_str,
3103 get_view_str, get_linestyle_str, get_arrowstyle_str): Likewise.
3104
3105 * lib/argmatch.h (ARRAY_CARDINALITY): Do not bother to #undef.
3106 (ARGMATCH_CONSTRAINT): New macro.
3107 (ARGMATCH_ASSERT): Use it.
3108
3109 * src/system.h (verify): New macro.
3110 * src/getargs.c (trace_argmatch, report_argmatch): Use verify
3111 rather than assert.
3112 * src/tables.c (tables_generate): Likewise.
3113
3114 * src/struniq.c (struniq_assert): Now returns void, and aborts
3115 if the assertion is false.
3116 (struniq_assert_p): Remove.
3117 * src/struniq.h: Likewise.
3118
76ae8198
PE
31192002-11-18 Paul Eggert <eggert@twinsun.com>
3120
3121 * data/glr.c (yygetLRActions): Replace `yyindex' with
3122 `yytable[yyindex]' to fix typo introduced in my 2002-11-09 patch.
3123 This fixes the regression with Sun ONE Studio 7 cc that I reported in
161a71f3 3124 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00077.html>.
76ae8198 3125
d3c4e709
AD
31262002-11-18 Akim Demaille <akim@epita.fr>
3127
3128 * doc/bison.texinfo (Tracing): `yyprint' shouldn't prepend a
3129 space.
3130 From Tim Van Holder.
3131
8d8a7238
PE
31322002-11-17 Paul Eggert <eggert@twinsun.com>
3133
3134 Pacify Sun ONE Studio 7 lint. Also, rename "ParseError"
3135 to "SyntaxError" for consistency with my 2002-11-15 change.
3136
3137 * data/glr.c (YYDPRINTF, YYDSYMPRINT, YYDSYMPRINTF) [!YYDEBUG]: Do
3138 not define to {}, since this breaks the common use of `YYDPRINTF
3139 ((...));' if a single statement is desired (e.g. before `else').
3140 Work around GCC warnings by surrounding corresponding calls with
3141 {} if needed.
3142 (yyhasResolvedValue): Remove unused function.
3143 (yymergeOptionSets, yyresolvStack): Use `continue;' for empty
3144 loop body.
3145 (yyreportSyntaxError): Renamed from yyreportParseError.
3146 (yyrecoverSyntaxError): Renamed from yyrecoverParseError.
3147 All uses changed.
3148 * tests/calc.at (_AT_DATA_CALC_Y): Make vars static instead of
3149 extern when possible. Remove unused initializations.
3150
b0937b22
AD
31512002-11-16 Akim Demaille <akim@epita.fr>
3152
3153 Augment the similarity between GLR and LALR traces.
3154
3155 * data/yacc.c (yy_stack_print, YY_STACK_PRINT, yy_reduce_print)
3156 (YY_REDUCE_PRINT): New.
3157 (yyparse): Use them.
3158 * data/glr.c (yy_reduce_print): Use YYFPRINTF, no need for
3159 YYDPRINT here.
3160 (yyglrReduce, yyrecoverParseError, yyparse): Don't report the
3161 state reached after the reduction/recovery, since...
3162 (yyparse, yyprocessOneStack): Report the state we are entering in.
3163
c5e3e510
AD
31642002-11-16 Akim Demaille <akim@epita.fr>
3165
3166 * src/getargs.h, src/getargs.c (trace_e, trace_args, trace_types):
3167 Add support for --trace=skeleton.
3168 * src/scan-skel.l: %option debug.
3169 Scan strings of non-@ or \n instead of character by character.
3170 (scan_skel): Handle trace_skeleton.
3171 (QPUTS): New.
3172 (@output_parser_name@, @output_header_name@): ``Restore'' their
3173 support (used to be M4 macros).
3174 * data/yacc.c: Quote larger chunks, a la glr.c.
3175 * data/lalr1.cc: Likewise.
3176 The header guards are no longer available, so use some other
3177 string than `YYLSP_NEEDED'.
3178
4c6cc1db
AD
31792002-11-16 Akim Demaille <akim@epita.fr>
3180
3181 Make the ``Printers and Destructors'' test more verbose, taking
3182 `yacc.c''s behavior as (possibly wrong) reference.
3183
3184 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Use printf
3185 instead of fprint on stdout.
3186 Set and report the last_line of the symbols.
3187 Consistently display values and locations.
3188
6d9e8019
PE
31892002-11-16 Paul Eggert <eggert@twinsun.com>
3190
3191 * data/yacc.c: Avoid over-quoting of __line__ and __file__.
3192
6e649e65
PE
31932002-11-15 Paul Eggert <eggert@twinsun.com>
3194
b25d88f6
PE
3195 * tests/actions.at (Actions after errors): New test case.
3196
6e649e65
PE
3197 * data/glr.c, data/lalr1.cc, data/yacc.cc, doc/bison.texinfo,
3198 src/conflicts.c, src/parse-gram.y, src/tables.c, src/tables.h,
3199 tests/action.at, tests/calc.at, tests/conflicts.at,
3200 tests/cxx-type.at, tests/regression.at:
3201 "parse error" -> "syntax error" for POSIX compatibility.
3202 "parsing stack overflow..." -> "parser stack overflow" so
3203 that code matches Bison documentation.
3204
0f39aab9
AD
32052002-11-15 Akim Demaille <akim@epita.fr>
3206
3207 * src/parse-gram.y (declaration): Have %parse-param and %lex-param
3208 take two BRACED_CODE, not two string_content.
3209 Free the scanner's obstack when we are done.
3210 (code_content): New.
3211 * tests/calc.at: Adjust.
3212 * doc/bison.texinfo: Adjust.
3213 Also, make sure to include the `,' for these declarations.
3214
761c1926
AD
32152002-11-15 Tim Van Holder <tim.van.holder@pandora.be>
3216
3217 * m4/prereq.m4: Removed the commented jm_PREREQ_HASH
3218 definition; avoids potential autoreconf problems.
3219
b0f98b10
AD
32202002-11-15 Akim Demaille <akim@epita.fr>
3221
3222 Always check the value returned by yyparse.
3223
3224 * tests/calc.at (_AT_DATA_CALC_Y): Have `main' exit with the value
3225 returned by yyparse.
3226 (_AT_CHECK_CALC_ERROR): Take the expected exit value as argument.
3227 Adjust calls.
3228 * tests/glr-regr1.at (glr-regr1.y): Have `main' exit with the value
3229 returned by yyparse.
3230
970785f1
PH
32312002-11-14 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
3232
3233 * data/glr.c (yyFail): Always set yyerrflag. Corrects regression
3234 on input.at test.
3235
8fcc7db1
PE
32362002-11-14 Paul Eggert <eggert@twinsun.com>
3237
7ec1b48e
PE
3238 * src/output.c (output_skeleton): Call xfopen instead of
3239 duplicating xfopen's body.
3240
cfff7583 3241 Fix bugs reported by Nelson H. F. Beebe in
161a71f3 3242 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00078.html>.
cfff7583 3243
8fcc7db1
PE
3244 * tests/headers.at (AT_TEST_CPP_GUARD_H): Don't assume that
3245 "$CC -E foo.h" is allowed, as this doesn't work with the Portland
3246 Group compiler. Instead, use "$CC -E bar.c". Include the .h
3247 file twice in the grammar, as an extra check.
3248
3249 * tests/input.at (Torturing the Scanner): Surround the
3250 backslash-newline tests with "#if 0", to make it less likely that
3251 we'll run into compiler bugs. Bring back solitary \ inside
3252 comment, but add a closing comment to work around HP C bug. Don't
e3aa65c5 3253 test backslash-newline in C character constant.
8fcc7db1 3254
4e8d992c
AD
32552002-11-14 Akim Demaille <akim@epita.fr>
3256
3257 * tests/synclines.at (AT_SYNCLINES_COMPILE): Ignore the exit
3258 status of the compiler.
f32b346d 3259 Calling `exit 1' is no longer needed.
4e8d992c
AD
3260 Reported by Nelson H. F. Beebe.
3261
9501dc6e
AD
32622002-11-14 Akim Demaille <akim@epita.fr>
3263
3264 * tests/atlocal.in (CPPFLAGS): We have config.h.
3265 * tests/testsuite.at (AT_DATA_GRAMMAR_PROLOGUE, AT_DATA_GRAMMAR):
3266 New.
3267 * tests/actions.at, tests/calc.at, tests/conflicts.at,
3268 * tests/cxx-type.at, tests/glr-regr1.at, tests/headers.at,
3269 * tests/regression.at, tests/torture.at: Use them for all the
3270 grammars that are to be compiled.
3271 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Rename as...
3272 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): this.
3273 * doc/bison.texinfo (GLR Parsers): Document `inline'.
3274
18b519c0
AD
32752002-11-14 Akim Demaille <akim@epita.fr>
3276
3277 * doc/bison.texinfo: Various formatting changes (alignments in
3278 samples, additional @group/@end group, GCS in samples.
3279 Use @deffn instead of simple @table to define the directives,
3280 macros, variables etc.
3281
9a86cdb9
PE
32822002-11-13 Paul Eggert <eggert@twinsun.com>
3283
daa33def 3284 Fix some bugs reported by Albert Chin-A-Young in
161a71f3 3285 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00066.html>.
18b519c0 3286
daa33def 3287 * tests/input.at (Torturing the Scanner): Don't invoke "cc a.c b.c
8fcc7db1 3288 -o c"; the HP C compiler chatters during compilation.
daa33def
PE
3289 Instead, invoke "cc -c a.c -o a.o; cc -c b.c -o b.o; cc a.o b.o -o c".
3290 * tests/headers.at (export YYLTYPE): Likewise.
3291
3292 * tests/input.at (Torturing the Scanner): Remove lines containing
8fcc7db1 3293 solitary backslashes, as they tickle a bug in the HP C compiler.
daa33def 3294
9a86cdb9
PE
3295 * tests/glr-regr1.at (Badly Collapsed GLR States): Avoid //
3296 comments, since they're not portable. Use GNU coding style.
3297
9c1e26bd
AD
32982002-11-13 Akim Demaille <akim@epita.fr>
3299
3300 * data/yacc.c: Leave bigger chunks of quoted text.
3301 (YYDSYMPRINTF): New.
3302 Use it to report symbol activities.
3303 * data/glr.c (YYDSYMPRINTF): New.
3304 Use it.
3305
87f721cc
PE
33062002-11-12 Paul Eggert <eggert@twinsun.com>
3307
3308 Version 1.75b.
3309
3310 * data/glr.c (yydoAction): Return YYRESULTTAG, not int.
3311 (yyglrReduce): Return yyok, not 0.
3312 This should avoid the enumerated-type warnings reported
464c6927 3313 by Nelson H. F. Beebe in
161a71f3 3314 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00057.html>.
87f721cc
PE
3315
3316 * lib/bbitset.h (BITSET_INLINE): Remove.
3317 * lib/bitset.h [! BITSET_INLINE]: Remove.
3318 (bitset_set, bitset_reset, bitset_test): Rename local vars
3319 to avoid shadowing warnings by GCC.
3320
3321 * data/glr.c (inline): Remove #define. It's the user's
3322 responsibility to #define it away, just like 'const'.
464c6927 3323 This fixes one of the bugs reported by Nelson H. F. Beebe in
161a71f3 3324 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00058.html>.
18b519c0 3325
87f721cc
PE
3326 * Makefile.maint (po-check): Scan .l and .y files instead of the
3327 .c and the .h files that they generate. This fixes the bug
3328 reported by Tim Van Holder in:
161a71f3 3329 <http://lists.gnu.org/archive/html/bison-patches/2002-11/msg00062.html>
87f721cc
PE
3330 Look for N_ as well as for _. Try to avoid matching #define for
3331 N_ and _.
3332 * po/POTFILES.in: Remove src/parse-gram.c, src/scan-gram.c,
3333 src/system.h. Add src/parse-gram.y, src/scan-gram.l.
3334 * src/scan-gram.l: Revamp regular expressions so that " and '
3335 do not confuse xgettext.
3336
3337 * src/struniq.h (struniq_new): Do not declare the return type
3338 to be 'const'; this violates the C standard.
3339 * src/struniq.c (struniq_new): Likewise.
3340
be14ade5
AD
33412002-11-12 Albert Chin-A-Young <china@thewrittenword.com>
3342
3343 * src/Makefile.am (LDADD): Link $(LIBINTL) last to avoid the
3344 duplicate definition of optind on Tru64 UNIX 4.0D with the Compaq
3345 linker.
3346
05291fbc
AD
33472002-11-12 Akim Demaille <akim@epita.fr>
3348
3349 * Makefile.maint: Sync with Autoconf:
3350 (local_updates): New.
3351
1f5fd52e
AD
33522002-11-12 Akim Demaille <akim@epita.fr>
3353
3354 * po/POTFILES.in (src/lalr.c, src/state.c): Remove
3355
283f1e64
AD
33562002-11-12 Akim Demaille <akim@epita.fr>
3357
3358 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Display the
3359 locations.
3360
886b69d1
AD
33612002-11-12 Akim Demaille <akim@epita.fr>
3362
3363 * data/c.m4 (b4_yysymprint_generate): Pass *yyvaluep to YYPRINT,
3364 not yyvalue.
3365
3df37415
AD
33662002-11-12 Akim Demaille <akim@epita.fr>
3367
3368 * tests/actions.at (AT_CHECK_PRINTER_AND_DESTRUCTOR): New.
3369 Use it to test the GLR parser.
3370
7bd6c77e
AD
33712002-11-12 Akim Demaille <akim@epita.fr>
3372
3373 * tests/regression.at (input.y): s/YYEOF/MYEOF/, as the skeleton
3374 defines it.
3375 * data/glr.c (yystos): New.
3376 (b4_yysymprint_generate, b4_yydestruct_generate): Invoke.
3377 (YYDSYMPRINT): New.
3378 (yyval): Don't define it, it is handled via M4.
3379 (yyrecoverParseError): Free verbosely the discarded symbols.
3380 * data/yacc.c (yysymprint): Remove, rather...
3381 (b4_yysymprint_generate): invoke.
3382 * data/c.m4 (b4_yysymprint_generate): New.
3383 Accept pointers as arguments, as opposed to the version from
3384 yacc.c.
3385 (b4_yydestruct_generate): Likewise.
3386 * tests/cations.at (Printers and Destructors): Use Bison directives
3387 instead of CPP macros.
3388 Don't rely on internal details.
3389
b0400cc6
AD
33902002-11-12 Akim Demaille <akim@epita.fr>
3391
3392 * data/c.m4 (b4_yydestruct_generate, b4_symbol_actions): New.
3393 * data/yacc.c: Rename yychar1 as yytoken, as in glr.c.
3394 Don't work on yychar (i.e., do set it to YYEMPTY, don't match
3395 it against YYEMPTY and so forth), work on yytoken (i.e., set
3396 it to YYEMPTY etc.).
3397 (yydestruct): Replace with a b4_yydestruct_generate invocation.
3398 (b4_symbol_actions): Remove.
3399 * data/glr.c (YYTRANSLATE): As for yacc.c, if negative, it stands
3400 for 0, end-of-input.
3401
72f889cc
AD
34022002-11-12 Akim Demaille <akim@epita.fr>
3403
3404 * doc/bison.texinfo (Destructor Decl): New.
3405
b1ae9233
AD
34062002-11-12 Akim Demaille <akim@epita.fr>
3407
3408 * src/tables.c (tables_generate): Use free for pointers that
3409 cannot be NULL, not XFREE.
3410 (pack_vector): Use assert, not fatal, for bound violations.
3411 * src/state.c (state_new): Likewise.
3412 * src/reader.c (reader): Likewise.
3413 * src/lalr.c (set_goto_map): Likewise.
72f889cc 3414 * src/location.h (LOCATION_PRINT): If first_line is 0, just issue
b1ae9233
AD
3415 the file name.
3416
7ec2d4cd
AD
34172002-11-12 Akim Demaille <akim@epita.fr>
3418
3419 * src/scan-gram.l, src/reader.h (scanner_last_string_free):
3420 Restore.
3421 * src/scan-gram.l (last_string): Is global to the file, not to
3422 yylex.
3423 * src/parse-gram.y (input): Don't append the epilogue here,
3424 (epilogue.opt): do it here, and free the scanner's obstack.
3425 * src/reader.c (epilogue_set): Rename as...
3426 (epilogue_augment): this.
3427 * data/c.m4 (b4_epilogue): Defaults to empty.
3428
573a6cd3
AD
34292002-11-12 Akim Demaille <akim@epita.fr>
3430
3431 * src/getargs.c (long_options): Remove duplicates.
3432 * src/vmsgetargs.c, src/build.com, src/bison.cld, src/vmshlp.mar:
3433 Remove.
3434 * doc/bison.rnh: Remove.
3435 * doc/bison.texinfo (VMS Invocation): Remove.
3436
95612cfa
AD
34372002-11-12 Akim Demaille <akim@epita.fr>
3438
3439 * src/struniq.h, src/struniq.c (struniq_t): Is const.
3440 (STRUNIQ_EQ, struniq_assert, struniq_assert_p): New.
3441
3442 Use struniq for symbols.
3443
3444 * src/symtab.h (symbol_t): The tag member is a struniq.
3445 (symbol_type_set): Adjust.
3446 * src/symtab.c (symbol_new): Takes a struniq.
3447 (symbol_free): Don't free the tag member.
3448 (hash_compare_symbol_t, hash_symbol_t): Rename as...
3449 (hash_compare_symbol, hash_symbol): these.
3450 Use the fact that tags as struniqs.
3451 (symbol_get): Use struniq_new.
3452 * src/symlist.h, src/symlist.c (symbol_list_n_type_name_get):
3453 Returns a strniq.
3454 * src/reader.h (merger_list, grammar_currentmerge_set): The name
3455 and type members are struniqs.
3456 * src/reader.c (get_merge_function)
3457 (grammar_current_rule_merge_set): Adjust.
3458 (TYPE, current_type): Are struniq.
3459
3460 Use struniq for file names.
3461
3462 * src/files.h, src/files.c (infile): Split into...
3463 (grammar_file, current_file): these.
3464 * src/scan-gram.c (YY_USER_INIT, handle_syncline): Adjust.
3465 * src/reduce.c (reduce_print): Likewise.
3466 * src/getargs.c (getargs): Likewise.
3467 * src/complain.h, src/complain.c: Likewise.
3468 * src/main.c (main): Call struniqs_new early enough to use it for
3469 file names.
3470 Don't free the input file name.
3471
3e6656f9
AD
34722002-11-12 Akim Demaille <akim@epita.fr>
3473
3474 * src/symtab.c (symbol_free): Remove dead deactivated code:
3475 type_name are properly removed.
3476 Don't use XFREE to free items that cannot be NULL.
3477 * src/struniq.h, src/struniq.c: New.
3478 * src/main.c (main): Initialize/free struniqs.
3479 * src/parse-gram.y (%union): Add astruniq member.
3480 (yyprint): Adjust.
3481 * src/scan-gram.l (<{tag}>): Return a struniq.
3482 Free the obstack bit that used to store it.
3483 * src/symtab.h (symbol_t): The 'type_name' member is a struniq.
3484
7672019c
PE
34852002-11-11 Paul Eggert <eggert@twinsun.com>
3486
3487 Revamp to fix many (but not all) of the C- and M4-related quoting
3488 problems. Among other things, this fixes the Bison bug reported
3489 by Jan Hubicka when processing the Bash grammar; see:
161a71f3 3490 <http://lists.gnu.org/archive/html/bison-patches/2002-11/msg00039.html>
7672019c
PE
3491
3492 Use new @ escapes consistently. Represent brackets with @{ and @}
3493 rather than @<:@ and @:>@, since this works a bit better with dumb
3494 editors like vi. Represent @ with @@, since @ is now consistently
3495 an escape. Use @oline@ and @ofile@ rather than __oline__ and
3496 __ofile__, to avoid unexpected expansions. Similarly, use @output
3497 rather than #output.
3498
3499 * data/c.m4 (b4_copyright): Omit file name from comment, since
3500 the file name could contain "*/".
3501 (b4_synclines_flag): Don't quote the 2nd argument; it should already
3502 be quoted. All uses changed.
3503
3504 * data/glr.c: Use new @ escapes consistently.
3505 (b4_input_suffix, b4_output_parser_suffix, b4_output_parser_name,
3506 b4_output_header_suffix, b4_output_header_name, b4_header_guard):
3507 Remove, since they couldn't handle arbitrary characters in file
3508 names.
3509 * data/lalr1.cc: Likewise.
3510 * data/yacc.c: Likewise.
3511
3512 * src/files.c (output_infix): Remove; all uses removed.
3513 * src/files.h: Likewise.
3514
3515 * data/glr.c: Remove use of "#ifdef b4_header_guard", since it
3516 mishandled funny characters in file names, and anyway it isn't
3517 needed any more.
3518 * data/yacc.c: Likewise.
3519 * data/lalr1.cc: Use YYSLP_NEEDED instead of b4_header_guard.
3520
3521 * data/glr.c (YYSTYPE_IS_TRIVIAL): Define when the .h file would.
3522 * data/yacc.c: Likewise.
3523
3524 * src/muscle_tab.c: Include quotearg.h, since we need to quote C
3525 strings now.
3526 (muscle_init): Quote filename as a C string.
3527 * src/muscle_tab.h (MUSCLE_GROW_STRING_PAIR): Remove; unused.
3528 (MUSCLE_OBSTACK_SGROW, MUSCLE_INSERT_C_STRING): New macros.
3529 * src/output.c (escaped_file_name_output): New function.
3530 (prepare_symbols): Quote tokens for M4.
3531 (prepare): Don't insert output_infix, output_prefix,
3532 output_parser_name, output_header_name; this is now down by scan-skel.
3533 Insert skeleton as a C string.
3534
3535 * src/output.c (user_actions_output, symbol_destructors_output,
3536 symbol_printers_output): Quote filenames for C and M4.
3537 * src/reader.c (prologue_augment, epilogue_set): Likewise.
3538
3539 * src/scan-gram.l (<SC_CHARACTER>): Don't worry about any backslash
3540 escapes other than \\ and \'; this simplifies the code.
3541 (<SC_STRING>): Likewise, for \\ and \".
3542 (<SC_COMMENT,SC_LINE_COMMENT,SC_STRING,SC_CHARACTER,SC_BRACED_CODE,
3543 SC_PROLOGUE,SC_EPILOGUE>): Escape $ and @, too.
3544 Use new escapes @{ and @} for [ and ].
3545
3546 * src/scan-skel.l (yylineno, yyoutname): Remove static vars, replacing
3547 them with auto vars.
3548 Switch to new escape scheme, where @ is the escape character uniformly.
3549 Abort if a stray escape character is found. Avoid unbounded input
3550 buffer when parsing non-escaped text.
3551
3552 * tests/input.at (Torturing the Scanner): Add tests that @oline@,
3553 __oline__, #output, $@, and @{ do not have unintended meanings.
3554
acea4f3b
PE
35552002-11-09 Paul Eggert <eggert@twinsun.com>
3556
3557 Fix the test failure due to GCC warnings described in
161a71f3 3558 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00000.html>.
acea4f3b
PE
3559 * data/glr.c (yyis_pact_ninf, yyis_table_ninf): New macros, which
3560 evaluate to 0 if it's impossible for NINF to be in the respective
3561 table.
3562 (yygetLRActions, yyrecoverParseError): Use them.
3563
3564 * src/scan-gram.l (unexpected_end_of_file): Fix bug: columns were
3565 counted in the token inserted at end of file. Now takes
3566 location_t *, not location_t, so that the location can be
3567 adjusted. All uses changed.
3568
3569 * tests/regression.at (Invalid inputs): Adjust wording in
3570 diagnostic to match the new behavior.
3571
3572 * tests/torture.at (AT_DATA_TRIANGULAR_GRAMMAR,
3573 AT_DATA_HORIZONTAL_GRAMMAR, AT_DATA_LOOKAHEADS_GRAMMAR,
3574 AT_DATA_STACK_TORTURE): Replace `assert (x);' with `if (! (x))
3575 abort ();'. This reduces the runtime of the "Many lookaheads"
3576 test from 27.6 to 2.7 minutes on a 440 MHz Ultrasparc III running
3577 GCC 3.2.
3578
20ef1ad5
PE
35792002-11-07 Paul Eggert <eggert@twinsun.com>
3580
3581 * src/parse-gram.y (CHARACTER): Remove unused token.
3582 All uses removed.
3583
3584 * src/scan-gram.l: Remove stack option. We no longer use the
3585 stack, since the stack was never deeper than 1; instead, use the
3586 new auto var c_context to record the stacked value.
3587
3588 Remove nounput option. At an unexpected end of file, we now unput
3589 the minimal input necessary to end cleanly; this simplifies the
3590 code.
3591
3592 Avoid unbounded token sizes where this is easy.
3593
3594 (unexpected_end_of_file): New function.
3595 Use it to systematize the error message on unexpected EOF.
3596 (last-string): Now auto, not static.
3597 (YY_OBS_FREE): Remove unnecessary do while (0) wrapper.
3598 (scanner_last_string_free): Remove; not used.
3599 (percent_percent_count): Move decl to just before use.
3600 (SC_ESCAPED_CHARACTER): Return ID at unexpected end of file,
3601 not the (never otherwised-used) CHARACTER.
3602
93724f13
AD
36032002-11-07 Akim Demaille <akim@epita.fr>
3604
3605 Let yyerror always receive the msg as last argument, so that
3606 yyerror can be variadic.
3607
3608 * data/yacc.c (b4_yyerror_args): New.
3609 Use it when calling yyerror.
3610 * data/glr.c (b4_yyerror_args, b4_lyyerror_args): New.
3611 Use it when calling yyerror.
3612 * doc/bison.texinfo (Error Reporting): Adjust.
3613 * tests/calc.at (_AT_DATA_CALC_Y): Adjust.
3614 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Adjust.
3615
6e40b4eb
AD
36162002-11-06 Akim Demaille <akim@epita.fr>
3617
3618 #line should have quoted strings.
3619 Ideally, this should be done by m4_quotearg.
3620
3621 * src/scan-skel.l: Include quotearg.h.
3622 Quote __ofile__.
3623 * src/output.c (symbol_printers_output)
3624 (symbol_destructors_output): Quote the file name.
3625
2dfbfc12
AD
36262002-11-06 Akim Demaille <akim@epita.fr>
3627
3628 * tests/regression.at (Invalid inputs): Adjust to the recent
3629 messages.
3630
437c2d80
AD
36312002-11-06 Akim Demaille <akim@epita.fr>
3632
3633 Restore --no-lines.
3634 Reported by Jim Kent.
3635
3636 * data/c.m4 (b4_syncline): New.
3637 * data/glr.c, data/yacc.c, data/lalr1.cc: Use it.
3638 * src/reader.c (prologue_augment, epilogue_set): Use b4_syncline.
3639 * src/output.c (user_actions_output): Likewise.
3640 (prepare): Define 'b4_synclines_flag'.
2dfbfc12 3641 * src/muscle_tab.c (muscle_init): Don't define b4_linef.
437c2d80 3642
900c5db5
AD
36432002-11-06 Akim Demaille <akim@epita.fr>
3644
3645 * src/main.c (main): Free `infile'.
3646 * src/scan-gram.l (handle_syncline): New.
3647 Recognize `#line'.
3648 * src/output.c (user_actions_output, symbol_destructors_output)
3649 (symbol_printers_output): Use the location's file name, not
3650 infile.
3651 * src/reader.c (prologue_augment, epilogue_set): Likewise.
3652
e183b123 36532002-11-05 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
51b4a04c 3654
e183b123 3655 * src/tables.c (matching_state): Don't allow states to match if
51b4a04c 3656 either has GLR conflict entries.
e183b123 3657
193eb6b7
PE
36582002-11-05 Paul Eggert <eggert@twinsun.com>
3659
e183b123
PE
3660 * src/scan-gram.l: Use more accurate diagnostics, e.g.
3661 "integer out of range" rather than "invalid value".
3662 * tests/input.at (Invalid $n, Invalid @n): Change expected wording
3663 accordingly.
3664
193eb6b7
PE
3665 Scan <% and %> digraphs in C code as POSIX 1003.1-2001 requires.
3666 Also, remove one static variable in the scanner.
3667
3668 * src/scan-gram.l (braces_level): Now auto, not static.
3669 Initialize to zero if the compiler is being picky.
3670 (INITIAL): Clear braces_level instead of incrementing it.
3671 (SC_BRACED_CODE): Treat <% and %> as { and } when inside C code,
3672 as POSIX 1003.1-2001 requires.
3673 * src/system.h (IF_LINT): New macro, taken from coreutils.
3674 * configure.ac: Define "lint" if --enable-gcc-warnings.
3675
29c01725
AD
36762002-11-05 Akim Demaille <akim@epita.fr>
3677
3678 * src/scan-gram.l: When it starts with `%', complain about the
3679 whole directive, not just that `invalid character: %'.
3680
8aeac3ca
AD
36812002-11-04 Akim Demaille <akim@epita.fr>
3682
3683 * Makefile.maint: Update from Autoconf.
3684 (update, cvs-update, po-update, do-po-update): New.
3685
793a58bb
AD
36862002-11-04 Akim Demaille <akim@epita.fr>
3687
3688 * tests/glr-regr1.at (Badly Collapsed GLR States): Prototype yylex
3689 and yyerror.
3690 Have yyerror `use' its arguments.
3691 * tests/calc.at (AT_CHECK_PUSHDEFS): AT_YYERROR_SEES_LOC_IF
3692 returns true when location & yacc & pure & parse-param.
3693 (_AT_DATA_CALC_Y): Let yyerror ``use'' its arguments.
3694
c4d720cd
AD
36952002-11-04 Akim Demaille <akim@epita.fr>
3696
3697 * src/location.h (LOCATION_PRINT): Use quotearg slot 3 to avoid
3698 clashes.
3699 * src/scan-gram.l: Use [\'] instead of ['] to pacify
3700 font-lock-mode.
3701 Use complain_at.
3702 Use quote, not quote_n since LOCATION_PRINT no longer uses the
3703 slot 0.
3704
613a0dc5
PE
37052002-11-03 Paul Eggert <eggert@twinsun.com>
3706
3707 * src/reader.c (get_merge_function, grammar_current_rule_check):
3708 Use consistent diagnostics for reporting type name clashes.
3709 Quote the types with <>, for consistency with Yacc.
3710 * tests/input.at (Type Clashes): Adjust to diagnostic changes.
3711
2a8d363a
AD
37122002-11-03 Akim Demaille <akim@epita.fr>
3713
3714 * data/c.m4 (b4_identification, b4_user_args, b4_parse_param):
3715 New.
3716 * data/yacc.m4 (b4_pure_args, b4_Pure_args): New.
3717 (b4_parse_param): Remove.
3718 Use b4_identification.
3719 Propagate b4_pure_args where needed to pass them to yyerror.
3720 * data/glr.m4 (b4_parse_param): Remove.
3721 (b4_user_formals, b4_pure_args, b4_pure_formals, b4_lpure_args)
3722 (b4_lpure_formals): New.
3723 Use b4_identification.
3724 (YY_USER_FORMALS, YY_USER_ARGS): Remove, replaced by
3725 b4_user_formals and b4_user_args.
3726 (yyexpandGLRStack, yyFail, yyaddDeferredAction, yyglrShiftDefer)
3727 (yyreportAmbiguity): When using a pure parser, also need
3728 the location, and the parse-params.
3729 Adjust callers.
3730 (yyuserAction, yyglrShift, yyreportParseError, yyrecoverParseError):
3731 When using a pure parser, also need the parse-params.
3732 Adjust callers.
3733 * tests/calc.at: Test pure (%pure-parser) and absolutely pure
3734 (%pure-parser + %parse-param) LALR and GLR parsers.
3735 (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): New, define AT_PARAM_IF,
3736 AT_LOCATION_IF, AT_PURE_IF, AT_GLR_IF, AAT_PURE_AND_LOC_IF,
3737 AT_GLR_OR_PARAM_IF, AT_YYERROR_ARG_LOC_IF, AT_YYERROR_SEES_LOC_IF.
3738 (_AT_DATA_CALC_Y): Equip for purity of yyerror.
3739 (_AT_CHECK_CALC_ERROR): Use AT_YYERROR_SEES_LOC_IF.
3740 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Equip for yyerror purity.
3741 * doc/bison.texinfo: Untabify the whole file.
3742 (Parser Function): Document %parse-param, deprecate YYPARSE_PARAM.
3743 (Pure Calling): Document %lex-param, deprecate YYLEX_PARAM.
3744 (Error Reporting): Adjust to these new directives.
3745 Document %error-verbose, deprecate YYERROR_VERBOSE.
3746
9e32add8
AD
37472002-11-03 Akim Demaille <akim@epita.fr>
3748
3749 * tests/calc.at: Change all the AT_CHECK_CALC_LALR and
3750 AT_CHECK_CALC_GLR invocations to use % directives, instead of
3751 command line options.
3752 * tests/cxx-type.at: Formatting changes.
3753
b02d90a5
PE
37542002-11-03 Paul Eggert <eggert@twinsun.com>
3755
3756 * src/scan-gram.l: Revamp to fix POSIX incompatibilities,
3757 to count columns correctly, and to check for invalid inputs.
9e32add8 3758
b02d90a5
PE
3759 Use mbsnwidth to count columns correctly. Account for tabs, too.
3760 Include mbswidth.h.
3761 (YY_USER_ACTION): Invoke extend_location rather than LOCATION_COLUMNS.
3762 (extend_location): New function.
3763 (YY_LINES): Remove.
3764
3765 Handle CRLF in C code rather than in Lex code.
3766 (YY_INPUT): New macro.
3767 (no_cr_read): New function.
3768
3769 Scan UCNs, even though we don't fully handle them yet.
3770 (convert_ucn_to_byte): New function.
3771
3772 Handle backslash-newline correctly in C code.
3773 (SC_LINE_COMMENT, SC_YACC_COMMENT): New states.
3774 (eols, blanks): Remove. YY_USER_ACTION now counts newlines etc.;
3775 all uses changed.
3776 (tag, splice): New EREs. Do not allow NUL or newline in tags.
3777 Use {splice} wherever C allows backslash-newline.
3778 YY_STEP after space, newline, vertical-tab.
3779 ("/*"): BEGIN SC_YACC_COMMENT, not yy_push_state (SC_COMMENT).
9e32add8 3780
b02d90a5
PE
3781 (letter, id): Don't assume ASCII; e.g., spell out a-z.
3782
3783 ({int}, handle_action_dollar, handle_action_at): Check for integer
3784 overflow.
9e32add8 3785
b02d90a5
PE
3786 (YY_STEP): Omit trailing semicolon, so that it's more like C.
3787
3788 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>): Allow \0 and \00
3789 as well as \000. Check for UCHAR_MAX, not 255.
3790 Allow \x with an arbitrary positive number of digits, as in C.
3791 Check for overflow here.
3792 Allow \? and UCNs, for compatibility with C.
3793
3794 (handle_symbol_code_dollar): Use quote_n slot 1 to avoid collision
3795 with quote slot used by complain_at.
3796
3797 * tests/input.at: Add tests for backslash-newline, m4 quotes
3798 in symbols, long literals, and funny escapes in strings.
3799
3800 * configure.ac (jm_PREREQ_MBSWIDTH): Add.
3801 * lib/Makefile.am (libbison_a_SOURCES): Add mbswidth.h, mbswidth.c.
3802 * lib/mbswidth.h, lib/mbswidth.c: New files, from GNU gettext.
3803 * m4/Makefile.am (EXTRA_DIST): Add mbswidth.m4.
3804 * m4/mbswidth.m4: New file, from GNU coreutils.
3805
3806 * doc/bison.texinfo (Grammar Outline): Document // comments.
3807 (Symbols): Document that trigraphs have no special meaning in Bison,
3808 nor is backslash-newline allowed.
3809 (Actions): Document that trigraphs have no special meaning.
3810
3811 * src/location.h (LOCATION_COLUMNS, LOCATION_LINES): Remove;
3812 no longer used.
3813
38142002-11-02 Paul Eggert <eggert@twinsun.com>
3815
3816 * src/reader.c: Don't include quote.h; not needed.
3817 (get_merge_function): Reword warning to be consistent with
3818 type clash diagnostic in grammar_current_rule_check.
3819
3820 * lib/quotearg.c (quotearg_buffer_restyled): Fix off-by-two
3821 bug in trigraph handling.
3822
3823 * src/output.c (prepare_symbols): When printing token names,
3824 escape "[" as "@<:@" and likewise for "]".
3825
3826 * src/system.h (errno): Remove declaration, as we are now
3827 assuming C89 or better, and C89 guarantees errno.
3828
762b212b
PE
38292002-10-30 Paul Eggert <eggert@twinsun.com>
3830
3831 * lib/bitset_stats.c (bitset_stats_read, bitset_stats_write):
3832 Check for close failures.
3833 * src/files.h (xfclose): Return void, not int, since it always
3834 returned zero.
3835 * src/files.c (xfclose): Likewise. Report I/O error if ferror
3836 indicates one.
3837 * src/output.c (output_skeleton): Use xfclose rather than fclose
3838 and ferror. xfclose now checks ferror.
3839
3840 * data/glr.c (YYLEFTMOST_STATE): Remove.
3841 (yyreportTree): Use a stack-based leftmost state. This avoids
3842 our continuing battles with bogus warnings about initializers.
3843
56100c60
AD
38442002-10-30 Akim Demaille <akim@epita.fr>
3845
3846 * src/system.h: Don't use #ifdef/#ifndef on HAVE_ values, only
3847 #if.
3848
51b4a04c
PH
38492002-10-29 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
3850
3851 * tests/glr-regr1.at: New test for reported regressions.
3852 * tests/testsuite.at: Add glr-regr1.at test.
3853 * tests/Makefile.am: Add glr-regr1.at test.
e183b123 3854
bf1ebda2
PE
38552002-10-24 Paul Eggert <eggert@twinsun.com>
3856
5c16c6b1
PE
3857 Version 1.75a.
3858
bf1ebda2
PE
3859 * tests/calc.at (_AT_DATA_CALC_Y): Remove unused strcat declaration.
3860 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Include stdlib.h, since
3861 we use malloc. Don't assume 'A' through 'Z' are contiguous.
3862 Don't assume strdup exists; POSIX says its an XSI extension.
3863 Check for buffer overflow on input.
3864
b526ee61
AD
38652002-10-24 Akim Demaille <akim@epita.fr>
3866
3867 * src/output.c (output_skeleton): Don't disable M4sugar comments
3868 too soon: it results in comments being expanded.
3869 * data/yacc.c, data/glr.c, data/lalr1.cc: Do it right before the
3870 first output.
3871
f1886bb2
AD
38722002-10-24 Akim Demaille <akim@epita.fr>
3873
3874 * data/yacc.c (m4_int_type): New.
3875 * data/c.m4 (m4_int_type): Don't use yysigned_char, but `signed
3876 char' as only yacc.c wants K&R portability.
3877 * data/glr.c (yysigned_char): Remove.
3878 * data/lalr1.cc: Rename the trailing b4_name as b4_parser_class_name.
3879 Reported by Quoc Peyrot.
3880
c5576256
PE
38812002-10-23 Paul Eggert <eggert@twinsun.com>
3882
3883 * src/main.c (main): With --trace=time, report times even if a
3884 non-fatal error occurs. Formerly, the times were reported in some
3885 such cases but not in others.
3886 * src/reader.c (reader): Just return if a complaint has been issued,
3887 instead of exiting, so that 'main' can report times.
3888
27b0ffea
AD
38892002-10-22 Akim Demaille <akim@epita.fr>
3890
3891 * src/system.h: Include sys/types.
3892 Reported by Bert Deknuydt.
3893
223a7883
PE
38942002-10-23 Paul Eggert <eggert@twinsun.com>
3895
3896 * configure.ac (AC_PROG_LEX): Use instead of AM_PROG_LEX.
3897 Suggested by Art Haas.
3898
38992002-10-22 Paul Eggert <eggert@twinsun.com>
3900
3901 * src/complain.c (exit) [! (STDC_HEADERS || _LIBC)]: Remove exit
3902 decl; not needed any more.
3903 * src/main.c (main): Use return to exit, undoing yesterday's change.
3904 The last OS that we could find where this wouldn't work is
3905 SunOS 3.5, and that's too old to worry about now.
3906
3907 * data/glr.c (struct yyltype): Define members even when not
3908 doing locations. This is more consistent with yacc.c, and it
3909 works around the following bug reports:
161a71f3
PE
3910 http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00106.html
3911 http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00111.html
27b0ffea 3912
223a7883
PE
3913 * doc/bison.texinfo: Minor spelling and typographical fixes. Use
3914 @acronym consistently. Standardize on "Yacc" instead of "YACC",
3915 "Algol" instead of "ALGOL". Give a bit more history about BNF.
3916
8b76775a
AD
39172002-10-22 Akim Demaille <akim@epita.fr>
3918
3919 * data/README: New.
3920
6db10d14
PE
39212002-10-21 Paul Eggert <eggert@twinsun.com>
3922
3923 Be consistent about 'bool'; the old code used an enum in one
3924 module and an int in another, and this violates the C standard.
3925 * m4/stdbool.m4: New file, from coreutils 4.5.3.
3926 * configure.ac (AC_HEADER_STDBOOL): Add.
3927 * m4/Makefile.am (EXTRA_DIST): Add stdbool.m4.
3928 * src/muscle_tab.c (hash_compare_muscles): (a ? FALSE : TRUE) -> (! a)
3929 * src/symtab.c (hash_compare_symbol_t): Likewise.
3930 * src/system.h (bool, false, true): Use a definition consistent
3931 with ../lib/hash.c. All uses changed.
3932
3933 * src/complain.c (warning_issued): Renamed from warn_message_count,
3934 so that we needn't worry about integer overflow (!).
3935 Now of type bool. All uses changed.
3936 (complaint_issued): Renamed from complain_message_count; likewise.
3937
3938 * src/main.c (main): Use exit to exit with failure.
27b0ffea 3939
6db10d14
PE
3940 * src/complain.c (fatal_at, fatal): Use EXIT_FAILURE and EXIT_SUCCESS
3941 rather than 1 and 0.
3942 * src/main.c (main): Likewise.
3943 * src/getargs.c (getargs): Likewise.
3944 * src/reader.c (reader): Likewise.
3945
3946 * src/getarg.c (getargs): Remove duplicate code for
3947 "Try `bison --help'".
3948
3949 * src/files.c (xfopen, xfclose): Use EXIT_FAILURE rather than 2.
3950 What was that "2" for?
3951
3952 * src/complain.h (fatal, fatal_at): Add __attribute__((__noreturn__)).
3953 * src/getargs.c (usage): Likewise.
3954
3955 * src/getargs.c (getargs): When there are too few operands, report
3956 the last one. When there are too many, report the first extra
3957 one. This is how diffutils does it.
3958
92a060fd
PE
39592002-10-20 Paul Eggert <eggert@twinsun.com>
3960
3961 Remove K&R vestiges.
3962 * configure.ac (AC_C_CONST, AM_C_PROTOTYPES): Remove.
3963 * src/complain.c (VA_START): Remove. Assume prototypes.
3964 (vfprintf) [! (HAVE_VPRINTF || defined vfprintf)]: New macro.
3965 (private_strerror, warn_at, warn, complain_at, complain, fatal_at,
3966 fatal): Assume prototypes.
3967 * src/complain.h: Assume prototypes.
3968 * src/system.h (PARAMS): Remove.
3969 Include <limits.h> unconditionally, since it's guaranteeed even
3970 for a freestanding C89 compiler.
3971 (SHRT_MIN, SHRT_MAX): Remove, since C89 guarantees them.
3972 * src/vmsgetargs.c (getargs, cli_present, cli_get_value): Prototype.
8b76775a 3973
e7cb57c0
AD
39742002-10-20 Akim Demaille <akim@epita.fr>
3975
3976 * src/muscle_tab.c (muscle_grow): Remove trailing debugging code.
3977 * data/glr.c (YY_USER_FORMALS, YY_USER_ARGS): New.
3978 (yyuserAction, yydoAction, yyglrReduce, yyresolveValue)
3979 (yyresolveStates, yyresolveAction, yyresolveStack)
3980 (yyprocessOneStack): Use them.
3981 (yy_reduce_print): New.
3982 * tests/calc.at (_AT_DATA_CALC_Y): Exercise %parse-param.
3983
0245f82d
AD
39842002-10-20 Akim Demaille <akim@epita.fr>
3985
3986 * data/c.m4 (b4_c_ansi_args): Recognize functions with no
3987 arguments and output `void'.
3988 (b4_c_function): Rename as...
3989 (b4_c_function_def): this.
3990 (b4_c_function_decl, b4_c_ansi_function_def)
3991 (b4_c_ansi_function_decl): New.
3992 Change the interpretation of the arguments: before `int, foo', now
3993 `int foo, foo'.
3994 * data/yacc.c (yyparse): Prototype and define thanks to these.
3995 Adjust b4_c_function_def uses.
3996 * data/glr.c (yyparse): Likewise, but ANSI only.
3997
39912f52
AD
39982002-10-20 Akim Demaille <akim@epita.fr>
3999
4000 * src/output.c (prepare): Move the definition of `tokens_number',
4001 `nterms_number', `undef_token_number', `user_token_number_max'
4002 to...
4003 (prepare_tokens): Here.
4004 (prepare_tokens): Rename as...
4005 (prepare_symbols): this.
4006 (prepare): Move the definition of `rules_number' to...
4007 (prepare_rules): here.
4008 (prepare): Move the definition of `last', `final_state_number',
4009 `states_number' to...
4010 (prepare_states): here.
4011 * data/yacc.c, data/lalr1.cc, data/glr.c: Normalize `>' into `<'.
4012
20c1e2ad
AD
40132002-10-20 Akim Demaille <akim@epita.fr>
4014
4015 * src/tables.h, src/tables.c, src/output.c: Comment changes.
4016
21964f43
AD
40172002-10-20 Akim Demaille <akim@epita.fr>
4018
4019 * data/yacc.c, data/yacc.c (b4_location_if, b4_pure_if): Move to...
4020 * data/c.m4: here.
4021
66d30cd4
AD
40222002-10-20 Akim Demaille <akim@epita.fr>
4023
4024 * src/output.c (prepare): Use MUSCLE_INSERT_STRING.
4025 * src/muscle_tab.c (muscle_pair_list_grow): Rename `val as
4026 `pair'.
4027 (muscle_init): Move the `b4_ltype', `b4_maxdepth', `b4_initdepth',
4028 `name' to...
4029 * data/glr.c, data/lalr1.cc, data/yacc.c (b4_location_type)
4030 (b4_stack_depth_init, b4_stack_depth_max, b4_parser_class_name):
4031 These.
4032
95f2c9fe
PE
40332002-10-19 Paul Eggert <eggert@twinsun.com>
4034
4035 Do not create a temporary file, as that involves security and
4036 cleanup headaches. Instead, use a pair of pipes.
4037 Derived from a suggestion by Florian Krohm.
4038 * lib/subpipe.c, lib/subpipe.h, m4/subpipe.m4: New files.
4039 * lib/mkstemp.c, lib/readpipe.c, lib/tempname.c, m4/mkstemp.m4: Remove.
4040 * configure.ac (UTILS_FUNC_MKSTEMP, jm_PREREQ_TEMPNAME): Remove.
4041 (BISON_PREREQ_SUBPIPE): Add.
4042 * lib/Makefile.am (libbison_a_SOURCES): Remove readpipe.c.
4043 Add subpipe.h, subpipe.c.
4044 * m4/Makefile.am (EXTRA_DIST): Remove mkstemp.m4. Add subpipe.m4.
4045 * po/POTFILES.in: Add lib/subpipe.c.
4046 * src/output.c: Include "subpipe.h".
4047 (m4_invoke): Remove decl.
4048 (scan_skel): New decl.
4049 (output_skeleton): Use pipe rather than temporary file for m4 input.
4050 Check that m4sugar.m4 is readable, to avoid deadlock.
4051 Check for pipe I/O error.
4052 * src/scan-skel.l (readpipe): Remove decl.
4053 (scan_skel): New function, to be used in place of m4_invoke.
4054 Read from stream rather than file.
66d30cd4 4055
95f2c9fe
PE
4056 * lib/timevar.c (TICKS_TO_MSEC, CLOCKS_TO_MSEC): Do not cast to
4057 float, as this generates a warning on Solaris 8 + GCC 3.2 with
4058 --enable-gcc-warnings. Instead, divide into 1.0 rather than 1;
4059 this generates a more-accurate value anyway.
4060
4061 * lib/timevar.c (timervar_accumulate): Rename locals to
4062 avoid confusion with similarly-named more-global.
4063 * src/muscle_tab.c (muscle_pair_list_grow): Likewise.
4064
4065 * src/output.c (prepare): Use xstrdup to convert char const *
4066 to char *, to avoid GCC warning.
4067
c19988b7
AD
40682002-10-19 Akim Demaille <akim@epita.fr>
4069
4070 * tests/calc.at (_AT_DATA_CALC_Y): Define VAL, LOC, LEX_FORMALS,
4071 LEX_PRE_FORMALS, LEX_ARGS, LEX_PRE_ARGS, USE_LEX_ARGS.
4072 Use them to have `calc.y' ready for %pure-parser.
4073 * data/yacc.c (YYLEX): Pass a yylex return type to
4074 b4_c_function_call.
4075
ae7453f2
AD
40762002-10-19 Akim Demaille <akim@epita.fr>
4077
4078 Prototype support of %lex-param and %parse-param.
4079
4080 * src/parse-gram.y: Add the definition of the %lex-param and
4081 %parse-param tokens, plus their rules.
4082 Drop the `_' version of %glr-parser.
4083 Add the "," token.
4084 * src/scan-gram.l (INITIAL): Scan them.
4085 * src/muscle_tab.c: Comment changes.
4086 (muscle_insert, muscle_find): Rename `pair' as `probe'.
4087 * src/muscle_tab.h (MUSCLE_INSERT_PREFIX): Remove unused.
4088 (muscle_entry_s): The `value' member is no longer const.
4089 Adjust all dependencies.
4090 * src/muscle_tab.c (muscle_init): Adjust: use
4091 MUSCLE_INSERT_STRING.
4092 Initialize the obstack earlier.
4093 * src/muscle_tab.h, src/muscle_tab.c (muscle_grow)
4094 (muscle_pair_list_grow): New.
4095 * data/c.m4 (b4_c_function_call, b4_c_args): New.
4096 * data/yacc.c (YYLEX): Use b4_c_function_call to honor %lex-param.
4097 * tests/calc.at: Use %locations, not --locations.
4098 (AT_CHECK_CALC_GLR): Use %glr-parser, not %glr_parser.
4099
0e575721
AD
41002002-10-19 Akim Demaille <akim@epita.fr>
4101
4102 * src/getargs.c (usage): Take status as argument and exit
4103 accordingly.
4104 Report the traditional `Try ... --help' message when status != 0.
4105 (usage, version): Don't take a FILE * as arg, it is pointless.
4106 (getargs): When there is an incorrect number of arguments, make it
4107 an error, and report it GNUlically thanks to `usage ()'.
4108
724ce7f5
PE
41092002-10-18 Paul Eggert <eggert@twinsun.com>
4110
3a781eb2
PE
4111 * data/glr.c (yyreportParseError): Don't assume that sprintf
4112 yields the length of the printed string, as this is not true
4113 on SunOS 4.1.4. Reported by Peter Klein.
4114
724ce7f5
PE
4115 * tests/calc.at (_AT_DATA_CALC_Y): #undef memcmp and realloc.
4116 * tests/conflicts.at (%nonassoc and eof): Likewise.
4117 Fixes SunOS 4.1.4 test failure reported by Peter Klein.
4118
473d0a75
AD
41192002-10-17 Akim Demaille <akim@epita.fr>
4120
4121 * src/getargs.h (trace_e): Add trace_scan, and trace_parse.
4122 * src/getargs.c (trace_types, trace_args): Adjust.
4123 * src/reader.c (grammar_current_rule_prec_set)
4124 (grammar_current_rule_dprec_set, grammar_current_rule_merge_set):
4125 Standardize error messages.
4126 And s/@prec/%prec/!
4127 (reader): Use trace_flag to enable scanner/parser debugging,
4128 instead of an adhoc scheme.
4129 * src/scan-gram.l: Remove trailing debugging code.
4130
e76d2469
PE
41312002-10-16 Paul Eggert <eggert@twinsun.com>
4132
93e2236a
PE
4133 * src/muscle_tab.h (MUSCLE_TAB_H_): Was misspelled as
4134 MUSCLE_TAB_H.
4135
e76d2469
PE
4136 * NEWS: Officially drop support for building Bison with K&R C,
4137 since it didn't work anyway and it's not worth worrying about.
4138 * Makefile.maint (wget_files): Remove ansi2knr.c.
4139 (ansi2knr.c-url_prefix): Remove.
4140 * lib/.cvsignore: Remove ansi2knr, ansi2knr.*.
4141 * lib/Makefile.am (AUTOMAKE_OPTIONS): Remove.
4142 * src/Makefile.am (AUTOMAKE_OPTIONS): Remove.
4143
5bd1c419
PE
41442002-10-15 Paul Eggert <eggert@twinsun.com>
4145
4146 Stop using the "enum_" trick for K&R-style function definitions;
4147 it confused me, and I was the author! Instead, assume that people
4148 who want to use K&R C compilers (when using these modules in GCC,
4149 perhaps?) will run ansi2knr.
4150
4151 * lib/bbitset.h: (enum_bitset_ops, enum_bitset_type): Remove.
4152 All uses of "enum_" changed to "enum ".
4153 * lib/ebitset.c (enum_ebitset_find_mode): Likewise.
4154 * lib/lbitset.c (enum_lbitset_find_mode): Likewise.
e76d2469 4155
5bd1c419
PE
4156 * lib/abitset.c (abitset_and, abitset_and_cmp, abitset_and_or,
4157 abitset_and_or_cmp, abitset_andn, abitset_andn_cmp,
4158 abitset_andn_or, abitset_andn_or_cmp, abitset_bytes, abitset_copy,
4159 abitset_copy1, abitset_disjoint_p, abitset_empty_p,
4160 abitset_equal_p, abitset_init, abitset_list, abitset_list_reverse,
4161 abitset_not, abitset_ones, abitset_or, abitset_or_and,
4162 abitset_or_and_cmp, abitset_or_cmp, abitset_reset, abitset_set,
4163 abitset_size, abitset_small_list, abitset_subset_p, abitset_test,
4164 abitset_unused_clear, abitset_xor, abitset_xor_cmp, abitset_zero):
4165 Use function prototypes; this removes the need for declaring
4166 static functions simply to provide their prototypes.
4167 * lib/bitset.c (bitset_alloc, bitset_and_or_, bitset_and_or_cmp_,
4168 bitset_andn_or_, bitset_andn_or_cmp_, bitset_bytes, bitset_copy_,
4169 bitset_count_, bitset_create, bitset_dump, bitset_first,
4170 bitset_free, bitset_init, bitset_last, bitset_next,
4171 bitset_obstack_alloc, bitset_obstack_free, bitset_only_set_p,
4172 bitset_op4_cmp, bitset_or_and_, bitset_or_and_cmp_, bitset_prev,
4173 bitset_print, bitset_release_memory, bitset_toggle_,
4174 bitset_type_choose, bitset_type_get, bitset_type_name_get,
4175 debug_bitset): Likewise.
4176 * lib/bitset.h (bitset_set, bitset_reset, bitset_test): Likewise.
4177 * lib/bitset_stats.c (bitset_log_histogram_print,
4178 bitset_percent_histogram_print, bitset_stats_and,
4179 bitset_stats_and_cmp, bitset_stats_and_or,
4180 bitset_stats_and_or_cmp, bitset_stats_andn, bitset_stats_andn_cmp,
4181 bitset_stats_andn_or, bitset_stats_andn_or_cmp, bitset_stats_copy,
4182 bitset_stats_count, bitset_stats_disable, bitset_stats_disjoint_p,
4183 bitset_stats_dump, bitset_stats_empty_p, bitset_stats_enable,
4184 bitset_stats_equal_p, bitset_stats_free, bitset_stats_init,
4185 bitset_stats_list, bitset_stats_list_reverse, bitset_stats_not,
4186 bitset_stats_ones, bitset_stats_or, bitset_stats_or_and,
4187 bitset_stats_or_and_cmp, bitset_stats_or_cmp, bitset_stats_print,
4188 bitset_stats_print_1, bitset_stats_read, bitset_stats_reset,
4189 bitset_stats_set, bitset_stats_size, bitset_stats_subset_p,
4190 bitset_stats_test, bitset_stats_toggle, bitset_stats_type_get,
4191 bitset_stats_write, bitset_stats_xor, bitset_stats_xor_cmp,
4192 bitset_stats_zero): Likewise.
4193 * lib/bitsetv.c (bitsetv_alloc, bitsetv_create, bitsetv_free,
4194 bitsetv_zero, bitsetv_ones, bitsetv_transitive_closure,
4195 bitsetv_dump, debug_bitsetv): Likewise.
4196 * lib/ebitset.c (ebitset_and, ebitset_and_cmp, ebitset_andn,
4197 ebitset_andn_cmp, ebitset_bytes, ebitset_copy, ebitset_copy_,
4198 ebitset_copy_cmp, ebitset_disjoint_p, ebitset_elt_add,
4199 ebitset_elt_alloc, ebitset_elt_calloc, ebitset_elt_find,
4200 ebitset_elt_free, ebitset_elt_last, ebitset_elt_remove,
4201 ebitset_elt_zero_p, ebitset_elts_grow, ebitset_empty_p,
4202 ebitset_equal_p, ebitset_free, ebitset_init, ebitset_list,
4203 ebitset_list_reverse, ebitset_not, ebitset_ones, ebitset_op3_cmp,
4204 ebitset_or, ebitset_or_cmp, ebitset_release_memory, ebitset_reset,
4205 ebitset_set, ebitset_size, ebitset_subset_p, ebitset_test,
4206 ebitset_weed, ebitset_xor, ebitset_xor_cmp, ebitset_zero):
4207 Likewise.
4208 * lib/lbitset.c (debug_lbitset, lbitset_and, lbitset_and_cmp,
4209 lbitset_andn, lbitset_andn_cmp, lbitset_bytes, lbitset_copy,
4210 lbitset_copy_cmp, lbitset_disjoint_p, lbitset_elt_alloc,
4211 lbitset_elt_calloc, lbitset_elt_find, lbitset_elt_free,
4212 lbitset_elt_link, lbitset_elt_unlink, lbitset_elt_zero_p,
4213 lbitset_empty_p, lbitset_equal_p, lbitset_free, lbitset_init,
4214 lbitset_list, lbitset_list_reverse, lbitset_not, lbitset_ones,
4215 lbitset_op3_cmp, lbitset_or, lbitset_or_cmp, lbitset_prune,
4216 lbitset_release_memory, lbitset_reset, lbitset_set, lbitset_size,
4217 lbitset_subset_p, lbitset_test, lbitset_weed, lbitset_xor,
4218 lbitset_xor_cmp, lbitset_zero): Likewise.
e76d2469 4219
ae26e1f0
AD
42202002-10-14 Akim Demaille <akim@epita.fr>
4221
4222 Version 1.75.
4223
d43baf71
AD
42242002-10-14 Akim Demaille <akim@epita.fr>
4225
4226 * tests/Makefile.am (maintainer-check-posix): New.
4227
7ebc83e3
AD
42282002-10-14 Akim Demaille <akim@epita.fr>
4229
4230 * data/glr.c [YYDEBUG] (YYLEFTMOST_STATE): Initialize the yyloc
4231 member.
4232
05846dae
AD
42332002-10-14 Akim Demaille <akim@epita.fr>
4234
4235 * src/tables.c (table_ninf_remap): base -> tab.
4236 Reported by Matt Rosing.
4237
1318e37d
PE
42382002-10-14 Paul Eggert <eggert@twinsun.com>
4239
447fbb17
PE
4240 * tests/action.at, tests/calc.at, tests/conflicts.at,
4241 tests/cxx-type.at, tests/headers.at, tests/input.at,
4242 tests/regression.at, tests/synclines.at, tests/torture.at:
4243 Say "bison -o foo.c foo.y", not "bison foo.y -o foo.c",
4244 so that the tests still work even if POSIXLY_CORRECT is set.
4245 * doc/bison.texinfo (Rpcalc Compile, Invocation): Likewise.
05846dae 4246
1318e37d
PE
4247 * data/c.m4 (b4_int_type): Use yysigned_char instead of signed char,
4248 for portability to K&R hosts. Fix typo: signed char is guaranteed
4249 only to 127, not to 128.
4250 * data/glr.c (yysigned_char): New type.
4251 * data/yacc.c (yysigned_char): Likewise.
4252 * tests/regression.at (Web2c Actions): signed char -> yysigned_char.
4253
cc0f0794
PE
42542002-10-13 Paul Eggert <eggert@twinsun.com>
4255
5038f418
PE
4256 * data/yacc.c (yyparse): Rewrite to avoid "comparison is always
4257 true due to limited range of data type" warning from GCC.
4258
cc0f0794
PE
4259 * data/c.m4 (b4_token_defines): Protect against double-inclusion
4260 by wrapping enum yytokentype's definition inside #ifndef
4261 YYTOKENTYPE. This undoes a bug I introduced on 2002-10-12.
4262
6fed0802
AD
42632002-10-13 Akim Demaille <akim@epita.fr>
4264
4265 * data/glr.c (yyglrShiftDefer, yyaddDeferredAction, yydoAction):
4266 Un yy- yyrhs to avoid the name clash with the global YYRHS.
4267
32f0598d
AD
42682002-10-13 Akim Demaille <akim@epita.fr>
4269
4270 * Makefile.maint: Update from Autoconf 2.54.
4271 * m4/strerror_r.m4 (AC_FUNC_STRERROR_R): Remove, shipped with 2.54.
4272
7ea9a33f
AD
42732002-10-13 Akim Demaille <akim@epita.fr>
4274
4275 * src/print.c (print_state): Separate the list of solved conflicts
4276 from the other items.
4277 * tests/conflicts.at (Resolved SR Conflicts): Adjust.
4278
ea99527d
AD
42792002-10-13 Akim Demaille <akim@epita.fr>
4280
4281 Let nondeterministic skeletons be usable with deterministic
4282 tables.
4283
4284 With the patch, GAWK compiled by GCC without -O2 passes its test
4285 suite using a GLR parser driven by LALR tables. It fails with -O2
4286 because `struct stat' gives two different answers on my machine:
4287 88 (definition of an auto var) and later 96 (memset on this var).
4288 Hence the stack is badly corrumpted. The headers inclusion is to
4289 blame: if I move the awk.h inclusion before GLR's system header
4290 inclusion, the two struct stat have the same size.
4291
4292 * src/tables.c (pack_table): Always create conflict_table.
4293 (token_actions): Always create conflict_list.
4294 * data/glr.c (YYFLAG): Remove, unused.
4295
f377f69f
AD
42962002-10-13 Akim Demaille <akim@epita.fr>
4297
4298 * configure.ac (AC_GNU_SOURCE): Use it instead of hand written code.
4299 (O0FLAGS): New.
4300 (VALGRIND, GXX): New.
4301 * tests/atlocal.in (CFLAGS): Use O0FLAGS.
4302 * tests/bison.in: Run $PREBISON a pre-command.
4303 * tests/Makefile.am (maintainer-check, maintainer-check-valgrind)
4304 (maintainer-check-g++): New.
4305 * Makefile.am (maintainer-check): New.
4306
2a1fe6ed
AD
43072002-10-13 Akim Demaille <akim@epita.fr>
4308
4309 * data/glr.c: Formatting changes.
4310 Tweak some trace messages to match yacc.c's.
4311
f50adbbd
AD
43122002-10-13 Akim Demaille <akim@epita.fr>
4313
4314 GLR parsers sometimes raise parse errors instead of performing the
4315 default reduction.
4316 Reported by Charles-Henry de Boysson.
4317
4318 * tests/calc.at (_AT_CHECK_CALC, _AT_CHECK_CALC_ERROR): Don't
4319 check the length of the traces when %glr.
4320 (_AT_CHECK_CALC_ERROR): Also skip `^Stack' lines, coming from
4321 GLR's traces.
4322 (AT_CHECK_CALC_LALR, AT_CHECK_CALC_GLR): New.
4323 Test GLR parsers.
4324 * data/glr.c (YYLEFTMOST_STATE): Fix its value.
4325 (yyltype): Remove the yy prefix from the member names.
4326 (yytable): Complete its comment.
4327 (yygetLRActions): Map error action number from YYTABLE from
4328 YYTABLE_NINF to 0.
4329 (yyisErrorAction): No longer compare YYACTION to YYPACT_NINF
4330 (which was a bug: it should have been YYTABEL_NINF, and yet it was
4331 not satisfying as we could compare an YYACTION computed from
4332 YYDEFACT to YYTABLE_NINF although they are unrelated): 0 is the
4333 only value for error actions.
4334 (yyreportParseError): In verbose parse error messages, don't issue
4335 `error' in the list of expected tokens.
4336 * data/yacc.c (yyparse) <yybackup>: Rewrite the decoding of the
4337 next action to perform to match glr.c's decoding.
4338 (yytable): Complete its comment.
4339
bcbad5b9
PE
43402002-10-13 Paul Eggert <eggert@twinsun.com>
4341
4342 Fix problem reported by Henrik Grubbstroem in
161a71f3 4343 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00098.html>:
bcbad5b9
PE
4344 "nonterm: { $$ = 123; } { $$ = $1; };" was wrongly rejected,
4345 because the Bison parser reads the second action before reducing
4346 the first one.
4347 * src/scan-gram.l (rule_length): New static var.
4348 Use it to keep track of the rule length in the scanner, since
4349 we can't expect the parser to be in lock-step sync with the scanner.
4350 (handle_action_dollar, handle_action_at): Use this var.
4351 * tests/actions.at (Exotic Dollars): Test for the problem.
05846dae 4352
14904b89
PE
43532002-10-12 Paul Eggert <eggert@twinsun.com>
4354
1fe611e5
PE
4355 * lib/timevar.c [! IN_GCC && HAVE_SYS_TIME_H]: Include <sys/time.h>.
4356 * m4/timevar.m4 (BISON_PREREQ_TIMEVAR): Check for <sys/time.h>.
4357 Include <sys/time.h> when checking for clock_t and struct tms.
4358 Use same include order as source.
4359 This is for the SunOS 4.1.4 porting bug reported by Peter Klein in
161a71f3 4360 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00016.html>.
05846dae 4361
1fe611e5
PE
4362 * lib/timevar.c: Update copyright date and clarify comments.
4363 (get_time) [IN_GCC]: Keep the GCC version for reference.
05846dae 4364
1fe611e5
PE
4365 * lib/timevar.c, lib/timevar.h, lib/timevar.def: Import
4366 GCC version as of today, then merge Bison's changes.
4367 Change "GCC" to "Bison" in copyright notice. timevar.def's
4368 author is Akim, so change that too.
4369
98194095
PE
4370 * src/reader.c (grammar_current_rule_check):
4371 Don't worry about the default action if $$ is untyped.
4372 Prevents bogus warnings reported by Jim Gifford in
161a71f3 4373 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00015.html>.
98194095 4374
14904b89
PE
4375 * data/c.m4 (b4_token_enum): Do not define YYTOKENTYPE.
4376 * data/glr.c, data/lalr1.cc, data/yacc.c:
4377 Output token definitions before the first part of user declarations.
4378 Fixes compatibility problem reported by Jim Gifford for kbd in
161a71f3 4379 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00014.html>.
14904b89 4380
ff6dca18
PE
43812002-10-11 Paul Eggert <eggert@twinsun.com>
4382
4383 * data/yacc.c (yyreport_parse_error): Remove, putting its body into...
4384 (yyparse): here. This undoes some of the 2002-07-25 change.
4385 Compatibility problem reported by Ralf S. Engelschall with
4386 OSSP cfg <http://www.ossp.org/pkg/lib/cfg/>.
4387
eb714592
AD
43882002-10-11 Akim Demaille <akim@epita.fr>
4389
4390 * tests/regression.at Characters Escapes): New.
4391 * src/scan-gram.l (SC_ESCAPED_CHARACTER): Accept \' in strings and
4392 characters.
4393 Reported by Jan Nieuwenhuizen.
4394
b7195100
AD
43952002-10-11 Akim Demaille <akim@epita.fr>
4396
4397 * po/id.po: New.
4398
f28a0f2d
PE
43992002-10-10 Paul Eggert <eggert@twinsun.com>
4400
4401 Portability fixes for bitsets; this also avoids several GCC
4402 warnings.
4403
4404 * lib/abitset.c: Include <stddef.h>, for offsetof.
4405 * lib/lbitset.c: Likewise.
4406
4407 * lib/abitset.c (abitset_bytes): Return a size that is aligned
4408 properly for vectors of objects. Do not assume that adding a
4409 header size to a multiple of a word size yields a value that is
4410 properly aligned for the whole union.
4411 * lib/bitsetv.c (bitsetv_alloc): Likewise.
4412
4413 * lib/bitset_stats.c (bitset_stats_bytes): Adjust to new,
4414 unique names for structures.
4415 * lib/ebitset.c (ebitset_bytes): Likewise.
4416 * lib/lbitset.c (lbitset_bytes): Likewise.
4417
4418 * lib/abitset.c (abitset_ones, abitset_zero, abitset_empty_p,
4419 abitset_copy1, abitset_not, abitset_equal_p, abitset_subset_p,
4420 abitset_disjoint_p, abitset_and, abitset_and_cmp, abitset_andn,
4421 abitset_andn_cmp, abitset_or, abitset_or_cmp, abitset_xor,
4422 abitset_xor_cmp, abitset_and_or, abitset_and_or_cmp,
4423 abitset_andn_or, abitset_andn_or_cmp, abitset_or_and,
4424 abitset_or_and_cmp, abitset_copy): Supply prototype decls,
4425 to improve the type-checking that GCC can do.
4426 * lib/bitset.c (bitset_op4_cmp): Likewise.
4427 * lib/bitset_stats.c (bitset_stats_count,
4428 bitset_stats_empty_p, bitset_stats_ones, bitset_stats_zero,
4429 bitset_stats_copy, bitset_stats_disjoint_p,
4430 bitset_stats_equal_p, bitset_stats_not, bitset_stats_subset_p,
4431 bitset_stats_and, bitset_stats_and_cmp, bitset_stats_andn,
4432 bitset_stats_andn_cmp, bitset_stats_or, bitset_stats_or_cmp,
4433 bitset_stats_xor, bitset_stats_xor_cmp, bitset_stats_and_or,
4434 bitset_stats_and_or_cmp, bitset_stats_andn_or,
4435 bitset_stats_andn_or_cmp, bitset_stats_or_and,
4436 bitset_stats_or_and_cmp): Likewise.
4437 * lib/lbitset.c (lbitset_and, lbitset_and_cmp, lbitset_andn,
4438 lbitset_andn_cmp, lbitset_or, lbitset_or_cmp, lbitset_xor,
4439 lbitset_xor_cmp, lbitset_empty_p, lbitset_ones, lbitset_not,
4440 lbitset_subset_p, lbitset_disjoint_p, debug_lbitset): Likewise.
4441
4442 * lib/abitset.h: Include bitset.h, not bbitset.h.
4443 * lib/ebitset.h: Likewise.
4444 * lib/lbitset.h: Likewise.
4445
4446 * lib/bbitset.h: (enum_bitset_ops, enum_bitset_type): New types.
4447 All instances of parameters of type enum bitset_opts are now of
4448 type enum_bitset_opts, to conform to the C Standard, and similarly
4449 for enum_bitset_type.
4450 * lib/ebitset.c (enum_ebitset_find_mode): Likewise.
4451 * lib/lbitset.c (enum_lbitset_find_mode): Likewise.
4452
4453 Do not use "struct bitset_struct" to mean different things in
4454 different modules. Not only is this confusing, it violates
4455 the C Standard, which requires that structure types in different
4456 modules must be compatible if one is to be passed to the other.
4457 * lib/bbitset.h (bitset): Now points to a union, not to a struct.
4458 All instances of "struct bitset_struct *" replaced with "bitset".
4459 * lib/bitset.h (struct bitset_struct): Remove, replacing with....
4460 (union bitset_union, struct abitset_struct, struct ebitset_struct,
4461 struct lbitset_struct, struct bitset_stats_struct): New types.
4462 All uses of struct bitset_struct changed to union bitset_union,
4463 etc.
4464 * lib/abitset.c (struct abitset_struct, abitset,
4465 struct bitset_struct): Remove.
4466 * lib/bitset_stats.c (struct bitset_stats_struct, bitset_stats,
4467 struct bitset_struct): Remove.
4468 * lib/ebitset.c (struct ebitset_struct, ebitset, struct
4469 bitset_struct): Remove.
4470 * lib/lbitset.c (struct lbitset_struct, lbitset, bitset_struct):
4471 Likewise.
4472
4473 Do not call a function of type T using a call that assumes the
4474 function is of a different type U. Standard C requires that a
4475 function must be called with a type that is compatible with its
4476 definition.
4477 * lib/bbitset.h (bitset_and_or_, bitset_andn_or_, bitset_or_and_):
4478 New decls.
4479 * lib/bitset.c (bitset_and_or_, bitset_andn_or_, bitset_or_and_):
4480 New functions.
4481 * lib/ebitset.c (PFV): Remove.
4482 * lib/lbitset.c (PFV): Likewise.
4483 * lib/ebitset.c (ebitset_and, ebitset_andn, ebitset_or,
4484 ebitset_xor, ebitset_copy, ebitset_ones, ebitset_empty_p): New
4485 decls.
4486 (ebitset_and, ebitset_andn, ebitset_or, ebitset_xor): New functions.
4487 (ebitset_vtable): Use them.
4488 * lib/lbitset.c (lbitset_and, lbitset_andn, lbitset_or,
4489 lbitset_xor): New functions.
4490 (lbitset_vtable): Use them.
4491
4492 * lib/bitset.h (bitset_next, bitset_prev, bitset_only_set_p):
4493 Declare.
4494
4495 * lib/bitsetv.c (bitsetv_alloc): Add a cast to (void *) to avoid a
4496 GCC warning.
4497 * lib/lbitset.c (LBITSET_CURRENT1): Likewise.
4498 Use offsetof, for simplicity.
4499
6fbe4984
PE
45002002-10-06 Paul Eggert <eggert@twinsun.com>
4501
4502 * lib/bitset.h (bitset_reset): Do not assume that bitset_word is
4503 the same width as int. This reapplies a hunk of the 2002-08-12 patch
161a71f3 4504 <http://lists.gnu.org/archive/html/bison-patches/2002-08/msg00007.html>,
6fbe4984
PE
4505 which was inadvertently undone by the 2002-09-30 patch.
4506 * lib/lbitset.c (debug_lbitset): Do not assume that bitset_word is
4507 the same width as int.
4508
420f93c8
PE
45092002-10-04 Paul Eggert <eggert@twinsun.com>
4510
4511 Version 1.50.
4512
4513 * configure.ac (AC_INIT), NEWS: Increment version number.
4514
4515 * doc/bison.texinfo: Minor spelling, grammar, and white space
4516 fixes.
4517 (Symbols): Mention that any negative value returned from yylex
4518 signifies end-of-input. Warn about negative chars. Mention
4519 the portable Standard C character set.
4520
4521 The GNU coding standard says CFLAGS and YFLAGS are reserved
4522 for the installer to set.
4523 * lib/Makefile.am (AM_CFLAGS): Renamed from CFLAGS.
4524 * src/Makefile.am (AM_CFLAGS): Likewise.
4525 (AM_YFLAGS): Renamed from YFLAGS.
4526
4527 Fix some MAX and MIN problems.
4528 * src/gram.h (ITEM_NUMBER_MIN): MIN_MAX -> INT_MIN.
4529 * src/lalr.h (GOTO_NUMBER_MAX): INT_MAX -> SHRT_MAX.
4530 * src/symtab.h (SYMBOL_NUMBER_MAX): New macro.
4531 * src/reader.c (reader): Use it.
4532
4533 * tests/regression.at (Braces parsing): Use grep, not fgrep, as
4534 POSIX 1003.1-2001 has removed fgrep.
4535
45362002-10-04 Michael Hayes <m.hayes@elec.canterbury.ac.nz>
4537
4538 * lib/bbitset.h (BITSET_WINDEX_MAX): Redefine so that it cannot be
4539 interpreted as signed.
4540 * lib/ebitset.c (ebitset_list): Fix bug.
4541
ff68026d
PE
45422002-10-01 Paul Eggert <eggert@twinsun.com>
4543
4544 More fixes for 64-bit hosts and large bitsets.
4545
4546 * lib/abitset.c (struct abitset_struct.n_bits, abitset_small_list,
4547 abitset_size, abitset_list, abitset_list_reverse, abitset_list):
4548 Use bitset_bindex, not int or unsigned int or size_t, to count bits.
4549 * lib/bbitset.h (struct bitset_vtable.size, struct bitset_vtable.count,
4550 struct bitset_vtable.list, struct bitset_vtable.list_reverse,
4551 bitset_count_, bitset_next, bitset_prev, bitset_first, bitset_last,
4552 bitset_count_): Likewise.
4553 * lib/bitset.h (bitset_iterator.num, bitset_iterator.i,
4554 bitset_first, bitset_last): Likewise.
4555 * lib/bitset_stats.c (bitset_stats_size, bitset_stats_list,
4556 bitset_stats_list_reverse, bitset_stats_size,
4557 bitset_stats_count, bitset_stats_list, bitset_stat_list_reverse):
4558 Likewise.
4559 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
4560 * lib/bitsetv.c (bitsetv_alloc, bitsetv_create, bitsetv_free,
4561 bitsetv_zero, bitsetv_ones, bitsetv_transitive_closure,
4562 bitsetv_reflexive_transitive_closure): Likewise.
4563 * lib/bitsetv.h (bitsetv_alloc, bitsetv_create): Likewise.
4564 * lib/ebitset.c (ebitset_size, ebitset_list, ebitset_list_reverse):
4565 Likewise.
4566 * lib/lbitset.c (lbitset_size, lbitset_list, lbitset_list_merge):
4567 Likewise.
420f93c8 4568
ff68026d
PE
4569 * lib/abitset.c (abitset_ones, abitset_zero, abitset_bytes):
4570 Use size_t, not unsigned int, to count bytes.
4571 * lib/abitset.h (abitset_bytes): Likewise.
4572 * lib/bitset.c (bitset_bytes, bitset_alloc, bitset_obstack_alloc):
4573 Likewise.
4574 * lib/bitset.h (bitset_bytes): Likewise.
4575 * lib/bitset_stats.c (bitset_stats_bytes, bitset_stats_init): Likewise.
4576 * lib/bitset_stats.h (bitset_stats_bytes): Likewise.
4577 * lib/bitsetv.c (bitsetv_alloc): Likewise.
4578 * lib/ebitset.c (ebitset_bytes): Likewise.
4579 * lib/ebitset.h (ebitset_bytes): Likewise.
4580 * lib/lbitset.c (lbitset_bytes): Likewise.
4581 * lib/lbitset.h (lbitset_bytes): Likewise.
420f93c8 4582
ff68026d
PE
4583 * lib/abitset.c (abitset_empty_p, abitset_not, abitset_equal_p,
4584 abitset_subset_p, abitset_disjoint_p, abitset_and,
4585 abitset_and_cmp, abitset_andn, abitset_andn_cmp, abitset_or,
4586 abitset_or_cmp, abitset_xor, abitset_xor_cmp, abitset_and_or,
4587 abitset_and_or_cmp, abitset_andn_or, abitset_andn_or_cmp,
4588 abitset_or_and, abitset_or_and_cmp):
4589 Use bitset_windex instead of unsigned int.
4590 * lib/bitsetv.c (bitsetv_dump, debug_bitsetv): Likewise.
4591 * lib/ebitset.c (struct ebitset_struct.size, ebitset_elts_grow,
4592 ebitset_elt_add, ebitset_elt_remove, ebitset_weed,
4593 ebitset_elt_find, ebitset_list_reverse, ebitset_list, ebitset_init):
4594 Likewise.
4595 * lib/lbitset.c (lbitset_ones, lbitset_not): Likewise.
420f93c8 4596
ff68026d
PE
4597 * lib/bitset.c (bitset_print):
4598 Use proper printf formats for widths of integer types.
4599 * lib/bitset_stats.c (bitset_percent_histogram_print,
4600 bitset_log_histogram_print, bitset_stats_print_1): Likewise.
4601 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
4602 * lib/bitsetv.c (bitsetv_dump, debug_bitsetv): Likewise.
4603 * lib/lbitset.c (lbitset_bytes): Likewise.
420f93c8 4604
ff68026d
PE
4605 * lib/bbitset.h (BITSET_BINDEX_MAX, BITSET_WINDEX_MAX,
4606 BITSET_SIZE_MAX): New macros.
4607 (BITSET_INDEX_MAX): Remove. It wasn't right, since it assumed that
4608 sizeof (bitset_word) == sizeof (bitset_windex). All uses changed
4609 to BITSET_WINDEX_MAX.
4610
4611 * lib/bitset.c (bitset_next, bitset_prev, bitset_first,
4612 bitset_last): Return BITSET_BINDEX_MAX (not -1) for no value,
4613 since we now return the bitset_bindex type (not int).
4614
4615 * lib/bitsetv.c (bitsetv_alloc): Check for arithmetic overflow
4616 when computing sizes.
4617 * lib/ebitset.c (ebitset_elts_grow): Likewise.
4618
4619 * lib/lbitset.c (lbitset_elt_find): Simplify windex calculation
4620 and avoid cast to unsigned.
4621
6aa452a6
AD
46222002-09-30 Akim Demaille <akim@epita.fr>
4623
4624 * lib/abitset.c, lib/bbitset.h, lib/bitset.c, lib/bitset.h,
4625 * lib/bitset_stats.c, lib/bitsetv.c, lib/ebitset.c, lib/lbitset.c:
4626 Updates from Michael Hayes.
4627
927f7817
AD
46282002-09-30 Art Haas <ahaas@neosoft.com>
4629
4630 * configure.ac: Update AC_OUTPUT and AM_CONFIG_HEADER
4631 invocations.
4632 * tests/cxx-type.at (declarator): Don't rely on NDEBUG being not
4633 defined.
4634
9738f41e
AD
46352002-09-27 Akim Demaille <akim@epita.fr>
4636
4637 Version 1.49c.
4638
a5c75d7f
AD
46392002-09-27 Akim Demaille <akim@epita.fr>
4640
4641 * configure.ac (AM_INIT_AUTOMAKE): We _need_ 1.7.
4642 (Because of AC_LIBSOURCE).
4643
8280e179
AD
46442002-09-27 Akim Demaille <akim@epita.fr>
4645
4646 Playing with Autoscan.
4647
4648 * configure.ac: Remove the old LIBOBJ tweaks.
4649 (AC_REPLACE_FUNCS): Add strrchr and strtol.
4650 * lib/strrchr.c: New.
4651 * lib/strtol.c: New, from the Coreutils 4.5.1.
4652
ae64af35
AD
46532002-09-27 Akim Demaille <akim@epita.fr>
4654
4655 Playing with Autoscan.
4656
4657 * m4/prereq.m4 (jm_PREREQ_ARGMATCH, jm_FUNC_ARGMATCH): New.
4658 * lib/Makefile.am (libbison_a_SOURCES): No longer include
4659 argmatch.c and argmatch.h, since they are AC_LIBSOURCE'd.
4660 * lib/strcasecmp.c, lib/strncasecmp.c, lib/memcmp.c: New, from the
4661 Coreutils 4.5.1.
4662
d1a1114f
AD
46632002-09-24 Akim Demaille <akim@epita.fr>
4664
4665 * doc/bison.texinfo (Stack Overflow): xref to Recursion.
4666 (Frequently Asked Questions, Parser Stack Overflow): New.
4667
b906441c
AD
46682002-09-13 Akim Demaille <akim@epita.fr>
4669
4670 Playing with autoscan.
4671
4672 * src/reader.c (get_merge_function): Use xstrdup, not strdup.
4673 * src/files.c (skeleton_find): Remove, unused.
4674 * m4/memcmp.m4: New, from the Coreutils 4.5.1.
4675 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Run jm_FUNC_MEMCMP.
4676
bd701811
AD
46772002-09-13 Akim Demaille <akim@epita.fr>
4678
4679 * configure.ac (AM_INIT_AUTOMAKE): Require Automake 1.6.3.
4680 * Makefile.am (AUTOMAKE_OPTIONS): Don't.
4681
e0a13e7b
AD
46822002-09-13 Akim Demaille <akim@epita.fr>
4683
4684 * configure.ac: Require 2.54.
4685 s/jm_FUNC_MALLOC/AC_FUNC_MALLOC/.
4686 s/jm_FUNC_REALLOC/AC_FUNC_REALLOC/.
4687 * m4/c-bs-a.m4, m4/malloc.m4, m4/mbstate_t.m4, m4/realloc.m4:
4688 Remove, provided by Autoconf macros.
4689
c97011bf
AD
46902002-09-12 Akim Demaille <akim@epita.fr>
4691
4692 * m4/prereq.m4: Update, from Coreutils 4.5.1.
4693
d862b1be
AD
46942002-09-12 Akim Demaille <akim@epita.fr>
4695
4696 * m4/prereq.m4: Update, from Fileutils 4.1.5.
4697 * configure.ac (jm_PREREQ_TEMPNAME): Invoke it.
4698 Reported by Martin Mokrejs.
4699
3d38c03a
AD
47002002-09-10 Akim Demaille <akim@epita.fr>
4701
4702 * src/parse-gram.y: Associate a human readable string to each
4703 token type.
4704 * tests/regression.at (Invalid inputs): Adjust.
4705
b6347355
AD
47062002-09-10 Gary V. Vaughan <gary@gnu.org>
4707
4708 * tests/Makefile.am ($(srcdir)/package.m4): Bison now ships
4709 with an Autoconf-2.5x style configure.ac.
4710
09ba4ab2
PE
47112002-09-06 Paul Eggert <eggert@twinsun.com>
4712
4713 * doc/bison.texinfo (Conditions): Make explicit that the GPL
4714 exception applies only to yacc.c. This is a modification of a
4715 patch originally suggested by Akim Demaille.
4716
21846f69
AD
47172002-09-06 Akim Demaille <akim@epita.fr>
4718
09ba4ab2
PE
4719 * data/c.m4 (b4_copyright): Move the GPL exception comment from
4720 here to...
4721 * data/yacc.c: here.
4722
21846f69
AD
4723 * data/lalr1.cc (struct yyltype): Don't define it, since we use
4724 LocationType.
4725 (b4_ltype): Default to yy::Location from location.hh.
4726
c0ad8bf3
AD
47272002-09-04 Jim Meyering <jim@meyering.net>
4728
4729 * data/yacc.c: Guard the declaration of yytoknum also with
4730 `#ifdef YYPRINT', so it is declared only when used.
4731
3a93251e
AD
47322002-09-04 Akim Demaille <akim@epita.fr>
4733
4734 * configure.in: Rename as...
4735 * configure.ac: this.
4736 Bump to 1.49c.
4737
427c0dda
AD
47382002-09-04 Akim Demaille <akim@epita.fr>
4739
4740 * src/assoc.c, src/closure.c, src/gram.c, src/injections.c,
4741 * src/lalr.c, src/LR0.c, src/relation.c, src/tables.c: Don't
4742 translate maintainer only messages.
4743
6a254321
PE
47442002-08-12 Paul Eggert <eggert@twinsun.com>
4745
645e30d1
PE
4746 Version 1.49b.
4747
6a254321
PE
4748 * Makefile.am (SUBDIRS): Remove intl.
4749 (DISTCLEANFILES): Remove.
4750 * NEWS: Mention that GNU M4 is now required. Clarify what is
4751 meant by "larger grammars". Mention the pt_BR translation.
4752 * configure.in (AC_CHECK_DECLS): Add getenv, getopt.
4753 (AM_GNU_GETTEXT_VERSION): New macro, replacing GETTEXT_VERSION var.
4754 Bump version from 0.11.2 to 0.11.5.
4755 (BISON_PREREQ_STAGE): Remove.
4756 (AM_GNU_GETTEXT): Use external gettext.
4757 (AC_OUTPUT): Remove intl/Makefile.
4758
4759 * config/depcomp, config/install-sh: Sync with Automake 1.6.3.
4760
4761 * data/glr.c: Include string.h, for strlen.
4762 (yyreportParseError): Use size_t for yysize.
4763 (yy_yypstack): No longer nested inside yypstates, as nested
4764 functions are not portable. Do not assume size_t is the
4765 same width as int.
4766 (yypstates): Do not assume that ptrdiff_t is the same width
4767 as int, and similarly for yyposn and YYINDEX.
4768
4769 * data/yacc.c: Fix comment about `$$ = $1': it can copy garbage.
4770
4771 * lib/Makefile.am (INCLUDES): Do not include from the intl
4772 directory, which has been removed.
4773 * src/Makefile.am (INCLUDES): Likewise.
4774
4775 * lib/Makefile.am (libbison_a_SOURCES): Add unlocked-io.h.
4776 (bitsets_sources, additional_bitsets_sources, timevars_sources):
4777 New vars.
4778
4779 * lib/Makefile.am (libbison_a_SOURCES): Avoid +=, a GNU make extension.
4780 * tests/Makefile.am (EXTRA_DIST): Likewise.
4781
4782 * lib/abitset.c (abitset_reverse_list, ebitset_reverse_list):
4783 Do not assume that bitset_windex is the same width as unsigned.
4784
4785 * lib/abitset.c (abitset_unused_clear): Do not assume that
4786 bitset_word is the same width as int.
4787 * lib/bbitset.h (BITSET_INDEX_MAX, BITSET_MSB): Likewise.
4788 * lib/bitset.h (bitset_set, bitset_reset): Likewise.
4789 * lib/bitset_stats.c (bitset_stats_set, bitset_stats_reset): Likewise.
4790 * lib/ebitset.c (ebitset_set, ebitset_reset): Likewise.
4791 * lib/lbitset.c (lbitset_set, lbitset_reset): Likewise.
4792
4793 * lib/abitset.c (abitset_op1): Use -1, not ~0, as memset arg (for
4794 portability to one's complement hosts!).
4795 * lib/ebitset.c (ebitset_op1): Likewise.
4796 * lib/lbitset.c (lbitset_op1): Likewise.
4797
4798 * lib/argmatch.c, lib/quotearg.c, quotearg.h: Sync with GNU tar.
4799 * lib/argmatch.h, lib/basename.c, lib/dirname.c, lib/dirname.h,
4800 lib/hash.c, lib/hash.h, lib/strnlen.c, lib/xmalloc.c:
4801 Sync with fileutils.
4802 * lib/error.c, lib/getopt.c, lib/getopt.h, lib/getopt1.c,
4803 lib/gettext.h: Sync with diffutils.
4804
4805 * lib/memrchr.c, lib/mkstemp.c, lib/strchr.c, lib/strnlen.c,
4806 lib/strspn.c, lib/tempname.c: Use GPL, not LGPL.
4807
4808 * lib/obstack.c, lib/obstack.h: Sync with fileutils, except use
4809 PROTOTYPES to check for prototypes, and "defined __STDC__" to
4810 check for void *.
4811
4812 * lib/bbitset.h (BITSET_WORD_BITS): Now of type unsigned, not
4813 size_t; the old version tried to do this but casted improperly.
4814 (bitset_bindex, bitset_windex): Now size_t, not unsigned long.
4815 (bitset_test): Now returns int, not unsigned long.
4816
4817 * lib/bitset_stats.c: Include "gettext.h".
4818 (_): New macro.
4819 (bitset_stats_set, bitset_stats_reset, bitset_stats_test): Don't
4820 name locals "index", as it generates unnecessary warnings on some
4821 hosts that have an "index" function.
4822
4823 * lib/bitset_stats.c (bitset_stats_print_1, bitset_stats_print,
4824 bitset_stats_read, bitset_stats_write): Wrap strings in _() if
4825 they need translation.
4826 * src/LR0.c (state_list_append, new_itemsets, get_state,
4827 append_states, generate_states): Likewise.
4828 * src/assoc.c (assoc_to_string): Likewise.
4829 * src/closure.c (print_closure, set_firsts, closure): Likewise.
4830 * src/gram.c (grammar_dump): Likewise.
4831 * src/injections.c (injections_compute): Likewise.
4832 * src/lalr.c (lookaheads_print): Likewise.
4833 * src/relation.c (relation_transpose): Likewise.
4834 * src/scan-gram.l: Likewise.
4835 * src/tables.c (table_grow, pack_vector): Likewise.
4836
4837 * m4/Makefile.am (EXTRA_DIST): Remove codeset.m4,
4838 glibc21.m4, isc-posix.m4 lcmessage.m4, stage.m4.
4839 * m4/malloc.m4, m4/realloc.m4: Sync with diffutils.
4840 * m4/mbstate_t.m4: Sync with fileutils.
4841 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): AC_MBSTATE_T -> AC_TYPE_MBSTATE_T.
4842
4843 * po/LINGUAS: Add pt_BR.
4844 * po/POTFILES.in: Add src/assoc.c, src/closure.c, src/gram.c,
4845 src/main.c, src/relation.c, src/state.c, lib/bitset_stats.c,
4846 lib/timevar.c.
4847 Use src/parse-gram.y instead of src/parse-gram.c, as the gettext
4848 manual recommends.
4849 Similarly, use src/scan-gram.l instead of src/scan-gram.c.
4850
4851 * src/complain.c (strerror_r): Remove decl; not needed.
4852 (strerror): Use same pattern as ../lib/error.c.
4853
4854 * src/files.c, src/files.h (compute_header_macro): Remove; unused.
4855
4856 * src/gram.c (grammar_dump): Do not assume ptrdiff_t fits in int.
4857
4858 * src/main.c (main): Cast result of bindtextdomain and textdomain
4859 to void, to avoid a GCC warning when --disable-nls is in effect.
4860
4861 * src/scan-gram.l: Use strings rather than escapes when possible,
4862 to minimize the number of warnings from xgettext.
4863 (handle_action_dollar, handle_action_at): Don't use isdigit,
4864 as it mishandles negative chars and it may not work as expected
4865 outside the C locale.
4866
4867 * src/symtab.c (symbol_get): Don't cast LHS of an assignment;
4868 this is a GCC extension and is not portable to other compilers.
4869
4870 * src/system.h (alloca): Use same pattern as ../lib/error.c.
4871 Do not include <ctype.h>; no longer needed.
4872 Do not include <malloc.h>; no longer needed (and generates
4873 warnings on OpenBSD 3.0).
4874
4875 * tests/cxx-type.at (yylex): Do not pass signed char to isupper;
4876 it's not portable.
4877
4878 * tests/regression.at: Do not use 'cc -c input.c -o input';
4879 Sun C rejects this. Instead, use 'cc -c input.c -o input.o'.
4880
4881 * tests/synclines.at (AC_SYNCLINES_COMPILE): Accept any nonzero
4882 exit status as failure, not just exit status 1. Sun C exits
4883 with status 2 sometimes.
4884
4885 * tests/torture.at (AT_INCREASE_DATA_SIZE): New macro.
4886 Use it for the two large tests.
4887
c8f002c7
AD
48882002-08-02 Akim Demaille <akim@epita.fr>
4889
4890 * src/conflicts.c (conflicts_output): Don't output rules never
4891 reduced here, since anyway that computation doesn't work.
4892 * src/gram.h, src/gram.h (rule_filter_t, rule_useful_p)
4893 (rule_useless_p, rule_never_reduced_p): New.
4894 (grammar_rules_partial_print): Use a filter instead of a range.
4895 Display the title only if needed.
4896 (grammar_rules_print): Adjust.
4897 (grammar_rules_never_reduced_report): New.
4898 * src/tables.c (action_row): Move the computation of rules never
4899 reduced to...
4900 (token_actions): here.
4901 * src/main.c (main): Make the parser before making the report, so
4902 that rules never reduced are computed.
4903 Call grammar_rules_never_reduced_report.
4904 * src/print.c (print_results): Report rules never reduced.
4905 * tests/conflicts.at, tests/reduce.at: Adjust.
4906
cd08e51e
AD
49072002-08-01 Akim Demaille <akim@epita.fr>
4908
4909 Instead of attaching lookaheads and duplicating the rules being
4910 reduced by a state, attach the lookaheads to the reductions.
4911
4912 * src/state.h (state_t): Remove the `lookaheads',
4913 `lookaheads_rule' member.
4914 (reductions_t): Add a `lookaheads' member.
4915 Use a regular array for the `rules'.
4916 * src/state.c (reductions_new): Initialize the lookaheads member
4917 to 0.
4918 (state_rule_lookaheads_print): Adjust.
4919 * src/state.h, src/state.c (state_reductions_find): New.
4920 * src/conflicts.c (resolve_sr_conflict, set_conflicts)
4921 (count_rr_conflicts): Adjust.
4922 * src/lalr.c (LArule): Remove.
4923 (add_lookback_edge): Adjust.
4924 (state_lookaheads_count): New.
4925 (states_lookaheads_initialize): Merge into...
4926 (initialize_LA): this.
4927 (lalr_free): Adjust.
4928 * src/main.c (main): Don't free nullable and derives too early: it
4929 is used by --verbose.
4930 * src/print.c, src/print_graph.c, src/tables.c: Adjust.
4931
bb0027a9
AD
49322002-08-01 Akim Demaille <akim@epita.fr>
4933
4934 * src/derives.h, src/derives.c (derives): A `rule_t***' instead of
4935 `rule_number_t**'.
4936 (set_derives, free_derives): Rename as...
4937 (derives_compute, derives_free): this.
4938 Adjust all dependencies.
4939 * src/nullable.c (set_nullable, free_nullable): Rename as...
4940 (nullable_compute, nullable_free): these.
4941 (rule_list_t): Store rule_t *, not rule_number_t.
4942 * src/state.c (state_rule_lookaheads_print): Directly compare rule
4943 pointers, instead of their numbers.
4944 * src/main.c (main): Call nullable_free, and derives_free earlier,
4945 as they were lo longer used.
4946
3325ddc4
AD
49472002-08-01 Akim Demaille <akim@epita.fr>
4948
4949 * lib/timevar.c (get_time): Include children time.
4950 * src/lalr.h (LA, LArule): Don't export them: used with the
4951 state_t.
4952 * src/lalr.c (LA, LArule): Static.
4953 * src/lalr.h, src/lalr.c (lalr_free): New.
4954 * src/main.c (main): Call it.
4955 * src/tables.c (pack_vector): Check whether loc is >= to the
4956 table_size, not >.
4957 (pack_tables): Don't free froms, tos, conflict_tos, and pos...
4958 (tables_generate): do it, since that's also it which allocates
4959 them.
4960 Don't free LA and LArule, main does.
4961
c6f1a33c
AD
49622002-07-31 Akim Demaille <akim@epita.fr>
4963
4964 Separate parser tables computation and output.
4965
4966 * src/output.c (nvectors, base_t, base, base_ninf, conflict_table)
4967 (conflict_list, conflict_list_cnt, table, check, table_ninf)
4968 (yydefgoto, yydefact, high): Move to...
4969 * src/tables.h, src/tables.c: here.
4970 * src/output.c (vector_number_t, VECTOR_NUMBER_MAX)
4971 (VECTOR_NUMBER_MIN, state_number_to_vector_number)
4972 (symbol_number_to_vector_number, nvectors, BASE_MAX, BASE_MIN)
4973 (froms, tos, conflict_tos, tally, width, action_t, ACTION_MAX)
4974 (ACTION_MIN, actrow, order, nentries, pos, conflrow)
4975 (conflict_list_free, table_size, lowzero, table_grow, conflict_row)
4976 (action_row, save_row, token_actions, save_column, default_goto)
4977 (goto_actions, sort_actions, matching_state, pack_vector)
4978 (table_ninf_remap, pack_table, prepare_actions): Move to...
4979 * src/tables.c: here.
4980 * src/tables.h, src/tables.c(tables_generate, tables_free): New.
4981 * src/output.c (token_actions, output_base, output_conflicts)
4982 (output_check): Merge into...
4983 (prepare_actions): this.
4984 (actions_output): Rename as...
4985 (user_actions_output): this.
4986 * src/main.c (main): Call tables_generate and tables_free.
4987
1509d42f
AD
49882002-07-31 Akim Demaille <akim@epita.fr>
4989
4990 Steal GCC's --time-report support.
4991
4992 * lib/timevar.c, lib/timevar.h, lib/timevar.def: New,
4993 stolen/adjusted from GCC.
4994 * m4/stage.m4: Remove time related checks.
4995 * m4/timevar.m4: New.
4996 * configure.in: Adjust.
4997 * src/system.h: Adjust to using timevar.h.
4998 * src/getargs.h, src/getargs.c: Support trace_time for
4999 --trace=time.
5000 * src/main.c (stage): Remove.
5001 (main): Replace `stage' invocations with timevar calls.
5002 * src/output.c: Insert pertinent timevar calls.
5003
273a74fa
AD
50042002-07-31 Akim Demaille <akim@epita.fr>
5005
5006 Let --trace have arguments.
5007
5008 * src/getargs.h (enum trace_e): New.
5009 * src/getargs.c (trace_args, trace_types, trace_argmatch): New.
5010 (long_options, short_options): --trace/-T takes an optional
5011 argument.
5012 Change all the uses of trace_flag to reflect the new flags.
5013 * tests/sets.at (Firsts, Nullable, Broken Closure): Use --trace=sets.
5014
5015 Strengthen `stage' portability.
5016
5017 * m4/stage.m4 (BISON_PREREQ_STAGE): New.
5018 * configure.in: Use it.
5019 Don't check for malloc.h and sys/times.h.
5020 * src/system.h: Include them when appropriate.
5021 * src/main.c (stage): Compile only when mallinfo, struct mallinfo,
5022 times and struct tms are available.
5023
217598da
AD
50242002-07-30 Akim Demaille <akim@epita.fr>
5025
5026 In verbose parse error message, don't report `error' as an
5027 expected token.
5028 * tests/actions.at (Printers and Destructors): Adjust.
5029 * tests/calc.at (Calculator $1): Adjust.
5030 * data/yacc.c, data/glr.c, data/lalr1.c: When making the verbose
5031 error message, do not report the parser accepts the error token in
5032 that state.
5033
52489d44
AD
50342002-07-30 Akim Demaille <akim@epita.fr>
5035
5036 Normalize conflict related messages.
5037
5038 * src/complain.h, src/complain.c (warn, complain): New.
5039 * src/conflicts.c (conflicts_print): Use them.
5040 (conflict_report_yacc): New, extracted from...
5041 (conflicts_print): here.
5042 * tests/conflicts.at, tests/existing.at: Adjust.
5043
e8832397
AD
50442002-07-30 Akim Demaille <akim@epita.fr>
5045
5046 Report rules which are never reduced by the parser: those hidden
5047 by conflicts.
5048
5049 * src/LR0.c (save_reductions): Don't make the final state too
5050 different: save its reduction (accept) instead of having a state
5051 without any action (no shift or goto, no reduce).
5052 Note: the final state is now a ``regular'' state, i.e., the
5053 parsers now contain `reduce 0' as default reduction.
5054 Nevertheless, since they decide to `accept' when yystate =
5055 final_state, they still will not reduce rule 0.
5056 * src/print.c (print_actions, print_reduction): Adjust.
5057 * src/output.c (action_row): Track reduced rules.
5058 (token_actions): Report rules never reduced.
5059 * tests/conflicts.at, tests/regression.at: Adjust.
5060
caf23d24
AD
50612002-07-30 Akim Demaille <akim@epita.fr>
5062
5063 `stage' was accidently included in a previous patch.
5064 Initiate its autoconfiscation.
5065
5066 * configure.in: Look for malloc.h and sys/times.h.
5067 * src/main.c (stage): Adjust.
5068 Report only when trace_flag.
5069
640748ee
AD
50702002-07-29 Akim Demaille <akim@epita.fr>
5071
5072 * src/state.h, src/state.c (transitions_t): Holds state_t*'s, not
5073 state_number_t.
5074 (errs_t): symbol_t*, not symbol_number_t.
5075 (reductions_t): rule_t*, not rule_number_t.
5076 (FOR_EACH_SHIFT): New.
5077 * src/LR0.c, src/conflicts.c, src/lalr.c, src/output.c
5078 * src/print.c, src/print_graph.c: Adjust.
5079
88bce5a2
AD
50802002-07-29 Akim Demaille <akim@epita.fr>
5081
5082 Use $accept and $end, as BYacc and BTYacc do, instead of $axiom and $.
5083
5084 * src/symtab.h, src/symtab.c (eoftoken, axiom): Rename as...
5085 (endtoken, accept): these.
5086 * src/reader.c (reader): Set endtoken's default tag to "$end".
5087 Set undeftoken's tag to "$undefined" instead of "$undefined.".
5088 * doc/bison.texinfo (Table of Symbols): Mention $accept and $end.
5089 Adjust.
5090
1bfb97db
AD
50912002-07-29 Akim Demaille <akim@epita.fr>
5092
5093 * src/reduce.c (reduce_grammar): When the language is empty,
5094 complain about the start symbol, not the axiom.
5095 Use its location.
5096 * tests/reduce.at (Empty Language): New.
5097
fc5734fe
AD
50982002-07-26 Akim Demaille <akim@epita.fr>
5099
5100 * src/reader.h, src/reader.c (gram_error): ... can't get
5101 yycontrol without making too strong assumptions on the parser
5102 itself.
5103 * src/output.c (prepare_tokens): Use the real 0th value of
5104 token_translations instead of `0'.
5105 * src/parse-gram.y (yyerror): Don't rely on yycontrol being
5106 visible here.
5107 * data/yacc.c (yyreport_parse_error): Rename yylocation as yylloc
5108 for the time being: %locations ought to provide it to yyerror.
5109
3650b4b8
AD
51102002-07-25 Akim Demaille <akim@epita.fr>
5111
5112 * src/output.c (prepare_tokens): Go up to ntokens, not ntokens + 1.
5113 * doc/bison.texinfo (Decl Summary): s/$illegal/$undefined./.
5114 * tests/regression.at (Web2c Actions): Adjust.
5115
4b3d3a8e
AD
51162002-07-25 Akim Demaille <akim@epita.fr>
5117
5118 Stop storing rules from 1 to nrules + 1.
5119
5120 * src/LR0.c, src/closure.c, src/derives.c, src/gram.c, src/lalr.c
5121 * src/nullable.c, src/output.c, src/print.c, src/reader.c
5122 * src/reduce.c: Allocate and free from &rules[0], not &rules[1].
5123 Iterate from 0 to nrules.
5124 Use rule_number_as_item_number and item_number_as_rule_number.
5125 Adjust to `derive' now containing possibly 0.
5126 * src/gram.h (rule_number_as_item_number, item_number_as_rule_number):
5127 Handle the `- 1' part in rule numbers from/to item numbers.
5128 * src/conflicts.c (log_resolution): Fix the message which reversed
5129 shift and reduce.
5130 * src/output.c (action_row): Initialize default_rule to -1.
5131 (token_actions): Adjust.
5132 * tests/sets.at (Nullable, Firsts): Fix the previously bogus
5133 expected output.
5134 * tests/conflicts.at (Resolved SR Conflicts): Likewise.
5135
4a2a22f4
AD
51362002-07-25 Akim Demaille <akim@epita.fr>
5137
5138 * data/c.m4 (b4_c_function, b4_c_ansi_args, b4_c_ansi_arg)
5139 (b4_c_knr_arg_names, b4_c_knr_arg_name, b4_c_knr_arg_decls)
5140 (b4_c_knr_arg_decl): New.
5141 * data/yacc.c: Use it to define yysymprint, yydestruct, and
5142 yyreport_parse_error.
5143
b8df3223
AD
51442002-07-25 Akim Demaille <akim@epita.fr>
5145
5146 * data/yacc.c (yyreport_parse_error): New, extracted from...
5147 (yyparse): here.
5148 (yydestruct, yysymprint): Move above yyparse.
5149 Be K&R compliant.
5150
a762e609
AD
51512002-07-25 Akim Demaille <akim@epita.fr>
5152
5153 * data/c.m4 (b4_ints_in, b4_int_type, b4_int_type_for): New,
5154 replace...
5155 (b4_sint_type, b4_uint_type): these.
5156 * data/yacc.c, data/glr.c, data/lalr1.cc: Use b4_int_type_for.
5157 * tests/regression.at (Web2c Actions): Adjust.
5158
12b0043a
AD
51592002-07-25 Akim Demaille <akim@epita.fr>
5160
5161 * src/gram.h (TIEM_NUMBER_MAX): New.
5162 (item_number_of_rule_number, rule_number_of_item_number): Rename
5163 as...
5164 (rule_number_as_item_number, item_number_as_rule_number): these.
5165 Adjust dependencies.
5166 * src/output.c (vector_number_t, VECTOR_NUMBER_MAX)
5167 (VECTOR_NUMBER_MIN, state_number_to_vector_number)
5168 (symbol_number_to_vector_number): New.
5169 (order): Of vector_number_t* type.
5170 (base_t, BASE_MAX, BASE_MIN): New.
5171 (froms, tos, width, pos, check): Of base_t type.
5172 (action_number_t, ACTION_MIN, ACTION_MAX): New.
5173 (actrow): Of action_number_t type.
5174 (conflrow): Of unsigned int type.
5175 (table_ninf, base_ninf): New.
5176 (GENERATE_MUSCLE_INSERT_TABLE): Also output the `*_min' value.
5177 (muscle_insert_int_table, muscle_insert_base_table)
5178 (muscle_insert_rule_number_table): New.
5179 (prepare_tokens): Output `toknum' as int_table.
5180 (action_row): Returns a rule_number_t.
5181 Use ACTION_MIN, not SHRT_MIN.
5182 (token_actions): yydefact is rule_number_t*.
5183 (table_ninf_remap): New.
5184 (pack_table): Use it for `base' and `table'.
5185 * data/yacc.c, data/glr.c, data/lalr1.cc (YYFLAG): Remove,
5186 replaced with...
5187 (YYPACT_NINF, YYTABLE_NINF): these.
5188 (yypact, yytable): Compute their types instead of hard-coded
5189 `short'.
5190 * tests/regression.at (Web2c Actions): Adjust.
5191
5dde258a
AD
51922002-07-19 Akim Demaille <akim@epita.fr>
5193
5194 * src/scan-gram.l (id): Can start with an underscore.
5195
a945ec39
AD
51962002-07-16 Akim Demaille <akim@epita.fr>
5197
5198 * src/assoc.c, src/asssoc.h (assoc_t, assoc_to_string): New.
5199 Adjust all former `associativity' dependencies.
5200 * src/symtab.c (symbol_new): Default associativity is `undef', not
5201 `right'.
5202 (symbol_check_alias_consistence): Adjust.
5203
fae437e8
AD
52042002-07-09 Akim Demaille <akim@epita.fr>
5205
5206 * doc/bison.texinfo: Properly set the ``header'' part.
5207 Use @dircategory ``GNU programming tools'' as per Texinfo's
5208 documentation.
5209 Use @copying.
5210
1a715ef2
AD
52112002-07-09 Akim Demaille <akim@epita.fr>
5212
5213 * lib/quotearg.h: Protect against multiple inclusions.
5214 * src/location.h (location_t): Add a `file' member.
5215 (LOCATION_RESET, LOCATION_PRINT): Adjust.
5216 * src/complain.c (warn_at, complain_at, fatal_at): Drop
5217 `error_one_per_line' support.
5218
a5d50994
AD
52192002-07-09 Akim Demaille <akim@epita.fr>
5220
5221 * src/complain.h, src/complain.c (warn, complain): Remove, unused.
5222 * src/reader.c (lineno): Remove.
5223 Adjust all dependencies.
5224 (get_merge_function): Take a location and use complain_at.
5225 * src/symtab.h, src/symtab.c (symbol_make_alias): Likewise.
5226 * tests/regression.at (Invalid inputs, Mixing %token styles):
5227 Adjust.
5228
b275314e
AD
52292002-07-09 Akim Demaille <akim@epita.fr>
5230
5231 * src/parse-gram.y (rules_or_grammar_declaration): Add an error
5232 recovery rule, and forbid extensions when --yacc.
5233 (gram_error): Use complain_at.
5234 * src/reader.c (reader): Exit if there were parse errors.
5235
865b9df1
AD
52362002-07-09 Akim Demaille <akim@epita.fr>
5237
5238 * tests/synclines.at (AT_SYNCLINES_COMPILE): New.
5239 (AT_TEST_SYNCLINE): Adjust to unusual GCC outputs.
5240 Reported by R Blake <blakers@mac.com>.
5241
c76e14da
AD
52422002-07-09 Akim Demaille <akim@epita.fr>
5243
5244 * data/yacc.c: Output the copyright notive in the header.
5245
7db2ed2d
AD
52462002-07-03 Akim Demaille <akim@epita.fr>
5247
5248 * src/output.c (froms, tos): Are state_number_t.
5249 (save_column): sp, sp1, and sp2 are state_number_t.
5250 (prepare): Rename `final' as `final_state_number', `nnts' as
5251 `nterms_number', `nrules' as `rules_number', `nstates' as
5252 `states_number', and `ntokens' as `tokens_number'. Remove `nsym',
5253 unused.
5254 * data/yacc.c, data/glr.c, data/lalr1.cc: Adjust.
5255 * data/lalr1.cc (nsym_): Remove, unused.
5256
e68e0410
AD
52572002-07-03 Akim Demaille <akim@epita.fr>
5258
5259 * src/lalr.h, src/lalr.c (goto_number_t): New.
5260 * src/lalr.c (goto_list_t): New.
5261 Propagate them.
5262 * src/nullable.c (rule_list_t): New.
5263 Propagate.
5264 * src/types.h: Remove.
5265
e1a4f3a4
AD
52662002-07-03 Akim Demaille <akim@epita.fr>
5267
5268 * src/closure.c (print_fderives): Use rule_rhs_print.
5269 * src/derives.c (print_derives): Use rule_rhs_print.
5270 (rule_list_t): New, replaces `shorts'.
5271 (set_derives): Add comments.
5272 * tests/sets.at (Nullable, Firsts): Adjust.
5273
536545f3
AD
52742002-07-03 Akim Demaille <akim@epita.fr>
5275
5276 * src/output.c (prepare_actions): Free `tally' and `width'.
5277 (prepare_actions): Allocate and free `order'.
5278 * src/symtab.c (symbols_free): Free `symbols'.
5279 * src/scan-gram.l (scanner_free): Clear Flex's scanners memory.
5280 * src/output.c (m4_invoke): Move to...
5281 * src/scan-skel.l: here.
5282 (<<EOF>>): Close yyout, and free its name.
5283
8b752b00
AD
52842002-07-03 Akim Demaille <akim@epita.fr>
5285
5286 Fix some memory leaks, and fix a bug: state 0 was examined twice.
5287
5288 * src/LR0.c (new_state): Merge into...
5289 (state_list_append): this.
5290 (new_states): Merge into...
5291 (generate_states): here.
5292 (set_states): Don't ensure a proper `errs' state member here, do it...
5293 * src/conflicts.c (conflicts_solve): here.
5294 * src/state.h, src/state.c: Comment changes.
5295 (state_t): Rename member `shifts' as `transitions'.
5296 Adjust all dependencies.
5297 (errs_new): For consistency, also take the values as argument.
5298 (errs_dup): Remove.
5299 (state_errs_set): New.
5300 (state_reductions_set, state_transitions_set): Assert that no
5301 previous value was assigned.
5302 (state_free): New.
5303 (states_free): Use it.
5304 * src/conflicts.c (resolve_sr_conflict): Don't use an `errs_t' as
5305 temporary storage: use `errs' and `nerrs' as elsewhere.
5306 (set_conflicts): Allocate and free this `errs'.
5307
613f5e1a
AD
53082002-07-02 Akim Demaille <akim@epita.fr>
5309
5310 * lib/libiberty.h: New.
5311 * lib: Update the bitset implementation from upstream.
5312 * src/closure.c, src/lalr.c, src/output.c, src/print_graph.c,
5313 * src/state.c: Use BITSET_FOR_EACH, not BITSET_EXECUTE.
5314 * src/main.c: Adjust bitset stats calls.
5315
26e0cadc
PE
53162002-07-01 Paul Eggert <eggert@twinsun.com>
5317
5318 * src/scan-gram.l (<SC_ESCAPED_CHARACTER>): Convert to unsigned
5319 char, so that negative chars don't collide with $.
5320
1154cced
AD
53212002-06-30 Akim Demaille <akim@epita.fr>
5322
5323 Have the GLR tests be `warning' checked, and fix the warnings.
5324
5325 * data/glr.c (YYFPRINTF): Always define it, not only when YYDEBUG
5326 (yyuserAction, yyreportAmbiguity): `Use' all the arguments.
5327 (yyremoveDeletes): `yyi' and `yyj' are size_t.
5328 Use YYFPRINTF when under if (YYDEBUG) to avoid empty `if' bodies.
5329 (yyaddDeferredAction): static.
5330 (yyglrReduce): yyi, yyk, amd yyposn are size_t.
5331 (yyreportParseError): yyprefix is const.
5332 yytokenp is used only when verbose.
5333 (yy__GNUC__): Replace with __GNUC__.
5334 (yypdumpstack): yyi is size_t.
5335 (yypreference): Un-yy local variables and arguments, to avoid
5336 clashes with `yyr1'. Anyway, we are not in the user name space.
5337 (yytname_size): be an int, as is compared with ints.
5338 * tests/testsuite.at (AT_COMPILE, AT_PARSER_CHECK): New.
5339 Use them.
5340 * tests/cxx-gram.at: Use quotation to protect $1.
5341 Use AT_COMPILE to enable warnings hunts.
5342 Prototype yylex and yyerror.
5343 `Use' argc.
5344 Include `string.h', not `strings.h'.
5345 Produce and prototype stmtMerge only when used.
5346 yylex takes a location.
5347
97650f4e
AD
53482002-06-30 Akim Demaille <akim@epita.fr>
5349
5350 We spend a lot of time in quotearg, in particular when --verbose.
5351
5352 * src/symtab.c (symbol_get): Store a quoted version of the key.
5353 (symbol_tag_get, symbol_tag_get_n, symbol_tag_print): Remove.
5354 Adjust all callers.
5355
d2576365
AD
53562002-06-30 Akim Demaille <akim@epita.fr>
5357
5358 * src/state.h (reductions_t): Rename member `nreds' as num.
5359 (errs_t): Rename members `nerrs' and `errs' as `num' and `symbols'.
5360 * src/state.c (ERRS_ALLOC, REDUCTIONS_ALLOC): Use the correct types.
5361
ccaf65bc
AD
53622002-06-30 Akim Demaille <akim@epita.fr>
5363
5364 * src/state.h, src/state.c (shift_t, SHIFT_SYMBOL, SHIFT_IS_SHIFT)
5365 (SHIFT_IS_GOTO, SHIFT_IS_ERROR, SHIFT_DISABLE, SHIFT_IS_DISABLED)
5366 (shifts_to): Rename as...
5367 (transition_t, TRANSITION_SYMBOL, TRANSITION_IS_TRANSITION)
5368 (TRANSITION_IS_GOTO, TRANSITION_IS_ERROR, TRANSITION_DISABLE)
5369 (TRANSITION_IS_DISABLED, transitions_to): these.
5370
87675353
AD
53712002-06-30 Akim Demaille <akim@epita.fr>
5372
5373 * src/print.c (print_shifts, print_gotos): Merge into...
5374 (print_transitions): this.
5375 (print_transitions, print_errs, print_reductions): Align the
5376 lookaheads columns.
5377 (print_core, print_transitions, print_errs, print_state,
5378 print_grammar): Output empty lines separator before, not after.
5379 (state_default_rule_compute): Rename as...
5380 (state_default_rule): this.
5381 * tests/conflicts.at (Defaulted Conflicted Reduction),
5382 (Unresolved SR Conflicts, Resolved SR Conflicts): Adjust.
5383 * tests/regression.at (Rule Line Numbers, Web2c Report): Adjust.
5384
ce4ccb4b
AD
53852002-06-30 Akim Demaille <akim@epita.fr>
5386
5387 Display items as we display rules.
5388
5389 * src/gram.h, src/gram.c (rule_lhs_print): New.
5390 * src/gram.c (grammar_rules_partial_print): Use it.
5391 * src/print.c (print_core): Likewise.
5392 * tests/conflicts.at (Defaulted Conflicted Reduction),
5393 (Unresolved SR Conflicts): Adjust.
5394 (Unresolved SR Conflicts): Adjust and rename as...
5395 (Resolved SR Conflicts): this, as was meant.
5396 * tests/regression.at (Web2c Report): Adjust.
5397
bc933ef1
AD
53982002-06-30 Akim Demaille <akim@epita.fr>
5399
5400 * src/print.c (state_default_rule_compute): New, extracted from...
5401 (print_reductions): here.
5402 Pessimize, but clarify the code.
5403 * tests/conflicts.at (Defaulted Conflicted Reduction): New.
5404
53d4308d
AD
54052002-06-30 Akim Demaille <akim@epita.fr>
5406
5407 * src/output.c (action_row): Let default_rule be always a rule
5408 number.
5409
574fb2d5
AD
54102002-06-30 Akim Demaille <akim@epita.fr>
5411
5412 * src/closure.c (print_firsts, print_fderives, closure):
5413 Use BITSET_EXECUTE.
5414 * src/lalr.c (lookaheads_print): Likewise.
5415 * src/state.c (state_rule_lookaheads_print): Likewise.
5416 * src/print_graph.c (print_core): Likewise.
5417 * src/print.c (print_reductions): Likewise.
5418 * src/output.c (action_row): Likewise.
5419 Use SHIFT_IS_DISABLED, SHIFT_IS_SHIFT and SHIFT_SYMBOL.
5420
05811fd7
AD
54212002-06-30 Akim Demaille <akim@epita.fr>
5422
5423 * src/print_graph.c: Use report_flag.
5424
0e4d5753
AD
54252002-06-30 Akim Demaille <akim@epita.fr>
5426
5427 * src/lalr.c (traverse, digraph, matrix_print, transpose): Move
5428 to...
5429 * src/relation.h, src/relation.c (traverse, relation_digraph)
5430 (relation_print, relation_transpose): New.
5431
24c7d800
AD
54322002-06-30 Akim Demaille <akim@epita.fr>
5433
5434 * src/state.h, src/state.c (shifts_to): New.
5435 * src/lalr.c (build_relations): Use it.
5436
9222837b
AD
54372002-06-30 Akim Demaille <akim@epita.fr>
5438
5439 * src/gram.h (rule_number_t, RULE_NUMBER_MAX, int_of_rule_number)
5440 (item_number_of_rule_number, rule_number_of_item_number): New.
5441 * src/LR0.c, src/closure.c, src/derives.c, src/derives.h,
5442 * src/gram.c, src/lalr.c, src/nullable.c, src/output.c, src/print.c,
5443 * src/print_graph.c, src/reader.c, src/reduce.c, src/reduce.h:
5444 Propagate their use.
5445 Much remains to be done, in particular wrt `shorts' from types.h.
5446
260008e5
AD
54472002-06-30 Akim Demaille <akim@epita.fr>
5448
5449 * src/symtab.c (symbol_new): Initialize the `printer' member.
5450
8a731ca8
AD
54512002-06-30 Akim Demaille <akim@epita.fr>
5452
5453 * src/LR0.c (save_reductions): Remove, replaced by...
5454 * src/state.h, src/state.c (state_reductions_set): New.
5455 (reductions, errs): Rename as...
5456 (reductions_t, errs_t): these.
5457 Adjust all dependencies.
5458
32e1e0a4
AD
54592002-06-30 Akim Demaille <akim@epita.fr>
5460
5461 * src/LR0.c (state_list_t, state_list_append): New.
5462 (first_state, last_state): Now symbol_list_t.
5463 (this_state): Remove.
5464 (new_itemsets, append_states, save_reductions): Take a state_t as
5465 argument.
5466 (set_states, generate_states): Adjust.
5467 (save_shifts): Remove, replaced by...
5468 * src/state.h, src/state.c (state_shifts_set): New.
5469 (shifts): Rename as...
5470 (shifts_t): this.
5471 Adjust all dependencies.
5472 * src/state.h (state_t): Remove the `next' member.
5473
e5fb6710
AD
54742002-06-30 Akim Demaille <akim@epita.fr>
5475
5476 * src/vcg.c (quote): Use slot 2, since we often pass symbol tag
5477 escaped in slot 0.
5478
c7ca99d4
AD
54792002-06-30 Akim Demaille <akim@epita.fr>
5480
5481 Use hash.h for the state hash table.
5482
5483 * src/LR0.c (STATE_HASH_SIZE, state_hash): Remove.
5484 (allocate_storage): Use state_hash_new.
5485 (free_storage): Use state_hash_free.
5486 (new_state, get_state): Adjust.
5487 * src/lalr.h, src/lalr.c (states): Move to...
5488 * src/states.h (state_t): Remove the `link' member, no longer
5489 used.
5490 * src/states.h, src/states.c: here.
5491 (state_hash_new, state_hash_free, state_hash_lookup)
5492 (state_hash_insert, states_free): New.
5493 * src/states.c (state_table, state_compare, state_hash): New.
5494 * src/output.c (output_actions): Do not free states now, since we
5495 still need to know the final_state number in `prepare', called
5496 afterwards. Do it...
5497 * src/main.c (main): here: call states_free after `output'.
5498
df0e7316
AD
54992002-06-30 Akim Demaille <akim@epita.fr>
5500
5501 * src/state.h, src/state.c (state_new): New, extracted from...
5502 * src/LR0.c (new_state): here.
5503 * src/state.h (STATE_ALLOC): Move to...
5504 * src/state.c: here.
5505 * src/LR0.h, src/LR0.c (nstates, final_state): Move to...
5506 * src/state.h, src/state.c: here.
5507
39f41916
AD
55082002-06-30 Akim Demaille <akim@epita.fr>
5509
5510 * src/reader.c (gensym): Rename as...
5511 * src/symtab.h, src/symtab.c (dummy_symbol_get): this.
5512 (getsym): Rename as...
5513 (symbol_get): this.
5514
d57650a5
AD
55152002-06-30 Akim Demaille <akim@epita.fr>
5516
5517 * src/state.h (state_number_t, STATE_NUMBER_MAX): New.
5518 * src/LR0.c, src/LR0.h, src/conflicts.c, src/lalr.c, src/lalr.h,
5519 * src/output.c, src/print.c, src/print_graph.c: Propagate.
5520 * src/LR0.h, src/LR0.h (final_state): Is a state_t*.
5521
5a08f1ce
AD
55222002-06-30 Akim Demaille <akim@epita.fr>
5523
5524 Make the test suite pass with warnings checked.
5525
5526 * tests/actions.at (Printers and Destructors): Improve.
5527 Avoid unsigned vs. signed issues.
5528 * tests/calc.at: Don't exercise the scanner here, do it...
5529 * tests/input.at (Torturing the Scanner): here.
5530
720623af
PH
55312002-06-28 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
5532
88e7e941 5533 * data/glr.c: Correct typo in Emacs-mode directive. Slightly
720623af
PH
5534 reorganize first lines parallel to yacc.c.
5535
fb8135fa
AD
55362002-06-28 Akim Demaille <akim@epita.fr>
5537
5538 * data/c.m4 (b4_copyright, b4_sint_type, b4_uint_type, b4_token_define)
5539 (b4_token_enum, b4_token_defines): New, factored from...
5540 * data/lalr1.cc, data/yacc.c, glr.c: here.
5541
41442480
AD
55422002-06-28 Akim Demaille <akim@epita.fr>
5543
5544 * data/yacc.c (yydestruct, yysymprint): Pacify GCC warnings for
5545 unused variables.
5546 * src/output.c (merger_output): static.
5547
e0e5bf84
AD
55482002-06-28 Akim Demaille <akim@epita.fr>
5549
5550 * src/reader.h: s/grammer_current_rule_merge_set/grammar_.../.
5551 * src/conflicts.c (conflicts_total_count): `i' is unsigned, to
5552 pacify GCC.
5553 * src/output.c (save_row): Initialize all the variables to pacify GCC.
e0e5bf84 5554
676385e2
PH
55552002-06-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
5556
5557 Accumulated changelog for new GLR parsing features.
5558
6a254321 5559 * src/conflicts.c (count_total_conflicts): Change name to
676385e2
PH
5560 conflicts_total_count.
5561 * src/conflicts.h: Ditto.
5562 * src/output.c (token_actions): Use the new name.
5563 (output_conflicts): Change conflp => conflict_list_heads, and
5564 confl => conflict_list for better readability.
5565 * data/glr.c: Use the new names.
5566 * NEWS: Add self to GLR announcement.
e0e5bf84 5567
676385e2
PH
5568 * src/reader.c (free_merger_functions): Cleanup: XFREE->free.
5569
5570 * doc/bison.texinfo (GLR Parsers): Make corrections suggested by
5571 Akim Demaille.
5572
5573 * data/bison.glr: Change name to glr.c
5574 * data/glr.c: Renamed from bison.glr.
5575 * data/Makefile.am: Add glr.c
e0e5bf84
AD
5576
5577 * src/getargs.c:
5578
676385e2
PH
5579 * src/symlist.h: Add dprec and merger fields to symbol_list_s.
5580 * src/symlist.c (symbol_list_new): Initialize dprec and merger fields.
e0e5bf84 5581
676385e2
PH
5582 Originally 2002-06-16 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
5583
5584 * data/bison.glr: Be sure to restore the
5585 current #line when returning to the skeleton contents after having
5586 exposed the input file's #line.
5587
5588 Originally 2002-06-13 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
5589
5590 * data/bison.glr: Bring up to date with changes to bison.simple.
5591
5592 Originally 2002-06-03 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
5593
5594 * data/bison.glr: Correct definitions that use b4_prefix.
5595 Various reformatting.
5596 (GLRStack): Make yychar (in YYPURE case) and yytokenp as part of stack.
5597 (yyreportParseError, yyrecoverParseError, yyprocessOneStack): remove
5598 yytokenp argument; now part of stack.
5599 (yychar): Define to behave as documented.
5600 (yyclearin): Ditto.
e0e5bf84 5601
676385e2
PH
5602 Originally 2002-05-14 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
5603
5604 * src/reader.h: Add declaration for free_merger_functions.
5605
5606 * src/reader.c (merge_functions): New variable.
5607 (get_merge_function): New function.
5608 (free_merger_functions): New function.
5609 (readgram): Check for %prec that is not followed by a symbol.
5610 Handle %dprec and %merge declarations.
5611 (packgram): Initialize dprec and merger fields in rules array.
5612
5613 * src/output.c (conflict_tos, conflrow, conflict_table, conflict_list,
5614 conflict_list_cnt, conflict_list_free): New variables.
5615 (table_grow): Also grow conflict_table.
e0e5bf84 5616 (prepare_rules): Output dprec and merger tables.
676385e2 5617 (conflict_row): New function.
e0e5bf84 5618 (action_row): Output conflict lists for GLR parser. Don't use
676385e2
PH
5619 default reduction in conflicted states for GLR parser so that there
5620 are spaces for the conflict lists.
5621 (save_row): Also save conflict information.
5622 (token_actions): Allocate conflict list.
5623 (merger_output): New function.
5624 (pack_vector): Pack conflict table, too.
5625 (output_conflicts): New function to output yyconflp and yyconfl.
5626 (output_check): Allocate conflict_tos.
5627 (output_actions): Output conflict tables, also.
5628 (output_skeleton): Output b4_mergers definition.
5629 (prepare): Output b4_max_rhs_length definition.
5630 Use 'bison.glr' as default skeleton for GLR parsers.
5631
5632 * src/gram.c (glr_parser): New flag.
5633 (grammar_free): Call free_merger_functions.
5634
5635 * src/conflicts.c (count_rr_conflicts): Augment to optionally count
5636 all pairs of conflicting reductions, rather than just all tokens
5637 causing conflicts. Needed to size conflict tables.
e0e5bf84 5638 (conflicts_output): Modify call to count_rr_conflicts for new
676385e2
PH
5639 interface.
5640 (conflicts_print): Ditto.
5641 (count_total_conflicts): New function.
5642
5643 * src/reader.h (merger_list): New type.
5644 (merge_functions): New variable.
5645
5646 * src/lex.h (tok_dprec, tok_merge): New token types.
5647
5648 * src/gram.h (rule_s): Add dprec and merger fields.
5649 (glr_parser): New flag.
5650
5651 * src/conflicts.h (count_total_conflicts): New function.
5652
5653 * src/options.c (option_table): Add %dprec, %merge, and %glr-parser.
5654
5655 * doc/bison.texinfo (Generalized LR Parsing): New section.
5656 (GLR Parsers): New section.
5657 (Language and Grammar): Mention GLR parsing.
5658 (Table of Symbols): Add %dprec, %glr-parser, %merge, GLR
5659 Correct typo ("tge" -> "the").
5660
5661 * data/bison.glr: New skeleton for GLR parsing.
5662
5663 * tests/cxx-gram.at: New tests for GLR parsing.
5664
5665 * tests/testsuite.at: Include cxx-gram.at.
5666
5667 * tests/Makefile.am: Add cxx-gram.at.
e0e5bf84 5668
676385e2
PH
5669 * src/parse-gram.y:
5670
5671 * src/scan-gram.l: Add %dprec, %glr-parser, %merge.
5672
5673 * src/parse-gram.y: Grammar for %dprec, %merge, %glr-parser.
e0e5bf84 5674
b5480d74 56752002-06-27 Akim Demaille <akim@epita.fr>
e2aaf4c4
AD
5676
5677 * src/options.h, src/options.c: Remove.
5678 * src/getargs.c (short_options, long_options): New.
5679
60491a94
AD
56802002-06-27 Akim Demaille <akim@epita.fr>
5681
5682 * data/bison.simple, data/bison.c++: Rename as...
5683 * data/yacc.c, data/lalr1.cc: these.
5684 * doc/bison.texinfo (Environment Variables): Remove.
5685
9be0c25b
AD
56862002-06-25 Raja R Harinath <harinath@cs.umn.edu>
5687
5688 * src/getargs.c (report_argmatch): Initialize strtok().
5689
1ae72863
AD
56902002-06-20 Akim Demaille <akim@epita.fr>
5691
5692 * data/bison.simple (b4_symbol_actions): New, replaces...
5693 (b4_symbol_destructor, b4_symbol_printer): these.
5694 (yysymprint): Be sure to call YYPRINT only for tokens, and using
5695 user token numbers.
5696
87542d29
AD
56972002-06-20 Akim Demaille <akim@epita.fr>
5698
5699 * data/bison.simple (yydestructor): Rename as...
5700 (yydestruct): this.
5701
1a31ed21
AD
57022002-06-20 Akim Demaille <akim@epita.fr>
5703
5704 * src/symtab.h, src/symtab.c (symbol_type_set)
5705 (symbol_destructor_set, symbol_precedence_set): The location is
5706 the last argument.
5707 Adjust all callers.
5708
e776192e
AD
57092002-06-20 Akim Demaille <akim@epita.fr>
5710
5711 * src/parse-gram.y (YYPRINT, yyprint): Don't mess with the parser
5712 internals.
5713 * src/reader.h, src/reader.c (grammar_current_rule_prec_set):
5714 Takes a location.
5715 * src/symtab.h, src/symtab.c (symbol_class_set)
5716 (symbol_user_token_number_set): Likewise.
5717 Adjust all callers.
5718 Promote complain_at.
5719 * tests/input.at (Type Clashes): Adjust.
5720
5c1180b3
AD
57212002-06-20 Akim Demaille <akim@epita.fr>
5722
5723 * data/bison.simple (YYLEX): Fix the declaration when
5724 %pure-parser.
5725
e3170060
AD
57262002-06-20 Akim Demaille <akim@epita.fr>
5727
5728 * data/bison.simple (yysymprint): Don't print the token number,
5729 just its name.
5730 * tests/actions.at (Destructors): Rename as...
5731 (Printers and Destructors): this.
5732 Also exercise %printer.
5733
253862fd
AD
57342002-06-20 Akim Demaille <akim@epita.fr>
5735
5736 * data/bison.simple (YYDSYMPRINT): New.
5737 Use it to remove many of the #if YYDEBUG/if (yydebug).
5738
366eea36
AD
57392002-06-20 Akim Demaille <akim@epita.fr>
5740
5741 * src/symtab.h, src/symtab.c (symbol_t): printer and
5742 printer_location are new members.
5743 (symbol_printer_set): New.
5744 * src/parse-gram.y (PERCENT_PRINTER): New token.
5745 Handle its associated rule.
5746 * src/scan-gram.l: Adjust.
5747 (handle_destructor_at, handle_destructor_dollar): Rename as...
5748 (handle_symbol_code_at, handle_symbol_code_dollar): these.
5749 * src/output.c (symbol_printers_output): New.
5750 (output_skeleton): Call it.
5751 * data/bison.simple (yysymprint): New. Cannot be named yyprint
5752 since there are already many grammar files with a user `yyprint'.
5753 Replace the calls to YYPRINT to calls to yysymprint.
5754 * tests/calc.at: Adjust.
5755 * tests/torture.at (AT_DATA_STACK_TORTURE): Remove YYPRINT: it was
5756 taking advantage of parser very internal details (stack size!).
5757
4f25ebb0
AD
57582002-06-20 Akim Demaille <akim@epita.fr>
5759
5760 * src/scan-gram.l: Complete the scanner with the missing patterns
5761 to pacify Flex.
5762 Use `quote' and `symbol_tag_get' where appropriate.
5763
93b68a0e
AD
57642002-06-19 Akim Demaille <akim@epita.fr>
5765
5766 * tests/actions.at (Destructors): Augment to test locations.
5767 * data/bison.simple (yydestructor): Pass it the current location
5768 if locations are enabled.
5769 Prototype only when __STDC__ or C++.
5770 Change the argument names to move into the yy name space: there is
5771 user code here.
5772
58612f1d
AD
57732002-06-19 Akim Demaille <akim@epita.fr>
5774
74310291
AD
5775 * data/bison.simple (b4_pure_if): New.
5776 Use it instead of #ifdef YYPURE.
5777
57782002-06-19 Akim Demaille <akim@epita.fr>
5779
5780 * data/bison.simple (b4_location_if): New.
58612f1d
AD
5781 Use it instead of #ifdef YYLSP_NEEDED.
5782
f25bfb75
AD
57832002-06-19 Akim Demaille <akim@epita.fr>
5784
5785 Prepare @$ in %destructor, but currently don't bind it in the
5786 skeleton, as %location use is not cleaned up yet.
5787
5788 * src/scan-gram.l (handle_dollar, handle_destructor_at)
5789 (handle_action_at): New.
5790 (handle_at, handle_action_dollar, handle_destructor_dollar): Take
5791 a braced_code_t and a location as additional arguments.
5792 (handle_destructor_dollar): Instead of requiring `b4_eval', just
5793 unquote one when outputting `b4_dollar_dollar'.
5794 Adjust callers.
5795 * data/bison.simple (b4_eval): Remove.
5796 (b4_symbol_destructor): Adjust.
5797 * tests/input.at (Invalid @n): Adjust.
5798
c732d2c6
AD
57992002-06-19 Zack Weinberg <zack@codesourcery.com>
5800
5801 * doc/bison.texinfo: Document ability to have multiple
5802 prologue sections.
5803
8c165d89
AD
58042002-06-18 Akim Demaille <akim@epita.fr>
5805
5806 * src/files.c (compute_base_names): When computing the output file
5807 names from the input file name, strip the directory part.
5808
ca98bf57
AD
58092002-06-18 Akim Demaille <akim@epita.fr>
5810
5811 * data/bison.simple.new: Comment changes.
5812 Reported by Andreas Schwab.
5813
0bfb02ff
AD
58142002-06-18 Matt Kraai <kraai@alumni.cmu.edu>
5815
5816 * data/bison.simple (yyoverflowlab): #ifndef yyoverflow, so that
5817 there are no `label `yyoverflowlab' defined but not used' warnings
5818 when yyoverflow is defined.
5819
24c0aad7
AD
58202002-06-18 Akim Demaille <akim@epita.fr>
5821
5822 * src/symtab.h, src/symtab.c (symbol_t): destructor_location is a
5823 new member.
5824 (symbol_destructor_set): Adjust.
5825 * src/output.c (symbol_destructors_output): Output the destructor
5826 locations.
5827 Output the symbol name.
5828 * data/bison.simple (b4_symbol_destructor): Adjust.
5829
5719c109
AD
58302002-06-18 Cris Bailiff <c.bailiff@awayweb.com>
5831 and Akim Demaille <akim@epita.fr>
5832
5833 * data/bison.simple.new (yyerrlab1): Be sure to pop and destroy
5834 what's left on the stack when the error recovery hits EOF.
5835 * tests/actions.at (Destructors): Complete to exercise this case.
5836
9280d3ef
AD
58372002-06-17 Akim Demaille <akim@epita.fr>
5838
5839 * data/m4sugar/m4sugar.m4 (m4_map): Recognize when the list of
5840 arguments is really empty, not only equal to `[]'.
5841 * src/symtab.h, src/symtab.c (symbol_t): `destructor' is a new
5842 member.
5843 (symbol_destructor_set): New.
5844 * src/output.c (symbol_destructors_output): New.
5845 * src/reader.h (brace_code_t, current_braced_code): New.
5846 * src/scan-gram.l (BRACED_CODE): Use it to branch on...
5847 (handle_dollar): Rename as...
5848 (handle_action_dollar): this.
5849 (handle_destructor_dollar): New.
5850 * src/parse-gram.y (PERCENT_DESTRUCTOR): New.
5851 (grammar_declaration): Use it.
5852 * data/bison.simple (yystos): Is always defined.
5853 (yydestructor): New.
5854 * tests/actions.at (Destructors): New.
5855 * tests/calc.at (_AT_CHECK_CALC_ERROR): Don't rely on egrep.
5856
dafdc66f
AD
58572002-06-17 Akim Demaille <akim@epita.fr>
5858
5859 * src/symlist.h, src/symlist.c (symbol_list_length): New.
5860 * src/scan-gram.l (handle_dollar, handle_at): Compute the
5861 rule_length only when needed.
5862 * src/output.c (actions_output, token_definitions_output): Output
5863 the full M4 block.
5864 * src/symtab.c: Don't access directly to the symbol tag, use
5865 symbol_tag_get.
5866 * src/parse-gram.y: Use symbol_list_free.
5867
56c47203
AD
58682002-06-17 Akim Demaille <akim@epita.fr>
5869
5870 * src/reader.h, src/reader.c (symbol_list, symbol_list_new)
5871 (symbol_list_prepend, get_type_name): Move to...
5872 * src/symlist.h, src/symlist.c (symbol_list_t, symbol_list_new)
5873 (symbol_list_prepend, symbol_list_n_type_name_get): here.
5874 Adjust all callers.
5875 (symbol_list_free): New.
5876 * src/scan-gram.l (handle_dollar): Takes a location.
5877 * tests/input.at (Invalid $n): Adjust.
5878
1e0bab92
AD
58792002-06-17 Akim Demaille <akim@epita.fr>
5880
5881 * src/reader.h, src/reader.c (symbol_list_new): Export it.
5882 (symbol_list_prepend): New.
5883 * src/parse-gram.y (%union): `list' is a new member.
5884 (symbols.1): New, replaces...
5885 (terms_to_prec.1, nterms_to_type.1): these.
5886 * src/symtab.h, src/symtab.c (symbol_type_set, symbol_precedence_set)
5887 Take a location as additional argument.
5888 Adjust all callers.
5889
04e60654
AD
58902002-06-15 Akim Demaille <akim@epita.fr>
5891
5892 * src/parse-gram.y: Move %token in the declaration section so that
5893 we don't depend upon CVS Bison.
5894
10e5b8bd
AD
58952002-06-15 Akim Demaille <akim@epita.fr>
5896
5897 * src/state.h, src/state.c (state_rule_lookaheads_print): New.
5898 * src/print.c (print_core): Use it.
5899
9801d40c
AD
59002002-06-15 Akim Demaille <akim@epita.fr>
5901
5902 * src/conflicts.c (log_resolution): Accept the rule involved in
5903 the sr conflicts instead of the lookahead number that points to
5904 that rule.
5905 (flush_reduce): Accept the current lookahead vector as argument,
5906 instead of the index in LA.
5907 (resolve_sr_conflict): Accept the current number of lookahead
5908 bitset to consider for the STATE, instead of the index in LA.
5909 (set_conflicts): Adjust.
5910 * src/lalr.c, src/lalr.h, src/state.h: Comment changes.
5911
c0263492
AD
59122002-06-15 Akim Demaille <akim@epita.fr>
5913
5914 * src/state.h (state_t): Replace the `lookaheadsp' member, a
5915 short, with `lookaheads' (bitsetv), `lookaheads_rule' (rule_t**).
5916 Adjust all dependencies.
5917 * src/lalr.c (initialize_lookaheads): Split into...
5918 (states_lookaheads_count, states_lookaheads_initialize): these.
5919 (lalr): Adjust.
5920
9757c359
AD
59212002-06-15 Akim Demaille <akim@epita.fr>
5922
5923 * src/gram.h, src/gram.c (grammar_rules_partial_print): New, eved
5924 out of...
5925 (grammar_rules_print): here.
5926 * src/reduce.c (reduce_output): Use it.
5927 * tests/reduce.at (Useless Rules, Reduced Automaton)
5928 (Underivable Rules): Adjust.
5929
6b98e4b5
AD
59302002-06-15 Akim Demaille <akim@epita.fr>
5931
5932 Copy BYacc's nice way to report the grammar.
5933
5934 * src/gram.h, src/gram.c (grammar_rhs_print, grammar_rules_print):
5935 New.
5936 Don't print the rules' location, it is confusing and useless.
5937 (rule_print): Use grammar_rhs_print.
5938 * src/print.c (print_grammar): Use grammar_rules_print.
5939
6b98e4b5
AD
59402002-06-15 Akim Demaille <akim@epita.fr>
5941
5942 Complete and rationalize `useless thing' warnings.
5943
5944 * src/symtab.h, src/symtab.c (symbol_tag_get, symbol_tag_get_n)
5945 (symbol_tag_print): New.
5946 Use them everywhere in place of accessing directly the tag member.
5947 * src/gram.h, src/gram.c (rule_print): New.
5948 Use it where a rule used to be printed `by hand'.
5949 * src/reduce.c (nonterminals_reduce): Report the use nonterminals.
5950 (reduce_grammar_tables): Report the useless rules.
5951 (reduce_print): Useless things are a warning, not an error.
5952 Report it as such.
5953 * tests/reduce.at (Useless Nonterminals, Useless Rules):
5954 (Reduced Automaton, Underivable Rules): Adjust.
5955 * tests/regression.at (Web2c Report, Web2c Report): Adjust.
5956 * tests/conflicts.at (Unresolved SR Conflicts)
5957 (Solved SR Conflicts): Adjust.
5958
ee000ba4
AD
59592002-06-15 Akim Demaille <akim@epita.fr>
5960
5961 Let symbols have a location.
5962
5963 * src/symtab.h, src/symtab.c (symbol_t): Location is a new member.
5964 (getsym): Adjust.
5965 Adjust all callers.
5966 * src/complain.h, src/complain.c (complain_at, fatal_at, warn_at):
5967 Use location_t, not int.
5968 * src/symtab.c (symbol_check_defined): Take advantage of the
5969 location.
5970 * tests/regression.at (Invalid inputs): Adjust.
5971
8efe435c
AD
59722002-06-15 Akim Demaille <akim@epita.fr>
5973
5974 * src/parse-gram.y (YYLLOC_DEFAULT, current_lhs_location): New.
5975 (input): Don't try to initialize yylloc here, do it in the
5976 scanner.
5977 * src/scan-gram.l (YY_USER_INIT): Initialize yylloc.
5978 * src/gram.h (rule_t): Change line and action_line into location
5979 and action_location, of location_t type.
5980 Adjust all dependencies.
5981 * src/location.h, src/location.c (empty_location): New.
5982 * src/reader.h, src/reader.c (grammar_start_symbol_set)
5983 (grammar_symbol_append, grammar_rule_begin, grammar_rule_end)
5984 (grammar_current_rule_symbol_append)
5985 (grammar_current_rule_action_append): Expect a location as argument.
5986 * src/reader.c (grammar_midrule_action): Adjust to attach an
5987 action's location as dummy symbol location.
5988 * src/symtab.h, src/symtab.c (startsymbol_location): New.
5989 * tests/regression.at (Web2c Report, Rule Line Numbers): Adjust
5990 the line numbers.
5991
1921f1d7
AD
59922002-06-14 Akim Demaille <akim@epita.fr>
5993
5994 Grammar declarations may be found in the grammar section.
5995
5996 * src/parse-gram.y (rules_or_grammar_declaration): New.
5997 (declarations): Each declaration may end with a semicolon, not
5998 just...
5999 (grammar_declaration): `"%union"'.
6000 (grammar): Branch to rules_or_grammar_declaration.
6001
4515534c
AD
60022002-06-14 Akim Demaille <akim@epita.fr>
6003
6004 * src/main.c (main): Invoke scanner_free.
6005
f958596b
AD
60062002-06-14 Akim Demaille <akim@epita.fr>
6007
6008 * src/output.c (m4_invoke): Extracted from...
6009 (output_skeleton): here.
6010 Free tempfile.
6011
2c569025
AD
60122002-06-14 Akim Demaille <akim@epita.fr>
6013
6014 * src/parse-gram.y (directives, directive, gram)
6015 (grammar_directives, precedence_directives, precedence_directive):
6016 Rename as...
6017 (declarations, declaration, grammar, grammar_declaration)
6018 (precedence_declaration, precedence_declarator): these.
6019 (symbol_declaration): New.
6020
592e8d4d
AD
60212002-06-14 Akim Demaille <akim@epita.fr>
6022
6023 * src/files.c (action_obstack): Remove, unused.
6024 (output_obstack): Remove it, and all its dependencies, as it is no
6025 longer needed.
6026 * src/reader.c (epilogue_set): Build the epilogue in the
6027 muscle_obstack.
6028 * src/output.h, src/output.c (muscle_obstack): Move to...
6029 * src/muscle_tab.h, src/muscle_tab.h: here.
6030 (muscle_init): Initialize muscle_obstack.
6031 (muscle_free): New.
6032 * src/main.c (main): Call it.
6033
0c15323d
AD
60342002-06-14 Akim Demaille <akim@epita.fr>
6035
6036 * src/location.h: New, extracted from...
6037 * src/reader.h: here.
6038 * src/Makefile.am (noinst_HEADERS): Merge into
6039 (bison_SOURCES): this.
6040 Add location.h.
6041 * src/parse-gram.y: Use location_t instead of Bison's.
6042 * src/reader.h, src/reader.c (prologue_augment, epilogue_set):
6043 Use location_t instead of ints.
6044
e96c9728
AD
60452002-06-14 Akim Demaille <akim@epita.fr>
6046
6047 * data/bison.simple, data/bison.c++: Be sure to restore the
6048 current #line when returning to the skeleton contents after having
6049 exposed the input file's #line.
6050
75d1fe16
AD
60512002-06-12 Akim Demaille <akim@epita.fr>
6052
6053 * src/scan-gram.l (SC_BRACED_CODE): Don't use `<.*>', it is too
6054 eager.
6055 * tests/actions.at (Exotic Dollars): New.
6056
6c35d22c
AD
60572002-06-12 Akim Demaille <akim@epita.fr>
6058
6059 * src/scan-gram.l (SC_PROLOGUE): Don't eat characters amongst
6060 ['"/] too eagerly.
6061 * tests/input.at (Torturing the Scanner): New.
6062
1d6412ad
AD
60632002-06-11 Akim Demaille <akim@epita.fr>
6064
6065 * src/scan-gram.l (YY_OBS_INIT): Remove, replace with...
6066 [SC_COMMENT,SC_STRING,SC_CHARACTER,SC_BRACED_CODE,SC_PROLOGUE]
6067 [SC_EPILOGUE]: Output the quadrigraphs only when not in a comment.
6068 * src/reader.h, src/scan-gram.l (scanner_initialize): this.
6069 * src/reader.c (reader): Use it.
6070
4cdb01db
AD
60712002-06-11 Akim Demaille <akim@epita.fr>
6072
6073 * src/scan-gram.l (YY_OBS_FINISH): Don't set yylval.
6074 Adjust all callers.
6075 (scanner_last_string_free): New.
6076
44995b2e
AD
60772002-06-11 Akim Demaille <akim@epita.fr>
6078
6079 * src/scan-gram.l (YY_INIT, YY_GROW, YY_FINISH): Rename as...
6080 (YY_OBS_INIT, YY_OBS_GROW, YY_OBS_FINISH): these.
6081 (last_string, YY_OBS_FREE): New.
6082 Use them when returning an ID.
6083
e9955c83
AD
60842002-06-11 Akim Demaille <akim@epita.fr>
6085
6086 Have Bison grammars parsed by a Bison grammar.
6087
6088 * src/reader.c, src/reader.h (prologue_augment): New.
6089 * src/reader.c (copy_definition): Remove.
6090
6091 * src/reader.h, src/reader.c (gram_start_symbol_set, prologue_augment)
6092 (grammar_symbol_append, grammar_rule_begin, grammar_midrule_action)
6093 (grammar_current_rule_prec_set, grammar_current_rule_check)
6094 (grammar_current_rule_symbol_append)
6095 (grammar_current_rule_action_append): Export.
6096 * src/parse-gram.y (symbol_list_new, symbol_list_symbol_append_
6097 (symbol_list_action_append): Remove.
6098 Hook the routines from reader.
6099 * src/scan-gram.l: In INITIAL, characters and strings are tokens.
6100 * src/system.h (ATTRIBUTE_NORETURN, ATTRIBUTE_UNUSED): Now.
6101
6102 * src/reader.c (read_declarations): Remove, unused.
6103
6104 * src/parse-gram.y: Handle the epilogue.
6105 * src/reader.h, src/reader.c (gram_start_symbol_set): Rename as...
6106 (grammar_start_symbol_set): this.
6107 * src/scan-gram.l: Be sure to ``use'' yycontrol to keep GCC quiet.
6108 * src/reader.c (readgram): Remove, unused.
6109 (reader): Adjust to insert eoftoken and axiom where appropriate.
6110
6111 * src/reader.c (copy_dollar): Replace with...
6112 * src/scan-gram.h (handle_dollar): this.
6113 * src/parse-gram.y: Remove `%thong'.
6114
6115 * src/reader.c (copy_at): Replace with...
6116 * src/scan-gram.h (handle_at): this.
6117
6118 * src/complain.h, src/complain.c (warn_at, complain_at, fatal_at):
6119 New.
6120
6121 * src/scan-gram.l (YY_LINES): Keep lineno synchronized for the
6122 time being.
6123
6124 * src/reader.h, src/reader.c (grammar_rule_end): New.
6125
6126 * src/parse.y (current_type, current_class): New.
6127 Implement `%nterm', `%token' support.
6128 Merge `%term' into `%token'.
6129 (string_as_id): New.
6130 * src/symtab.h, src/symtab.c (symbol_make_alias): Don't pass the
6131 type name.
6132
6133 * src/parse-gram.y: Be sure to handle properly the beginning of
6134 rules.
6135
6136 * src/parse-gram.y: Handle %type.
6137 * src/reader.c (grammar_rule_end): Call grammar_current_rule_check.
6138
6139 * src/parse-gram.y: More directives support.
6140 * src/options.c: No longer handle source directives.
6141
6142 * src/parse-gram.y: Fix %output.
6143
6144 * src/parse-gram.y: Handle %union.
6145 Use the prologue locations.
6146 * src/reader.c (parse_union_decl): Remove.
6147
6148 * src/reader.h, src/reader.c (epilogue_set): New.
6149 * src/parse-gram.y: Use it.
6150
6151 * data/bison.simple, data/bison.c++: b4_stype is now either not
6152 defined, then default to int, or to the contents of %union,
6153 without `union' itself.
6154 Adjust.
6155 * src/muscle_tab.c (muscle_init): Don't predefine `stype'.
6156
6157 * src/output.c (actions_output): Don't output braces, as they are
6158 already handled by the scanner.
6159
6160 * src/scan-gram.l (SC_CHARACTER): Set the user_token_number of
6161 characters to themselves.
6162
6163 * tests/reduce.at (Reduced Automaton): End the grammars with %% so
6164 that the epilogue has a proper #line.
6165
6166 * src/parse-gram.y: Handle precedence/associativity.
6167
6168 * src/symtab.c (symbol_precedence_set): Requires the symbol to be
6169 a terminal.
6170 * src/scan-gram.l (SC_BRACED_CODE): Catch strings and characters.
6171 * tests/calc.at: Do not use `%token "foo"' as it makes not sense
6172 at all to define terminals that cannot be emitted.
6173
6174 * src/scan-gram.l: Escape M4 characters.
6175
6176 * src/scan-gram.l: Working properly with escapes in user
6177 strings/characters.
6178
6179 * tests/torture.at (AT_DATA_TRIANGULAR_GRAMMAR)
6180 (AT_DATA_HORIZONTAL_GRAMMAR): Respect the `%token ID NUM STRING'
6181 grammar.
6182 Use more modest sizes, as for the time being the parser does not
6183 release memory, and therefore the process swallows a huge amount
6184 of memory.
6185
6186 * tests/torture.at (AT_DATA_LOOKAHEADS_GRAMMAR): Adjust to the
6187 stricter %token grammar.
6188
6189 * src/symtab.h (associativity): Add `undef_assoc'.
6190 (symbol_precedence_set): Do nothing when passed an undef_assoc.
6191 * src/symtab.c (symbol_check_alias_consistence): Adjust.
6192
6193 * tests/regression.at (Invalid %directive): Remove, as it is now
6194 meaningless.
6195 (Invalid inputs): Adjust to the new error messages.
6196 (Token definitions): The new grammar doesn't allow too many
6197 eccentricities.
6198
6199 * src/lex.h, src/lex.c: Remove.
6200 * src/reader.c (lastprec, skip_to_char, read_signed_integer)
6201 (copy_character, copy_string2, copy_string, copy_identifier)
6202 (copy_comment, parse_token_decl, parse_type_decl, parse_assoc_decl)
6203 (parse_muscle_decl, parse_dquoted_param, parse_skel_decl)
6204 (parse_action): Remove.
6205 * po/POTFILES.in: Adjust.
6206
2e047461
AD
62072002-06-11 Akim Demaille <akim@epita.fr>
6208
cd05d13c 6209 * src/reader.c (parse_action): Don't store directly into the
2e047461
AD
6210 rule's action member: return the action as a string.
6211 Don't require `rule_length' as an argument: compute it.
6212 (grammar_current_rule_symbol_append)
6213 (grammar_current_rule_action_append): New, eved out from
6214 (readgram): here.
6215 Remove `action_flag', `rulelength', unused now.
6216
9af3fbce
AD
62172002-06-11 Akim Demaille <akim@epita.fr>
6218
6219 * src/reader.c (grammar_current_rule_prec_set).
6220 (grammar_current_rule_check): New, eved out from...
6221 (readgram): here.
6222 Remove `xaction', `first_rhs': useless.
6223 * tests/input.at (Type clashes): New.
6224 * tests/existing.at (GNU Cim Grammar): Adjust.
6225
1485e106
AD
62262002-06-11 Akim Demaille <akim@epita.fr>
6227
6228 * src/reader.c (grammar_midrule_action): New, Eved out from
6229 (readgram): here.
6230
da4160c3
AD
62312002-06-11 Akim Demaille <akim@epita.fr>
6232
6233 * src/reader.c (grammar_rule_begin, previous_rule, current_rule):
6234 New.
6235 (readgram): Use them as replacement of inlined code, crule and
6236 crule1.
6237
f6d0f937
AD
62382002-06-11 Akim Demaille <akim@epita.fr>
6239
6240 * src/reader.c (grammar_end, grammar_symbol_append): New.
6241 (readgram): Use them.
6242 Make the use of `p' as local as possible.
6243
69078d4b
AD
62442002-06-10 Akim Demaille <akim@epita.fr>
6245
6246 GCJ's parser requires the tokens to be defined before the prologue.
6247
6248 * data/bison.simple: Output the token definition before the user's
6249 prologue.
6250 * tests/regression.at (Braces parsing, Duplicate string)
6251 (Mixing %token styles): Check the output from bison.
6252 (Early token definitions): New.
6253
5e424082
AD
62542002-06-10 Akim Demaille <akim@epita.fr>
6255
6256 * src/symtab.c (symbol_user_token_number_set): Don't complain when
6257 assigning twice the same user number to a token, so that we can
6258 use it in...
6259 * src/lex.c (lex): here.
6260 Also use `symbol_class_set' instead of hand written code.
6261 * src/reader.c (parse_assoc_decl): Likewise.
6262
44536b35
AD
62632002-06-10 Akim Demaille <akim@epita.fr>
6264
6265 * src/symtab.c, src/symtab.c (symbol_class_set)
6266 (symbol_user_token_number_set): New.
6267 * src/reader.c (parse_token_decl): Use them.
6268 Use a switch instead of ifs.
6269 Use a single argument.
6270
8b9f2372
AD
62712002-06-10 Akim Demaille <akim@epita.fr>
6272
6273 Remove `%thong' support as it is undocumented, unused, duplicates
6274 `%token's job, and creates useless e-mail traffic with people who
6275 want to know what it is, why it is undocumented, unused, and
6276 duplicates `%token's job.
6277
6278 * src/reader.c (parse_thong_decl): Remove.
6279 * src/options.c (option_table): Remove "thong".
6280 * src/lex.h (tok_thong): Remove.
6281
3ae2b51f
AD
62822002-06-10 Akim Demaille <akim@epita.fr>
6283
6284 * src/symtab.c, src/symtab.c (symbol_type_set)
6285 (symbol_precedence_set): New.
6286 * src/reader.c (parse_type_decl, parse_assoc_decl): Use them.
6287 (value_components_used): Remove, unused.
6288
2f1afb73
AD
62892002-06-09 Akim Demaille <akim@epita.fr>
6290
6291 Move symbols handling code out of the reader.
6292
6293 * src/reader.h, src/reader.c (errtoken, undeftoken, eoftoken)
6294 (axiom): Move to...
6295 * src/symtab.h, src/symtab.c: here.
6296
6297 * src/gram.c (start_symbol): Remove: use startsymbol->number.
6298 * src/reader.c (startval): Rename as...
6299 * src/symtab.h, src/symtab.c (startsymbol): this.
6300 * src/reader.c: Adjust.
6301
6302 * src/reader.c (symbol_check_defined, symbol_make_alias)
6303 (symbol_check_alias_consistence, symbol_pack, symbol_translation)
6304 (token_translations_init)
6305 Move to...
6306 * src/symtab.c: here.
6307 * src/reader.c (packsymbols): Move to...
6308 * src/symtab.h, src/symtab.c (symbols_pack): here.
6309 * src/symtab.h, src/symtab.c (symbol_make_alias): Takes SYMVAL as
6310 argument.
6311
e9bca3ad
AD
63122002-06-03 Akim Demaille <akim@epita.fr>
6313
6314 * src/muscle_tab.c (muscle_insert, muscle_find): Declarations,
6315 then statements.
6316
86eff183
AD
63172002-06-03 Akim Demaille <akim@epita.fr>
6318
6319 * src/muscle_tab.c (muscle_find, muscle_insert): Don't initialize
6320 structs with non literals.
6321 * src/scan-skel.l: never-interactive.
6322 * src/conflicts.c (enum conflict_resolution_e): No trailing
6323 comma.
6324 * src/getargs.c (usage): Split long literal strings.
6325 Reported by Hans Aberg.
6326
717be197
AD
63272002-05-28 Akim Demaille <akim@epita.fr>
6328
6329 * data/bison.c++: Use C++ ostreams.
6330 (cdebug_): New member.
6331
670ddffd
AD
63322002-05-28 Akim Demaille <akim@epita.fr>
6333
6334 * src/output.c (output_skeleton): Be sure to allocate enough room
6335 for `/' _and_ for `\0' in full_skeleton.
6336
769b430f
AD
63372002-05-28 Akim Demaille <akim@epita.fr>
6338
6339 * data/bison.c++: Catch up with bison.simple:
6340 2002-05-24 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
6341 and Paul Eggert <eggert@twinsun.com>: `error' handing.
6342 2002-05-26 Akim Demaille <akim@epita.fr>: stos_, token_number_,
6343 and popping traces.
6344
7067cb36
PH
63452002-05-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
6346
6347 * src/output.c (output_skeleton): Put an explicit path in front of
6348 the skeleton file name, rather than relying on the -I directory,
6349 to partially alleviate effects of having a skeleton file lying around
6350 in the current directory.
769b430f 6351
4a713ec2
PH
63522002-05-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
6353
769b430f 6354 * src/conflicts.c (log_resolution): Correct typo:
4a713ec2
PH
6355 obstack_printf should be obstack_fgrow1.
6356
b408954b
AD
63572002-05-26 Akim Demaille <akim@epita.fr>
6358
6359 * src/state.h (state_t): `solved_conflicts' is a new member.
6360 * src/LR0.c (new_state): Set it to 0.
6361 * src/conflicts.h, src/conflicts.c (print_conflicts)
6362 (free_conflicts, solve_conflicts): Rename as...
6363 (conflicts_print, conflicts_free, conflicts_solve): these.
6364 Adjust callers.
6365 * src/conflicts.c (enum conflict_resolution_e)
6366 (solved_conflicts_obstack): New, used by...
6367 (log_resolution): this.
6368 Adjust to attach the conflict resolution to each state.
6369 Complete the description with the precedence/associativity
6370 information.
6371 (resolve_sr_conflict): Adjust.
6372 * src/print.c (print_state): Output its solved_conflicts.
6373 * tests/conflicts.at (Unresolved SR Conflicts)
6374 (Solved SR Conflicts): Exercise --report=all.
6375
a49aecd5
AD
63762002-05-26 Akim Demaille <akim@epita.fr>
6377
6378 * src/LR0.c, src/derives.c, src/gram.c, src/gram.h, src/lalr.c,
6379 * src/nullable.c, src/output.c, src/print.c, src/print_graph.c,
6380 * src/reader.c, src/reduce.c, src/state.h, src/symtab.h
6381 (token_number_t, item_number_as_token_number)
6382 (token_number_as_item_number, muscle_insert_token_number_table):
6383 Rename as...
6384 (symbol_number_t, item_number_as_symbol_number)
6385 (symbol_number_as_item_number, muscle_insert_symbol_number_table):
6386 these, since it is more appropriate.
6387
5504898e
AD
63882002-05-26 Akim Demaille <akim@epita.fr>
6389
6390 * tests/calc.at (AT_CHECK_CALC): Adjust: there are now additional
6391 `Error:' lines.
6392 * data/bison.simple (yystos) [YYDEBUG]: New.
6393 (yyparse) [YYDEBUG]: Display the symbols which are popped during
6394 error recovery.
6395 * tests/regression.at (Web2c Actions): Adjust: yystos is output now.
6396
ec3bc396
AD
63972002-05-25 Akim Demaille <akim@epita.fr>
6398
6399 * doc/bison.texinfo (Debugging): Split into...
6400 (Tracing): this new section, its former contents, and...
6401 (Understanding): this new section.
6402 * src/getargs.h, src/getargs.c (verbose_flag): Remove, replaced
6403 by...
6404 (report_flag): this.
6405 Adjust all dependencies.
6406 (report_args, report_types, report_argmatch): New.
6407 (usage, getargs): Report/support -r, --report.
6408 * src/options.h
6409 (struct option_table_struct): Rename as..,
6410 (struct option_table_s): this.
6411 Rename the `set_flag' member to `flag' to match with getopt_long's
6412 struct.
6413 * src/options.c (option_table): Split verbose into an entry for
6414 %verbose, and another for --verbose.
6415 Support --report/-r, so remove -r from the obsolete --raw.
6416 * src/print.c: Attach full item sets and lookaheads reports to
6417 report_flag instead of trace_flag.
6418 * lib/argmatch.h, lib/argmatch.c: New, from Fileutils 4.1.
6419
78df8250
PE
64202002-05-24 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
6421 and Paul Eggert <eggert@twinsun.com>
769b430f 6422
78df8250
PE
6423 * data/bison.simple (yyparse): Correct error handling to conform to
6424 POSIX and yacc. Specifically, after syntax error is discovered,
6425 do not reduce further before shifting the error token.
6426 Clean up the code a bit by removing the labels yyerrdefault,
6427 yyerrhandle, yyerrpop.
6428 * NEWS: Document the above.
6429
c0c9ea05
PH
64302002-05-20 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
6431
6432 * data/bison.simple (yyr1): Don't use yy_token_number_type as element
6433 type; it isn't always big enough, since it doesn't necessarily
6434 include non-terminals.
769b430f 6435 (yytranslate): Expand definition of yy_token_number_type, so that
c0c9ea05
PH
6436 the latter can be removed.
6437 (yy_token_number_type): Remove, only one use.
6438 * data/bison.c++ (r1_): Parallel change to yyr1 in bison.simple---
6439 don't use TokenNumberType as element type.
769b430f 6440
c0c9ea05
PH
6441 * tests/regression.at: Modify expected output to agree with change
6442 to yyr1 and yytranslate.
769b430f 6443
6390a83f
FK
64442002-05-13 Florian Krohm <florian@edamail.fishkill.ibm.com>
6445
6446 * src/reader.c (parse_action): Use copy_character instead of
6447 obstack_1grow.
6448
db7c8e9a
AD
64492002-05-13 Akim Demaille <akim@epita.fr>
6450
6451 * tests/regression.at (Token definitions): Prototype yylex and
6452 yyerror.
6453
fcc61800
PH
64542002-05-12 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
6455
158c687b 6456 * src/scan-skel.l: Correct off-by-one error in handling of __oline__.
fcc61800
PH
6457 * data/bison.simple (b4_sint_type, b4_uint_type): Correct to reflect
6458 32-bit arithmetic.
6459 * data/bison.c++ (b4_sint_type, b4_uint_type): Ditto.
6460
5683e9b2
AD
64612002-05-07 Akim Demaille <akim@epita.fr>
6462
6463 * tests/synclines.at: Be sure to prototype yylex and yyerror to
6464 avoid GCC warnings.
6465
0c2d3f4c
AD
64662002-05-07 Akim Demaille <akim@epita.fr>
6467
6468 Kill GCC warnings.
6469
6470 * src/reduce.c (nonterminals_reduce): Don't loop over RITEM: loop
6471 over the RHS of each rule.
6472 * src/gram.h, src/gram.c (nritems): Is `unsigned int', not int.
6473 * src/state.h (state_t): Member `nitems' is unsigned short.
6474 * src/LR0.c (get_state): Adjust.
6475 * src/reader.c (packgram): Likewise.
6476 * src/output.c (GENERATE_MUSCLE_INSERT_TABLE): `max' is of type
6477 `Type'.
6478 (muscle_insert_int_table): Remove, unused.
6479 (prepare_rules): Remove `max'.
6480
1565b720
AD
64812002-05-06 Akim Demaille <akim@epita.fr>
6482
6483 * src/closure.c (print_firsts): Display of the symbol tags.
6484 (bitmatrix_print): Move to...
6485 * lib/bitsetv-print.h, lib/bitsetv-print.c (bitsetv_matrix_dump):
6486 here.
6487 * tests/sets.at (Nullable, Broken Closure, Firsts): Adjust.
6488
cfaee611
AD
64892002-05-06 Akim Demaille <akim@epita.fr>
6490
6491 * src/muscle_tab.c (muscle_m4_output): Must return TRUE for
6492 hash_do_for_each.
6493
458be8e0
AD
64942002-05-06 Akim Demaille <akim@epita.fr>
6495
6496 * src/LR0.c (new_state, get_state): Instead of using the global
6497 `kernel_size' and `kernel_base', have two new arguments:
6498 `core_size' and `core'.
6499 Adjust callers.
6500
a900a624
AD
65012002-05-06 Akim Demaille <akim@epita.fr>
6502
6503 * src/reader.c (packgram): No longer end `ritem' with a 0
6504 sentinel: it is not used.
6505
d4e7d3a1
AD
65062002-05-05 Akim Demaille <akim@epita.fr>
6507
6508 New experimental feature: display the lookaheads in the report and
6509 graph.
6510
6511 * src/print (print_core): When --trace-flag, display the rules
6512 lookaheads.
6513 * src/print_graph.c (print_core): Likewise.
6514 Swap the arguments.
6515 Adjust caller.
6516
39ceb25b
AD
65172002-05-05 Akim Demaille <akim@epita.fr>
6518
6519 * tests/torture.at (Many lookaheads): New test.
6520
5372019f
AD
65212002-05-05 Akim Demaille <akim@epita.fr>
6522
6523 * src/output.c (GENERATE_OUTPUT_TABLE): Replace with...
6524 (GENERATE_MUSCLE_INSERT_TABLE): this.
6525 (output_int_table, output_unsigned_int_table, output_short_table)
6526 (output_token_number_table, output_item_number_table): Replace with...
6527 (muscle_insert_int_table, muscle_insert_unsigned_int_table)
6528 (muscle_insert_short_table, muscle_insert_token_number_table)
6529 (muscle_insert_item_number_table): these.
6530 Adjust all callers.
6531 (prepare_tokens): Don't free `translations', since...
6532 * src/reader.h, src/reader.c (grammar_free): do it.
6533 Move to...
6534 * src/gram.h, src/gram.c (grammar_free): here.
6535 * data/bison.simple, data/bison.c++: b4_token_number_max is now
6536 b4_translate_max.
6537
5df5f6d5
AD
65382002-05-05 Akim Demaille <akim@epita.fr>
6539
6540 * src/output.c (output_unsigned_int_table): New.
6541 (prepare_rules): `i' is unsigned.
6542 `prhs', `rline', `r2' are unsigned int.
6543 Rename muscle `rhs_number_max' as `rhs_max'.
6544 Output muscles `prhs_max', `rline_max', and `r2_max'.
6545 Free rline and r1.
6546 * data/bison.simple, data/bison.c++: Adjust to use these muscles
6547 to compute types instead of constant types.
6548 * tests/regression.at (Web2c Actions): Adjust.
6549
b87f8b21
AD
65502002-05-04 Akim Demaille <akim@epita.fr>
6551
6552 * src/symtab.h (SALIAS, SUNDEF): Rename as...
6553 (USER_NUMBER_ALIAS, USER_NUMBER_UNDEFINED): these.
6554 Adjust dependencies.
6555 * src/output.c (token_definitions_output): Be sure not to output a
6556 `#define 'a'' when fed with `%token 'a' "a"'.
6557 * tests/regression.at (Token definitions): New.
6558
8bb936e4
PE
65592002-05-03 Paul Eggert <eggert@twinsun.com>
6560
6561 * data/bison.simple (b4_token_defines): Also define YYTOKENTYPE
6562 for K&R C.
6563
65642002-05-03 gettextize <bug-gnu-gettext@gnu.org>
6565
6566 * Makefile.am (SUBDIRS): Remove intl.
6567 (EXTRA_DIST): Add config/config.rpath.
6568
53c71a12
AD
65692002-05-03 Akim Demaille <akim@epita.fr>
6570
6571 * data/bison.simple (m4_if): Don't output empty enums.
6572 And actually, output valid enum definitions :(.
6573
289dd0cf
AD
65742002-05-03 Akim Demaille <akim@epita.fr>
6575
6576 * configure.bat: Remove, completely obsolete.
6577 * Makefile.am (EXTRA_DIST): Adjust.
6578 Don't distribute config.rpath...
6579 * config/Makefile.am (EXTRA_DIST): Do it.
6580
db85e524
AD
65812002-05-03 Akim Demaille <akim@epita.fr>
6582
6583 * configure.in (GETTEXT_VERSION): New.
6584 Suggested by Bruno Haible for the forthcoming Gettext 0.10.3.
6585
83ccf991
AD
65862002-05-03 Akim Demaille <akim@epita.fr>
6587
6588 * data/bison.simple (b4_token_enum): New.
6589 (b4_token_defines): Use it to output tokens both as #define and
6590 enums.
6591 Suggested by Paul Eggert.
6592 * src/output.c (token_definitions_output): Don't output spurious
6593 white spaces.
6594
1f418995
AD
65952002-05-03 Akim Demaille <akim@epita.fr>
6596
6597 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
6598
45119f04
RA
65992002-05-02 Robert Anisko <robert@lrde.epita.fr>
6600
6601 * data/bison.c++: Adapt expansion of $s and @s to the C++ parser.
6602 Update the stack class, give a try to deque as the default container.
6603
b2d52318
AD
66042002-05-02 Akim Demaille <akim@epita.fr>
6605
6606 * data/bison.simple (yyparse): Do not implement @$ = @1.
6607 (YYLLOC_DEFAULT): Adjust to do it.
6608 * doc/bison.texinfo (Location Default Action): Fix.
6609
3a8b4109
AD
66102002-05-02 Akim Demaille <akim@epita.fr>
6611
6612 * src/reader.c (parse_braces): Merge into...
6613 (parse_action): this.
6614
84614e13
AD
66152002-05-02 Akim Demaille <akim@epita.fr>
6616
6617 * configure.in (ALL_LINGUAS): Remove.
6618 * po/LINGUAS, hr.po: New.
6619
fdbcd8e2
AD
66202002-05-02 Akim Demaille <akim@epita.fr>
6621
6622 Remove the so called hairy (semantic) parsers.
6623
6624 * src/system.h (EXT_GUARD_C, EXT_STYPE_H): Remove.
6625 * src/gram.h, src/gram.c (semantic_parser): Remove.
6626 (rule_t): Remove the guard and guard_line members.
6627 * src/lex.h (token_t): remove tok_guard.
6628 * src/options.c (option_table): Remove %guard and %semantic_parser
6629 support.
6630 * src/output.c, src/output.h (guards_output): Remove.
6631 (prepare): Adjust.
6632 (token_definitions_output): Don't output the `T'
6633 tokens (???).
6634 (output_skeleton): Don't output the guards.
6635 * src/files.c, src/files.c (attrsfile): Remove.
6636 * src/reader.c (symbol_list): Remove the guard and guard_line
6637 members.
6638 Adjust dependencies.
6639 (parse_guard): Remove.
6640 * data/bison.hairy: Remove.
6641 * doc/bison.texinfo (Environment Variables): Remove occurrences of
6642 BISON_HAIRY.
6643
82b6cb3f
AD
66442002-05-02 Akim Demaille <akim@epita.fr>
6645
6646 * src/reader.c (copy_at, copy_dollarm parse_braces, parse_action)
6647 (parse_guard): Rename the formal argument `stack_offset' as
6648 `rule_length', which is more readable.
6649 Adjust callers.
6650 (copy_at, copy_dollar): Instead of outputting the hard coded
6651 values of $$, $n and so forth, output invocation to b4_lhs_value,
6652 b4_lhs_location, b4_rhs_value, and b4_rhs_location.
900c877b
AD
6653 Note: this patch partially drops `semantic-parser' support: it
6654 always does `rule_length - n', where semantic parsers ought to
6655 always use `-n'.
82b6cb3f
AD
6656 * data/bison.simple, data/bison.c++ (b4_lhs_value)
6657 (b4_lhs_location, b4_rhs_value, and b4_rhs_location: New.
6658
6cbfbcc5
AD
66592002-05-02 Akim Demaille <akim@epita.fr>
6660
6661 * configure.in (AC_INIT): Bump to 1.49b.
6662 (AM_INIT_AUTOMAKE): Short invocation.
6663
b8548114
AD
66642002-05-02 Akim Demaille <akim@epita.fr>
6665
6666 Version 1.49a.
6667
c20cd1fa
AD
66682002-05-01 Akim Demaille <akim@epita.fr>
6669
6670 * src/skeleton.h: Remove.
6671
8a9566d4
AD
66722002-05-01 Akim Demaille <akim@epita.fr>
6673
6674 * src/skeleton.h: Fix the #endif.
6675 Reported by Magnus Fromreide.
6676
8c6d399a
PE
66772002-04-26 Paul Eggert <eggert@twinsun.com>
6678
6679 * data/bison.simple (YYSTYPE_IS_TRIVIAL, YYLTYPE_IS_TRIVIAL):
6680 Define if we define YYSTYPE and YYLTYPE, respectively.
b756bb75 6681 (YYCOPY): Fix [] quoting problem in the non-GCC case.
8a9566d4 6682
2b7ed18a
RA
66832002-04-25 Robert Anisko <robert@lrde.epita.fr>
6684
6685 * src/scan-skel.l: Postprocess quadrigraphs.
6686
6687 * src/reader.c (copy_character): New function, used to output
6688 single characters while replacing `[' and `]' with quadrigraphs, to
6689 avoid troubles with M4 quotes.
6690 (copy_comment): Output characters with copy_character.
6691 (read_additionnal_code): Likewise.
6692 (copy_string2): Likewise.
6693 (copy_definition): Likewise.
6694
6695 * tests/calc.at: Exercise M4 quoting.
6696
34a89c50
AD
66972002-04-25 Akim Demaille <akim@epita.fr>
6698
6699 * tests/sets.at (AT_EXTRACT_SETS): Sed portability issue: no space
6700 between `!' and the command.
6701 Reported by Paul Eggert.
6702
0dd1580a
RA
67032002-04-24 Robert Anisko <robert@lrde.epita.fr>
6704
6705 * tests/calc.at: Exercise prologue splitting.
6706
6707 * data/bison.simple, data/bison.c++: Use `b4_pre_prologue' and
6708 `b4_post_prologue' instead of `b4_prologue'.
6709
6710 * src/output.c (prepare): Add the `pre_prologue' and `post_prologue'
6711 muscles.
6712 (output): Free pre_prologue_obstack and post_prologue_obstack.
6713 * src/files.h, src/files.c (attrs_obstack): Remove.
6714 (pre_prologue_obstack, post_prologue_obstack): New.
6715 * src/reader.c (copy_definition): Add a parameter to specify the
6716 obstack to fill, instead of using attrs_obstack unconditionally.
6717 (read_declarations): Pass pre_prologue_obstack to copy_definition if
6718 `%union' has not yet been seen, pass post_prologue_obstack otherwise.
6719
83c1796f
PE
67202002-04-23 Paul Eggert <eggert@twinsun.com>
6721
6722 * data/bison.simple: Remove unnecessary commentary and white
6723 space differences from 1_29-branch.
6724 Depend on YYERROR_VERBOSE, not defined (YYERROR_VERBOSE).
6725
6726 (union yyalloc, YYSTACK_GAP_MAX, YYSTACK_BYTES, YYCOPY,
6727 YYSTACK_RELOCATE): Do not define if yyoverflow is defined, or
6728 if this is a C++ parser and YYSTYPE or YYLTYPE has nontrivial
6729 constructors or destructors.
6730
6731 (yyparse) [! defined YYSTACK_RELOCATE]: Do not relocate the stack.
6732
1207eeac
AD
67332002-04-23 Akim Demaille <akim@epita.fr>
6734
6735 * tests/sets.at (AT_EXTRACT_SETS): Don't use 8 char long sed labels.
6736 * tests/synclines.at (AT_TEST_SYNCLINE): Be robust to GCC's
6737 location with columns.
6738 * tests/conflicts.at (%nonassoc and eof): Don't use `error.h'.
6739 All reported by Paul Eggert.
6740
78ab8f67
AD
67412002-04-22 Akim Demaille <akim@epita.fr>
6742
6743 * src/reduce.c (dump_grammar): Move to...
6744 * src/gram.h, src/gram.c (grammar_dump): here.
6745 Be sure to separate long item numbers.
6746 Don't read the members of a rule's prec if its nil.
6747
133c20e2
AD
67482002-04-22 Akim Demaille <akim@epita.fr>
6749
6750 * src/output.c (table_size, table_grow): New.
6751 (MAXTABLE): Remove, replace uses with table_size.
6752 (pack_vector): Instead of dying when the table is too big, grow it.
6753
9515e8a7
AD
67542002-04-22 Akim Demaille <akim@epita.fr>
6755
6756 * data/bison.simple (yyr1): Its type is that of a token number.
6757 * data/bison.c++ (r1_): Likewise.
6758 * tests/regression.at (Web2c Actions): Adjust.
6759
23c5a174
AD
67602002-04-22 Akim Demaille <akim@epita.fr>
6761
6762 * src/reader.c (token_translations_init): 256 is now the default
6763 value for the error token, i.e., it will be assigned another
6764 number if the user assigned 256 to one of her tokens.
6765 (reader): Don't force 256 to error.
6766 * doc/bison.texinfo (Symbols): Adjust.
6767 * tests/torture.at (AT_DATA_HORIZONTAL_GRAMMAR)
6768 (AT_DATA_TRIANGULAR_GRAMMAR): Number the tokens as 1, 2, 3
6769 etc. instead of 10, 20, 30 (which was used to `jump' over error
6770 (256) and undefined (2)).
6771
5fbb0954
AD
67722002-04-22 Akim Demaille <akim@epita.fr>
6773
6774 Propagate more token_number_t.
6775
6776 * src/gram.h (token_number_as_item_number)
6777 (item_number_as_token_number): New.
6778 * src/output.c (GENERATE_OUTPUT_TABLE): New.
6779 Use it to create output_item_number_table and
6780 output_token_number_table.
6781 * src/LR0.c, src/derives.c, src/gram.c, src/gram.h, src/lalr.c,
6782 * src/lex.c, src/nullable.c, src/output.c, src/print.c,
6783 * src/print_graph.c, src/reader.c, src/reduce.c, src/state.h,
6784 * src/symtab.c, src/symtab.h: Use token_number_t instead of shorts.
6785
4f940944
AD
67862002-04-22 Akim Demaille <akim@epita.fr>
6787
6788 * src/output.h, src/output.c (get_lines_number): Remove.
6789
3ded9a63
AD
67902002-04-19 Akim Demaille <akim@epita.fr>
6791
6792 * doc/bison.texinfo (Actions): Make clear that `|' is not the same
6793 as Lex/Flex'.
6794 (Debugging): More details about enabling the debugging features.
6795 (Table of Symbols): Describe $$, $n, @$, and @n.
6796 Suggested by Tim Josling.
6797
e0c471a9
AD
67982002-04-19 Akim Demaille <akim@epita.fr>
6799
6800 * doc/bison.texinfo: Remove the uses of the obsolete @refill.
6801
fecc10cd
AD
68022002-04-10 Akim Demaille <akim@epita.fr>
6803
6804 * src/system.h: Rely on HAVE_LIMITS_H.
6805 Suggested by Paul Eggert.
6806
51dec47b
AD
68072002-04-09 Akim Demaille <akim@epita.fr>
6808
6809 * tests/calc.at (_AT_CHECK_CALC_ERROR): Receive as argument the
6810 full stderr, and strip it according to the bison options, instead
6811 of composing the error message from different bits.
6812 This makes it easier to check for several error messages.
6813 Adjust all the invocations.
6814 Add an invocation exercising the error token.
6815 Add an invocation demonstrating a stupid error message.
6816 (_AT_DATA_CALC_Y): Follow the GCS: initial column is 1, not 0.
6817 Adjust the tests.
6818 Error message are for stderr, not stdout.
6819
007a50a4
AD
68202002-04-09 Akim Demaille <akim@epita.fr>
6821
6822 * src/gram.h, src/gram.c (error_token_number): Remove, use
6823 errtoken->number.
6824 * src/reader.c (reader): Don't specify the user token number (2)
6825 for $undefined, as it uselessly prevents using it.
6826 * src/gram.h (token_number_t): Move to...
6827 * src/symtab.h: here.
6828 (state_t.number): Is a token_number_t.
6829 * src/print.c, src/reader.c: Use undeftoken->number instead of
6830 hard coded 2.
6831 (Even though this 2 is not the same as above: the number of the
6832 undeftoken remains being 2, it is its user token number which
6833 might not be 2).
6834 * src/output.c (prepare_tokens): Rename the `maxtok' muscle with
6835 `user_token_number_max'.
6836 Output `undef_token_number'.
6837 * data/bison.simple, data/bison.c++: Use them.
6838 Be sure to map invalid yylex return values to
6839 `undef_token_number'. This saves us from gratuitous SEGV.
6840
6841 * tests/conflicts.at (Solved SR Conflicts)
6842 (Unresolved SR Conflicts): Adjust.
6843 * tests/regression.at (Web2c Actions): Adjust.
6844
06446ccf
AD
68452002-04-08 Akim Demaille <akim@epita.fr>
6846
6847 * data/bison.c++: s/b4_item_number_max/b4_rhs_number_max/.
6848 Adding #line.
6849 Remove the duplicate `typedefs'.
6850 (RhsNumberType): Fix the declaration and various other typos.
6851 Use __ofile__.
6852 * data/bison.simple: Use __ofile__.
6853 * src/scan-skel.l: Handle __ofile__.
6854
62a3e4f0
AD
68552002-04-08 Akim Demaille <akim@epita.fr>
6856
6857 * src/gram.h (item_number_t): New, the type of item numbers in
6858 RITEM. Note that it must be able to code symbol numbers as
6859 positive number, and the negation of rule numbers as negative
6860 numbers.
6861 Adjust all dependencies (pretty many).
6862 * src/reduce.c (rule): Remove this `short *' pointer: use
6863 item_number_t.
6864 * src/system.h (MINSHORT, MAXSHORT): Remove.
6865 Include `limits.h'.
6866 Adjust dependencies to using SHRT_MAX and SHRT_MIN.
6867 (shortcpy): Remove.
6868 (MAXTABLE): Move to...
6869 * src/output.c (MAXTABLE): here.
6870 (prepare_rules): Use output_int_table to output rhs.
6871 * data/bison.simple, data/bison.c++: Adjust.
6872 * tests/torture.at (Big triangle): Move the limit from 254 to
6873 500.
6874 * tests/regression.at (Web2c Actions): Ajust.
6875
6876 Trying with bigger grammars shows various phenomena: at 3000 (28Mb
6877 of grammar file) bison is killed by my system, at 2000 (12Mb) bison
6878 passes, but produces negative #line number, once fixed, GCC is
6879 killed while compiling 14Mb, at 1500 (6.7 Mb of grammar, 8.2Mb of
6880 C), it passes.
6881 * src/state.h (state_h): Code input lines on ints, not shorts.
6882
bb88b0fc
AD
68832002-04-08 Akim Demaille <akim@epita.fr>
6884
6885 * src/reduce.c (reduce_grammar): First reduce the nonterminals,
6886 and then the grammar.
6887
9a636f47
AD
68882002-04-08 Akim Demaille <akim@epita.fr>
6889
6890 * src/system.h: No longer using strndup.
6891
680e8701
AD
68922002-04-07 Akim Demaille <akim@epita.fr>
6893
6894 * src/muscle_tab.h (MUSCLE_INSERT_LONG_INT): New.
6895 * src/output.c (output_table_data): Return the longest number.
6896 (prepare_tokens): Output `token_number_max').
6897 * data/bison.simple, data/bison.c++ (b4_sint_type, b4_uint_type):
6898 New.
6899 Use them to define yy_token_number_type/TokenNumberType.
6900 Use this type for yytranslate.
6901 * tests/torture.at (Big triangle): Push the limit from 124 to
6902 253.
6903 * tests/regression.at (Web2c Actions): Adjust.
6904
817e9f41
AD
69052002-04-07 Akim Demaille <akim@epita.fr>
6906
6907 * tests/torture.at (Big triangle): New.
6908 (GNU AWK Grammar, GNU Cim Grammar): Move to...
6909 * tests/existing.at: here.
6910
5123689b
AD
69112002-04-07 Akim Demaille <akim@epita.fr>
6912
6913 * src/gram.h, src/gram.c (nitems): Remove, it is an alias of
6914 nritems.
6915 Adjust dependencies.
6916
f3849179
AD
69172002-04-07 Akim Demaille <akim@epita.fr>
6918
6919 * src/reader.c: Normalize increments to prefix form.
6920
bd02036a
AD
69212002-04-07 Akim Demaille <akim@epita.fr>
6922
6923 * src/reader.c, symtab.c: Remove debugging code.
6924
db8837cb
AD
69252002-04-07 Akim Demaille <akim@epita.fr>
6926
6927 Rename all the `bucket's as `symbol_t'.
6928
6929 * src/gram.c, src/gram.h, src/lex.c, src/lex.h, src/output.c,
6930 * src/reader.c, src/reader.h, src/reduce.c, src/state.h,
6931 * src/symtab.c, src/symtab.h (bucket): Rename as...
6932 (symbol_t): this.
6933 (symbol_list_new, bucket_check_defined, bucket_make_alias)
6934 (bucket_check_alias_consistence, bucket_pack, bucket_translation)
6935 (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
6936 (buckets_new, buckets_free, buckets_do): Rename as...
6937 (symbol_list_new, symbol_check_defined, symbol_make_alias)
6938 (symbol_check_alias_consistence, symbol_pack, symbol_translation)
6939 (symbol_new, symbol_free, hash_compare_symbol_t, hash_symbol_t)
6940 (symbols_new, symbols_free, symbols_do): these.
6941
72a23c97
AD
69422002-04-07 Akim Demaille <akim@epita.fr>
6943
6944 Use lib/hash for the symbol table.
6945
6946 * src/gram.c (ntokens): Initialize to 1, to reserve a slot for
6947 EOF.
6948 * src/lex.c (lex): Set the `number' member of new terminals.
6949 * src/reader.c (bucket_check_defined, bucket_make_alias)
6950 (bucket_check_alias_consistence, bucket_translation): New.
6951 (reader, grammar_free, readgram, token_translations_init)
6952 (packsymbols): Adjust.
6953 (reader): Number the predefined tokens.
6954 * src/reduce.c (inaccessable_symbols): Just use hard coded numbers
6955 for predefined tokens.
6956 * src/symtab.h (bucket): Remove all the hash table related
6957 members.
6958 * src/symtab.c (symtab): Replace by...
6959 (bucket_table): this.
6960 (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
6961 (buckets_new, buckets_do): New.
6962
280a38c3
AD
69632002-04-07 Akim Demaille <akim@epita.fr>
6964
6965 * src/gram.c (nitems, nrules, nsyms, ntokens, nvars, nritems)
6966 (start_symbol, max_user_token_number, semantic_parser)
6967 (error_token_number): Initialize.
6968 * src/reader.c (grammar, start_flag, startval, typed, lastprec):
6969 Initialize.
6970 (reader): Don't.
6971 (errtoken, eoftoken, undeftoken, axiom): Extern.
6972
03b31c0c
AD
69732002-04-07 Akim Demaille <akim@epita.fr>
6974
6975 * src/gram.h (rule_s): prec and precsym are now pointers
6976 to the bucket giving the priority/associativity.
6977 Member `associativity' removed: useless.
6978 * src/reduce.c, src/conflicts.c: Adjust.
6979
8b3df748
AD
69802002-04-07 Akim Demaille <akim@epita.fr>
6981
6982 * src/lalr.c, src/LR0.c, src/closure.c, src/gram.c, src/reduce.c:
6983 Properly escape the symbols' TAG when outputting them.
6984
e601aa1d
AD
69852002-04-07 Akim Demaille <akim@epita.fr>
6986
6987 * src/lalr.h (LA): Is a bitsetv, not bitset*.
6988
b0299a2e
AD
69892002-04-07 Akim Demaille <akim@epita.fr>
6990
6991 * src/lalr.h, src/lalr.c (LAruleno): Replace with...
6992 (LArule): this, which is an array to rule_t*.
6993 * src/print.c, src/conflicts.c: Adjust.
6994
d7e1f00c
AD
69952002-04-07 Akim Demaille <akim@epita.fr>
6996
6997 * src/gram.h (rule_t): Rename `number' as `user_number'.
6998 `number' is a new member.
6999 Adjust dependencies.
7000 * src/reduce.c (reduce_grammar_tables): Renumber rule_t.number.
7001
cc9305dd
AD
70022002-04-07 Akim Demaille <akim@epita.fr>
7003
7004 As a result of the previous patch, it is no longer needed
7005 to reorder ritem itself.
7006
7007 * src/reduce.c (reduce_grammar_tables): Don't sort RITEM.
7008
b0940840
AD
70092002-04-07 Akim Demaille <akim@epita.fr>
7010
7011 Be sure never to walk through RITEMS, but use only data related to
7012 the rules themselves. RITEMS should be banished.
7013
7014 * src/output.c (output_token_translations): Rename as...
7015 (prepare_tokens): this.
7016 In addition to `translate', prepare the muscles `tname' and
7017 `toknum', which were handled by...
7018 (output_rule_data): this.
7019 Remove, and move the remainder of its outputs into...
7020 (prepare_rules): this new routines, which also merges content from
7021 (output_gram): this.
7022 (prepare_rules): Be sure never to walk through RITEMS.
7023 (output_stos): Rename as...
7024 (prepare_stos): this.
7025 (output): Always invoke prepare_states, after all, just don't use it
7026 in the output if you don't need it.
7027
643a5994
AD
70282002-04-07 Akim Demaille <akim@epita.fr>
7029
7030 * src/LR0.c (new_state): Display `nstates' as the name of the
7031 newly created state.
7032 Adjust to initialize first_state and last_state if needed.
7033 Be sure to distinguish the initial from the final state.
7034 (new_states): Create the itemset of the initial state, and use
7035 new_state.
7036 * src/closure.c (closure): Now that the initial state has its
7037 items properly set, there is no need for a special case when
7038 creating `ruleset'.
7039
7040 As a result, now the rule 0, reducing to $axiom, is visible in the
7041 outputs. Adjust the test suite.
7042
7043 * tests/conflicts.at (Solved SR Conflicts)
7044 (Unresolved SR Conflicts): Adjust.
7045 * tests/regression.at (Web2c Report, Rule Line Numbers): Idem.
7046 * tests/conflicts.at (S/R in initial): New.
7047
b4c4ccc2
AD
70482002-04-07 Akim Demaille <akim@epita.fr>
7049
7050 * src/LR0.c (allocate_itemsets): Don't loop over ritem: loop over
7051 the RHS of the rules.
7052 * src/output.c (output_gram): Likewise.
7053
bba97eb2
AD
70542002-04-07 Akim Demaille <akim@epita.fr>
7055
7056 * src/gram.h (rule_t): `lhs' is now a pointer to the symbol's
7057 bucket.
7058 Adjust all dependencies.
7059 * src/reduce.c (nonterminals_reduce): Don't forget to renumber the
7060 `number' of the buckets too.
7061 * src/gram.h: Include `symtab.h'.
7062 (associativity): Move to...
7063 * src/symtab.h: here.
7064 No longer include `gram.h'.
7065
c3b407f4
AD
70662002-04-07 Akim Demaille <akim@epita.fr>
7067
7068 * src/gram.h, src/gram.c (rules_rhs_length): New.
7069 (ritem_longest_rhs): Use it.
7070 * src/gram.h (rule_t): `number' is a new member.
7071 * src/reader.c (packgram): Set it.
7072 * src/reduce.c (reduce_grammar_tables): Move the useless rules at
7073 the end of `rules', and count them out of `nrules'.
7074 (reduce_output, dump_grammar): Adjust.
7075 * src/print.c (print_grammar): It is no longer needed to check for
7076 the usefulness of a rule, as useless rules are beyond `nrules + 1'.
7077 * tests/reduce.at (Reduced Automaton): New test.
7078
11652ab3
AD
70792002-04-07 Akim Demaille <akim@epita.fr>
7080
7081 * src/reduce.c (inaccessable_symbols): Fix a buglet: because of a
7082 lacking `+ 1' to nrules, Bison reported as useless a token if it
7083 was used solely to set the precedence of the last rule...
7084
26b23c1a
AD
70852002-04-07 Akim Demaille <akim@epita.fr>
7086
7087 * data/bison.c++, data/bison.simple: Don't output the current file
7088 name in #line, to avoid useless diffs between two identical
7089 outputs under different names.
7090
18bcecb0
AD
70912002-04-07 Akim Demaille <akim@epita.fr>
7092
7093 * src/closure.c, src/print.c, src/reader.c, src/reduce.c:
7094 Normalize loops to using `< nrules + 1', not `<= nrules'.
7095
fa770c86
AD
70962002-04-07 Akim Demaille <akim@epita.fr>
7097
7098 * TODO: Update.
7099
d9b739c3
AD
71002002-04-07 Akim Demaille <akim@epita.fr>
7101
7102 * src/output.c, src/reader.c, src/symtab.c, src/symtab.h: Rename
7103 bucket.value as bucket.number.
7104
99013900
AD
71052002-04-07 Akim Demaille <akim@epita.fr>
7106
7107 * src/closure.c, src/derives.c, src/gram.h, src/lalr.c,
7108 * src/nullable.c, src/output.c, src/print.c, src/print_graph.c,
7109 * src/reader.c, src/reduce.c: Let rule_t.rhs point directly to the
7110 RHS, instead of being an index in RITEMS.
7111
e966383b
PE
71122002-04-04 Paul Eggert <eggert@twinsun.com>
7113
7114 * doc/bison.texinfo: Update copyright date.
7115 (Rpcalc Lexer, Symbols, Token Decl): Don't assume ASCII.
7116 (Symbols): Warn about running Bison in one character set,
7117 but compiling and/or running in an incompatible one.
7118 Warn about character code 256, too.
7119
71202002-04-03 Paul Eggert <eggert@twinsun.com>
7121
7122 * src/bison.data (YYSTACK_ALLOC): Depend on whether
7123 YYERROR_VERBOSE is nonzero, not whether it is defined.
7124
7125 Merge changes from bison-1_29-branch.
c307773e 7126
8d6c48b9
PE
71272002-03-20 Paul Eggert <eggert@twinsun.com>
7128
7129 Merge fixes from Debian bison_1.34-1.diff.
7130
7131 * configure.in (AC_PREREQ): 2.53.
7132
e53c6322
AD
71332002-03-20 Akim Demaille <akim@epita.fr>
7134
7135 * src/conflicts.c (log_resolution): Argument `resolution' is const.
7136
9ffbeca7
PE
71372002-03-19 Paul Eggert <eggert@twinsun.com>
7138
21db0b2a
PE
7139 * src/bison.simple (YYCOPY): New macro.
7140 (YYSTACK_RELOCATE): Use it.
7141 Remove Type arg; no longer needed. All callers changed.
7142 (yymemcpy): Remove; no longer needed.
7143
9ffbeca7
PE
7144 * Makefile.am (AUTOMAKE_OPTIONS): 1.6.
7145 * doc/Makefile.am (AUTOMAKE_OPTIONS): Remove.
7146
642cb8f8
AD
71472002-03-19 Akim Demaille <akim@epita.fr>
7148
7149 Test and fix the #line outputs.
7150
7151 * tests/atlocal.at (GCC): New.
7152 * tests/synclines.at (AT_TEST_SYNCLINE): New macro.
7153 (Prologue synch line, ,%union synch line, Postprologue synch line)
7154 (Action synch line, Epilogue synch line): New tests.
7155 * src/reader.c (parse_union_decl): Define the muscle stype_line.
7156 * data/bison.simple, data/bison.c++: Use it.
7157
3c31a486
AD
71582002-03-19 Akim Demaille <akim@epita.fr>
7159
7160 * tests/regression.at (%nonassoc and eof, Unresolved SR Conflicts)
7161 (Solved SR Conflicts, %expect not enough, %expect right)
7162 (%expect too much): Move to...
7163 * tests/conflicts.at: this new file.
7164
0d8bed56
AD
71652002-03-19 Akim Demaille <akim@epita.fr>
7166
7167 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
7168 * data/bison.simple, data/bison.c++: Handle the `#define' part, so
7169 that we can move to enums for instance.
7170 * src/output.c (token_definitions_output): Output a list of
7171 `token-name, token-number' instead of the #define.
7172 (output_skeleton): Name this list `b4_tokens', not `b4_tokendefs'.
7173
9208d17f
AD
71742002-03-14 Akim Demaille <akim@epita.fr>
7175
7176 Use Gettext 0.11.1.
7177
af27eacb
RA
71782002-03-09 Robert Anisko <robert@lrde.epita.fr>
7179
7180 * data/bison.c++: Make the user able to add members to the generated
7181 parser by subclassing.
7182
9101a310
RA
71832002-03-05 Robert Anisko <robert@lrde.epita.fr>
7184
7185 * src/reader.c (read_additionnal_code): `c' should be an integer, not
7186 a character.
7187 Reported by Nicolas Tisserand and Nicolas Burrus.
7188
fff9bf0b
RA
71892002-03-04 Robert Anisko <robert@lrde.epita.fr>
7190
7191 * src/reader.c: Warn about lacking semi-colons, do not complain.
7192
64dba31e
RA
71932002-03-04 Robert Anisko <robert@lrde.epita.fr>
7194
7195 * data/bison.c++: Remove a debug line.
7196
374f5a14
RA
71972002-03-04 Robert Anisko <robert@lrde.epita.fr>
7198
7199 * data/bison.c++: Unmerge value as yylval and value as yyval. Unmerge
7200 location as yylloc and location as yyloc. Use YYLLOC_DEFAULT, and
7201 provide a default implementation.
7202
bfcf1f3a
AD
72032002-03-04 Akim Demaille <akim@epita.fr>
7204
7205 * tests/input.at (Invalid $n, Invalid @n): Add the ending `;'.
7206 * tests/output.at (AT_CHECK_OUTPUT): Likewise.
7207 * tests/headers.at (AT_TEST_CPP_GUARD_H): Ditto.
7208 * tests/semantic.at (Parsing Guards): Similarly.
7209 * src/reader.at (readgram): Complain if the last rule is not ended
7210 with a semi-colon.
7211
65ccf9fc
AD
72122002-03-04 Akim Demaille <akim@epita.fr>
7213
7214 * src/warshall.h, src/warshall.c (bitmatrix_print): Move to...
7215 * src/closure.c: here.
7216 (set_firsts): Use bitsetv_reflexive_transitive_closure instead of
7217 RTC.
7218 * src/warshall.h, src/warshall.c: Remove.
7219 * tests/sets.at (Broken Closure): Adjust.
7220
d0039cbc
AD
72212002-03-04 Akim Demaille <akim@epita.fr>
7222
7223 * src/output.c (output_skeleton): tempdir is const.
7224 bytes_read is unused.
7225
345cea78
AD
72262002-03-04 Akim Demaille <akim@epita.fr>
7227
7228 * lib/bbitset.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
7229 * lib/bitsetv.h, lib/ebitset.c, lib/lbitset.c, lib/sbitset.c:
7230 Update.
7231 From Michael Hayes.
7232
564801f7
AD
72332002-03-04 Akim Demaille <akim@epita.fr>
7234
7235 * src/closure.c (closure): `r' is unused.
7236
e5352bc7
AD
72372002-03-04 Akim Demaille <akim@epita.fr>
7238
7239 * tests/sets.at (Broken Closure): Add the ending `;'.
7240 * src/reader.at (readgram): Complain if a rule is not ended with a
7241 semi-colon.
7242
914feea9
AD
72432002-03-04 Akim Demaille <akim@epita.fr>
7244
7245 * src/conflicts.c (set_conflicts): Use bitset_disjoint_p.
7246 (count_sr_conflicts): Use bitset_count.
7247 * src/reduce.c (inaccessable_symbols): Ditto.
7248 (bits_size): Remove.
7249 * src/warshall.h, src/warshall.c: Convert to bitsetv.
7250
f0250de6
AD
72512002-03-04 Akim Demaille <akim@epita.fr>
7252
7253 * src/closure.c, src/conflicts.c, src/lalr.c, src/print.c,
7254 * src/reduce.c: Remove the `bitset_zero's following the
7255 `bitset_create's, as now it is performed by the latter.
7256
ef017502
AD
72572002-03-04 Akim Demaille <akim@epita.fr>
7258
7259 * lib/bitset.c, lib/bitset.h, lib/bitsetv.c, lib/bitsetv.h,
7260 * lib/ebitset.c, lib/ebitset.h, lib/lbitset.c, lib/lbitset.h,
7261 * lib/sbitset.c, lib/sbitset.h, lib/bbitset.h: Update from the
7262 latest sources from Michael.
7263
76514394
AD
72642002-03-04 Akim Demaille <akim@epita.fr>
7265
7266 * src/output.c (output): Don't free the grammar.
7267 * src/reader.c (grammar_free): New.
7268 * src/main.c (main): Call it and don't free symtab here.
7269
55024580
AD
72702002-03-04 Akim Demaille <akim@epita.fr>
7271
7272 * src/lex.c (parse_percent_token): Be sure to 0-end token_buffer
7273 before returning.
7274 Reported by Benoit Perrot.
7275
f9abaa2c
AD
72762002-03-04 Akim Demaille <akim@epita.fr>
7277
7278 Use bitset operations when possible, not loops over bits.
7279
7280 * src/conflicts.c (set_conflicts, count_sr_conflicts): Use
7281 bitset_or.
7282 * src/print.c (print_reductions): Use bitset_and, bitset_andn.
7283 * src/reduce.c (useless_nonterminals): Formatting changes.
7284 * src/warshall.c (TC): Use bitset_or.
7285
0e721e75
AD
72862002-03-04 Akim Demaille <akim@epita.fr>
7287
7288 * src/lalr.h, src/lalr.c (tokensetsize): Remove, unused.
7289 * src/system.h (BITS_PER_WORD, WORDSIZE, SETBIT, RESETBIT, BITISSET):
7290 Ditto.
7291
0fb1ffb1
AD
72922002-03-04 Akim Demaille <akim@epita.fr>
7293
7294 * src/lalr.c (F): Now a bitset*.
7295 Adjust all dependencies.
7296
b86796bf
AD
72972002-03-04 Akim Demaille <akim@epita.fr>
7298
7299 * src/conflicts.c (shiftset, lookaheadset): Now bitset.
7300 Adjust all dependencies.
7301
602bbf31
AD
73022002-03-04 Akim Demaille <akim@epita.fr>
7303
7304 * src/L0.c, src/LR0.h (nstates): Be size_t.
7305 Adjust comparisons (signed vs unsigned).
7306 * src/conflics.c, src/lalr.c, src/lalr.h, src/output.c (LA): Now a
7307 bitset*.
7308 Adjust all dependencies.
7309
d8a0245c
AD
73102002-03-04 Akim Demaille <akim@epita.fr>
7311
7312 * src/closure.c (firsts): Now, also a bitset.
7313 Adjust all dependencies.
7314 (varsetsize): Remove, now unused.
7315 * src/warshall.h, src/warshall.c: Now work on arrays of bitsets.
7316
34ba9743
AD
73172002-03-04 Akim Demaille <akim@epita.fr>
7318
7319 * src/print.c: Convert to use bitset.h, not hand coded iterations
7320 over ints.
7321
ed86e78c
AD
73222002-03-04 Akim Demaille <akim@epita.fr>
7323
7324 * src/reduce.c: Convert to use bitset.h, not hand coded BSet.
7325
dfdb1797
AD
73262002-03-04 Akim Demaille <akim@epita.fr>
7327
7328 * src/closure.c (ruleset): Be a bitset.
7329 (rulesetsize): Remove.
7330
7086e707
AD
73312002-03-04 Akim Demaille <akim@epita.fr>
7332
7333 * lib/bitset-int.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
7334 * lib/bitsetv.h, lib/ebitset.c, lib/ebitset.h, lib/lbitset.c,
7335 * lib/lbitset.h, lib/sbitset.c, lib/sbitset.h: New.
7336 * src/closure.c (fderives): Be an array of bitsets.
7337
98254360
RA
73382002-02-28 Robert Anisko <robert@lrde.epita.fr>
7339
7340 * data/bison.c++: Merge the two generated headers. Insert a copyright
7341 notice in each output file.
7342
a75c057f
AD
73432002-02-28 Akim Demaille <akim@epita.fr>
7344
7345 * data/bison.c++: Copy the prologue of bison.simple to fetch
7346 useful M4 definitions, such as b4_header_guard.
7347
06b00abc
AD
73482002-02-25 Akim Demaille <akim@epita.fr>
7349
7350 * src/getargs.c (version): Give the name of the authors, and use a
a75c057f
AD
7351 translator friendly scheme for the bgr
7352 copyright notice.
06b00abc 7353
70e7d534
AD
73542002-02-25 Akim Demaille <akim@epita.fr>
7355
7356 * src/output.c (header_output): Remove, now handled completely via
7357 M4.
7358
abe017f6
AD
73592002-02-25 Akim Demaille <akim@epita.fr>
7360
7361 * m4/m4.m4: New, from CVS Autoconf.
7362 * configure.in: Invoke it.
7363 * src/output.c (output_skeleton): Use its result instead of the
7364 hard coded name.
7365
381fb12e
AD
73662002-02-25 Akim Demaille <akim@epita.fr>
7367
7368 * lib/tempname.c, lib/mkstemp.c, m4/mkstemp.m4: New, stolen from
7369 Fileutils 4.1.5.
7370 * configure.in: Invoke UTILS_FUNC_MKSTEMP.
7371 * src/output.c (output_skeleton): Use mkstemp to create a real
7372 temporary file.
7373 Move the filling of `skeleton' and its muscle to...
7374 (prepare): here.
7375 (output): Move the definition of the prologue muscle to...
7376 (prepare): here.
7377 * src/system.h (DEFAULT_TMPDIR): New.
7378
6f38107f
PE
73792002-02-14 Paul Eggert <eggert@twinsun.com>
7380
7381 Remove the support for C++ namespace cleanliness; it was
7382 causing more problems than it was curing, since it didn't work
7383 properly on some nonstandard C++ compilers. This can wait
7384 for a proper C++ parser.
7385
7386 * NEWS: Document this.
7387 * doc/bison.texinfo (Bison Parser, Debugging): Remove special mention
7388 of C++, as it's treated like C now.
7389 * src/bison.simple (YYSTD): Remove.
7390 (YYSIZE_T, YYFPRINTF, YYPARSE_PARAM_ARG, YYPARSE_PARAM_DECL):
7391 Treat C++ just like Standard C instead of trying to support
7392 namespace cleanliness.
7393
80cce3da
AD
73942002-02-14 Akim Demaille <akim@epita.fr>
7395
7396 * tests/regression.at (else): Adjust to Andreas' change.
7397
842e8679
AD
73982002-02-14 Akim Demaille <akim@epita.fr>
7399
7400 * lib/Makefile.am (EXTRA_DIST): Ship strnlen.c.
7401
4bda3f10
AD
74022002-02-13 Andreas Schwab <schwab@suse.de>
7403
7404 * src/output.c (output_rule_data): Don't output NULL, it might
7405 not be defined yet.
7406
4162fa07 74072002-02-11 Robert Anisko <robert@lrde.epita.fr>
b418ecd8 7408
4162fa07
RA
7409 * data/bison.c++ (YYDEBUG, YYERROR_VERBOSE): After the prologue.
7410 (Copyright notice): Update.
b418ecd8 7411
bd16a5dc
AD
74122002-02-11 Akim Demaille <akim@epita.fr>
7413
7414 * tests/regression.at (%nonassoc and eof): Don't include
7415 nonportable headers.
7416
8d69a1a3
RA
74172002-02-08 Robert Anisko <robert@lrde.epita.fr>
7418
7419 * data/bison.c++: Correct error recovery. Make the user able to
7420 initialize the starting location.
7421
9b2d0677
AD
74222002-02-07 Akim Demaille <akim@epita.fr>
7423
7424 * tests/input.at: New.
7425
69e2658b
RA
74262002-02-07 Robert Anisko <robert@lrde.epita.fr>
7427
7428 * data/bison.c++: Replace some direct m4 expansions by constants. Be
9b2d0677 7429 more consistent when naming methods and variables. Put preprocessor
69e2658b
RA
7430 directives around tables only needed for debugging.
7431
4aacc3a7
RA
74322002-02-07 Robert Anisko <robert@lrde.epita.fr>
7433
7434 * data/bison.c++ (yy::b4_name::print_): New method, replaces yyprint in
7435 C++ parsers.
7436 (yy::b4_name::parse): Use print_.
7437
762a801e
RA
74382002-02-07 Robert Anisko <robert@lrde.epita.fr>
7439
7440 * data/bison.c++ (yy::b4_name::parse): Error recovery is back.
7441
4bb2bc3f
RA
74422002-02-07 Robert Anisko <robert@lrde.epita.fr>
7443
7444 * data/bison.c++ (yy::b4_name::error_): New method, replaces yyerror in
7445 C++ parsers.
7446 (yy::b4_name::parse): Build verbose error messages, and use error_.
7447
6b45a3ca
RA
74482002-02-06 Robert Anisko <robert@lrde.epita.fr>
7449
7450 * data/bison.c++: Fix m4 quoting in comments.
7451
50997c6e
RA
74522002-02-06 Robert Anisko <robert@lrde.epita.fr>
7453
7454 * data/bison.c++: Adjust the parser code. Fix some muscles that were
7455 not expanded by m4.
7456
3f3eed27
AD
74572002-02-05 Akim Demaille <akim@epita.fr>
7458
7459 * data/bison.c++: Adjust to the M4 back end.
7460 More is certainly needed.
7461
be2a1a68
AD
74622002-02-05 Akim Demaille <akim@epita.fr>
7463
7464 Give a try to M4 as a back end.
7465
7466 * lib/readpipe.c: New, from wdiff.
7467 * src/Makefile.am (DEFS): Define PKGDATADIR, not BISON_SIMPLE and
7468 BISON_HAIRY.
7469 * src/system.h (BISON_HAIRY, BISON_SIMPLE): Remove the DOS and VMS
7470 specific values. Now it is m4 that performs the lookup.
7471 * src/parse-skel.y: Remove.
7472 * src/muscle_tab.c, src/muscle_tab.h (muscles_m4_output): New.
7473 * src/output.c (actions_output, guards_output)
7474 (token_definitions_output): No longer keeps track of the output
7475 line number, hence remove the second argument.
7476 (guards_output): Check against the guard member of a rule, not the
7477 action member.
7478 Adjust callers.
7479 (output_skeleton): Don't look for the skeleton location, let m4 do
7480 that.
7481 Create `/tmp/muscles.m4'. This is temporary, a proper temporary
7482 file will be used.
7483 Invoke `m4' on m4sugar.m4, muscles.m4, and the skeleton.
7484 (prepare): Given that for the time being changesyntax is not
7485 usable in M4, rename the muscles using `-' to `_'.
7486 Define `defines_flag', `output_parser_name' and `output_header_name'.
7487 * src/output.h (actions_output, guards_output)
7488 (token_definitions_output): Adjust prototypes.
7489 * src/scan-skel.l: Instead of scanning the skeletons, it now
7490 processes the output of m4: `__oline__' and `#output'.
7491 * data/bison.simple: Adjust to be used by M4(sugar).
7492 * tests/Makefile.am: Use check_SCRIPTS to make sure `bison' is up
7493 to date.
7494 * tests/bison.in: Use the secrete envvar `BISON_PKGDATADIR'
7495 instead of the dead `BISON_SIMPLE' and `BISON_HAIRY'.
7496 * data/m4sugar/m4sugar.m4, data/m4sugar/version.m4: New,
7497 shamelessly stolen from CVS Autoconf.
7498
beda758b
AD
74992002-02-05 Akim Demaille <akim@epita.fr>
7500
7501 * lib/hash.c, lib/hash.h: Replace with Fileutils 4.1's version.
7502 * configure.in: Check for the declarations of free and malloc.
7503 * src/muscle_tab.c: Adjust.
7504
5ece6d43
AD
75052002-02-05 Akim Demaille <akim@epita.fr>
7506
7507 * src/muscle_tab.c (muscle_init): Don't default to NULL muscle
7508 which have no values.
7509
5bb18f9a
AD
75102002-02-05 Akim Demaille <akim@epita.fr>
7511
7512 * src/bison.simple, src/bison.hairy, src/bison.c++: Move to...
7513 * data/: here.
7514
894dd62e
PE
75152002-01-29 Paul Eggert <eggert@twinsun.com>
7516
7517 * src/bison.simple (YYSIZE_T): Do not define merely because
7518 YYSTACK_USE_ALLOCA is nonzero or alloca or _ALLOCA_H are defined.
7519 On some platforms, <alloca.h> does not declare YYSTD (size_t).
7520
82841af7
AD
75212002-01-27 Akim Demaille <akim@epita.fr>
7522
7523 Fix `%nonassoc and eof'.
7524
7525 * src/state.c (errs_dup): Aaaah! The failure was due to bytes
7526 which were not properly copied! Replace
7527 memcpy (res->errs, src->errs, src->nerrs);
7528 with
7529 memcpy (res->errs, src->errs, src->nerrs * sizeof (src->errs[0]));
7530 !!!
7531 * tests/regression.at (%nonassoc and eof): Adjust to newest
7532 Autotest: `.' is not in the PATH.
7533
318b76e9
AD
75342002-01-27 Akim Demaille <akim@epita.fr>
7535
7536 * tests/sets.at (AT_EXTRACT_SETS): New.
7537 (Nullable): Use it.
7538 (Firsts): New.
7539
30d2f3d5
AD
75402002-01-26 Akim Demaille <akim@epita.fr>
7541
7542 * tests/actions.at, tests/calc.at, tests/headers.at,
7543 * tests/torture.at: Adjust to the newest Autotest which no longer
7544 forces `.' in the PATH.
7545
30f8c395
AD
75462002-01-25 Akim Demaille <akim@epita.fr>
7547
7548 * tests/regression.at (%nonassoc and eof): New.
7549 Suggested by Robert Anisko.
7550
29ae55f1
AD
75512002-01-24 Akim Demaille <akim@epita.fr>
7552
7553 Bison dumps core when trying to complain about broken input files.
7554 Reported by Cris van Pelt.
7555
7556 * src/lex.c (parse_percent_token): Be sure to set token_buffer.
7557 * tests/regression.at (Invalid input: 1, Invalid input: 2): Merge
7558 into...
7559 (Invalid inputs): Strengthen: exercise parse_percent_token.
7560
2b548aa6
RA
75612002-01-24 Robert Anisko <robert.anisko@epita.fr>
7562
7563 * src/Makefile.am: Add bison.c++.
7564 * src/bison.c++: New skeleton.
7565
bb0146c2
AD
75662002-01-21 Paolo Bonzini <bonzini@gnu.org>
7567
7568 * po/it.po: New.
7569
bec30531
AD
75702002-01-21 Kees Zeelenberg <kzlg@users.sourceforge.net>
7571
7572 * src/files.c (skeleton_find) [MSDOS]: Fix cp definition.
7573
fc6edc45
MA
75742002-01-20 Marc Autret <marc@gnu.org>
7575
7576 * src/files.c (compute_output_file_names): Fix
7577
5e5d5415
MA
75782002-01-20 Marc Autret <marc@gnu.org>
7579
7580 * tests/output.at: New test.
7581 * src/files.c (compute_base_names): Don't map extensions when
7582 the YACC flag is set, use defaults.
7583 Reported by Evgeny Stambulchik.
7584
44ea3fbd
MA
75852002-01-20 Marc Autret <marc@gnu.org>
7586
bb0146c2 7587 * src/system.h: Need to define __attribute__ away for non-GCC
44ea3fbd
MA
7588 compilers as well (i.e. the vendor C compiler).
7589 Suggested by Albert Chin-A-Young.
7590
338963d1
TVH
75912002-01-11 Tim Van Holder <tim.van.holder@pandora.be>
7592
7593 * lib/hash.h, lib/hash.c: Renamed __P to PARAMS and used the
7594 canonical definition.
7595 * src/system.h: Use the canonical definition for PARAMS (avoids
7596 a conflict with the macro from lib/hash.h).
7597
c57b2479
AD
75982002-01-11 Akim Demaille <akim@epita.fr>
7599
7600 * configure.in: Use AC_FUNC_STRNLEN.
d9e9746c 7601 Fixes the failures observed on AIX 4.3 by H.Merijn Brand.
c57b2479 7602
b85810ae
AD
76032002-01-09 Akim Demaille <akim@epita.fr>
7604
7605 * src/files.c, src/files.h (output_infix): New.
7606 (tab_extension): Remove.
7607 (compute_base_names): Compute the former, drop the latter.
7608 * src/output.c (prepare): Insert the muscles `output-infix', and
7609 `output-suffix'.
7610 * src/parse-skel.y (string, string.1): New.
7611 (section.header): Use it.
7612 (section.yacc): Remove.
7613 (prefix): Remove too.
7614 * src/scan-skel.l: Adjust.
7615 * src/bison.simple, src/bison.hairy: Adjust.
7616
cae60122
AD
76172002-01-09 Akim Demaille <akim@epita.fr>
7618
7619 * configure.in (WERROR_CFLAGS): Compute it.
7620 * src/Makefile.am (CFLAGS): Pass it.
7621 * tests/atlocal.in (CFLAGS): Idem.
7622 * src/files.c: Fix a few warnings.
7623 (get_extension_index): Remove, unused.
7624
ae404801
AD
76252002-01-08 Akim Demaille <akim@epita.fr>
7626
7627 * src/getargs.c (AS_FILE_NAME): New.
7628 (getargs): Use it to convert DOSish file names.
7629 * src/files.c (base_name): Rename as full_base_name to avoid
7630 clashes with `base_name ()'.
7631 (filename_split): New.
7632 (compute_base_names): N-th rewrite, using filename_split.
7633
22312b71
AD
76342002-01-08 Akim Demaille <akim@epita.fr>
7635
7636 * lib/basename.c, lib/dirname.h, lib/dirname.c, lib/memrchr.c:
7637 New, stolen from the Fileutils 4.1.
7638 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
7639 * configure.in: Check for the presence of memrchr, and of its
7640 prototype.
7641
a67cef01
TVH
76422002-01-07 Tim Van Holder <tim.van.holder@pandora.be>
7643
7644 * lib/hash.h (__P): Added definition for this macro.
7645 * src/Makefile.am: Add parse-skel.c and scan-skel.c to
7646 BUILT_SOURCES, to ensure they are generated first.
7647 * src/parse-skel.y: Use YYERROR_VERBOSE instead of
7648 %error-verbose to allow bootstrapping with bison 1.30x.
7649
2b25d624
AD
76502002-01-06 Akim Demaille <akim@epita.fr>
7651
7652 * src/reader.c (parse_braces): Don't fetch the next char, the
7653 convention is to fetch on entry.
7654 * tests/torture.at (GNU Cim Grammar): Reintroduce their weird
7655 'switch' without a following semicolon.
7656 * tests/regression.at (braces parsing): New.
7657
3460813b
AD
76582002-01-06 Akim Demaille <akim@epita.fr>
7659
7660 Bison is dead wrong in its RR conflict reports.
7661
7662 * tests/torture.at (GNU Cim Grammar): New.
7663 * src/conflicts.c (count_rr_conflicts): Fix.
7664
73784c64
AD
76652002-01-06 Akim Demaille <akim@epita.fr>
7666
7667 Creating package.m4 from configure.ac causes too many problems.
7668
7669 * tests/Makefile.am (package.m4): Create it by hand,
7670 AC_CONFIG_TESTDIR no longer does in the most recent CVS Autoconf.
7671
25d81090
AD
76722002-01-06 Akim Demaille <akim@epita.fr>
7673
7674 * src/Makefile.am (bison_SOURCES): Add parse-skel.h and
7675 skeleton.h.
7676
a9b8959e
PE
76772002-01-04 Paul Eggert <eggert@twinsun.com>
7678
7679 * doc/bison.texinfo (Debugging):
7680 Remove YYSTDERR; it's no longer defined or used.
7681 Also, s/cstdio.h/cstdio/.
7682
25d81090
AD
76832002-01-03 Akim Demaille <akim@epita.fr>
7684
7685 * tests/bison.in, tests/atlocal.in: Adjust to CVS Autoconf.
7686
1109455c
AD
76872002-01-03 Akim Demaille <akim@epita.fr>
7688
7689 * src/parse-skel.y (process_skeleton): Don't bind the parser's
7690 tracing code to --trace, wait for a better --trace option, with
7691 args.
7692
7ea5e977
AD
76932002-01-03 Akim Demaille <akim@epita.fr>
7694
7695 * src/bison.simple (YYSTDERR): Remove, replace `stderr'.
7696 The ISO C++ standard is extremely clear about it: stderr is
7697 considered a macro, not a regular symbol (see table 94 `Header
7698 <cstdio> synopsis', [lib.c.files] 27.8.2 C Library files).
7699 Therefore std:: does not apply to it. It still does with fprintf.
7700 Also, s/cstdio.h/cstdio/.
7701
fab5b110
AD
77022002-01-03 Akim Demaille <akim@epita.fr>
7703
7704 * lib/quotearg.c: Use `#include "..."' instead of `#include <...>'
7705 for non system headers.
7706
aed7fd9b
AD
77072002-01-02 Akim Demaille <akim@epita.fr>
7708
7709 Equip the skeleton chain with location tracking, runtime trace,
7710 pure parser and scanner.
7711
7712 * src/parse-skel.y: Request a pure parser, locations, and prefix
7713 renaming.
7714 (%union): Having several members with the same type does not help
7715 type mismatches, simplify.
7716 (YYPRINT, yyprint): New.
7717 (yyerror): ``Rename'' (there is a #define yyerror skel_error) as...
7718 (skel_error): this.
7719 Handle locations.
7720 * src/scan-skel.l: Adjust to these changes.
7721 * src/skeleton.h (LOCATION_RESET, LOCATION_LINES, LOCATION_STEP)
7722 (LOCATION_PRINT, skel_control_t): New.
7723
24fad99e
AD
77242001-12-30 Akim Demaille <akim@epita.fr>
7725
7726 * src/parse-skel.y: Get rid of the shift/reduce conflict:
7727 replace `gb' with BLANKS.
7728 * src/scan-skel.l: Adjust.
7729
a4b36db4
AD
77302001-12-30 Akim Demaille <akim@epita.fr>
7731
7732 * src/system.h: We don't need nor want bcopy.
7733 Throw away MS-DOS crap: we don't need getpid.
7734 * configure.in: We don't need strndup. It was even causing
7735 problems: because Flex includes the headers *before* us,
7736 _GNU_SOURCE is not defined by config.h, and therefore strndup was
7737 not visible.
7738 * lib/xstrndup.c: New.
7739 * src/scan-skel.l: Use it.
7740 Be sure to initialize yylval.muscle member when scanning a MUSCLE.
7741 * src/parse-skel.y: Use %directives instead of #defines.
7742
1239777d
AD
77432001-12-30 Akim Demaille <akim@epita.fr>
7744
7745 * src/skeleton.h: New.
7746 * src/output.c (output_parser, output_master_parser): Remove, dead
7747 code.
7748 * src/output.h (get_lines_number, actions_output, guards_output)
7749 (token_definitions_output): Prototype them.
7750 * src/parse-skel.y: Add the license notice.
7751 Include output.h and skeleton.h.
7752 (process_skeleton): Returns void, and takes a single parameter.
7753 * src/scan-skel.l: Add the license notice.
7754 Include skeleton.h.
7755 Don't use %option yylineno: it seems that then Flex imagines
7756 REJECT has been used, and therefore it won't reallocate its
7757 buffers (which makes no other sense to me than a bug). It results
7758 in warnings for `unused: yy_flex_realloc'.
7759
9b3add5b
RA
77602001-12-30 Robert Anisko <robert.anisko@epita.fr>
7761
7762 * src/muscle_tab.h (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
7763 (MUSCLE_INSERT_PREFIX): ...to there.
7764 * src/output.c (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
7765 (MUSCLE_INSERT_PREFIX): Move from here...
7766
7767 * src/bison.hairy: Add a section directive. Put braces around muscle
7768 names. This parser skeleton is still broken, but Bison should not
7769 choke on a bad muscle 'syntax'.
7770 * src/bison.simple: Add a section directive. Put braces around muscle
7771 names.
7772
7773 * src/files.h (strsuffix, stringappend): Add declarations.
7774 (tab_extension): Add declaration.
7775 (short_base_name): Add declaration.
7776
7777 * src/files.c (strsuffix, stringappend): No longer static. These
7778 functions are used in the skeleton parser.
7779 (tab_extension): New.
7780 (compute_base_names): Use the computations done in this function
fab5b110 7781 to guess if the generated parsers should have '.tab' in their
9b3add5b
RA
7782 names.
7783 (short_base_name): No longer static.
7784
7785 * src/output.c (output_skeleton): New.
7786 (output): Disable call to output_master_parser, and give a try to
7787 a new skeleton handling system.
7788 (guards_output, actions_output): No longer static.
7789 (token_definitions_output, get_lines_number): No longer static.
7790
7791 * configure.in: Use AM_PROG_LEX and AC_PROG_YACC.
7792
fab5b110 7793 * src/Makefile.am (bison_SOURCES): Add scan-skel.l and
9b3add5b
RA
7794 parse-skel.y.
7795
7796 * src/parse-skel.y: New file.
7797 * src/scan-skel.l: New file.
7798
b5b61c61
AD
77992001-12-29 Akim Demaille <akim@epita.fr>
7800
7801 %name-prefix is broken.
7802
7803 * src/files.c (spec_name_prefix): Initialize to NULL, not to "yy".
7804 Adjust all dependencies.
7805 * tests/headers.at (export YYLTYPE): Strengthen this test: use
7806 %name-prefix.
7807
7808 Renaming yylval but not yylloc is not consistent. Now we do.
7809
7810 * src/bison.simple: Prefix yylloc if used.
7811 * doc/bison.texinfo (Decl Summary): Document that.
7812
8c9a50be
AD
78132001-12-29 Akim Demaille <akim@epita.fr>
7814
7815 * doc/bison.texinfo: Promote `%long-directive' over
7816 `%long_directive'.
7817 Remove all references to fixed-output-files, yacc is enough.
7818
d99361e6
AD
78192001-12-29 Akim Demaille <akim@epita.fr>
7820
7821 * src/bison.simple: Define YYDEBUG and YYERROR_VERBOSE *after* the
7822 user prologue. These are defaults.
7823 * tests/actions.at (Mid-rule actions): Make sure the user can
7824 define YYDEBUG and YYERROR_VERBOSE.
7825
b9cecb91
AD
78262001-12-29 Akim Demaille <akim@epita.fr>
7827
7828 * src/output.c (header_output): Don't forget to export YYLTYPE and
7829 yylloc.
7830 * tests/headers.at (export YYLTYPE): New, make sure it does.
7831 * tests/regression.at (%union and --defines, Invalid CPP headers):
7832 Move to...
7833 * tests/headers.at: here.
7834
aea13e97
AD
78352001-12-29 Akim Demaille <akim@epita.fr>
7836
7837 * src/gram.h (rule_s): Member `assoc' is of type `associativity'.
7838
931394cb
AD
78392001-12-29 Akim Demaille <akim@epita.fr>
7840
7841 * tests/actions.at (Mid-rule actions): Output on a single line
7842 instead of several.
7843
704a47c4
AD
78442001-12-29 Akim Demaille <akim@epita.fr>
7845
7846 * doc/bison.texinfo: Formatting changes.
7847
091e20bb
AD
78482001-12-29 Akim Demaille <akim@epita.fr>
7849
7850 Don't store the token defs in a muscle, just be ready to output it
7851 on command. Now possible via `symbols'. Fixes a memory leak.
7852
7853 * src/output.c (token_definitions_output): New.
7854 (output_parser, header_output): Use it.
7855 * src/reader.c (symbols_save): Remove.
7856
cce71710
AD
78572001-12-29 Akim Demaille <akim@epita.fr>
7858
7859 * src/bison.simple: Do not provide a default for YYSTYPE and
7860 YYLTYPE before the user's prologue. Otherwise it's hardly... a
7861 default.
7862
82c035a8
AD
78632001-12-29 Akim Demaille <akim@epita.fr>
7864
7865 Mid-rule actions are simply... ignored!
7866
7867 * src/reader.c (readgram): Be sure to attach mid-rule actions to
7868 the empty-rule associated to the dummy symbol, not to the host
7869 rule.
7870 * tests/actions.at (Mid-rule actions): New.
7871
8419d367
AD
78722001-12-29 Akim Demaille <akim@epita.fr>
7873
7874 Memory leak.
7875
7876 * src/reader.c (reader): Free grammar.
7877
375d5806
AD
78782001-12-29 Akim Demaille <akim@epita.fr>
7879
7880 Memory leak.
7881
7882 * src/LR0.c (new_itemsets): Don't allocate `shift_symbol' here,
7883 since it allocates it for each state, although only one is needed.
7884 (allocate_storage): Do it here.
7885
f51cb8ff
AD
78862001-12-29 Akim Demaille <akim@epita.fr>
7887
7888 * src/options.h, src/options.c (create_long_option_table): Rename
7889 as...
7890 (long_option_table_new): this, with a clearer prototype.
7891 (percent_table): Remove, unused,
7892 * src/getargs.c (getargs): Adjust.
7893
29e88316
AD
78942001-12-29 Akim Demaille <akim@epita.fr>
7895
7896 * src/LR0.c, src/conflicts.c, src/lalr.c, src/lalr.h, src/output.c
7897 * src/print.c, src/print_graph.c, src/state.h: Rename state_table
7898 as states.
7899
b9f71f19
AD
79002001-12-29 Akim Demaille <akim@epita.fr>
7901
7902 * src/lalr.c (build_relations): Rename `states' as `states1'.
7903 Sorry, I don't understand exactly what it is, no better name...
7904
1a2b5d37
AD
79052001-12-29 Akim Demaille <akim@epita.fr>
7906
7907 * src/closure.c, src/conflicts.c, src/derives.c, src/gram.c
7908 * src/gram.h, src/lalr.c, src/nullable.c, src/output.c, src/print.c
7909 * src/print_graph.c, src/reader.c, src/reduce.c: Rename rule_table
7910 as rules.
7911
1cca533e
AD
79122001-12-29 Akim Demaille <akim@epita.fr>
7913
7914 * src/gram.c (rprec, rprecsym, rassoc): Remove, unused since long
7915 ago.
7916
c03ae966
AD
79172001-12-29 Akim Demaille <akim@epita.fr>
7918
7919 * src/reader.c, src/reader.h (user_toknums): Remove.
7920 Adjust all users to use symbols[i]->user_token_number.
7921
5a670b1e
AD
79222001-12-29 Akim Demaille <akim@epita.fr>
7923
7924 * src/gram.c, src/gram.h (sprec, sassoc): Remove.
7925 Adjust all users to use symbols[i]->prec or ->assoc.
7926
ad949da9
AD
79272001-12-29 Akim Demaille <akim@epita.fr>
7928
7929 * src/reader.c, src/reader.h (tags): Remove.
7930 Adjust all users to use symbols[i]->tag.
7931
0e78e603
AD
79322001-12-29 Akim Demaille <akim@epita.fr>
7933
7934 * src/gram.h, src/gram.c (symbols): New, similar to state_table
7935 and rule_table.
7936 * src/reader.c (packsymbols): Fill this table.
7937 Drop sprec.
7938 * src/conflicts.c (resolve_sr_conflict): Adjust.
7939 * src/reduce.c (reduce_grammar): Adjust: just sort symbols, a
7940 single table.
7941 Use symbols[i]->tag instead of tags[i].
7942
213e640e
AD
79432001-12-29 Akim Demaille <akim@epita.fr>
7944
7945 * tests/calc.at (_AT_DATA_CALC_Y): Also use %union.
7946 In addition, put a comment in there, to replace...
7947 * tests/regression.at (%union and C comments): Remove.
7948
e7b8bef1
AD
79492001-12-29 Akim Demaille <akim@epita.fr>
7950
7951 * tests/regression.at (Web2c Actions): Blindly move the actual
7952 output as expected output. The contents *seem* right to me, but I
7953 can't pretend reading perfectly parser tables... Nonetheless, all
7954 the other tests pass correctly, the table look OK, even though the
7955 presence of `$axiom' is to be noted: AFAICS it is useless (but
7956 harmless).
7957
b68e7744
AD
79582001-12-29 Akim Demaille <akim@epita.fr>
7959
7960 * src/reader.c (readgram): Don't add the rule 0 if there were no
7961 rules read. In other words, add it _after_ having performed
7962 grammar sanity checks.
7963 Fixes the `tests/regression.at (Invalid input: 1)' Failure.
7964
78d5bae9
AD
79652001-12-29 Akim Demaille <akim@epita.fr>
7966
7967 * tests/regression.at (Web2c Report): Catch up: the rule 0 is now
7968 visible, and some states have now a different number.
7969
ff442794
AD
79702001-12-29 Akim Demaille <akim@epita.fr>
7971
7972 * src/reader.c (readgram): Bind the initial rule's lineno to that
7973 of the first rule.
7974 * tests/regression.at (Rule Line Numbers, Unresolved SR Conflicts):
7975 (Solved SR Conflicts): Adjust rule 0's line number.
7976
610ab194
AD
79772001-12-29 Akim Demaille <akim@epita.fr>
7978
7979 Fix the `GAWK Grammar' failure.
7980
7981 * src/LR0.c (final_state): Initialize to -1 so that we do compute
7982 the reductions of the first state which was mistakenly confused
7983 with the final state because precisely final_state was initialized
7984 to 0.
7985 * tests/sets.at (Nullable): Adjust: state 0 does have lookaheads,
7986 now noticed by Bison.
7987 * tests/regression.at (Rule Line Numbers): Adjust: state 0 does
7988 have a reduction on $default.
7989
29d29c8f
AD
79902001-12-29 Akim Demaille <akim@epita.fr>
7991
7992 * src/gram.c (ritem_print): Be sure to subtract 1 when displaying
7993 rule line numbers.
7994 * src/closure.c (print_closure): Likewise.
7995 * src/derives.c (print_derives): Likewise.
7996 * tests/sets.at (Nullable): Adjust: the rule numbers are correct
7997 now.
7998
7c6b64d0
AD
79992001-12-29 Akim Demaille <akim@epita.fr>
8000
8001 * src/lalr.c (lookaheads_print): New.
8002 (lalr): Call it when --trace-flag.
8003 * tests/sets.at (Nullable): Adjust: when tracing, the lookaheads
8004 are dumped.
8005
3d4daee3
AD
80062001-12-29 Akim Demaille <akim@epita.fr>
8007
8008 * src/derives.c (print_derives): Be sure to use `>= 0', not `> 0',
8009 when walking through ritem, even via rule->rhs.
8010 * src/reduce.c (dump_grammar, useful_production, reduce_output)
8011 (useful_production, useless_nonterminals): Likewise.
8012 (reduce_grammar_tables): Likewise, plus update nritems.
8013 * src/nullable.c (set_nullable): Likewise.
8014 * src/lalr.c (build_relations): Likewise.
8015 * tests/sets.at (Nullable): Adjust.
8016 Fortunately, now, the $axiom is no longer nullable.
8017
9e7f6bbd
AD
80182001-12-29 Akim Demaille <akim@epita.fr>
8019
8020 * src/LR0.c (generate_states): Use nritems, not nitems, nor using
8021 the 0-sentinel.
8022 * src/gram.c (ritem_longest_rhs): Likewise.
8023 * src/reduce.c (nonterminals_reduce): Likewise.
8024 * src/print_graph.c (print_graph): Likewise.
8025 * src/output.c (output_rule_data): Likewise.
8026 * src/nullable.c (set_nullable): Likewise.
8027
255ef638
AD
80282001-12-29 Akim Demaille <akim@epita.fr>
8029
8030 * src/output.c: Comment changes.
8031
0d8a7363
AD
80322001-12-27 Paul Eggert <eggert@twinsun.com>
8033
8034 * src/bison.simple (YYSTACK_ALLOC, YYSIZE_T): Remove special
8035 cases for non-GNU systems like AIX, HP-UX, SGI, Sun, and
8036 Sparc, as they were causing more porting problems than the
8037 (minor) performance improvement was worth.
8038
8039 Also, catch up with 1.31's YYSTD.
8040
3db472b9
AD
80412001-12-27 Akim Demaille <akim@epita.fr>
8042
8043 * src/output.c (output_gram): Rely on nritems, not the
8044 0-sentinel. See below.
8045 Use -1 as separator, not 0.
8046 * src/bison.simple (yyparse): Subtract 1 to the rule numbers.
8047 Rely on -1 as separator in yyrhs, instead of 0.
8048 * tests/calc.at (AT_CHECK_CALC): Now, the parsers no longer issue
8049 twice `Now at end of input', therefore there are two lines less to
8050 expect.
8051
b365aa05
AD
80522001-12-27 Akim Demaille <akim@epita.fr>
8053
8054 * tests/regression.at (Unresolved SR Conflicts):
8055 (Solved SR Conflicts, Rule Line Numbers): Adjust to the changes
8056 below.
8057
30171f79
AD
80582001-12-27 Akim Demaille <akim@epita.fr>
8059
8060 * src/LR0.c (new_state): Recognize the final state by the fact it
8061 is reached by eoftoken.
8062 (insert_start_shifting_state, insert_eof_shifting_state)
8063 (insert_accepting_state, augment_automaton): Remove, since now
8064 these states are automatically computed from the initial state.
8065 (generate_states): Adjust.
8066 * src/print.c: When reporting a rule number to the user, substract
8067 1, so that the axiom rule is rule 0, and the first user rule is 1.
8068 * src/reduce.c: Likewise.
8069 * src/print_graph.c (print_core): For the time being, just as for
8070 the report, depend upon --trace-flags to dump the full set of
8071 items.
8072 * src/reader.c (readgram): Once the grammar read, insert the rule
8073 0: `$axiom: START-SYMBOL $'.
8074 * tests/set.at: Adjust: rule 0 is now displayed, and since the
8075 number of the states has changed (the final state is no longer
8076 necessarily the last), catch up.
8077
75142d45
AD
80782001-12-27 Akim Demaille <akim@epita.fr>
8079
8080 Try to make the use of the eoftoken valid. Given that its value
8081 is 0 which was also used as a sentinel in ritem, (i) make sure >= 0
8082 is used instead of > 0 where appropriate, (ii), depend upon nritems
8083 instead of the 0-sentinel.
8084
8085 * src/gram.h, src/gram.c (nritems): New.
8086 Expected to be duplication of nitems, but for the time being...
8087 * src/reader.c (packgram): Assert nritems and nitems are equal.
8088 * src/LR0.c (allocate_itemsets, new_itemsets): Adjust.
8089 * src/closure.c (print_closure, print_fderives): Likewise.
8090 * src/gram.c (ritem_print): Likewise.
8091 * src/print.c (print_core, print_grammar): Likewise.
8092 * src/print_graph.c: Likewise.
8093
b7c49edf
AD
80942001-12-27 Akim Demaille <akim@epita.fr>
8095
8096 * src/main.c (main): If there are complains after grammar
8097 reductions, then output the report anyway if requested, then die.
8098 * src/symtab.c (bucket_new): Initialize `value' to -1, not 0.
8099 * src/reader.c (eoftoken): New.
8100 (parse_token_decl): If the token being defined has value `0', it
8101 is the eoftoken.
8102 (packsymbols): No longer hack `tags' to insert `$' by hand.
8103 Be sure to preserve the value of the eoftoken.
8104 (reader): Make sure eoftoken is defined.
8105 Initialize nsyms to 0: now eoftoken is created just like the others.
8106 * src/print.c (print_grammar): Don't special case the eof token.
8107 * src/regression.at: Adjust: `$' has value 0, not -1, which was a
8108 lie anyway, albeit pleasant.
8109 * tests/calc.at: Exercise error messages with eoftoken.
8110 Change the grammar so that empty input is invalid.
8111 Adjust expectations.
8112 When yyungeting, be sure to use a valid yylloc: use last_yylloc.
8113
ec2da99f
AD
81142001-12-27 Akim Demaille <akim@epita.fr>
8115
8116 * configure.in: Check the protos of strchr ans strspn.
8117 Replace strchr if needed.
8118 * src/system.h: Provide the protos of strchr, strspn and memchr if
8119 missing.
8120 * lib/strchr.c: New.
8121 * src/reader.c (symbols_save): Use strchr.
8122
8adfa272
AD
81232001-12-27 Akim Demaille <akim@epita.fr>
8124
8125 * src/print.c, src/print_graph.c (escape): New.
8126 Use it to quote the TAGS outputs.
8127 * src/print_graph.c (print_state): Now errors are in red, and
8128 reductions in green.
8129 Prefer high to wide: output the state number on a line of its own.
8130
80dac38c
AD
81312001-12-27 Akim Demaille <akim@epita.fr>
8132
8133 * src/state.h, src/state.c (reductions_new): New.
8134 * src/LR0.c (set_state_table): Let all the states have a
8135 `reductions', even if reduced to 0.
8136 (save_reductions): Adjust.
8137 * src/lalr.c (initialize_LA, initialize_lookaheads): Adjust.
8138 * src/print.c (print_reductions, print_actions): Adjust.
8139 * src/output.c (action_row): Adjust.
8140
2cec70b9
AD
81412001-12-27 Akim Demaille <akim@epita.fr>
8142
8143 * src/state.h, src/state.c (errs_new, errs_dup): New.
8144 * src/LR0.c (set_state_table): Let all the states have an errs,
8145 even if reduced to 0.
8146 * src/print.c (print_errs, print_reductions): Adjust.
8147 * src/output.c (output_actions, action_row): Adjust.
8148 * src/conflicts.c (resolve_sr_conflict): Adjust.
8149
13ca549a
AD
81502001-12-27 Akim Demaille <akim@epita.fr>
8151
8152 * src/lalr.c (set_goto_map, initialize_F): Use SHIFT_SYMBOL.
8153
5092aba5
AD
81542001-12-27 Akim Demaille <akim@epita.fr>
8155
8156 * src/conflicts.c, src/conflicts.h (print_reductions): Move to...
8157 * src/print.c: here.
8158 (lookaheadset, shiftset): New, used as additional storage by
8159 print_reductions.
8160 (print_results): Adjust.
8161 (print_shifts, print_gotos, print_errs): New, extracted from...
8162 (print_actions): here.
8163 * src/print_graph.c (print_actions): Remove dead code.
8164
11e2beca
AD
81652001-12-27 Akim Demaille <akim@epita.fr>
8166
8167 * src/reader.c (copy_dollar, copy_at): Better checking of `n' in
8168 `$n' and `@n'.
8169
dac3c910
AD
81702001-12-27 Akim Demaille <akim@epita.fr>
8171
8172 * src/lalr.c (add_lookback_edge): Use state_t instead of ints.
8173 (build_relations): Adjust.
8174
d0b0fefa
AD
81752001-12-27 Akim Demaille <akim@epita.fr>
8176
8177 * src/lalr.c (set_goto_map): Remove a wrong but benign loop
8178 duplication.
8179
adc8c848
AD
81802001-12-27 Akim Demaille <akim@epita.fr>
8181
8182 * src/reader.c (packgram): Catch nitems overflows.
8183
14d293ac
AD
81842001-12-27 Akim Demaille <akim@epita.fr>
8185
8186 * src/files.c, src/files.h (guard_obstack): Remove.
8187 * src/output.c (output): Adjust.
8188 * src/reader.c (parse_braces): New, factoring...
8189 (copy_action, copy_guard): these two which are renamed as...
8190 (parse_action, parse_guard): these.
8191 As a voluntary consequence, using braces around guards is now
8192 mandatory.
8193
f499b062
AD
81942001-12-27 Akim Demaille <akim@epita.fr>
8195
8196 * src/gram.h (rule_t): `guard' and `guard_line' are new members.
8197 * src/reader.c (symbol_list): `guard' and `guard_line' are new
8198 members.
8199 (symbol_list_new): Adjust.
8200 (copy_action): action_line is the first line, not the last.
8201 (copy_guard): Just as for actions, store the `action' only, not
8202 the switch/case/break flesh.
8203 Don't parse the user action that might follow the guard, let...
8204 (readgram): do it, i.e., now, there can be an action after a
8205 guard.
8206 In other words the guard is just explicitly optional.
8207 (packgram): Adjust.
8208 * src/output.c (guards_output): New.
8209 (output_parser): Call it when needed.
8210 (output): Also free the guard and attrs obstacks.
8211 * src/files.c, src/files.h (obstack_save): Remove.
8212 (output_files): Remove.
8213 As a result, if one needs the former `.act' file, using an
8214 appropriate skeleton which requires actions and guards is now
8215 required.
8216 * src/main.c (main): Adjust.
8217 * tests/semantic.at: New.
8218 * tests/regression.at: Use `input.y' as input file name.
8219 Avoid 8+3 problems by requiring input.c when the test needs the
8220 parser.
8221
d945f5cd
AD
82222001-12-27 Akim Demaille <akim@epita.fr>
8223
8224 * src/reader.c (symbol_list_new): Be sure to initialize all the
8225 fields.
8226
d200e455
AD
82272001-12-27 Akim Demaille <akim@epita.fr>
8228
8229 All the hacks using a final pseudo state are now useless.
8230
8231 * src/LR0.c (set_state_table): state_table holds exactly nstates.
8232 * src/lalr.c (nLA): New.
8233 (initialize_LA, compute_lookaheads, initialize_lookaheads): Use it
8234 instead of lookaheadsp from the pseudo state (nstate + 1).
8235
f9507c28
AD
82362001-12-27 Akim Demaille <akim@epita.fr>
8237
8238 * src/output.c (action_row, token_actions): Use a state_t instead
8239 of a integer, and nlookaheads instead of the following state's
8240 lookaheadsp.
8241
065fbd27
AD
82422001-12-27 Akim Demaille <akim@epita.fr>
8243
8244 * src/conflicts.c (log_resolution, flush_shift)
8245 (resolve_sr_conflict, set_conflicts, solve_conflicts)
8246 (count_sr_conflicts, count_rr_conflicts, conflicts_output)
8247 (conflicts_print, print_reductions): Use a state_t instead of an
8248 integer when referring to a state.
8249 As much as possible, depend upon nlookaheads, instead of the
8250 `lookaheadsp' member of the following state (since lookaheads of
8251 successive states are successive, the difference between state n + 1
8252 and n served as the number of lookaheads for state n).
8253 * src/lalr.c (add_lookback_edge): Likewise.
8254 * src/print.c (print_core, print_actions, print_state)
8255 (print_results): Likewise.
8256 * src/print_graph.c (print_core, print_actions, print_state)
8257 (print_graph): Likewise.
8258 * src/conflicts.h: Adjust.
8259
1b177bd7
AD
82602001-12-27 Akim Demaille <akim@epita.fr>
8261
8262 * src/bison.hairy: Formatting/comment changes.
8263 ANSIfy.
8264 Remove `register' indications.
8265 Add plenty of `static'.
8266
7742ddeb
AD
82672001-12-27 Akim Demaille <akim@epita.fr>
8268
8269 * src/output.c (prepare): Drop the muscle `ntbase' which
8270 duplicates ntokens.
8271 * src/bison.simple: Formatting/comment changes.
8272 Use YYNTOKENS only, which is documented, but not YYNTBASE, which
8273 is an undocumented synonym.
8274
1fa14068
AD
82752001-12-22 Akim Demaille <akim@epita.fr>
8276
8277 * src/output.c (output_table_data): Change the prototype to use
8278 `int' for array ranges: some invocations do pass an int, not a
8279 short.
8280 Reported by Wayne Green.
8281
b9752825
AD
82822001-12-22 Akim Demaille <akim@epita.fr>
8283
8284 Some actions of web2c.y are improperly triggered.
8285 Reported by Mike Castle.
8286
8287 * src/lalr.c (traverse): s/F (i)[k] = F (j)[k]/F (j)[k] = F (i)[k]/.
8288 * tests/regression.at (Web2c): Rename as...
8289 (Web2c Report): this.
8290 (Web2c Actions): New.
8291
776209d6
AD
82922001-12-22 Akim Demaille <akim@epita.fr>
8293
8294 Reductions in web2c.y are improperly reported.
8295 Reported by Mike Castle.
8296
8297 * src/conflicts.c (print_reductions): Fix.
8298 * tests/regression.at (Web2c): New.
8299
275fc3ad
AD
83002001-12-18 Akim Demaille <akim@epita.fr>
8301
8302 Some host fail on `assert (!"foo")', which expands to
8303 ((!"foo") ? (void)0 : __assert("!"foo."", __FILE__, __LINE__))
8304 Reported by Nelson Beebee.
8305
8306 * src/output.c, src/vcg.c: Replace `assert (!"it succeeded")' with
8307 `#define it_succeeded 0' and `assert (it_succeeded)'.
8308
897668ee
MA
83092001-12-17 Marc Autret <autret_m@epita.fr>
8310
8311 * src/bison.simple: Don't hard code the skeleton line and filename.
8312 * src/output.c (output_parser): Rename 'line' as 'output_line'.
8313 New line counter 'skeleton_line' (skeleton-line muscle).
8314
ab3399e0
PE
83152001-12-17 Paul Eggert <eggert@twinsun.com>
8316
8317 * NEWS, doc/bison.texinfo, doc/bison.1, doc/bison.rnh: Document that
8318 YYDEBUG must be defined to a nonzero value.
8319
8320 * src/bison.simple (yytname): Do not assume that the user defines
8321 YYDEBUG to a properly parenthesized expression.
8322
3877f72b
AD
83232001-12-17 Akim Demaille <akim@epita.fr>
8324
8325 * src/state.h (state_t): Rename lookaheads as lookaheadsp.
8326 nlookaheads is a new member.
8327 Adjust all users.
8328 * src/lalr.h (nlookaheads): Remove this orphan declaration.
8329 * src/lalr.c (initialize_lookaheads): Set nlookaheads for each
8330 state.
776209d6 8331
331dbc1b
AD
83322001-12-17 Akim Demaille <akim@epita.fr>
8333
8334 * src/files.h, src/files.c (open_files, close_files): Remove.
8335 * src/main.c (main): Don't open/close files, nor invoke lex_free,
8336 let...
8337 * src/reader.c (reader): Do it.
776209d6 8338
be750e4c
AD
83392001-12-17 Akim Demaille <akim@epita.fr>
8340
8341 * src/conflicts.c (print_reductions): Formatting changes.
776209d6 8342
709ae8c6
AD
83432001-12-17 Akim Demaille <akim@epita.fr>
8344
8345 * src/conflicts.c (flush_shift): Also adjust lookaheadset.
8346 (flush_reduce): New.
8347 (resolve_sr_conflict): Adjust.
776209d6 8348
f87685c3
AD
83492001-12-17 Akim Demaille <akim@epita.fr>
8350
8351 * src/output.c (output_obstack): Be static and rename as...
8352 (format_obstack): this, to avoid any confusion with files.c's
8353 output_obstack.
8354 * src/reader.h (muscle_obstack): Move to...
8355 * src/output.h: here, since it's defined in output.c.
8356
837491d8
AD
83572001-12-17 Akim Demaille <akim@epita.fr>
8358
8359 * src/output.c (action_row, save_column, default_goto)
8360 (sort_actions, matching_state, pack_vector): Better variable
8361 locality.
8362
796d61fb
AD
83632001-12-17 Akim Demaille <akim@epita.fr>
8364
8365 * src/output.c: Various formatting changes.
776209d6 8366
64d15509
AD
83672001-12-17 Akim Demaille <akim@epita.fr>
8368
8369 * src/files.c (output_files): Free the output_obstack.
8370 * src/main.c (main): Call print and print_graph conditionally.
8371 * src/print.c (print): Work unconditionally.
8372 * src/print_graph.c (print_graph): Work unconditionally.
8373 * src/conflicts.c (log_resolution): Output only if verbose_flag.
8374
fbc8ecb7
MA
83752001-12-16 Marc Autret <autret_m@epita.fr>
8376
8377 * src/output.c (actions_output): Fix. When we use %no-lines,
8378 there is one less line per action.
8379
f0440388
MA
83802001-12-16 Marc Autret <autret_m@epita.fr>
8381
8382 * src/bison.simple: Remove a useless #line directive.
8383 s/#line %%line %%skeleton/#line %%line "%%parser-file-name"/'.
8384 * src/output.c (get_lines_number): New.
776209d6 8385 (output_parser): Adjust, now takes care about the lines of a
f0440388
MA
8386 output muscles.
8387 Fix line numbering.
8388 (actions_output): Computes the number of lines taken by actions.
8389 (output_master_parser): Insert new skeleton which is the name of
8390 the output parser file name.
8391
a79986b8
MA
83922001-12-15 Marc Autret <autret_m@epita.fr>
8393
8394 * src/bison.simple [YYERROR_VERBOSE]: Restore backward compatibility.
8395
4ec8e00f
MA
83962001-12-15 Marc Autret <autret_m@epita.fr>
8397
8398 * src/output.c (output_gram): Keep track of the hairy one.
8399
1a4648ff
AD
84002001-12-15 Akim Demaille <akim@epita.fr>
8401
8402 Make `make distcheck' work.
8403
8404 * lib/Makefile.am (INCLUDES): Add top_srcdir/intl, since hash uses
8405 system.h which uses libgettext.h.
8406
9c2c67e6
AD
84072001-12-15 Akim Demaille <akim@epita.fr>
8408
8409 * src/nullable.c (set_nullable): Useless rules must be skipped,
8410 otherwise, since we range over their symbols, we might look at a
8411 nonterminal which no longer ``exists'', i.e., it is not counted in
8412 `nvars', hence we overflow our arrays.
8413
93ede233
AD
84142001-12-15 Akim Demaille <akim@epita.fr>
8415
8416 The header can also be produced directly, without any obstack!
8417 Yahoo!
8418
8419 * src/files.c, src/files.h (defines_obstack): Remove.
8420 (compute_header_macro): Global.
8421 (defines_obstack_save): Remove.
8422 * src/reader.c (parse_union_decl): No longer output to
8423 defines_obstack: its content can be found in the `stype' muscle
8424 anyway.
8425 (output_token_translations): Merge into...
8426 (symbols_output): this.
8427 Rename as...
8428 (symbols_save): this.
8429 (reader): Adjust.
8430 * src/output.c (header_output): New.
8431 (output): Call it.
8432
2666f928
AD
84332001-12-15 Akim Demaille <akim@epita.fr>
8434
8435 * src/reader.c (parse_union_decl): Instead of handling two obstack
8436 simultaneously, use one to define the `stype' muscle, and use the
8437 value of the latter to fill defines_obstack.
8438 (copy_comment): Remove.
8439 (copy_comment2): Work for a single obstack.
8440 Rename as...
8441 (copy_comment): this.
8442
428046f8
AD
84432001-12-15 Akim Demaille <akim@epita.fr>
8444
8445 * src/lex.c, src/lex.h (xgetc): No longer static.
8446 * src/reader.c (parse_union_decl): Revamp.
8447
ea52d706
AD
84482001-12-15 Akim Demaille <akim@epita.fr>
8449
8450 Still making progress in separating Bison into (i) input, (ii)
8451 process, (iii) output: now we can directly output the parser file
8452 without using table_obstack at all.
8453
8454 * src/files.c, src/files.h (table_obstack): Bye bye.
8455 (parser_file_name): New.
8456 * src/files.c (compute_output_file_names): Compute it.
8457 * src/output.c (actions_output, output_parser)
8458 (output_master_parser): To a file instead of an obstack.
8459
3f96f4dc
AD
84602001-12-15 Akim Demaille <akim@epita.fr>
8461
8462 Attach actions to rules, instead of pre-outputting them to
8463 actions_obstack.
8464
8465 * src/gram.h (rule_t): action and action_line are new members.
8466 * src/reader.c (symbol_list): Likewise.
8467 (copy_action): Save the actions within the rule.
8468 (packgram): Save them in rule_table.
8469 * src/output.c (actions_output): New.
8470 (output_parser): Use it on `%%actions'.
8471 (output_rule_data): Don't free rule_table.
8472 (output): Do it.
8473 (prepare): Don't save the `action' muscle.
8474 * src/bison.simple: s/%%action/%%actions/.
8475
51576fb3
AD
84762001-12-15 Akim Demaille <akim@epita.fr>
8477
8478 * src/reader.c (copy_action): When --yacc, don't append a `;'
8479 to the user action: let it fail if lacking.
dee049eb 8480 Suggested by Arnold Robbins and Tom Tromey.
51576fb3 8481
2648a72d
AD
84822001-12-14 Akim Demaille <akim@epita.fr>
8483
8484 * src/lex.c (literalchar): Simply return the char you decoded, non
8485 longer mess around with obstacks and int pointers.
8486 Adjust all callers.
8487
92790e5b
AD
84882001-12-14 Akim Demaille <akim@epita.fr>
8489
8490 * src/lex.c (literalchar): Don't escape the special characters,
8491 just decode them, and keep them as char (before, eol was output as
8492 the 2 char string `\n' etc.).
8493 * src/output.c (output_rule_data): Use quotearg to output the
8494 token strings.
8495
927c1557
PE
84962001-12-13 Paul Eggert <eggert@twinsun.com>
8497
8498 * src/bison.simple (YYSIZE_T, YYSTACK_ALLOC, YYSTACK_FREE):
8499 Do not infringe on the global user namespace when using C++.
8500 (YYFPRINTF, YYSTDERR): New macros, needed for the above.
8501 All uses of `fprintf' and `stderr' changed.
8502
8503 * doc/bison.texinfo: Document YYFPRINTF, YYSTDERR.
8504
ed8e1f68
AD
85052001-12-13 Akim Demaille <akim@epita.fr>
8506
8507 The computation of nullable is broken: it doesn't handle empty
8508 RHS's properly.
8509
8510 * tests/torture.at (GNU AWK Grammar): New.
8511 * tests/sets.at (Nullable): New.
8512 * src/nullable.c (set_nullable): Instead of blindly looping over
8513 `ritems', loop over the rules, and then over their rhs's.
8514
8515 Work around Autotest bugs.
8516
8517 * src/warshall.c (bitmatrix_print): Don't use `+--+' as table
8518 frame, because Autotest understand lines starting with a `+' as
8519 traces from the shell. Then, they are not processed properly.
8520 Admittedly an Autotest bug, but we don't have time to wait for
8521 Autotest to catch up.
8522 * tests/regression.at (Broken Closure): Adjust to the new table
8523 frames.
8524 Move to...
8525 * tests/sets.at: here.
8526
cb581495
AD
85272001-12-13 Akim Demaille <akim@epita.fr>
8528
8529 * src/closure.c (closure): Use nrules instead of playing tricks
8530 with BITS_PER_WORD.
8531
2e729273
AD
85322001-12-13 Akim Demaille <akim@epita.fr>
8533
8534 * src/print.c (print_actions): Output the handling of `$' as the
8535 traces do: shifting the token EOF. Before EOF was treated as a
8536 nonterminal.
8537 * tests/regression.at: Adjust some tests.
8538 * src/print_graph.c (print_core): Complete the set of items via
8539 closure. The next-to-final and final states are still unsatisfying,
8540 but that's to be addressed elsewhere.
8541 No longer output the rule numbers, but do output the state number.
8542 A single loop for the shifts + gotos is enough, but picked a
8543 distinct color for each.
8544 (print_graph): Initialize and finalize closure.
8545
107f7dfb
AD
85462001-12-13 Akim Demaille <akim@epita.fr>
8547
8548 * src/reader.c (readgram): Remove dead code, an strip useless
8549 braces.
8550 (get_type): Remove, unused.
8551
9b53a24f
AD
85522001-12-12 Akim Demaille <akim@epita.fr>
8553
8554 * src/complain.h, src/complain.c: Remove error_one_per_line, rely
8555 on that of lib/error.c.
8556
dbfb6dcd
AD
85572001-12-12 Akim Demaille <akim@epita.fr>
8558
8559 Some hosts don't like `/' in includes.
8560
8561 * src/system.h: Include libgettext.h without qualifying the path.
8562 * src/Makefile.am (INCLUDES): Add $(top_srcdir)/intl, remove
8563 $(top_srcdir).
8564
c25fb648
MA
85652001-12-11 Marc Autret <autret_m@epita.fr>
8566
8567 * src/output.c (output_parser): Remove useless muscle.
8568
710ddc4f
MA
85692001-12-11 Marc Autret <autret_m@epita.fr>
8570
8571 * src/bison.simple: Remove #line just before %%epilogue. It
8572 is now handled in ...
8573 * src/reader.c (read_additionnal_code): Add the output of a
8574 #line for the epilogue.
8575
e83d80b8
MA
85762001-12-10 Marc Autret <autret_m@epita.fr>
8577
927c1557 8578 * src/reader.c (copy_definition): Re-use CPP-outed code which
e83d80b8
MA
8579 replace precedent remove.
8580 * src/bison.simple: Remove #line before %%prologue because
8581 %%input-line is wrong at this time.
8582
971d5158
MA
85832001-12-10 Marc Autret <autret_m@epita.fr>
8584
8585 * src/reader.c (symbols_output): Clean up.
927c1557 8586 * src/output.c (output_gram, output): Clean up.
971d5158 8587
5edafffd
AD
85882001-12-10 Akim Demaille <akim@epita.fr>
8589
8590 * src/lalr.c (initialize_lookaheads): New. Extracted from...
8591 * src/LR0.c (set_state_table): here.
8592 * src/lalr.c (lalr): Call it.
8593
0279f8e9
AD
85942001-12-10 Akim Demaille <akim@epita.fr>
8595
8596 * src/state.h (shifts): Remove the `number' member: shifts are
8597 attached to state, hence no longer need to be labelled with a
8598 state number.
8599
190c4f5f
AD
86002001-12-10 Akim Demaille <akim@epita.fr>
8601
8602 Now that states have a complete set of members, the linked list of
8603 shifts is useless: just fill directly the state's shifts member.
8604
8605 * src/state.h (shifts): Remove the `next' member.
8606 * src/LR0.c (first_state, last_state): Remove.
8607 Adjust the callers.
8608 (augment_automaton): Don't look for the shifts that must be added
8609 a shift on EOF: it is those of the state we looked for! But now,
8610 since shifts are attached, it is no longer needed to looking
8611 merely by its id: its number.
8612
2a73b93d
AD
86132001-12-10 Akim Demaille <akim@epita.fr>
8614
8615 * src/LR0.c (augment_automaton): Better variable locality.
8616 Remove an impossible branch: if there is a state corresponding to
8617 the start symbol being shifted, then there is shift for the start
8618 symbol from the initial state.
8619
74392f6a
AD
86202001-12-10 Akim Demaille <akim@epita.fr>
8621
8622 * src/LR0.c (augment_automaton): Call `insert_eof_shifting_state'
8623 only when appropriate: when insert_start_shifting_state' is not
8624 invoked.
8625 * tests/regression.at (Rule Line Numbers): Adjust.
8626
37c82725
AD
86272001-12-10 Akim Demaille <akim@epita.fr>
8628
8629 * src/LR0.c (augment_automaton): Now that all states have shifts,
8630 merge the two cases addition shifts to the initial state.
8631
6a164e0c
AD
86322001-12-10 Akim Demaille <akim@epita.fr>
8633
8634 * src/lalr.c (set_state_table): Move to...
8635 * src/LR0.c: here.
8636 * src/lalr.c (lalr): Don't call it...
8637 * src/LR0.c (generate_states): do it.
8638 * src/LR0.h (first_state): Remove, only the table is used.
8639
7215de24
AD
86402001-12-10 Akim Demaille <akim@epita.fr>
8641
8642 * src/LR0.h (first_shift, first_reduction): Remove.
8643 * src/lalr.c: Don't use first_shift: find shifts through the
8644 states.
8645
80e25d4d
AD
86462001-12-10 Akim Demaille <akim@epita.fr>
8647
8648 * src/LR0.c: Attach shifts to states as soon as they are
8649 computed.
8650 * src/lalr.c (set_state_table): Instead of assigning shifts to
8651 state, just assert that the mapping was properly done.
8652
0ab3728b
AD
86532001-12-10 Akim Demaille <akim@epita.fr>
8654
8655 * src/LR0.c (insert_start_shift): Rename as...
8656 (insert_start_shifting_state): this.
8657 (insert_eof_shifting_state, insert_accepting_state): New.
8658 (augment_automaton): Adjust.
8659 Better locality of the variables.
8660 When looking if the start_symbol is shifted from the initial
8661 state, using `while (... symbol != start_symbol ...)' sounds
8662 better than `while (... symbol < start_symbol ...)': If fail
8663 to see how the order between symbols could be relevant!
8664
78af9bbc
AD
86652001-12-10 Akim Demaille <akim@epita.fr>
8666
8667 * src/getargs.h: Don't declare `spec_name_prefix' and
8668 `spec_file_prefix', declared by src/files.h.
8669 * src/files.c, src/files.h: Default for spec_name_prefix is "yy".
8670 * src/muscle_tab.c (muscle_init): Default prefix to NULL.
8671 * src/output.c (prepare): Adjust.
8672 * src/reader.c (symbols_output): Likewise.
8673 * src/vmsgetargs.c: Vaguely adjust, but who cares?
8674
bdef2a41
AD
86752001-12-10 Akim Demaille <akim@epita.fr>
8676
8677 * src/muscle_tab.c (muscle_init): NULL is a better default than
8678 `"0"'.
8679
3735969c
AD
86802001-12-10 Akim Demaille <akim@epita.fr>
8681
8682 * src/reader.c (reader): Calling symbols_output once is enough.
8683
49701457
AD
86842001-12-10 Akim Demaille <akim@epita.fr>
8685
8686 Now that states have a complete set of members, the linked list of
8687 reductions is useless: just fill directly the state's reductions
8688 member.
8689
8690 * src/state.h (struct reductions): Remove member `number' and
8691 `next'.
8692 * src/LR0.c (first_reduction, last_reduction): Remove.
8693 (save_reductions): Don't link the new reductions, store them in
8694 this_state.
8695 * src/lalr.c (set_state_table): No need to attach reductions to
8696 states, it's already done.
8697 * src/output.c (output_actions): No longer free the shifts, then
8698 the reductions, then the states: free all the states and their
8699 members.
8700
0edad749
AD
87012001-12-10 Akim Demaille <akim@epita.fr>
8702
8703 * src/options.c (OPTN, DRTV, BOTH): New.
8704 (option_table): Use them.
8705
0edad749
AD
8706 * src/muscle_tab.c: Don't include xalloc.h and string.h: that's
8707 the job of system.h.
8708 * src/options.c: Don't include stdio.h and xalloc.h for the same
8709 reasons.
8710
5449dd0f
AD
87112001-12-10 Akim Demaille <akim@epita.fr>
8712
8713 * src/output.c (output, prepare): Make sure the values of the
8714 muscles `action' and `prologue' are 0-terminated.
8715
a870c567
AD
87162001-12-10 Akim Demaille <akim@epita.fr>
8717
8718 Clean up GCC warnings.
8719
8720 * src/reader.c (copy_action): `buf' is not used.
8721 (parse_skel_decl): Be static.
8722 * src/muscle_tab.c (mhash1, mhash2, muscle_insert): Preserve `const'.
8723 * src/options.h (create_long_option_table): Have a real prototype.
8724 * lib/hash.c, lib/hash.h (hash_insert, hash_insert_at, hash_delete)
8725 (hash_delete_at): Return const void *.
8726 Adjust casts to preserve the const.
8727
80df8768
AD
87282001-12-10 Akim Demaille <akim@epita.fr>
8729
8730 * configure.in: Require 2.52g.
8731 M4 is not needed, but AUTOM4TE is.
8732 * m4/m4.m4: Remove.
8733 * tests/Makefile.am: Adjust.
8734
f693ad14
AD
87352001-12-10 Akim Demaille <akim@epita.fr>
8736
8737 One structure for states is enough, even though theoretically
8738 there are LR(0) states and LALR(1) states.
8739
8740 * src/lalr.h (state_t): Remove.
8741 (state_table): Be state_t **, not state_t *.
8742 * src/state.h (core, CORE_ALLOC): Rename as...
8743 (state_t, STATE_ALLOC): this.
8744 Add the LALR(1) members: shifts, reductions, errs.
8745 * src/LR0.c (state_table): Rename as...
8746 (state_hash): this, to avoid name clashes with the global
8747 `state_table'.
8748 * src/print_graph.c, src/LR0.c, src/LR0.h, src/conflicts.c
8749 * src/lalr.c, src/lalr.h, src/output.c, src/print.c: Adjust.
8750
74ffbcb6
AD
87512001-12-10 Akim Demaille <akim@epita.fr>
8752
8753 Bison dumps core on bash.y.
8754 Reported by Pascal Bart.
8755
8756 * src/warshall.c (bitmatrix_print): New.
8757 (TC): Use it.
8758 When performing a transitive closure R(i, j) && R(j, k) => R(i, k),
8759 j must be the outer loop.
8760 * tests/regression.at (Broken Closure): New.
8761
07708e19
AD
87622001-12-05 Akim Demaille <akim@epita.fr>
8763
8764 * tests/atlocal.in (CPPFLAGS): Do not leave a space between -I and
8765 its argument.
ba1ecc07 8766 Reported by Peter Hamorsky.
07708e19 8767
92b16366
AD
87682001-12-05 Akim Demaille <akim@epita.fr>
8769
8770 * src/conflicts.c (err_table): Remove.
8771 (resolve_sr_conflict): Adjust.
8772 * src/lalr.h (state_t.reduction_table, state_t.shift_table):
8773 Rename as...
8774 (state_t.reductions, state_t.shifts): this.
8775
076ab033
AD
87762001-12-05 Akim Demaille <akim@epita.fr>
8777
8778 * src/reduce.c (reduce_grammar_tables): No longer disable the
8779 removal of useless rules via CPP but via `if (0)', so that the
8780 compiler still check the code is valid.
8781 For instance, it should have noticed `rline' no longer exists: use
8782 the `line' member of rule_t.
8783 * src/gram.c (dummy, rline): Remove, unused.
8784
3843c413
AD
87852001-12-05 Akim Demaille <akim@epita.fr>
8786
8787 * src/output.c (pack_vector): Use assert, not berror.
8788 * src/main.c (berror): Remove, unused.
8789
43168960
AD
87902001-12-05 Akim Demaille <akim@epita.fr>
8791
8792 New experimental feature: if --verbose --trace output all the
8793 items of a state, not only its kernel.
8794
8795 * src/print.c (print_core): If `trace_flag', then invoke closure
8796 before outputting the items of the state (print_core is no longer
8797 a correct name them).
8798 (print_results): Invoke new_closure/free_closure if needed.
8799
b2872512
AD
88002001-12-05 Akim Demaille <akim@epita.fr>
8801
8802 * src/LR0.c (new_itemsets): Use nshifts only, not shiftcount.
8803 * src/closure.c, src/closure.h (itemsetsize): Rename as...
8804 (nitemset): for consistency with the rest of the project.
8805
23cbcc6c
AD
88062001-12-05 Akim Demaille <akim@epita.fr>
8807
8808 * src/closure.c (print_closure): Improve.
8809 (closure): Use it for printing input and output.
8810
03ec521c
AD
88112001-12-05 Akim Demaille <akim@epita.fr>
8812
8813 * src/closure.c (FIRSTS, FDERIVES): Adjust to reality: they are
8814 indexed by nonterminals.
8815
3a7456dd
AD
88162001-12-05 Akim Demaille <akim@epita.fr>
8817
8818 * src/warshall.c (TC, RTC): De-obsfucate (source reduced to 22% of
8819 what it was!).
8820 * src/warshall.h: Remove accidental duplication of the content.
8821
1cbcf2e7
AD
88222001-12-05 Akim Demaille <akim@epita.fr>
8823
8824 * src/closure.c (set_fderives): De-obfuscate.
8825
84182270
AD
88262001-12-05 Akim Demaille <akim@epita.fr>
8827
8828 * src/closure.c (print_firsts, print_fderives): De-obfuscate.
8829
3f6f053c
AD
88302001-12-05 Akim Demaille <akim@epita.fr>
8831
8832 * src/closure.c (set_firsts): De-obfuscate.
8833
7a5350ba
AD
88342001-12-05 Akim Demaille <akim@epita.fr>
8835
8836 * src/output.c (action_row): De-obfuscate
8837 using the good o' techniques: arrays not pointers, variable
8838 locality, BITISSET, RESETBIT etc.
8839
d954473d
AD
88402001-12-05 Akim Demaille <akim@epita.fr>
8841
8842 Pessimize the code to simplify it: from now on, all the states
8843 have a valid SHIFTS, which NSHIFTS is possibly 0.
8844
8845 * src/LR0.c (shifts_new): Be global and move to..
8846 * src/state.c, src/state.h: here.
8847 * src/conflicts, src/lalr.c, src/output.c, src/print.c,
8848 * src/print_graph: Adjust.
8849
9839bbe5
AD
88502001-12-05 Akim Demaille <akim@epita.fr>
8851
8852 * src/state.h (SHIFT_DISABLE, SHIFT_IS_DISABLED): New.
8853 * src/conflicts.c: Use it.
8854 Restore a few missing `if (!SHIFT_IS_DISABLED)' which were
8855 incorrectly ``simplified''.
8856
9f136c07
AD
88572001-12-05 Akim Demaille <akim@epita.fr>
8858
8859 * src/conflicts.c (flush_shift, resolve_sr_conflict): De-obfuscate
8860 using the good o' techniques: arrays not pointers, variable
8861 locality, BITISSET, RESETBIT etc.
8862
b608206e
AD
88632001-12-05 Akim Demaille <akim@epita.fr>
8864
8865 * src/state.h (SHIFT_SYMBOL): New.
8866 * src/conflicts.c: Use it to deobfuscate.
8867
52afa962
AD
88682001-12-05 Akim Demaille <akim@epita.fr>
8869
8870 * src/conflicts.c (count_sr_conflicts, count_rr_conflicts)
8871 (print_reductions): De-obfuscate using the good o' techniques:
8872 arrays not pointers, variable locality, BITISSET.
8873
e74dc321
AD
88742001-12-05 Akim Demaille <akim@epita.fr>
8875
8876 * src/conflicts.c (print_reductions): Arrays, not pointers.
8877 Use BITISSET.
8878
768fca83
AD
88792001-12-05 Akim Demaille <akim@epita.fr>
8880
8881 * src/conflicts.c (print_reductions): Pessimize, but clarify.
8882
a17e599f
AD
88832001-12-05 Akim Demaille <akim@epita.fr>
8884
8885 * src/conflicts.c (print_reductions): Improve variable locality.
8886
a04bc341
AD
88872001-12-05 Akim Demaille <akim@epita.fr>
8888
8889 * src/conflicts.c (print_reductions): Pessimize, but clarify.
8890
c8ea038e
AD
88912001-12-05 Akim Demaille <akim@epita.fr>
8892
8893 * src/conflicts.c (print_reductions): Improve variable locality.
8894
aa2aab3c
AD
88952001-12-05 Akim Demaille <akim@epita.fr>
8896
8897 * src/state.h (SHIFT_IS_ERROR, SHIFT_IS_GOTO, SHIFT_IS_SHIFT): New.
8898 * src/lalr.c: Use them.
8899
b178c8cc
AD
89002001-12-05 Akim Demaille <akim@epita.fr>
8901
8902 * src/LR0.c (augment_automaton): Formatting changes.
8903 Better variable locality.
8904
f67d13aa
AD
89052001-12-05 Akim Demaille <akim@epita.fr>
8906
8907 * src/lalr.c (matrix_print): New.
8908 (transpose): Use it.
8909 Use arrays instead of pointers.
8910
c2713865
AD
89112001-12-05 Akim Demaille <akim@epita.fr>
8912
8913 * src/lalr.c (maxrhs): Move to...
8914 * src/gram.c, src/gram.h (ritem_longest_rhs): here.
8915 * src/lalr.c (build_relations): Adjust.
8916
9887c18a
AD
89172001-12-05 Akim Demaille <akim@epita.fr>
8918
8919 * src/lalr.c (transpose): Free the memory allocated to the
8920 argument, as it is replaced by the results by the unique caller.
8921 (build_relations): Merely invoke transpose: it handles the memory
8922 deallocation.
8923 Improve variable locality.
8924 Avoid variables used as mere abbreviations.
8925 (compute_lookaheads): Use arrays instead of pointers.
8926
4d4f699c
AD
89272001-12-05 Akim Demaille <akim@epita.fr>
8928
8929 * src/lalr.c (initialize_F): Improve variable locality.
8930 Avoid variables used as mere abbreviations.
8931
80a69750
AD
89322001-12-05 Akim Demaille <akim@epita.fr>
8933
8934 * src/derives.c (print_derives): Display the ruleno.
8935 * src/lalr.c (initialize_F, transpose): Better variable locality
8936 to improve readability.
8937 Avoid variables used as mere abbreviations.
8938
fe961097
AD
89392001-12-05 Akim Demaille <akim@epita.fr>
8940
8941 * src/lalr.c (traverse): Use arrays instead of pointers.
8942
e3e4e814
AD
89432001-12-05 Akim Demaille <akim@epita.fr>
8944
8945 * src/nullable.c (set_nullable): Use a for loop to de-obfuscate
8946 the handling of squeue.
8947 `symbol >= 0' is wrong now, use `rule_table[ruleno].useful'.
8948
630e182b
AD
89492001-12-05 Akim Demaille <akim@epita.fr>
8950
8951 Because useless nonterminals are now kept alive (instead of being
8952 `destroyed'), we now sometimes examine them, and store information
8953 related to them. Hence we need to know their number, and adjust
8954 memory allocations.
8955
8956 * src/reduce.c, src/reduce.h (nuseless_nonterminals): No longer
8957 static.
8958 * src/LR0.c (allocate_itemsets): The memory allocated to
8959 `symbol_count' was used for two different purpose: once to count
8960 the number of occurrences of each symbol, and later reassigned to
8961 `shift_symbol', containing the symbol that can be shifted from a
8962 given state.
8963 Deobfuscate, i.e., allocate, use and free `symbol_count' here
8964 only, and...
8965 (new_itemsets): Allocate `shift_symbol' here.
8966 (allocate_itemsets): symbol_count includes useless nonterminals.
8967 Make room for them.
8968 (free_storage): Use `free', not `XFREE', for pointers that cannot
8969 be null.
8970
81b51460
AD
89712001-12-05 Akim Demaille <akim@epita.fr>
8972
8973 * src/nullable.c (set_nullable): Deobfuscate the handling of
8974 ritem.
8975 `symbol >= 0' is wrong now, use `rule_table[ruleno].useful'.
8976
3067fbef
AD
89772001-12-05 Akim Demaille <akim@epita.fr>
8978
8979 * src/gram.c, src/gram.h (ritem_print): New.
8980 * src/gram.c (dummy): Remove, now there is actual code in gram.c.
8981 (This useless function was defined only to work around VMS linkers
8982 that can't handle compilation units with variables only).
8983 * src/reduce.c (dump_grammar): Use it to trace the construction of
8984 ritem.
8985
c2bea5f9
PE
89862001-12-04 Paul Eggert <eggert@twinsun.com>
8987
7d27c823
PE
8988 * src/bison.simple (union yyalloc): Change member names
8989 to be the same as the stack names.
8990 (yyparse): yyptr is now union yyalloc *, not char *.
8991 (YYSTACK_RELOCATE): Likewise. This avoids a GCC warning,
8992 and may generate better code on some machines.
c2bea5f9
PE
8993 (yystpcpy): Use prototype if __STDC__ is defined, not just
8994 if __cplusplus is defined.
35687a9d 8995
2c8a9dfa
AD
89962001-11-30 Akim Demaille <akim@epita.fr>
8997
8998 * configure.in (WARNING_CFLAGS): Add -Werror when possible.
8999 (CFLAGS): Do not include the WARNING_CFLAGS here, since GNU
9000 Gettext doesn't compile cleanly, and dies with -Werror.
9001 * src/Makefile.am, lib/Makefile.am, tests/atlocal.in (CFLAGS):
9002 Include WARNING_CFLAGS here.
9003 * lib/xstrdup.c: Include xalloc.h, so that xstrdup be declared
9004 before being defined.
9005
f4e421e6
AD
90062001-11-27 Paul Eggert <eggert@twinsun.com>
9007
9008 * lib/quotearg.h (quotearg_n, quotearg_n_style):
9009 First arg is int, not unsigned.
9010 * lib/quotearg.c (quotearg_n, quotearg_n_style): Likewise.
9011 (SIZE_MAX, UINT_MAX): New macros.
9012 (quotearg_n_options): Abort if N is negative.
9013 Avoid overflow check on hosts where size_t is 64 bits and int
9014 is 32 bits, as overflow is impossible there.
9015 Fix off-by-one typo that caused unnecessary reallocation.
9016
7093d0f5
AD
90172001-11-29 Paul Eggert <eggert@twinsun.com>
9018
9019 Name space cleanup in generated parser.
9020
9021 * doc/bison.texinfo (Bison Parser): Discuss system headers
9022 and their effect on the user name space.
9023
9024 * src/bison.simple:
9025 (YYSTACK_ALLOC, YYSTACK_FREE, union yyalloc, YYSTACK_GAP_MAX,
9026 YYSTACK_BYTES, YYSTACK_RELOCATE): Do not define unless necessary,
9027 i.e. unless ! defined (yyoverflow) || defined (YYERROR_VERBOSE).
9028
9029 (YYSIZE_T): New macro. Use it instead of size_t, to avoid infringing
9030 on user names when possible.
9031
9032 (YYSTACK_USE_ALLOCA): Do not define; just use any existing defn.
9033 Simplify test for whather <alloca.h> exists.
9034
9035 (<stdlib.h>): Include if we will use malloc, and if standard C or C++.
9036
9037 (<stdio.h>): Include if YYDEBUG.
9038
9039 (yymemcpy): Renamed from __yy_memcpy. Do not define unless
9040 ! defined (yyoverflow) && ! defined (yymemcpy).
9041
9042 (yymemcpy, yyparse): Rename local variables as needed so that
9043 they all begin with 'yy'.
9044
9045 (yystrlen, yystpcpy): New functions.
9046
9047 (YY_DECL_NON_LSP_VARIABLES): Renamed from _YY_DECL_VARIABLES.
9048 All uses changed.
9049
9050 (yyparse): size_t -> YYSIZE_T. Use yystrlen and yystpcpy
9051 instead of relying on string.h functions. Use YYSTACK_ALLOC
9052 and YYSTACK_FREE instead of malloc and free.
9053
fd51e5ff
AD
90542001-11-30 Akim Demaille <akim@epita.fr>
9055
9056 * src/bison.simple (YYSTYPE, YYLTYPE): Move their definitions
9057 before their first uses.
9058 (YYBISON, YYPURE): Move to the top of the output.
9059
7d13ff5f
AD
90602001-11-30 Akim Demaille <akim@epita.fr>
9061
9062 * tests/reduce.at (Useless Nonterminals): Fix.
9063
892a3995
AD
90642001-11-30 Akim Demaille <akim@epita.fr>
9065
9066 * src/bison.simple (YYSTACK_FREE): Use `do {;} while (0)' as empty
9067 if body instead of `;' to pacify GCC's warnings.
9068
68f1e3ed
AD
90692001-11-30 Akim Demaille <akim@epita.fr>
9070
9071 Instead of mapping the LHS of unused rules to -1, keep the LHS
9072 valid, but flag the rules as invalid.
9073
9074 * src/gram.h (rule_t): `useful' is a new member.
9075 * src/print.c (print_grammar): Adjust.
9076 * src/derives.c (set_derives): Likewise.
9077 * src/reader.c (packgram, reduce_output): Likewise.
9078 * src/reduce.c (reduce_grammar_tables): Likewise.
9079 * tests/reduce.at (Underivable Rules, Useless Rules): New.
9080
d2d1b42b
AD
90812001-11-30 Akim Demaille <akim@epita.fr>
9082
9083 * src/reduce.c (reduce_output): Formatting changes.
9084 * src/print.c (print_results, print_grammar): Likewise.
9085 * tests/regression.at (Rule Line Numbers)
9086 (Solved SR Conflicts, Unresolved SR Conflicts): Adjust.
9087
760b53a8
AD
90882001-11-30 Akim Demaille <akim@epita.fr>
9089
9090 * src/reduce.c (nonterminals_reduce): Instead of throwing away
9091 useless nonterminals, move them at the end of the symbol arrays.
9092 (reduce_output): Adjust.
9093 * tests/reduce.at (Useless Nonterminals): Adjust.
9094
00238958
AD
90952001-11-30 Akim Demaille <akim@epita.fr>
9096
9097 * src/reduce.c: Various comment/formatting changes.
9098 (nonterminals_reduce): New, extracted from...
9099 (reduce_grammar_tables): here.
9100 (reduce_grammar): Call nonterminals_reduce.
9101
396452de
PE
91022001-11-29 Paul Eggert <eggert@twinsun.com>
9103
9104 * src/bison.simple (YYSTACK_REALLOC): Remove.
9105 (YYSTACK_ALLOC): Resurrect this macro, with its old meaning.
9106 (YYSTACK_FREE, YYSTACK_GAP_MAX, YYSTACK_BYTES, YYSTACK_RELOCATE):
9107 New macros.
9108 (union yyalloc): New type.
9109 (__yy_memcpy): Last arg is size_t, not unsigned int, to remove
9110 an arbitrary restriction on hosts where size_t is wider than int.
9111
9112 (yyparse): Don't dump core if alloca or malloc fails; instead, report
9113 a parser stack overflow. Allocate just one block of memory for all
9114 three stacks, instead of allocating three blocks; this typically is
9115 faster and reduces fragmentation.
9116
9117 Do not limit the number of items in the stack to a value that fits
9118 in 'int', as this is an arbitrary limit on hosts with 64-bit
9119 size_t and 32-bit int.
9120
147e184c
MA
91212001-11-29 Marc Autret <autret_m@epita.fr>
9122
9123 * tests/calc.at [AT_DATA_CALC_Y]: Use %error-verbose instead
9124 of defining YYERROR_VERBOSE.
9125 [AT_DATA]: $4 is now out of C declarations in the prologue.
9126
426cf563
MA
91272001-11-28 Marc Autret <autret_m@epita.fr>
9128
9129 * src/reader.c (parse_dquoted_param): New.
9130 (parse_skel_decl): Use it.
9131 * src/lex.h: Add its prototype.
9132 * src/lex.c (literalchar): Become not static.
9133
c7925b99
MA
91342001-11-28 Marc Autret <autret_m@epita.fr>
9135
9136 * src/output.h: And put its extern declaration here.
9137 * src/output.c (error_verbose): Define here.
9138 (prepare): Echo name modification.
9139 * src/getargs.h: Clean its extern declaration.
9140 * src/getargs.c (error_verbose_flag): Remove.
9141 (getargs): Remove case 'e'.
9142 * src/options.c (option_table): 'error-verbose' is now seen as simple
9143 percent option.
9144 Include output.h.
9145
9146 * src/reader.c (read_declarations): Remove case tok_include.
9147 (parse_include_decl): Remove.
9148 * src/lex.h (token_t): Remove tok_include.
9149 * src/options.c (option_table): 'include' is now a simple command line
9150 option.
9151
5b5d1929
MA
91522001-11-28 Marc Autret <autret_m@epita.fr>
9153
9154 * src/bison.simple: Adjust muscle names.
9155 * src/muscle_tab.c (muscle_init): Also rename the muscles.
9156 * src/output.c (prepare): s/_/-/ for the muscles names.
9157 (output_parser): When scanning for a muscle, allow '-' instead of '_'.
9158
8850be4b
MA
91592001-11-28 Marc Autret <autret_m@epita.fr>
9160
9161 * src/bison.simple: Fix debug.
9162 [YYERROR_VERBOSE]: Re-integrate as an internal macro.
9163
4a38e613
AD
91642001-11-28 Akim Demaille <akim@epita.fr>
9165
9166 * src/LR0.c (shifts_new): New.
9167 (save_shifts, insert_start_shift, augment_automaton): Use it.
9168
4b35e1c1
AD
91692001-11-28 Akim Demaille <akim@epita.fr>
9170
9171 * src/closure.c (closure): `b' and `ruleno' denote the same value:
9172 keep ruleno only.
9173
d2b04478
AD
91742001-11-28 Akim Demaille <akim@epita.fr>
9175
9176 * src/closure.c (closure): Instead of looping over word in array
9177 then bits in words, loop over bits in array.
9178
2c4c30aa
AD
91792001-11-28 Akim Demaille <akim@epita.fr>
9180
9181 * src/closure.c (closure): No longer optimize the special case
9182 where all the bits of `ruleset[r]' are set to 0, to make the code
9183 clearer.
9184
576890b7
AD
91852001-11-28 Akim Demaille <akim@epita.fr>
9186
9187 * src/closure.c (closure): `r' and `c' are new variables, used to
9188 de-obfuscate accesses to RULESET and CORE.
9189
cb487d7d
AD
91902001-11-28 Akim Demaille <akim@epita.fr>
9191
9192 * src/reduce.c (reduce_print): Use ngettext.
9193 (dump_grammar): Improve the trace accuracy.
9194
6013d43f
AD
91952001-11-28 Akim Demaille <akim@epita.fr>
9196
9197 * src/reduce.c (dump_grammar): Don't translate trace messages.
9198
cb4956ee
AD
91992001-11-28 Akim Demaille <akim@epita.fr>
9200
9201 * tests/reduce.at (Useless Terminals, Useless Nonterminals): New.
9202 * src/reduce.c (reduce_grammar_tables): Do not free useless tags,
9203 as all tags are free'ed afterwards.
9204 From Enrico Scholz.
9205
648185ab
PE
92062001-11-27 Paul Eggert <eggert@twinsun.com>
9207
9208 * src/bison.simple (YYSTACK_REALLOC): Fix typo that caused us to
9209 use alloca when we didn't want to, and vice versa.
9210
68254a03
MA
92112001-11-27 Marc Autret <autret_m@epita.fr>
9212
9113b58f
AD
9213 * src/muscle_tab.c (muscle_init): Remove 'verbose' muscle
9214 initialization.
68254a03
MA
9215 * src/output.c (prepare): Remove its update.
9216
04d843a2
MA
92172001-11-27 Marc Autret <autret_m@epita.fr>
9218
9219 * tests/torture.at [AT_DATA]: Remove YYERROR_VERBOSE definition.
9220 Use %error-verbose.
9221
d2079671 92222001-11-27 Marc Autret <autret_m@epita.fr>
eeeb962b
MA
9223
9224 * src/bison.simple: Remove YYERROR_VERBOSE using.
9225 Use %%error_verbose.
9226 (yyparse): Likewise.
9227 * src/output.c (prepare): Give its final value.
9228 * src/muscle_tab.c (muscle_init): Init new muscle 'error_verbose'.
9229 * src/getargs.h: Add its extern declaration.
9230 * src/getargs.c (error_verbose_flag): New int.
9231 (getargs): Update to catch new case.
9232 * src/options.c (option_table): 'error-verbose' is a new option.
9233 (shortopts): Update.
9234
e0327bc8
AD
92352001-11-27 Akim Demaille <akim@epita.fr>
9236
9237 * src/system.h: Use intl/libgettext.h.
9238 * src/Makefile.am (INCLUDES): Add -I $(top_srcdir).
9239
000f1a3c
AD
92402001-11-27 Akim Demaille <akim@epita.fr>
9241
9242 * tests/torture.at (Exploding the Stack Size with Malloc):
9243 s/YYSTACK_USE_ALLOCA_ALLOCA/YYSTACK_USE_ALLOCA/.
9244
26cfe0be
AD
92452001-11-27 Akim Demaille <akim@epita.fr>
9246
9247 * src/files.c: Include error.h.
9248 Reported by Hans Aberg.
9249
f6bd5427
MA
92502001-11-26 Marc Autret <autret_m@epita.fr>
9251
d2079671 9252 * src/reader.c (parse_include_decl): New, not yet implemented.
f6bd5427
MA
9253 (read_declarations): Add case tok_include.
9254 * src/getargs.h (include): Add its extern definition.
9255 * src/getargs.c (include): New const char *.
9256 (getargs): Add case '-I'.
9257 * src/options.c (option_table): Add include as command line and
9258 percent option.
9259 * src/lex.h (token_t): Add tok_include.
9260
2ca209c1
AD
92612001-11-26 Akim Demaille <akim@epita.fr>
9262
9263 * src/reader.c (readgram): Make sure rules for mid-rule actions
9264 have a lineno equal to that of their host rule.
9265 Reported by Hans Aberg.
9266 * tests/regression.at (Rule Line Numbers): New.
9267
0e41b407
AD
92682001-11-26 Akim Demaille <akim@epita.fr>
9269
9270 * src/LR0.c (allocate_itemsets): kernel_size contains ints, not
9271 size_ts.
9272
92732001-11-26 Akim Demaille <akim@epita.fr>
9274
9275 * src/complain.c, src/complain.h (error): Remove, provided by
9276 lib/error.[ch].
9277
e0c40012
AD
92782001-11-26 Akim Demaille <akim@epita.fr>
9279
9280 * src/reader.c (read_declarations): Don't abort on tok_illegal,
9281 issue an error message.
9282 * tests/regression.at (Invalid %directive): New.
9283 Reported by Hans Aberg.
9284
5e147124
AD
92852001-11-26 Akim Demaille <akim@epita.fr>
9286
9287 * configure.in: Invoke AC_FUNC_OBSTACK and AC_FUNC_ERROR_AT_LINE.
9288 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
9289
a034c8b8
AD
92902001-11-26 Akim Demaille <akim@epita.fr>
9291
9292 * src/conflicts.c (conflicts_print): Don't complain at all when
9293 there are no reduce/reduce conflicts, and as many shift/reduce
9294 conflicts as expected.
9295 * tests/regression.at (%expect right): Adjust.
9296
c64a20f3
AD
92972001-11-23 Akim Demaille <akim@epita.fr>
9298
9299 * lib/alloca.c: Update, from fileutils.
9300
5b0d29bb
AD
93012001-11-23 Akim Demaille <akim@epita.fr>
9302
9303 * lib/Makefile.am (libbison_a_LIBADD): Add @ALLOCA@.
9304
722c4bfe
AD
93052001-11-23 Akim Demaille <akim@epita.fr>
9306
9307 * src/system.h: Include alloca.h.
9308 * src/main.c (main) [C_ALLOCA]: Call alloca (0).
9309
6255b435
AD
93102001-11-23 Akim Demaille <akim@epita.fr>
9311
9312 * src/print_graph.c (print_actions): Remove `rule', unused.
9313 * src/LR0.c (kernel_size): Contain `int' instead of `size_t' to
9314 pacify GCC's signed < unsigned warnings.
9315 * src/closure.c (itemsetsize): Likewise.
9316 * src/reader.c (symbol_list_new): Static.
9317
b29b2ed5
AD
93182001-11-23 Akim Demaille <akim@epita.fr>
9319
9320 Attaching lineno to buckets is stupid, since only one copy of each
9321 symbol is kept, only the line of the first occurrence is kept too.
9322
9323 * src/symtab.h, src/symtab.c (bucket): Remove the line member.
9324 * src/reader.c (rline_allocated): Remove, unused.
9325 (symbol_list): Have a `line' member.
9326 (symbol_list_new): New.
9327 (readgram): Use it.
9328 * src/print.c (print_grammar): Output the rule line numbers.
9329 * tests/regression.at (Solved SR Conflicts)
9330 (Unresolved SR Conflicts): Adjust.
9331 Reported by Hans Aberg.
9332
a81b1d4a
MA
93332001-11-22 Marc Autret <autret_m@epita.fr>
9334
9335 * src/bison.simple [YYERROR_VERBOSE]: Force its value to be 1 or 0.
9336
c1ecb3c1
MA
93372001-11-22 Marc Autret <autret_m@epita.fr>
9338
9339 * src/muscle_tab.c (muscle_init): Remove initialization of
9340 skeleton muscle.
9341 * src/output.c (output_master_parser): Do it here.
9342
fbe01355
AD
93432001-11-20 Akim Demaille <akim@epita.fr>
9344
9345 * po/sv.po: New.
9346 * configure.in (ALL_LINGUAS): Adjust.
9347 * po/POTFILE.in: Remove `nullable.c' and `derives.c' which no
9348 longer contains strings to translate.
9349
81e895c0
AD
93502001-11-19 Akim Demaille <akim@epita.fr>
9351
9352 * src/conflicts.c (conflicts_print): Add a missing \n.
9353
6bb1878b
AD
93542001-11-19 Akim Demaille <akim@epita.fr>
9355
9356 * src/nullable.c (nullable_print): New.
9357 (set_nullable): Call it when tracing.
9358 Better locality of variables.
9359
d9ec2d07
AD
93602001-11-19 Akim Demaille <akim@epita.fr>
9361
9362 * src/print.c (print_actions): Better locality of variables.
9363
720e5c1b
AD
93642001-11-19 Akim Demaille <akim@epita.fr>
9365
9366 * src/derives.c (print_derives): Fix and enrich.
9367 * src/closure.c (print_fderives): Likewise.
9368
fb908786
AD
93692001-11-19 Akim Demaille <akim@epita.fr>
9370
9371 * src/closure.c (itemsetend): Remove, replaced with...
9372 (itemsetsize): new.
9373
125ecb56
AD
93742001-11-19 Akim Demaille <akim@epita.fr>
9375
9376 * src/LR0.c (kernel_end): Remove, replaced with...
9377 (kernel_size): new.
9378
d8cf039f
AD
93792001-11-19 Akim Demaille <akim@epita.fr>
9380
9381 * src/conflicts.c (set_conflicts): Use arrays instead of pointers
9382 to clarify.
9383
7bec0760
AD
93842001-11-19 Akim Demaille <akim@epita.fr>
9385
9386 * src/closure.c (closure): Use arrays instead of pointers to clarify.
9387
c87d4863
AD
93882001-11-19 Akim Demaille <akim@epita.fr>
9389
9390 * src/closure.c, src/derives.c, src/nullable.c: Adjust various
9391 trace messages.
9392 * src/LR0.c: Likewise.
9393 (allocate_itemsets): Use arrays instead of pointers to clarify.
9394
9bfe901c
AD
93952001-11-19 Akim Demaille <akim@epita.fr>
9396
9397 * src/getargs.c (statistics_flag): Replace with...
9398 (trace_flag): New.
9399 (longopts): Accept --trace instead of --statistics.
9400 * src/getargs.h, src/options.c: Adjust.
9401 * src/LR0.c, src/closure.c, src/derives.c, src/nullable.c,
9402 * src/reduce.c: Use trace_flags instead of the CPP conditional TRACE.
9403
97db7bd4
AD
94042001-11-19 Akim Demaille <akim@epita.fr>
9405
cc72668c 9406 * src/LR0.c (new_itemsets, get_state): Use more arrays and fewer
97db7bd4
AD
9407 pointers to clarify the code.
9408 (save_reductions, save_shifts): Factor common parts of alternatives.
9409
2c5f66ed
AD
94102001-11-19 Akim Demaille <akim@epita.fr>
9411
9412 * src/LR0.c (new_state, get_state): Complete TRACE code.
9413 * src/closure.c: Include `reader.h' to get `tags', needed by the
9414 trace code.
9415 Rename the conditional DEBUG as TRACE.
9416 Output consistently TRACEs to stderr, not stdout.
9417 * src/derives.c: Likewise.
9418 * src/reduce.c: (inaccessable_symbols): Using if is better style
9419 than goto.
9420 Use `#if TRACE' instead of `#if 0' for tracing code.
9421
300f275f
AD
94222001-11-19 Akim Demaille <akim@epita.fr>
9423
9424 * src/system.h (LIST_FREE, shortcpy): New.
9425 * src/LR0.c: Use them.
9426 * src/output.c (free_itemsets, free_reductions, free_shifts):
9427 Remove, replaced by LIST_FREE.
9428
f59c437a
AD
94292001-11-19 Akim Demaille <akim@epita.fr>
9430
9431 * src/state.h (CORE_ALLOC, SHIFTS_ALLOC, ERRS_ALLOC)
9432 (REDUCTIONS_ALLOC): New.
9433 * src/LR0.c, src/conflicts.c: Use them to de-obfuscate memory
9434 allocation.
9435
6986fd9e
AD
94362001-11-19 Akim Demaille <akim@epita.fr>
9437
9438 * src/LR0.c (new_state): Complete trace code.
9439 * src/nullable.c (set_nullable): Don't translate traces.
9440
4bc30f78
AD
94412001-11-19 Akim Demaille <akim@epita.fr>
9442
9443 * src/print_graph.c (print_core): Better locality of variables.
9444 * src/print.c (print_core): Likewise.
9445
08a946e0
AD
94462001-11-19 Akim Demaille <akim@epita.fr>
9447
9448 * src/vcg.c: You do the output, so you are responsible of the
9449 handling of VCG syntax, in particular: use quotearg.
9450 * src/print_graph.c: Don't.
9451 (print_actions): Don't output the actions as part of the nodes,
9452 since that's the job of the edges.
9453 (print_state): Don't output by hand: fill the node description,
9bfe901c 9454 and ask for its output.
08a946e0 9455
f0473484
AD
94562001-11-19 Akim Demaille <akim@epita.fr>
9457
cc72668c
AD
9458 * src/bison.simple (yyparse): When verbosely reporting an error,
9459 no longer put additional quotes around token names.
f0473484
AD
9460 * tests/calc.at: Adjust.
9461
e41dc700
AD
94622001-11-19 Akim Demaille <akim@epita.fr>
9463
9464 * src/symtab.h, src/symtab.c: `line' is a new member of `bucket'.
9465 * src/reader.c (record_rule_lines, rline, rline_allocated): Remove.
9466 * src/output.c: Adjust.
9467
652a871c
AD
94682001-11-19 Akim Demaille <akim@epita.fr>
9469
9470 * src/gram.h (rprec, rprecsym, rassoc): Remove, now part of...
9471 (rule_t): this.
9472 * src/conflicts.c, src/reader.c, src/reduce.c: Adjust.
9473
b2ed6e58
AD
94742001-11-19 Akim Demaille <akim@epita.fr>
9475
9476 * src/gram.h (rule_t): New.
9477 (rule_table): New.
9478 (rrhs, rlhs): Remove, part of state_t.
9479 * src/print_graph.c, src/closure.c, src/conflicts.c, src/derives.c,
9480 * src/lalr.c, src/nullable.c, src/output.c, src/print.c,
9481 * src/reader.c, src/reduce.c: Adjust.
9482
edad7067
AD
94832001-11-19 Akim Demaille <akim@epita.fr>
9484
9485 * src/reader.c (symbols_output): New, extracted from...
9486 (packsymbols): Here.
9487 (reader): Call it.
9488
3feec034
AD
94892001-11-19 Akim Demaille <akim@epita.fr>
9490
9491 * src/lalr.c (set_maxrhs, maxrhs): Remove, replaced with...
9492 (maxrhs): this new function.
9493
ddcd5fdf
AD
94942001-11-19 Akim Demaille <akim@epita.fr>
9495
cc72668c 9496 * src/lalr.c (F): New macro to access the variable F.
ddcd5fdf
AD
9497 Adjust.
9498
bb527fc2
AD
94992001-11-19 Akim Demaille <akim@epita.fr>
9500
cc72668c 9501 * src/lalr.h (LA): New macro to access the variable LA.
bb527fc2
AD
9502 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
9503 * src/lalr.c: Adjust.
9504
a845a697
AD
95052001-11-19 Akim Demaille <akim@epita.fr>
9506
9507 * src/lalr.c (initialize_LA): Only initialize LA. Let...
9508 (set_state_table): handle the `lookaheads' members.
9509
f004bf6a
AD
95102001-11-19 Akim Demaille <akim@epita.fr>
9511
cc72668c
AD
9512 * src/lalr.h (lookaheads): Removed array, whose contents is now
9513 a member of...
f004bf6a
AD
9514 (state_t): this structure.
9515 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
9516 Adjust.
9517
de326cc0
AD
95182001-11-19 Akim Demaille <akim@epita.fr>
9519
cc72668c
AD
9520 * src/lalr.h (consistent): Removed array, whose contents is now
9521 a member of...
de326cc0
AD
9522 (state_t): this structure.
9523 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
9524 Adjust.
9525
90b4416b
AD
95262001-11-19 Akim Demaille <akim@epita.fr>
9527
cc72668c
AD
9528 * src/lalr.h (reduction_table, shift_table): Removed arrays, whose
9529 contents are now members of...
90b4416b
AD
9530 (state_t): this structure.
9531 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
9532 Adjust.
9533
9703cc49
AD
95342001-11-19 Akim Demaille <akim@epita.fr>
9535
9536 * src/lalr.h (state_t): New.
9537 (state_table): Be a state_t * instead of a core **.
9538 (accessing_symbol): Remove, part of state_t.
9539 * src/lalr.c: Adjust.
9540 (set_accessing_symbol): Merge into...
9541 (set_state_table): this.
9542 * src/print_graph.c, src/conflicts.c: Adjust.
9543
d803322e
AD
95442001-11-14 Akim Demaille <akim@epita.fr>
9545
9546 * tests/calc.at, tests/output.at, tests/regression.at,
9547 * tests/testsuite.at, tests/torture.at: Rely on Autotest 2.52g:
9548 now the tests are run in private dirs, therefore AC_CLEANUP and
9549 family can be simplified to 0-ary.
9550 * tests/atlocal.in: Now that we run `elsewhere' than in tests/,
9551 use abs. path to find config.h.
9552 * tests/calc.at (AT_CHECK_CALC): Don't try to check the compiler's
9553 stderr, there can be way too much random noise.
9554 Instead pass -Werror to GCC and rely on the exit status.
9555 Reported by Wolfram Wagner.
9556
3d76b07d
AD
95572001-11-14 Akim Demaille <akim@epita.fr>
9558
9559 * src/bison.simple (yyparse): Let yyls1, yyss1 and yyvs1 be
9560 defined only if yyoverflow is defined, to avoid `warning: unused
9561 variable `yyvs1''.
9562 Reported by The Test Suite.
9563
09b503c8
AD
95642001-11-14 Akim Demaille <akim@epita.fr>
9565
9566 * src/print.c: Include reduce.h.
9567 Reported by Hans Aberg.
9568
95692001-11-14 Akim Demaille <akim@epita.fr>
9570
9571 * src/lex.c, src/lex.h (token_buffer, unlexed_token_buffer):
9572 Revert a previous patch: these are really const.
9573 * src/conflicts.c (conflict_report): Additional useless pair of
9574 braces to pacify GCC's warnings for `if () if () {} else {}'.
9575 * src/lex.c (parse_percent_token): Replace equal_offset with
9576 arg_offset.
9577 arg is const.
9578 Be sure to strdup `arg' when used, since there is no reason for
9579 token_buffer not to change.
9580
0f37a994
AD
95812001-11-14 Akim Demaille <akim@epita.fr>
9582
9583 * src/system.h (EXIT_SUCCESS, EXIT_FAILURE): Ensure a proper
9584 definition.
9585 * src/main.c (main): Use them.
9586 Suggested by Hans Aberg.
9587
d39d93b8
AD
95882001-11-12 Akim Demaille <akim@epita.fr>
9589
9590 * src/system.h (ngettext): Now that we use ngettext, be sure to
9591 provide a default definition when NLS are not used.
9592
9edcd895
AD
95932001-11-12 Akim Demaille <akim@epita.fr>
9594
9595 * doc/bison.texinfo: Use `$' as shell prompt, not `%'.
9596 Use @kbd to denote user input.
9597 (Language and Grammar): ANSIfy the example.
9598 Adjust its layout for info/notinfo.
9599 (Location Tracking Calc): Output error messages to stderr.
9600 Output locations in a more GNUtically correct way.
9601 Fix a couple of Englishos.
9602 Adjust @group/@end group pairs.
9603
7da99ede
AD
96042001-11-12 Akim Demaille <akim@epita.fr>
9605
e3aa65c5 9606 %expect was not functioning at all.
7da99ede
AD
9607
9608 * src/conflicts.c (expected_conflicts): Set to -1.
9609 (conflict_report): Use ngettext.
9610 (conflicts_print): Check %expect and make its violation an error.
9611 * doc/bison.texinfo (Expect Decl): Adjust.
9612 * configure.in (AM_GNU_GETTEXT): Ask for ngettext.
9613 * tests/regression.at (%expect not enough, %expect right)
9614 (%expect too much): New.
9615
ba9dda1a
AD
96162001-11-12 Akim Demaille <akim@epita.fr>
9617
9618 * tests/regression.at (Conflicts): Rename as...
9619 (Unresolved SR Conflicts): this.
9620 (Solved SR Conflicts): New.
9621
337c5bd1
AD
96222001-11-12 Akim Demaille <akim@epita.fr>
9623
9624 * src/reduce.c (print_results): Rename as...
9625 (reduce_output): This.
9626 Output to OUT, passed as argument, instead of output_obstack.
9627 (dump_grammar): Likewise.
9628 (reduce_free): New.
9629 Also free V1.
9630 (reduce_grammar): No longer call reduce_output, since...
9631 * src/print.c (print_results): do it.
9632 * src/main.c (main): Call reduce_free;
9633
c73a41af
AD
96342001-11-12 Akim Demaille <akim@epita.fr>
9635
9636 * src/conflicts.c (print_reductions): Accept OUT as argument.
9637 Output to it, not to output_obstack.
9638 * src/print.c (print_actions): Adjust.
9639
0df87bb6
AD
96402001-11-12 Akim Demaille <akim@epita.fr>
9641
9642 * src/conflicts.c (count_sr_conflicts, count_rr_conflicts): Return
9643 the result instead of using...
9644 (src_total, rrc_total, src_count, rrc_count): Remove.
9645 (any_conflicts): Remove.
9646 (print_conflicts): Split into...
9647 (conflicts_print, conflicts_output): New.
9648 * src/conflicts.h: Adjust.
9649 * src/main.c (main): Invoke both conflicts_output and conflicts_print.
0f37a994 9650 * src/print.c (print_grammar): Issue `\n' between two rules.
0df87bb6
AD
9651 * tests/regression.at (Conflicts): New.
9652 Reported by Tom Lane.
9653
e4d3d4de
AD
96542001-11-12 Akim Demaille <akim@epita.fr>
9655
9656 * tests/regression.at (Invalid input): Remove, duplicate with
9657 ``Invalid input: 1''.
9658
6d7d248e
AD
96592001-11-12 Akim Demaille <akim@epita.fr>
9660
9661 * tests/torture.at (AT_DATA_STACK_TORTURE)
9662 (Exploding the Stack Size with Alloca)
9663 (Exploding the Stack Size with Malloc): New.
9664
e9e4c321
AD
96652001-11-12 Akim Demaille <akim@epita.fr>
9666
9667 * src/bison.simple (YYSTACK_REALLOC): New.
9668 (yyparse) [!yyoverflow]: Use it and free the old stack.
0f37a994 9669 Reported by Per Allansson.
e9e4c321 9670
5f7e0832
AD
96712001-11-12 Pascal Bart <pascal.bart@epita.fr>
9672
9673 * src/bison.simple: Define type yystype instead of YYSTYPE, and
9674 define CPP macro, which substitute YYSTYPE by yystype.
9675 * src/reader.c (parse_union_decl): Output yystype/YYSTYPE as we do
9676 with yyltype/YYLTYPE. This allows inclusion of the generated
9677 header within the parser if the compiler, such as GGC, accepts
9678 multiple equivalent #defines.
9679 From Akim.
9680
e3f1699f
AD
96812001-11-05 Akim Demaille <akim@epita.fr>
9682
9683 * src/reader.c (symbols_output): New, extracted from...
9684 (packsymbols): here.
9685 (reader): Adjust.
9686
65be0866
AD
96872001-11-05 Akim Demaille <akim@epita.fr>
9688
9689 * src/lex.c (parse_percent_token): s/quotearg/quote/.
9690
e4d910bf
AD
96912001-11-05 Akim Demaille <akim@epita.fr>
9692
9693 * tests/regression.at (AT_TEST_CPP_GUARD_H): Adjust the clean up
9694 pattern.
9695
951366c1
AD
96962001-11-05 Akim Demaille <akim@epita.fr>
9697
9698 * src/options.h (struct option_table_struct): set_flags is void*.
9699 * src/options.c (longopts): Support `--output' and `%output'.
9700 (usage): Adjust.
9701 * src/lex.h (tok_setopt): Remove, replaced with...
9702 (tok_intopt, tok_stropt): these new guys.
9703 * src/lex.c (getopt.h): Not needed.
9704 (token_buffer, unlexed_token_buffer): Not const.
9705 (percent_table): Promote `-' over `_' in directive names.
9706 Active `%name-prefix', `file-prefix', and `output'.
9707 (parse_percent_token): Accept possible arguments to directives.
9708 Promote `-' over `_' in directive names.
9709
d8988b2f
AD
97102001-11-04 Akim Demaille <akim@epita.fr>
9711
9712 * doc/bison.texinfo (Decl Summary): Split the list into
9713 `directives for grammars' and `directives for bison'.
9714 Sort'em.
9715 Add description of `%name-prefix', `file-prefix', and `output'.
9716 Promote `-' over `_' in directive names.
9717 (Bison Options): s/%locactions/%locations/. Nice Freudian slip.
9718 Simplify the description of `--name-prefix'.
9719 Promote `-' over `_' in directive names.
9720 Promote `--output' over `--output-file'.
9721 Fix the description of `--defines'.
9722 * tests/output.at: Exercise %file-prefix and %output.
9723
6468d18e
AD
97242001-11-02 Akim Demaille <akim@epita.fr>
9725
9726 * doc/refcard.tex: Update.
9727
6b7e85b9
AD
97282001-11-02 Akim Demaille <akim@epita.fr>
9729
9730 * src/symtab.h (SUNDEF): New.
9731 * src/symtab.c (bucket_new): Init user_token_number to SUNDEF to
9732 stand for `uninitialized', instead of 0.
9733 * src/reader.c (packsymbols, parse_thong_decl): Adjust.
9734 * src/lex.c (lex): Adjust.
9735
9736 * tests/calc.at (_AT_DATA_CALC_Y): Declare a token for EOF.
9737 Number it 0.
9738 Let yylex return it instead of a plain 0.
9739 Reported by Dick Streefland.
9740
cd5aafcf
AD
97412001-11-02 Akim Demaille <akim@epita.fr>
9742
9743 * tests/regression.at (Mixing %token styles): New test.
9744
037ca2f1
AD
97452001-11-02 Akim Demaille <akim@epita.fr>
9746
9747 * src/reader.c (parse_thong_decl): Formatting changes.
9748 (token_translations_init): New, extracted from...
9749 (packsymbols): Here.
9750 Adjust.
9751
270a173c
AD
97522001-11-01 Akim Demaille <akim@epita.fr>
9753
9754 * tests/regression.at (AT_TEST_CPP_GUARD_H): New.
9755 Check that `9foo.y' produces correct cpp guards.
9756 * src/files.c (compute_header_macro): Prepend `BISON_' to CPP
9757 guards.
9758 Reported by Wwp.
9759
561f9a30
AD
97602001-11-01 Akim Demaille <akim@epita.fr>
9761
9762 * tests/regression.at (Invalid input: 2): New.
9763 * src/lex.c (unlexed_token_buffer): New.
9764 (lex, unlex): Adjust: when unlexing, be sure to save token_buffer
9765 too.
9766 Reported by Wwp.
9767
f987e9d2
AD
97682001-11-01 Akim Demaille <akim@epita.fr>
9769
9770 * tests/calc.at: Catch up with 1.30.
9771 * configure.in: Bump to 1.49a.
9772 Adjust to newer Autotest.
9773
0846f581
PB
97742001-10-19 Pascal Bart <pascal.bart@epita.fr>
9775
9776 * src/conflicts.c: Move global variables rrc_total and src_total ...
9777 (print_conflicts): here.
9778 * src/output.c (output): Free global variable user_toknums.
9779 * src/lex.c (token_obstack): Become static.
9780
3c1a79b3
AD
97812001-10-18 Akim Demaille <akim@epita.fr>
9782
9783 * tests/atlocal.in (GCC): Add.
9784 * tests/calc.at: s/m4_match/m4_bmatch/.
9785 s/m4_patsubst/m4_bpatsubst/.
9786 (AT_CHECK_CALC): Check the compiler's stderr only if it's GCC.
9787 * configure.in: AC_SUBST(GCC).
9788
5d52e7d0
MA
97892001-10-14 Marc Autret <autret_m@epita.fr>
9790
9791 * src/options.c (create_long_option_table): Fix.
9792
631aa1d3
AD
97932001-10-10 Akim Demaille <akim@epita.fr>
9794
9795 * src/bison.simple: Be sure to set YYSTACK_USE_ALLOCA.
9796
f6ec6d13
AD
97972001-10-04 Akim Demaille <akim@epita.fr>
9798
9799 * src/reader.c (parse_union_decl): Push the caracters in
9800 union_obstack, not attrs_obstack.
9801
342b8b6e
AD
98022001-10-04 Akim Demaille <akim@epita.fr>
9803
9804 Merge in the branch 1.29.
9805
9806 * src/reader.c (packsymbols): Use a temporary obstack for
9807 `%%tokendef', since output_stack is already used elsewhere.
9808
9809 2001-10-02 Akim Demaille <akim@epita.fr>
9810
9811 Bump 1.29d.
9812
9813 2001-10-02 Akim Demaille <akim@epita.fr>
9814
9815 Version 1.29c.
9816
9817 2001-10-02 Akim Demaille <akim@epita.fr>
9818
9819 * tests/regression.at (Invalid CPP headers): New.
9820 From Alexander Belopolsky.
9821 * src/files.c (compute_header_macro): Map non alnum chars to `_'.
9822
9823 2001-10-02 Akim Demaille <akim@epita.fr>
9824
9825 * tests/regression.at (Invalid input): New.
9826 * src/lex.c (lex): Be sure to set `token_buffer' in any case.
9827 Reported by Shura.
9828
9829 2001-10-02 Akim Demaille <akim@epita.fr>
9830
9831 * tests/calc.at: Now that --debug works, the tests must be adjusted.
9832
9833 2001-10-02 Akim Demaille <akim@epita.fr>
9834
9835 * src/output.c (output_parser): Assert `skeleton'.
9836 * src/files.c (skeleton_find): Look harder for skeletons on DOSish
9837 systems.
9838 From Shura.
9839
9840 2001-10-01 Marc Autret <autret_m@epita.fr>
9841
9842 * src/lex.h: Echo modifications.
9843 * src/lex.c (unlex): Parameter is now token_t.
9844 From Hans Aberg.
9845
9846 2001-10-01 Marc Autret <autret_m@epita.fr>
9847
9848 * src/main.c: Include lex.h.
9849 From Hans Aberg.
9850
9851 2001-09-29 Akim Demaille <akim@epita.fr>
9852
9853 * src/getargs.c (longopts): `--debug' is `-t', not `-d'.
9854
9855 2001-09-28 Akim Demaille <akim@epita.fr>
9856
9857 * tests/testsuite.at: Update to newer Autotest.
9858 * tests/Makefile.am (EXTRA_DIST): bison is not to be shipped.
9859
9860 2001-09-27 Akim Demaille <akim@epita.fr>
9861
9862 Position independent wrapper.
9863
9864 * tests/bison: Remove.
9865 * tests/bison.in: New.
9866 * configure.in: Adjust.
9867
9868 2001-09-27 Paul Eggert <eggert@twinsun.com>
9869
9870 Port quotearg fixes from tar 1.13.24.
9871
9872 * lib/quotearg.c: BSD/OS 4.1 wchar.h requires FILE and struct
9873 tm to be declared.
9874 (HAVE_MBSINIT): Undef if !HAVE_MBRTOWC.
9875 (mbsinit): Define to 1 if !defined mbsinit && !HAVE_MBSINIT.
9876
9877 * m4/Makefile.am (EXTRA_DIST): Add mbrtowc.m4.
9878 * m4/mbrtowc.m4: New file.
9879 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Check for mbsinit and stddef.h.
9880 Use jm_FUNC_MBRTOWC instead of AC_CHECK_FUNCS(mbrtowc).
9881
9882 2001-09-27 Akim Demaille <akim@epita.fr>
9883
9884 Bump to 1.29c.
9885
9886 2001-09-27 Akim Demaille <akim@epita.fr>
9887
9888 Version 1.29b.
9889
9890 2001-09-25 Akim Demaille <akim@epita.fr>
9891
9892 * src/system.h: Include `xalloc.h'.
9893 Remove it from the C files.
9894 * src/files.c (output_files): Free the obstacks.
9895 * src/lex.c (init_lex): Rename as...
9896 (lex_init): this.
9897 (lex_free): New.
9898 * src/main.c (main): Use it.
9899
9900 2001-09-24 Marc Autret <autret_m@epita.fr>
9901
9902 * src/vcg.c (open_edge, close_edge, open_node, close_node): Change
9903 to output informations in fout (FILE*).
9904 (open_graph, close_graph): Likewise.
9905 (output_graph, output_edge, output_node): Likewise.
9906 * src/vcg.h: Update function prototypes.
9907 * src/print_graph.c (print_graph): Open output graph file.
9908 (print_actions): Adjust.
9909 * src/files.h: Remove extern declaration.
9910 * src/files.c: Remove graph_obstack declaration.
9911 (open_files): Remove graph_obstack initialization.
9912 (output_files): Remove graph_obstack saving.
9913
9914 2001-09-24 Marc Autret <autret_m@epita.fr>
9915
9916 * src/files.c (compute_output_file_names): Fix.
9917
9918 2001-09-24 Marc Autret <autret_m@epita.fr>,
9919 Akim Demaille <akim@epita.fr>
9920
9921 * src/reader.c (reader): Remove call to free_symtab ().
9922 * src/main.c (main): Call it here.
9923 Include symtab.h.
9924 * src/conflicts.c (initialize_conflicts): Rename as...
9925 (solve_conflicts): this.
9926 * src/print.c (print_core, print_actions, print_state)
9927 (print_grammar): Dump to a file instead a `output_obstack'.
9928 (print_results): Dump `output_obstack', and then proceed with the
9929 FILE *.
9930 * src/files.c (compute_output_file_names, close_files): New.
9931 (output_files): Adjust.
9932 * src/main.c (main): Adjust.
9933
9934 2001-09-23 Marc Autret <autret_m@epita.fr>
9935
9936 * src/files.c (compute_header_macro): Computes header macro name
9937 from spec_defines_file when given.
9938
9939 2001-09-23 Marc Autret <autret_m@epita.fr>
9940
9941 * src/files.c (output_files): Add default extensions.
9942
9943 2001-09-22 Akim Demaille <akim@epita.fr>
9944
9945 * src/conflicts.c (finalize_conflicts): Rename as...
9946 (free_conflicts): this.
9947
9948 2001-09-22 Akim Demaille <akim@epita.fr>
9949
9950 * src/gram.c (gram_free): Rename back as...
9951 (dummy): this.
9952 (output_token_translations): Free `token_translations'.
9953 * src/symtab.c (free_symtab): Free the tag field.
9954
9955 2001-09-22 Akim Demaille <akim@epita.fr>
9956
9957 Remove `translations' as it is always set to true.
9958
9959 * src/gram.h: Adjust.
9960 * src/reader.c (packsymbols, parse_token_decl): Adjust
9961 * src/print.c (print_grammar): Adjust.
9962 * src/output.c (output_token_translations): Adjust.
9963 * src/lex.c (lex): Adjust.
9964 * src/gram.c: Be sure the set pointers to NULL.
9965 (dummy): Rename as...
9966 (gram_free): this.
9967
9968 2001-09-22 Akim Demaille <akim@epita.fr>
9969
9970 * configure.in: Invoke AM_LIB_DMALLOC.
9971 * src/system.h: Use dmalloc.
9972 * src/LR0.c: Be sure to have pointers initialized to NULL.
9973 (allocate_itemsets): Allocate kernel_items only if needed.
9974
9975 2001-09-22 Akim Demaille <akim@epita.fr>
9976
9977 * configure.in: Bump to 1.29b.
9978 * tests/Makefile.am (DISTCLEANFILES): Add package.m4.
9979 * tests/calc.at (_AT_DATA_CALC_Y): #undef malloc so that we don't
9980 need xmalloc.c in calc.y.
9981 From Pascal Bart.
9982
9983 2001-09-21 Akim Demaille <akim@epita.fr>
9984
9985 Version 1.29a.
9986 * Makefile.maint, config/config.guess, config/config.sub,
9987 * config/missing: Update from masters.
9988 * tests/Makefile.am ($(srcdir)/$(TESTSUITE)): No longer depend
9989 upon package.m4.
9990 * configure.in (ALL_LINGUAS): Add `tr'.
9991
9992 2001-09-21 Akim Demaille <akim@epita.fr>
9993
9994 * tests/Makefile.am (package.m4): Move to...
9995 ($(srcdir)/$(TESTSUITE)): here.
9996
9997 2001-09-20 Akim Demaille <akim@epita.fr>
9998
9999 * src/complain.c: No longer try to be standalone: use system.h.
10000 Don't assume __STDC__ is defined to 1. Just test if it is defined.
10001 * src/complain.h: Likewise.
10002 * src/reduce.c (useless_nonterminals, inaccessable_symbols):
10003 Remove the unused variable `n'.
10004 From Albert Chin-A-Young.
10005
10006 2001-09-18 Marc Autret <autret_m@epita.fr>
10007
10008 * doc/bison.1: Update.
10009 * doc/bison.texinfo (Bison Options): Update --defines and --graph
10010 descriptions.
10011 (Option Cross Key): Update.
10012 Add --graph.
10013
10014 2001-09-18 Marc Autret <autret_m@epita.fr>
10015
10016 * tests/regression.at: New test (comment in %union).
10017
10018 2001-09-18 Marc Autret <autret_m@epita.fr>
10019
10020 * src/reader.c (parse_union_decl): Do not output '/'. Let copy_comment
10021 do that.
10022 Reported by Keith Browne.
10023
10024 2001-09-18 Marc Autret <autret_m@epita.fr>
10025
10026 * tests/output.at: Add tests for --defines and --graph.
10027
10028 2001-09-18 Marc Autret <autret_m@epita.fr>
10029
10030 * tests/output.at: Removes tests of %{header,src}_extension features.
10031
10032 2001-09-18 Akim Demaille <akim@epita.fr>
10033
10034 * tests/Makefile.am (package.m4): New.
10035 * tests/calc.at (_AT_CHECK_CALC): Just run `calc input'.
10036 (_AT_CHECK_CALC_ERROR): Likewise.
10037 Factor the `, ' part of verbose error messages.
10038
10039 2001-09-18 Marc Autret <autret_m@epita.fr>
10040
10041 * src/getargs.c (longopts): Declare --defines and --graph as options
10042 with optional arguments.
10043 * src/files.h: Add extern declarations.
10044 * src/files.c (spec_graph_file, spec_defines_file): New.
10045 (output_files): Update.
10046 Remove CPP-outed code.
10047
10048 2001-09-18 Marc Autret <autret_m@epita.fr>
10049
10050 Turn off %{source,header}_extension feature.
10051
10052 * src/files.c (compute_exts_from_gf): Update.
10053 (compute_exts_from_src): Update.
10054 (output_files): CPP-out useless code.
10055 * src/files.h: Remove {header,source}_extension extern declarations.
10056 * src/reader.c (parse_dquoted_param): CPP-out.
10057 (parse_header_extension_decl): Remove.
10058 (parse_source_extension_decl): Remove.
10059 (read_declarations): Remove cases tok_{hdrext,srcext}.
10060 * src/lex.c (percent_table): Remove {header,source}_extension entries.
10061 * src/lex.h (token_t): Remove tok_hdrext and tok_srcext.
10062
10063 2001-09-10 Akim Demaille <akim@epita.fr>
10064
10065 * tests/output.at (AT_CHECK_BISON_FLAGS, AT_CHECK_BISON_PERCENT):
10066 (AT_CHECK_BISON_PERCENT_FLAGS): Merge into...
10067 (AT_CHECK_OUTPUT): this.
10068 Merely check ls' exit status, its output is useless.
10069
10070 2001-09-10 Akim Demaille <akim@epita.fr>
10071
10072 * tests/calc.at: Use m4_match.
10073 (_AT_DATA_CALC_Y): Check `yyin != NULL', not `stdin != NULL'.
10074
10075 2001-09-10 Marc Autret <autret_m@epita.fr>,
10076 Akim Demaille <akim@epita.fr>
10077
10078 * src/vcg.h (graph_s): color, textcolor, bordercolor are now
10079 enum color_e.
10080 * src/print_graph.c (print_graph): Initalize graph.layoutalgorithm
10081 to `normal'.
10082 * src/reader.c (parse_token_decl): Initialize token with tok_eof.
10083 * src/lex.h: Adjust prototype.
10084 (token_t): Add `tok_undef'.
10085 * src/lex.c (struct percent_table_struct): Retval is now a token_t.
10086 (parse_percent_token): Now returns token_t.
10087 Add default statement in switch.
10088 (lex): Separate `c' as an input variable, from the token_t result
10089 part.
10090 (unlexed): Is a token_t.
10091
10092 2001-09-10 Akim Demaille <akim@epita.fr>
10093
10094 * configure.in: Bump to 1.29a.
10095
10096 2001-09-07 Akim Demaille <akim@epita.fr>
10097
10098 Version 1.29.
10099
10100 2001-08-30 Akim Demaille <akim@epita.fr>
10101
10102 * tests/atgeneral.m4, tests/atconfig.in, tests/suite.at: Remove.
10103 * m4/atconfig.m4: Remove.
10104 * tests/testsuite.at, tests/atlocal.in, tests/output.at,
10105 * tests/bison: New.
10106 * tests/regression.at, tests/calc.at: Use m4_define, AT_BANNER,
10107 m4_if, m4_patsubst, and m4_regexp.
10108 * tests/calc.at (_AT_CHECK_CALC, _AT_CHECK_CALC_ERROR): Use an
10109 `input' file instead of echo.
10110
10111 2001-08-29 Akim Demaille <akim@epita.fr>
10112
10113 Bump to 1.28e.
10114
10115 2001-08-29 Akim Demaille <akim@epita.fr>
10116
10117 Version 1.28d.
10118
10119 2001-08-29 Paul Eggert <eggert@twinsun.com>
10120
10121 * src/bison.simple (yyparse): Don't take the address of an
10122 item before the start of an array, as that doesn't conform to
10123 the C Standard.
10124
10125 2001-08-29 Robert Anisko <anisko_r@epita.fr>
10126
10127 * doc/bison.texinfo (Location Tracking Calc): New node.
10128
10129 2001-08-29 Paul Eggert <eggert@twinsun.com>
10130
10131 * src/output.c (output): Do not define const, as this now
10132 causes more problems than it cures.
10133
10134 2001-08-29 Akim Demaille <akim@epita.fr>
10135
10136 * doc/bison.texinfo: Modernize `@node' and `@top' use: just name
10137 the nodes.
10138 Be sure to tag the `detailmenu'.
10139
10140 2001-08-29 Akim Demaille <akim@epita.fr>
10141
10142 * Makefile.maint (do-po-update): Wget refuses to overwrite files:
10143 download in a tmp dir.
10144
10145 2001-08-28 Marc Autret <autret_m@epita.fr>
10146
10147 * config/depcomp: New file.
10148
10149 2001-08-28 Marc Autret <autret_m@epita.fr>
10150
10151 * doc/bison.1 (mandoc): Adjust.
10152 From Juan Manuel Guerrero.
10153
10154 2001-08-28 Marc Autret <autret_m@epita.fr>
10155
10156 * src/print_graph.c (print_state): Fix.
10157
10158 2001-08-27 Marc Autret <autret_m@epita.fr>
10159
10160 * src/vcg.h (classname_s, infoname_s, node_s): Constify the
10161 char * members.
10162 Echo modifications to the functions prototypes.
10163 * src/vcg.c (add_classname, add_infoname): Adjust arguments.
10164
10165 2001-08-27 Marc Autret <autret_m@epita.fr>
10166
10167 * src/vcg.c: Include `xalloc.h'.
10168 (add_colorentry): New.
10169 (add_classname): New.
10170 (add_infoname): New.
10171 * src/vcg.h: Add new prototypes.
10172
10173 2001-08-27 Akim Demaille <akim@epita.fr>
10174
10175 * Makefile.maint: Sync. again with CVS Autoconf.
10176
10177 2001-08-27 Akim Demaille <akim@epita.fr>
10178
10179 * Makefile.maint: Formatting changes.
10180 (po-update, cvs-update, update): New targets.
10181 (AMTAR): Remove.
10182
10183 2001-08-27 Akim Demaille <akim@epita.fr>
10184
10185 * Makefile.am (AUTOMAKE_OPTIONS): 1.5.
10186 * Makefile.maint: Sync. with CVS Autoconf.
10187
10188 2001-08-27 Marc Autret <autret_m@epita.fr>
10189
10190 * src/vcg.h (struct infoname_s): New.
10191 (struct colorentry_s): New.
10192 (graph_s): New fields {vertical,horizontal}_order in structure.
10193 Add `infoname' field.
10194 Add `colorentry' field;
10195 * src/vcg_defaults.h (G_VERTICAL_ORDER): New.
10196 (G_HORIZONTAL_ORDER): New.
10197 (G_INFONAME): New.
10198 (G_COLORENTRY): New.
10199 * src/vcg.c (output_graph): Add output of {vertical,horizontal}_order.
10200 Add output of `infoname'.
10201 Add output of `colorentry'.
10202
10203 2001-08-27 Marc Autret <autret_m@epita.fr>
10204
10205 * src/reader.c (parse_dquoted_param): Rename variable `index' to `i'.
10206 This one shadowed a global parameter.
10207
10208 2001-08-24 Marc Autret <autret_m@epita.fr>
10209
10210 * src/print_graph.c (node_output_size): Declared POSIX `size_t' type,
10211 instead of `unsigned'.
10212 (print_state): Do not call obstack_object_size () in obstack_grow ()
10213 to avoid macro variables shadowing.
10214
10215 2001-08-23 Marc Autret <autret_m@epita.fr>
10216
10217 * src/lex.c (percent_table): Typo: s/naem/name/.
10218 Add graph option.
10219 Normalize new options declarations.
10220
10221 2001-08-20 Pascal Bart <pascal.bart@epita.fr>
10222
10223 * tests/suite.at: Exercise %header_extension and %source_extension.
10224
10225 2001-08-16 Marc Autret <autret_m@epita.fr>
10226
10227 * src/reader.c (parse_dquoted_param): New.
10228 (parse_header_extension_decl): Use it.
10229 (parse_source_extension_decl): Likewise.
10230
10231 2001-08-16 Marc Autret <autret_m@epita.fr>
10232
10233 * src/vcg.c: Remove includes of `complain.h' and `xalloc.h'.
10234 (get_xxxx_str): Use assert () instead of complain ().
10235 Remove return invokations in default cases.
10236 (get_decision_str): Modify default behaviour. Remove second argument.
10237 Echo modifications on calls.
10238 (output_graph): Fix.
10239
10240 2001-08-16 Marc Autret <autret_m@epita.fr>
10241
10242 * src/getargs.c (usage): Update with ``-g, --graph''.
10243
10244 2001-08-16 Marc Autret <autret_m@epita.fr>
10245
10246 * doc/bison.texinfo (Bison Options): Add items `-g', `--graph'.
10247 (Option Cross Key): Likewise.
10248 * doc/bison.1: Update.
10249
1c8c2190
PB
102502001-09-25 Pascal Bart <pascal.bart@epita.fr>
10251
10252 * src/output.c (output_master_parser): Don't finish action_obstack.
10253 (output_parser): Don't care about the muscle action, here.
10254 (prepare): Copy the action_obstack in the action muscle.
10255 (output): Free action_obstack.
10256
180d45ba
PB
102572001-09-23 Pascal Bart <pascal.bart@epita.fr>
10258
10259 * src/reader.c (parse_union_decl): Add new obstack union_obstack. Which
10260 will contain `%union' declaration.
10261 (parse_union_decl): Delete #line directive output.
10262 (parse_union_decl): Substitute /attrs_obstack/union_obstack for all
10263 informations about %union.
10264 (parse_union_decl): Copy the union_obstack in the muscle stype.
10265 * src/bison.simple: Add new #line directive.
10266 Add typdef %%stype YYSTYPE.
10267
c51d1a19
PB
102682001-09-23 Pascal Bart <pascal.bart@epita.fr>
10269
10270 * src/bison.simple: Add new `#line' directive.
10271
6f9344da
PB
102722001-09-22 Pascal Bart <pascal.bart@epita.fr>
10273
10274 * src/bison.simple: New `#line' directive.
10275 * src/output.c (output_parser): Support new dynamic muscle input_line.
10276
652def80
MA
102772001-09-22 Marc Autret <autret_m@epita.fr>
10278
10279 * src/output.c (output_master_parser): New.
10280 (output_parser): Be more re-entrant.
10281
25b222fa
MA
102822001-09-21 Marc Autret <autret_m@epita.fr>
10283
10284 * src/reader.c (copy_definition, parse_union_decl): Update and use
10285 `linef' muscle.
10286 (copy_action): Likewise.
10287 Use obstack_1grow ().
10288 * src/muscle_tab.c (muscle_init): Add muscle `linef'.
10289
6bc35ae5
MA
102902001-09-21 Marc Autret <autret_m@epita.fr>
10291
10292 * src/options.c (option_table): Adjust.
10293 * src/lex.c (parse_percent_token): Fix.
10294
c0629aa1
PB
102952001-09-20 Pascal Bart <pascal.bart@epita.fr>
10296
10297 * src/options.c (symtab.h): Include it, need by lex.h.
342b8b6e 10298
82b6d266
PB
102992001-09-20 Pascal Bart <pascal.bart@epita.fr>
10300
10301 * src/lex.c (parse_percent_token): Change type of variable `tx', which
10302 is now an option_table_struct*.
10303 (option_strcmp): New function option_strcmp.
10304 (parse_percent_token): Call option_strcmp.
10305 * src/getargs.c (xalloc.h, options.h): Include it.
10306 (getargs): Call create_long_option_table.
10307 (getargs): Free longopts at the end of the function.
10308 (shortopts): Move in options.c.
10309 * src/options.c (create_long_option_table): New function. Convert
10310 information from option_table to option structure.
10311 * src/reader.c (options.h): Include it.
10312
10313 * src/Makefile.am: Adjust.
10314 * src/options.c (option_table): Create from longopts and percent_table.
10315 * src/getargs.c (longopts): Delete.
10316 * src/lex.c (struct percent_table_struct): Delete.
10317 (percent_table): Delete.
10318 (options.h): Include it.
10319 * src/options.c: Create.
10320 * src/options.h: Create.
10321 Declare enum opt_access_e.
10322 Define struct option_table_struct.
10323
75f5aaea
MA
103242001-09-20 Marc Autret <autret_m@epita.fr>
10325
10326 * doc/bison.texinfo: Adjust terminologies about prologue and epilogue
10327 sections of Bison.
10328
f508cb0a
PB
103292001-09-19 Pascal Bart <pascal.bart@epita.fr>
10330
10331 * src/bison.simple: s/%%filename/%%skeleton.
10332 * src/muscle_tab.c (getargs.h): Include it.
10333 (muscle_init): Insert new muscle skeleton.
10334
13105fc1
PB
103352001-09-18 Pascal Bart <pascal.bart@epita.fr>
10336
10337 * src/output.c (output_parser): Delete unused variable actions_dumped.
10338
b0c4483e
PB
103392001-09-07 Pascal Bart <pascal.bart@epita.fr>
10340
10341 * src/output.c (output): Delete call to reader_output_yylsp.
10342 * src/reader.c (reader): Likewise.
10343 * src/reader.h: Delete declaration of reader_output_yylsp.
342b8b6e 10344
11d82f03
MA
103452001-09-02 Marc Autret <autret_m@epita.fr>
10346
10347 * src/reader.c: Include muscle_tab.h.
10348 (parse_union_decl): Update.
10349 (parse_macro_decl): Rename parse_muscle_decl.
10350 Update to use renamed functions and variable.
10351 (read_declarations, copy_action, read_additionnal_code, : Updated
10352 with correct variables and functions names.
10353 (packsymbols, reader): Likewise.
342b8b6e 10354
11d82f03 10355 * src/reader.h (muscle_obstack): Extern declaration update.
342b8b6e 10356
11d82f03
MA
10357 * src/output.c: Include muscle_tab.h
10358 In all functions using macro_insert, change by using muscle_insert ().
10359 (macro_obstack): Rename muscle_obstack.
10360 Echo modifications in the whole file.
10361 (MACRO_INSERT_INT): Rename MUSCLE_INSERT_INT.
10362 (MACRO_INSERT_STRING): Rename MUSCLE_INSERT_STRING.
10363 (MACRO_INSERT_PREFIX): Rename MUSCLE_INSERT_PREFIX.
10364
10365 * src/muscle_tab.h: Update double inclusion macros.
10366 (macro_entry_s): Rename muscle_entry_s.
10367 Update prototypes.
342b8b6e 10368
11d82f03
MA
10369 * src/muscle_tab.c: Include muscle_tab.h.
10370 Rename macro_tabble to muscle_table.
10371 (mhash1, mhash2, mcmp): Use muscle_entry.
10372 (macro_init): Rename muscle_init. Update.
10373 (macro_insert): Rename muscle_insert. Update.
10374 (macro_find): Rename muscle_find. Update.
10375
10376 * src/main.c: Include muscle_tab.h.
10377 (main): Call muscle_init ().
10378 * src/Makefile.am (bison_SOURCES): Echo modifications.
10379
93a37297
MA
103802001-09-02 Marc Autret <autret_m@epita.fr>
10381
f753cd62 10382 Now the files macro_tab.[ch] are named muscle_tab.[ch].
342b8b6e 10383
f753cd62
MA
10384 * src/muscle_tab.c, src/muscle_tab.h: Add files.
10385
103862001-09-02 Marc Autret <autret_m@epita.fr>
10387
10388 * src/macrotab.c, src/macrotab.h: Remove.
93a37297 10389
682d48cd
PB
103902001-09-01 Pascal Bart <pascal.bart@epita.fr>
10391
342b8b6e 10392 * src/reader.c (copy_guard): Use muscle to specify the `#line'
682d48cd
PB
10393 filename.
10394
087c8fda
MA
103952001-09-01 Marc Autret <autret_m@epita.fr>
10396
10397 * tests/calc.at (exp): Now, YYERROR_VERBOSE need to be set
10398 to an explicit value to activate the feature. We do it here.
10399
dda680cb
PB
104002001-08-31 Pascal Bart <pascal.bart@epita.fr>
10401
10402 * src/output.c (prepare): Delete the `filename' muscule insertion.
10403 * src/reader.c (copy_action): Use `filename' muscule with `#line'.
10404 (parse_union_decl): Likewise.
10405 * src/macrotab.c (macro_init): Initialize filename by infile.
10406
9e644e64
MA
104072001-08-31 Marc Autret <autret_m@epita.fr>
10408
10409 * src/bison.simple (YYLSP_NEEDED): New definition.
10410 * src/output.c (prepare): Add macro insertion of `locations_flag'
10411
17da6427
PB
104122001-08-31 Pascal Bart <pascal.bart@epita.fr>
10413
10414 * src/output.c (prepare): Delete insertion of previous muscles,
10415 and insert the `prefix' muscles.
10416 * src/macrotab.c (macro_init): Likewise.
10417 (macro_init): Initialization prefix directive by `yy'.
342b8b6e 10418 * src/bison.simple: Substitute all %%yylex, %%yychar, %%yylval,
17da6427
PB
10419 %%yydebug, %%yyerror, %%yynerrs and %%yyparse by yylex, yychar,
10420 yylval, yydebug, yyerror, yynerrs and yyparse.
342b8b6e 10421 New directive `#define' to substitute yydebug, ... with option
17da6427
PB
10422 name_prefix.
10423
e8cb70b9
PB
104242001-08-31 Pascal Bart <pascal.bart@epita.fr>
10425
10426 * src/main.c (main): Standardize.
10427 * src/output.c (output_table_data, output_parser): Likewise.
10428 * src/macrotab.h, src/macrotab.c, src/bison.simple: Likewise.
10429
63c2d5de
MA
104302001-08-31 Pascal Bart <pascal.bart@epita.fr>, Marc Autret <autret_m@epita.fr>
10431
342b8b6e 10432 * src/reader.c (read_additionnal_code): Rename %%user_code to
63c2d5de
MA
10433 %%epilogue.
10434 * src/output.c (output): Rename %%declarations to %%prologue.
10435 * src/bison.simple: Echo modifications.
342b8b6e 10436
d8cb5183
MA
104372001-08-31 Marc Autret <autret_m@epita.fr>
10438
10439 * src/reader.c (readgram): CleanUp.
10440 (output_token_defines): Likewise.
10441 (packsymbols): Likewise.
10442 (reader): Likewise.
10443 * src/output.c (output): CPP-out useless code.
10444
6c686258
PB
104452001-08-31 Pascal Bart <pascal.bart@epita.fr>
10446
342b8b6e 10447 * src/reader.c (reader): Delete obsolete call to function
6c686258
PB
10448 output_trailers and output_headers.
10449 * src/output.h: Remove obsolete functions prototypes of output_headers
10450 and output_trailers.
10451
8f451ef7
PB
104522001-08-30 Pascal Bart <pascal.bart@epita.fr>
10453
10454 * src/main.c: Include macrotab.h.
342b8b6e 10455 * src/macrotab.h (macro_entry_s): Constify fields.
8f451ef7
PB
10456 Adjust functions prototypes.
10457 * src/macrotab.c (macro_insert): Constify key and value.
10458 (macro_find): Constify key.
10459 (macro_insert): Include 'xalloc.h'
10460 (macro_insert): Use XMALLOC.
10461 (macro_find): Constify return value.
10462 * src/output.c (output_table_data): Rename table to table_data.
10463 (output_parser): Constify macro_key, macro_value.
10464
997b6fd0 104652001-08-30 Marc Autret <autret_m@epita.fr>
2ba3b73c
MA
10466
10467 * src/reader.c (parse_skel_decl): New.
342b8b6e 10468 (read_declarations): Add case `tok_skel', call parse_skel_decl ().
2ba3b73c
MA
10469 * src/lex.h (token_t): New token `tok_skel'.
10470 * src/lex.c (percent_table): Add skeleton option entry.
10471 Standardize.
10472
ff48177d
MA
104732001-08-29 Marc Autret <autret_m@epita.fr>
10474
10475 * src/bison.simple: Add %%user_code directive at the end.
10476 * src/reader.c (read_additionnal_code): New.
10477 (reader): Use it.
10478 * src/output.c (output_program): Remove.
10479 (output): Update.
10480
b33160bf
MA
104812001-08-28 Marc Autret <autret_m@epita.fr>
10482
10483 * src/output.c (output_actions): Clean up.
4e5caae2 10484 (output_gram): CPP-out useless code.
b33160bf
MA
10485 * src/reader.c (reader): Clean up, CPP-out useless code.
10486
d1a2daf7
PB
104872001-08-28 Pascal Bart <pascal.bart@epita.fr>
10488
342b8b6e 10489 * src/output.c (output): Copy attrs_obstack in the '%%definitions'
535c0e75 10490 directive.
d1a2daf7
PB
10491 * src/bison.simple: Add `%%definitions'.
10492
2b763dfe
MA
104932001-08-28 Marc Autret <autret_m@epita.fr>
10494
10495 * config/depcomp: New file.
10496
f1a87ef6
PE
104972001-08-27 Paul Eggert <eggert@twinsun.com>
10498
10499 * src/bison.simple (yyparse): Don't take the address of an
10500 item before the start of an array, as that doesn't conform to
10501 the C Standard.
10502
82e236e2
RA
105032001-08-27 Robert Anisko <robert.anisko@epita.fr>
10504
f1a87ef6 10505 * src/output.c (output): Remove the initialization of the macro
82e236e2
RA
10506 obstack. It was done too late here.
10507
10508 * src/reader.c (parse_macro_decl): Fix. Use of the macro obstack was
10509 completely wrong.
10510 (reader): Initialize the macro obstack here, since we need it to grow
10511 '%define' directives.
10512
10513 * src/reader.h: Declare the macro obstack as extern.
10514
b0cfa28a
RA
105152001-08-27 Robert Anisko <robert.anisko@epita.fr>
10516
10517 * src/output.c (output_parser): Fix. Store single '%' characters in
10518 the output obstack instead of throwing them away.
10519
6fc74234
AD
105202001-08-27 Akim Demaille <akim@epita.fr>
10521
10522 * Makefile.am (AUTOMAKE_OPTIONS): 1.5.
10523
9c76d118
RA
105242001-08-25 Robert Anisko <robert.anisko@epita.fr>
10525
10526 * lib/Makefile.am: Adjust.
10527
a8289c62
RA
105282001-08-25 Robert Anisko <robert.anisko@epita.fr>
10529
10530 * src/bison.simple: Update and add '%%' directives.
10531
b6610515
RA
105322001-08-25 Robert Anisko <robert.anisko@epita.fr>
10533
10534 * src/reader.c (reader): Remove calls to 'output_headers' and
10535 'output_trailers'. Remove some C output.
10536 (readgram): Disable a piece of code that was writing a default
10537 definition for 'YYSTYPE'.
10538 (reader_output_yylsp): Remove.
10539 (packsymbols): Output token defintions to a macro.
10540 (copy_definition): Disable C output.
6fc74234 10541
b6610515
RA
10542 * src/reader.c (parse_macro_decl): New function used to parse macro
10543 declarations.
10544 (copy_string2): Put the body of copy_string into this new function.
10545 Add a parameter to let the caller choose whether he wants to copy the
10546 string delimiters or not.
10547 (copy_string): Be a simple call to copy_string2 with the last argument
10548 bound to true.
10549 (read_declarations): Add case for macro definition.
10550 (copy_identifier): New.
6fc74234 10551 (parse_macro_decl): Read macro identifiers using copy_identifier
b6610515
RA
10552 rather than lex.
10553
26f609ff
RA
105542001-08-25 Robert Anisko <robert.anisko@epita.fr>
10555
10556 * src/output.c (prepare): Add prefixed names.
10557 (output_parser): Output semantic actions.
10558 (output_parser): Fix bug on '%%line' directives.
6fc74234 10559
26f609ff
RA
10560 * src/output.c (output_headers): Remove. The C code printed by this
10561 function should now be in the skeletons.
10562 (output_trailers): Remove.
10563 (output): Disable call to 'reader_output_yylsp'.
10564 (output_rule_data): Do not output tables to the table obstack.
10565
10566 * src/output.c: Remove some C dedicated output.
10567 Improve the use of macro and output obstacks.
10568 (output_defines): Remove.
6fc74234 10569
26f609ff
RA
10570 * src/output.c (output_token_translations): Associate 'translate'
10571 table with a macro. No output to the table obstack.
10572 (output_gram): Same for 'rhs' and 'prhs'.
10573 (output_stos): Same for 'stos'.
10574 (output_rule_data): Same for 'r1' and 'r2'.
10575 (token_actions): Same for 'defact'.
10576 (goto_actions): Same for 'defgoto'.
10577 (output_base): Same for 'pact' and 'pgoto'.
10578 (output_table): Same for 'table'.
10579 (output_check): Same for 'check'.
6fc74234 10580
26f609ff
RA
10581 * src/output.c (output_table_data): New function.
10582 (output_short_table): Remove.
10583 (output_short_or_char_table): Remove.
6fc74234 10584
26f609ff
RA
10585 * src/output.c (output_parser): Replace most of the skeleton copy code
10586 with something new. Skeletons are now processed character by character
10587 rather than line by line, and Bison looks for '%%' macros. This is the
10588 first step in making Bison's output process (a lot) more flexible.
10589 (output_parser): Use the macro table.
10590
6f43b113
RA
105912001-08-25 Robert Anisko <robert.anisko@epita.fr>
10592
10593 * src/main.c (main): Initialize the macro table.
10594
dd3127cf
RA
105952001-08-25 Robert Anisko <robert.anisko@epita.fr>
10596
10597 * src/lex.c (percent_table): Add tok_define.
10598 * src/lex.h: Add tok_define.
10599
aa321494
RA
106002001-08-25 Robert Anisko <robert.anisko@epita.fr>
10601
10602 * src/macrotab.c: New file.
10603 * src/macrotab.h: New file.
10604 * src/Makefile.am: Update.
10605
68bd3b6b
RA
106062001-08-25 Robert Anisko <robert.anisko@epita.fr>
10607
10608 * lib/hash.c: New file.
10609 * lib/hash.h: New file.
10610 * lib/Makefile.am: Update.
10611
45f8dd1e
AD
106122001-08-15 Akim Demaille <akim@epita.fr>
10613
10614 Version 1.28c.
10615
40a64a7a 106162001-08-15 Marc Autret <autret_m@epita.fr>
0b8afb77
AD
10617
10618 * src/reader.c (readgram): Indent output macro YYSTYPE.
10619 (packsymbols): Likewise.
10620 (output_token_defines): Likewise.
10621 * src/files.c: Standardize.
10622 (compute_header_macro): New.
10623 (defines_obstack_save): New. Use compute_header_macro.
10624 (output_files): Update. Use defines_obstack_save.
10625
f9a8293a
AD
106262001-08-15 Akim Demaille <akim@epita.fr>
10627
10628 * doc/bison.texinfo (Table of Symbols): Document
10629 YYSTACK_USE_ALLOCA.
10630
150ca7a7
AD
106312001-08-15 Akim Demaille <akim@epita.fr>
10632
10633 * missing: Update from CVS Automake.
10634 * config/config.guess, config/config.sub, config/texinfo.tex:
10635 Update from gnu.org.
10636
69b5cec4
AD
106372001-08-15 Akim Demaille <akim@epita.fr>
10638
10639 * Makefile.maint: Sync with CVS Autoconf.
10640
f2b5126e
PB
106412001-08-14 Pascal Bart <pascal.bart@epita.fr>
10642
69b5cec4 10643 * doc/bison.texinfo: Include GNU Free Documentation License from
f2b5126e
PB
10644 `fdl.texi'.
10645 * doc/fdl.texi: Add to package.
10646
4ecbf796
MA
106472001-08-14 Marc Autret <autret_m@epita.fr>
10648
10649 Turn on %{source,header}_extension features.
10650
69b5cec4 10651 * src/lex.c (percent_table): Un-CPP out header_extension and
4ecbf796
MA
10652 source_extension.
10653 * src/files.c (compute_exts_from_gf): Compare pointers with NULL.
69b5cec4 10654 (compute_exts_from_src): Remove conditions. It restores priorities
4ecbf796
MA
10655 between options.
10656
95fb5662
MA
106572001-08-14 Marc Autret <autret_m@epita.fr>
10658
10659 * src/files.c (compute_base_names): Add extensions computing when
10660 `--file-prefix' used.
10661 Standardize function calls.
10662
78d09da9
MA
106632001-08-13 Marc Autret <autret_m@epita.fr>
10664
69b5cec4 10665 * src/bison.simple (YYSTACK_USE_ALLOCA): Changed to allow users
78d09da9
MA
10666 defining it (defined but null disables alloca).
10667
5a009f2c
MA
106682001-08-13 Marc Autret <autret_m@epita.fr>
10669
10670 * src/bison.simple (_yy_memcpy): CPP reformat.
10671
1e41465a
PB
106722001-08-13 Pascal Bart <pascal.bart@epita.fr>
10673
10674 * tests/atconfig.in (CPPFLAGS): Fix.
10675
c67a198d
PB
106762001-08-10 Pascal Bart <pascal.bart@epita.fr>
10677
79282c6c 10678 * doc/bison.texinfo: Include GNU General Public License from
c67a198d
PB
10679 `gpl.texi'.
10680 * doc/gpl.texi: Add to package.
10681
09a6de7e
MA
106822001-08-10 Marc Autret <autret_m@epita.fr>
10683
10684 * src/print_graph.h: Fix.
10685 * src/reader.c (read_declarations): Use parse_header_extension_decl ().
10686
b77b9ee0
AD
106872001-08-10 Akim Demaille <akim@epita.fr>
10688
10689 * src/system.h: Provide default declarations for stpcpy, strndup,
10690 and strnlen.
10691
3e259915
MA
106922001-08-10 Robert Anisko <anisko_r@epita.fr>
10693
10694 * doc/bison.texinfo (Locations): Update @$ stuff.
10695
ca96bc2d
MA
106962001-08-09 Robert Anisko <anisko_r@epita.fr>
10697
10698 * src/bison.simple (YYLLOC_DEFAULT): Update.
10699 (yyparse): Adjust.
10700
fdc6758b
MA
107012001-08-08 Marc Autret <autret_m@epita.fr>
10702
b77b9ee0 10703 * doc/bison.texinfo: Change @samp{$<@dots{}>} to
fdc6758b
MA
10704 @samp{$<@dots{}>@var{n}} in Section Actions in Mid-Rule.
10705 Reported by Fabrice Bauzac.
957d4dbf 10706
600cad3b
MA
107072001-08-08 Marc Autret <autret_m@epita.fr>
10708
10709 * src/vcg_default.h: Use NULL instead of 0 to initialize pointers.
10710 * src/vcg.c (output_node): Fix.
10711 * src/vcg.h: Cleanup.
10712 * src/print_graph.c: Add comments.
b77b9ee0 10713 (node_output_size): New global variable. Simplify the formatting of
600cad3b 10714 the VCG graph output.
b77b9ee0 10715 (print_actions): Unused code is now used. It notifies the final state
600cad3b 10716 and no action states in the VCG graph. It also give the reduce actions.
b77b9ee0 10717 The `shift and goto' edges are red and the `go to state' edges are
600cad3b
MA
10718 blue.
10719 Get the current node name and node_obstack by argument.
10720 (node_obstack): New variable.
10721 (print_state): Manage node_obstack.
10722 (print_core): Use node_obstack given by argument.
10723 A node is not only computed here but in print_actions also.
10724 (print_graph): CPP out useless code instead of commenting it.
10725
976e528f
AD
107262001-08-07 Pascal Bart <pascal.bart@epita.fr>
10727
10728 * tests/atconfig.in (CPPFLAGS): Fix.
10729
20e8e5ca
AD
107302001-08-07 Akim Demaille <akim@epita.fr>
10731
10732 * src/print_graph.c (quote): New.
10733 (print_core): Use it.
10734
957d4dbf 107352001-08-06 Akim Demaille <akim@epita.fr>, Marc Autret <autret_m@epita.fr>
3e3da797 10736
3e3da797
AD
10737 * src/vcg.c (complain.h): Include it.
10738 Unepitaize `return' invocations.
c4b66126 10739 [NDEBUG] (main): Remove.
79282c6c 10740 * src/vcg.h (node_t, edge_t, graph_t): Constify the char * members.
c4b66126
AD
10741 * src/files.c (open_files): Initialize graph_obstack.
10742 * src/print_graph.c (print_actions): CPP out useless code.
10743 (print_core): Don't output the last `\n' in labels.
10744 Use `quote'.
10745 * src/files.c (output_files): Output the VCG file.
10746 * src/main.c (main): Invoke print_graph ();
3e3da797 10747
957d4dbf 107482001-08-06 Marc Autret <autret_m@epita.fr>
22c2cbc0
AD
10749
10750 Automaton VCG graph output.
10751 Using option ``-g'' or long option ``--graph'', you can generate
10752 a gram_filename.vcg file containing a VCG description of the LALR (1)
10753 automaton of your grammar.
10754
10755 * src/main.c: Call to print_graph() function.
10756 * src/getargs.h: Update.
10757 * src/getargs.c (options): Update to catch `-g' and `--graph' options.
10758 (graph_flag): New flag.
10759 (longopts): Update.
10760 (getargs): Add case `g'.
10761 * src/files.c (graph_obstack): New obstack struct.
10762 (open_files): Initialize new obstack.
10763 (output_files): Saves graph_obstack if required.
10764 * src/files.h (graph_obstack): New extern declaration.
10765 * src/Makefile.am: Add new source files.
10766
927c1557 107672001-08-06 Marc Autret <autret_m@epita.fr>
ce4d5ce0
AD
10768
10769 * src/print_graph.c, src/print_graph.h (graph): New.
10770 * src/vcg.h: New file.
10771 * src/vcg.c: New file, VCG graph handling.
10772
7333d403
AD
107732001-08-06 Marc Autret <autret_m@epita.fr>
10774
10775 Add of %source_extension and %header_extension which specify
10776 the source or/and the header output file extension.
10777
10778 * src/files.c (compute_base_names): Remove initialisation of
10779 src_extension and header_extension.
10780 (compute_exts_from_gf): Update.
10781 (compute_exts_from_src): Update.
10782 (output_files): Update.
10783 * src/reader.c (parse_header_extension_decl): New.
10784 (parse_source_extension_decl): New.
10785 (read_declarations): New case statements for the new tokens.
10786 * src/lex.c (percent_table): Add entries for %source_extension
10787 and %header_extension.
10788 * src/lex.h (token_e): New tokens tok_hdrext and tok_srcext.
10789
84163231
AD
107902001-08-06 Marc Autret <autret_m@epita.fr>
10791
10792 * configure.in: Bump to 1.28c.
10793 * doc/bison.texinfo: Texinfo thingies.
10794
8303fc42
AD
107952001-08-04 Pascal Bart <pascal.bart@epita.fr>
10796
10797 * tests/atconfig.in (CPPFLAGS): Add.
10798 * tests/calc.at (AT_CHECK): Use CPPFLAGS.
10799
70a84437
AD
108002001-08-03 Akim Demaille <akim@epita.fr>
10801
10802 Version 1.28b.
10803
2ce10144
AD
108042001-08-03 Akim Demaille <akim@epita.fr>
10805
10806 * tests/Makefile.am (check-local): Ship testsuite.
10807 * tests/calc.at (_AT_DATA_CALC_Y): Prototype all the functions.
10808 Include `string.h'.
10809
1e3e4bc1
AD
108102001-08-03 Akim Demaille <akim@epita.fr>
10811
10812 * configure.in: Try using -Wformat when compiling.
10813
42b45b7f
AD
108142001-08-03 Akim Demaille <akim@epita.fr>
10815
10816 * configure.in: Bump to 1.28b.
10817
8f13fe33
AD
108182001-08-03 Akim Demaille <akim@epita.fr>
10819
10820 * src/complain.c: Adjust strerror_r portability issues.
10821
b37ba92c
AD
108222001-08-03 Akim Demaille <akim@epita.fr>
10823
10824 Version 1.28a.
10825
b0ce6046
AD
108262001-08-03 Akim Demaille <akim@epita.fr>
10827
10828 * src/getargs.c, src/getarg.h (skeleton)): Constify.
10829 * src/lex.c (literalchar): Avoid name clashes on `buf'.
10830 * src/getargs.c: Include complain.h.
10831 * src/files.c, src/files.h (skeleton_find): Avoid name clashes.
10832 * lib/quotearg.c, lib/quotearg.h: Update from fileutils 4.1.
10833
d01c415b
AD
108342001-08-03 Akim Demaille <akim@epita.fr>
10835
10836 * src/reader.c (readgram): Display hidden chars in error messages.
10837
459dd1a6
AD
108382001-08-03 Akim Demaille <akim@epita.fr>
10839
10840 Update to gettext 0.10.39.
10841
53b74c0c
AD
108422001-08-03 Akim Demaille <akim@epita.fr>
10843
10844 * lib/strspn.c: New.
10845
234a3be3
AD
108462001-08-01 Marc Autret <autret_m@epita.fr>
10847
10848 * doc/bison.texinfo: Update.
10849 * doc/bison.1 (mandoc): Update.
10850 * src/system.h (EXT_GUARD_C, EXT_STYPE_H): Remove .c and .h.
10851 * src/files.c: Support output files extensions computing.
10852 (src_extension): New static variable.
10853 (header_extension): New static variable.
10854 (tr): New function.
10855 (get_extension_index): New function, gets the index of an extension
10856 filename in a string.
10857 (compute_exts_from_gf): New function, computes extensions from the
10858 grammar file extension.
10859 (compute_exts_from_src): New functions, computes extensions from the
10860 C source file extension, file given by ``-o'' option.
10861 (compute_base_names): Update.
10862 (output_files): Update.
10863
847bf1f5
AD
108642001-08-01 Robert Anisko <anisko_r@epita.fr>
10865
d995fee7 10866 * doc/bison.texi: Document @$.
847bf1f5
AD
10867 (Locations): New section.
10868
d074a105
AD
108692001-07-18 Akim Demaille <akim@epita.fr>
10870
10871 * Makefile.maint, GNUmakefile: New, from Autoconf 2.52.
10872 * config/prev-version.txt, config/move-if-change: New.
10873 * Makefile.am: Adjust.
10874
3419715d
AD
108752001-07-08 Pascal Bart <pascal.bart@epita.fr>
10876
10877 * src/bison.simple (yyparse): Suppress warning `comparaison
10878 between signed and unsigned'.
10879
62ab6972
AD
108802001-07-05 Pascal Bart <pascal.bart@epita.fr>
10881
10882 * src/getargs.h (raw_flag): Remove.
10883 * src/getargs.c: Die on `-r'/`--raw'.
10884 * src/lex.c (parse_percent_token): Die on `%raw'.
10885 * src/reader.c (output_token_defines): Suppress call to `raw_flag'.
10886 * tests/calc.at: Suppress test with option `--raw'.
10887
1e24cc5b
AD
108882001-07-14 Akim Demaille <akim@epita.fr>
10889
10890 * config/: New.
10891 * configure.in: Require Autoconf 2.50.
10892 Update to gettext 0.10.38.
10893
32dfccf8
AD
108942001-03-16 Akim Demaille <akim@epita.fr>
10895
10896 * doc/bison.texinfo: ANSIfy the examples.
10897
cd5bd6ac
AD
108982001-03-16 Akim Demaille <akim@epita.fr>
10899
10900 * getargs.c (skeleton): New variable.
10901 (longopts): --skeleton is a new option.
10902 (shortopts, getargs): -S is a new option.
10903 * getargs.h: Declare skeleton.
10904 * output.c (output_parser): Use it.
10905
5141b016
AD
109062001-03-16 Akim Demaille <akim@epita.fr>
10907
10908 * m4/strerror_r.m4: New.
10909 * m4/error.m4: Run AC_FUNC_STRERROR_R.
10910 * lib/error.h, lib/error.c: Update.
10911
447992b9
AD
109122001-03-16 Akim Demaille <akim@epita.fr>
10913
10914 * src/getargs.c (longopts): Clean up.
10915
274d42ce
AD
109162001-02-21 Akim Demaille <akim@epita.fr>
10917
10918 * src/reader.c (gensym): `gensym_count' is your own.
10919 Use a static buf to create the symbol name, as token_buffer is no
10920 longer a buffer.
10921
22c821f3
AD
109222001-02-08 Akim Demaille <akim@epita.fr>
10923
10924 * src/conflicts.c (conflict_report): Be sure not to append to res
10925 between two calls, which could happen if both first sprintf were
10926 skipped, but not the first cp += strlen.
10927
18569462
AD
109282001-02-08 Akim Demaille <akim@epita.fr>
10929
10930 * lib/memchr.c, lib/stpcpy.c, lib/strndup.c, lib/strnlen.c:
10931 New, from fileutils 4.0.37.
10932 * configure.in: Require Autoconf 2.49c. I took some time before
10933 making this decision. This is the only way out for portability
10934 issues in Bison, it would mean way too much duplicate effort to
10935 import in Bison features implemented in 2.49c since 2.13.
10936 AC_REPLACE_FUNCS and AC_CHECK_DECLS the functions above.
10937
0d8f3c8a
AD
109382001-02-02 Akim Demaille <akim@epita.fr>
10939
10940 * lib/malloc.c, lib/realloc.c: New, from the fileutils 4.0.37.
66075dcf 10941 * lib/xalloc.h, lib/xmalloc.c: Update.
0d8f3c8a 10942
f17bcd1f
AD
109432001-01-19 Akim Demaille <akim@epita.fr>
10944
10945 Get rid of the ad hoc handling of token_buffer in the scanner: use
10946 the obstacks.
10947
10948 * src/lex.c (token_obstack): New.
10949 (init_lex): Initialize it. No longer call...
10950 (grow_token_buffer): this. Remove it.
10951 Adjust all the places which used it to use the obstack.
10952
511e79b3
AD
109532001-01-19 Akim Demaille <akim@epita.fr>
10954
10955 * src/lex.h: Rename all the tokens:
10956 s/\bENDFILE\b/tok_eof/g;
10957 s/\bIDENTIFIER\b/tok_identifier/g;
10958 etc.
10959 Let them be enums, not #define, to ease debugging.
10960 Adjust all the code.
10961
0d6508ef
AD
109622001-01-18 Akim Demaille <akim@epita.fr>
10963
10964 * src/lex.h (MAXTOKEN, maxtoken, grow_token_buffer): Remove, private.
10965 * src/lex.c (maxtoken, grow_token_buffer): Static.
10966
6deb4447
AD
109672001-01-18 Akim Demaille <akim@epita.fr>
10968
10969 Since we now use obstacks, more % directives can be enabled.
10970
10971 * src/lex.c (percent_table): Also accept `%yacc',
10972 `%fixed_output_files', `%defines', `%no_parser', `%verbose', and
10973 `%debug'.
10974 Handle the actions for `%semantic_parser' and `%pure_parser' here,
10975 instead of returning a token.
10976 * src/lex.h (SEMANTIC_PARSER, PURE_PARSER): Remove, unused.
10977 * src/reader.c (read_declarations): Adjust.
10978 * src/files.c (open_files): Don't call `compute_base_names', don't
10979 compute `attrsfile' since they depend upon data which might be
10980 *in* the input file now.
10981 (output_files): Do it here.
10982 * src/output.c (output_headers): Document the fact that this patch
10983 introduces a guaranteed SEGV for semantic parsers.
10984 * doc/bison.texinfo: Document them.
10985 * tests/suite.at: Exercise these %options.
10986
ff4423cc
AD
109872000-12-20 Akim Demaille <akim@epita.fr>
10988
10989 Also handle the output file (--verbose) with obstacks.
10990
10991 * files.c (foutput): Remove.
10992 (output_obstack): New.
10993 Adjust all dependencies.
10994 * src/conflicts.c: Return a string.
10995 * src/system.h (obstack_grow_string): Rename as...
10996 (obstack_sgrow): this. Be ready to work with non literals.
10997 (obstack_fgrow4): New.
10998
956dba3a
AD
109992000-12-20 Akim Demaille <akim@epita.fr>
11000
11001 * src/files.c (open_files): Fix the computation of short_base_name
11002 in the case of `-o foo.tab.c'.
11003
337bab46
AD
110042000-12-20 Akim Demaille <akim@epita.fr>
11005
11006 * src/reader.c (copy_string, copy_comment, copy_comment2, copy_at)
11007 (copy_dollar): Now that everything uses obstacks, get rid of the
11008 FILE * parameters.
11009
5d3214b8
AD
110102000-12-20 Akim Demaille <akim@epita.fr>
11011
11012 * src/files.c (open_files): Actually the `.output' file is based
11013 on the short_base_name, not base_name.
11014 * tests/suite.at (Checking output file names): Adjust.
11015
29092a57
AD
110162000-12-20 Akim Demaille <akim@epita.fr>
11017
11018 * src/bison.s1: Remove, we now use directly...
11019 * src/bison.simple: this.
11020 * src/Makefile.am: Use pkgdata instead of data.
11021
ea5607fd
AD
110222000-12-20 Akim Demaille <akim@epita.fr>
11023
11024 * src/files.c (guard_obstack): New.
11025 (open_files): Initialize it.
11026 (output_files): Dump it...
11027 * src/files.h: Export it.
11028 * src/reader.c (copy_guard): Use it.
11029
27110317
AD
110302000-12-19 Akim Demaille <akim@epita.fr>
11031
11032 * src/files.c (outfile, defsfile, actfile): Removed as global
11033 vars.
11034 (open_files): Don't compute them.
11035 (output_files): Adjust.
11036 (base_name, short_base_name): Be global.
11037 Adjust dependencies.
11038
19c50364
AD
110392000-12-19 Akim Demaille <akim@epita.fr>
11040
11041 * src/files.c (strsuffix): New.
11042 (stringappend): Be just like strcat but allocate.
11043 (base_names): Eve out from open_files.
11044 Try to simplify the rather hairy computation of base_name and
11045 short_base_name.
11046 (open_files): Use it.
11047 * tests/suite.at (Checking output file names): New test.
11048
573c1d9f
AD
110492000-12-19 Akim Demaille <akim@epita.fr>
11050
11051 * src/system.h (obstack_grow_literal_string): Rename as...
11052 (obstack_grow_string): this.
11053 * src/output.c (output_parser): Recognize `%% actions' instead of
11054 `$'.
11055 * src/bison.s1: s/$/%% actions/.
11056 * src/bison.hairy: Likewise.
11057
ef7ddedd
AD
110582000-12-19 Akim Demaille <akim@epita.fr>
11059
11060 * src/output.c (output_parser): Compute the `#line' lines when
11061 there are.
11062 * src/Makefile.am (bison.simple): Be a simple copy of bison.s1.
11063 Suggested by Hans Aberg.
11064
ff61dabd
AD
110652000-12-19 Akim Demaille <akim@epita.fr>
11066
11067 Let the handling of the skeleton files be local to the procedures
11068 that use it.
11069
11070 * src/files.c (xfopen, xfclose, skeleton_find, guardfile): No
11071 longer static.
11072 (fparser, open_extra_files): Remove.
11073 (open_files, output_files): Don't take care of fparser.
11074 * src/files.h: Adjust.
11075 * src/output.c (output_parser): Open and close the file to the
11076 skeleton.
11077 * src/reader.c (read_declarations): When %semantic_parser, open
11078 fguard.
11079
55b96341
AD
110802000-12-19 Akim Demaille <akim@epita.fr>
11081
11082 * src/file.h (BISON_SIMPLE, BISON_HAIRY): Move from here...
11083 * src/system.h (BISON_SIMPLE, BISON_HAIRY): ... to here.
11084
358c15b7
AD
110852000-12-19 Akim Demaille <akim@epita.fr>
11086
11087 * src/files.c (open_files): Yipee! We no longer need all the code
11088 looking for `/tmp' since we have no tmp file.
11089
7de3329e
AD
110902000-12-19 Akim Demaille <akim@epita.fr>
11091
11092 * src/system.h (EXT_TAB, EXT_OUTPUT, EXT_STYPE_H, EXT_GUARD_C):
11093 New macros.
11094 * src/files.c (open_files): Less dependency on MSDOS etc.
11095
3abcd459
AD
110962000-12-14 Akim Demaille <akim@epita.fr>
11097
11098 * src/bison.s1 (YYLLOC_DEFAULT): New macro.
11099 Provide a default definition.
11100 Use it when executing the default @ action.
11101 * src/reader.c (reader_output_yylsp): No longer include
11102 `timestamp' and `text' in the default YYLTYPE.
11103
2a91a95e
AD
111042000-12-12 Akim Demaille <akim@epita.fr>
11105
11106 * src/reader.c (copy_definition, parse_union_decl, copy_action)
11107 (copy_guard): Quote the file names.
11108 Reported by Laurent Mascherpa.
11109
14d3eb9b
AD
111102000-12-12 Akim Demaille <akim@epita.fr>
11111
11112 * src/output.c (output_headers, output_program, output): Be sure
11113 to escape special characters when outputting filenames.
11114 (ACTSTR_PROLOGUE, ACTSTR_EPILOGUE): Remove.
11115 (output_headers): Don't depend on them, Use ACTSTR.
11116
d7045ec6
AD
111172000-11-17 Akim Demaille <akim@epita.fr>
11118
11119 * lib/obstack.h: Formatting changes.
11120 (obstack_grow, obstack_grow0): Don't cast WHERE at all: it
11121 prevents type checking.
11122 (obstack_ptr_grow, obstack_ptr_grow_fast): When assigning, don't
11123 cast the value to (void *): assigning a `foo *' to a `void *'
11124 variable is valid.
11125 (obstack_int_grow, obstack_int_grow_fast): Don't cast AINT to int.
11126 * src/reader.c (parse_union_decl): Typo: use obstack_1grow to
11127 append characters.
11128
6fd54b73
AD
111292000-11-17 Akim Demaille <akim@epita.fr>
11130
11131 * tests/Makefile.am (suite.m4, regression.m4, calc.m4): Rename
11132 as...
11133 (suite.m4, regression.m4, calc.m4): these.
11134 * tests/atgeneral.m4: Update from CVS Autoconf.
11135
4c50eae6
AD
111362000-11-17 Akim Demaille <akim@epita.fr>
11137
11138 * tests/regression.m4 (%union and --defines): New test,
11139 demonstrating a current bug in the obstack implementation.
11140
a35f64ea
AD
111412000-11-17 Akim Demaille <akim@epita.fr>
11142
11143 * src/bison.s1 (_YY_DECL_VARIABLES, YY_DECL_VARIABLES): New
11144 macros.
11145 Use them to declare the variables which are global or local to
11146 `yyparse'.
11147
7de23534
AD
111482000-11-17 Akim Demaille <akim@epita.fr>
11149
11150 * acconfig.h: Remove, no longer used.
11151
aa7815f5
AD
111522000-11-07 Akim Demaille <akim@epita.fr>
11153
11154 * src: s/Copyright (C)/Copyright/g.
11155
5af1f549
AD
111562000-11-07 Akim Demaille <akim@epita.fr>
11157
11158 * src/reader.c (reader): #define YYLSP_NEEDED to 1 instead of just
11159 defining.
11160 * src/bison.s1: s/#ifdef YYLSP_NEEDED/#if YYLSP_NEEDED/.
11161
553e2b22
AD
111622000-11-07 Akim Demaille <akim@epita.fr>
11163
11164 * src/bison.s1 (YYLEX): Use #if instead of #ifdef.
11165 Merge in a single CPP if/else.
11166
8a4f41d6
AD
111672000-11-07 Akim Demaille <akim@epita.fr>
11168
11169 * src/output.c (output): Remove useless variables.
11170 * lib/obstack.c (obstack_grow, obstack_grow0): Rename the second
11171 argument `data' for consistency with the prototypes.
11172 Qualify it `const'.
11173 (obstack_copy, obstack_copy0): Rename the second argument as
11174 `address' for consistency. Qualify it `const'.
11175 * lib/obstack.h (obstack_copy, obstack_copy0, obstack_grow)
11176 (obstack_grow0, obstack_ptr_grow, obstack_ptr_grow_fast): Qualify
11177 `const' their input argument (`data' or `address').
11178 Adjust the corresponding macros to include `const' in casts.
11179
095a3fb5
AD
111802000-11-03 Akim Demaille <akim@epita.fr>
11181
11182 * src/Makefile.am (INCLUDES): s/PFILE/BISON_SIMPLE/.
11183 s/PFILE1/BISON_HAIRY/.
11184 Adjust dependencies.
11185
d1cdce7c
AD
111862000-11-03 Akim Demaille <akim@epita.fr>
11187
090c5ebf 11188 For some reason, this was not applied.
d1cdce7c
AD
11189
11190 * src/files.c [VMS]: No longer include `ssdef.h', no longer define
11191 `unlink': it's no longer used.
11192
9311529b
AD
111932000-11-03 Akim Demaille <akim@epita.fr>
11194
11195 * src/files.c (skeleton_find): New function, eved out of...
11196 (open_files, open_extra_files): here.
11197
d8880f69
AD
111982000-11-03 Akim Demaille <akim@epita.fr>
11199
11200 Don't use `atexit'.
11201
11202 * src/files.c (obstack_save): New function.
11203 (done): Rename as...
11204 (output_files): this.
11205 Use `obstack_save'.
11206 * src/main.c (main): Don't use `atexit' to register `done', since
11207 it no longer has to remove tmp files, just call `output_files'
11208 when there are no errors.
11209
0dbb648e
AD
112102000-11-02 Akim Demaille <akim@epita.fr>
11211
11212 * src/files.c [VMS]: No longer include `ssdef.h', no longer define
11213 `unlink': it's no longer used.
11214 * src/files.h: Formatting changes.
11215
896fe5c1
AD
112162000-11-02 Akim Demaille <akim@epita.fr>
11217
11218 Remove the last uses of mktemp and unlink/delete.
11219
11220 * src/files.c (fdefines, ftable): Removed.
11221 (defines_ostack, table_obstack): New.
11222 Adjust dependencies of the former into uses of the latter.
11223 * src/output.c (output_short_or_char_table, output_short_table):
11224 Convert to using obstacks.
11225 * src/reader.c (copy_comment2): Accept one FILE * and two
11226 obstacks.
11227 (output_token_defines, reader_output_yylsp): Use obstacks.
11228 * src/system.h (obstack_fgrow3): New.
1f65350a 11229 * po/POTFILES.in: Adjust.
896fe5c1 11230
dd60faec
AD
112312000-11-01 Akim Demaille <akim@epita.fr>
11232
11233 Change each use of `fattrs' into a use of `attrs_obstack'.
11234
11235 * src/reader.c (copy_at): Typo: s/yylloc/yyloc/.
11236 * src/files.c (fattrs): Remove.
11237 (attrs_obstack): New.
11238 Adjust all dependencies.
11239 (done): If SEMANTIC_PARSER, dump attrs_obstack into attrsfile.
11240
8c7ebe49
AD
112412000-11-01 Akim Demaille <akim@epita.fr>
11242
11243 Introduce obstacks.
11244 Change each use of `faction' into a use of `action_obstack'.
11245
11246 * lib/obstack.h, lib/obstack.c: New files.
11247 * src/files.c (faction): Remove.
11248 (action_obstack): New.
11249 Adjust all dependencies.
11250
77aee789
AD
112512000-10-20 Akim Demaille <akim@epita.fr>
11252
11253 * lib/quote.h (PARAMS): New macro. Use it.
11254
43591cec
AD
112552000-10-16 Akim Demaille <akim@epita.fr>
11256
11257 * src/output.c (output_short_or_char_table): New function.
11258 (output_short_table, output_token_translations): Use it.
11259 (goto_actions): Use output_short_table.
11260
1e9798d5
AD
112612000-10-16 Akim Demaille <akim@epita.fr>
11262
11263 * src/symtab.c (bucket_new): New function.
11264 (getsym): Use it.
11265
11266 * src/output.c (output_short_table): New argument to display the
11267 comment associated with the table.
11268 Adjust dependencies.
11269 (output_gram): Use it.
11270 (output_rule_data): Nicer output layout for YYTNAME.
11271
f282676b
AD
112722000-10-16 Akim Demaille <akim@epita.fr>
11273
11274 * src/lex.c (read_typename): New function.
11275 (lex): Use it.
11276 * src/reader.c (copy_dollar): Likewise.
11277
550a72a3
AD
112782000-10-16 Akim Demaille <akim@epita.fr>
11279
11280 * src/reader.c (copy_comment2): Expect the input stream to be on
11281 the `/' which is suspected to open a comment, instead of being
11282 called after `//' or `/*' was read.
11283 (copy_comment, copy_definition, parse_union_decl, copy_action)
11284 (copy_guard): Adjust.
11285
131e2fef
AD
112862000-10-16 Akim Demaille <akim@epita.fr>
11287
11288 * src/reader.c (parse_expect_decl): Use `skip_white_space' and
11289 `read_signed_integer'.
11290
79282c5a
AD
112912000-10-16 Akim Demaille <akim@epita.fr>
11292
11293 * src/reader.c (copy_dollar): New function.
11294 (copy_guard, copy_action): Use it.
11295
ff4a34be
AD
112962000-10-16 Akim Demaille <akim@epita.fr>
11297
11298 * lib/quote.h, lib/quote.c, lib/quotearg.h, lib/quotearg.c:
11299 * m4/prereq.m4, m4/c-bs-a.m4, m4/mbstate.m4:
11300 New files, from Fileutils 4.0.27.
11301 * src/main.c (printable_version): Remove.
11302 * src/lex.c, src/reader.c: Use `quote'.
11303
113042000-10-04 Akim Demaille <akim@epita.fr>
11305
11306 * lib/error.c, lib/error.h: New files, needed by xmalloc.c.
11307
14ded682
AD
113082000-10-04 Akim Demaille <akim@epita.fr>
11309
11310 * doc/bison.texinfo: Various typos spotted by Neil Booth.
11311
8e03724b
AD
113122000-10-04 Akim Demaille <akim@epita.fr>
11313
11314 When a literal string is used to define two different tokens,
11315 `bison -v' segfaults.
11316 Reported by Piotr Gackiewicz, and fixed by Neil Booth.
11317
11318 * tests/regression.m4: New file.
11319 Include the core of the sample provided by Piotr Gackiewicz.
11320 * src/reader.c (parse_token_decl): Diagnose bad cases, and proceed
11321 properly.
11322
a9e64249
AD
113232000-10-04 Akim Demaille <akim@epita.fr>
11324
11325 * src/reader.c (parse_expect_decl): Keep `count' within the size
11326 of `buffer'.
11327 From Neil Booth.
11328
da9abf43
AD
113292000-10-02 Paul Eggert <eggert@twinsun.com>
11330
11331 * bison.s1 (yyparse): Assign the default value
11332 unconditionally, to avoid a GCC warning and make the parser a
11333 tad smaller.
11334
c33638bb
AD
113352000-10-02 Akim Demaille <akim@epita.fr>
11336
11337 * src/getargs.c (getargs): Don't dump `--help' on unrecognized
11338 options.
11339
444c570a
AD
113402000-10-02 Akim Demaille <akim@epita.fr>
11341
11342 * src/derives.c, src/print.c, src/reduce.c: To ease the
11343 translation, move some `\n' out of the translated strings.
11344
89cab50d
AD
113452000-10-02 Akim Demaille <akim@epita.fr>
11346
11347 The location tracking mechanism is precious for parse error
11348 messages. Nevertheless, it is enabled only when `@n' is used in
11349 the grammar, which is a different issue (you can use it in error
11350 message, but not in the grammar per se). Therefore, there should
11351 be another means to enable it.
11352
11353 * src/getargs.c (getargs): Support `--locations'.
11354 (usage): Report it.
11355 * src/getargs.h (locationsflag): Export it.
11356 * src/lex.c (percent_table): Support `%locations'.
11357 * src/reader.c (yylsp_needed): Remove this variable, now replaced
11358 with `locationsflag'.
11359 * doc/bison.texinfo: Document `--locations' and `%locations'.
11360 Sort the options.
11361 * tests/calc.m4: Test it.
11362
11363 For regularity of the names, replace each
11364 (nolineflag, toknumflag, rawtokenumflag, noparserflag): with...
11365 (no_lineflag, token_tableflag, rawflag, no_parserflag): this.
11366 In addition replace each `flag' with `_flag'.
11367
d6c2cba0
AD
113682000-10-02 Akim Demaille <akim@epita.fr>
11369
11370 Also test parse error messages, including with YYERROR_VERBOSE.
11371
11372 * tests/calc.m4 (calc.y): Add support for `exp = exp' (non
11373 associative).
11374 Use it to check the computations.
11375 Use it to check `nonassoc' is honored.
11376 (AT_DATA_CALC_Y): Equip `calc.y' with YYERROR_VERBOSE when passed
11377 `--yyerror-verbose'.
11378 (_AT_CHECK_CALC): Adjust to this option.
11379 (_AT_CHECK_CALC_ERROR): New macro to check parse error messages.
11380
5a35a6cb
AD
113812000-10-02 Akim Demaille <akim@epita.fr>
11382
11383 Test also `--verbose', `--defines' and `--name-prefix'. Testing
11384 the latter demonstrates a flaw in the handling of non debugging
11385 parsers introduced by myself on 2000-03-16: `#define yydebug 0'
11386 was used in order to simplify:
11387
11388 #if YYDEBUG
11389 if (yydebug)
11390 {
11391 ...
11392 }
11393 #endif
11394
11395 into
11396
11397 if (yydebug)
11398 {
11399 ...
11400 }
11401
11402 unfortunately this leads to a CPP conflict when
11403 `--name-prefix=foo' is used since it produces `#define yydebug
11404 foodebug'.
11405
11406 * src/bison.s1 [!YYDEBUG]: Do not define yydebug.
11407 (YYDPRINTF): New macro.
11408 Spread its use.
11409 * tests/calc.m4 (AT_CHECK_CALC): Do require a title, build it from
11410 the bison options.
11411 Also test `--verbose', `--defines' and `--name-prefix'.
11412
71da9eea
AD
114132000-10-02 Akim Demaille <akim@epita.fr>
11414
11415 Improve the readability of the produced parsers.
11416
11417 * src/bison.s1: Formatting changes.
11418 Improve the comment related to the `$' mark.
11419 (yydefault): Don't fall through to `yyresume': `goto' there.
11420 * src/output.c (output_parser): When the `$' is met, skip the end
11421 of its line.
11422 New variable, `number_of_dollar_signs', to check there's exactly
11423 one `$' in the parser skeleton.
11424
95e36146
AD
114252000-10-02 Akim Demaille <akim@epita.fr>
11426
11427 * lib/xstrdup.c: New file, from the fileutils.
11428 * src/reader.c (parse_token_decl, get_type_name, parse_type_decl)
11429 (parse_assoc_decl, parse_thong_decl, get_type): Use `xstrdup'
11430 instead of strlen + xmalloc + strcpy.
11431 * src/symtab.c (copys): Remove, use xstrdup instead.
11432
d7020c20
AD
114332000-10-02 Akim Demaille <akim@epita.fr>
11434
11435 * src/gram.h (associativity): New enum type which replaces the
11436 former CPP macros `RIGHT_ASSOC', `LEFT_ASSOC' and `NON_ASSOC' with
11437 `right_assoc', `left_assoc' and `non_assoc'.
11438 Adjust all dependencies.
11439 * src/reader.c: Formatting changes.
11440 (LTYPESTR): Don't define it, use it as a literal in
11441 `reader_output_yylsp'.
11442 * src/symtab.h (symbol_class): New enum type which replaces the
11443 former CPP macros `SUNKNOWN', `STOKEN and `SNTERM' with
11444 `sunknown', `stoken and `snterm'.
11445
1916f98e
AD
114462000-10-02 Akim Demaille <akim@epita.fr>
11447
11448 * src/getargs.c (fixed_outfiles): Rename as...
11449 (yaccflag): for consistency and accuracy.
11450 Adjust dependencies.
11451
d7913476
AD
114522000-10-02 Akim Demaille <akim@epita.fr>
11453
11454 Use the more standard files `xalloc.h' and `xmalloc.c' instead of
11455 Bison's `allocate.c' and `alloc.h'. This patch was surprisingly
11456 difficult and introduced a lot of core dump. It turns out that
11457 Bison used an implementation of `xmalloc' based on `calloc', and
11458 at various places it does depend upon the initialization to 0. I
11459 have not tried to isolate the pertinent places, and all the former
11460 calls to Bison's `xmalloc' are now using `XCALLOC'. Someday,
11461 someone should address this issue.
11462
11463 * src/allocate.c, src/alloc.h, m4/bison-decl.m4: Remove.
11464 * lib/xmalloc.c, lib/xalloc.h, m4/malloc.m4, m4/realloc.m4: New
11465 files.
11466 Adjust dependencies.
11467 * src/warshall.h: New file.
11468 Propagate.
11469
340ef489
AD
114702000-10-02 Akim Demaille <akim@epita.fr>
11471
11472 Various anti-`extern in *.c' changes.
11473
11474 * src/system.h: Include `assert.h'.
11475
b2ca4022
AD
114762000-10-02 Akim Demaille <akim@epita.fr>
11477
11478 * src/state.h (nstates, final_state, first_state, first_shift)
11479 (first_reduction): Move their exportation from here...
11480 * src/LR0.h: to here.
11481 Adjust dependencies.
11482 * src/getargs.c (statisticsflag): New variable.
11483 Add support for `--statistics'.
11484 Adjust dependencies.
11485
11486 Remove a lot of now useless `extern' statements in most files.
11487
403b315b
AD
114882000-10-02 Akim Demaille <akim@epita.fr>
11489
11490 * src/LR0.h: New file.
11491 Propagate its use.
11492
07a58c13
AD
114932000-10-02 Akim Demaille <akim@epita.fr>
11494
11495 * src/print.h: New file.
11496 Propagate its use.
11497 * src/print.c: Formatting and ordering changes.
11498 (verbose, terse): Replace with...
11499 (print_results): this new function.
11500 Adjust dependencies.
11501
0619caf0
AD
115022000-10-02 Akim Demaille <akim@epita.fr>
11503
11504 * src/conflicts.c (conflict_report): New function.
11505 (conflict_log, verbose_conflict_log): Replace with...
11506 (print_conflicts): this function.
11507 Adjust dependencies.
11508 * src/conflicts.h: New file.
11509 Propagate its inclusion.
11510
3519ec76
AD
115112000-10-02 Akim Demaille <akim@epita.fr>
11512
11513 * src/nullable.h: New file.
11514 Propagate its inclusion.
11515 * src/nullable.c: Formatting changes.
11516
015acc48
AD
115172000-10-02 Akim Demaille <akim@epita.fr>
11518
11519 * src/reduce.h: New file.
11520 Propagate its inclusion.
11521 * src/reduce.c: Topological sort and other formatting changes.
11522 (bool, TRUE, FALSE): Move their definition to...
11523 * src/system.h: here.
11524
8963a27b
AD
115252000-10-02 Akim Demaille <akim@epita.fr>
11526
11527 * src/files.c: Formatting changes.
11528 (tryopen, tryclose, openfiles): Rename as...
11529 (xfopen, xfclose, open_files): this.
11530 (stringappend): static.
11531 * src/files.h: Complete the list of exported symbols.
11532 Propagate its use.
11533
a70083a3
AD
115342000-10-02 Akim Demaille <akim@epita.fr>
11535
11536 * src/reader.h: New file.
11537 Propagate its use instead of tedious list of `extern' and
11538 prototypes.
11539 * src/reader.c: Formatting changes, topological sort,
11540 s/register//.
11541
abadc117
AD
115422000-10-02 Akim Demaille <akim@epita.fr>
11543
11544 * src/lex.h: Prototype `lex.c' exported functions.
11545 * src/reader.c: Adjust.
11546 * src/lex.c: Formatting changes.
11547 (safegetc): Rename as...
11548 (xgetc): this.
11549
720d742f
AD
115502000-10-02 Akim Demaille <akim@epita.fr>
11551
11552 * src/lalr.h: New file.
11553 Propagate its inclusion instead of prototypes and `extern'.
11554 * src/lalr.c: Formatting changes, topological sorting etc.
11555
f2acea59
AD
115562000-10-02 Akim Demaille <akim@epita.fr>
11557
11558 * src/output.c (token_actions): Introduce a temporary array,
11559 YYDEFACT, that makes it possible for this function to use
11560 output_short_table.
11561
d019d655
AD
115622000-10-02 Akim Demaille <akim@epita.fr>
11563
11564 `user_toknums' is output as a `short[]' in `output.c', while it is
11565 defined as a `int[]' in `reader.c'. For consistency with the
11566 other output tables, `user_toknums' is now defined as a table of
11567 shorts.
11568
11569 * src/reader.c (user_toknums): Be a short table instead of an int
11570 table.
11571 Adjust dependencies.
11572
11573 Factor the short table outputs.
11574
11575 * src/output.c (output_short_table): New function.
11576 * src/output.c (output_gram, output_stos, output_rule_data)
11577 (output_base, output_table, output_check): Use it.
11578
6c89f1c1
AD
115792000-10-02 Akim Demaille <akim@epita.fr>
11580
11581 * src/output.c (output): Topological sort of the functions, in
11582 order to get rid of the `static' prototypes.
11583 No longer use `register'.
11584 * src/output.h: New file.
11585 Propagate its inclusion in files explicitly prototyping functions
11586 from output.c.
11587
d9efd181
AD
115882000-09-21 Akim Demaille <akim@epita.fr>
11589
11590 * src/atgeneral.m4: Update from Autoconf.
11591
c29240e7 115922000-09-21 Akim Demaille <akim@epita.fr>
2fa6973e
AD
11593
11594 * src/closure.h: New file.
11595 * src/closure.c: Formatting changes, topological sort over the
11596 functions, use of closure.h.
11597 (initialize_closure, finalize_closure): Rename as...
11598 (new_closure, free_closure): these. Adjust dependencies.
11599 * src/LR0.c: Formatting changes, topological sort, use of
11600 cloture.h.
11601 (initialize_states): Rename as...
11602 (new_states): this.
11603 * src/Makefile.am (noinst_HEADERS): Adjust.
11604
499daa50
AD
116052000-09-20 Akim Demaille <akim@epita.fr>
11606
11607 * src/acconfig.h: Don't protect config.h against multiple
11608 inclusion.
11609 Don't define PARAMS.
11610 * src/system.h: Define PARAMS.
11611 Remove some of the ad-hoc CPP magic for DOS, VMS etc.: this is the
11612 purpose of config.h. system.h must not try to fix wrong
11613 definitions in config.h.
11614
cc84fd5d
AD
116152000-09-20 Akim Demaille <akim@epita.fr>
11616
11617 * src/derives.h: New file.
11618 * src/main.c, src/derives.h: Use it.
11619 Formatting changes.
11620 * src/Makefile.am (noinst_HEADERS): Adjust.
11621
db5b3a89
AD
116222000-09-20 Akim Demaille <akim@epita.fr>
11623
11624 * tests/atgeneral.m4: Update from Autoconf.
11625 * tests/calc.m4 (_AT_DATA_CALC_Y, AT_DATA_CALC_Y, _AT_CHECK_CALC)
11626 (AT_CHECK_CALC): New macros.
11627 Use these macros to test bison with options `', `--raw',
11628 `--debug', `--yacc', `--yacc --debug'.
11629
ceed8467
AD
116302000-09-19 Akim Demaille <akim@epita.fr>
11631
11632 * src/output.c: Formatting changes.
11633 * src/machine.h: Remove, leaving its contents in...
11634 * src/system.h: here.
11635 Include stdio.h.
11636 Adjust all dependencies on stdio.h and machine.h.
11637 * src/getargs.h: New file.
11638 Let all `extern' declarations about getargs.c be replaced with
11639 inclusion of `getargs.h'.
11640 * src/Makefile.am (noinst_HEADERS): Adjust.
11641
11642 * tests/calc.m4 (yyin): Be initialized in main, not on the global
11643 scope.
11644 (yyerror): Returns void, not int.
11645 * doc/bison.texinfo: Formatting changes.
11646
05a1d24b
AD
116472000-09-19 Akim Demaille <akim@epita.fr>
11648
11649 * tests/calc.m4 (calc.y): Do not assign to stdin, as it's not
11650 portable.
11651
cbd25751
AD
116522000-09-18 Akim Demaille <akim@epita.fr>
11653
11654 * configure.in: Append WARNING_CFLAGS to CFLAGS.
11655 * src/Makefile.am (INCLUDES): Don't.
11656 Be ready to fetch headers in lib/.
11657
13863333
AD
116582000-09-18 Akim Demaille <akim@epita.fr>
11659
11660 * doc/bison.texinfo: Update the copyright.
11661 ANSIfy and GNUify the examples.
11662 Remove the old menu.
11663
0d533154
AD
116642000-09-18 Akim Demaille <akim@epita.fr>
11665
11666 First set of tests: use the `calc' example from the documentation.
11667
11668 * src/bison.s1 (yyparse): Condition the code using `yytname' which
11669 is defined only when YYDEBUG is.
11670 * m4/atconfig.m4 (AT_CONFIG): Adjust to Autoconf 2.13.
11671 * src/files.c (tryopen, tryclose): Formatting changes.
11672 Move to the top and be static.
11673 * src/reader.c (read_signed_integer): Likewise.
11674 * tests/calc.m4: New file.
11675 * Makefile.am, suite.m4: Adjust.
11676 * m4/atconfig.m4: Set BISON_SIMPLE and BISON_HAIRY.
11677
e79137ac
AD
116782000-09-18 Akim Demaille <akim@epita.fr>
11679
11680 Add support for an Autotest test suite for Bison.
11681
11682 * m4/m4.m4, m4/atconfig.m4: New files.
11683 * m4/Makefile.am (EXTRA_DIST): Adjust.
11684 * tests/suite.m4, tests/Makefile.am, tests/atgeneral.m4: New
11685 files.
11686 * src/getargs.c: Display a more standard --version message.
11687 * src/reader.c (reader): Formatting changes.
11688 No longer depend upon VERSION_STRING.
11689 * configure.in: No longer use `dnl'.
11690 Set up the test suite and the new directory `tests/.
11691 (VERSION_STRING): Remove.
11692
27821bff
AD
116932000-04-14 Akim Demaille <akim@epita.fr>
11694
11695 * src/reader.c (copy_comment2): New function, same as former
11696 `copy_comment', but outputs into two FILE *.
11697 (copy_comment): Use it.
11698 (parse_union_decl): Use it.
11699 (get_type, parse_start_decl): Use the same `invalid' message.
11700 (parse_start_decl, parse_union_decl): Use the same `multiple'
11701 message.
11702 (parse_union_decl, copy_guard, copy_action): Use the same
11703 `unmatched' message.
11704 * m4/Makefile.am (EXTRA_DIST): Add `warning.m4'.
11705
cfe5fbc0
AD
117062000-03-31 Akim Demaille <akim@epita.fr>
11707
11708 * src/files.c (tryopen, tryclose): Move to the top.
11709 Be static.
11710
cb7db13e
AD
117112000-03-31 Akim Demaille <akim@epita.fr>
11712
11713 * src/main.c (main): Don't call `done', exit does it.
11714
a0f6b076
AD
117152000-03-31 Akim Demaille <akim@epita.fr>
11716
36281465
AD
11717 * allocate.c: s/return (foo)/return foo/.
11718 * lalr.c: Likewise.
11719 * LR0.c: Likewise.
11720 * output.c: Likewise.
11721 * reader.c: Likewise.
11722 * symtab.c: Likewise.
11723 * vmsgetargs.c: Likewise.
11724
117252000-03-31 Akim Demaille <akim@epita.fr>
11726
11727 Clean up the error reporting functions.
a0f6b076
AD
11728
11729 * src/report.c: New file.
11730 * src/report.h: Likewise.
11731 * src/Makefile.am: Adjust.
11732 * m4/error.m4: New file.
11733 * m4/Makefile.am: Adjust.
11734 * configure.in (jm_PREREQ_ERROR): Call it.
11735 * src/main.c (int_to_string, banner, fatal_banner, warn_banner):
11736 Remove.
11737 (fatal, fatals): Remove. All callers use complain.c::fatal.
11738 (warn, warni, warns, warnss, warnss): Remove. All callers use
11739 complain.c::complain.
11740 (toomany): Remove, use fatal instead.
11741 * src/files.c (done): No argument, use complain_message_count.
11742 * src/main.c (main): Register `done' to `atexit'.
11743
11744 * src/getargs.c (usage): More `fputs', less `fprintf'.
11745
18539825
AD
117462000-03-28 Akim Demaille <akim@epita.fr>
11747
11748 * lib/: New directory.
11749 * Makefile.am (SUBDIRS): Adjust.
11750 * configure.in: Adjust.
11751 (LIBOBJS): Although not used yet, AC_SUBST it, otherwise it's
11752 useless.
11753 * src/alloca.c: Moved to lib/.
11754 * src/getopt.c: Likewise.
11755 * src/getopt1.c: Likewise.
11756 * src/getopt.h: Likewise.
11757 * src/ansi2knr.c: Likewise.
11758 * src/ansi2knr.1: Likewise.
11759 * src/Makefile.am: Adjust.
11760 * lib/Makefile.am: New file.
11761
9f306f2a
AD
117622000-03-28 Akim Demaille <akim@epita.fr>
11763
11764 * src/getargs.c (usage): Refresh the help message.
11765
0ba347b6
AD
117662000-03-17 Akim Demaille <akim@epita.fr>
11767
11768 * src/getopt1.c: Updated from textutils 2.0e
11769 * src/getopt.c: Likewise.
11770 * src/getopt.h: Likewise.
11771
dbe7f271
AD
117722000-03-17 Akim Demaille <akim@epita.fr>
11773
11774 * src/Makefile.am (bison.simple): Fix the awk program: quote only
11775 the file name, not the whole `#line LINE FILE'.
11776
75bbe78d
AD
117772000-03-17 Akim Demaille <akim@epita.fr>
11778
11779 On syntax errors, report the token on which we choked.
11780
aa5fd0ee
AD
11781 * src/bison.s1 (yyparse): In the label yyerrlab, when
11782 YYERROR_VERBOSE, add yychar in msg.
75bbe78d 11783
7b306f52
AD
117842000-03-17 Akim Demaille <akim@epita.fr>
11785
aa5fd0ee 11786 * src/reader.c (copy_at): New function.
7b306f52
AD
11787 (copy_guard): Use it.
11788 (copy_action): Use it.
11789
e87b5700
AD
117902000-03-17 Akim Demaille <akim@epita.fr>
11791
11792 Be kind to translators, save some useless translations.
11793
aa5fd0ee 11794 * src/main.c (banner): New function.
e87b5700
AD
11795 (fatal_banner): Use it.
11796 (warn_banner): Use it.
11797
ae3c3164
AD
117982000-03-17 Akim Demaille <akim@epita.fr>
11799
aa5fd0ee
AD
11800 * src/reader.c (copy_definition): Use copy_string and
11801 copy_comment. Removed now unused `match', `ended',
11802 `cplus_comment'.
ae3c3164
AD
11803 (copy_comment, copy_string): Moved, to be visible from
11804 copy_definition.
11805
4dc58e7c
AD
118062000-03-17 Akim Demaille <akim@epita.fr>
11807
aa5fd0ee
AD
11808 * src/reader.c (copy_string): Declare `static inline'. No
11809 problems with inline, since it is checked by configure.
4dc58e7c
AD
11810 (copy_comment): Likewise.
11811
0a6384c4
AD
118122000-03-17 Akim Demaille <akim@epita.fr>
11813
aa5fd0ee 11814 * src/reader.c (packsymbols): Formatting changes.
0a6384c4 11815
3cef001a
AD
118162000-03-17 Akim Demaille <akim@epita.fr>
11817
aa5fd0ee 11818 * src/reader.c (copy_comment): New function, factored out from:
3cef001a
AD
11819 (copy_action): Use it. Removed now unused `match', `ended',
11820 `cplus_comment'.
11821 (copy_guard): Likewise.
11822
ca36d2ef
AD
118232000-03-17 Akim Demaille <akim@epita.fr>
11824
aa5fd0ee 11825 * src/reader.c (copy_string): New function, factored out from:
ca36d2ef
AD
11826 (copy_action): Use it.
11827 (copy_guard): Likewise.
11828
6666f98f
AD
118292000-03-17 Akim Demaille <akim@epita.fr>
11830
11831 Change the handling of @s so that they behave exactly like $s.
11832 There is now a pseudo variable @$ (readble and writable), location
11833 of the lhs of the rule (by default ranging from the location of
11834 the first symbol of the rhs, to the location of the last symbol,
11835 or, if the rhs is empty, YYLLOC).
11836
11837 * src/bison.s1 [YYLSP_NEEDED] (yyloc): New variable, twin of
11838 yyval.
11839 (yyparse): When providing a default semantic action, provide a
11840 default location action.
11841 (after the $): No longer change `*YYLSP', just stack YYLOC the
11842 same way you stack YYVAL.
11843 * src/reader.c (read_declarations): Use warns.
11844 (copy_guard, case '@'): Also recognize `@$', expanded as `YYLOC'.
11845 (copy_action, case '@'): Likewise.
11846 Use a standard error message, to save useless work from
11847 translators.
11848
41aca2e0
AD
118492000-03-17 Akim Demaille <akim@epita.fr>
11850
aa5fd0ee
AD
11851 * src/bison.s1: Formatting and cosmetics changes.
11852 * src/reader.c: Likewise.
41aca2e0
AD
11853 Update the Copyright notice.
11854
dc08c1d5
AD
118552000-03-17 Akim Demaille <akim@epita.fr>
11856
aa5fd0ee
AD
11857 * src/bison.s1 (#line): All set to `#line' only, since the
11858 Makefile now handles them.
dc08c1d5 11859
9ee3c97b
AD
118602000-03-16 Akim Demaille <akim@epita.fr>
11861
11862 * src/output.c (output_rule_data): Output the documentation of
11863 some of the tables.
11864 (Copyright notice): Update.
11865 Formatting changes.
11866
0de741ca
AD
118672000-03-16 Akim Demaille <akim@epita.fr>
11868
11869 * src/bison.s1 [!YYDEBUG]: Define yydebug to 0. This allows to
11870 remove most `#if YYDEBUG != 0', since `if (yydebug)' is enough.
11871 One `#if YYDEBUG' remains, since it uses variables which are
11872 defined only if `YYDEBUG != 0'.
11873
bb10be54
AD
118742000-03-16 Akim Demaille <akim@epita.fr>
11875
11876 * src/bison.s1 (yyparse): Reorganize the definitions of the stacks
11877 and related variables so that the similarities are highlighted.
11878
b07b484a
AD
118792000-03-16 Akim Demaille <akim@epita.fr>
11880
11881 * src/bison.s1: Properly indent CPP directives.
11882
361f60b3
AD
118832000-03-16 Akim Demaille <akim@epita.fr>
11884
11885 * src/bison.s1: Properly indent the `alloca' CPP section.
11886
8c44d3ec
AD
118872000-03-16 Akim Demaille <akim@epita.fr>
11888
11889 Do not hard code values of directories in `configure.in'.
11890 Update the `configure' tool chain.
11891
11892 * configure.in (XPFILE, XPFILE1, LOCALEDIR): Remove, handled by
11893 src/makefile.am.
11894 (VERSION_STRING): Use the third arg of AC_DEFINE_UNQUOTED.
11895 (AC_OUTPUT): Add m4/Makefile.
11896 Bump to bison 1.28a, 1.29 has never been released.
11897 * acconfig.h (XPFILE, XPFILE1, LOCALEDIR): Remove, since they are
11898 handled via src/Makefile.am.
11899 (VERSION_STRING, PROTOTYPES, ENABLE_NLS, HAVE_CATGETS,
11900 HAVE_GETTEXT, HAVE_LC_MESSAGES, HAVE_STPCPY): Remove, handled by
11901 autoheader.
11902 * Makefile.am (SUBDIRS): Add m4.
11903 (ACLOCAL_AM_FLAGS): New variable.
11904 (AUTOMAKE_OPTIONS): Add check-news.
11905 * src/Makefile.am (bison.simple): Use awk to replace #line lines with
11906 the proper line number and file name.
11907 (DEFS): Propagate the location of bison library files and of the
11908 locale files.
11909 (INCLUDES): Added `-I ..' so that one can compile with srcdir !=
11910 builddir.
11911 * acinclude.m4: Remove, replaced by the directory m4.
11912 * m4/Makefile.am (EXTRA_DIST): New variable.
11913 * m4/gettext.m4: New file, from the fileutils.
11914 * m4/lcmessage.m4: Likewise
11915 * m4/progtest.m4: Likewise.
11916 * m4/bison-decl.m4: New file, extracted from former acinclude.m4.
11917
f95997e7
AD
119182000-03-10 Akim Demaille <akim@epita.fr>
11919
11920 * src/closure.c:
11921 Formatting changes of various comments.
11922 Respect the GNU coding standards at various places.
11923 Don't use `_()' when no translation is needed.
11924
119251999-12-13 Jesse Thilo <jthilo@gnu.org>
11926
11927 * src/files.c:
11928 OS/2 honors TMPDIR environment variable.
11929
119301999-12-13 Jesse Thilo <jthilo@gnu.org>
11931
11932 * doc/bison.texinfo: Tweaked spelling and grammar.
11933 Updated ISBN.
11934 Removed reference to price of printed copy.
11935 Mention BISON_SIMPLE and BISON_HAIRY.
11936
119371999-12-13 Jesse Thilo <jthilo@gnu.org>
11938
11939 * configure.in, NEWS:
11940 Bison 1.29 released.
11941
119421999-10-27 Jesse Thilo <jthilo@gnu.org>
11943
11944 * doc/.cvsignore, doc/Makefile.am, doc/refcard.tex:
11945 Added reference card.
11946
119471999-07-26 Jesse Thilo <jthilo@gnu.org>
11948
11949 * po/ru.po: Added Russian translation.
11950
119511999-07-26 Jesse Thilo <jthilo@gnu.org>
11952
11953 * configure.in: Added Russian translation.
11954
119551999-07-06 Jesse Thilo <jthilo@gnu.org>
11956
11957 * configure.in, NEWS, README:
11958 Released version 1.28.
11959
119601999-06-14 Jesse Thilo <jthilo@gnu.org>
11961
11962 * src/system.h:
11963 Squashed redefinition warning on some systems.
11964
11965 * src/getargs.c, src/Makefile.am, src/reader.c, src/version.c:
11966 Have configure build version string instead of relying on ANSI string
11967 concatentation.
11968
119691999-06-14 Jesse Thilo <jthilo@gnu.org>
11970
11971 * po/POTFILES.in: Got rid of version.c.
11972
119731999-06-14 Jesse Thilo <jthilo@gnu.org>
11974
11975 * acconfig.h, configure.in:
11976 Have configure build version string instead of relying on ANSI string
11977 concatentation.
11978
119791999-06-08 Jesse Thilo <jthilo@gnu.org>
11980
11981 * doc/bison.1:
11982 Dropped mention of `+' for long-named options.
11983
119841999-05-30 Jesse Thilo <jthilo@gnu.org>
11985
11986 * src/files.c: Added <unistd.h> for unlink().
11987
11988 * src/Makefile.am, src/system.h:
11989 I18n fixes.
11990
119911999-05-30 Jesse Thilo <jthilo@gnu.org>
11992
11993 * README: Added a FAQ list.
11994
11995 * configure.in, acconfig.h:
11996 I18n fixes.
11997
119981999-05-30 Jesse Thilo <jthilo@gnu.org>
11999
12000 * doc/FAQ, doc/Makefile.am:
12001 Added a FAQ list.
12002
120031999-05-19 Jesse Thilo <jthilo@gnu.org>
12004
12005 * src/alloc.h, src/symtab.h, src/version.c:
12006 Protected inclusion of "config.h" with HAVE_CONFIG_H.
12007
120081999-04-18 Jesse Thilo <jthilo@gnu.org>
12009
12010 * src/.cvsignore, src/Makefile.am:
12011 Reorganized: sources in `src', documentation in `doc'.
12012
12013 * src/lex.c (literalchar):
12014 fixed the code for escaping double quotes (thanks
12015 Jonathan Czisny.)
12016
120171999-04-18 Jesse Thilo <jthilo@gnu.org>
12018
12019 * po/de.po, po/es.po, po/fr.po, po/nl.po, po/POTFILES.in:
12020 Adjusted paths to reflect directory reorganization.
12021
120221999-04-18 Jesse Thilo <jthilo@gnu.org>
12023
12024 * doc/.cvsignore, doc/Makefile.am:
12025 Reorganized: sources in `src', documentation in `doc'.
12026
120271999-04-18 Jesse Thilo <jthilo@gnu.org>
12028
12029 * configure.in:
12030 Updated AC_INIT file to reflect directory reorganization.
12031
12032 * configure.in, .cvsignore, Makefile.am, POTFILES.in:
12033 Reorganized: sources in `src', documentation in `doc'.
12034
120351999-04-13 Jesse Thilo <jthilo@gnu.org>
12036
12037 * src/allocate.c:
12038 Don't declare calloc() and realloc() if not necessary.
12039
120401999-04-13 Jesse Thilo <jthilo@gnu.org>
12041
12042 * configure.in, acconfig.h, acinclude.m4:
12043 Don't declare calloc() and realloc() if not necessary.
12044
120451999-03-23 Jesse Thilo <jthilo@gnu.org>
12046
12047 * po/.cvsignore: Added i18n support.
12048
120491999-03-23 Jesse Thilo <jthilo@gnu.org>
12050
12051 * acconfig.h, configure.in, Makefile.am:
12052 Added i18n support.
12053
120541999-03-22 Jesse Thilo <jthilo@gnu.org>
12055
12056 * src/bison.s1: Fixed #line numbers.
12057
120581999-03-15 Jesse Thilo <jthilo@gnu.org>
12059
12060 * po/es.po, po/fr.po, po/nl.po, po/de.po:
12061 Added PO files from Translation Project.
12062
120631999-03-03 Jesse Thilo <jthilo@gnu.org>
12064
12065 * Makefile.am:
12066 Added support for non-ANSI compilers (ansi2knr).
12067
120681999-02-16 Jesse Thilo <jthilo@gnu.org>
12069
12070 * configure.in: Bumped version number to 1.27.
12071
12072 * Makefile.am:
12073 Added `bison.simple' to list of files removed by `make distclean'.
12074
120751999-02-12 Jesse Thilo <jthilo@gnu.org>
12076
12077 * src/files.c, src/files.h:
12078 Defined locations of parser files in config.h instead of Makefile.
12079
120801999-02-12 Jesse Thilo <jthilo@gnu.org>
12081
12082 * acconfig.h, acinclude.m4, configure.in, Makefile.am:
12083 Defined locations of parser files in config.h instead of Makefile.
12084
120851999-02-09 Jesse Thilo <jthilo@gnu.org>
12086
12087 * Makefile.am:
12088 Removed inappropriate use of $< macro.
12089
120901999-02-05 Jesse Thilo <jthilo@gnu.org>
12091
12092 * po/Makefile.in.in, po/POTFILES.in:
12093 Add `po' directory skeleton.
12094
120951999-01-27 Jesse Thilo <jthilo@gnu.org>
12096
12097 * README: Document help-bison list.
12098
12099 * configure.in: Add check for mkstemp().
12100
121011999-01-20 Jesse Thilo <jthilo@gnu.org>
12102
12103 * src/conflicts.c, src/LR0.c, src/output.c, src/reader.c:
12104 Hush a few compiler warnings.
12105
12106 * src/files.c:
12107 Add tryclose(), which verifies that fclose was successful.
12108 Hush a couple of compiler warnings.
12109
121101999-01-20 Jesse Thilo <jthilo@gnu.org>
12111
12112 * Makefile.am, OChangeLog:
12113 ChangeLog is now automatically generated. Include the old version as
12114 OChangeLog.
12115
121161999-01-14 Jesse Thilo <jthilo@gnu.org>
12117
12118 * src/gram.h, src/lalr.c, src/lex.c, src/lex.h, src/machine.h, src/main.c, src/nullable.c, src/output.c, src/print.c, src/reader.c, src/reduce.c, src/state.h, src/symtab.c, src/symtab.h, src/types.h, src/vmsgetargs.c, src/warshall.c, src/allocate.c, src/alloc.h, src/bison.s1, src/closure.c, src/conflicts.c, src/derives.c, src/files.c, src/files.h, src/getargs.c, src/gram.c, src/LR0.c:
12119 Update FSF address.
12120
121211999-01-14 Jesse Thilo <jthilo@gnu.org>
12122
12123 * doc/bison.texinfo: Fix formatting glitch.
12124
12125 * doc/bison.texinfo: Update FSF address.
12126
121271999-01-14 Jesse Thilo <jthilo@gnu.org>
12128
12129 * acconfig.h: Update FSF address.
12130
121311999-01-08 Jesse Thilo <jthilo@gnu.org>
12132
12133 * src/system.h:
12134 Don't define PACKAGE here, since config.h defines it.
12135
121361998-12-30 Jesse Thilo <jthilo@gnu.org>
12137
12138 * src/reader.c: Update copyright date.
12139
12140 * src/main.c:
12141 Ditch sprintf to statically-sized buffers in fatal/warn functions in
12142 favor of output directly to stderr (avoids buffer overruns).
12143
12144 * src/reader.c: Some checks for premature EOF.
12145
12146 * src/allocate.c, src/alloc.h, src/closure.c, src/conflicts.c, src/derives.c, src/getargs.c, src/gram.c, src/lalr.c, src/lex.c, src/LR0.c, src/main.c, src/nullable.c, src/output.c, src/print.c, src/reduce.c, src/symtab.c, src/symtab.h, src/warshall.c:
12147 Use prototypes if the compiler understands them.
12148
12149 * src/files.c: Honor TMPDIR on Unix hosts.
12150 Use prototypes if the compiler understands them.
12151
12152 * src/reader.c:
12153 Fix a couple of buffer overrun bugs.
12154 Use prototypes if the compiler understands them.
12155
12156 * src/system.h: Include unistd.h and ctype.h.
12157 Use #ifdef instead of #if for NLS symbols.
12158
121591998-12-30 Jesse Thilo <jthilo@gnu.org>
12160
12161 * doc/bison.texinfo:
12162 Delete comment "consider using @set for edition number, etc..." since
12163 we now are doing so.
12164
121651998-12-30 Jesse Thilo <jthilo@gnu.org>
12166
12167 * configure.in:
12168 Use prototypes if the compiler understands them.
12169
12170 * NEWS: Document 1.26 highlights.
12171
12172 * Makefile.am: Require Automake 1.3 or later.
12173
12174 * acconfig.h:
12175 Use prototypes if the compiler understands them.
12176
121771998-12-29 Jesse Thilo <jthilo@gnu.org>
12178
12179 * src/version.c:
12180 Use VERSION symbol from automake for version number.
12181
121821998-12-29 Jesse Thilo <jthilo@gnu.org>
12183
12184 * acconfig.h, configure.in, version.cin:
12185 Use VERSION symbol from automake for version number.
12186
121871998-11-28 Jesse Thilo <jthilo@gnu.org>
12188
12189 * Makefile.am:
12190 Distribute original version of simple parser (bison.s1), not built
12191 version (bison.simple).
12192
121931998-11-28 Jesse Thilo <jthilo@gnu.org>
12194
12195 * doc/bison.texinfo: Add info dir entry.
12196
12197 * doc/bison.texinfo:
12198 Let automake put version number into documentation.
12199
122001998-11-26 Jesse Thilo <jthilo@gnu.org>
12201
12202 * src/bison.cld, src/build.com, src/vmshlp.mar:
12203 Add non-RCS files from /gd/gnu/bison.
12204
122051998-11-26 Jesse Thilo <jthilo@gnu.org>
12206
12207 * doc/bison.1:
12208 Document the BISON_HAIRY and BISON_SIMPLE variables.
12209
122101998-11-25 Jesse Thilo <jthilo@gnu.org>
12211
12212 * src/version.c: Build version.c automatically.
12213
12214 * src/reader.c:
12215 Fix token numbering (used to start at 258, not 257).
12216
12217 * src/system.h: Include config.h.
12218
12219 * src/getargs.c: Update bug report address.
12220
12221 * src/alloca.c, src/getopt1.c, src/getopt.c, src/getopt.h:
12222 Get latest copies of alloca.c, getopt.c, getopt.h, getopt1.c from gnu.org.
12223
122241998-11-25 Jesse Thilo <jthilo@gnu.org>
12225
12226 * Makefile.am:
12227 Rename bison.simple to bison.s1 (bison.simple is then built from bison.s1).
12228
12229 * configure.in, version.cin:
12230 Build version.c automatically.
12231
12232 * AUTHORS: Add AUTHORS file.
12233
12234 * README: Update bug report address.
12235
12236 * bison.simple:
12237 Rename bison.simple to bison.s1 (bison.simple is then built from bison.s1).
12238
12239 * configure.in, Makefile.am, Makefile.in, stamp-h.in:
12240 Add automake stuff.
12241
122421998-11-25 Jesse Thilo <jthilo@gnu.org>
12243
12244 * doc/bison.texinfo: Clean up some formatting.
12245
122461998-05-05 Richard Stallman <rms@gnu.org>
12247
12248 * doc/bison.texinfo:
12249 Explain better why to make a pure parser.
12250
122511998-01-05 Richard Stallman <rms@gnu.org>
12252
12253 * src/files.c (openfiles):
12254 [_WIN32 && !__CYGWIN32__] Use TEMP or Temp to
12255 find a temporary directory, if possible. Do not unlink files while
12256 they are open.
12257
122581997-08-25 Richard Stallman <rms@gnu.org>
12259
12260 * src/reader.c (stack_offset;):
12261 Change some warni to warns.
12262
12263 * src/lex.c (literalchar): Use warns, not warni.
12264
122651997-06-28 Richard Stallman <rms@gnu.org>
12266
12267 * src/bison.s1: Add a Bison version comment.
12268
12269 * src/main.c (fatal, warn, berror):
12270 Use program_name.
12271
122721997-06-28 Richard Stallman <rms@gnu.org>
12273
12274 * Makefile.in (bison_version): New variable.
12275 (dist): Use that variable.
12276 (bison.s1): Substitute the Bison version into bison.simple.
12277
12278 * bison.simple: Add a Bison version comment.
12279
122801997-06-18 Richard Stallman <rms@gnu.org>
12281
12282 * src/main.c (fatal, warn, berror):
12283 Make error messages standard.
12284 (toomany): Improve error message text.
12285
12286 * src/LR0.c, src/closure.c, src/conflicts.c, src/derives.c, src/files.c, src/lalr.c, src/lex.c, src/nullable.c, src/output.c, src/print.c, src/reader.c, src/reduce.c, src/symtab.c:
12287 new.h renamed to alloc.h.
12288
122891997-06-18 Richard Stallman <rms@gnu.org>
12290
12291 * Makefile.in: new.h renamed to alloc.h.
12292
122931997-05-24 Richard Stallman <rms@gnu.org>
12294
12295 * src/lex.c (literalchar):
12296 Fix the code for escaping \, " and '.
12297
12298 (lex): Avoid trouble when there are many chars
12299 to discard in a char literal with just several chars in it.
12300
123011997-05-17 Richard Stallman <rms@gnu.org>
12302
12303 * src/bison.s1:
12304 Use malloc, if using alloca is troublesome.
12305 (YYSTACK_USE_ALLOCA): New flag macro.
12306 Define it for some systems and compilers.
12307 (YYSTACK_ALLOC): New macro.
12308 (yyparse): Use YYSTACK_ALLOC to allocate stack.
12309 If it was malloc'd, free it.
12310
123111997-05-17 Richard Stallman <rms@gnu.org>
12312
12313 * bison.simple:
12314 Use malloc, if using alloca is troublesome.
12315 (YYSTACK_USE_ALLOCA): New flag macro.
12316 Define it for some systems and compilers.
12317 (YYSTACK_ALLOC): New macro.
12318 (yyparse): Use YYSTACK_ALLOC to allocate stack.
12319 If it was malloc'd, free it.
12320
123211997-04-23 Richard Stallman <rms@gnu.org>
12322
12323 * src/bison.s1:
12324 (alloca) [__hpux]: Always define as __builtin_alloca.
12325
123261997-04-23 Richard Stallman <rms@gnu.org>
12327
12328 * bison.simple:
12329 (alloca) [__hpux]: Always define as __builtin_alloca.
12330
123311997-04-22 Richard Stallman <rms@gnu.org>
12332
12333 * src/bison.s1:
12334 [__hpux]: Include alloca.h (right for HPUX 10)
12335 instead of declaring alloca (right for HPUX 9).
12336
12337 * src/bison.s1 (__yy_memcpy):
12338 Declare arg `count' as unsigned int.
12339 (yyparse): Cast third arg to __yy_memcpy to unsigned int.
12340
123411997-04-22 Richard Stallman <rms@gnu.org>
12342
12343 * bison.simple:
12344 [__hpux]: Include alloca.h (right for HPUX 10)
12345 instead of declaring alloca (right for HPUX 9).
12346
12347 * bison.simple (__yy_memcpy):
12348 Declare arg `count' as unsigned int.
12349 (yyparse): Cast third arg to __yy_memcpy to unsigned int.
12350
123511997-01-03 Richard Stallman <rms@gnu.org>
12352
12353 * src/allocate.c: [__STDC__ or _MSC_VER]:
12354 Declare calloc and realloc to return void *.
12355
123561997-01-02 Richard Stallman <rms@gnu.org>
12357
12358 * src/system.h:
12359 [_MSC_VER]: Include stdlib.h and process.h.
12360 [_MSC_VER] (getpid): Define as macro--translate it to _getpid.
12361
12362 * src/main.c (main): Return FAILURE as a value.
12363 (printable_version): Declare arg as int, not char.
12364
123651997-01-02 Richard Stallman <rms@gnu.org>
12366
12367 * Makefile.in (dist):
12368 Explicitly check for symlinks, and copy them.
12369
123701996-12-19 Richard Stallman <rms@gnu.org>
12371
12372 * src/files.c:
12373 [_MSC_VER] (XPFILE, XPFILE1): Define, if not already defined.
12374
123751996-12-18 Paul Eggert <eggert@gnu.org>
12376
12377 * src/bison.s1 (yyparse):
12378 If __GNUC__ and YYPARSE_PARAM are both defined,
12379 declare yyparse to have a void * argument.
12380
123811996-12-18 Paul Eggert <eggert@gnu.org>
12382
12383 * bison.simple (yyparse):
12384 If __GNUC__ and YYPARSE_PARAM are both defined,
12385 declare yyparse to have a void * argument.
12386
123871996-12-17 Richard Stallman <rms@gnu.org>
12388
12389 * src/reduce.c (nbits): Add some casts.
12390
123911996-08-12 Richard Stallman <rms@gnu.org>
12392
12393 * src/bison.s1: Test _MSDOS as well as _MSDOS_.
12394
123951996-08-12 Richard Stallman <rms@gnu.org>
12396
12397 * bison.simple: Test _MSDOS as well as _MSDOS_.
12398
123991996-07-31 Richard Stallman <rms@gnu.org>
12400
12401 * src/bison.s1:
12402 [__sun && __i386]: Include alloca.h.
12403
124041996-07-31 Richard Stallman <rms@gnu.org>
12405
12406 * bison.simple:
12407 [__sun && __i386]: Include alloca.h.
12408
124091996-07-30 Richard Stallman <rms@gnu.org>
12410
12411 * src/bison.s1: Comment change.
12412
12413 * src/bison.s1: Test _MSDOS_, not MSDOS.
12414
124151996-07-30 Richard Stallman <rms@gnu.org>
12416
12417 * bison.simple: Comment change.
12418
12419 * bison.simple: Test _MSDOS_, not MSDOS.
12420
124211996-06-01 Richard Stallman <rms@gnu.org>
12422
12423 * src/reduce.c, src/reader.c, src/print.c, src/output.c, src/nullable.c, src/lex.c, src/lalr.c, src/getargs.c, src/derives.c, src/conflicts.c, src/closure.c, src/allocate.c:
12424 Insert `_' macro around many string constants.
12425
12426 * src/main.c:
12427 Insert `_' macro around many string constants.
12428
12429 (main): Call setlocale, bindtextdomain and textdomain.
12430
12431 * src/system.h: [HAVE_LOCALE_H]: Include locale.h.
12432 [! HAVE_LOCALE_H] (setlocale): Define as no-op.
12433 [ENABLE_NLS]: Include libintl.h.
12434 [ENABLE_NLS] (gettext): Define.
12435 [! ENABLE_NLS] (bintextdomain, textdomain, _): Consolation definitions.
12436 (N_, PACKAGE, LOCALEDIR): New macros.
12437
124381996-06-01 Richard Stallman <rms@gnu.org>
12439
12440 * POTFILES.in: New file.
12441
12442 * Makefile.in (allocate.o):
12443 Define target explicitly.
12444
12445 * Makefile.in (CFLAGS): Set to @CFLAGS@.
12446 (LDFLAGS): Set to @LDFLAGS@.
12447 (configure): Run autoconf only if preceding `cd' succeeds.
12448 (bison.s1): Redirect output to temporary file then move the
12449 temporary to the target, rather than redirecting directly to bison.s1.
12450 (clean): Remove config.status and config.log.
12451 (distclean): Don't remove config.status here.
12452
124531996-05-12 Richard Stallman <rms@gnu.org>
12454
12455 * src/bison.s1:
12456 (__yy_memcpy) [__cplusplus]: Reorder declarations of variables f and t.
12457
124581996-05-12 Richard Stallman <rms@gnu.org>
12459
12460 * bison.simple:
12461 (__yy_memcpy) [__cplusplus]: Reorder declarations of variables f and t.
12462
124631996-05-11 Richard Stallman <rms@gnu.org>
12464
12465 * src/bison.s1 (__yy_memcpy):
12466 Really reorder the args, as was supposedly done on Feb 14 1995.
12467 (yyparse): Calls changed accordingly.
12468
124691996-05-11 Richard Stallman <rms@gnu.org>
12470
12471 * Makefile.in (dist): Don't use $(srcdir).
12472
12473 * bison.simple (__yy_memcpy):
12474 Really reorder the args, as was supposedly done on Feb 14 1995.
12475 (yyparse): Calls changed accordingly.
12476
124771996-01-27 Richard Stallman <rms@gnu.org>
12478
12479 * src/output.c (output_rule_data):
12480 Test YYERROR_VERBOSE in the conditional
12481 around the definition of ttyname.
12482
124831995-12-29 Richard Stallman <rms@gnu.org>
12484
12485 * src/bison.s1:
12486 Fix line numbers in #line commands.
12487
124881995-12-29 Richard Stallman <rms@gnu.org>
12489
12490 * bison.simple:
12491 Fix line numbers in #line commands.
12492
124931995-12-27 Richard Stallman <rms@gnu.org>
12494
12495 * src/bison.s1 (YYPARSE_PARAM_DECL):
12496 In C++, make it always null.
12497 (YYPARSE_PARAM_ARG): New macro.
12498 (yyparse): Use YYPARSE_PARAM_ARG.
12499
125001995-12-27 Richard Stallman <rms@gnu.org>
12501
12502 * bison.simple (YYPARSE_PARAM_DECL):
12503 In C++, make it always null.
12504 (YYPARSE_PARAM_ARG): New macro.
12505 (yyparse): Use YYPARSE_PARAM_ARG.
12506
125071995-11-29 Richard Stallman <rms@gnu.org>
12508
12509 * doc/bison.texinfo:
12510 Describe literal string tokens, %raw, %no_lines, %token_table.
12511
125121995-11-29 Daniel Hagerty <hag@gnu.org>
12513
12514 * doc/bison.texinfo: Fixed update date
12515
125161995-10-16 Richard Stallman <rms@gnu.org>
12517
12518 * src/version.c: Version 1.25.
12519
125201995-10-16 Richard Stallman <rms@gnu.org>
12521
12522 * NEWS: *** empty log message ***
12523
125241995-10-16 Richard Stallman <rms@gnu.org>
12525
12526 * doc/bison.1, doc/bison.rnh:
12527 Add new options.
12528
125291995-10-15 Richard Stallman <rms@gnu.org>
12530
12531 * src/vmsgetargs.c, src/getargs.c:
12532 Added -n, -k, and -raw switches.
12533 (noparserflag, toknumflag, rawtoknumflag): New variables.
12534
12535 * src/symtab.h (SALIAS):
12536 New #define for adding aliases to %token.
12537 (struct bucket): Added `alias' field.
12538
12539 * src/reduce.c (reduce_grammar):
12540 Revise error message.
12541 (print_notices): Remove final `.' from error message.
12542
12543 * src/reader.c (reader_output_yylsp):
12544 New function.
12545 (readgram): Use `#if 0' around code that accepted %command
12546 inside grammar rules: The documentation doesn't allow it,
12547 and it will fail since the %command processors scan for the next %.
12548 (parse_token_decl): Extended the %token
12549 declaration to allow a multi-character symbol as an alias.
12550 (parse_thong_decl): New function.
12551 (read_declarations): Added %thong declarations.
12552 (read_declarations): Handle NOOP to deal with allowing
12553 % declarations as another means to specify the flags.
12554 (readgram): Allow %prec prior to semantics embedded in a rule.
12555 (skip_to_char, read_declarations, copy_definition)
12556 (parse_token_decl, parse_start_decl, parse_type_decl)
12557 (parse_assoc_decl, parse_union_decl, parse_expect_decl)
12558 (get_type_name, copy_guard, copy_action, readgram)
12559 (get_type, packsymbols): Revised most error messages.
12560 Changed `fatal' to `warnxxx' to avoid aborting for error.
12561 Revised and use multiple warnxxx functions to avoid using VARARGS1.
12562 (read_declarations): Improve the error message for
12563 an invalid character. Do not abort.
12564 (read_declarations, copy_guard, copy_action): Use
12565 printable_version to avoid unprintable characters in printed output.
12566 (parse_expect_decl): Error if argument to %expect exceeds 10 digits.
12567 (parse_token_decl, parse_assoc_decl, parse_type_decl, get_type):
12568 Allow the type of a non-terminal can be given
12569 more than once, as long as all specifications give the same type.
12570
12571 * src/output.c:
12572 (output_headers, output_trailers, output, output_gram)
12573 (output_rule_data): Implement noparserflag variable.
12574 Implement toknumflag variable.
12575 (output): Call reader_output_yylsp to output LTYPESTR.
12576
12577 * src/main.c (main):
12578 If reader sees an error, don't process the grammar.
12579 (fatals): Updated to not use VARARGS1.
12580 (printable_version, int_to_string, warn, warni, warns, warnss)
12581 (warnsss): New error reporting functions. Avoid abort for error.
12582
12583 * src/lex.h:
12584 Added THONG and NOOP for alias processing.
12585 Added SETOPT for the new code that allows setting options with %flags.
12586
12587 * src/lex.c:
12588 Include getopt.h. Add some extern decls.
12589 (safegetc): New function to deal with EOF gracefully.
12590 (literalchar); new function to deal with reading \ escapes.
12591 (lex): Use literalchar.
12592 (lex): Implemented "..." tokens.
12593 (literalchar, lex, parse_percent_token): Made tokenbuffer
12594 always contain the token. This includes growing the token
12595 buffer while reading an integer.
12596 (parse_percent_token): Replaced if-else statement with percent_table.
12597 (parse_percent_token): Added % declarations as another
12598 way to specify the flags -n, -l, and -r. Also added hooks for
12599 -d, -k, -y, -v, -t, -p, -b, -o, but implementation requires
12600 major changes to files.c.
12601 (lex) Retain in the incoming stream a character following
12602 an incorrect '/'.
12603 (skip_white_space, lex): Revised most error messages
12604 and changed fatal to warn to avoid aborting.
12605 (percent_table): Added %thong declarations.
12606
12607 * src/gram.h: Comment changes.
12608
12609 * src/files.c (openfiles, open_extra_files, done):
12610 Add faction flag
12611 and actfile file. Handle noparserflag. Both for -n switch.
12612
12613 * src/conflicts.c (resolve_sr_conflict):
12614 Remove use of alloca.
12615
126161995-06-01 Jim Meyering <meyering@gnu.org>
12617
12618 * doc/bison.texinfo: *** empty log message ***
12619
126201995-05-06 Richard Stallman <rms@gnu.org>
12621
12622 * src/bison.s1: Comment change.
12623
126241995-05-06 Richard Stallman <rms@gnu.org>
12625
12626 * bison.simple: Comment change.
12627
126281995-05-03 Richard Stallman <rms@gnu.org>
12629
12630 * src/version.c: Version now 1.24.
12631
12632 * src/bison.s1: Change distribution terms.
12633
12634 * src/version.c: Version now 1.23.
12635
126361995-05-03 Richard Stallman <rms@gnu.org>
12637
12638 * doc/bison.texinfo:
12639 Rewrite "Conditions for Using Bison".
12640 Update version to 1.24.
12641
126421995-05-03 Richard Stallman <rms@gnu.org>
12643
12644 * bison.simple: Change distribution terms.
12645
126461995-02-23 Richard Stallman <rms@gnu.org>
12647
12648 * src/files.c: Test __VMS_POSIX as well as VMS.
12649
126501995-02-14 Jim Meyering <meyering@gnu.org>
12651
12652 * src/bison.s1 (__yy_memcpy):
12653 Renamed from __yy_bcopy to avoid
12654 confusion. Reverse FROM and TO arguments to be consistent with
12655 those of memcpy.
12656
126571995-02-14 Jim Meyering <meyering@gnu.org>
12658
12659 * bison.simple (__yy_memcpy):
12660 Renamed from __yy_bcopy to avoid
12661 confusion. Reverse FROM and TO arguments to be consistent with
12662 those of memcpy.
12663
126641994-11-10 David J. MacKenzie <djm@gnu.org>
12665
12666 * NEWS: reformat
12667
12668 * NEWS: New file.
12669
12670 * Makefile.in (DISTFILES): Include NEWS.
12671
12672 * Makefile.in (DISTFILES):
12673 Include install-sh, not install.sh.
12674
12675 * configure.in: Update to Autoconf v2 macro names.
12676
126771994-10-05 David J. MacKenzie <djm@gnu.org>
12678
12679 * Makefile.in: fix typo
12680
12681 * Makefile.in (prefix, exec_prefix):
12682 Let configure set them.
12683
126841994-09-28 David J. MacKenzie <djm@gnu.org>
12685
12686 * Makefile.in: Set datadir to $(prefix)/share.
12687
126881994-09-15 Richard Stallman <rms@gnu.org>
12689
12690 * src/bison.s1:
12691 Update copyright notice and GPL version.
12692
126931994-09-15 Richard Stallman <rms@gnu.org>
12694
12695 * bison.simple:
12696 Update copyright notice and GPL version.
12697
126981994-07-12 Richard Stallman <rms@gnu.org>
12699
12700 * src/reduce.c, src/reader.c:
12701 entered into RCS
12702
127031994-05-05 David J. MacKenzie <djm@gnu.org>
12704
12705 * Makefile.in: entered into RCS
12706
127071994-03-26 Richard Stallman <rms@gnu.org>
12708
12709 * src/bison.s1: entered into RCS
12710
127111994-03-26 Richard Stallman <rms@gnu.org>
12712
12713 * bison.simple: entered into RCS
12714
127151994-03-25 Richard Stallman <rms@gnu.org>
12716
12717 * src/main.c: entered into RCS
12718
127191994-03-24 Richard Stallman <rms@gnu.org>
12720
12721 * src/conflicts.c: entered into RCS
12722
127231994-01-02 Richard Stallman <rms@gnu.org>
12724
12725 * Makefile.in: *** empty log message ***
12726
127271993-11-21 Richard Stallman <rms@gnu.org>
12728
12729 * src/bison.s1: *** empty log message ***
12730
127311993-11-21 Richard Stallman <rms@gnu.org>
12732
12733 * doc/bison.texinfo: entered into RCS
12734
12735 * doc/bison.texinfo: *** empty log message ***
12736
127371993-11-21 Richard Stallman <rms@gnu.org>
12738
12739 * bison.simple: *** empty log message ***
12740
127411993-10-25 David J. MacKenzie <djm@gnu.org>
12742
12743 * doc/bison.texinfo: *** empty log message ***
12744
127451993-10-19 Richard Stallman <rms@gnu.org>
12746
12747 * src/bison.s1: *** empty log message ***
12748
127491993-10-19 Richard Stallman <rms@gnu.org>
12750
12751 * bison.simple: *** empty log message ***
12752
127531993-10-14 Richard Stallman <rms@gnu.org>
12754
12755 * src/bison.s1: *** empty log message ***
12756
127571993-10-14 Richard Stallman <rms@gnu.org>
12758
12759 * bison.simple: *** empty log message ***
12760
127611993-09-14 David J. MacKenzie <djm@gnu.org>
12762
12763 * doc/bison.texinfo: *** empty log message ***
12764
127651993-09-13 Noah Friedman <friedman@gnu.org>
12766
12767 * Makefile.in: *** empty log message ***
12768
127691993-09-10 Richard Stallman <rms@gnu.org>
12770
12771 * src/conflicts.c: *** empty log message ***
12772
12773 * src/system.h: entered into RCS
12774
127751993-09-10 Richard Stallman <rms@gnu.org>
12776
12777 * doc/bison.1: entered into RCS
12778
127791993-09-06 Noah Friedman <friedman@gnu.org>
12780
12781 * src/version.c: entered into RCS
12782
127831993-09-06 Noah Friedman <friedman@gnu.org>
12784
12785 * Makefile.in: *** empty log message ***
12786
127871993-07-30 David J. MacKenzie <djm@gnu.org>
12788
12789 * Makefile.in: *** empty log message ***
12790
127911993-07-24 Richard Stallman <rms@gnu.org>
12792
12793 * src/bison.s1: *** empty log message ***
12794
127951993-07-24 Richard Stallman <rms@gnu.org>
12796
12797 * bison.simple: *** empty log message ***
12798
127991993-07-08 David J. MacKenzie <djm@gnu.org>
12800
12801 * Makefile.in: *** empty log message ***
12802
128031993-07-04 Richard Stallman <rms@gnu.org>
12804
12805 * src/bison.s1: *** empty log message ***
12806
128071993-07-04 Richard Stallman <rms@gnu.org>
12808
12809 * bison.simple: *** empty log message ***
12810
128111993-06-26 David J. MacKenzie <djm@gnu.org>
12812
12813 * src/getargs.c: entered into RCS
12814
128151993-06-26 David J. MacKenzie <djm@gnu.org>
12816
12817 * doc/bison.texinfo: *** empty log message ***
12818
12819 * doc/bison.1: New file.
12820
128211993-06-25 Richard Stallman <rms@gnu.org>
12822
12823 * src/getargs.c: New file.
12824
128251993-06-16 Richard Stallman <rms@gnu.org>
12826
12827 * src/bison.s1: *** empty log message ***
12828
128291993-06-16 Richard Stallman <rms@gnu.org>
12830
12831 * bison.simple: *** empty log message ***
12832
128331993-06-03 Richard Stallman <rms@gnu.org>
12834
12835 * src/bison.s1: New file.
12836
128371993-06-03 Richard Stallman <rms@gnu.org>
12838
12839 * doc/bison.texinfo: *** empty log message ***
12840
128411993-06-03 Richard Stallman <rms@gnu.org>
12842
12843 * bison.simple: New file.
12844
128451993-05-19 Richard Stallman <rms@gnu.org>
12846
12847 * doc/bison.texinfo: New file.
12848
128491993-05-07 Noah Friedman <friedman@gnu.org>
12850
12851 * Makefile.in: *** empty log message ***
12852
128531993-04-28 Noah Friedman <friedman@gnu.org>
12854
12855 * src/reader.c: *** empty log message ***
12856
128571993-04-23 Noah Friedman <friedman@gnu.org>
12858
12859 * src/alloc.h: entered into RCS
12860
128611993-04-20 David J. MacKenzie <djm@gnu.org>
12862
12863 * src/version.c: *** empty log message ***
12864
12865 * src/files.c, src/allocate.c:
12866 entered into RCS
12867
12868 * src/reader.c: *** empty log message ***
12869
12870 * src/lex.c: entered into RCS
12871
12872 * src/conflicts.c: New file.
12873
12874 * src/symtab.c: entered into RCS
12875
12876 * src/alloc.h: New file.
12877
12878 * src/LR0.c: entered into RCS
12879
128801993-04-18 Noah Friedman <friedman@gnu.org>
12881
12882 * src/reader.c: New file.
12883
12884 * src/version.c: *** empty log message ***
12885
128861993-04-18 Noah Friedman <friedman@gnu.org>
12887
12888 * Makefile.in: *** empty log message ***
12889
128901993-04-17 Noah Friedman <friedman@gnu.org>
12891
12892 * Makefile.in: *** empty log message ***
12893
128941993-04-15 Richard Stallman <rms@gnu.org>
12895
12896 * src/main.c, src/files.c:
12897 New file.
12898
128991993-04-15 Noah Friedman <friedman@gnu.org>
12900
12901 * configure.in: entered into RCS
12902
12903 * configure.in: *** empty log message ***
12904
12905 * configure.in: New file.
12906
129071993-04-14 Richard Stallman <rms@gnu.org>
12908
12909 * Makefile.in: New file.
12910
129111993-04-13 Richard Stallman <rms@gnu.org>
12912
12913 * src/version.c: New file.
12914
129151993-03-25 Richard Stallman <rms@gnu.org>
12916
12917 * src/output.c: entered into RCS
12918
129191992-09-25 Richard Stallman <rms@gnu.org>
12920
12921 * configure.bat: entered into RCS
12922
129231992-06-22 Richard Stallman <rms@gnu.org>
12924
12925 * src/vmsgetargs.c: entered into RCS
12926
129271992-06-22 Richard Stallman <rms@gnu.org>
12928
12929 * doc/bison.rnh: entered into RCS
12930
129311992-04-20 David J. MacKenzie <djm@gnu.org>
12932
12933 * README: entered into RCS
12934
129351992-01-22 Richard Stallman <rms@gnu.org>
12936
12937 * src/machine.h: entered into RCS
12938
129391991-12-21 Richard Stallman <rms@gnu.org>
12940
12941 * src/lalr.c, src/closure.c:
12942 entered into RCS
12943
129441991-12-20 Richard Stallman <rms@gnu.org>
12945
12946 * src/state.h: entered into RCS
12947
129481991-12-18 Richard Stallman <rms@gnu.org>
12949
12950 * src/print.c, src/nullable.c, src/derives.c:
12951 entered into RCS
12952
129531991-11-03 David J. MacKenzie <djm@gnu.org>
12954
12955 * src/warshall.c, src/types.h, src/symtab.h, src/lex.h, src/gram.c, src/gram.h, src/files.h:
12956 entered into RCS
12957
129581988-09-09 Richard Stallman <rms@gnu.org>
12959
12960 * src/bison.hairy: entered into RCS
12961
129621987-12-16 Richard Stallman <rms@gnu.org>
12963
12964 * REFERENCES: entered into RCS
dc546b0f 12965
f294a2c2
AD
12966-----
12967
33167b8b 12968Copyright (C) 1987, 1988, 1991, 1992, 1993, 1994, 1995, 1996, 1997,
dd0e0635 129691998, 1999, 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
f294a2c2 12970
33167b8b 12971This file is part of Bison, the GNU Compiler Compiler.
f294a2c2 12972
33167b8b 12973Bison is free software; you can redistribute it and/or modify
f294a2c2
AD
12974it under the terms of the GNU General Public License as published by
12975the Free Software Foundation; either version 2, or (at your option)
12976any later version.
12977
33167b8b 12978Bison is distributed in the hope that it will be useful,
f294a2c2
AD
12979but WITHOUT ANY WARRANTY; without even the implied warranty of
12980MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12981GNU General Public License for more details.
12982
12983You should have received a copy of the GNU General Public License
33167b8b 12984along with Bison; see the file COPYING. If not, write to
f294a2c2
AD
12985the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
12986Boston, MA 02111-1307, USA.