]> git.saurik.com Git - bison.git/blob - ChangeLog
Use b4_type_names for the union type.
[bison.git] / ChangeLog
1 2008-11-13 Akim Demaille <demaille@gostai.com>
2
3 Use b4_type_names for the union type.
4 The union used to compute the size of the variant used to iterate over the
5 type of all the symbols, with a lot of redundancy. Now iterate over the
6 lists of symbols having the same type-name.
7
8 * data/lalr1.cc (b4_char_sizeof_): New.
9 (b4_char_sizeof): Use it.
10 Adjust to be called with a list of numbers instead of a single
11 number.
12 Adjust its caller for new-line issues.
13
14 2008-11-13 Akim Demaille <demaille@gostai.com>
15
16 Define the "identifier" of a symbol.
17 Symbols may have several string representations, for instance if they
18 have an alias. What I call its "id" is a string that can be used as
19 an identifier. May not exist.
20
21 Currently the symbols which have the "tag_is_id" flag set are those that
22 don't have an alias. Look harder for the id.
23
24 * src/output.c (is_identifier): Move to...
25 * src/symtab.c (is_identifier): here.
26 * src/symtab.h, src/symtab.c (symbol_id_get): New.
27 * src/output.c (symbol_definitions_output): Use it to define "id"
28 and "has_id".
29 Remove the definition of "tag_is_id".
30 * data/lalr1.cc: Use the "id" and "has_id" whereever "tag" and
31 "tag_is_id" were used to produce code.
32 We still use "tag" for documentation.
33
34 2008-11-11 Akim Demaille <demaille@gostai.com>
35
36 Locations are no longer required by lalr1.cc.
37 * data/lalr1.cc (_b4_args, b4_args): New.
38 Adjust all uses of locations to make them optional.
39 * tests/c++.at (AT_CHECK_VARIANTS): No longer use the locations.
40 (AT_CHECK_NAMESPACE): Check the use of locations.
41 * tests/calc.at (_AT_DATA_CALC_Y): Adjust to be usable with or
42 without locations with lalr1.cc.
43 Test these cases.
44 * tests/output.at: Check lalr1.cc with and without location
45 support.
46 * tests/regression.at (_AT_DATA_EXPECT2_Y, _AT_DATA_DANCER_Y):
47 Don't use locations.
48
49 2008-11-11 Akim Demaille <demaille@gostai.com>
50
51 AT_FULL_COMPILE.
52 * tests/local.at (AT_FULL_COMPILE): New.
53 * tests/actions.at, tests/calc.at, tests/regression.at: Use it.
54
55 2008-11-11 Akim Demaille <demaille@gostai.com>
56
57 Support parens in calc++.
58 * doc/bison.texinfo (Calc++ Scanner, Calc++ Parser): Support parens.
59 * examples/calc++/test (run): Check the expected output.
60 Adjust callers.
61 Check parens too.
62
63 2008-11-11 Akim Demaille <demaille@gostai.com>
64
65 Simplify lalr1.cc since %defines is mandatory.
66 * data/lalr1.cc: Remove useless calls to b4_defines_if.
67
68 2008-11-11 Akim Demaille <demaille@gostai.com>
69
70 TODO: yyfmt.
71 * TODO (yysyntax_error): New item.
72
73 2008-11-11 Akim Demaille <demaille@gostai.com>
74
75 Prefer M4 to CPP.
76 * data/lalr1.cc: Use b4_error_verbose_if instead of #if
77 YYERROR_VERBOSE.
78
79 2008-11-11 Akim Demaille <demaille@gostai.com>
80
81 Support i18n of the parse error messages.
82 * TODO (lalr1.cc/I18n): Remove.
83 * data/lalr1.cc (yysyntax_error_): Support the translation of the
84 error messages, as done in yacc.c.
85 Stay within the yy* pseudo namespace.
86
87 2008-11-11 Akim Demaille <demaille@gostai.com>
88
89 More TODO.
90 * TODO (single stack, yysyntax_error): New.
91
92 2008-11-11 Akim Demaille <demaille@gostai.com>
93
94 Make it possible to return a symbol_type from yylex.
95 * data/lalr1.cc (b4_lex_symbol_if): New.
96 (parse): When lex_symbol is defined, expected yylex to return the
97 complete lookahead.
98 * etc/bench.pl.in (generate_grammar_list): Extend to support this
99 yylex interface.
100 (bench_variant_parser): Exercise it.
101
102 2008-11-11 Akim Demaille <demaille@gostai.com>
103
104 Remove useless bench case.
105 * etc/bench.pl.in (bench_variant_parser): VARIANT_DESTROY is
106 no longer used.
107
108 2008-11-11 Akim Demaille <demaille@gostai.com>
109
110 Improve display of directives.
111 * etc/bench.pl.in (parse_term): Don't add useless eol.
112
113 2008-11-11 Akim Demaille <demaille@gostai.com>
114
115 Use string_cast in the bench.
116 * etc/bench.pl.in (generate_grammar_list): Define and use
117 string_cast.
118
119 2008-11-11 Akim Demaille <demaille@gostai.com>
120
121 Replace yychar with a Boolean.
122 * data/lalr1.cc (parse::yychar): Replace by...
123 (parse::yyempty): this.
124
125 2008-11-11 Akim Demaille <demaille@gostai.com>
126
127 Factor the tables.
128 * TODO: New item.
129
130 2008-11-11 Akim Demaille <demaille@gostai.com>
131
132 Let yytranslate handle the eof case.
133 * data/lalr1.cc (yytranslate_): Handle the EOF case.
134 Adjust callers.
135 No longer expect yychar to be equal to yyeof_, rather, test the
136 lookahead's (translated) kind.
137
138 2008-11-11 Akim Demaille <demaille@gostai.com>
139
140 yychar cannot be empty in yyerrlab.
141 * TODO (yychar == yyempty_): New.
142 * data/lalr1.cc: Remove the handling of this case.
143 This eases forthcoming changes related to yychar and yytranslate.
144
145 2008-11-11 Akim Demaille <demaille@gostai.com>
146
147 Bench: syntactic sugar for %define/#define.
148 * etc/bench.pl.in (parse_dirs): Support %d and #d with arguments.
149 (&bench_push_parser, bench_variant_parser): Use this feature.
150 (&eat): New.
151 Use it.
152
153 2008-11-11 Akim Demaille <demaille@gostai.com>
154
155 Less memory pressure on the "list" bench.
156 * etc/bench.pl.in (generate_grammar_list): Do not accumulate all
157 the values, to limit memory pressure.
158
159 2008-11-11 Akim Demaille <demaille@gostai.com>
160
161 Introduce make_symbol.
162 make_symbol provides a means to construct a full symbol (kind, value,
163 location) in a single shot. It is meant to be a Symbol constructor,
164 parameterized by the symbol kind so that overloading would prevent
165 incorrect kind/value pairs. Unfortunately parameterized constructors do
166 not work well in C++ (unless the parameter also appears as an argument,
167 which is not acceptable), hence the use of a function instead of a
168 constructor.
169
170 * data/lalr1.cc (b4_symbol_constructor_declaration_)
171 (b4_symbol_constructor_declarations)
172 (b4_symbol_constructor_specialization_)
173 (b4_symbol_constructor_specializations)
174 (b4_symbol_constructor_definition_)
175 (b4_symbol_constructor_definitions): New.
176 Use them where appropriate to generate declaration, declaration of
177 the specializations, and implementations of the templated
178 overloaded function "make_symbol".
179 (variant::variant): Always define a default ctor.
180 Also provide a copy ctor.
181 (symbol_base_type, symbol_type): New ctor overloads for value-less
182 symbols.
183 (symbol_type): Now public, so that functions such as yylex can use
184 it.
185
186 2008-11-11 Akim Demaille <demaille@gostai.com>
187
188 Inform m4 whether a tag is a valid id.
189 * src/output.c (is_identifier): New.
190 (symbol_definitions_output): Use it to define tag_is_id.
191 But maybe this should be done at m4 level?
192
193 2008-11-11 Akim Demaille <demaille@gostai.com>
194
195 Test 214 was failing: it greps with a pattern containing [ ]*
196 which obviously meant to catch spaces and tabs, but contained only
197 spaces. Tabulations in sources are a nuisance, so to simplify the
198 matter, get rid of all the tabulations in the Java sources. The
199 other skeletons will be treated equally later.
200
201 * data/java.m4, data/lalr1.java: Untabify.
202 * tests/java.at: Simplify AT_CHECK_JAVA_GREP invocations:
203 tabulations are no longer generated.
204
205 2008-11-11 Paolo Bonzini <bonzini@gnu.org>
206
207 * bootstrap.conf: Replace m4/warning.m4 with warnings module.
208 * configure.ac: Adjust usage.
209 * lib/Makefile.am: Replace $(WARNING_CFLAGS) with $(WARN_CFLAGS).
210 * src/Makefile.am: Replace $(WARNING_CFLAGS) with $(WARN_CFLAGS).
211 * tests/atlocal.in: Replace $(WARNING_*FLAGS) with $(WARN_*FLAGS).
212
213 2008-11-10 Di-an Jan <dianj@freeshell.org>
214
215 Workaround Java's ``code too large'' problem for parser tables
216 in most cases, by using one function per initialization.
217 * data/java.m4 (b4_typed_parser_table, b4_integral_parser_table): New.
218 * data/lalr1.java (yypact_, yydefact_, yypgoto_, yydefgoto_,
219 yytable_, yycheck_, yystos_, yytoken_number_, yyr1_, yyr2_, yyrhs_
220 yyprhs_, yyrline_, yytranslate_table_): Use b4_integral_parser_table.
221 (yytname_): Use b4_typed_parser_table.
222 * doc/bison.texinfo (Java Bison Interface): Add note on Java's
223 ``code too large'' error.
224
225 2008-11-10 Di-an Jan <dianj@freeshell.org>
226
227 * NEWS: Document them.
228
229 General Java skeleton improvements.
230 * configure.ac (gt_JAVACOMP): Request target of 1.4, which allows
231 using gcj < 4.3 in the testsuite, according to comments in
232 gnulib/m4/javacomp.m4.
233 * data/java.m4 (stype, parser_class_name, lex_throws, throws,
234 location_type, position_type): Remove extraneous brackets from
235 b4_percent_define_default.
236 (b4_lex_param, b4_parse_param): Remove extraneous brackets from
237 m4_define and m4_define_default.
238 * data/lalr1.java (b4_pre_prologue): Change to b4_user_post_prologue,
239 which marks the end of user code with appropriate syncline, like all
240 the other skeletons.
241 (b4_user_post_prologue): Add. Don't silently drop.
242 (yylex): Remove.
243 (parse): Inline yylex.
244 * doc/bison.texinfo (bisonVersion, bisonSkeleton): Document.
245 (%{...%}): Fix typo of %code imports.
246 * tests/java.at (AT_JAVA_COMPILE): Add "java" keyword.
247
248 Support annotations on parser class with %define annotations.
249 * data/lalr1.java (annotations): Add to parser class modifier.
250 * doc/bison.texinfo (Java Parser Interface): Document
251 %define annotations.
252 (Java Declarations Summary): Document %define annotations.
253 * tests/java.at (Java parser class modifiers): Test annotations.
254
255 Do not generate code for %error-verbose unless requested.
256 * data/lalr1.java (errorVerbose): Rename to yyErrorVerbose.
257 Make private. Make conditional on %error-verbose.
258 (getErrorVerbose, setErrorVerbose): New.
259 (yytnamerr_): Make conditional on %error-verbose.
260 (yysyntax_error): Make some code conditional on %error-verbose.
261 * doc/bison.texinfo (Java Bison Interface): Remove the parts
262 about %error-verbose having no effect.
263 (getErrorVerbose, setErrorVerbose): Document.
264
265 Move constants for token names to Lexer interface.
266 * data/lalr1.java (Lexer): Move EOF, b4_token_enums(b4_tokens) here.
267 * data/java.m4 (b4_token_enum): Indent for move to Lexer interface.
268 (parse): Qualify EOF to Lexer.EOF.
269 * doc/bison.texinfo (Java Parser Interface): Move documentation of
270 EOF and token names to Java Lexer Interface.
271 * tests/java.at (_AT_DATA_JAVA_CALC_Y): Remove Calc qualifier.
272
273 Make yyerror public.
274 * data/lalr1.java (Lexer.yyerror): Use longer parameter name.
275 (yyerror): Change to public. Add Javadoc comments. Use longer
276 parameter names. Make the body rather than the declarator
277 conditional on %locations.
278 * doc/bison.texinfo (yyerror): Document. Don't mark as protected.
279
280 Allow user to add code to the constructor with %code init.
281 * data/java.m4 (b4_init_throws): New, for %define init_throws.
282 * data/lalr1.java (YYParser.YYParser): Add b4_init_throws.
283 Add %code init to the front of the constructor body.
284 * doc/bison.texinfo (YYParser.YYParser): Document %code init
285 and %define init_throws.
286 (Java Declarations Summary): Document %code init and
287 %define init_throws.
288 * tests/java.at (Java %parse-param and %lex-param): Adjust grep.
289 (Java constructor init and init_throws): Add tests.
290
291 2008-11-10 Akim Demaille <demaille@gostai.com>
292
293 Update TODO.
294 * TODO (-D): is implemented.
295 (associativity): Same precedence must have the same associativity.
296 For instance, how can a * b / c be parsed if * is %left and / is
297 %right?
298 (YYERRORCODE, YYFAIL, YYBACKUP): New.
299
300 2008-11-10 Akim Demaille <demaille@gostai.com>
301
302 Formatting changes.
303
304 2008-11-10 Akim Demaille <demaille@gostai.com>
305
306 More information about the symbols.
307 * src/output.c (type_names_output): Document all the symbols,
308 including those that don't have a type-name.
309 (symbol_definitions_output): Define "is_token" and
310 "has_type_name".
311 * data/lalr1.cc (b4_type_action_): Skip symbols that have an empty
312 type-name, now that they are defined too in b4_type_names.
313
314 2008-11-10 Akim Demaille <demaille@gostai.com>
315
316 Regen.
317
318 2008-11-10 Akim Demaille <demaille@gostai.com>
319
320 Make parser::yytranslate static.
321 Small speedup (1%) on the list grammar. And makes yytranslate_ available
322 in non member functions.
323
324 * data/lalr1.cc (yytranslate_): Does not need to be a instance
325 function.
326
327 2008-11-10 Akim Demaille <demaille@gostai.com>
328
329 Avoid trailing spaces.
330 * data/c.m4: b4_comment(TEXT): Don't indent empty lines.
331 * data/lalr1.cc: Don't indent before rule and symbol actions, as
332 they can be empty, and anyway this incorrectly indents the first
333 action.
334
335 2008-11-10 Akim Demaille <demaille@gostai.com>
336
337 Comment changes.
338
339 2008-11-10 Akim Demaille <demaille@gostai.com>
340
341 Use "enum" for integral constants.
342 This is just nicer to read, I observed no speedup.
343
344 * data/lalr1.cc (yyeof_, yylast_, yynnts_, yyempty_, yyfinal_)
345 (yterror_, yyerrcode_, yyntokens_): Define as members of an enum.
346 (yyuser_token_number_max_, yyundef_token_): Move into...
347 (yytranslate_): here.
348
349 2008-11-10 Akim Demaille <demaille@gostai.com>
350
351 Shortcuts in bench directives.
352 * etc/bench.pl.in (parse_dirs): New.
353 Use it.
354 (bench_variant_parser, bench_fusion_parser): Use %s and %d.
355 Create the benches in "benches/".
356
357 2008-11-10 Akim Demaille <demaille@gostai.com>
358
359 Formatting changes.
360 * data/lalr1.cc: here.
361
362 2008-11-10 Akim Demaille <demaille@gostai.com>
363
364 Adjust verbose message to using emacs.
365 * etc/bench.pl.in: Inform compilation-mode when we change the
366 directory.
367 (generate_grammar_list): Recognize %define "variant" in addition
368 to %define variant.
369
370 2008-11-10 Akim Demaille <demaille@gostai.com>
371
372 Classify symbols by type-name.
373 * src/uniqstr.h (UNIQSTR_CMP): New.
374 * src/output.c (symbol_type_name_cmp, symbols_by_type_name)
375 (type_names_output): New.
376 (muscles_output): Use it.
377 * data/lalr1.cc (b4_symbol_action_): Remove.
378 (b4_symbol_case_, b4_type_action_): New.
379 Adjust uses of b4_symbol_action_ to use b4_type_action_.
380
381 2008-11-10 Akim Demaille <demaille@gostai.com>
382
383 Change the handling of the symbols in the skeletons.
384 Before we were using tables which lines were the symbols and which
385 columns were things like number, tag, type-name etc. It is was
386 difficult to extend: each time a column was added, all the numbers had
387 to be updated (you asked for colon $2, not for "tag"). Also, it was
388 hard to filter these tables when only a subset of the symbols (say the
389 tokens, or the nterms, or the tokens that have and external number
390 *and* a type-name) was of interest.
391
392 Now instead of monolithic tables, we define one macro per cell. For
393 instance "b4_symbol(0, tag)" is a macro name which contents is
394 self-decriptive. The macro "b4_symbol" provides easier access to
395 these cells.
396
397 * src/output.c (type_names_output): Remove.
398 (symbol_numbers_output, symbol_definitions_output): New.
399 (muscles_output): Call them.
400 (prepare_symbols): Define b4_symbols_number.
401
402 2008-11-10 Akim Demaille <demaille@gostai.com>
403
404 --trace=muscles
405 * src/getargs.h, src/getargs.c (trace_muscle): New.
406 (trace_types, trace_args): Support it.
407 * src/output.c (output_skeleton): Use it.
408
409 2008-11-10 Akim Demaille <demaille@gostai.com>
410
411 muscles_output.
412 * src/output.c (muscles_output): New, extracted from...
413 (output_skeleton): here.
414 Adjust.
415
416 2008-11-10 Akim Demaille <demaille@gostai.com>
417
418 Formatting changes.
419
420 2008-11-10 Akim Demaille <demaille@gostai.com>
421
422 Update the variant example.
423 * examples/variant.yy: Formatting changes.
424 One stage build.
425
426 2008-11-10 Akim Demaille <demaille@gostai.com>
427
428 Support constructor with an argument.
429 This improves the "list" bench by 2%.
430
431 * data/lalr1.cc (variant::build): Add an overloaded version with
432 an argument.
433 * tests/c++.at (AT_CHECK_VARIANT): Check it.
434
435 2008-11-10 Akim Demaille <demaille@gostai.com>
436
437 Test variants.
438 * tests/c++.at (AT_CHECK_VARIANTS): New.
439 Use it with and without %define assert.
440
441 2008-11-10 Akim Demaille <demaille@gostai.com>
442
443 Add %precedence support.
444 Unfortunately it is not possible to reuse the %prec directive. This
445 is because to please POSIX, we do not require to end the rules with a
446 semicolon. As a result,
447
448 foo: bar %prec baz
449
450 is ambiguous: either a rule which precedence is that of baz, or a rule,
451 and then a declaration of the precedence of the token baz.
452
453 * doc/bison.texinfo: Document %precedence.
454 (Precedence Only): New.
455 * src/assoc.h, src/assoc.c (precedence_assoc): New.
456 * src/conflicts.c (resolve_sr_conflict): Support it.
457 * src/scan-gram.l, src/parse-gram.y (%precedence): New token.
458 Parse it.
459 * tests/calc.at: Use %precedence for NEG.
460 * tests/conflicts.at (%precedence does not suffice)
461 (%precedence suffices): New tests.
462
463 2008-11-09 Akim Demaille <demaille@gostai.com>
464
465 Make benches in a sub dirs.
466 * etc/bench.pl.in ($dir): New.
467 Use it.
468 Check the use of constructors with an argument.
469 (bench_variant_parser): Fix.
470
471 2008-11-09 Akim Demaille <demaille@gostai.com>
472
473 fix eof condition
474
475 2008-11-09 Akim Demaille <demaille@gostai.com>
476
477 Fix --help.
478
479 2008-11-09 Akim Demaille <demaille@gostai.com>
480
481 Require the generation of parse-gram.output.
482 * src/Makefile.am (YACC): Pass --report=all.
483
484 2008-11-09 Akim Demaille <demaille@gostai.com>
485
486 Formatting changes.
487
488 2008-11-09 Akim Demaille <demaille@gostai.com>
489
490 Update TODO.
491 * TODO: Remove obsolete items.
492 Update others.
493
494 2008-11-09 Akim Demaille <demaille@gostai.com>
495
496 Enhance bench.pl.
497 * etc/bench.pl.in (parse, parse_expr, parse_term, parse_fact)
498 (@token, $grammar, $bench): New.
499 (generate_grammar_variant): Rename as...
500 (generate_grammar_list): this.
501 (generate_grammar): Adjust.
502 (bench_grammar): Rename as...
503 (bench): this.
504 Use it in the various bench-marking routines.
505 (-b, -g): New options.
506
507 2008-11-09 Akim Demaille <demaille@gostai.com>
508
509 Use a static hierarchy for symbols in the C++ parser.
510 * data/lalr1.cc (symbol_base_type, symbol_type)
511 (stack_symbol_type): Make it a static hierarchy.
512 Adjust dependencies.
513
514 2008-11-09 Akim Demaille <demaille@gostai.com>
515
516 bench.pl -d, --directive.
517 * etc/bench.pl.in (@directive): New.
518 (&bench_grammar): Use it.
519 (&bench_list_grammar): New, to provide access to the "variant"
520 grammar.
521 Use it.
522 (getopts): Support -d, --directive.
523
524 2008-11-09 Akim Demaille <demaille@gostai.com>
525
526 Use inline for small operations.
527 * data/lalr1.cc (symbol_base_type, symbol_type)
528 (stack_symbol_type): Declare constructor and other operations as
529 inline.
530 (yy_destroy_): Inline.
531
532 2008-11-09 Akim Demaille <demaille@gostai.com>
533
534 Introduce a hierarchy for symbols.
535 * data/lalr1.cc (symbol_base_type, symbol_type): New.
536 (data_type): Rename as...
537 (stack_symbol_type): this.
538 Derive from symbol_base_type.
539 (yy_symbol_value_print_): Merge into...
540 (yy_symbol_print_): this.
541 Rename as...
542 (yy_print_): this.
543 (yydestruct_): Rename as...
544 (yy_destroy_): this.
545 (b4_symbols_actions, YY_SYMBOL_PRINT): Adjust.
546 (parser::parse): yyla is now of symbol_type.
547 Use its type member instead of yytoken.
548
549 2008-11-09 Akim Demaille <demaille@gostai.com>
550
551 Rename data_type and stack_symbol_type.
552 * data/lalr1.cc (data_type): Rename as...
553 (stack_symbol_type): this.
554
555 2008-11-09 Akim Demaille <demaille@gostai.com>
556
557 Handle semantic value and location together.
558 * data/lalr1.cc (b4_symbol_actions): Bounce $$ and @$ to
559 yydata.value and yydata.location.
560 (yy_symbol_value_print_, yy_symbol_print_, yydestruct_)
561 (YY_SYMBOL_PRINT): Now take semantic value and location as a
562 single arg.
563 Adjust all callers.
564 (yydestruct_): New overload for a stack symbol.
565
566 2008-11-09 Akim Demaille <demaille@gostai.com>
567
568 Push a complete symbol, not connected parts.
569 * data/lalr1.cc (yypush_): Take a data_type&, not disconnected
570 state, value and location.
571 Adjust callers.
572
573 2008-11-09 Akim Demaille <demaille@gostai.com>
574
575 Agregate yylval and yylloc.
576 * data/lalr1.cc (parser::yylval, parser::yylloc): Replace by...
577 (parser::yyla): this.
578
579 2008-11-09 Akim Demaille <demaille@gostai.com>
580
581 Rely on the state stack to display reduction traces.
582 To display rhs symbols before a reduction, we used information about the rule
583 reduced, which required the tables yyrhs and yyprhs. Now use rely only on the
584 state stack to get the same information.
585
586 * data/lalr1.cc (b4_rhs_data, b4_rhs_state): New.
587 Use them.
588 (parser::yyrhs_, parser::yyprhs_): Remove.
589 (parser::yy_reduce_print_): Use the state stack.
590
591 2008-11-09 Akim Demaille <demaille@gostai.com>
592
593 Fuse yyval and yyloc into yylhs.
594 * data/lalr1.cc (b4_lhs_value, b4_lhs_location): Adjust to using
595 yylhs.
596 (parse): Replace yyval and yyloc with yylhs.value and
597 yylhs.location.
598 After a user action, compute yylhs.state earlier.
599 (yyerrlab1): Do not play tricks with yylhs.location, rather, use a
600 fresh error_token.
601
602 2008-11-09 Di-an Jan <dianj@freeshell.org>
603
604 Remove unused variable.
605 * src/output.c (type_names_output): Remove unused variable sep.
606
607 2008-11-09 Paolo Bonzini <bonzini@gnu.org>
608
609 Change tests/output.at quoting.
610 * tests/output.at (AT_CHECK_OUTPUT): Use conventional m4 quoting when
611 expanding arguments.
612
613 2008-11-07 Joel E. Denny <jdenny@ces.clemson.edu>
614
615 Don't add a semicolon to actions for %skeleton or %language.
616 It breaks Java test cases as reported by Akim Demaille.
617 * src/scan-code.l: Implement.
618
619 2008-11-07 Joel E. Denny <jdenny@ces.clemson.edu>
620
621 Clean up %skeleton and %language priority implementation.
622 * src/getargs.c (skeleton_prio): Use default_prio rather than 2, and
623 remove static qualifier because others will soon need to see it.
624 (language_prio): Likewise.
625 (getargs): Use command_line_prio rather than 0.
626 * src/getargs.h (command_line_prio, grammar_prio, default_prio): New
627 enum fields.
628 (skeleton_prio): Extern it.
629 (language_prio): Extern it.
630 * src/parse-gram.y: Use grammar_prio rather than 1.
631
632 2008-11-07 Akim Demaille <demaille@gostai.com>
633
634 Moving push traces into yypush_.
635 * data/lalr1.cc (yypush_): Now takes a optional trace message.
636 Adjust all uses.
637
638 2008-11-07 Akim Demaille <demaille@gostai.com>
639
640 The single-stack C++ parser is now the standard one.
641 * data/lalr1.cc: Rename as...
642 * data/lalr1-split.cc: this.
643 * data/lalr1-fusion.cc: Rename as...
644 * data/lalr1.cc: this.
645 * etc/bench.pl.in: Adjust.
646
647 2008-11-07 Akim Demaille <demaille@gostai.com>
648
649 Avoid empty-if warnings.
650 Reported by Quentin Hocquet.
651
652 * data/lalr1-fusion.cc (YY_SYMBOL_PRINT, YY_REDUCE_PRINT)
653 (YY_STACK_PRINT): Provide some contents even when !YYDEBUG.
654
655 2008-11-07 Akim Demaille <demaille@gostai.com>
656
657 Pass command line location to skeleton_arg and language_argmatch.
658 * src/getargs.h, src/getargs.c (skeleton_arg, language_argmatch):
659 The location argument is now mandatory.
660 Adjust all dependencies.
661 (getargs): Use command_line_location.
662
663 2008-11-07 Akim Demaille <demaille@gostai.com>
664
665 -D, --define.
666 * src/getargs.c (usage): Document -D.
667 Fix help string for --locations.
668 (command_line_location): New.
669 (short_options, long_options, getargs): Support -D, --define.
670 (getargs): Move -d support at the right place.
671 * doc/bison.texinfo (Bison Options): Update.
672 * tests/input.at (%define, --define): New.
673
674 2008-11-07 Akim Demaille <demaille@gostai.com>
675
676 Initialize the muscle table before parsing the command line.
677 * src/getargs.c (quotearg.h, muscle_tab.h): Include.
678 (getargs): Define file_name.
679 * src/main.c (main): Initialize muscle_tab before calling
680 getargs.
681 * src/muscle_tab.c (muscle_init): No longer define file_name, as
682 its value is not available yet.
683
684 2008-11-07 Akim Demaille <demaille@gostai.com>
685
686 Locations without columns for command line arguments.
687 * src/location.c (location_print): Don't display negative columns.
688 * src/location.h: Document this.
689
690 2008-11-07 Akim Demaille <demaille@gostai.com>
691
692 Fix --help.
693 * src/getargs.c (usage): Fix help string for -W.
694
695 2008-11-07 Akim Demaille <demaille@gostai.com>
696
697 Handle more general types of option arguments.
698 * build-aux/cross-options.pl: The argument ends at the first
699 space, not the first non-symbol character.
700 Use @var for each word appearing the argument description.
701
702 2008-11-07 Akim Demaille <demaille@gostai.com>
703
704 Destroy the variants that remain on the stack in case of error.
705 * data/lalr1-fusion.cc (yydestruct_): Invoke the variant's
706 destructor.
707 Display the value only if yymsg is nonnull.
708 (yyreduce): Invoke yydestruct_ when popping lhs symbols.
709
710 2008-11-07 Akim Demaille <demaille@gostai.com>
711
712 Add "%define assert" to variants.
713 This is used to help the user catch cases where some value gets
714 ovewritten by a new one. This should not happen, as this will
715 probably leak.
716
717 Unfortunately this uncovered a bug in the C++ parser itself: the
718 lookahead value was not destroyed between two calls to yylex. For
719 instance if the previous lookahead was a std::string, and then an int,
720 then the value of the std::string was correctly taken (i.e., the
721 lookahead was now an empty string), but std::string structure itself
722 was not reclaimed.
723
724 This is now done in variant::build(other&) (which is used to take the
725 value of the lookahead): other is not only stolen from its value, it
726 is also destroyed. This incurs a new performance penalty of a few
727 percent, and union becomes faster again.
728
729 * data/lalr1-fusion.cc (variant::build(other&)): Destroy other.
730 (b4_variant_if): New.
731 (variant::built): New.
732 Use it whereever the status of the variant changes.
733 * etc/bench.pl.in: Check the penalty of %define assert.
734
735 2008-11-07 Akim Demaille <demaille@gostai.com>
736
737 Use "%define variant" in bench.pl.
738 * etc/bench.pl.in: No longer use the pseudo directive %variants,
739 just use %define variants.
740
741 2008-11-07 Akim Demaille <demaille@gostai.com>
742
743 Regen.
744 * src/parse-gram.h, src/parse-gram.c: Regen.
745
746 2008-11-04 Joel E. Denny <jdenny@ces.clemson.edu>
747
748 Fix user actions without a trailing semicolon.
749 Reported by Sergei Steshenko at
750 <http://lists.gnu.org/archive/html/bug-bison/2008-11/msg00001.html>.
751 * THANKS (Sergei Steshenko): Add.
752 * src/scan-code.l (SC_RULE_ACTION): Fix it.
753 * tests/regression.at (Fix user actions without a trailing semicolon):
754 New test case.
755
756 2008-11-04 Akim Demaille <demaille@gostai.com>
757
758 Use b4_copyright_years.
759 * data/yacc.c (b4_copyright_years): New.
760 Fix its value according to the comments in the file.
761 Use it and undefine it.
762
763 2008-11-04 Akim Demaille <demaille@gostai.com>
764
765 Formatting changes.
766 * data/lalr1-fusion.cc, src/parse-gram.y: here.
767
768 2008-11-04 Akim Demaille <demaille@gostai.com>
769
770 Formatting changes.
771 * data/lalr1-fusion.cc: here.
772
773 2008-11-04 Akim Demaille <demaille@gostai.com>
774
775 Use strict on bench.pl.
776 * etc/bench.pl.in (&run, &generate_grammar): New.
777 Rename the grammar generating functions for consistency.
778 Change the interface so that the list of benches to run is passed
779 as (optionless) arguments.
780 (&compile): Use &run.
781
782 2008-11-04 Akim Demaille <demaille@gostai.com>
783
784 Remove spurious initial empty lines.
785 * data/glr.c, data/glr.cc, data/lalr1.cc, data/lalr1.java,
786 * data/yacc.c: End the @output lines with an @.
787
788 2008-11-04 Akim Demaille <demaille@gostai.com>
789
790 Improve the display of sizes.
791 * etc/bench.p.in: Higher precision.
792 Sort by decreasing size.
793
794 2008-11-04 Akim Demaille <demaille@gostai.com>
795
796 Don't memcpy C++ structures.
797 * data/lalr1-fusion.cc (b4_symbol_variant): Adjust additional
798 arguments.
799 (variant::build): New overload for
800 copy-construction-that-destroys.
801 (variant::swap): New.
802 (parser::yypush_): Use it in variant mode.
803
804 2008-11-04 Akim Demaille <demaille@gostai.com>
805
806 Better defaults for bench.pl.
807 * etc/bench.pl.in ($verbose, $cflags, $iterations): Change the
808 default values.
809 Adjust &verbose uses.
810 (-q, --quiet): New.
811
812 2008-11-04 Akim Demaille <demaille@gostai.com>
813
814 Make variant.yy more complex.
815 std::list cannot be copied via memcpy, they are more demanding than
816 std::string. Use one std::list to strengthen the test.
817
818 * examples/variant.yy: Use lalr1-fusion.cc, not lalr1.cc.
819 Adjust.
820 Create a list of strings, instead of a single large string.
821
822 2008-11-04 Akim Demaille <demaille@gostai.com>
823
824 bench.pl --bench.
825 * etc/bench.pl.in (--bench, $bench): New.
826
827 2008-11-04 Akim Demaille <demaille@gostai.com>
828
829 Sort methods.
830 * data/lalr1-fusion.cc (destroy): Use as() in its definition.
831 Define it after as().
832
833 2008-11-04 Akim Demaille <demaille@gostai.com>
834
835 Useless parens.
836 * data/lalr1-fusion.cc (b4_rhs_location): Remove useless parens.
837
838 2008-11-04 Akim Demaille <demaille@gostai.com>
839
840 Issue missing synclines after user actions.
841 * data/c.m4 (b4_case): Issue synclines on the output file.
842
843 2008-11-04 Akim Demaille <demaille@gostai.com>
844
845 Remove trailing empty line.
846 * data/lalr1-fusion.cc: Don't add an empty line after the user's
847 epilogue.
848
849 2008-11-04 Akim Demaille <demaille@gostai.com>
850
851 Fix output of copyright years.
852 * data/bison.m4 (b4_copyright): Fix the indentation of the
853 copyright year paragraph.
854 Use b4_copyright_years when no years are given.
855 * data/lalr1.cc, data/lalr1-fusion.cc, data/location.cc
856 (b4_copyright_years): New.
857 Use it.
858
859 2008-11-04 Akim Demaille <demaille@gostai.com>
860
861 Avoid the spurious initial empty line.
862 * data/lalr1-fusion.cc, data/location.cc: Put a trailing "@" at
863 the end of @output request to suppress the empty line that
864 results.
865
866 2008-11-04 Akim Demaille <demaille@gostai.com>
867
868 Remove parser::rhs_number_type.
869 * data/lalr1-fusion.cc (rhs_number_type): No longer define it.
870 (yyrhs_): Use b4_table_define.
871
872 2008-11-04 Akim Demaille <demaille@gostai.com>
873
874 Fix iteration type.
875 * data/lalr1-fusion.cc: Use an int to iterate up to an int.
876
877 2008-11-04 Akim Demaille <demaille@gostai.com>
878
879 Factor the declaration of the integer tables.
880 * data/lalr1-fusion.cc (b4_table_define): New.
881 Use it.
882
883 2008-11-03 Akim Demaille <demaille@gostai.com>
884
885 Fix indentation of tables in lalr1.cc
886 * data/lalr1-fusion.cc: Fix the indentation.
887
888 2008-11-03 Akim Demaille <demaille@gostai.com>
889
890 Destroy the lhs symbols after reduction.
891 * data/lalr1-fusion.cc (parse): After the user action, when in
892 variant mode, destroy the lhs symbols.
893
894 2008-11-03 Akim Demaille <demaille@gostai.com>
895
896 Simplify yysyntax_error_ use.
897 * data/lalr1-fusion.cc (yysyntax_error_): Always pass it the token
898 type, but make it unnamed in the declaration when it is not used.
899
900 2008-11-03 Akim Demaille <demaille@gostai.com>
901
902 Let yy::variant::build return an lvalue.
903 * data/lalr1-fusion.cc (variant::build): Return a reference to the
904 object.
905
906 2008-11-03 Akim Demaille <demaille@gostai.com>
907
908 Define yy::variant only when needed.
909 * data/lalr1-fusion.cc (yy::variant): Define only if variants are
910 used.
911
912 2008-11-03 Akim Demaille <demaille@gostai.com>
913
914 Bench the three-stack lalr1.cc.
915 * etc/bench.pl.in: Bench the three-stack lalr1.cc vs. the
916 one-stack one.
917
918 2008-11-03 Akim Demaille <demaille@gostai.com>
919
920 Fail on parse error in calc++.
921 * doc/bison.texinfo (calc++.cc): Propagate failures to the exit
922 status.
923 * examples/calc++/test ($me, $number, $exit, run): New.
924 Use them to propagate errors to the exit status.
925
926 2008-11-03 Akim Demaille <demaille@gostai.com>
927
928 Don't specify the skeleton twice in the example.
929 * examples/calc++/Makefile.am: Don't pass -S to Bison, the grammar
930 file does what is needed.
931
932 2008-11-03 Akim Demaille <demaille@gostai.com>
933
934 bench: Improve output.
935 * etc/bench.pl.in (bench_grammar): Tune the printf format.
936
937 2008-11-03 Akim Demaille <demaille@gostai.com>
938
939 bench: check impact of %debug on variants.
940 * etc/bench.pl.in (variant_grammar): Fix the computation of
941 $variant.
942 Generate a grammar file that can work with or without %debug.
943 Do use the @directive.
944 (bench_variant_parser): Check impact of %debug.
945 (@directives): Rename all the occurrences to...
946 (@directive): this, for consistency.
947
948 2008-11-03 Akim Demaille <demaille@gostai.com>
949
950 bench: report the size too.
951 * etc/bench.pl.in ($iterations): Defaults to -3.
952 (&bench_grammar): Require hireswallclock.
953 Compute and display the size of the result.
954 More comments.
955
956 2008-11-03 Akim Demaille <demaille@gostai.com>
957
958 bench: More use of the verbosity level.
959 * etc/bench.pl.in ($verbose, &verbose): New.
960 Use them.
961 More POD documentation.
962
963 2008-11-03 Akim Demaille <demaille@gostai.com>
964
965 bench.pl: a command line interface
966 * etc/bench.pl.in: More doc.
967 Some fixes in the documentation.
968 ($cflags, $iterations, &help, &getopt): New.
969 Use them.
970 (&variant_grammar): Let the number of stages be 10 times what is
971 specified.
972
973 2008-11-03 Akim Demaille <demaille@gostai.com>
974
975 Bench the use of Boost.Variants.
976 * etc/bench.pl.in ($cxx, &variant_grammar, &bench_variant_parser):
977 New.
978 (&compile): Be ready to compile C++ parsers.
979 (&bench_push_parser): Move debug information to the outermost
980 level.
981 * THANKS: Add Michiel De Wilde.
982
983 2008-11-03 Akim Demaille <demaille@gostai.com>
984
985 bench.pl: Pass directives as a list instead of as a string.
986 * etc/bench.pl.in (&directives): New.
987 (&triangular_grammar, &calc_grammar): Use it to format the Bison
988 directives.
989 (&triangular_grammar): Do use the directives (were ignored).
990 (&bench_grammar, &bench_push_parser): Adjust to pass lists of
991 directives.
992
993 2008-11-03 Akim Demaille <demaille@gostai.com>
994
995 Improve genericity of bench.pl.
996 * etc/bench.pl.in (&bench_grammar): Take the set of benches as
997 argument.
998 (&bench_push_parser): New.
999 Call it.
1000
1001 2008-11-03 Akim Demaille <demaille@gostai.com>
1002
1003 Add documentation to bench.pl.
1004 * etc/bench.pl.in: Comment changes.
1005
1006 2008-11-03 Akim Demaille <demaille@gostai.com>
1007
1008 Fuse the three stacks into a single one.
1009 In order to make it easy to perform benchmarks to ensure that there are no
1010 performance loss, lalr1.cc is forked into lalr1-fusion.cc. Eventually,
1011 lalr1-fusion.cc will replace lalr1.cc.
1012
1013 Meanwhile, to make sure that lalr1-fusion.cc is correctly exercized by the
1014 test suite, the user must install a symbolic link from lalr1.cc to it.
1015
1016 Instead of having three stacks (state, value, location), use a stack
1017 of triples. This considerably simplifies the code (and it will be
1018 easier not to require locations as currently does the C++ parser),
1019 and also gives a 10% speedup according to etc/bench (probably mainly since
1020 memory allocation is done once instead of three times).
1021
1022 Another motivation is to make it easier to destruct properly
1023 semantic values: now that they are bound to their state (hence
1024 symbol type) it will be easier to call the appropriate destructor.
1025
1026 These changes should probably benefit the C parser too.
1027
1028 * data/lalr1.cc: Copy as... * data/lalr1-fusion.cc: this new
1029 file.
1030 (b4_rhs_value, b4_rhs_location): New definitions overriding those
1031 from c++.m4.
1032 (state_stack_type, semantic_stack_type, location_stack_type)
1033 (yystate_stack_, yysemantic_stack_, yylocation_stack_): Remove.
1034 (data_type, stack_type, yystack_): New.
1035 (YYLLOC_DEFAULT, yypush_): Adjust.
1036 (yyerror_range): Now based on data_type, not location_type.
1037
1038 2008-11-03 Akim Demaille <demaille@gostai.com>
1039
1040 Push the state, value, and location at the same time.
1041 This is needed to prepare a forthcoming patch that fuses the three
1042 stacks into one.
1043
1044 * data/lalr1.cc (parser::yypush_): New.
1045 (parser::yynewstate): Change the semantics: instead of arriving to
1046 this label when value and location have been pushed, but yystate
1047 is to be pushed on the state stack, now the three of them must
1048 have been pushed before. yystate still must be the new state.
1049 This allows to use yypush_ everywhere instead of individual
1050 handling of the stacks.
1051
1052 2008-11-03 Akim Demaille <demaille@gostai.com>
1053
1054 Prefer references to pointers.
1055 * data/lalr1.cc (b4_symbol_actions): New, overrides the default C
1056 definition to use references instead of pointers.
1057 (yy_symbol_value_print_, yy_symbol_print_, yydestruct_):
1058 Take the value and location as references.
1059 Adjust callers.
1060
1061 2008-11-03 Akim Demaille <demaille@gostai.com>
1062
1063 stack::size instead of stack::height.
1064 * data/lalr1.cc (stack::height): Rename as...
1065 (stack::size): this.
1066 Fix the output type.
1067 Comment changes.
1068
1069 2008-11-03 Akim Demaille <demaille@gostai.com>
1070
1071 Use variants to support objects as semantic values.
1072 This patch was inspired by work by Michiel De Wilde. But he used Boost
1073 variants which (i) requires Boost on the user side, (ii) is slow, and
1074 (iii) has useless overhead (the parser knows the type of the semantic value
1075 there is no reason to duplicate this information as Boost.Variants do).
1076
1077 This implementation reserves a buffer large enough to store the largest
1078 objects. yy::variant implements this buffer. It was implemented with
1079 Quentin Hocquet.
1080
1081 * src/output.c (type_names_output): New.
1082 (output_skeleton): Invoke it.
1083 * data/c++.m4 (b4_variant_if): New.
1084 (b4_symbol_value): If needed, provide a definition for variants.
1085 * data/lalr1.cc (b4_symbol_value, b4_symbol_action_)
1086 (b4_symbol_variant, _b4_char_sizeof_counter, _b4_char_sizeof_dummy)
1087 (b4_char_sizeof, yy::variant): New.
1088 (parser::parse): If variants are requested, define
1089 parser::union_type, parser::variant, change the definition of
1090 semantic_type, construct $$ before running the user action instead
1091 of performing a default $$ = $1.
1092 * examples/variant.yy: New.
1093 Based on an example by Michiel De Wilde.
1094
1095 2008-11-03 Akim Demaille <demaille@gostai.com>
1096
1097 Parameterize the extraction of semantic values.
1098 To make future changes easier, no longer rely on ".TYPE" being the
1099 way to get a semantic value.
1100
1101 * data/c.m4 (b4_symbol_value): New.
1102 Use it.
1103 * data/c++.m4, data/yacc.c: Use it.
1104 * data/glr.c: Use b4_symbol_value.
1105 (b4_rhs_data): New.
1106 Use it.
1107
1108 2008-11-03 Akim Demaille <demaille@gostai.com>
1109
1110 Prepare easier M4 changes.
1111 * data/lalr1.cc: Use escaped [] instead of literals to prepare
1112 future changes.
1113
1114 2008-11-02 Joel E. Denny <jdenny@ces.clemson.edu>
1115
1116 Initiate further development.
1117 * NEWS: Create an empty section for new entries.
1118 * gnulib: Update submodule to HEAD.
1119
1120 2008-11-02 Joel E. Denny <jdenny@ces.clemson.edu>
1121
1122 * NEWS: Version 2.4.
1123
1124 2008-11-02 Joel E. Denny <jdenny@ces.clemson.edu>
1125
1126 Prepare for next release.
1127 * NEWS: Briefly mention changes since 2.3b.
1128 * README: Say GNU m4 1.4.6, which we've been requiring in release
1129 announcements already, not 1.4.3, which breaks the build.
1130
1131 2008-11-02 Joel E. Denny <jdenny@ces.clemson.edu>
1132
1133 Say %language is experimental.
1134 We're thinking of extending it's effect on output file naming. See the
1135 thread at
1136 <http://lists.gnu.org/archive/html/bison-patches/2008-10/msg00003.html>.
1137 * NEWS: Say it's experimental.
1138 * doc/bison.texinfo (Decl Summary): Say it's experimental, and so don't
1139 recommend it over %skeleton for now.
1140 (Bison Options): Likewise.
1141 (C++ Bison Interface): Use %skeleton not %language.
1142 (Calc++ Parser): Use %skeleton not %language.
1143 * src/getargs.c (usage): Say it's experimental.
1144
1145 2008-11-01 Di-an Jan <dianj@freeshell.org>
1146 Paolo Bonzini <bonzini@gnu.org>
1147
1148 Support all Java parser class modifiers.
1149 * data/java.m4 (b4_percent_define_get3): New.
1150 (b4_final_if, b4_strictfp_if): New.
1151 * data/lalr1.java (final, strictfp, extends, implements): Support.
1152 * doc/bison.texinfo (final, strictfp, extends, implements): Add
1153 documentation.
1154 * tests/java.at (AT_CHECK_JAVA_MINIMAL): New.
1155 (AT_CHECK_JAVA_MINIMAL_W_LEXER): New.
1156 (AT_CHECK_JAVA_GREP): New.
1157 (Java parser class modifiers): New test.
1158 (Java parser class extends and implements): New test.
1159
1160 Model exception propagation better with throws and lex_throws.
1161 * data/java.m4 (b4_list2): New.
1162 (throws): Change default.
1163 * data/lalr1.java (yyaction): Add throws.
1164 (parse): Add lex_throws in addition to throws.
1165 * doc/bison.texinfo (throws, lex_throws): Add documentation.
1166 * tests/java.at (Java throws specifications): New test.
1167
1168 Improve documentation for Java parsers.
1169 * doc/bison.texinfo (Java Parsers): Add subsections.
1170 Don't quote first argument of %define.
1171 (Java Bison Interface): Document output files. Move documentation
1172 of parser class and merge into Java Parser Interface. Document
1173 features that error out. Document directives with no effect.
1174 Move note about Javadoc higher.
1175 (Java Semantic Values): Explicitly mention stype.
1176 Document that generic types cannot be used.
1177 (Java Location Values): Use @deftypeivar. Document constructors.
1178 Correct return value for toString.
1179 (Java Parser Interface): List undocumented constants/fields.
1180 Move documentation of fields added by %parse-param closer to list
1181 of members. Document that token names are added as fields.
1182 Document constructors accurately. Remove error method.
1183 (Java Scanner Interface): Move note on %pure-parser to Java Bison
1184 Interface. Describe %code lexer and yylex accutately.
1185 Remove documentation that does not match the code.
1186 (Java Action Features): New.
1187 (Java Differences): Add reference. Add item on semantic values.
1188 Add note about @{ ... @}. Clarify %% epilogue placement.
1189 (Java Declarations Summary): New.
1190
1191 Fix Java skeleton.
1192 * data/java.m4 (b4_prefix): Correct quoting for m4_define_default.
1193 (b4_remove_comma): Quote test argument.
1194 (b4_identification): Remove "bison" field.
1195 * tests/java.at (Java parser class and package names): New test.
1196 (Java %parse-param and %lex-param): New test.
1197 (Java stype, position_class and location_class): New test.
1198
1199 2008-10-31 Di-an Jan <dianj@freeshell.org>
1200
1201 * data/lalr1.jave: Update copyright years.
1202 (YYParser): Correct name of "generated from" file in Javadoc:
1203 use b4_file_name instead of @ofile@.
1204 (Location constructor): Correct Javadoc parameter name.
1205 (yylloc): Add missing opening m4 quote after b4_location_if.
1206 This removes a stray [ in the Javadoc of Lexer.getStartPos.
1207 (Lexer.yyerror): Fix incorrect m4 and Javadoc.
1208 (YYParser constructor): Correct Javadoc parameter name.
1209
1210 2008-10-30 Joel E. Denny <jdenny@ces.clemson.edu>
1211
1212 Always put auxiliary code files in the same dir as other output files.
1213 * src/files.c (compute_file_name_parts): When the user specifies
1214 --output but not --file-prefix, extract the directory prefix from the
1215 file prefix not from the grammar file name. This affects the location
1216 of files like location.hh generated by the C++ skeleton. The includes
1217 in the other output files require this fix.
1218 * tests/output.at (AT_CHECK_OUTPUT): Automatically create directories
1219 for expected output files.
1220 (Output files): Add a test for the above.
1221
1222 2008-10-29 Joel E. Denny <jdenny@ces.clemson.edu>
1223
1224 * gnulib: Update submodule to HEAD.
1225
1226 2008-10-28 Joel E. Denny <jdenny@ces.clemson.edu>
1227
1228 Update copyright year.
1229 * src/files.c: Here.
1230
1231 2008-10-28 Di-an Jan <dianj@freeshell.org> (tiny change)
1232
1233 Don't overwrite the input file.
1234 * src/files.c (output_file_name_check): Fatal error if using input file
1235 for output.
1236 * tests/output.at: (AT_CHECK_CONFLICTING_OUTPUT): Add return status
1237 argument.
1238 (Conflicting output files): Add test.
1239
1240 2008-10-28 Akim Demaille <demaille@gostai.com>
1241
1242 Space changes.
1243 * data/lalr1.cc: Formatting changes.
1244
1245 2008-10-28 Akim Demaille <demaille@gostai.com>
1246
1247 Don't define debugging functions when !YYDEBUG.
1248 * data/lalr1.cc (debug_stream, set_debug_stream)
1249 (debug_level_type, debug_level, set_debug_level): Don't
1250 declare them when YYDEBUG is not defined.
1251 The implementation are already YYDEBUG-aware.
1252
1253 2008-10-28 Akim Demaille <demaille@gostai.com>
1254
1255 Prefer "continue" for empty loop bodies.
1256 * etc/bench.pl.in: Use "continue" instead of {}.
1257
1258 2008-10-28 Akim Demaille <demaille@gostai.com>
1259
1260 Space and comments changes.
1261 * data/c++.m4, data/glr.c, data/lalr1.cc: Copyright year changes.
1262 * data/c.m4, data/lalr1.cc: Space changes.
1263
1264 2008-10-28 Akim Demaille <demaille@gostai.com>
1265
1266 Make gnulib a submodule.
1267 * gnulib: New.
1268 * .gitmodules (gnulib): New.
1269
1270 2008-10-18 Joel E. Denny <jdenny@ces.clemson.edu>
1271
1272 Fix yyerror_range for user-defined location type in C++. Reported by
1273 Georg Sauthoff at
1274 <http://lists.gnu.org/archive/html/bug-bison/2008-08/msg00008.html>.
1275 * data/lalr1.cc (parse): Change type of yyerror_range to location_type.
1276 * THANKS (Georg Sauthoff): Add.
1277
1278 2008-10-18 Joel E. Denny <jdenny@ces.clemson.edu>
1279
1280 Update several administrative files mainly to facilitate releasing.
1281 * HACKING (Administrivia): Make the git-merge-changelog notes more
1282 helpful.
1283 (Test suite): Don't say lalr1.cc is not exercised in the test suite.
1284 (Release Procedure): Update for git and add numerous details that were
1285 previously missing.
1286 * Makefile.am (EXTRA_DIST): Remove Makefile.cfg and Makefile.maint.
1287 * maint.mk (announcement): Don't list bison as a bootstrap tool so
1288 that announcements don't claim we bootstrapped with whatever bison
1289 happened to be in PATH. Add flex as a bootstrap tool.
1290 * Makefile.maint: Remove, previously replaced by maint.mk.
1291 * Makefile.cfg: Remove, and migrate settings to...
1292 * cfg.mk: ... here for the sake of `make announcement'.
1293 * bootstrap.conf (gnulib_modules): Add announce-gen.
1294 * README: Say GNU Bison instead of just Bison. Suggested by Karl
1295 Berry.
1296
1297 2008-10-08 Di-an Jan <dianj@freeshell.org> (tiny change)
1298
1299 Small but important bugfixes for the Java skeleton.
1300 * data/lalr1.java (yyerror): Change Location to b4_location_type.
1301 (yy_symbol_print): Call toString on yyvaluep.
1302
1303 2008-08-29 Akim Demaille <demaille@gostai.com>
1304
1305 Clarify UPDATED use.
1306 * doc/bison.texinfo: It refers to the last edition of this file,
1307 not to the release date of Bison.
1308 Reported by Joel E. Denny.
1309
1310 2008-08-29 Akim Demaille <demaille@gostai.com>
1311
1312 * README: Update FAQ pointer.
1313 Reported by Joel E. Denny.
1314
1315 2008-08-27 Eric Blake <ebb9@byu.net>
1316
1317 Resync m4sugar from autoconf.
1318 * data/m4sugar/m4sugar.m4 (m4_defn, m4_popdef, m4_undefine)
1319 (m4_init): Adjust to latest m4.git changes.
1320 (m4_mapall_sep, _m4_list_cmp, m4_version_compare): Reduce side
1321 effects.
1322 * data/m4sugar/foreach.m4 (_m4_shiftn): Fix off-by-one bug.
1323 (_m4_list_cmp): Reduce side effects.
1324
1325 2008-08-27 Akim Demaille <demaille@gostai.com>
1326
1327 Check yyerrok in calc.at.
1328 * tests/calc.at (calc.y): Use yyerrok on "( error )".
1329 (AT_CHECK_CALC): Add a check that ensures that yyerrok works as
1330 expected.
1331
1332 2008-08-27 Akim Demaille <demaille@gostai.com>
1333
1334 Support yyerrok in lalr1.cc.
1335 YYBACKUP is still to import back into lalr1.cc.
1336 * data/lalr1.cc (yyerrork, yyclearin, YYRECOVERING): Define.
1337
1338 2008-08-26 Joel E. Denny <jdenny@ces.clemson.edu>
1339
1340 For maintainer-check*, don't recompile for a $(VERSION) update.
1341 * cfg.mk: New file.
1342 (_is-dist-target): Override the one in GNUmakefile.
1343 * Makefile.am (EXTRA_DIST): Add cfg.mk.
1344
1345 2008-08-26 Joel E. Denny <jdenny@ces.clemson.edu>
1346
1347 Update for recent change to gnulib.
1348 * src/parse-gram.y: Don't include strverscmp.h. It comes from
1349 string.h now.
1350
1351 2008-08-15 Eric Blake <ebb9@byu.net>
1352
1353 Remaining m4sugar merge from autoconf.
1354 * data/m4sugar/m4sugar.m4: Copy entire file from autoconf.
1355 * data/m4sugar/foreach.m4: New file, copied from autoconf.
1356 * data/Makefile.am (dist_m4sugar_DATA): Distribute it.
1357 * src/output.c (output_skeleton): Tell m4 how to find it.
1358
1359 Partial m4sugar merge from autoconf: m4_map.
1360 * data/m4sugar/m4sugar.m4 (m4_fst): Delete.
1361 (m4_map, m4_map_sep, _m4_map): Rewrite more efficiently.
1362 (m4_apply, _m4_apply, m4_mapall, m4_mapall_sep): New macros.
1363 * data/java.m4 (b4_token_enums): Use more efficient short-circuit
1364 for empty list.
1365 * data/c.m4 (b4_token_defines, b4_token_enums, b4_c_ansi_formals):
1366 Likewise.
1367 (b4_parse_param_for): Avoid m4_fst, now that autoconf no longer
1368 declares it.
1369
1370 2008-08-07 Joel E. Denny <jdenny@ces.clemson.edu>
1371
1372 Keep .version and PACKAGE_VERSION in sync.
1373 * Makefile.am ($(top_srcdir)/.version): Declare configure as a
1374 dependency, and add comments justifying this in more detail. Discussed
1375 starting at
1376 <http://lists.gnu.org/archive/html/bison-patches/2008-07/msg00022.html>.
1377
1378 2008-08-06 Eric Blake <ebb9@byu.net>
1379
1380 Partial m4sugar merge from autoconf: m4_shiftn.
1381 * data/m4sugar/m4sugar.m4 (m4_shiftn): Faster implementation.
1382 (m4_shift2, m4_shift3): New macros.
1383 (m4_case, m4_bmatch, m4_bpatsubsts, m4_join): Adjust clients.
1384 * data/c.m4 (b4_c_function_def, b4_c_ansi_function_def)
1385 (b4_c_ansi_function_decl, b4_c_function_call): Likewise.
1386 * data/java.m4 (b4_remove_comma): Likewise.
1387
1388 Partial m4sugar merge from autoconf: m4_wrap vs. m4 1.6.
1389 * data/m4sugar/m4sugar.m4 (m4_unquote, m4_wrap_lifo): New macros.
1390 (m4_wrap): Guarantee FIFO order, in spite of m4 1.6.
1391 (m4_init): Consolidate wrapped text into single m4_wrap.
1392 * data/bison.m4 (b4_check_user_names_wrap): Stick with LIFO order
1393 in wrapped text.
1394
1395 2008-08-05 Eric Blake <ebb9@byu.net>
1396
1397 Partial m4sugar merge from autoconf: builtins, version.m4.
1398 * data/m4sugar/m4sugar.m4 (changeword): Nuke.
1399 (m4_prepend): Remove, as it is unused and inherently quadratic,
1400 whereas m4_append is linear in newer m4.
1401 (m4_mkstemp): New builtin.
1402 (m4_symbols): Make rename conditional.
1403 (m4_version_prereq): Ensure fatal error if used in bison, which
1404 intentionally lacks version.m4.
1405
1406 Fix comments in m4sugar.
1407 * data/m4sugar/m4sugar.m4: Comment changes, borrowed from autoconf.
1408
1409 2008-08-02 Joel E. Denny <jdenny@ces.clemson.edu>
1410
1411 Update for recent .gitignore fix in Gnulib.
1412 * bootstrap: Back out 2008-07-18 hack now that gnulib-tool creates
1413 anchored .gitignore entries.
1414
1415 2008-08-02 Joel E. Denny <jdenny@ces.clemson.edu>
1416
1417 Set gnu or gnits strictness.
1418 * configure.ac (AM_INIT_AUTOMAKE): Set gnu strictness during
1419 development and gnits strictness for releases. Based on Eric Blake's
1420 suggestion at
1421 <http://lists.gnu.org/archive/html/bug-bison/2008-07/msg00019.html>.
1422
1423 2008-07-31 Paolo Bonzini <bonzini@gnu.org>
1424
1425 * NEWS: Clarify documentation of %language.
1426
1427 2008-07-31 Paolo Bonzini <bonzini@gnu.org>
1428
1429 Support usage of git-merge-changelog.
1430 * .gitattributes: New.
1431 * HACKING: Document usage of git-merge-changelog.
1432 * bootstrap: Install git-merge-changelog entries in .git/config
1433 if appropriate.
1434
1435 2008-07-27 Joel E. Denny <jdenny@ces.clemson.edu>
1436
1437 Remove remaining dependence on CVS Id keyword.
1438 * ChangeLog: For the sake of people still using CVS, don't use dollars
1439 when mentioning Id.
1440 * data/xslt/bison.xsl: Remove Id from header comments, where it was
1441 unusual anyway.
1442 * data/xslt/xml2dot.xsl: Likewise.
1443 * data/xslt/xml2text.xsl: Likewise.
1444 * data/xslt/xml2xhtml.xsl: Likewise.
1445 * doc/Doxyfile.in (PROJECT_NUMBER): Don't use ID.
1446 * doc/Makefile.am (neutralize): Remove, no longer needed.
1447 (.x.1): Don't use neutralize.
1448 (edit): Don't substitute for ID.
1449 (Doxyfile): Don't define Id, and thus don't depend on ChangeLog.
1450
1451 2008-07-27 Joel E. Denny <jdenny@ces.clemson.edu>
1452
1453 Fix dependence on computed configure variables.
1454 * doc/Makefile.am (common_dep): Depend on $(top_srcdir)/configure not
1455 $(top_srcdir)/configure.ac so that changes to computed variables, such
1456 as PACKAGE_VERSION, are seen.
1457 * tests/Makefile.am ($(srcdir)/package.m4): Likewise.
1458
1459 2008-07-20 Joel E. Denny <jdenny@ces.clemson.edu>
1460
1461 Update copyright dates for recent changes.
1462 * Makefile.am: Here.
1463 * src/Makefile.am: Here.
1464 * src/reduce.c: Here.
1465 * tests/reduce.at: Here.
1466
1467 2008-07-18 Joel E. Denny <jdenny@ces.clemson.edu>
1468
1469 Use git-version-gen for version names between releases.
1470 * .cvsignore (.tarball-version, GNUmakefile, *~): Add.
1471 * .gitignore (/.tarball-version, /GNUmakefile, /*~): Add.
1472 * .prev-version: New.
1473 * .version.in: Remove.
1474 * ChangeLog: Remove the Id previously used for capturing the CVS
1475 revision.
1476 * GNUmakefile: Remove, now copied from Gnulib.
1477 * Makefile.am: Add code suggested by comments in
1478 build-aux/git-version-gen.
1479 (EXTRA_DIST): Remove GNUmakefile, handled by Gnulib. Add maint.mk,
1480 .prev-version, and .version.
1481 * NEWS (2.3b+): Rename to...
1482 (?.?): ... this because we're dropping the "+" version naming scheme,
1483 but, in general, we still can't be sure of our next release name.
1484 * bootstrap: Add a quick hack to remove from .gitignore the
1485 GNUmakefile entry that gnulib adds. We already have a /GNUmakefile
1486 entry. This should really be fixed in gnulib instead.
1487 * bootstrap.conf (gnulib_modules): Add gnumakefile.
1488 * configure.ac (AC_INIT): Set version name by invoking
1489 build-aux/git-version-gen.
1490 (AC_CONFIG_FILES): Remove .version, now generated by
1491 build-aux/git-version-gen.
1492 * maint.mk: New, copied from coreutils.
1493 * doc/.cvsignore (bison.1): Add.
1494 * doc/.gitignore (/bison.1): Add.
1495 * doc/bison.1: Remove, generated.
1496 * src/.cvsignore (revision.c): Remove.
1497 * src/.gitignore (/revision.c): Remove.
1498 * src/Makefile.am (bison_SOURCES): Remove revision.c and revision.h.
1499 (BUILT_SOURCES): Remove revision.c.
1500 (revision.c): Remove.
1501 * src/getargs.c (version): Don't print revision after the VERSION.
1502 * src/revision.h: Remove.
1503
1504 2008-07-16 Joel E. Denny <jdenny@ces.clemson.edu>
1505
1506 Fix untranslatable composition of sentences. Reported by Goran
1507 Uddeborg at
1508 <http://lists.gnu.org/archive/html/bug-bison/2008-06/msg00000.html>.
1509 * THANKS (Goran Uddeborg): Add.
1510 * src/reduce.c (reduce_print): Report the number of nonterminals and
1511 rules useless in the grammar in separate sentences.
1512 * tests/reduce.at (Useless Rules): Update output.
1513 (Reduced Automaton): Likewise.
1514 (Underivable Rules): Likewise.
1515 (Empty Language): Likewise.
1516
1517 2008-07-15 Joel E. Denny <jdenny@ces.clemson.edu>
1518
1519 Fix some .gitignore and .cvsignore problems.
1520 * bootstrap (insert_sorted_if_absent): Replace all uses with...
1521 (insert_vc_ignore): ... this new function, which prepends `/' to all
1522 .gitignore entries before passing them to insert_sorted_if_absent.
1523 * bootstrap.conf (vc_ignore): Set to '.cvsignore .gitignore' so that
1524 .cvsignore files are maintained even though Bison developers run
1525 bootstrap while using Git.
1526 * .cvsignore (*.patch *.log log patches applied): Remove, apparently
1527 unneeded by Bison.
1528 (gnulib): Add.
1529 * .gitignore (/*.patch *.log log patches applied): Remove, broken and
1530 unneeded. Reported by Eric Blake.
1531 * lib/.gitignore (/*~): Add.
1532 * po/.cvsignore, runtime-po/.cvsignore: Sync with .gitignore.
1533 * examples/calc++/.gitignore (/calc++.exe): Add. Reported by Eric
1534 Blake.
1535 * src/.gitignore (/bison.exe): Add. Reported by Eric Blake.
1536
1537 2008-07-15 Joel E. Denny <jdenny@ces.clemson.edu>
1538
1539 Improve forward-compatibility with GNU M4. Reported by Eric Blake at
1540 <http://lists.gnu.org/archive/html/bug-bison/2008-07/msg00000.html>.
1541 * bootstrap.conf (gnulib_modules): Add unsetenv.
1542 * lib/.gitignore, lib/.cvsignore (/unsetenv.c): Add.
1543 * m4/.gitignore, m4/.cvsignore (/environ.m4): Add.
1544 (/setenv.m4): Add.
1545 * src/output.c (output_skeleton): For the m4 invocation, pass -dV as
1546 the first argument because it may become position-dependent, and unset
1547 POSIXLY_CORRECT so Bison's skeletons have access to GNU M4 extensions.
1548 Add comments explaining these issues in more detail.
1549
1550 2008-07-14 Joel E. Denny <jdenny@ces.clemson.edu>
1551
1552 Add .gitignore everywhere based on .cvsignore.
1553 * .gitignore: New.
1554 * build-aux/.gitignore: New.
1555 * data/.gitignore: New.
1556 * doc/.gitignore: New.
1557 * etc/.gitignore: New.
1558 * examples/.gitignore: New.
1559 * examples/calc++/.gitignore: New.
1560 * lib/.gitignore: New.
1561 * m4/.gitignore: New.
1562 * po/.gitignore: New.
1563 * runtime-po/.gitignore: New.
1564 * src/.gitignore: New.
1565 * tests/.gitignore: New.
1566
1567 2008-05-27 Joel E. Denny <jdenny@ces.clemson.edu>
1568
1569 * NEWS (2.3b+): New section, empty for now.
1570 * configure.ac (AC_INIT): 2.3b -> 2.3b+.
1571
1572 2008-05-27 Joel E. Denny <jdenny@ces.clemson.edu>
1573
1574 * NEWS (2.3b): Update release date since there has been a delay in
1575 getting the announcements and tarballs out.
1576
1577 2008-05-23 Joel E. Denny <jdenny@ces.clemson.edu>
1578
1579 * NEWS: Version 2.3b.
1580 * configure.ac (AC_INIT): Likewise.
1581 (PACKAGE_COPYRIGHT_YEAR): Update to 2008.
1582
1583 2008-05-23 Joel E. Denny <jdenny@ces.clemson.edu>
1584
1585 * HACKING: Don't say don't mention HACKING in the ChangeLog. We've
1586 been doing it for years.
1587 (Test suite): Mention maintainer-push-check and maintainer-xml-check.
1588 (Release Procedure): Add FIXME about make alpha being unmaintained.
1589
1590 2008-05-13 Joel E. Denny <jdenny@ces.clemson.edu>
1591
1592 * data/yacc.c: Reformat m4 a little for readability.
1593 * src/lalr.c (build_relations): Correct comment.
1594
1595 2008-05-12 Juan Manuel Guerrero <juan.guerrero@gmx.de>
1596
1597 DJGPP specific issue.
1598 * djgpp/config.sed: Fixes required to run configure scripts generated
1599 by autoconf 2.62.
1600
1601 2008-05-07 Joel E. Denny <jdenny@ces.clemson.edu>
1602
1603 * HACKING (Release Procedure): translation@iro.umontreal.ca is now
1604 coordinator@translationproject.org.
1605
1606 2008-05-06 Joel E. Denny <jdenny@ces.clemson.edu>
1607
1608 * THANKS: Add Eric Blake.
1609
1610 2008-04-23 Eric Blake <ebb9@byu.net>
1611
1612 Revert prior patch, by working around autoconf regression.
1613 * tests/output.at (m4_expand): Add workaround for autoconf 2.62.
1614 ("Output file name: ("): Uncomment test.
1615 ("Output file name: )"): Likewise.
1616 Based on an idea from Noah Misch.
1617
1618 2008-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
1619
1620 Work-around an Autoconf 2.62 AT_SETUP bug that was not present in
1621 2.61. Reported by Juan Manuel Guerrero at
1622 <http://lists.gnu.org/archive/html/bug-bison/2008-04/msg00011.html>.
1623 * tests/output.at ("Output file name: ("): Comment out test case for
1624 now.
1625 ("Output file name: )"): Likewise.
1626
1627 2008-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
1628
1629 * GNUmakefile: Update git-version-gen invocation so make dist
1630 succeeds.
1631
1632 2008-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
1633
1634 Update to the current gnulib CVS repository, and fix trigraph handling
1635 in Bison.
1636 * bootstrap: Update gnulib CVS repository URL.
1637 (symlink_to_dir): Encapsulate the code that guarantees the destination
1638 directory exists into...
1639 (check_dst_dir): ... this new function, and...
1640 (cp_mark_as_generated): ... reuse it here so that bootstrap doesn't
1641 fail when copying files into lib/uniwidth/.
1642 * src/output.c (prepare_symbols): When writing yytname muscles, where
1643 symbol names will be encoded in C-string literals, tell quotearg to
1644 escape trigraphs. This used to be the default in gnulib.
1645 * tests/regression.at (Token definitions): Because of the change in
1646 gnulib's quotearg behavior, string_as_id in parse-gram.y no longer
1647 escapes trigraphs in symbol names. Thus, yytname no longer has
1648 trigraphs unnecessarily doubly escaped. Update test case output.
1649 Extend test case to be sure Bison's own error messages will no longer
1650 have trigraphs in symbol names unnecessarily escaped once.
1651
1652 2008-04-20 Joel E. Denny <jdenny@ces.clemson.edu>
1653
1654 Fix make dist infinite loop reported by Juan Manuel Guerrero at
1655 <http://lists.gnu.org/archive/html/bug-bison/2008-01/msg00009.html>.
1656 * .cvsignore: Add .version.
1657 * .version.in: New.
1658 * bootstrap.conf (gnulib_modules): Add git-version-gen.
1659 * configure.ac (AC_CONFIG_FILES): Add .version.
1660 * build-aux/.cvsignore: Add git-version-gen.
1661
1662 2008-03-08 Joel E. Denny <jdenny@ces.clemson.edu>
1663
1664 * NEWS (2.3a+): Mention that -g now takes an argument.
1665 * doc/bison.texinfo (Bison Options): Reword -W entry a little for
1666 consistency. Update the -g and -x entries now that they take
1667 arguments. Use brackets to indicate optional arguments.
1668 * src/getargs.c (usage): Explain the relationship between arguments of
1669 long and short options more completely. Document --defines and -d
1670 separately since the former takes an argument but, for POSIX Yacc, the
1671 latter does not.
1672 (short_options): Let -W take an optional argument like --warnings.
1673 (getargs): Sort cases.
1674
1675 2008-02-28 Akim Demaille <demaille@gostai.com>
1676
1677 * doc/bison.texinfo: Fix a few typos.
1678
1679 2008-02-28 Akim Demaille <akim@epita.fr>
1680
1681 * doc/bison.texinfo (Bison Options): Document -W.
1682 Based on Joel E. Denny's NEWS entry, and Automake's documentation.
1683
1684 2008-02-28 Akim Demaille <akim@epita.fr>
1685
1686 * src/getargs.c (short_options): Split and sort for readability.
1687 -g and -x take optional arguments, just like their long options.
1688 * build-aux/cross-options.pl: Use /x to make the regexp easier to
1689 understand.
1690 Fix the handling of $opt which resulted in all the argument to be
1691 considered as optional.
1692
1693 2008-02-22 Joel E. Denny <jdenny@ces.clemson.edu>
1694
1695 * NEWS (2.3a+): Don't say %language is experimental. Mention Java and
1696 say its interface is experimental.
1697 * doc/bison.texinfo (Decl Summary): In the %language entry, mention
1698 Java.
1699 (Bison Options): In the -L and --language entry, mention Java.
1700 (Java Bison Interface): Say the interface is experimental.
1701 * src/getargs.c (usage): Mention -L and --language.
1702
1703 * NEWS (2.3a+): Say the push parsing interface is experimental.
1704 * doc/bison.texinfo (Push Decl): Likewise.
1705 (Decl Summary): Likewise in the "%define api.push_pull" entry.
1706 (Push Parser Function): Likewise.
1707 (Pull Parser Function): Likewise.
1708 (Parser Create Function): Likewise.
1709 (Parser Delete Function): Likewise.
1710 (Table of Symbols): Likewise in the yypstate_delete, yypstate_new,
1711 yypull_parse, and yypush_parse entries.
1712
1713 * NEWS (2.3a+): Mention XML support, and say the schema is
1714 experimental.
1715 * doc/bison.texinfo (Bison Options): Mention -x and --xml.
1716 * src/getargs.c (usage): Say the XML schema is experimental.
1717
1718 * NEWS (2.3a+): Say option instead of flag.
1719
1720 2008-02-21 Wojciech Polak <polak@gnu.org>
1721
1722 * data/xslt/xml2xhtml.xsl (xsl:template match="/"): Change footer
1723 text.
1724
1725 2008-02-20 Joel E. Denny <jdenny@ces.clemson.edu>
1726
1727 Fix impure push parser compile error reported by Bob Rossi at
1728 <http://lists.gnu.org/archive/html/help-bison/2008-02/msg00023.html>.
1729 * data/yacc.c: Clean up whitespace in the output a little.
1730 (yypstate_allocated): Define for impure push parsers regardless of
1731 whether the pull interface is also requested.
1732 * tests/push.at (Push Parsing: Multiple impure instances): Extend to
1733 check impure push parsers without the pull interface.
1734
1735 * data/yacc.c (yypstate_new): Don't try to invoke yyerror since
1736 yyerror takes arguments specified by %parse-param while yypstate_new
1737 does not.
1738 * doc/bison.texinfo (Parser Create Function): Document that
1739 yypstate_new returns 0 for multiple impure parser instances.
1740 * tests/push.at (Push Parsing: Multiple impure instances): Update
1741 expected stderr output.
1742
1743 2008-02-19 Joel E. Denny <jdenny@ces.clemson.edu>
1744
1745 * runtime-po/POTFILES.in (push.c): Remove.
1746
1747 2008-02-17 Joel E. Denny <jdenny@ces.clemson.edu>
1748
1749 * data/Makefile.am (dist_pkgdata_DATA): Remove push.c.
1750 * data/push.c: Rename to...
1751 * data/yacc.c: ... this, overwriting it.
1752 * etc/bench.pl.in (bench_grammar): `%pure-parser'-> `%define api.pure'.
1753 `%push-pull-parser' -> `%define api.push_pull "both"'.
1754 Remove old yacc.c tests, and update push.c tests to yacc.c.
1755
1756 2008-02-17 Joel E. Denny <jdenny@ces.clemson.edu>
1757
1758 * data/bison.m4 (b4_percent_code_get): Output %code block comments like
1759 `"%code top" blocks' instead of `%code "top" blocks'.
1760 * data/push.c: Import yacc.c changes from 2008-01-09 and 2007-08-03.
1761 Clean up whitespace in the output a little.
1762
1763 2008-02-16 Joel E. Denny <jdenny@ces.clemson.edu>
1764
1765 Fix documentation problems reported by Tim Josling at
1766 <http://lists.gnu.org/archive/html/bug-bison/2008-01/msg00013.html>.
1767 * NEWS (2.3a+): Mention removal of --no-parser, -n, and %no-parser.
1768 * doc/bison.texinfo (Token Decl): Token numbers are *nonnegative*
1769 integers. Explain the effect of literal string aliases on error
1770 messages. Copy token 0 documentation from the C++ skeleton
1771 documentation.
1772
1773 2008-02-16 Joel E. Denny <jdenny@ces.clemson.edu>
1774
1775 Accept a token number in a %left, %right, or %nonassoc for POSIX
1776 conformance. Reported by Tim Josling at
1777 <http://lists.gnu.org/archive/html/bug-bison/2008-01/msg00010.html>.
1778 * NEWS (2.3a+): Mention.
1779 * doc/bison.texinfo (Precedence Decl): Describe how literal strings
1780 and code numbers are treated by precedence declarations.
1781 * src/parse-gram.y (precedence_declaration): Use symbols.prec instead
1782 of symbols.1.
1783 (symbols.prec): New, just like symbols.1 but uses symbol.prec instead
1784 of symbol.
1785 (symbol.prec): New, just like symbol but allows INT.
1786 * src/symtab.c (symbol_user_token_number_set): Remove an aver that no
1787 longer holds.
1788 * tests/regression.at (Token number in precedence declaration): New
1789 test case.
1790
1791 2008-02-06 Juan Manuel Guerrero <juan.guerrero@gmx.de>
1792
1793 DJGPP specific issues.
1794 * djgpp/config.bat: Add filenames that are not 8.3 clean and that must
1795 be changed. Copyright timestamp adjusted.
1796 * djgpp/config.sed: Add filenames that are not 8.3 clean and that must
1797 be changed. Copyright timestamp adjusted.
1798 * djgpp/config.site: Copyright timestamp adjusted.
1799 * djgpp/config_h.sed: Copyright timestamp adjusted.
1800 * djgpp/djunpack.bat: Copyright timestamp adjusted.
1801 * djgpp/fnchnage.lst: Add filenames that are not 8.3 clean to the
1802 filename translation list.
1803 * djgpp/subpipe.c (init_subpipe): Check the environment variables
1804 TMPDIR, TMP and TEMP, in that order, to determinate where the temp
1805 files shall be created. Before trying to use the temp dir where the
1806 environment variable points to check that the dir really exists. If
1807 not default to the cwd as temp dir. Copyright timestamp adjusted.
1808 * djgpp/subpipe.h: Copyright timestamp adjusted.
1809 * djgpp/testsuite.sed: Copyright timestamp adjusted.
1810
1811 2008-01-30 Paul Eggert <eggert@cs.ucla.edu>
1812
1813 * doc/bison.texinfo: Update Back-Cover text to reflect new GNU wording.
1814
1815 2008-01-09 Paul Eggert <eggert@cs.ucla.edu>
1816
1817 * data/yacc.c (yyparse): Correct the comment when locations aren't used.
1818 Problem reported by Claudio Saavedra in
1819 <http://lists.gnu.org/archive/html/bug-bison/2008-01/msg00003.html>.
1820
1821 2008-01-05 Wojciech Polak <polak@gnu.org>
1822
1823 * data/xslt/xml2xhtml.xsl (xsl:template match="/"): Precede an XHTML
1824 document's title with the input grammar file name.
1825
1826 2007-12-22 Joel E. Denny <jdenny@ces.clemson.edu>
1827
1828 Automate regression testing of the XML/XSLT implementation. Discussed
1829 starting at
1830 <http://lists.gnu.org/archive/html/bison-patches/2007-11/msg00021.html>.
1831 * configure.ac (XSLTPROC): New substitution.
1832 * Makefile.am (maintainer-xml-check): New phony target invoking...
1833 * tests/Makefile.am (maintainer-xml-check): ... this new phony target
1834 invoking make maintainer-check with BISON_TEST_XML=1.
1835 * tests/atlocal.in (XSLTPROC): New.
1836 * tests/local.at (AT_BISON_CHECK): New macro to (1) instruct Valgrind
1837 not to report reachable memory when Bison is expected to have a
1838 non-zero exit status and (2) to compare XML/XSLT output with --graph
1839 and --report=all output for every working grammar when
1840 BISON_TEST_XML=1.
1841 (AT_BISON_CHECK_NO_XML): Likewise, but skip XML checks.
1842 (AT_BISON_CHECK_XML): New.
1843 (AT_QUELL_VALGRIND): New.
1844 * tests/testsuite.at (ORIGINAL_AT_CHECK): Remove this and...
1845 (AT_CHECK): ... don't redefine this since this was the old way to
1846 quell Valgrind.
1847 * tests/actions.at: Rewrite all AT_CHECK invocations for bison as
1848 AT_BISON_CHECK invocations.
1849 * tests/c++.at: Likewise.
1850 * tests/calc.at: Likewise.
1851 * tests/conflicts.at: Likewise.
1852 * tests/cxx-type.at: Likewise.
1853 * tests/existing.at: Likewise.
1854 * tests/glr-regression.at: Likewise.
1855 * tests/headers.at: Likewise.
1856 * tests/input.at: Likewise.
1857 * tests/java.at: Likewise.
1858 * tests/output.at: Likewise.
1859 * tests/push.at: Likewise.
1860 * tests/reduce.at: Likewise.
1861 * tests/regression.at: Likewise.
1862 * tests/sets.at: Likewise.
1863 * tests/skeletons.at: Likewise.
1864 * tests/synclines.at: Likewise.
1865 * tests/torture.at: Likewise.
1866 (Big triangle): Use AT_BISON_CHECK_NO_XML instead since this grammar
1867 tends to hang xsltproc.
1868 (Big horizontal): Likewise.
1869
1870 2007-12-08 Joel E. Denny <jdenny@ces.clemson.edu>
1871
1872 In XML output, remove redundant class attribute on symbol element.
1873 * data/xslt/bison.xsl (xsl:key name="bison:symbolByName"): New.
1874 * data/xslt/xml2xhtml.xsl (xsl:template match="symbol"): Use it to
1875 look up a symbol to determine whether it's a nonterminal or terminal.
1876 * src/gram.c (rule_rhs_print_xml): Remove class attribute.
1877 * src/state.c (state_rule_lookahead_tokens_print_xml): Likewise.
1878
1879 Add prec/assoc information to XML output.
1880 * src/gram.c (grammar_rules_print_xml): For each rule that has a
1881 %prec, add a percent_prec attribute.
1882 * src/print-xml.c (print_grammar): For each terminal that has a
1883 precedence or associativity, add a prec or assoc attribute.
1884 (xml_indent): New.
1885 (xml_puts): Use xml_indent.
1886 (xml_printf): Use xml_indent.
1887 * src/print-xml.h (xml_indent): Prototype.
1888
1889 * tests/existing.at (GNU pic Grammar): Fix a rule miscopied from
1890 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00026.html>.
1891
1892 2007-12-08 Joel E. Denny <jdenny@ces.clemson.edu>
1893
1894 * data/xslt/bison.xsl (bison:ruleNumber): Rename to...
1895 (bison:ruleByNumber): ... this for clarity.
1896 * data/xslt/xml2dot.xsl (xsl:template match="item"): Update.
1897 * data/xslt/xml2text.xsl (xsl:template match="item"): Update.
1898 (xsl:template match="reduction"): Update.
1899 (xsl:template match="item"): Update.
1900 (xsl:template match="reduction"): Update.
1901
1902 In the XML output, don't print the list of rules where symbols appear.
1903 Compute it in XSLT instead. Discussed at
1904 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00024.html>.
1905 * data/xslt/bison.xsl (bison:ruleByLhs): New.
1906 (bison:ruleByRhs): New.
1907 * data/xslt/xml2text.xsl (xsl:template match="terminal"): Use
1908 bison:ruleByRhs.
1909 (xsl:template match="terminal/rule"): Remove.
1910 (xsl:template match="nonterminal"): Use bison:ruleByLhs and
1911 bison:ruleByRhs.
1912 (xsl:template match="nonterminal/left/rule|nonterminal/right/rule"):
1913 Remove.
1914 * data/xslt/xml2xhtml.xsl (xsl:template match="terminal"): Use
1915 bison:ruleByRhs and mode="number-link" for rule template.
1916 (xsl:template match="terminal/rule"): Remove.
1917 (xsl:template match="nonterminal"): Use bison:ruleByLhs and
1918 bison:ruleByRhs and mode="number-link" for rule template.
1919 (xsl:template match="nonterminal/left/rule|nonterminal/right/rule"):
1920 Rewrite as...
1921 (xsl:template match="rule" mode="number-link"): ... this.
1922 * src/print-xml.c (print_grammar): Don't print the list of rules.
1923
1924 2007-12-01 Joel E. Denny <jdenny@ces.clemson.edu>
1925
1926 Don't let --report affect XML output; always print all information.
1927 Discussed at
1928 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00020.html>.
1929 * src/conflicts.c (log_resolution): Implement.
1930 * src/print-xml.c (print_core): Implement.
1931 (print_state): Implement.
1932 (print_xml): Implement.
1933
1934 * NEWS (2.3a+): Fix quotes.
1935 * src/parse-gram.y (prologue_declaration): For consistency with -v,
1936 don't let %verbose clear the list specified by --report.
1937
1938 2007-11-26 Akim Demaille <akim@epita.fr>
1939
1940 * data/Makefile.am (dist_pkgdata_DATA): Ship and install bison.xsl.
1941
1942 2007-11-24 Joel E. Denny <jdenny@ces.clemson.edu>
1943
1944 In the XML output, list useless and unused symbols and rules with the
1945 useful ones and add a "usefulness" attribute. Discussed starting at
1946 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00017.html>.
1947 * src/gram.c (grammar_rules_partial_print_xml): Remove.
1948 (grammar_rules_print_xml): Print all rules instead of just those
1949 useful in the grammar, and add a "usefulness" attribute.
1950 * src/gram.h (grammar_rules_partial_print_xml): Remove prototype.
1951 * src/print-xml.c (print_rules_useless_in_parser): Remove.
1952 (print_grammar): Print all nonterminals instead of just useful ones,
1953 and add a "usefulness" attribute to nonterminals and terminals.
1954 (print_xml): Don't print a separate "reductions" or
1955 "rules-useless-in-parser" element.
1956 * src/reduce.c (reduce_output): Use reduce_token_unused_in_grammar.
1957 (reduce_xml): Remove.
1958 (reduce_token_unused_in_grammar): New.
1959 (reduce_nonterminal_useless_in_grammar): New.
1960 * src/reduce.h (reduce_xml): Remove prototype.
1961 (reduce_token_unused_in_grammar): Add prototype.
1962 (reduce_nonterminal_useless_in_grammar): Add prototype.
1963 * data/xslt/xml2text.xsl: Update for XML changes.
1964 * data/xslt/xml2xhtml.xsl: Update for XML changes.
1965 * tests/reduce.at (Useless Terminals): Update output.
1966 (Useless Rules): Update output.
1967 (Reduced Automaton): Update output.
1968
1969 Say "Terminals unused in grammar" instead of "Unused terminals".
1970 * NEWS (2.3a+): Update.
1971 * doc/bison.texinfo (Understanding): Update example output.
1972 * src/reduce.c (reduce_output): Implement.
1973 * data/xslt/xml2text.xsl: Implement.
1974 * data/xslt/xml2xhtml.xsl: Implement.
1975
1976 2007-11-18 Joel E. Denny <jdenny@ces.clemson.edu>
1977
1978 Accept --report-file=FILE to override the default `.output' filename.
1979 * NEWS (2.3a+): Mention.
1980 * doc/bison.texinfo (Bison Options): Add an entry.
1981 * src/files.c (compute_output_file_names): Don't override
1982 spec_verbose_file if already set.
1983 * src/getargs.c (usage): Document --report-file.
1984 (REPORT_FILE_OPTION): New anonymous enum member.
1985 (long_options): Add entry for it.
1986 (getargs): Add case for it setting spec_verbose_file.
1987
1988 * build-aux/cross-options.pl: Don't record a short option just because
1989 there's an arg.
1990 * doc/.cvsignore: Add yacc.1.
1991
1992 2007-11-14 Akim Demaille <akim@epita.fr>
1993
1994 * doc/yacc.1.in: New.
1995 * configure.ac, doc/Makefile.am: Adjust.
1996 * configure.ac (PACKAGE_COPYRIGHT_YEAR): New substitution, and new
1997 config.h symbol.
1998 Use AC_SUBST for assignments too.
1999 * src/getargs.c (version): Use PACKAGE_COPYRIGHT_YEAR.
2000
2001 2007-11-10 Joel E. Denny <jdenny@ces.clemson.edu>
2002
2003 * src/gram.c: Remove comments that duplicate comments in gram.h.
2004
2005 When reporting useless rules and nonterminals, say "useless in grammar"
2006 instead of "useless", and say "useless in parser" instead of "never
2007 reduced". Discussed starting at
2008 <http://lists.gnu.org/archive/html/bison-patches/2007-10/msg00033.html>.
2009 * NEWS (2.3a+): Mention this change.
2010 * data/xslt/xml2text.xsl: Update output text and expected input XML
2011 element names to match changes below.
2012 * data/xslt/xml2xhtml.xsl: Likewise.
2013 (xsl:template match="bison-xml-report"): Add missing entry in Table of
2014 Contents: "Rules useless in parser due to conflicts".
2015 * doc/bison.texinfo (Decl Summary): Reword a little.
2016 (Understanding): Update example output for changes below.
2017 * src/gram.c: (rule_useful_p): Rename to...
2018 (rule_useful_in_grammar_p): ... this.
2019 (rule_useless_p): Rename to...
2020 (rule_useless_in_grammar_p): ... this.
2021 (rule_never_reduced_p): Rename to...
2022 (rule_useless_in_parser_p): ... this.
2023 (grammar_rules_print): Update for renames.
2024 (grammar_rules_print_xml): Update for renames.
2025 (grammar_rules_never_reduced_report): Rename to...
2026 (grammar_rules_useless_report): ... this since it is used for either
2027 kind of useless rule.
2028 * src/gram.h: Reword comments and update function names in prototypes.
2029 * src/main.c (main): Say "rule useless in parser due to conflicts".
2030 * src/print-xml.c (print_rules_never_reduced): Rename to...
2031 (print_rules_useless_in_parser): ... this, and rename output XML
2032 element "rules-never-reduced" to "rules-useless-in-parser".
2033 (print_xml): Update for rename.
2034 * src/print.c (print_results): Say "Rules useless in parser due to
2035 conflicts".
2036 * src/reduce.c (reduce_grammar_tables): Say "rule useless in grammar".
2037 (nonterminals_reduce): Say "nonterminal useless in grammar".
2038 (reduce_output): Say "Nonterminals useless in grammar".
2039 Say "Rules useless in grammar".
2040 (reduce_xml): Rename output XML element "useless" to
2041 "useless-in-grammar".
2042 (reduce_print): Don't report the count of grammatically useless rules
2043 as "rules never reduced" just because %yacc is specified.
2044 In the correct report of this count, say nonterminal(s) and rule(s)
2045 "useless in grammar".
2046 * tests/conflicts.at (S/R in initial): Update expected output.
2047 (Defaulted Conflicted Reduction): Likewise.
2048 (Unreachable States After Conflict Resolution): Likewise.
2049 * tests/existing.at (GNU pic Grammar): Likewise.
2050 * tests/reduce.at (Useless Nonterminals): Likewise.
2051 (Useless Rules): Likewise.
2052 (Reduced Automaton): Likewise.
2053 (Underivable Rules): Likewise.
2054 (Empty Language): Likewise.
2055
2056 2007-11-09 Joel E. Denny <jdenny@ces.clemson.edu>
2057
2058 * data/bison.m4 (b4_cat): Put a newline after the end delimiter of the
2059 here document and before the EOF so that BSD's implementation of Bourne
2060 shell doesn't parse the delimiter as part of the here document.
2061 * doc/.cvsignore: Add cross-options.texi.
2062 * src/getargs.c (usage): Add a blank line after the warning categories.
2063
2064 2007-11-08 Paolo Bonzini <bonzini@gnu.org>
2065
2066 * data/lalr1.java (Lexer): Remove usage of b4_pure_if.
2067
2068 2007-11-05 Akim Demaille <akim@epita.fr>
2069
2070 Remove Id: from bison.1.
2071 * doc/Makefile.am (remove_time_stamp): Include the sed invocation.
2072 (perl -0777 -pi -e 's/\.PP\nId): New.
2073 (.x.1): Use it to ignore the version control revision.
2074
2075 2007-11-05 Akim Demaille <demaille@gostai.com>
2076
2077 * build-aux/Makefile.am: Ship cross-options.pl.
2078 * doc/Makefile.am: Always refer to cross-options.texi with
2079 $(srcdir).
2080 (MAINTAINERCLEANFILES): Add it.
2081
2082 2007-11-04 Akim Demaille <demaille@gostai.com>
2083
2084 Generate the long/short option cross-table.
2085 * build-aux/cross-options.pl: New.
2086 * doc/Makefile.am (cross-options.texi): New.
2087 * doc/bison.texinfo: Use it.
2088
2089 2007-11-04 Akim Demaille <demaille@gostai.com>
2090
2091 Generate bison.1 using help2man.
2092 * doc/common.x, doc/bison.x: New.
2093 * doc/Makefile.am (bison.1, .x.1): New.
2094 The code is taken from autoconf-2.61/man/Makefile.am.
2095 * configure.ac: Look for help2man.
2096
2097 2007-11-04 Akim Demaille <demaille@gostai.com>
2098
2099 Complete --help.
2100 * src/getargs.c (usage): Document -W, make it clear that -d,
2101 -g and -x have optional arguments.
2102
2103 2007-11-04 Akim Demaille <demaille@gostai.com>
2104
2105 Find sha1sum when named gsha1sum.
2106 * bootstrap (find_tool): New.
2107 ($SHA1SUM): New.
2108
2109 2007-10-28 Joel E. Denny <jdenny@ces.clemson.edu>
2110
2111 Deprecate %pure-parser and add `%define api.pure'. Discussed starting
2112 at
2113 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00006.html>.
2114 * NEWS (2.3a+): Mention.
2115 * data/bison.m4 (b4_pure_if): Don't define it here.
2116 * data/c.m4 (b4_identification): Depend on individual skeletons to
2117 define b4_pure_flag, b4_push_flag, or b4_pull_flag if they use the
2118 values of the %define variables api.pure or api.push_pull. Define
2119 YYPURE, YYPUSH, and YYPULL accordingly.
2120 * data/glr.c: Define b4_pure_if based on `%define api.pure' unless
2121 glr.cc has already defined b4_pure_flag.
2122 * data/push.c: Define b4_pure_if based on `%define api.pure'.
2123 Remove YYPUSH and YYPULL since they're back in b4_identification again.
2124 * data/yacc.c: Define b4_pure_if based on `%define api.pure'.
2125 * doc/bison.texinfo (Pure Decl): Update.
2126 (Push Decl): Update.
2127 (Decl Summary): Add api.pure to %define entry.
2128 In %pure-parser entry, say it's deprecated and reference %define.
2129 (Pure Calling): Update.
2130 (Error Reporting): Update.
2131 (C++ Scanner Interface): Update.
2132 (How Can I Reset the Parser): Update.
2133 (Table of Symbols): In %pure-parser entry, say it's deprecated and
2134 reference %define.
2135 * src/getargs.c (pure_parser): Remove global variable.
2136 * src/getargs.h (pure_parser): Remove extern.
2137 * src/output.c (prepare): Don't define pure_flag muscle.
2138 * src/parse-gram.y (prologue_declaration): Implement %pure-parser as a
2139 wrapper around `%define api.pure'.
2140 * tests/calc.at (Simple LALR Calculator): Update.
2141 (Simple GLR Calculator): Update.
2142 * tests/cxx-type.at (GLR: Resolve ambiguity, pure, no locations):
2143 Update.
2144 (GLR: Resolve ambiguity, pure, locations): Update.
2145 (GLR: Merge conflicting parses, pure, no locations): Update.
2146 (GLR: Merge conflicting parses, pure, locations): Update.
2147 * tests/glr-regression.at (Uninitialized location when reporting
2148 ambiguity): Update
2149 * tests/input.at (Unused %define api.pure): New test case.
2150 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Update definition for
2151 AT_PURE_IF and AT_PURE_AND_LOC_IF.
2152 * tests/push.at (Push Parsing: Memory Leak for Early Deletion): Update.
2153
2154 2007-10-28 Joel E. Denny <jdenny@ces.clemson.edu>
2155
2156 %define push_pull -> %define api.push_pull. Discussed starting at
2157 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00005.html>.
2158 * data/push.c: Expect the new name.
2159 * data/yacc.c: Likewise.
2160 * doc/bison.texinfo (Push Decl): Update.
2161 (Decl Summary): Update %define entry.
2162 (Push Parser Function): Update.
2163 (Pull Parser Function): Update.
2164 (Parser Create Function): Update.
2165 (Parser Delete Function): Update.
2166 * tests/calc.at (Simple LALR Calculator): Update.
2167 * tests/input.at (%define enum variables): Update.
2168 * tests/push.at (Push Parsing: Memory Leak for Early Deletion): Update.
2169 (Push Parsing: Multiple impure instances): Update.
2170 (Push Parsing: Unsupported Skeletons): Update.
2171 * tests/torture.at (Exploding the Stack Size with Alloca): Update.
2172 (Exploding the Stack Size with Malloc): Update.
2173
2174 * NEWS (2.3a+): Add an entry for the push parser, and clean up the
2175 other entries some.
2176
2177 2007-10-27 Joel E. Denny <jdenny@ces.clemson.edu>
2178
2179 For the XML output's terminal element, rename @number to @token-number,
2180 and add @symbol-number. In the nonterminal element, rename @number to
2181 @symbol-number. Discussed starting at
2182 <http://lists.gnu.org/archive/html/bison-patches/2007-10/msg00040.html>.
2183 * data/xslt/xml2text.xsl (xsl:template match="terminal"): Update for
2184 renames.
2185 (xsl:template match="nonterminal"): Likewise.
2186 * data/xslt/xml2xhtml.xsl (xsl:template match="terminal"): Likewise.
2187 (xsl:template match="nonterminal"): Likewise.
2188 * src/print-xml.c (print_grammar): Implement.
2189
2190 2007-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
2191
2192 * data/xslt/xml2dot.xsl (xsl:template match="automaton/state"): After
2193 2007-10-11 change, the child elements here are items not rules.
2194 (xsl:template match="item"): New.
2195 (xsl:template match="rule"): Update for new reduced itemset.
2196 (xsl:template match="point"): Remove.
2197 (xsl:template match="empty"): For consistency with --graph, don't
2198 output "/* empty */".
2199 * data/xslt/xml2text.xsl (xsl:template match="terminal"): When invoking
2200 line-wrap, don't pass a negative value as first-line-length since this
2201 won't work with the following changes.
2202 (xsl:template name="line-wrap"): Simplify slightly.
2203 (xsl:template name="ws-search"): Eliminate recursion.
2204 * src/print_graph.c (print_core): Don't print a reduction's lookahead
2205 set next to an item whose dot is not at the end of the RHS even if it
2206 happens to be associated with the same rule.
2207
2208 2007-10-19 Joel E. Denny <jdenny@ces.clemson.edu>
2209
2210 Add %define lr.keep_unreachable_states.
2211 * NEWS (2.3a+): Mention it in the entry for unreachable state removal.
2212 * doc/bison.texinfo (Decl Summary): Mention it in the %define entry.
2213 * src/main.c (main): Implement it.
2214 * tests/conflicts.at (Unreachable States After Conflict Resolution):
2215 Extend to test it, and fix a typo.
2216
2217 2007-10-19 Joel E. Denny <jdenny@ces.clemson.edu>
2218
2219 * NEWS (2.3a+): Add entry for recent .output file lookahead set fix.
2220 * doc/bison.texinfo (Understanding): Remove a bogus lookahead set in
2221 the example .output text.
2222 * tests/regression.at (Extra lookahead sets in report): Improve wording
2223 of comments.
2224
2225 2007-10-17 Wojciech Polak <polak@gnu.org>
2226
2227 * src/print-xml.c (print_grammar): Renamed
2228 <terminal> and <nonterminal> attributes:
2229 "type" to "number" and "symbol" to "name".
2230 * data/xslt/xml2text.xsl (xsl:template match="terminal"):
2231 Use new attribute names.
2232 (xsl:template match="nonterminal"): Likewise.
2233 * data/xslt/xml2xhtml.xsl: Likewise.
2234
2235 2007-10-17 Joel E. Denny <jdenny@ces.clemson.edu>
2236
2237 * doc/bison.texinfo (Bison Options): Add entry for --print-datadir.
2238 (Option Cross Key): Likewise.
2239
2240 * src/print-xml.c (print_core): Don't print a reduction's lookahead set
2241 next to an item whose dot is not at the end of the RHS even if it
2242 happens to be associated with the same rule.
2243 * src/print.c (print_core): Likewise.
2244 * tests/conflicts.at (Unresolved SR Conflicts): Update output.
2245 (Resolved SR Conflicts): Update output.
2246 * tests/regression.at (Extra lookahead sets in report): New test case.
2247
2248 2007-10-11 Wojciech Polak <polak@gnu.org>
2249
2250 * src/print-xml.c (print_core): Remove item set
2251 redundancy.
2252 * data/xslt/bison.xsl (bison:ruleNumber): New key.
2253 Improve processing time. Suggested by Joel E. Denny.
2254 * data/xslt/xml2dot.xsl (xsl:template name="escape"):
2255 Write xsl:param "required" attribute as comment.
2256 * data/xslt/xml2text.xsl (xsl:template match="item"): New.
2257 (xsl:template match="rule"): Support new reduced itemset.
2258 (xsl:template match="point"): Remove.
2259 * data/xslt/xml2xhtml.xsl: Likewise.
2260
2261 2007-10-09 Joel E. Denny <jdenny@ces.clemson.edu>
2262
2263 * src/getargs.c (version): Update copyright year.
2264
2265 2007-10-09 Joel E. Denny <jdenny@ces.clemson.edu>
2266
2267 Make xml2dot.xsl and --graph produce the same output.
2268 * data/xslt/xml2dot.xsl (xsl:template match="rule"): Use a `&#10;'
2269 instead of a `\n'. That is, don't add escapes yet or they'll be doubly
2270 escaped later.
2271 (xsl:template name="output-node"): Use the new escape template instead
2272 of the string-replace template directly.
2273 (xsl:template name="output-edge"): Likewise.
2274 (xsl:template name="escape"): New, escapes backslashes and newlines in
2275 addition to quotation marks.
2276 * src/graphviz.c (start_graph, output_node, output_edge): Add
2277 whitespace to output for legibility.
2278
2279 Make xml2text.xsl and --report produce the same output, and remove the
2280 XML "conflicts" element since a conflict summary is easily extracted
2281 from the automaton.
2282 * data/xslt/bison.xsl: New.
2283 (xsl:template match="state" mode="bison:count-conflicts): New.
2284 * data/xslt/xml2text.xsl: Import bison.xsl.
2285 (xsl:template match="bison-xml-report"): Instead of styling the
2286 "conflicts" element, style the "automaton" element with mode
2287 "conflicts". Unlike the former, the latter lists S/R and R/R
2288 conflicts for a state on the same line.
2289 (xsl:template match="conflicts"): Remove.
2290 (xsl:template match="conflict"): Remove.
2291 (xsl:template match="terminal"): Line-wrap the list of rules in which
2292 the terminal is used.
2293 (xsl:template match="nonterminal"): Likewise for nonterminals.
2294 (xsl:template match="automaton" mode="conflicts"): New.
2295 (xsl:template match="state" mode="conflicts"): New.
2296 (xsl:template name="line-wrap"): New.
2297 (xsl:template name="ws-search"): New.
2298 * data/xslt/xml2xhtml.xsl: Import bison.xsl.
2299 (xsl:template match="bison-xml-report"): Instead of styling the
2300 "conflicts" element, style the "automaton" element with mode
2301 "conflicts."
2302 (xsl:template match="conflicts"): Remove.
2303 (xsl:template match="conflict"): Remove.
2304 (xsl:template match="automaton" mode="conflicts"): New.
2305 (xsl:template match="state" mode="conflicts): New.
2306 * src/conflicts.c (conflicts_output_xml): Remove.
2307 * src/conflicts.h (conflicts_output_xml): Remove prototype.
2308 * src/print-xml.c (print_xml): Don't invoke conflicts_output_xml.
2309 * src/print.c (print_grammar): Consistently wrap at the 66th column so
2310 the corresponding XSLT is easier. Also, never wrap between a word and
2311 the comma that follows it.
2312
2313 2007-10-08 Joel E. Denny <jdenny@ces.clemson.edu>
2314
2315 Improve C++ namespace support. Discussed starting at
2316 <http://lists.gnu.org/archive/html/help-bison/2007-09/msg00016.html>.
2317 * data/c++.m4: (b4_namespace_ref, b4_namespace_open,
2318 b4_namespace_close): New macros that interpret the %define variable
2319 "namespace" so its value can contain "::" to indicate nested
2320 namespaces.
2321 * data/glr.cc (b4_namespace): Don't define, and replace all uses with
2322 the above macros.
2323 * data/lalr1.cc (b4_namespace): Likewise.
2324 * data/location.cc (b4_namespace): Likewise.
2325 * doc/bison.texinfo (Decl Summary): Move `%define push_pull' entry
2326 inside a new table in the general %define entry. Document `%define
2327 namespace' there as well. Point the %name-prefix entry to it since it
2328 explains it more completely in the case of C++.
2329 (C++ Bison Interface): Mention `%define namespace' instead of
2330 %name-prefix.
2331 (Table of Symbols): Remove the `%define push_pull' entry. The %define
2332 entry suffices.
2333 * tests/c++.at (Relative namespace references): New test case.
2334 (Absolute namespace references): New test case.
2335 (Syntactically invalid namespace references): New test case.
2336 * tests/input.at (C++ namespace reference errors): New test case.
2337
2338 2007-10-08 Joel E. Denny <jdenny@ces.clemson.edu>
2339
2340 Add syncline support and location accessor to internal %define
2341 interfaces.
2342 * data/bison.m4 (b4_percent_define_get_loc): New.
2343 (b4_percent_define_get_syncline): New.
2344 (b4_percent_define_flag_if): Use b4_percent_define_get_loc.
2345 (b4_percent_define_default): Record defining location as line 1 rather
2346 than 0 for the sake of synchronizing #line's, and define
2347 b4_percent_define_syncline(VARIABLE).
2348 (b4_percent_define_check_values): Use b4_percent_define_get_loc.
2349 * src/muscle_tab.c (muscle_syncline_grow): New.
2350 (muscle_code_grow): Use muscle_syncline_grow.
2351 (muscle_percent_define_insert): Use muscle_percent_define_get_loc, and
2352 define b4_percent_define_syncline(VARIABLE).
2353 (muscle_percent_define_get_loc): New.
2354 (muscle_percent_define_get_syncline): New.
2355 (muscle_percent_define_flag_if): Use muscle_percent_define_get_loc, and
2356 remove some unused variables.
2357 (muscle_percent_define_default): Record defining location as line 1
2358 rather than 0 for the sake of synchronizing #line's, and define
2359 b4_percent_define_syncline(VARIABLE).
2360 (muscle_percent_define_check_values): Use
2361 muscle_percent_define_get_loc.
2362 * src/muscle_tab.h (muscle_percent_define_get_loc): Prototype.
2363 (muscle_percent_define_get_syncline): Prototype.
2364 * tests/skeletons.at (%define Boolean variables: invalid skeleton
2365 defaults): Update output for location change.
2366 (Complaining during macro argument expansion): Extend to test
2367 b4_percent_define_get_loc and b4_percent_define_get_syncline errors.
2368
2369 2007-10-07 Joel E. Denny <jdenny@ces.clemson.edu>
2370
2371 Fix some error-reporting macro bugs.
2372 * data/bison.m4 (b4_cat): New.
2373 (b4_error, b4_error_at): Use b4_cat to send error directives directly
2374 to stdout so they don't become arguments to other macros. Update
2375 comments and add examples.
2376 (b4_warn, b4_warn_at, b4_complain, b4_complain_at): Update comments and
2377 add examples.
2378 (b4_fatal, b4_fatal_at): Likewise, and invoke m4_exit(1) immediately
2379 after printing the error directive so that M4 doesn't report subsequent
2380 problems that are induced by this problem.
2381 * src/scan-skel.l: Recognize @` digraph outside of directive arguments
2382 instead of just in them. Recognize @\n in both places. Both expand to
2383 the empty string. Needed by b4_cat.
2384 * tests/skeletons.at (Complaining during macro argument expansion):
2385 New test case.
2386 (Fatal errors make M4 exit immediately): New test case.
2387
2388 2007-10-04 Joel E. Denny <jdenny@ces.clemson.edu>
2389
2390 Implement --print-datadir.
2391 * src/getargs.c (usage): Mention.
2392 (PRINT_DATADIR_OPTION): New anonymous enum member.
2393 (long_options): Add entry for it.
2394 (getargs): Add case for it calling compute_pkgdatadir.
2395 * src/output.c (output_skeleton): Encapsulate data directory
2396 computation from here...
2397 (prepare): ... and from here...
2398 (compute_pkgdatadir): ... into this new function.
2399 * src/output.h (compute_pkgdatadir): Prototype.
2400
2401 2007-09-29 Joel E. Denny <jdenny@ces.clemson.edu>
2402
2403 * src/print-xml.c (escape_bufs): New static global variable
2404 replacing...
2405 (xml_escape_n): ... the static local variable buf here.
2406 (print_xml): Free memory for escape_bufs.
2407 * src/reduce.c (reduce_xml): XML-escape terminal symbol tags.
2408
2409 2007-09-25 Joel E. Denny <jdenny@ces.clemson.edu>
2410
2411 Replace `%push-parser' and `%push-pull-parser' with
2412 `%define push_pull "push"' and `%define push_pull "both"'.
2413 `%define push_pull "pull"' is the default.
2414 * doc/bison.texinfo (Push Decl, Push Parser Function,
2415 Pull Parser Function, Parser Create Function, Parser Delete Function):
2416 Update declarations.
2417 (Decl Summary, Table of Symbols): Replace %push-parser and
2418 %push-pull-parser entries with a %define push_pull entry.
2419 * data/bison.m4 (b4_percent_define_check_values): New macro.
2420 (b4_pull_if, b4_push_if, b4_use_push_for_pull_if): Move these
2421 definitions...
2422 * data/c.m4 (b4_identification): ... and the YYPUSH and YYPULL cpp
2423 definitions...
2424 * data/push.c: ... to here and compute them from the value of the
2425 %define variable push_pull.
2426 * data/c-skel.m4: Instead of choosing the push.c skeleton for push
2427 parsing requests here...
2428 * data/yacc.c: ... hack this to switch to push.c any time
2429 b4_use_push_pull_flag or the %define variable push_pull is set. This
2430 will go away when we mv push.c yacc.c.
2431 * data/c++-skel.m4, data/glr.c, data/java-skel.m4: Don't report that
2432 push parsing is not supported since unused %define variables are
2433 reported anyway.
2434 * src/getargs.c, src/getargs.h (pull_parser, push_parser): Remove.
2435 * src/muscle_tab.h (muscle_percent_define_check_values): Update
2436 comments for consistency with b4_percent_define_check_values.
2437 * src/output.c (prepare): Don't insert b4_pull_flag and b4_push_flag
2438 muscles.
2439 * src/parse-gram.y (PERCENT_PUSH_PARSER, PERCENT_PUSH_PULL_PARSER):
2440 Remove.
2441 (prologue_declaration): Remove %push-parser and %push-pull-parser
2442 rules.
2443 * src/scan-gram.l (%push-parser, %push-pull-parser): Remove rules.
2444 * tests/calc.at: Update declarations.
2445 * tests/input.at (%define enum variables): New test case.
2446 * tests/push.at (Push Parsing: Memory Leak for Early Deletion): Update
2447 declaration.
2448 (Push Parsing: Multiple impure instances): Update declaration.
2449 (Push Parsing: Unsupported Skeletons): New test case.
2450 * tests/torture.at (Exploding the Stack Size with Alloca): Update
2451 declaration.
2452 (Exploding the Stack Size with Malloc): Update declaration.
2453
2454 2007-09-24 Wojciech Polak <polak@gnu.org>
2455
2456 Add XSLT transformations.
2457
2458 * data/xslt/xml2dot.xsl: Transform XML into DOT.
2459 * data/xslt/xml2text.xsl: Transform XML into plain text.
2460 * data/xslt/xml2xhtml.xsl: Transform XML into XHTML.
2461 * data/Makefile.am (xsltdir): New variable.
2462 (dist_xslt_DATA): Add xslt/*.xsl files.
2463
2464 2007-09-23 Paul Eggert <eggert@cs.ucla.edu>
2465
2466 * src/conflicts.c (log_resolution): Fix indenting bugs I introduced.
2467 Problem reported by Wojciech Polak.
2468 * src/print-xml.c (xml_puts): Work even if LEVEL exceeds INT_MAX/2.
2469 (xml_printf): Undo change I made on 21 September; that is,
2470 indent 2 spaces, not 1.
2471
2472 2007-09-23 Joel E. Denny <jdenny@ces.clemson.edu>
2473
2474 Pacify ./configure --enable-gcc-warnings.
2475 * src/print-xml.c, src/print-xml.h (xml_puts): Make third argument
2476 `char const *' instead of `char *'.
2477 * src/state.c (state_rule_lookahead_tokens_print_xml): Remove unused
2478 local variable `sep'.
2479
2480 2007-09-21 Paul Eggert <eggert@cs.ucla.edu>
2481
2482 * src/gram.c (rule_rhs_print_xml): Now static, since it isn't used
2483 elsewhere.
2484 * src/print-xml.c: Prefer "const" after types; that's more consistent.
2485 (xml_printf): Indent just 1 space for level.
2486 (e_char, xlate_char): Remove.
2487 (xml_escape_string): Rewrite to avoid undefined behavior (used
2488 storage that was freed from the stack).
2489 (xml_escape_n): Don't bother checking for subscript error.
2490
2491 2007-09-21 Wojciech Polak <polak@gnu.org>
2492
2493 Add Bison XML Automaton Report.
2494
2495 Add support for an -x option to generate an XML report.
2496 It is not documented yet.
2497 * src/print-xml.c: New file.
2498 * src/print-xml.h: Likewise.
2499 * lib/timevar.def (TV_XML): New var.
2500 * src/Makefile.am (bison_SOURCES): Add print-xml.c, print-xml.h.
2501 * src/conflicts.c: Include print-xml.h.
2502 (solved_conflicts_xml_obstack): New var.
2503 (log_resolution, conflicts_solve, conflicts_free):
2504 Add support for XML report.
2505 (conflicts_output_val): New function.
2506 * src/conflicts.h (conflicts_output_val): New decl.
2507 * src/files.c (spec_xml_file): New var.
2508 (compute_output_file_names, output_file_names_free): Add XML support.
2509 * src/files.h (spec_xml_file): New decl.
2510 * src/getargs.c (xml_flag): New var.
2511 (usage, short_options, long_options, getargs): Add XML support.
2512 * src/getargs.h (xml_flag): New decl.
2513 * src/gram.c: Include print-xml.h.
2514 (rule_lhs_print_xml, rule_rhs_print_xml):
2515 (grammar_rules_partial_print_xml, grammar_rules_print_xml):
2516 New functions.
2517 * src/gram.h: Declare external ones.
2518 * src/main.c: Include print-xml.h.
2519 (main): Add XML support.
2520 * src/reduce.c: Include print-xml.h.
2521 (reduce_xml): New function.
2522 * src/reduce.h: Declare it.
2523 * src/state.c: Include print-xml.h.
2524 (state_new): Add XML support.
2525 (state_rule_lookahead_tokens_print_xml): New function.
2526 * src/state.h: Declare it.
2527 (struct state): New member solved_conflicts_xml.
2528 * src/symtab.c (symbol_class_get_string): New function.
2529 * src/symtab.h: Declare it.
2530
2531 2007-09-21 Paul Eggert <eggert@cs.ucla.edu>
2532
2533 * GNUmakefile: Switch to coreutils's version.
2534 * bootstrap: Likewise.
2535 * Makefile.cfg: Adjust to new GNUmakefile.
2536 * README-hacking: Likewise.
2537
2538 Import from gnulib:
2539
2540 2006-08-18 Paul Eggert <eggert@cs.ucla.edu>
2541 Bruno Haible <bruno@clisp.org>
2542
2543 * m4/bison-i18n.m4 (BISON_I18N): Also handle the case where yacc exists
2544 and is a script that invokes bison. Tighten the code. Add comments.
2545
2546 2007-08-28 Joel E. Denny <jdenny@ces.clemson.edu>
2547
2548 Spell "boolean" as "Boolean". Reported by Akim Demaille.
2549 * data/bison.m4 (b4_percent_define_flag_if): Fix complaint.
2550 * doc/bison.texinfo (Decl Summary): Fix.
2551 * src/muscle_tab.c (muscle_percent_define_flag_if): Fix complaint.
2552 * tests/input.at (Boolean %define variables): Update output.
2553 * tests/skeletons.at (%define boolean variables: invalid skeleton
2554 defaults): Rename to...
2555 (%define Boolean variables: invalid skeleton defaults): ... this and
2556 update output.
2557
2558 2007-08-17 Joel E. Denny <jdenny@ces.clemson.edu>
2559
2560 In impure push mode, don't allow more than one yypstate to be allocated
2561 since multiple impure parsers would corrupt yynerrs.
2562 * data/push.c (yypstate_allocated): New static global variable
2563 initialized to 0.
2564 (yypull_parse): If yypstate_new returns 0, don't report it as memory
2565 exhaustion if yypstate_allocated is 1, but still return 2.
2566 (yypstate_new): Invoke yyerror and return 0 if yypstate_allocated is
2567 already 1. Otherwise, set it to 1.
2568 (yypstate_delete): Set it to 0.
2569 * tests/push.at (Push Parsing: Multiple impure instances): New test
2570 case.
2571
2572 2007-08-17 Bob Rossi <bob@brasko.net>
2573
2574 * doc/bison.texinfo (Push Decl): Document the push parser.
2575 (Table of Symbols): Ditto.
2576 (Pure Decl): Ditto.
2577 (Decl Summary): Ditto.
2578 (Multiple Parsers, Push Parser Function, Pull Parser Function,
2579 Parser Create Function, Parser Delete Function):
2580 Add new push parser symbols.
2581 (Table of Symbols): Document push-parser, push-pull-parser,
2582 yypush_parse, yypull_parse, yypstate_new and yypstate_delete.
2583
2584 2007-08-15 Paul Eggert <eggert@cs.ucla.edu>
2585
2586 Update to GPLv3.
2587 * doc/gpl-3.0.texi: New file.
2588 * doc/gpl.texi: Remove.
2589 * COPYING, GNUmakefile, HACKING, Makefile.am, Makefile.cfg:
2590 * Makefile.maint, NEWS, PACKAGING, README, README-alpha:
2591 * README-hacking, TODO, bootstrap, bootstrap.conf:
2592 * configure.ac, data/Makefile.am, data/README, data/bison.m4:
2593 * data/c++-skel.m4, data/c++.m4, data/c-skel.m4, data/c.m4:
2594 * data/glr.c, data/glr.cc, data/java-skel.m4, data/java.m4:
2595 * data/lalr1.cc, data/lalr1.java, data/location.cc:
2596 * data/push.c, data/yacc.c, data/m4sugar/m4sugar.m4:
2597 * djgpp/Makefile.maint, djgpp/README.in, djgpp/config.bat:
2598 * djgpp/config.sed, djgpp/config.site, djgpp/config_h.sed:
2599 * djgpp/djunpack.bat, djgpp/subpipe.c, djgpp/subpipe.h:
2600 * djgpp/testsuite.sed, doc/Makefile.am, doc/bison.texinfo:
2601 * doc/fdl.texi, doc/refcard.tex, etc/Makefile.am, etc/README:
2602 * etc/bench.pl.in, examples/Makefile.am, examples/extexi:
2603 * examples/calc++/Makefile.am, lib/Makefile.am, lib/abitset.c:
2604 * lib/abitset.h, lib/bbitset.h, lib/bitset.c, lib/bitset.h:
2605 * lib/bitset_stats.c, lib/bitset_stats.h, lib/bitsetv-print.c:
2606 * lib/bitsetv-print.h, lib/bitsetv.c, lib/bitsetv.h:
2607 * lib/ebitset.c, lib/ebitset.h, lib/get-errno.c:
2608 * lib/get-errno.h, lib/lbitset.c, lib/lbitset.h:
2609 * lib/libiberty.h, lib/main.c, lib/subpipe.c, lib/subpipe.h:
2610 * lib/timevar.c, lib/timevar.def, lib/timevar.h:
2611 * lib/vbitset.c, lib/vbitset.h, lib/yyerror.c:
2612 * m4/c-working.m4, m4/cxx.m4, m4/m4.m4, m4/subpipe.m4:
2613 * m4/timevar.m4, src/LR0.c, src/LR0.h, src/Makefile.am:
2614 * src/assoc.c, src/assoc.h, src/closure.c, src/closure.h:
2615 * src/complain.c, src/complain.h, src/conflicts.c:
2616 * src/conflicts.h, src/derives.c, src/derives.h, src/files.c:
2617 * src/files.h, src/flex-scanner.h, src/getargs.c:
2618 * src/getargs.h, src/gram.c, src/gram.h, src/graphviz.c:
2619 * src/lalr.c, src/lalr.h, src/location.c, src/location.h:
2620 * src/main.c, src/muscle_tab.c, src/muscle_tab.h:
2621 * src/nullable.c, src/nullable.h, src/output.c, src/output.h:
2622 * src/parse-gram.c, src/parse-gram.h, src/parse-gram.y:
2623 * src/print.c, src/print.h, src/print_graph.c:
2624 * src/print_graph.h, src/reader.c, src/reader.h, src/reduce.c:
2625 * src/reduce.h, src/relation.c, src/relation.h:
2626 * src/revision.h, src/scan-code.h, src/scan-code.l:
2627 * src/scan-gram.h, src/scan-gram.l, src/scan-skel.h:
2628 * src/scan-skel.l, src/state.c, src/state.h, src/symlist.c:
2629 * src/symlist.h, src/symtab.c, src/symtab.h, src/system.h:
2630 * src/tables.c, src/tables.h, src/uniqstr.c, src/uniqstr.h:
2631 * tests/Makefile.am, tests/actions.at, tests/c++.at:
2632 * tests/calc.at, tests/conflicts.at, tests/cxx-type.at:
2633 * tests/existing.at, tests/glr-regression.at:
2634 * tests/headers.at, tests/input.at, tests/java.at:
2635 * tests/local.at, tests/output.at, tests/push.at:
2636 * tests/reduce.at, tests/regression.at, tests/sets.at:
2637 * tests/skeletons.at, tests/synclines.at, tests/testsuite.at:
2638 * tests/torture.at:
2639 Update to GPLv3.
2640
2641 2007-08-11 Joel E. Denny <jdenny@ces.clemson.edu>
2642
2643 Get rid of broken %no-parser, -n, and --no-parser implementation and
2644 documentation.
2645 * TODO: Don't mention them.
2646 * doc/bison.1: Likewise.
2647 * doc/bison.texinfo (Decl Summary): Likewise.
2648 (Bison Options): Likewise.
2649 (Option Cross Key): Likewise.
2650 * src/getargs.c (no_parser_flag): Remove global variable.
2651 (usage): Don't print description of -n and --no-parser.
2652 (long_options): Remove --no-parser entry here.
2653 (getargs): Remove -n case in the switch here.
2654 * src/getargs.h (no_parser_flag): Remove extern.
2655 * tests/regression.at (Web2c Actions): Remove comment that mentions
2656 --no-parser.
2657
2658 2007-08-11 Joel E. Denny <jdenny@ces.clemson.edu>
2659
2660 * tests/push.at (Push Parsing: Memory Leak for Early Deletion): Do not
2661 name user variables starting with `yy'. Just pass NULL instead of a
2662 dummy local &yylval to yypush_parse.
2663 * tests/torture.at (AT_DATA_STACK_TORTURE): Do not name user variables
2664 starting with `yy'.
2665
2666 2007-08-03 Joel E. Denny <jdenny@ces.clemson.edu>
2667
2668 * data/yacc.c (yyexhaustedlab): Define it when YYERROR_VERBOSE is
2669 true since it's then always used regardless of whether yyoverflow is
2670 defined. Reported by Christian Burger at
2671 <http://lists.gnu.org/archive/html/bug-bison/2007-07/msg00031.html>.
2672 * THANKS: Add Christian Burger.
2673
2674 * ChangeLog: For changes in doc/bison.texinfo, consistently reference
2675 node names: say "Decl Summary" not "Bison Declaration Summary".
2676
2677 2007-07-28 Joel E. Denny <jdenny@ces.clemson.edu>
2678
2679 * src/muscle_tab.c (muscle_percent_define_flag_if): In order to
2680 determine whether this function has already complained about an invalid
2681 value for a %define boolean variable, don't check whether Bison has
2682 ever examined the value. As written, the check was a tautology.
2683 Instead, record and check for this complaint using a separate muscle.
2684
2685 2007-07-27 Joel E. Denny <jdenny@ces.clemson.edu>
2686
2687 Fix push parsing memory leak reported by Brandon Lucia at
2688 <http://lists.gnu.org/archive/html/bug-bison/2007-07/msg00032.html>.
2689 * THANKS: Add Brandon Lucia.
2690 * data/push.c (yypstate_delete): Free the stack if it was reallocated
2691 but the parse never completed and thus freed it.
2692 * tests/Makefile.am (TESTSUITE_AT): Add push.at.
2693 * tests/testsuite.at: Include push.at.
2694 * test/push.at: New.
2695 (Push Parsing: Memory Leak for Early Deletion): New test case.
2696
2697 2007-07-17 Joel E. Denny <jdenny@ces.clemson.edu>
2698
2699 Improve handling of multiple S/R conflicts in the same state and of S/R
2700 conflicts involving multiple reductions.
2701 * src/conflicts.c (resolve_sr_conflict): Don't assign the error action
2702 set for a state here or Bison will abort if it is reassigned on a
2703 later conflicted reduction in the same state.
2704 Similarly, don't finalize and assign the solved conflicts report here
2705 or it will be lost if it is reassigned on a later conflicted reduction
2706 in the same state.
2707 (set_conflicts): Instead, assign them both here after all S/R conflicts
2708 in the state have been fully examined.
2709 * src/print.c (shift_set): Rename to...
2710 (no_reduce_set): ... this.
2711 (print_reductions): Update for rename, and add %nonassoc error action
2712 tokens to no_reduce_set so that, when printing the first remaining
2713 reduction on an error action token, the reduction is enclosed in
2714 brackets.
2715 (print_results): Update for rename.
2716 * tests/conflicts.at (Solved conflicts report for multiple reductions
2717 in a state): New test case.
2718 (%nonassoc error actions for multiple reductions in a state): New test
2719 case.
2720
2721 * src/main.c (main): Don't depend on C99 features.
2722
2723 2007-07-16 Joel E. Denny <jdenny@ces.clemson.edu>
2724
2725 * build-aux/.cvsignore: Add compile.
2726 * lib/.cvsignore: Add charset.alias, ref-add.sed, ref-del.sed, and
2727 uniwidth.
2728
2729 2007-07-10 Joel E. Denny <jdenny@ces.clemson.edu>
2730
2731 * bootstrap (slurp): Create target directories that don't exist.
2732 Specifically, we need lib/uniwidth/ because of recent Gnulib changes.
2733
2734 2007-07-09 Joel E. Denny <jdenny@ces.clemson.edu>
2735
2736 * LR0.c (new_itemsets): Fix wording in comments: say item index rather
2737 than item number.
2738 * closure.c (closure): Likewise.
2739 * state.h (reductions): Comment sorting of rules.
2740 (state): Comment sorting of items.
2741
2742 2007-07-02 Joel E. Denny <jdenny@ces.clemson.edu>
2743
2744 Fix C++ test cases after recent Gnulib changes. Discussed starting at
2745 <http://lists.gnu.org/archive/html/bug-bison/2007-07/msg00000.html>.
2746 * examples/calc++/Makefile.am (DEFAULT_INCLUDES): Override Automake's
2747 definition in order to avoid Gnulib headers since we don't use config.h
2748 here.
2749 * tests/output.at (AT_CHECK_OUTPUT_FILE_NAME): Use AT_DATA_GRAMMAR
2750 rather than AT_DATA so that config.h is included.
2751
2752 2007-07-01 Joel E. Denny <jdenny@ces.clemson.edu>
2753
2754 * data/glr.c (yy_yypstack, yypstates, yypdumpstack): Use YYFPRINTF
2755 instead of fprintf. Guard these functions with #if YYDEBUG instead of
2756 #ifdef YYDEBUG for consistency with all other uses of YYDEBUG in Bison
2757 and so that YYFPRINTF is guaranteed to be defined here.
2758
2759 2007-05-29 Joel E. Denny <jdenny@ces.clemson.edu>
2760
2761 * src/muscle_tab.c (muscle_percent_define_invalid_value): Replace
2762 with...
2763 (muscle_percent_define_check_values): ... this more helpful function.
2764 Again, it's not used yet, but it will be.
2765 * src/muscle_tab.h: Likewise.
2766
2767 Improve some comments in parser table construction.
2768 * src/LR0.c (new_itemsets): Explain sorting of itemset and kernel_base.
2769 (generate_states): Don't mention ruleset, which is internal to closure.
2770 * src/closure.c (closure): Explain sorting of core and itemset, which
2771 is required for this function to behave correctly.
2772 * src/closure.h (closure): Mention sorting.
2773
2774 2007-05-28 Joel E. Denny <jdenny@ces.clemson.edu>
2775
2776 * src/lalr.c (state_lookahead_tokens_count): For code readability,
2777 move the check for disabled transitions to an aver since conflict
2778 resolution hasn't happened yet.
2779
2780 * src/lalr.c (state_lookahead_tokens_count): Remove the check that
2781 labels a state as inconsistent just because it has error transitions.
2782 The original form of this check appeared in revision 1.1 of lalr.c,
2783 which was committed on 1991-12-21. Now (at least), changing the
2784 consistency label on such a state appears to have no useful effect in
2785 any of the places it is examined, which I enumerate below. The key
2786 point to understanding each item in this enumeration is that a state
2787 with an error transition is labelled consistent in the first place only
2788 if it has no rules, so the check cannot matter for states that have
2789 rules. (1) Labelling a state as inconsistent will cause set_conflicts
2790 to try to identify its conflicts, and a state must have *rules* to have
2791 conflicts. (2) Labelling a state as inconsistent will affect how
2792 action_row sets the default *rule* for the state. (3) Labelling a
2793 state as inconsistent will cause build_relations to add lookback edges
2794 to *rules* in that state.
2795 * src/state.h (struct state): Word the comment for member consistent
2796 more carefully.
2797
2798 2007-05-27 Joel E. Denny <jdenny@ces.clemson.edu>
2799
2800 Don't depend on C99 features.
2801 * src/conflicts.c (conflicts_update_state_numbers): Fix for-loop.
2802 * src/lalr.c (lalr_update_state_numbers): Fix for-loop.
2803 * src/reader.c (check_and_convert_grammar): Fix for-loop.
2804 * src/state.c (state_mark_reachable_states): Fix for-loop.
2805 (state_remove_unreachable_states): Fix for-loop.
2806
2807 Don't widen struct state with member reachable just to temporarily
2808 record reachability. Instead, use a local bitset.
2809 * src/state.h (struct state): Remove member.
2810 * src/state.c (state_new): Don't initialize it.
2811 (state_mark_reachable_states): Rename to...
2812 (state_record_reachable_states): ... this, and use bitset.
2813 (state_remove_unreachable_states): Use bitset.
2814
2815 2007-05-26 Joel E. Denny <jdenny@ces.clemson.edu>
2816
2817 * src/Makefile.am (yacc): Quote target action commands properly so
2818 that the yacc script isn't corrupt. Reported by Hans Aberg at
2819 <http://lists.gnu.org/archive/html/bug-bison/2007-05/msg00003.html>.
2820
2821 * data/glr.c (yylval): As in yacc.c, don't extern in the header for
2822 the case of pure parsers. Reported by Frans Englich at
2823 <http://lists.gnu.org/archive/html/help-bison/2007-05/msg00018.html>.
2824 * THANKS: Add Frans Englich.
2825
2826 * NEWS (2.3a+): In the %code entry, reference section `Bison
2827 Declaration Summary' from the manual now since the %code summary has
2828 moved there.
2829 * doc/bison.texinfo (Prologue Alternatives): Mention that directives
2830 in the rules section must be terminated by semicolons.
2831
2832 2007-05-20 Joel E. Denny <jdenny@ces.clemson.edu>
2833
2834 Extend the front-end API for %define variables to more completely
2835 mirror the back-end. This will be useful in the future.
2836 * data/bison.m4 (b4_percent_define_get, b4_percent_define_ifdef):
2837 Update comments to mention the new front-end counterparts of these
2838 macros.
2839 * src/muscle_tab.c (MUSCLE_COMMON_DECODE): New macro with common code
2840 for muscle_string_decode and muscle_location_decode.
2841 (muscle_string_decode): New static function.
2842 (muscle_location_decode): Use MUSCLE_COMMON_DECODE.
2843 (muscle_percent_define_get, muscle_percent_define_ifdef): New
2844 functions.
2845 (muscle_percent_define_flag_if): Use muscle_percent_define_ifdef and
2846 muscle_percent_define_get to mimic the b4_percent_define_flag_if
2847 implementation more closely.
2848 (muscle_percent_define_invalid_value): New function.
2849 * src/muscle_tab.h (muscle_percent_define_get,
2850 muscle_percent_define_ifdef, muscle_percent_define_invalid_value):
2851 Prototype.
2852
2853 2007-05-07 Joel E. Denny <jdenny@ces.clemson.edu>
2854
2855 * NEWS (2.3a+): Mention yesterday's state-removal change.
2856 (2.3a): Remove the %language entry, which was added after 2.3a.
2857 * src/LR0.c, src/closure.c, src/closure.h, src/conflicts.c,
2858 src/conflicts.h, src/lalr.c, src/lalr.h, src/print.c,
2859 src/print_graph.c, src/state.c, src/state.h, tests/conflicts.at,
2860 tests/existing.at: Update copyright date.
2861
2862 2007-05-06 Joel E. Denny <jdenny@ces.clemson.edu>
2863
2864 If conflict resolution makes states unreachable, remove those states,
2865 report rules that are then unused, and don't report conflicts in those
2866 states.
2867 * src/conflicts.c, src/conflicts.h (conflicts_update_state_numbers):
2868 New global function.
2869 * src/lalr.c, src/lalr.h (lalr_update_state_numbers): New global
2870 function.
2871 * src/main.c (main): After conflict resolution, remove the unreachable
2872 states and update all data structures that reference states by number.
2873 * src/state.c (state_new): Initialize each state's reachable member to
2874 false.
2875 (state_mark_reachable_states): New static function.
2876 (state_remove_unreachable_states): New global function.
2877 * src/state.h (struct state): Add member bool reachable.
2878 (state_remove_unreachable_states): Prototype.
2879 * tests/conflicts.at (Unreachable States After Conflict Resolution):
2880 New test case.
2881 * tests/existing.at (GNU pic Grammar): Update test case output now that
2882 an unused rule is discovered.
2883
2884 2007-05-06 Joel E. Denny <jdenny@ces.clemson.edu>
2885
2886 Minor code cleanup in parser table construction.
2887 * src/LR0.c (new_itemsets): Use item_number_is_symbol_number.
2888 (new_itemsets, save_reductions): Update for rename to nitemset.
2889 * src/closure.c (nritemset): Rename to...
2890 (nitemset): ... this since the "r" appears to meaningless and isn't
2891 used in the comments.
2892 (closure): Update for rename.
2893 * src/closure.h (nritemset): Update extern to...
2894 (nitemset): ... this.
2895 * src/lalr.c (LA): Fix a typo in comments.
2896 * src/print.c (print_core): Update for rename to nitemset.
2897 * src/print_graph.c (print_graph): Likewise.
2898 * src/state.h: Fix some typos in header comments.
2899
2900 2007-04-04 Paul Eggert <eggert@cs.ucla.edu>
2901
2902 * THANKS: Use ASCII for Sebastien Fricker's name. Bison source
2903 still sticks to ASCII. Sorry!
2904
2905 * README-hacking: New file, taken mostly from coreutils, with changes
2906 for Bison. Contains much of the contents of:
2907 * README-cvs: Remove.
2908 * bootstrap: Sync from gnulib.
2909 * build-aux/.cvsignore: Remove *.t, mkinstalldirs.
2910 * lib/.cvsignore: Add wchar.h, wctype.h. Remove exit.h.
2911
2912 2007-03-10 Joel E. Denny <jdenny@ces.clemson.edu>
2913
2914 * doc/bison.texinfo (Destructor Decl): Fix typo reported by Sebastian
2915 Setzer.
2916 (Java Differences): Fix some typos.
2917 * THANKS: Add Sebastian Setzer.
2918
2919 2007-03-07 Paolo Bonzini <bonzini@gnu.org>
2920
2921 * data/java.m4 (b4_single_class_if): Remove.
2922 (b4_abstract_if): Look at "%define abstract".
2923 (b4_lexer_if): New.
2924 (b4_union_name): Rename...
2925 (b4_yystype): ... to this. Map to "%define stype".
2926 (b4_rhs_value, b4_parse_param_decl, b4_lex_param_decl,
2927 b4_maybe_throws): Fix quoting.
2928 (b4_lex_param_call): Move below to keep b4_*_param_decl close.
2929 * data/lalr1.java (Lexer interface): Always define.
2930 (Lexer interface within parser class): Remove.
2931 (YYLexer class): New, used when "%code lexer" is present.
2932 (constructor): When "%code lexer" is used, pass %lex-param
2933 to the lexer constructor.
2934 (yylex, yyparse): Remove %lex-param from method invocations
2935 (YYStack, yyaction, yyparse): Rename b4_union_name to b4_yystype.
2936
2937 * doc/bison.texinfo (Java Bison Interface): Mention "%define
2938 abstract". Rename "%define union_name" to "%define stype".
2939 Rename method names according to previous patch.
2940 (Java Scanner Interface): Describe "%code lexer" instead of
2941 "%pure-parser" and "%define single_class".
2942 (Java Differences): Mention "%code lexer".
2943
2944 * tests/java.at (_AT_DATA_JAVA_CALC_Y): Remove final argument.
2945 Include scanner here, using macros from tests/local.at.
2946 (AT_DATA_CALC_Y): Remove final argument.
2947 (_AT_CHECK_JAVA_CALC): Likewise.
2948 (AT_CHECK_JAVA_CALC): Likewise. Test all four combinations
2949 of %locations and %error-verbose.
2950 (main): Test with and without %lex-param.
2951 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Push AT_LEXPARAM_IF.
2952 (AT_BISON_OPTION_POPDEFS): Pop it.
2953
2954 2007-03-07 Juan Manuel Guerrero <juan.guerrero@gmx.de>
2955
2956 DJGPP spefic issue. Inhibit the use of disallowed characters for
2957 file name genertion on Win98, WinXP, etc. These are |<>":?*\
2958 and concern testsuite case 46.
2959 * Makefile.am: djgpp/testsuite.sed added to EXTRA_DIST
2960 * djgpp/testsuite.sed: Inhibit the use of disallowed characters.
2961 * djgpp/config.bat: Inhibit the use of disallowed characters.
2962
2963 2007-03-02 Joel E. Denny <jdenny@ces.clemson.edu>
2964
2965 Miscellaneous %define and %code cleanup.
2966 * data/bison.m4 (b4_percent_define_flag_if): Correct comments on how
2967 values are interpreted.
2968 * doc/bison.texinfo (Decl Summary): Clean up and extend %define
2969 documentation a little more.
2970 * src/muscle_tab.c (MUSCLE_USER_NAME_CONVERT,
2971 muscle_percent_define_insert, muscle_percent_code_grow): New
2972 functions/macros.
2973 * src/muscle_tab.h (muscle_percent_define_insert,
2974 muscle_percent_code_grow): Prototype.
2975 * src/parse-gram.y (prologue_declaration): Use
2976 muscle_percent_define_insert and muscle_percent_code_grow when parsing
2977 %define and %code directives.
2978
2979 Make it easy to share %define boolean variables between the front-end
2980 and back-end. Though not used yet, this will be useful in the future.
2981 * data/bison.m4 (b4_check_user_names): Rewrite comments to talk about
2982 Bison uses of names rather than just skeleton uses of names.
2983 (b4_percent_define_get, b4_percent_define_ifdef): Rename
2984 b4_percent_define_skeleton_variables(VARIABLE) to
2985 b4_percent_define_bison_variables(VARIABLE).
2986 (b4_percent_code_get, b4_percent_code_ifdef): Rename
2987 b4_percent_code_skeleton_qualifiers(QUALIFIER) to
2988 b4_percent_code_bison_qualifiers(QUALIFIER).
2989 (b4_check_user_names_wrap): Update for renames.
2990 * src/muscle_tab.c, src/muscle_tab.h (muscle_percent_define_flag_if,
2991 muscle_percent_define_default): New functions mimicking
2992 b4_percent_define_flag_if and b4_percent_define_default.
2993
2994 For %define variables, report locations for invalid values and
2995 redefinitions.
2996 * data/bison.m4 (b4_percent_define_flag_if): Read
2997 b4_percent_define_loc(VARIABLE) to report the location of an invalid
2998 value for VARIABLE.
2999 (b4_percent_define_default): Save a special location in
3000 b4_percent_define_loc(VARIABLE) in case the default value for VARIABLE
3001 must later be reported as invalid.
3002 * src/muscle_tab.c (muscle_location_grow, muscle_location_decode): New
3003 functions.
3004 (muscle_percent_define_insert): Record the location of VARIABLE in
3005 muscle percent_define_loc(VARIABLE), and use it to report the previous
3006 location for a redefinition.
3007 (muscle_percent_define_flag_if): Update like b4_percent_define_flag_if.
3008 (muscle_percent_define_default): Update like b4_percent_define_default.
3009 (muscle_grow_user_name_list): Rename to...
3010 (muscle_user_name_list_grow): ... this for consistency and use
3011 muscle_location_grow.
3012 * src/muscle_tab.h (muscle_location_grow): Prototype.
3013 * tests/input.at (%define errors): Update expected output.
3014 * tests/skeletons.at (%define boolean variables: invalid skeleton
3015 defaults): New test case.
3016
3017 2007-02-28 Joel E. Denny <jdenny@ces.clemson.edu>
3018
3019 * src/print.c (lookahead_set, state_default_rule): Remove.
3020 (print_reductions): Replace state_default_rule invocation with
3021 equivalent use of yydefact, which was computed in token_actions in
3022 tables.c.
3023 (print_results): Don't allocate lookahead_set.
3024
3025 2007-02-27 Paolo Bonzini <bonzini@gnu.org>
3026
3027 * data/lalr1.java: Prefix all private members with yy.
3028
3029 2007-02-24 Joel E. Denny <jdenny@ces.clemson.edu>
3030
3031 Use YYFPRINTF instead of fprintf where appropriate. Reported by
3032 Sebastien Fricker at
3033 <http://lists.gnu.org/archive/html/bug-bison/2007-02/msg00035.html>.
3034 * THANKS: Add Sebastien Fricker.
3035 * data/glr.c, data/push.c, data/yacc.c (yy_reduce_print): Implement.
3036 * doc/bison.texinfo (Tracing): Make it clearer that YYFPRINTF must
3037 accept a variable number of arguments.
3038
3039 2007-02-19 Joel E. Denny <jdenny@ces.clemson.edu>
3040
3041 * bootstrap: Remove occurrences of .#bootmp from lib/Makefile.
3042
3043 2007-02-13 Juan Manuel Guerrero <juan.guerrero@gmx.de>
3044
3045 * djgpp/config.bat: Adjustments concerning the use of autoconf 2.61.
3046 * djgpp/config.sed: Adjustments concerning the use of autoconf 2.61.
3047 * djgpp/config.site: Adjustments concerning the use of autoconf 2.61.
3048
3049 2007-02-11 Paul Eggert <eggert@cs.ucla.edu>
3050
3051 Undo my 2007-02-07 change, switching back to the c-strcase module
3052 introduced in the 2007-02-03 change. Bruno Haible reported that
3053 the 2007-02-07 change would be dangerous in Turkish if we add a
3054 language whose name contains "i", since "i" is not lowercase "I"
3055 in Turkish.
3056 * bootstrap.conf (gnulib_modules): Add c-strcase. Remove strcase.
3057 * lib/.cvsignore: Add c-ctype.c, c-ctype.h, c-strcase.h,
3058 c-strcasecomp.c, c-strncasecmp.c. Remove strcasecmp.c, strncasecmp.c.
3059 * m4/.cvsignore: Remove strcase.m4.
3060 * src/getargs.c: Revert 2007-02-07 change, as follows.
3061 Include c-strcase.h.
3062 (language_argmatch): Use c_strcasecmp rather than strcasecmp.
3063
3064 2007-02-11 Bruno Haible <bruno@clisp.org>
3065
3066 Enable the Java related testsuite tests when the only Java compiler
3067 found is a gcj < 4.3. Discussed at
3068 <http://lists.gnu.org/archive/html/bug-bison/2007-02/msg00016.html>.
3069 * configure.ac (gt_JAVACOMP): Don't specify a target_version.
3070
3071 2007-02-11 Joel E. Denny <jdenny@ces.clemson.edu>
3072
3073 * data/Makefile.am: Update copyright date.
3074 * data/push.c (yypull_parse): Report memory exhaustion and return 2 if
3075 yypstate_new returns NULL.
3076 (yypstate_new): Return NULL if malloc does.
3077 * src/reader.c (packgram): Move translation of rule actions from the
3078 beginning of packgram to...
3079 (check_and_convert_grammar): ... here right before packgram is invoked
3080 so it's easier to write more complete comments, and remove redundant
3081 code.
3082
3083 2007-02-10 Joel E. Denny <jdenny@ces.clemson.edu>
3084
3085 As in semantic actions, make @$ in %initial-action, %destructor, and
3086 %printer imply %locations.
3087 * src/scan-code.l (SC_SYMBOL_ACTION): Set locations_flag = true when
3088 scanning @$.
3089 * tests/actions.at (AT_CHECK_ACTION_LOCATIONS): New macro supporting...
3090 (@$ in %initial-action implies %locations,
3091 @$ in %destructor implies %locations,
3092 @$ in %printer implies %locations): ... these new test cases.
3093
3094 2007-02-07 Paul Eggert <eggert@cs.ucla.edu>
3095
3096 Undo most of the 2007-02-03 change, switching to the strcase module
3097 now that gnulib strcase has been fixed.
3098 * bootstrap.conf (gnulib_modules): Remove c-strcase. Add strcase.
3099 * lib/.cvsignore: Remove c-ctype.c, c-ctype.h, c-strcase.h,
3100 c-strcasecomp.c, c-strncasecmp.c. Add strcasecmp.c, strncasecmp.c
3101 * m4/.cvsignore: Add strcase.m4.
3102 * src/getargs.c: Revert 2007-02-03 change, as follows.
3103 Don't include c-strcase.h.
3104 (language_argmatch): Use strcasecmp rather than c_strcasecmp.
3105 strcasecmp has "unspecified behavior" outside the POSIX locale,
3106 but it works fine in practice if at least one argument is ASCII,
3107 as is the case in Bison.
3108
3109 2007-02-07 Paolo Bonzini <bonzini@gnu.org>
3110
3111 * tests/java.at: Skip tests if only one of javac/java is present.
3112 Reported by Joel E. Denny.
3113 * tests/atlocal.in: Adjust copyright years.
3114
3115 2007-02-05 Paolo Bonzini <bonzini@gnu.org>
3116
3117 * data/lalr1.java (Stack): Work around old verifiers that disallow
3118 access to the private fields of an inner class, from the outer class.
3119 We can make Stack's fields public because user code doesn't have access
3120 to the instance of Stack used by parse(). Reported by Paul Eggert.
3121
3122 2007-02-03 Paul Eggert <eggert@cs.ucla.edu>
3123
3124 * .cvsignore: Add javacomp.sh, javaexec.sh. Is this really
3125 the right spot for these files?
3126 * bootstrap.conf (gnulib_modules): Add c-strcase.
3127 * lib/.cvsignore: Add c-ctype.c c-ctype.h, c-strcasecomp.c,
3128 c-strncasecmp.c.
3129 * src/getargs.c: Include c-strcase.h.
3130 (language_argmatch): Use c_strcasecmp rather than strcasecmp,
3131 to avoid unspecified behavior.
3132
3133 2007-02-01 Joel E. Denny <jdenny@ces.clemson.edu>
3134
3135 * doc/bison.texinfo (Decl Summary): Correct typo.
3136
3137 2007-01-30 Paolo Bonzini <bonzini@gnu.org>
3138
3139 * data/bison.m4 (b4_percent_define_flag_if): Don't treat 0 as false.
3140 Complain if the value does not match empty, "true" or "false".
3141 * data/c++.m4: Adjust default definitions of %define variables.
3142 * data/java.m4: Adjust default definitions of %define variables.
3143 * doc/bison.texinfo (Decl Summary): Adjust the %define entry according
3144 to above behavior.
3145 * tests/input.at (Boolean %define variables): Test new behavior.
3146
3147 2007-01-29 Paolo Bonzini <bonzini@gnu.org>
3148
3149 * NEWS: Mention java.
3150 * TODO: Remove things that are done.
3151 * bootstrap.conf: Add javacomp-script and javaexec-script.
3152 * configure.ac: Invoke gt_JAVACOMP and gt_JAVAEXEC.
3153
3154 * data/Makefile.am: Add new files.
3155 * data/java-skel.m4: New.
3156 * data/java.m4: New.
3157 * data/lalr1.java: New.
3158
3159 * doc/bison.texinfo: Put "A Complete C++ Example" under
3160 C++ Parsers. Add Java Parsers. Put C++ Parsers and Java Parsers
3161 under Other Languages.
3162
3163 * src/getargs.c (valid_languages): Add Java.
3164 * src/getargs.h (struct bison_language): Update size of string fields.
3165
3166 * tests/Makefile.am: Add java.at.
3167 * tests/atlocal.in: Add CONF_JAVA and CONF_JAVAC.
3168 * tests/java.at: New.
3169 * tests/testsuite.at: Include it.
3170
3171 2007-01-28 Joel E. Denny <jdenny@ces.clemson.edu>
3172
3173 Clean up.
3174 * src/scan-skel.l (at_directive_perform): Add at_directive_argc and
3175 at_directive_argv arguments so these no longer have to be global
3176 variables. Also, update the implementation for the following changes.
3177 (fail_for_at_directive_too_many_args,
3178 fail_for_at_directive_too_few_args): Add at_directive_name argument.
3179 (at_directive_name): Remove as at_directive_argv[0] will be used for
3180 this now.
3181 (AT_DIRECTIVE_ARGC_MAX): Increment to make space in at_directive_argv
3182 for the directive name.
3183 (at_directive_argc, at_directive_argv): Make these local within
3184 skel_lex instead of global.
3185 (INITIAL): Update directive start action for above changes.
3186 (SC_AT_DIRECTIVE_ARG): Rename to...
3187 (SC_AT_DIRECTIVE_ARGS): ... this, and update for above changes.
3188 (SC_AT_DIRECTIVE_SKIP_WS): Update.
3189 (scan_skel): Move yylex_destroy to...
3190 (skel_scanner_free): ... here.
3191 * tests/skeletons.at (installed skeleton file name): Rename to...
3192 (installed skeleton file names): ... this.
3193
3194 2007-01-27 Joel E. Denny <jdenny@ces.clemson.edu>
3195
3196 * ChangeLog: For changes in doc/bison.texinfo, consistently reference
3197 node names: say "Table of Symbols" not "Bison Symbols", and say "Decl
3198 Summary" not "Directives".
3199 * doc/bison.texinfo (Decl Summary, Calc++ Parser): Cross-reference the
3200 %code entry in "Decl Summary" rather than the one in "Table of Symbols"
3201 since the former is now the more complete one.
3202 (Prologue Alternatives): Likewise and do the same for %defines.
3203 (Table of Symbols): Add summary of %code, add summary of %define, and
3204 move full %code documentation to...
3205 (Decl Summary): ... here for consistency with other entries in these
3206 sections.
3207 Move %define entry in order to keep this list alphabetized.
3208 Reword %define entry a little to put less emphasis on the skeleton
3209 concept, which most users shouldn't have to think about.
3210
3211 2007-01-26 Paul Eggert <eggert@cs.ucla.edu>
3212
3213 Adjust to recent gnulib changes.
3214 * lib/.cvsignore: Remove stpcpy.h, strndup.h, strnlen.h.
3215 Add string.h, string_.h, unistd_.h, wchar_.h.
3216 * m4/.cvsignore: Add gnulib-common.m4, string_h.m4, wchar.m4.
3217 * src/system.h: Don't include <stpcpy.h>; this is now done by
3218 <string.h>.
3219
3220 2007-01-23 Paolo Bonzini <bonzini@gnu.org>
3221
3222 Simplify implementation of unqualified %code, implement macros for
3223 uniform treatment of boolean %define flags. Document %define.
3224 * data/bison.m4 (b4_percent_define_ifdef, b4_percent_define_flag_if,
3225 b4_percent_code_ifdef): New.
3226 (b4_percent_code_get): Map unqualified %code to b4_percent_code().
3227 * data/c++.m4: Define default value for global_tokens_and_yystype.
3228 * data/glr.cc: Likewise.
3229 * data/location.cc: Use b4_percent_define_flag_if.
3230
3231 * doc/bison.texinfo (Decl Summary): Document %define.
3232
3233 * src/parse-gram.y (Unqualified %code): Change muscle name to
3234 b4_percent_code().
3235 (content.opt): Default to empty.
3236
3237 2007-01-17 Joel E. Denny <jdenny@ces.clemson.edu>
3238
3239 Implement support for relative and absolute skeleton file names.
3240 Discussed starting at
3241 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00071.html>.
3242 * doc/bison.texinfo (Decl Summary): Document in %skeleton entry.
3243 (Bison Options): Document in --skeleton entry.
3244 * src/output.c (output_skeleton): Use strncpy rather than strcpy since
3245 full_skeleton can't necessarily hold all of pkgdatadir.
3246 If the specified skeleton file name contains a `/', don't prepend
3247 pkgdatadir.
3248 * src/parse-gram.y (prologue_declaration): If the specified skeleton
3249 file name contains a `/', prepend the grammar file directory.
3250 * tests/Makefile.am (TESTSUITE_AT): Add skeletons.at.
3251 * skeletons.at: New file.
3252 (relative skeleton file names): New test case.
3253 (installed skeleton file names): New test case.
3254 * tests/testsuite.at: Include skeletons.at.
3255
3256 * bootstrap: Update copyright to 2007.
3257
3258 2007-01-17 Paolo Bonzini <bonzini@gnu.org>
3259
3260 * bootstrap: Remove occurrences of .#bootmp from the files.
3261
3262 2007-01-17 Akim Demaille <akim@epita.fr>
3263
3264 * doc/bison.texinfo (Calc++ Parser): Don't try to alias
3265 nonterminals.
3266 Use per-type %printer.
3267
3268 2007-01-17 Joel E. Denny <jdenny@ces.clemson.edu>
3269
3270 * NEWS, data/c++-skel.m4, data/c++.m4, data/c-skel.m4, data/c.m4,
3271 data/glr.c, data/glr.cc, data/lalr1.cc, data/location.cc,
3272 djgpp/config.site, src/files.c, src/files.h, src/main.c,
3273 src/muscle_tab.c, src/muscle_tab.h, src/parse-gram.y, src/reader.h,
3274 src/scan-skel.h, src/scan-skel.l, tests/actions.at, tests/calc.at,
3275 tests/glr-regression.at, tests/input.at, tests/local.at,
3276 tests/output.at, tests/torture.at: Update copyright to 2007.
3277
3278 2007-01-16 Akim Demaille <akim@epita.fr>
3279
3280 * doc/bison.texinfo (Calc++ Parsing Driver): Let "parse" return an
3281 error code.
3282 (Calc++ Scanner): Exit with failure if we can't open the input
3283 file.
3284 Accept "-" standing for stdin.
3285 (Calc++ Top Level): Print the result only if the parsing was
3286 successful.
3287
3288 2007-01-16 Akim Demaille <akim@epita.fr>
3289
3290 * data/lalr1.cc (yy_reduce_print_): Add a missing end-of-line.
3291
3292 2007-01-15 Paolo Bonzini <bonzini@gnu.org>
3293 and Joel E. Denny <jdenny@ces.clemson.edu>
3294
3295 Clean up %define and %code implementation in M4 some. Most
3296 importantly, rename all related macros to be in the b4_percent_define
3297 and b4_percent_code namespaces. Also, complete support for `.' in
3298 %define variable names and %code qualifiers.
3299 * data/bison.m4 (b4_check_user_names): Check for special
3300 "SKELETON-NAMESPACE(name)" macros instead of using two nested
3301 m4_foreach loops.
3302 (b4_get_percent_define, b4_get_percent_code): Rename to...
3303 (b4_percent_define_get, b4_percent_code_get): ... these.
3304 Extend documentation with examples.
3305 For SKELETON-NAMESPACE (as documented for b4_check_user_names), use
3306 b4_percent_define_skeleton_variables and
3307 b4_percent_code_skeleton_qualifiers.
3308 Expect any value for the %define variable `foo' to be stored in the
3309 macro named `b4_percent_define(foo)'; expect any %code blocks for the
3310 qualifier `foo' to be stored in a macro named `b4_percent_code(foo)';
3311 expect any unqualified %code blocks to be stored in a macro named
3312 `b4_percent_code_unqualified'.
3313 Use m4_indir so that %define variable names and %code qualifiers can
3314 contain `.', which is allowed by the grammar parser.
3315 (b4_percent_define_default): New macro to set a default value for a
3316 %define variable.
3317 (m4_wrap): Update wrapped code, and fix some underquoting.
3318 (b4_check_user_names_wrap): Update and define outside the m4_wrap.
3319 Expect grammar uses of %define variables and %code qualifiers to be
3320 defined in b4_percent_define_user_variables and
3321 b4_percent_code_user_qualifiers.
3322 * data/c++.m4: Use b4_percent_define_default rather than
3323 m4_define_default. Fix some underquoting. Skeleton usage of %define
3324 variable define_location_comparison now implies skeleton usage of
3325 %define variable filename_type.
3326 * data/glr.c, data/glr.cc, data/lalr1.cc, data/location.cc,
3327 data/push.c, data/yacc.c: Update macro names.
3328 * src/parse-gram.y (prologue_declaration, grammar_declaration): Update
3329 muscle names.
3330
3331 2007-01-14 Juan Manuel Guerrero <juan.guerrero@gmx.de>
3332
3333 DJGPP specific issues.
3334
3335 * djgpp/config.site: Set ac_cv_path_mkdir to a sane DJGPP specific
3336 default. Set gl_cv_absolute_wctype_h to a sane DJGPP specific default.
3337
3338 2007-01-09 Joel E. Denny <jdenny@ces.clemson.edu>
3339
3340 * tests/glr-regression.at: Use AT_PARSER_CHECK rather than AT_CHECK to
3341 run parsers in all tests so that Valgrind is invoked during
3342 maintainer-check-valgrind.
3343 (Duplicate representation of merged trees): Free all semantic values.
3344 (Duplicated user destructor for lookahead): Likewise.
3345
3346 2007-01-09 Joel E. Denny <jdenny@ces.clemson.edu>
3347
3348 * tests/local.at (AT_PARSER_CHECK): Add a PRE argument to specify a
3349 command-line prefix.
3350 * tests/torture.at (Exploding the Stack Size with Alloca): Stderr is
3351 ignored, so use that PRE to set --log-fd=1 in VALGRIND_OPTS so we don't
3352 miss Valgrind messages.
3353 (Exploding the Stack Size with Malloc): Likewise.
3354
3355 2007-01-09 Joel E. Denny <jdenny@ces.clemson.edu>
3356
3357 Ignore YYSTACK_USE_ALLOCA for push parsers since the stacks can't be
3358 locals. Reported by Juan Manuel Guerrero at
3359 <http://lists.gnu.org/archive/html/bug-bison/2007-01/msg00000.html>.
3360 * data/push.c: Enclose the #ifdef YYSTACK_USE_ALLOCA in b4_push_if.
3361 Fix some indentation also.
3362 * tests/torture.at (Exploding the Stack Size with Alloca): Add comment
3363 explaining this issue.
3364
3365 2007-01-09 Paolo Bonzini <bonzini@gnu.org>
3366 and Joel E. Denny <jdenny@ces.clemson.edu>
3367
3368 Simplify union and prologue handling, and escape union and lex/parse
3369 params with digraphs.
3370 * data/bison.m4 (b4_pre_prologue, b4_post_prologue): Set their default
3371 values to the empty string since these are no longer guaranteed
3372 initialized by the front-end.
3373 * data/glr.c, data/glr.cc, data/lalr1.cc, data/push.c, data/yacc.c: Add
3374 braces around b4_user_stype since this is no longer done by the
3375 front-end.
3376 * src/files.c, src/files.h (pre_prologue_obstack,
3377 post_prologue_obstack): Remove.
3378 * src/muscle_tab.c (muscle_pair_list_grow): Don't duplicate header
3379 comments here. Use MUSCLE_OBSTACK_SGROW so that values are escaped
3380 with digraphs. This fixes lex params and parse params.
3381 * src/muscle_tab.h (muscle_pair_list_grow): Update comments.
3382 * src/output.c (prepare): Remove muscle insertion of the prologues.
3383 (output): Remove freeing of pre_prologue_obstack and
3384 post_prologue_obstack.
3385 * src/parse-gram.y (prologue_declaration): Use muscle_code_grow rather
3386 than prologue_augment for prologue parsing so you don't need prologue
3387 obstacks.
3388 (grammar_declaration): For %union RHS, use `braceless' instead of
3389 "{...}" so that braces are already stripped and code is escaped with
3390 digraphs.
3391 * src/reader.c (prologue_augment): Remove.
3392 (reader): Remove initialization of pre_prologue_obstack and
3393 post_prologue_obstack.
3394 * src/reader.h (prologue_augment): Remove.
3395
3396 * data/c.m4: Remove stray parenthesis.
3397
3398 2007-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
3399
3400 Remove quotes from variables names in %define directives and from
3401 qualifiers in %code directives, and restrict the characters that are
3402 allowed in them to M4-friendly ones. For %define, continue to support
3403 the quoted form as a deprecated feature. Discussed starting at
3404 <http://lists.gnu.org/archive/html/bison-patches/2007-01/msg00023.html>.
3405 * NEWS (2.3a+): Add entry for the change to %define. Update entry for
3406 %code.
3407 * doc/bison.texinfo (Prologue Alternatives): Update.
3408 (Decl Summary): In %defines entry, update mention of `%code requires'
3409 and `%code provides'.
3410 (C++ Location Values): Update %define uses.
3411 (Calc++ Parser Interface): Likewise.
3412 (Calc++ Parser): Likewise, and update `%code requires' uses.
3413 (Table of Symbols): Update %code documentation.
3414 * src/parse-gram.y (prologue_declaration): For %define variables, use
3415 `variable' instead of `STRING'.
3416 (grammar_declaration): For %code qualifiers, use `ID' instead of
3417 `STRING'.
3418 (variable): New nonterminal that takes an `ID' or a `STRING'.
3419 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Update %code
3420 and %define uses.
3421 * tests/calc.at (_AT_DATA_CALC_Y): Update %define use.
3422 * tests/input.at (Reject unused %code qualifiers): Update %code uses.
3423 (%define errors): Update %define uses.
3424
3425 2007-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
3426
3427 * src/parse-gram.y (prologue_declaration): Use MUSCLE_INSERT_STRING
3428 instead of muscle_insert for %define values so that M4-special
3429 characters are replaced with digraphs.
3430 * tests/input.at (%define errors): Extend to check weird values.
3431
3432 2007-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
3433
3434 Instead of having skeletons declare all valid %define variables and
3435 %code qualifiers, provide macros that retrieve the associated values
3436 and build these lists automatically. Thus Bison will now warn when a
3437 variable or qualifier is not used by the skeleton in the current
3438 invocation regardless of whether it might sometimes be used by that
3439 skeleton in other invocations. Also, move all %define value macros to
3440 the b4_percent_define_ namespace, and remove the %define "NAME" {CODE}
3441 form, which is replaced by %code.
3442 * data/bison.m4 (b4_check_for_unrecognized_names): Rename to...
3443 (b4_check_user_names): ... this, and change the series of valid name
3444 arguments to a single list argument for names used in the skeleton
3445 similar to the existing list argument for names used in the grammar.
3446 Warn instead of complaining.
3447 (b4_get_percent_define, b4_get_percent_code): New to retrieve %define
3448 values and %code code, to format %code code properly, and to build
3449 lists of all %define variables and %code qualifiers used in the
3450 skeleton: b4_skeleton_percent_define_variables and
3451 b4_skeleton_percent_code_qualifiers.
3452 (b4_check_percent_define_variables, b4_check_percent_code_qualifiers):
3453 Remove, and...
3454 (m4_wrap): ... m4_wrap b4_check_user_names invocations instead so that
3455 the skeleton names lists can finish building first. In place of
3456 b4_used_percent_define_variables and b4_used_percent_code_qualifiers,
3457 expect the lists b4_user_percent_define_variables and
3458 b4_user_percent_code_qualifiers.
3459 * data/c++.m4: Where setting default values for b4_parser_class_name,
3460 b4_location_type, b4_filename_type, b4_namespace, and
3461 b4_define_location_comparison, update their names to the
3462 b4_percent_define_ namespace.
3463 * data/glr.c: Don't use b4_check_percent_define_variables and
3464 b4_check_percent_code_qualifiers. Use b4_get_percent_code.
3465 * data/glr.cc, data/lalr1.cc: Likewise, and use b4_get_percent_define.
3466 (b4_parser_class_name, b4_namespace): Define these using
3467 b4_get_percent_define for parser_class_name and namespace.
3468 * data/location.cc: Use b4_get_percent_define.
3469 * data/push.c: Don't use b4_check_percent_define_variables and
3470 b4_check_percent_code_qualifiers. Use b4_get_percent_code.
3471 * data/yacc.c: Likewise, and don't call m4_exit in
3472 b4_use_push_for_pull_if or m4_wrap code will never execute.
3473 * src/muscle_tab.c, src/muscle_tab.h (muscle_grow_used_name_list):
3474 Rename to...
3475 (muscle_grow_user_name_list): ... this for consistency with the
3476 terminology used in bison.m4.
3477 * src/parse-gram.y (prologue_declaration): Prepend "percent_define_" to
3478 %define variable names, and rename muscle used_percent_define_variables
3479 to user_percent_define_variables.
3480 (grammar_declaration): Rename muscle used_percent_code_qualifiers to
3481 user_percent_code_qualifiers.
3482 (content): Remove.
3483 (content.opt): Replace content RHS with STRING RHS so %define "NAME"
3484 {CODE} form is no longer accepted.
3485 * tests/input.at (Reject bad %code qualifiers): Rename to...
3486 (Reject unused %code qualifiers): ... this, and update test output.
3487 (%define error): Update test output.
3488
3489 2007-01-07 Joel E. Denny <jdenny@ces.clemson.edu>
3490
3491 Check for unrecognized %define variables similar to checking for
3492 unrecognized %code qualifiers. Check for redefined %define variables.
3493 * data/bison.m4 (b4_check_for_unrecognized_names): New macro that
3494 generalizes...
3495 (b4_check_percent_code_qualifiers): ... this, which now wraps it.
3496 (b4_check_percent_define_variables): New, also wraps it.
3497 * data/glr.c: Unless glr.cc is wrapping glr.c, declare no valid %define
3498 variables using b4_check_percent_define_variables.
3499 * data/glr.cc, data/lalr1.cc: Declare the valid %define variables as
3500 all those exercised in the test suite and all those listed in the
3501 `Default values' section of c++.m4. Are there others?
3502 * data/push.c, data/yacc.c: Declare no valid %define variables.
3503 * src/muscle_tab.c, src/muscle_tab.h (muscle_find_const): New function,
3504 similar to muscle_find, but it works even when the muscle stores a
3505 const value.
3506 (muscle_grow_used_name_list): New function for constructing the used
3507 name list muscles that b4_check_for_unrecognized_names requires.
3508 * src/parse-gram.y (prologue_declaration): Warn if a variable is
3509 %define'd more than once. Define the b4_used_percent_define_variables
3510 muscle with muscle_grow_used_name_list.
3511 (grammar_declaration): Abbreviate %code code with
3512 muscle_grow_used_name_list.
3513 * tests/input.at (%define errors): New.
3514
3515 2007-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
3516
3517 Provide warn_at, complain_at, and fatal_at function callbacks to the
3518 skeletons, and use this for %code qualifier complaints.
3519 * data/bison.m4 (b4_error_at): New, invoked by...
3520 (b4_warn_at, b4_complain_at, b4_fatal_at): ... these new macros to wrap
3521 the skeleton scanner's new @warn_at(...@), @complain_at(...@), and
3522 @fatal_at(...@) directives.
3523 (b4_check_percent_code_qualifiers): Rewrite to expect locations for
3524 qualifiers in b4_used_percent_code_qualifiers and to use
3525 b4_complain_at.
3526 * src/location.c, src/location.h (boundary_set_from_string): New global
3527 function.
3528 * src/muscle_tab.c, src/muscle_tab.h (muscle_boundary_grow): New global
3529 function.
3530 * src/parse-gram.y (grammar_declaration): Add locations for qualifiers
3531 to b4_used_percent_code_qualifiers.
3532 * src/scan-skel.l (fail_for_at_directive_too_few_args): New static
3533 function.
3534 (AT_DIRECTIVE_ARGC_MAX): Increase for boundary arguments.
3535 (lineno): Rename to...
3536 (out_lineno): ... this so I don't misunderstand it again.
3537 (SC_AT_DIRECTIVE_SKIP_WS): Don't increment out_lineno for newlines
3538 here; these newlines are in the input but not the output file.
3539 (SC_AT_DIRECTIVE_ARG): Likewise. Extract directive execution to...
3540 (at_directive_perform): ... this new static function, and add handling
3541 of new @warn_at(...@), @complain_at(...@), and @fatal_at(...@)
3542 directives.
3543 * tests/input.at (Reject bad %code qualifiers): Update test output with
3544 locations and extend.
3545
3546 * tests/output.at (Output file name: [, Output file name: ]): Remove
3547 bogus comment about these tests failing.
3548
3549 2007-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
3550
3551 Clean up b4_check_percent_code_qualifiers a little.
3552 * data/bison.m4 (b4_check_percent_code_qualifiers): Expect qualifiers
3553 in b4_used_percent_code_qualifiers to be double-M4-quoted. Rewrite
3554 documentation and add examples.
3555 * src/parse-gram.y (grammar_declaration): Double-M4-quote those
3556 qualifiers here.
3557
3558 2007-01-05 Joel E. Denny <jdenny@ces.clemson.edu>
3559
3560 Don't use m4_divert since it makes m4_divert_push and m4_divert_pop
3561 unreliable -- especially when they're hidden inside another macro.
3562 * data/bison.m4, data/c++-skel.m4, data/c++.m4, data/c-skel.m4,
3563 data/c.m4: Remove m4_divert(-1).
3564 * data/glr.c, data/glr.cc, data/lalr1.cc, data/location.cc,
3565 data/push.c, data/yacc.c: Likewise, and replace m4_divert(0) with
3566 m4_divert_push(0) and m4_divert_pop(0).
3567 * src/output.c (output_skeleton): Don't add an m4_divert_push(0) and
3568 an m4_wrap([m4_divert_pop(0)]) to the M4. Diversion -1, which is
3569 pushed and popped by m4sugar, should be first on the stack.
3570
3571 Provide warn, complain, and fatal function callbacks to the skeletons.
3572 This provides more flexibility than m4_fatal, improves the error
3573 message format, and captures messages for translation. Discussed
3574 starting at
3575 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00063.html>.
3576 * data/bison.m4 (b4_error): New, invoked by...
3577 (b4_warn, b4_complain, b4_fatal): ... these new macros to wrap the
3578 skeleton scanner's new @warn(...@), @complain(...@), and @fatal(...@)
3579 directives. Because these M4 macros might be called when the current
3580 diversion is -1 or 0, m4_divert_push and m4_divert_pop is used; thus
3581 the previous removal of uses of m4_divert, which caused trouble.
3582 (b4_check_percent_code_qualifiers): Use b4_complain instead of
3583 m4_fatal to report unrecognized %code qualifiers.
3584 * data/c++-skel.m4: Use b4_complain instead of m4_fatal to report C++
3585 push parser requests.
3586 * data/glr.c: Use b4_complain instead of m4_fatal to report
3587 non-deterministic push parser requests.
3588 Update @output usage to @output(...@) form.
3589 * data/glr.cc, data/lalr1.cc: Use b4_fatal instead of m4_fatal to
3590 report missing %defines. Update @output usage to @output(...@) form.
3591 * data/location.cc, data/push.c, data/yacc.c: Update @output usage to
3592 @output(...@) form.
3593 * src/main.c (main): Invoke skel_scanner_free.
3594 * src/scan-skel.h (skel_scanner_free): Prototype new function.
3595 * src/scan-skel.l (FLEX_NO_OBSTACK): Don't define; we now need the
3596 obstack_for_string from flex-scanner.h.
3597 (YY_DECL): Use to declare skel_lex static.
3598 (decode_at_digraphs): Remove; now handled in the new
3599 SC_AT_DIRECTIVE_ARG start condition.
3600 (fail_for_at_directive_too_many_args, fail_for_invalid_at): New static
3601 functions.
3602 (at_directive_name, AT_DIRECTIVE_ARGC_MAX, at_directive_argc,
3603 at_directive_argv): New static globals.
3604 (INITIAL): Use fail_for_invalid_at.
3605 Don't parse `@output file_name\n' or `@basename(...@)'. Instead,
3606 recognize the start of a generalized `@directive(...@)' form and
3607 start...
3608 (SC_AT_DIRECTIVE_ARG): ... this new start condition to parse the
3609 directive args (using the new obstack_for_string), to decode the
3610 contained @ diagraphs, and to perform the directive. It recognizes
3611 @basename(...@), @warn(...@), @complain(...@), @fatal(...@), and
3612 @output(...@).
3613 (SC_AT_DIRECTIVE_SKIP_WS): New start condition started by
3614 SC_AT_DIRECTIVE_ARG to skip whitespace after the argument delimiter,
3615 `@,'.
3616 (scan_skel): Initialize obstack_for_string on the first call.
3617 (skel_scanner_free): New function to free obstack_for_string.
3618 * tests/input.at (Reject bad %code qualifiers): Update test output.
3619
3620 2007-01-04 Joel E. Denny <jdenny@ces.clemson.edu>
3621
3622 Consolidate the 4 prologue alternative directives (%code, %requires,
3623 %provides, and %code-top) into a single %code directive with an
3624 optional qualifier field. Discussed at
3625 <http://lists.gnu.org/archive/html/bison-patches/2007-01/msg00012.html>.
3626 * NEWS (2.3a+): Rewrite the existing entry for the prologue
3627 alternatives.
3628 * doc/bison.texinfo (Prologue Alternatives): Update.
3629 (Decl Summary): Update to %code "requires" and %code "provides".
3630 (Calc++ Parser): Update to %code "requires".
3631 (Table of Symbols): Remove entries for %requires, %provides, and
3632 %code-top. Rewrite %code entry, and add a %code "QUALIFIER" entry.
3633 * data/bison.m4 (b4_user_provides, b4_user_requires): Remove as these
3634 are replaced by b4_percent_code_provides and b4_percent_code_requires,
3635 which are skeleton-specific.
3636 (b4_check_percent_code_qualifiers): New. A skeleton can use this to
3637 declare what %code qualifiers it supports and to complain if any other
3638 qualifiers were used in the grammar.
3639 * data/glr.cc: Update to use b4_user_code([b4_percent_code_requires])
3640 and b4_user_code([b4_percent_code_provides]) in place of
3641 b4_user_requires and b4_user_provides.
3642 * data/glr.c, data/lalr1.cc, data/push.c, data/yacc.c: Likewise.
3643 Add b4_user_code([b4_percent_code_top]) and
3644 b4_user_code([b4_percent_code]).
3645 Invoke b4_check_percent_code_qualifiers.
3646 * src/parse-gram.y (PERCENT_CODE_TOP, PERCENT_PROVIDES,
3647 PERCENT_REQUIRES): Remove.
3648 (grammar_declaration): Remove RHS's for %code-top, %provides, and
3649 %requires. Rewrite the %code RHS as the unqualified form defining the
3650 muscle b4_percent_code. Add another RHS for the qualified %code form,
3651 which defines muscles of the form b4_percent_code_QUALIFIER and the
3652 b4_used_percent_code_qualifiers muscle.
3653 * src/scan-gram.l (PERCENT_CODE_TOP, PERCENT_PROVIDES,
3654 PERCENT_REQUIRES): Remove.
3655 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Update to use
3656 %code "requires" and %code "provides".
3657 * tests/input.at (Reject bad %code qualifiers): New.
3658
3659 2007-01-03 Joel E. Denny <jdenny@ces.clemson.edu>
3660
3661 Use the new code_props interface for destructors and printers.
3662 * src/symtab.h (symbol, semantic_type): Remove destructor_location and
3663 printer_location members, and change the type of the destructor and
3664 printer members to code_props.
3665 (symbol_destructor_set, symbol_destructor_get, symbol_printer_set,
3666 symbol_printer_get, semantic_type_destructor_set,
3667 semantic_type_printer_set, default_tagged_destructor_set,
3668 default_tagless_destructor_set, default_tagged_printer_set,
3669 default_tagless_printer_set): Use code_props in arguments and return
3670 types in place of char const * and location.
3671 (symbol_destructor_location_get, symbol_printer_location_get): Remove
3672 since the locations are now contained in the return of
3673 symbol_destructor_get and symbol_printer_get.
3674 * src/output.c (symbol_destructors_output, symbol_printers_output):
3675 Replace with...
3676 (symbol_code_props_output): ... this to eliminate duplicate code.
3677 (output_skeleton): Update to use symbol_code_props_output.
3678 * src/reader.c (symbol_should_be_used): Update use of
3679 symbol_destructor_get.
3680 * src/symlist.c (symbol_list_destructor_set, symbol_list_printer_set):
3681 Update uses of the various _destructor_set and _printer_set functions.
3682 * src/symtab.c: (default_tagged_destructor_location,
3683 default_tagless_destructor_location, default_tagged_printer_location,
3684 default_tagless_printer_location): Remove since we...
3685 (default_tagged_destructor, default_tagless_destructor,
3686 default_tagged_printer, default_tagless_printer): ... change the type
3687 of these to code_props.
3688 (symbol_new, semantic_type_new, symbol_destructor_set,
3689 semantic_type_destructor_set, symbol_destructor_get,
3690 symbol_printer_set, semantic_type_printer_set, symbol_printer_get,
3691 symbol_check_alias_consistency, default_tagged_destructor_set,
3692 default_tagless_destructor_set, default_tagged_printer_set,
3693 default_tagless_printer_set): Update.
3694 (symbol_destructor_location_get, symbol_printer_location_get): Remove.
3695 (SYMBOL_CODE_PRINT): New similar to SYMBOL_ATTR_PRINT but for
3696 code_props members.
3697 (symbol_print): Use SYMBOL_CODE_PRINT.
3698
3699 2007-01-03 Joel E. Denny <jdenny@ces.clemson.edu>
3700
3701 Use the new code_props interface for rule actions.
3702 * src/symlist.h (symbol_list): Replace action, action_location, and
3703 used members with a code_props action_props member.
3704 * src/reader.c (symbol_should_be_used, grammar_rule_check,
3705 grammar_midrule_action, grammar_current_rule_merge_set,
3706 grammar_current_rule_symbol_append, packgram): Update.
3707 * src/scan-code.h (translate_rule_action): Remove, no longer used.
3708 * src/scan-code.l (handle_action_dollar): Update.
3709 (translate_rule_action): Remove, no longer used.
3710 * src/symlist.c (symbol_list_sym_new, symbol_list_syms_print): Update.
3711
3712 2007-01-02 Joel E. Denny <jdenny@ces.clemson.edu>
3713
3714 Use the new code_props interface in parse-gram.y.
3715 * src/parse-gram.y (prologue_declaration, braceless, epilogue.opt):
3716 Update all uses of translate_* functions to use the new code_props
3717 interface and to use gram_scanner_last_string_free and
3718 code_scanner_last_string_free where possible.
3719 (grammar_declaration): symbol_list_destructor_set and
3720 symbol_list_printer_set now perform the translation, so don't do it
3721 here. Use gram_scanner_last_string_free where possible.
3722 * src/scan-code.h, src/scan-code.l (translate_symbol_action,
3723 translate_code): Remove, no longer used.
3724 * src/symlist.h, src/symlist.c (symbol_list_destructor_set,
3725 symbol_list_printer_set): Perform code translation here rather than
3726 depending on the caller to do so.
3727
3728 * src/symlist.h (struct symbol_list): Correct some documentation typos.
3729 * src/scan-gram.h (gram_last_string): Remove declaration.
3730 * src/scan-gram.l (last_string): Declare it static.
3731
3732 2007-01-02 Joel E. Denny <jdenny@ces.clemson.edu>
3733
3734 Encapsulate code properties and related functionality for the various
3735 destructors, printers, and actions into a code_props structure and
3736 interface. This patch merely implements code_props in scan-code.h and
3737 scan-code.l. Future patches will rewrite other modules to use it.
3738 Discussed starting at
3739 <http://lists.gnu.org/archive/html/bison-patches/2006-11/msg00020.html>.
3740 * src/location.h (EMPTY_LOCATION_INIT): Define so that it's easier to
3741 consistently initialize const structs that have an empty location
3742 field.
3743 * src/location.c (empty_location): Initialize with EMPTY_LOCATION_INIT
3744 to ensure consistency.
3745 * src/scan-code.h (code_props): New structure.
3746 (code_props_none_init, CODE_PROPS_NONE_INIT, code_props_none): New
3747 function, macro, and const global variable for initializing a
3748 code_props with no code.
3749 (code_props_plain_init, code_props_symbol_action_init,
3750 code_props_rule_action_init, code_props_translate_code): The rest of
3751 the new code_props functional interface. Among other things, the init
3752 functions set the code_props kind field so that
3753 code_props_translate_code will know whether to behave like
3754 translate_symbol_action, translate_rule_action, or translate_code.
3755 These old translate functions must remain until all other modules are
3756 updated to use the new code_props interface.
3757 (code_scanner_last_string_free): New function similar to
3758 gram_scanner_last_string_free.
3759 (code_scanner_free): Add documentation.
3760 * src/scan-code.l: Implement the new interface.
3761 (code_lex): Make it static, add a code_props* argument, and remove the
3762 rule argument.
3763 (last_string): New static global similar to the one in scan-gram.l.
3764 (SC_RULE_ACTION): Update to use the code_props* argument to code_lex
3765 instead of rule.
3766 (SC_SYMBOL_ACTION): For $$, set the is_value_used member of the
3767 code_props since Bison may one day use this information for destructors
3768 and printers.
3769 (<*><<EOF>>): Use STRING_FINISH so that last_string is set.
3770 (handle_action_dollar): Use symbol_list_n_get and set used flag
3771 directly since symbol_list_n_used_set is removed.
3772 (translate_action): Add a code_props* argument and remove the rule,
3773 action, and location arguments. Pass the code_props* on to code_lex.
3774 (translate_rule_action, translate_symbol_action, translate_code):
3775 Rewrite as wrappers around the new code_props interface.
3776 * src/symlist.h, src/symlist.c (symbol_list_n_used_set): Remove since
3777 it would eventually need to break the encapsulation of code_props.
3778
3779 2007-01-01 Joel E. Denny <jdenny@ces.clemson.edu>
3780
3781 * etc/.cvsignore: New.
3782
3783 2007-01-01 Joel E. Denny <jdenny@ces.clemson.edu>
3784
3785 Add maintainer-push-check to run maintainer-check using push parsing in
3786 place of pull parsing where available.
3787 * Makefile.am (maintainer-push-check): New.
3788 * data/bison.m4 (b4_use_push_for_pull_if): New.
3789 * data/push.c: Redefine b4_push_if and b4_use_push_for_pull_if
3790 appropriately based on their existing values.
3791 (yypush_parse): Don't print push-parser-specific diagnostics if push
3792 parsing is being used in place of pull parsing.
3793 * data/yacc.c: If push parsing should replace pull parsing, redirect to
3794 push.c.
3795 * src/output.c (prepare): Check BISON_USE_PUSH_FOR_PULL environment
3796 variable, and insert b4_use_push_for_pull_flag into muscles.
3797 * tests/Makefile.am (maintainer-push-check): New.
3798
3799 2006-12-31 Joel E. Denny <jdenny@ces.clemson.edu>
3800
3801 * data/push.c (yypush_parse): Set yynew = 1 at the end of a parse
3802 (whether successful or failed) so that yypush_parse can be invoked
3803 again to start a new parse using the same yypstate.
3804 * tests/torture.at (AT_DATA_STACK_TORTURE): For push mode, extend to
3805 check multiple yypull_parse invocations on the same yypstate. For pull
3806 mode, extend to check multiple yyparse invocations.
3807 (Exploding the Stack Size with Alloca): Extend to try with
3808 %push-pull-parser.
3809 (Exploding the Stack Size with Malloc): Likewise.
3810
3811 * tests/calc.at (Simple LALR Calculator): Don't specify
3812 %skeleton "push.c" since %push-pull-parser implies that now.
3813 * tests/headers.at (export YYLTYPE): Don't check for the push
3814 declarations. Otherwise, this test case can't be used to see if push
3815 mode can truly emulate pull mode.
3816 * tests/input.at (Torturing the Scanner): Likewise.
3817 * tests/local.at (AT_YACC_OR_PUSH_IF, AT_PUSH_IF): Remove.
3818 (AT_YYERROR_SEES_LOC_IF): Rather than AT_YACC_OR_PUSH_IF, use
3819 AT_YACC_IF, which now includes the case of push mode since %skeleton
3820 need not be used for push mode. This will be more intuitive once
3821 push.c is renamed to yacc.c.
3822
3823 2006-12-31 Joel E. Denny <jdenny@ces.clemson.edu>
3824
3825 For push mode, convert yyparse from a macro to a function, invoke yylex
3826 instead of passing a yylexp argument to yypull_parse, and don't
3827 generate yypull_parse or yyparse unless %push-pull-parser is declared.
3828 Discussed starting at
3829 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00163.html>.
3830 * data/bison.m4 (b4_pull_if): New.
3831 * data/c.m4 (b4_identification): Define YYPULL similar to YYPUSH.
3832 * data/push.c: Improve M4 quoting a little.
3833 (b4_generate_macro_args, b4_parenthesize): Remove.
3834 (yyparse): If there's a b4_prefix, #define this to b4_prefix[parse]
3835 any time a pull parser is requested.
3836 Don't #define this as a wrapper around yypull_parse. Instead, when
3837 both push and pull are requested, make it a function that does that
3838 same thing.
3839 (yypull_parse): If there's a b4_prefix, #define this to
3840 b4_prefix[pull_parse] when both push and pull are requested.
3841 Don't define this as a function unless both push and pull are
3842 requested.
3843 Remove the yylexp argument and hard-code yylex invocation instead.
3844 * etc/bench.pl.in (bench_grammar): Use %push-pull-parser instead of
3845 %push-parser.
3846 * src/getargs.c (pull_parser): New global initialized to true.
3847 * getargs.h (pull_parser): extern it.
3848 * src/output.c (prepare): Insert pull_flag muscle.
3849 * src/parse-gram.y (PERCENT_PUSH_PULL_PARSER): New token.
3850 (prologue_declaration): Set both push_parser and pull_parser = true for
3851 %push-pull-parser. Set push_parser = true and pull_parser = false for
3852 %push-parser.
3853 * src/scan-gram.l: Don't accept %push_parser as an alternative to
3854 %push-parser since there's no backward-compatibility concern here.
3855 Scan %push-pull-parser.
3856 * tests/calc.at (Simple LALR(1) Calculator): Use %push-pull-parser
3857 instead of %push-parser.
3858 * tests/headers.at (export YYLTYPE): Make yylex static, and don't
3859 prototype it in the module that calls yyparse.
3860 * tests/input.at (Torturing the Scanner): Likewise.
3861 * tests/local.at (AT_PUSH_IF): Check for %push-pull-parser as well.
3862
3863 2006-12-26 Joel E. Denny <jdenny@ces.clemson.edu>
3864
3865 Update etc/bench.pl. Optimize push mode a little (the yyn change
3866 deserves most of the credit).
3867 * Makefile.am (SUBDIRS): Add etc subdirectory.
3868 * configure.ac (AC_CONFIG_FILES): Add etc/bench.pl and etc/Makefile.
3869 * data/push.c (b4_declare_parser_state_variables): Move yyn, yyresult,
3870 yytoken, yyval, and yyloc declarations to...
3871 (yyparse or yypush_parse): ... here to improve performance. For
3872 yypush_parse invocations after the first, be sure to assign yyn its old
3873 value again.
3874 (yypstate_new): Don't bother initializing the yyresult field since the
3875 initial value isn't used.
3876 (yyn, yyresult, yytoken, yyval, yyloc): For each NAME in this list,
3877 remove the #define that, in push mode, set it to yyps->NAME.
3878 * etc/Makefile.am: New.
3879 * etc/bench.pl: Remove and build it instead from...
3880 * etc/bench.pl.in: ... this new file. Use @abs_top_builddir@ to invoke
3881 "tests/bison" from the build directory by default rather than just
3882 invoking "bison" from $PATH.
3883 (calc_grammar): Update push parser code: don't declare yylval globally,
3884 don't define yyparse_wrapper, and don't #define yyparse.
3885 (bench_grammar): Update to check all working combinations of yacc.c,
3886 push.c, impure, pure, pull, and push.
3887
3888 2006-12-25 Joel E. Denny <jdenny@ces.clemson.edu>
3889
3890 For push mode, add pull wrappers around yypush_parse.
3891 * data/push.c: (b4_generate_macro_args, b4_parenthesize): New macros.
3892 (yypull_parse): New function wrapping yypush_parse.
3893 (yyparse): New #define wrapping yypull_parse.
3894 * tests/calc.at (_AT_DATA_CALC_Y): Call yyparse even when %push-parser
3895 is declared.
3896 * tests/headers.at (export YYLTYPE): Make yylex global. For push mode,
3897 prototype yylex in the module that calls yyparse, and don't prototype
3898 yyparse there. Otherwise, the yyparse expansion won't compile.
3899 * tests/input.at (Torturing the Scanner): Likewise.
3900
3901 2006-12-25 Joel E. Denny <jdenny@ces.clemson.edu>
3902
3903 Enable push parsers to operate in impure mode. Thus, %push-parser no
3904 longer implies %pure-parser. The point of this change is to move
3905 towards being able to test the push parser code by running the entire
3906 test suite as if %push-parser had been declared.
3907 * data/push.c (yypush_parse): For impure mode, remove the
3908 yypushed_char, yypushed_val, and yypushed_loc arguments.
3909 Instead, declare these as local variables initialized to the global
3910 yychar, yylval, and yylloc.
3911 For the first yypush_parse invocation only, restore the initial values
3912 of these global variables when it's time to read a token since they
3913 have been overwritten.
3914 * src/parse-gram.y (prologue_declaration): Don't set pure_parser for
3915 %push-parser.
3916 * tests/calc.at (Simple LALR(1) Calculator): Always declare
3917 %pure-parser along with %push-parser since this test case was designed
3918 for pure push parsers.
3919 * tests/local.at (AT_PURE_OR_PUSH_IF): Remove unused.
3920 (AT_YACC_OR_PUSH_IF): New.
3921 (AT_YYERROR_SEES_LOC_IF): Fix enough that the test suite passes, but
3922 add a note that it's still wrong for some cases (as it has been for a
3923 while).
3924 (AT_PURE_LEX_IF): Use AT_PURE_IF instead of AT_PURE_OR_PUSH_IF since
3925 %push-parser no longer implies %pure-parser.
3926
3927 2006-12-20 Joel E. Denny <jdenny@ces.clemson.edu>
3928
3929 Remove some unnecessary differences between the pull parser code and
3930 the push parser code. This patch enables yynerrs in push mode.
3931 * data/push.c: Reformat M4 a little.
3932 (b4_yyerror_range): Remove and convert all uses to just yyerror_range.
3933 (b4_declare_scanner_communication_variables): Don't omit yynerrs just
3934 because push mode is on. Instead, if pure mode is on, move yynerrs
3935 to...
3936 (b4_declare_parser_state_variables): ... here.
3937 (yynerrs, yyerror_range): For push mode, #define each NAME in this list
3938 to yyps->NAME so it can be used in yypush_parse.
3939 (yypush_parse): Don't omit uses of yynerrs in push mode.
3940
3941 2006-12-20 Joel E. Denny <jdenny@ces.clemson.edu>
3942
3943 Fix bug such that the first pushed token's value and location are
3944 sometimes overwritten (sometimes by %initial-action) before being used.
3945 * data/push.c (yypush_parse): Rename arguments yynchar, yynlval, and
3946 yynlloc to yypushed_char, yypushed_val, and yypushed_loc for clarity.
3947 For the first yypush_parse invocation, initialize yychar to YYEMPTY to
3948 more closely mimic the pull parser logic.
3949 Don't copy the pushed token to yychar, yylval, and yylloc until it's
3950 time to read a token, which is after any initialization of yylval and
3951 yylloc.
3952 (gottoken): Rename label to...
3953 (yyread_pushed_token): ... for clarity and to avoid infringing on the
3954 user namespace.
3955
3956 2006-12-20 Joel E. Denny <jdenny@ces.clemson.edu>
3957
3958 Rearrange initialization of the parser state variables so that the
3959 skeleton doesn't have to have a copy for pull mode and another for push
3960 mode. This patch also fixes at least a bug such that yylloc was not
3961 initialized (with b4_location_initial_line and
3962 b4_location_initial_column) upon calling yypush_parse. However, that
3963 initialization now overwrites the first token's location;
3964 %initial-action assigning @$ already did the same thing, and both bugs
3965 will be fixed in a later patch.
3966 * data/push.c (b4_yyssa): Remove and convert all uses to just yyssa.
3967 (b4_declare_parser_state_variables): Remove initialization of yytoken,
3968 yyss, yyvs, yyls, and yystacksize.
3969 (yypstate_new): Remove initialization of some yypstate fields: yystate,
3970 yyerrstatus, yytoken, yyss, yyvs, yyls, yystacksize, yyssp, yyvsp, and
3971 yylsp.
3972 (yyssa, yyvsa, yylsa): For push mode, #define each NAME in this list to
3973 yyps->NAME so it can be used in yypush_parse.
3974 (yyparse or yypush_parse): For yypush_parse, don't print the
3975 "Starting parse" diagnostic for invocations after the first.
3976 Add initialization of yytoken, yyss, yyvs, yyls, and yystacksize; for
3977 yypush_parse, only do it for the first invocation.
3978 Allow yystate, yyerrstatus, yyssp, yyvsp, yylsp, and yylloc
3979 initialization to occur in yypush_parse but only on the first
3980 invocation.
3981
3982 2006-12-19 Joel E. Denny <jdenny@ces.clemson.edu>
3983
3984 * data/push.c: Add CPP guards around push parser declarations in both
3985 the header and the code file.
3986 In the code file, move the push parser declarations to the same place
3987 they appear in the header file.
3988 Clean up the M4 some, especially the inconsistent underquoting in
3989 some b4_c_function_def and b4_c_function_decl uses.
3990
3991 2006-12-19 Joel E. Denny <jdenny@ces.clemson.edu>
3992
3993 Encapsulate the push parser state variables into an M4 macro so the
3994 push skeleton doesn't have to list them again for pull mode's yyparse.
3995 For push mode, remove yypush_parse's local equivalents of these
3996 variables to eliminate unnecessary copying between the two sets at
3997 run-time. This patch also fixes at least a bug related to multiple
3998 %initial-action invocations in push mode.
3999 * data/push.c (b4_declare_parser_variables): Rename to...
4000 (b4_declare_scanner_communication_variables): ... this for clarity and
4001 update both uses.
4002 (b4_declare_yyparse_variables): Remove and move its contents to the one
4003 spot where it was invoked.
4004 (b4_declare_parser_state_variables): New macro containing the parser
4005 state variables required by push mode.
4006 (struct yypstate): Replace all fields but yynew with
4007 b4_declare_parser_state_variables.
4008 (yystate, yyn, yyresult, yyerrstatus, yytoken, yyss, yyssp, yyvs,
4009 yyvsp, yyls, yylsp, yystacksize, yyval, yyloc): For push mode, #define
4010 each NAME in this list to yyps->NAME so it can be used in yypush_parse.
4011 (yyparse or yypush_parse): For yyparse in pull mode, replace local
4012 parser state variable declarations with
4013 b4_declare_parser_state_variables.
4014 Don't initialize parser state variables when calling yypush_parse since
4015 yypstate_new already does that.
4016 Invoke the user's initial action only upon the first yypush_parse
4017 invocation.
4018 Remove all code that copies between the local parser state variables
4019 and the yypstate.
4020
4021 2006-12-19 Joel E. Denny <jdenny@ces.clemson.edu>
4022
4023 * data/push.c (union yyalloc): Rename yyss, yyvs, and yyls fields to
4024 prevent a name collision in a future patch where these names will
4025 sometimes be #define'd.
4026 (YYSTACK_RELOCATE): Add an argument to select a union yyalloc field
4027 since it no longer has the same name as the existing argument.
4028 (yyparse or yypush_parse): Update all uses of YYSTACK_RELOCATE.
4029
4030 2006-12-19 Paolo Bonzini <bonzini@gnu.org>
4031 and Joel E. Denny <jdenny@ces.clemson.edu>
4032
4033 * doc/bison.texinfo (Decl Summary): In the %language entry, mention
4034 that the argument is case-insensitive, and there's no `=' here.
4035 For the %skeleton entry, mention that %language is better.
4036 (Bison Options): Likewise for --language and --skeleton. Move the
4037 --skeleton entry so that the `Tuning the parser' section is sorted
4038 alphabetically on long options.
4039 (C++ Bison Interface): Don't use the word skeleton. Don't explain the
4040 %language directive in detail here; cross-reference the %language
4041 documentation instead.
4042 (Calc++ Parser): Use `%require "@value{VERSION}"' rather than
4043 `%require "2.3b"' so that the example is always up-to-date.
4044 (Table of Symbols): Add entries for %language and %skeleton.
4045 * examples/extexi (normalize): Instead of replacing every %require
4046 argument with the current Bison version, just substitute for
4047 `@value{VERSION}'. This guarantees that we're testing what actually
4048 appears in the documentation.
4049 * examples/calc++/Makefile.am ($(calc_extracted)): Use `$(VERSION)'
4050 rather than `@VERSION@'.
4051
4052 2006-12-18 Paul Eggert <eggert@cs.ucla.edu>
4053
4054 * NEWS: Reword the %language news a bit, and put it earlier.
4055
4056 * src/getargs.c (skeleton_arg): Last arg is now location const *.
4057 Rewrite to simplify the logic.
4058 (language_argmatch): Likewise.
4059 (program_name): We now own this var.
4060 * src/getargs.h (struct bison_language): Use char[] rather than
4061 const char *.
4062
4063 * doc/bison.texinfo (Decl Summary, Bison Options): Don't claim
4064 Java is supported.
4065 * src/complain.c (program_name): Remove decl; no longer needed.
4066 * src/main.c (program_name): Remove; now belongs to getargs.
4067
4068 2006-12-18 Paolo Bonzini <bonzini@gnu.org>
4069
4070 * NEWS: Document %language.
4071
4072 * data/Makefile.am (dist_pkgdata_DATA): Add c-skel.m4, c++-skel.m4.
4073
4074 * data/c-skel.m4, data/c++-skel.m4: New files.
4075 * data/glr.c: Complain on push parsers.
4076
4077 * doc/bison.texinfo (C++ Parser Interface): Prefer %language
4078 over %skeleton.
4079 (Decl Summary): Document %language and %skeleton.
4080 (Command line): Document -L.
4081
4082 * examples/extexi: Rewrite %require directive.
4083 * examples/calc++/Makefile.am: Pass VERSION to extexi.
4084
4085 * src/files.c (compute_exts_from_gc): Look in language structure
4086 for .y extension.
4087 (compute_file_name_parts): Check whether .tab should be added.
4088 * src/getargs.c (valid_languages, skeleton_prio, language_prio):
4089 (language, skeleton_arg, language_argmatch): New.
4090 (long_options): Add --language.
4091 (getargs): Use skeleton_arg, add -L/--language.
4092 * src/getargs.h: Include location.h.
4093 (struct bison_language, language, skeleton_arg, language_argmatch): New.
4094 * src/output.c (prepare): Pick default skeleton from struct language.
4095 Don't dispatch C skeletons here.
4096 * src/parse-gram.y (PERCENT_LANGUAGE): New.
4097 (prologue_declaration): Add "%language" rule, use skeleton_arg.
4098 * src/scan-gram.l ("%language"): New rule.
4099
4100 * tests/calc.at: Test %skeleton and %language.
4101 * tests/local.at (AT_SKEL_CC_IF): Look for %language.
4102 (AT_GLR_IF): Look for %skeleton "glr.cc".
4103 (AT_LALR1_CC_IF, AT_GLR_CC_IF): Rewrite.
4104 (AT_YACC_IF): Reject %language.
4105
4106 2006-12-18 Paul Eggert <eggert@cs.ucla.edu>
4107
4108 * src/symtab.h (struct semantic_type): Remove the tag 'semantic_type',
4109 since it wasn't used; only the typedef name 'semantic_type' is needed.
4110 Also, omit trailing white space.
4111
4112 * bootstrap: Sync from coreutils.
4113 (gnulib_extra_files): Add build-aux/announce.gen.
4114 (slurp): Adjust .gitignore files like .cvsignore files.
4115 * build-aux/announce-gen: Remove from CVS, since bootstrap
4116 now creates this.
4117
4118 2006-12-16 Joel E. Denny <jdenny@ces.clemson.edu>
4119
4120 Make %push-parser imply %pure-parser. This fixes several bugs; see
4121 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00148.html>.
4122 * src/parse-gram.y (prologue_declaration): For %push-parser, also set
4123 pure_parser = true.
4124 * data/push.c: Don't bother testing b4_push_if when deciding whether
4125 to expand b4_declare_parser_variables globally.
4126 (yypush_parse): Likewise in here.
4127
4128 * data/push.c (yypush_parse): Add b4_parse_param to arguments.
4129 (yy_reduce_print): Reformat M4 for readability.
4130
4131 2006-12-15 Bob Rossi <bob@brasko.net>
4132 and Joel Denny <jdenny@ces.clemson.edu>
4133
4134 * data/push.c (yypstate): Add typedef, and update all uses of
4135 struct yypstate to just yypstate.
4136 * tests/calc.at (_AT_DATA_CALC_Y): Update here as well.
4137
4138 2006-12-14 Bob Rossi <bob@brasko.net>
4139
4140 * data/push.c (yypush_parse): Declare prototype regardless of
4141 %locations option.
4142
4143 2006-12-14 Bob Rossi <bob@brasko.net>
4144
4145 * data/push.c (yyparse): Remove the prototype and the #define when in
4146 push-parser mode.
4147
4148 2006-12-13 Bob Rossi <bob@brasko.net>
4149
4150 * data/push.c (yypstate_init): Rename to...
4151 (yypstate_new): ... this and use b4_c_function_def.
4152 (yypstate_delete): New.
4153 (yypush_parse): Change parameters yynval and yynlloc to be const.
4154 * tests/calc.at (_AT_DATA_CALC_Y): Use new yypstate_new and
4155 yypstate_delete functions.
4156
4157 2006-12-13 Joel E. Denny <jdenny@ces.clemson.edu>
4158
4159 * configure.ac (AC_PREREQ): Require Autoconf 2.61 because of our
4160 strange test case titles. Reported by Bob Rossi.
4161
4162 2006-12-13 Paul Eggert <eggert@cs.ucla.edu>
4163
4164 * TODO: Add pointer to Sylvain Schmitz's work on static detection
4165 of potential ambiguities in GLR grammers.
4166
4167 2006-12-12 Joel E. Denny <jdenny@ces.clemson.edu>
4168
4169 * tests/testsuite.at (AT_CHECK): When checking if $1 starts with
4170 `bison ', use m4_index instead of m4_substr since chopping up a string
4171 containing M4-special characters causes problems here.
4172
4173 Fix a couple of bugs related to special characters in user-specified
4174 file names, and make it easier for skeletons to compute output file
4175 names with the same file name prefix as Bison-computed output file
4176 names.
4177 * data/glr.cc, data/push.c, data/yacc.c: In @output, use
4178 b4_parser_file_name and b4_spec_defines_file instead of
4179 @output_parser_name@ and @output_header_name@, which are now redundant.
4180 * data/glr.c, data/lalr1.cc: Likewise. Also, in header #include's, use
4181 b4_parser_file_name, b4_spec_defines_file, and the new
4182 @basename(FILENAME@) instead of @output_parser_name@ and
4183 @output_header_name@, which inappropriately escaped the file names as
4184 C string literals.
4185 * src/files.c (all_but_ext): Remove static qualifier.
4186 (compute_output_file_names): Move `free (all_but_ext)' to...
4187 (output_file_names_free): ... here since all_but_ext is needed later.
4188 * src/files.h (all_but_ext): Extern.
4189 * src/muscle_tab.h (MUSCLE_INSERT_STRING_RAW): New macro that does
4190 exactly what MUSCLE_INSERT_STRING used to do.
4191 (MUSCLE_INSERT_STRING): Use MUSCLE_OBSTACK_SGROW so that M4-special
4192 characters are escaped properly.
4193 * src/output.c (prepare): Define muscle file_name_all_but_ext as
4194 all_but_ext.
4195 For pkgdatadir muscle, maintain previous functionality by using
4196 MUSCLE_INSERT_STRING_RAW instead of MUSCLE_INSERT_STRING. The problem
4197 is that b4_pkgdatadir is used inside m4_include in the skeletons, so
4198 digraphs would never be expanded. Hopefully no one has M4-special
4199 characters in his Bison installation path.
4200 * src/scan-skel.l: Don't parse @output_header_name@ and
4201 @output_parser_name@ anymore since they're now redundant.
4202 In @output, use decode_at_digraphs.
4203 Parse a new @basename command that invokes last_component.
4204 (decode_at_digraphs): New.
4205 (BASE_QPUTS): Remove unused.
4206 * tests/output.at (AT_CHECK_OUTPUT_FILE_NAME): New macro.
4207 (Output file name): New tests.
4208
4209 2006-12-09 Joel E. Denny <jdenny@ces.clemson.edu>
4210
4211 Warn about output files that are generated by the skeletons and that
4212 conflict with other output files.
4213 * data/glr.c: Don't generate the header file here when glr.cc does.
4214 * src/files.c (file_names, file_names_count): New static globals.
4215 (compute_output_file_names): Invoke output_file_name_check for files
4216 not generated by the skeletons and remove existing checks.
4217 (output_file_name_check): New function that warns about conflicting
4218 output file names.
4219 (output_file_names_free): Free file_names.
4220 * src/files.h (output_file_name_check): Declare.
4221 * src/scan-skel.l: Invoke output_file_name_check for files generated by
4222 the skeletons.
4223 * tests/output.at (AT_CHECK_CONFLICTING_OUTPUT): New.
4224 (Conflicting output files): New tests.
4225
4226 2006-12-09 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
4227
4228 * doc/bison.texinfo: Fix a couple of typos.
4229
4230 2006-12-08 Bob Rossi <bob@brasko.net>
4231
4232 * data/push.c: (yypvarsinit, yypvars, struct yypvars, yypushparse):
4233 Rename to...
4234 (yypstate_init, yypstate, struct yypstate, yypush_parse): ... these and
4235 update all uses.
4236 (b4_yyssa, b4_yyerror_range, yypstate_init): Rename pv to yyps.
4237 (yypush_parse): Rename yypvars argument to yyps and remove redundant
4238 local pv.
4239 (yypstate_init, yypush_parse): Declare in Bison-generated header file.
4240 * tests/calc.at (_AT_DATA_CALC_Y): Use newly named functions.
4241
4242 2006-12-07 Bob Rossi <bob@brasko.net>
4243 and Joel Denny <jdenny@ces.clemson.edu>
4244
4245 * data/push.c (yypvarsinit): Change return type from void* to struct
4246 yypvars*. No longer cast to void* on return.
4247 (struct yypvars): Remove yylen since it need not be remembered between
4248 yypushparse invocations.
4249 (yypushparse): Don't copy between yylen and pv->yylen.
4250
4251 2006-12-05 Bob Rossi <bob@brasko.net>
4252
4253 * data/push.c (yychar_set, yylval_set, yylloc_set): Delete.
4254 (yypushparse): Add yynchar, yynlval, yynlloc parameters.
4255 (b4_declare_parser_variables): Do not declare yynerrs for push mode.
4256 (struct yypvars): Remove b4_declare_parser_variables.
4257 (yypvarsinit): Remove init code for removed variables.
4258 (global scope): Do not declare b4_declare_parser_variables if
4259 push or pure mode.
4260 (yypushparse): Add b4_declare_parser_variables.
4261 Init new local variables, and remove init code for removed
4262 yypvars variables.
4263 (yyparse): Delete.
4264 * tests/calc.at (_AT_DATA_CALC_Y): Call yypushparse for push mode
4265 and yyparse for other modes.
4266 (AT_CHECK_CALC_LALR): Added '%skeleton "push.c"' for push tests.
4267 * tests/local.at (AT_PUSH_IF, AT_PURE_OR_PUSH_IF): Added.
4268 (AT_YYERROR_SEES_LOC_IF): push-parser makes this false.
4269 (AT_PURE_LEX_IF): True if pure or push parser.
4270
4271 2006-12-05 Joel E. Denny <jdenny@ces.clemson.edu>
4272
4273 Document Yacc prologue alternatives and default %destructor's and
4274 %printer's as experimental. Don't mention Java yet. Discussed at
4275 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00002.html>.
4276 * NEWS (2.3a+): Say they're experimental. Remove any mention of Java.
4277 (2.3a): Annotate this entry to say the old forms of these features were
4278 also experimental.
4279 * doc/bison.texinfo (Prologue Alternatives, Freeing Discarded Symbols,
4280 Table of Symbols): Say they're experimental. Comment out any mention
4281 of Java (we'll want this back eventually).
4282
4283 2006-12-01 Joel E. Denny <jdenny@ces.clemson.edu>
4284
4285 Support a file name argument to %defines. Deprecate `=' in
4286 %file-prefix, %name-prefix, and %output. Discussed at
4287 <http://lists.gnu.org/archive/html/help-bison/2006-09/msg00001.html>.
4288 * NEWS (2.3a+): Mention.
4289 * doc/bison.texinfo (Decl Summary, Table of Symbols): Add entry for new
4290 form of %defines, and remove `=' from entries for %file-prefix,
4291 %name-prefix, and %output.
4292 * src/parse-gram.y (prologue_declaration): Implement.
4293 * tests/calc.at (Simple LALR Calculator, Simple GLR Calculator, Simple
4294 LALR1 C++ Calculator, Simple GLR C++ Calculator): Remove the `=' from
4295 all but one occurrence of %name-prefix.
4296 * tests/headers.at (export YYLTYPE): Remove the `=' from %name-prefix.
4297 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Likewise.
4298 * tests/output.at (AT_CHECK_OUTPUT): Remove the `=' from all but one
4299 occurrence of each of %file-prefix and %output. Add check for %defines
4300 with argument.
4301 * tests/reduce.at (Useless Terminals, Useless Nonterminals,
4302 Useless Rules, Reduced Automaton, Underivable Rules, Empty Language):
4303 Remove the `=' from %output.
4304
4305 2006-11-21 Joel E. Denny <jdenny@ces.clemson.edu>
4306
4307 Don't escape $ in test case titles since Autoconf 2.61 now does that
4308 correctly.
4309 * tests/actions.at (Default %printer and %destructor are not for error
4310 or $undefined): Here.
4311 (Default %printer and %destructor are not for $accept): Here.
4312 * tests/input.at (Invalid $n and @n): Here.
4313
4314 2006-11-20 Joel E. Denny <jdenny@ces.clemson.edu>
4315
4316 Rename <!> to <>. Discussed starting at
4317 <http://lists.gnu.org/archive/html/bison-patches/2006-11/msg00039.html>.
4318 * NEWS (2.3a+): Update.
4319 * doc/bison.texinfo (Freeing Discarded Symbols, Table of Symbols):
4320 Update.
4321 * src/parse-gram.y (TYPE_TAG_NONE, generic_symlist_item): Implement.
4322 * src/scan-gram.l (INITIAL): Implement.
4323 * src/symlist.c (symbol_list_default_tagless_new): Update comment.
4324 * src/symlist.h (symbol_list, symbol_list_default_tagless_new): Update
4325 comment.
4326 * tests/actions.at (Default tagless %printer and %destructor,
4327 Default tagged and per-type %printer and %destructor,
4328 Default %printer and %destructor are not for error or $undefined,
4329 Default %printer and %destructor are not for $accept,
4330 Default %printer and %destructor for mid-rule values): Update.
4331 * tests/input.at (Default %printer and %destructor redeclared,
4332 Unused values with default %destructor): Update.
4333
4334 2006-11-17 Joel E. Denny <jdenny@ces.clemson.edu>
4335
4336 Don't let %prec take a nonterminal.
4337 * src/reader.c (grammar_current_rule_prec_set): Make the %prec symbol a
4338 token.
4339 * tests/input.at (%prec takes a token): New test checking that %prec
4340 won't take a nonterminal.
4341
4342 2006-11-10 Joel E. Denny <jdenny@ces.clemson.edu>
4343
4344 * tests/testsuite.at (AT_CHECK): Don't miss an exit value of 0 because
4345 it was double-quoted.
4346 * src/Makefile.am (YACC): Use --warnings=all,error so that Bison's own
4347 grammar is maintained with Bison's highest standards.
4348 * src/getargs.c: Fix some typos in Doxygen comments.
4349
4350 2006-11-10 Joel E. Denny <jdenny@ces.clemson.edu>
4351
4352 Fix memory leaks in scanners generated by at least Flex 2.5.9 and
4353 later. Reported by Paul Eggert in
4354 <http://lists.gnu.org/archive/html/bison-patches/2006-11/msg00014.html>.
4355 * src/flex-scanner.h (yylex_destroy): Define for Flex before 2.5.9.
4356 * src/scan-code.l (translate_action): Don't bother invoking
4357 yy_delete_buffer (YY_CURRENT_BUFFER) before creating the first buffer.
4358 (code_scanner_free): Instead of invoking
4359 yy_delete_buffer (YY_CURRENT_BUFFER) directly, invoke yylex_destroy,
4360 which frees more.
4361 * src/scan-gram.l (gram_scanner_free): Likewise.
4362 * src/scan-skel.l (scan_skel): Likewise.
4363
4364 2006-11-09 Joel E. Denny <jdenny@ces.clemson.edu>
4365
4366 * src/files.c (tr): Change return type to void.
4367 * src/muscle_tab.c (muscle_insert): Free storage in case muscle_grow
4368 has been called previously for the same key.
4369 (muscle_find): Return storage instead of value so that
4370 --enable-gcc-warnings doesn't produce warnings that the return discards
4371 const. aver that the value and storage are the same since storage
4372 could potentially be NULL when value is not.
4373 * tests/testsuite.at (AT_CHECK): Treat an unspecified exit value the
4374 same as 0.
4375
4376 2006-11-08 Paul Eggert <eggert@cs.ucla.edu>
4377
4378 * bootstrap.conf (excluded_files): Exclude m4/codeset.m4 (undoing
4379 the earlier change today), m4/intl.m4, m4/intldir.m4. This gives
4380 us a slightly cleaner distribution, and also works.
4381 * m4/.cvsignore: Add inline.m4, wint_t.m4 to accommodate recent
4382 gnulib changes.
4383
4384 2006-11-08 Joel E. Denny <jdenny@ces.clemson.edu>
4385 and Paul Eggert <eggert@cs.ucla.edu>
4386
4387 Don't let Bison leak memory except when it complains.
4388 * src/files.h (parser_file_name, spec_verbose_file, spec_graph_file):
4389 (spec_defines_file, dir_prefix): Now char *, not const char *,
4390 since they are freed.
4391 * src/files.c: Likewise.
4392 (all_but_ext, all_but_tab_ext, src_extension, header_extension):
4393 Likewise.
4394 (tr): Now operates in-place. All uses changed.
4395 (compute_exts_from_gf, compute_exts_from_src): Don't leak temporary
4396 values.
4397 (compute_file_name_parts, compute_output_file_names): Don't store
4398 read-only data in variables that will be freed.
4399 (compute_output_file_names): Free all_but_ext, all_but_tab_ext,
4400 src_extension, and header_extension.
4401 (output_file_names_free): New public function to free
4402 spec_verbose_file, spec_graph_file, spec_defines_file,
4403 parser_file_name, and dir_prefix.
4404 * src/getargs.c (getargs): Don't store read-only data in variables that
4405 will be freed.
4406 * src/main.c (main): Invoke output_file_names_free, code_scanner_free
4407 (which previously existed but was unused), and quotearg_free.
4408 * src/muscle_tab.h (muscle_insert): value arg is now a `char const *'.
4409 * src/muscle_tab.c: Likewise.
4410 (muscle_entry): Make the value char const *,
4411 and add a new storage member that is char * and can be freed.
4412 (muscle_entry_free): New private function.
4413 (muscle_init): Use it instead of free.
4414 (muscle_insert, muscle_grow): Update and use new storage member.
4415 (muscle_code_grow): Free the string passed to muscle_grow
4416 since it's not needed anymore.
4417 * src/parse-gram.y (%union): Make `chars' member a `char const *', and
4418 add a new `char *code' member.
4419 ("{...}"): Declare semantic type as code.
4420 * src/scan-code.h (translate_rule_action):
4421 (translate_symbol_action, translate_code, translate_action): Return
4422 `char const *' rather than `char *' since external code should not free
4423 these strings.
4424 * src/scan-code.l: Likewise.
4425 * src/scan-gram.l (<SC_BRACED_CODE>): Use val->code for BRACED_CODE,
4426 which is "{...}" in the parser.
4427 * tests/Makefile.am (maintainer-check-valgrind): Set
4428 VALGRIND_OPTS='--leak-check=full --show-reacheable=yes' before invoking
4429 Valgrind.
4430 * tests/calc.at (_AT_DATA_CALC_Y): fclose the FILE* so Valgrind doesn't
4431 complain.
4432 * tests/testsuite.at (AT_CHECK): Redefine so that running Bison and
4433 expecting a non-zero exit status sets --leak-check=summary and
4434 --show-reachable=no for Valgrind. Bison unabashedly leaks memory in
4435 this case, and we don't want to hear about it.
4436
4437 2006-11-08 Paul Eggert <eggert@cs.ucla.edu>
4438
4439 * bootstrap (runtime-po/Makevars): Derive from po/Makevars
4440 instead of from the template, to simplify configuration a bit.
4441 * bootstrap.conf (excluded_files): Don't exclude m4/codeset.m4
4442 and m4/wint_t.m4, as they are needed with the latest gnulib.
4443
4444 2006-10-31 Joel E. Denny <jdenny@ces.clemson.edu>
4445
4446 Disable unset/unused mid-rule value warnings by default, and recognize
4447 --warnings=midrule-values to enable them. Discussed starting at
4448 <http://lists.gnu.org/archive/html/help-bison/2006-10/msg00030.html>.
4449 * NEWS (2.3a+): Mention.
4450 * src/getargs.c, src/getargs.h (warnings_args, warnings_types, enum
4451 warnings): Add entry for midrule-values subargument.
4452 * src/reader.c (symbol_should_be_used): Don't return true just because
4453 the value is a set/used mid-rule value unless
4454 --warnings=midrule-values was specified.
4455 * tests/input.at (Unused values, Unused values before symbol
4456 declarations): Run tests with and without --warnings=midrule-values.
4457
4458 * src/reader.c (check_and_convert_grammar): Use symbol_list_free rather
4459 than LIST_FREE directly.
4460
4461 2006-10-31 Joel E. Denny <jdenny@ces.clemson.edu>
4462
4463 Finish implementing --warnings=error, which should not be implied by
4464 --warnings=all (or by its synonyms -W and --warnings without
4465 subarguments).
4466 * src/complain.c (set_warning_issued): New function to report that
4467 warnings are being treated as errors and to record an error if so.
4468 Invoke...
4469 (warn_at, warn): ... here.
4470 * src/getargs.c (warnings_args, warnings_types): Reorder so that
4471 "error - warnings are errors" does not appear above "all - all of the
4472 above".
4473 (getargs): For -W and --warnings without subarguments, don't let
4474 FLAGS_ARGMATCH set warnings_error in warnings_flag.
4475 * src/getargs.h (enum warnings): Unset warnings_error in warnings_all.
4476
4477 2006-10-31 Joel E. Denny <jdenny@ces.clemson.edu>
4478
4479 * src/getargs.c (flags_argmatch): Don't cause segmentation fault for
4480 empty subargument list. For example: `bison --warnings= parser.y'.
4481
4482 2006-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
4483
4484 * data/push.c, data/yacc.c: Make sure there's a newline at the end of
4485 the parser header file so that gcc doesn't warn.
4486
4487 2006-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
4488
4489 Split the default %destructor/%printer into two kinds: <*> and <!>.
4490 Discussed starting at
4491 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00060.html>.
4492 * NEWS (2.3a+): Mention.
4493 * doc/bison.texinfo (Freeing Discarded Symbols): Document this and the
4494 previous change today related to mid-rules.
4495 (Table of Symbols): Remove %symbol-default and add <*> and <!>.
4496 * src/parse-gram.y (PERCENT_SYMBOL_DEFAULT): Remove.
4497 (TYPE_TAG_ANY): Add as <*>.
4498 (TYPE_TAG_NONE): Add as <!>.
4499 (generic_symlist_item): Remove RHS for %symbol-default and add RHS's
4500 for <*> and <!>.
4501 * src/scan-gram.l (PERCENT_SYMBOL_DEFAULT): Remove.
4502 (TYPE_TAG_ANY, TYPE_TAG_NONE): Add.
4503 * src/symlist.c (symbol_list_default_new): Split into tagged and
4504 tagless versions.
4505 (symbol_list_destructor_set, symbol_list_printer_set): Split
4506 SYMLIST_DEFAULT case into SYMLIST_DEFAULT_TAGGED and
4507 SYMLIST_DEFAULT_TAGLESS.
4508 * src/symlist.h: Update symbol_list_default*_new prototypes.
4509 (symbol_list.content_type): Split enum value SYMLIST_DEFAULT into
4510 SYMLIST_DEFAULT_TAGGED and SYMLIST_DEFAULT_TAGLESS.
4511 * src/symtab.c (default_destructor, default_destructor_location,
4512 default_printer, default_printer_location): Split each into tagged and
4513 tagless versions.
4514 (symbol_destructor_get, symbol_destructor_location_get,
4515 symbol_printer_get, symbol_printer_location_get): Implement tagged
4516 default and tagless default cases.
4517 (default_destructor_set, default_printer_set): Split each into tagged
4518 and tagless versions.
4519 * src/symtab.h: Update prototypes.
4520 * tests/actions.at (Default %printer and %destructor): Rename to...
4521 (Default tagless %printer and %destructor): ... this, and extend.
4522 (Per-type %printer and %destructor): Rename to...
4523 (Default tagged and per-type %printer and %destructor): ... this, and
4524 extend.
4525 (Default %printer and %destructor for user-defined end token): Extend.
4526 (Default %printer and %destructor are not for error or $undefined):
4527 Update.
4528 (Default %printer and %destructor are not for $accept): Update.
4529 (Default %printer and %destructor for mid-rule values): Extend.
4530 * tests/input.at (Default %printer and %destructor redeclared): Extend.
4531 (Unused values with default %destructor): Extend.
4532
4533 2006-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
4534
4535 Don't apply the default %destructor/%printer to an unreferenced midrule
4536 value. Mentioned at
4537 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00104.html>.
4538 * src/symtab.c (dummy_symbol_get): Name all dummy symbols initially
4539 like $@n instead of just @n so that the default %destructor/%printer
4540 logic doesn't see them as user-defined symbols.
4541 (symbol_is_dummy): Check for both forms of the name.
4542 * src/reader.c (packgram): Remove the `$' from each midrule symbol
4543 name for which the midrule value is referenced in any action.
4544 * tests/actions.at (Default %printer and %destructor for mid-rule
4545 values): New test.
4546 * tests/regression.at (Rule Line Numbers, Web2c Report): Update output
4547 for change to dummy symbol names.
4548
4549 2006-10-20 Joel E. Denny <jdenny@ces.clemson.edu>
4550
4551 Warn about unset midrule $$ if the corresponding $n is used.
4552 * src/reader.c (symbol_should_be_used): Check midrule parent rule for
4553 $n usage.
4554 (packgram): Before invoking grammar_rule_check on any rule, make sure
4555 all actions have already been scanned in order to set `used' flags.
4556 Otherwise, checking that a midrule's $$ is set will not always work
4557 properly because the midrule check must forward-reference the midrule's
4558 parent rule.
4559 * tests/input.at (AT_CHECK_UNUSED_VALUES): Extend to check the new
4560 warning.
4561
4562 2006-10-20 Joel E. Denny <jdenny@ces.clemson.edu>
4563
4564 More improvements to the documentation of the prologue alternatives:
4565 * NEWS (2.3a+): Mention the new `Prologue Alternatives' section in the
4566 Bison manual.
4567 * doc/bison.texinfo (Prologue Alternatives): Correct some errors. Add
4568 some text to clarify the relative importance of the new directives and
4569 to show how these directives may be viewed as code labels.
4570
4571 2006-10-16 Joel E. Denny <jdenny@ces.clemson.edu>
4572
4573 Similar to the recently removed %before-header, add %code-top as the
4574 alternative to the pre-prologue. Mentioned at
4575 <http://lists.gnu.org/archive/html/bison-patches/2006-10/msg00063.html>.
4576 Also, let the prologue alternatives appear in the grammar section.
4577 * src/parse-gram.y (PERCENT_CODE_TOP): New token.
4578 (prologue_declaration): Move the existing prologue alternatives to...
4579 (grammar_declaration): ... here and add %code-top.
4580 * src/scan-gram.l (PERCENT_CODE_TOP): New token.
4581
4582 Clean up and extend documentation for the prologue alternatives.
4583 * NEWS (2.3a+): Describe prologue alternatives.
4584 * doc/bison.texinfo (Prologue): Move discussion of prologue
4585 alternatives to...
4586 (Prologue Alternatives): ... this new section, and extend it to discuss
4587 all 4 directives in detail.
4588 (Table of Symbols): Clean up discussion of prologue alternatives and
4589 add %code-top.
4590
4591 2006-10-16 Juan Manuel Guerrero <juan.guerrero@gmx.de>
4592
4593 DJGPP specific issues.
4594
4595 * djgpp/config.bat: config.hin has been moved to lib. Adjust
4596 config.bat accordingly.
4597 * djgpp/config.sed: Adjust config.sed for the use of autoconf 2.60.
4598 * djgpp/config.site: Likewise.
4599
4600 2006-10-16 Paolo Bonzini <bonzini@gnu.org>
4601
4602 Replace %*-header with %provides, %requires, %code. See discussion at
4603 http://lists.gnu.org/archive/html/bison-patches/2006-10/msg00002.html
4604
4605 * data/bison.m4 (b4_user_requires, b4_user_provides): New.
4606 (b4_user_start_header): Remove.
4607 * data/glr.c: Use new macros instead of b4_*start_header
4608 and b4_*end_header.
4609 * data/glr.cc: Likewise.
4610 * data/lalr1.cc: Likewise.
4611 * data/push.c: Likewise.
4612 * data/yacc.c: Likewise.
4613
4614 * doc/bison.texinfo: Remove %before-header, rename
4615 %{start,end,after}-header to %requires, %provides, %code.
4616
4617 * src/parse-gram.y: Likewise (also rename token names accordingly).
4618 * src/scan-gram.l: Likewise.
4619 * tests/actions.at: Likewise.
4620
4621 2006-10-14 Paul Eggert <eggert@cs.ucla.edu>
4622
4623 * lib/Makefile.am (AM_CFLAGS): Remove $(WERROR_CFLAGS).
4624 Problem reported by Joel E. Denny.
4625
4626 2006-10-14 Jim Meyering <jim@meyering.net>
4627
4628 (Sync from coreutils.)
4629 Work also when the working directory (with e.g. coreutils sources)
4630 is version controlled with git, rather than CVS.
4631 * bootstrap (CVS_only_file): Test for the existence of README-cvs,
4632 rather than CVS.
4633 In messages and comments, say e.g., "checked-out sources",
4634 rather than "CVS sources".
4635 (version_controlled_file): New function. Work for git as well as
4636 for CVS. Don't use grep's -q option.
4637 (slurp): Call it here, in place of CVS-specific code.
4638
4639 2006-10-14 Joel E. Denny <jdenny@ces.clemson.edu>
4640
4641 Fix testsuite for ./configure --enable-gcc-warnings:
4642 * configure.ac (gcc-warnings): Move -Wall before -Wno-sign-compare.
4643 Otherwise, gcc 4.1.0 (at least) warns about sign comparisons in
4644 __AT_CHECK_PRINTER_AND_DESTRUCTOR in tests/actions.at.
4645 * test/input.at (Torturing the Scanner): #include <stdlib.h> for abort.
4646 * test/regression.at (Diagnostic that expects two alternatives):
4647 Likewise.
4648
4649 2006-10-12 Paul Eggert <eggert@cs.ucla.edu>
4650
4651 * bootstrap.conf (gnulib_modules): Add config-h.
4652 * djgpp/subpipe.c: Include <config.h> unconditionally; don't
4653 worry about HAVE_CONFIG_H.
4654 * lib/abitset.c: Likewise.
4655 * lib/bitset.c: Likewise.
4656 * lib/bitset_stats.c: Likewise.
4657 * lib/bitsetv-print.c: Likewise.
4658 * lib/bitsetv.c: Likewise.
4659 * lib/ebitset.c: Likewise.
4660 * lib/get-errno.c: Likewise.
4661 * lib/lbitset.c: Likewise.
4662 * lib/subpipe.c: Likewise.
4663 * lib/timevar.c: Likewise.
4664 * lib/vbitset.c: Likewise.
4665 * lib/bitset.c: Include "bitset.h" first, to test interface.
4666 * lib/bitset_stats.c: Include "bitset_stats.h" first.
4667 * lib/bitsetv-print.c: Include "bitsetv-print.h" first.
4668 * lib/bitsetv.c: Include "bitsetv.h" first.
4669 * lib/get-errno.c: Include "get-errno.h" first.
4670 * m4/.cvsignore: Add config-h.m4.
4671 * tests/actions.at (Default %printer and %destructor for ...):
4672 Adjust expected line numbers in output to reflect removal of #if
4673 HAVE_CONFIG_H lines.
4674 * tests/glr-regression.at (Missed %merge type warnings when ...):
4675 Likewise.
4676 * tests/regression.at (Braced code in declaration in rules section):
4677 Likewise.
4678 * tests/atlocal.in (CPPFLAGS): Don't define HAVE_CONFIG_H.
4679 * tests/local.at (AT_DATA_GRAMMAR_PROLOGUE):
4680 Include <config.h> unconditionally.
4681
4682 * bootstrap: Sync from coreutils, as follows:
4683
4684 2006-10-11 Paul Eggert <eggert@cs.ucla.edu>
4685
4686 * bootstrap (symlink_to_gnulib): Fix bug: the dot_dots shell
4687 variable was sometimes used without being initialized. This
4688 messed up the installation of the INSTALL file in some cases.
4689
4690 2006-10-09 Paul Eggert <eggert@cs.ucla.edu>
4691
4692 * bootstrap (usage, main program, symlink_to_gnulib): Add option
4693 --copy. Inspired by a suggestion from Bruno Haible.
4694
4695 2006-10-03 Jim Meyering <jim@meyering.net>
4696
4697 * bootstrap: Undo last change to this file, since now gnulib-tool
4698 sticks with the automake default in generating dependencies.
4699
4700 2006-10-12 Paul Eggert <eggert@cs.ucla.edu>
4701
4702 * configure.ac: Use AC_PROG_CC_STDC; this is more modern than
4703 the old AC_PROG_CC / AM_PROG_CC_STDC combination.
4704
4705 * doc/bison.1: Add copyright notice.
4706
4707 * data/glr.c: Don't include <stdarg.h>; not used.
4708
4709 * NEWS: The -g and --graph options now output graphs in Graphviz
4710 DOT format, not VCG format.
4711 * doc/bison.1: Likewise.
4712 * doc/bison.texinfo (Understanding, Bison Options): Likewise.
4713 * THANKS: Add Satya Kiran Popuri, who proposed the initial version
4714 of this change in
4715 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00158.html>.
4716 * TODO: Remove Graphviz entry.
4717 * src/Makefile.am (bison_SOURCES): Add graphviz.c and graphviz.h;
4718 remove vcg.c, vcg.h, vcg_defaults.h.
4719 * src/vcg.c, src/vcg.h, src/vcg_defaults.h: Remove.
4720 * src/graphviz.c, src/graphviz.h: New files.
4721 * src/files.c (compute_output_file_names): Output .dot, not .vcg.
4722 * src/files.h: Make comment more generic.
4723 * src/main.c (main): Likewise.
4724 * src/print_graph.h: Likewise.
4725 * src/getargs.c (usage): Make usage description more generic.
4726 * src/print_graph.c: Include graphviz.h rather than vcg.h.
4727 (static_graph, fgraph): Remove. All uses changed to pass
4728 arguments instead of sharing a static var.
4729 (print_core, print_actions, print_state, print_graph):
4730 Output graphviz format rather than VCG format.
4731 * tests/.cvsignore: Remove *.vcg; add *.dot.
4732 * tests/output.at: Expect *.dot files, not *.vcg files.
4733
4734 * data/Makefile.am (dist_pkgdata_DATA): Add bison.m4; this
4735 accommodates the 2006-10-08 change.
4736
4737 2006-10-11 Bob Rossi <bob@brasko.net>
4738
4739 * data/push.c (yypushparse, yypvarsinit, yypvars): Wrap in b4_push_if.
4740 (b4_yyssa, b4_yyerror_range): New macros.
4741 (struct yypvars): Remove yyssa_ptr and yyerror_range_ptr fields.
4742 (yypvarsinit): Remove init of removed fields.
4743 (yypushparse): Remove use of removed fields; use new macros instead.
4744
4745 2006-10-11 Paul Eggert <eggert@cs.ucla.edu>
4746
4747 * data/push.c (yypushparse): Fix memory leak if yymsg is malloced
4748 in a push parser. Reindent slightly to match yacc.c better.
4749
4750 2006-10-11 Bob Rossi <bob@brasko.net>
4751
4752 * data/push.c (struct yypvars): Remove yymsgbuf, yymsgbuf_ptr, yymsg,
4753 yymsg_alloc fields.
4754 (yypvarsinit, yypushparse): Remove init of removed fields.
4755 (yypushparse): Use yymsgbuf instead of yymsgbuf_ptr.
4756
4757 2006-10-09 Paul Eggert <eggert@cs.ucla.edu>
4758
4759 * THANKS: Add Paolo Bonzini and Bob Rossi.
4760
4761 2006-10-08 Paolo Bonzini <bonzini@gnu.org>
4762
4763 * data/c.m4 (b4_copyright, b4_epilogue, b4_location_initial_column,
4764 b4_location_initial_line, p4_parse_param, b4_ints_in, b4_flag_if,
4765 b4_define_flag_if and uses, b4_basename, b4_syncline, b4_user_code,
4766 b4_define_user_cde and uses): Remove.
4767 (b4_comment, b4_prefix, b4_sync_start): New.
4768 * data/bison.m4: New file, with most of the content removed from c.m4.
4769 * src/muscle_tab.h: Use "do {...} while(0)" throughout.
4770 * src/output.c (output_skeleton): Pass bison.m4.
4771 (prepare): Pass glr_flag and nondeterministic_flag. Pass prefix
4772 only if specified.
4773
4774 2006-10-05 Paul Eggert <eggert@cs.ucla.edu>
4775
4776 Fix test failure reported by Tom Lane in
4777 <http://lists.gnu.org/archive/html/bug-bison/2006-10/msg00000.html>
4778 and try to make such failures easier to catch in the future.
4779 * data/glr.c (YYTRANSLATE): Don't check for nonpositive arg;
4780 that's now the caller's responsibility.
4781 (yyprocessOneStack, yyrecoverSyntaxError, yyparse):
4782 Set yychar = YYEOF if it's negative.
4783 * tests/actions.at (yylex): Abort if asked to read past EOF.
4784 * tests/conflicts.at (yylex): Likewise.
4785 * tests/cxx-type.at (yylex): Likewise.
4786 * tests/glr-regression.at (yylex): Likewise.
4787 * tests/input.at (yylex): Likewise.
4788 * tests/regression.at (yylex): Likewise.
4789 * tests/torture.at (yylex): Likewise.
4790
4791 2006-10-01 Paul Eggert <eggert@cs.ucla.edu>
4792
4793 Fix problems with translating English-language diagnostics.
4794 * bootstrap: Fix bug introduced in recent bootstrap changes, with
4795 respect to bison-runtime pot generation. The YY_ stuff
4796 wasn't being captured.
4797 * bootstrap.conf (XGETTEXT_OPTIONS_RUNTIME): New var.
4798 * po/POTFILES.in: Add src/location.c, src/scan-code.l.
4799 * runtime-po/POTFILES.in: Add data/push.c.
4800
4801 2006-09-29 Paul Eggert <eggert@cs.ucla.edu>
4802
4803 Merge bootstrap changes from coreutils.
4804
4805 2006-09-28 Jim Meyering <jim@meyering.net>
4806
4807 Automatically generated dependencies are important even
4808 when all of the sources in a directory come from gnulib.
4809 * bootstrap (gnulib_tool): Remove the "no-dependencies" automake
4810 option that gnulib-tool adds to what becomes our lib/gnulib.mk.
4811
4812 2006-09-23 Jim Meyering <jim@meyering.net>
4813
4814 * bootstrap (gnulib_tool_options): Add "--local-dir gl".
4815
4816 2006-09-20 Paul Eggert <eggert@cs.ucla.edu>
4817
4818 * bootstrap: Add support for --force.
4819 (usage): New function. Describe usage less tersely.
4820 (CVS_only_file): New var.
4821
4822 2006-09-21 Paul Eggert <eggert@cs.ucla.edu>
4823
4824 * data/push.c (YYPUSH_MORE): Make it an enum instead.
4825 (yypushparse): Use YYPUSH_MORE instead of the mystery constant.
4826 Adjust white space and comments to match GNU style better.
4827
4828 2006-09-20 Bob Rossi <bob@brasko.net>
4829
4830 * data/push.c (yyresult_get): Remove function.
4831 (YYPUSH_MORE): Add #define.
4832 (yypushparse): Modify return value.
4833
4834 2006-09-20 Paul Eggert <eggert@cs.ucla.edu>
4835
4836 * stamp-h.in: Remove; no longer needed.
4837 * .cvsignore: Replace autom4te.cache and config.cache with *.cache.
4838 Remove config.h, config.hin, intl (no longer created).
4839 * lib/.cvsignore: Add config.h, config.hin, configmake.h, inttypes.h,
4840 stamp-h1.
4841
4842 Sync bootstrap from coreutils, as follows:
4843
4844 2006-09-18 Paul Eggert <eggert@cs.ucla.edu>
4845
4846 * bootstrap (symlink_to_gnulib): New function.
4847 (cp_mark_as_generated): Use it, to prefer symlinks-to-gnulib
4848 to copies-of-gnulib.
4849 (cp_mark_as_generated, slurp, gnulib_files):
4850 Avoid making a copy if it's the same as the old version.
4851 (gnulib_files): Add support for this variable (used by Bison).
4852
4853 2006-09-20 Paul Eggert <eggert@cs.ucla.edu>
4854
4855 * src/getargs.c (usage): Rework to use conventions similar to
4856 coreutils, to make translation a bit easier and the code a bit
4857 smaller. Problem reported by Tim Van Holder.
4858
4859 2006-09-15 Paul Eggert <eggert@cs.ucla.edu>
4860
4861 Use some of gnulib's new modules, taken from coreutils.
4862
4863 * bootstrap: Sync from coreutils, except add support for gnulib_files.
4864 * bootstrap.conf: New file.
4865 (gnulib_modules): Add configmake, inttypes, unistd.
4866 (XGETTEXT_OPTIONS): Add complain, complain_at,
4867 fatal, fatal_at, warn, warn_at, unexpected_end.
4868 * configure.ac (AC_CONFIG_HEADERS): config.h is now in lib, not here.
4869 (gl_USE_SYSTEM_EXTENSIONS): Remove; gl_EARLY now does this.
4870 (gl_EARLY): Add.
4871 (AM_STDBOOL_H): Remove; gl_INIT now dows this.
4872 (gl_INIT): Add
4873 (GNULIB_AUTOCONF_SNIPPET): Remove.
4874 (AM_GNU_GETTEXT): Add; require formatstring macros since that's
4875 the pickiest.
4876 * lib/.cvsignore: Add inttypes_.h.
4877 * lib/Makefile.am: Include gnulib.mk first so we can append to it.
4878 (AM_CFLAGS): Add WERROR_CFLAGS, to be more like coreutils.
4879 (BUILT_SOURCES, EXTRA_DIST, MOSTLYCLEANFILES): Remove
4880 no-longer-necessary initializations.
4881 (lib_SOURCES): Remove, replacing by libbison_a_SOURCES.
4882 * lib/subpipe.c: Include <unistd.h> unconditionally, now that we
4883 use the unistd module.
4884 * src/system.h: Likewise.
4885 * m4/.cvsignore: Remove *_gl.m4, gnulib.m4, inttypes_h.m4, uintmax_t.m4,
4886 ulonglong.m4. Add gettext.m4, gnulib-cache.m4, gnulib-comp.m4,
4887 gnulib-tool.m4, inttypes-h.m4, inttypes-pri.m4, inttypes.m4.
4888 * src/Makefile.am (DEFS): Remove, since configmake does this for us.
4889 (AM_CPPFLAGS): Remove -I../lib, since Automake does that for us.
4890 * src/system.h: Include inttypes.h unconditionally, now that we
4891 use the inttypes module. Don't bother to include stdint.h, since
4892 inttypes.h now does that for us.
4893 (LOCALEDIR): Remove, now that we use the configmake module.
4894 * src/getargs.c: Include configmake.h.
4895 * src/main.c: Likewise.
4896 * src/output.c: Likewise.
4897 * tests/atlocal.in (CPPFLAGS): Include from $abs_top_builddir/lib,
4898 not from $abs_top_builddir, since config.h moved.
4899
4900
4901 Port to GCC 2.95. First two problems reported by Michael Deutschmann in
4902 <http://lists.gnu.org/archive/html/bug-bison/2006-09/msg00018.html>.
4903
4904 * src/parse-gram.y (symbol_declaration): Don't put statements
4905 before declarations; it's not portable to C89.
4906 * src/scan-code.l (handle_action_at): Likewise.
4907
4908 * src/scan-code.l: Always initialize braces_level; the old code
4909 left it uninitialized and therefore had undefined behavior.
4910
4911 Don't attempt to redefine 'assert', since it runs afoul of
4912 systems where standard headers (mistakenly) include <assert.h>.
4913 Instead, define and use our own alternative, called 'aver'.
4914 * src/reader.c: Don't include assert.h, since we no longer
4915 use assert.
4916 * src/scan-code.l: Likewise.
4917 * src/system.h (assert): Remove, replacing with....
4918 (aver): New function, taking a bool arg. All uses changed.
4919 * src/tables.c (pack_vector): Ensure that aver arg is bool,
4920 not merely an integer.
4921
4922 2006-09-15 Bob Rossi <bob@brasko.net>
4923
4924 * data/Makefile.am (dist_pkgdata_DATA): Add push.c.
4925 * data/c.m4 (YYPUSH): New.
4926 (b4_push_if): New macro. Use it instead of #ifdef YYPUSH.
4927 * src/getargs.c (push_parser): New var.
4928 * src/getargs.h (push_parser): New declaration.
4929 * src/output.c (prepare): Add macro insertion of `push_flag'.
4930 * src/parse-gram.y (PERCENT_PUSH_PARSER): New token.
4931 (prologue_declaration): Parse %push-parser.
4932 * src/scan-gram.l: Scan new PERCENT_PUSH_PARSER token.
4933 * tests/calc.at (_AT_CHECK_CALC_ERROR): Add "Return" and "Now" to
4934 list of removed lines from the traces observed.
4935 (AT_CHECK_CALC_LALR): Added push parser tests.
4936
4937 2006-09-13 Paul Eggert <eggert@cs.ucla.edu>
4938
4939 * NEWS: Version 2.3a.
4940 * configure.ac (AC_INIT): Likewise.
4941
4942 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Remove
4943 "#define YYSTYPE int" that caused "make maintainer-check" to fail
4944 due to header ordering dependencies. I don't know why the #define
4945 was there.
4946
4947 Fix glr.cc and lalr1.cc's use of YYDEBUG so that there's zero
4948 runtime cost when YYDEBUG is not defined, and so that some tests
4949 that used to fail now work. Problem and initial suggestion by
4950 Paolo Bonzini.
4951 * data/c++.m4 (b4_parse_param_cons): Omit leading ','.
4952 * data/glr.cc (b4_parser_class_name):
4953 Initialize yycdebug_ only if YYDEBUG. Also, initialize yydebug_.
4954 (debug_level, set_debug_level): Affect yydebug_, not ::yydebug.
4955 (yydebug_) [YYDEBUG]: New member.
4956 (yycdebug_): Now defined only if YYDEBUG.
4957 * data/lalr1.cc (yydebug_, yycdebug_): Now defined only if YYDEBUG.
4958 (YYCDEBUG) [!YYDEBUG]: Don't use yydebug_ and yycdebug_.
4959 (b4_parser_class_name): Initialize yydebug_ and yycdebug_ only
4960 if YYYDEBUG.
4961 (debug_stream, set_debug_stream, debug_level, set_debug_level):
4962 Define only if YYDEBUG.
4963 * tests/calc.at (_AT_DATA_CALC_Y) [!YYDEBUG]: Omit call to
4964 set_debug_level.
4965 * tests/regression.at (_AT_DATA_DANCER_Y) [!YYDEBUG]: Likewise.
4966 * tests/calc.at (AT_CHECK_CALC_GLR_CC): Uncomment calls to
4967 AT_CHECK_CALC_GLR_CC that are working now.
4968
4969 2006-09-12 Paul Eggert <eggert@cs.ucla.edu>
4970
4971 * data/glr.cc (YYERROR_VERBOSE, YYTOKEN_TABLE): Remove.
4972 We don't need them in glr.cc, and glr.c defines them.
4973 Defining YYERROR_VERBOSE to 0 here breaks glr.c, since glr.c
4974 assumes that defining it to anything is the same as defining
4975 it to 1. Problem reported by Paolo Bonzini.
4976
4977 2006-09-12 Paolo Bonzini <bonzini@gnu.org> (tiny change)
4978
4979 * data/c.m4 (b4_null, b4_case): Define.
4980 * src/output.c (prepare_symbols): Use b4_null.
4981 (user_actions_output): Use b4_case.
4982
4983 2006-09-11 Paul Eggert <eggert@cs.ucla.edu>
4984
4985 * data/glr.c (b4_shared_declarations): Put start-header first,
4986 before any #includes that we generate, so that feature-test
4987 macros work. Problem reported by Michael Deutschmann in
4988 <http://lists.gnu.org/archive/html/bug-bison/2006-09/msg00004.html>.
4989 * data/lalr1.cc: Likewise.
4990 * doc/bison.texinfo (Prologue): Document that feature-test macros
4991 should be defined before any Bison declarations.
4992 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Put defns
4993 that depend on location.hh after, not before, Bison decls, since
4994 we now include location.hh after the first user prologue.
4995
4996 * doc/bison.texinfo (Calc++ Parser): Fix memory leak reported by
4997 Sander Brandenburg in
4998 <http://lists.gnu.org/archive/html/bug-bison/2006-09/msg00002.html>.
4999 Also, fix minor white space and comment issues.
5000 (Prologue): Mention that it's better to define feature-test macros
5001 before Bison declarations. Problem reported by Michael Deutschmann.
5002
5003 * README-cvs: Fix typo: "&" should be "&&". Problem reported
5004 by Jim Meyering.
5005 * m4/.cvsignore: Add argmatch.m4. Remove obstack.m4, strerror_r.m4.
5006 This adjusts to recent gnulib changes.
5007
5008 2006-09-04 Joel E. Denny <jdenny@ces.clemson.edu>
5009
5010 Finish implementation of per-type %destructor/%printer. Discussed
5011 starting at
5012 <http://lists.gnu.org/archive/html/bison-patches/2006-02/msg00064.html>
5013 and
5014 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00091.html>.
5015 * NEWS (2.3+): Add a description of this feature to the default
5016 %destructor/%printer description.
5017 * doc/bison.texinfo (Freeing Discarded Symbols): Likewise.
5018 * src/symlist.c (symbol_list_destructor_set, symbol_list_printer_set):
5019 Invoke semantic_type_destructor_set or semantic_type_printer_set when a
5020 list node contains a semantic type.
5021 * src/symtab.c, src/symtab.h: Extend with a table that associates
5022 semantic types with their %destructor's and %printer's.
5023 (semantic_type_from_uniqstr, semantic_type_get,
5024 semantic_type_destructor_set, semantic_type_printer_set): New functions
5025 composing the public interface of that table.
5026 (symbol_destructor_get, symbol_destructor_location_get,
5027 symbol_printer_get, symbol_printer_location_get): If there's no
5028 per-symbol %destructor/%printer, look up the per-type before trying
5029 the default.
5030 * tests/actions.at (Per-type %printer and %destructor): New test case.
5031 * tests/input.at (Default %printer and %destructor redeclared):
5032 Extend to check that multiple occurrences of %symbol-default in a
5033 single %destructor/%printer declaration is an error.
5034 (Per-type %printer and %destructor redeclared, Unused values with
5035 per-type %destructor): New test cases.
5036
5037 2006-09-04 Joel E. Denny <jdenny@ces.clemson.edu>
5038
5039 Require default %destructor/%printer to be declared using
5040 %symbol-default instead of an empty symbol list, and start working on
5041 new per-type %destructor/%printer. Discussed at
5042 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00007.html>.
5043 * NEWS (2.3+): Add %symbol-default to example.
5044 * bison.texinfo (Freeing Discarded Symbols): Likewise.
5045 (Table of Symbols): Add entry for %symbol-default.
5046 * src/parse-gram.y (PERCENT_SYMBOL_DEFAULT): New token.
5047 (generic_symlist, generic_symlist_item): New nonterminals for creating
5048 a list in which each item is a symbol, semantic type, or
5049 %symbol-default.
5050 (grammar_declaration): Use generic_symlist in %destructor and %printer
5051 declarations instead of symbols.1 or an empty list.
5052 (symbol_declaration, precedence_declaration, symbols.1): Update actions
5053 for changes to symbol_list.
5054 * src/reader.c: Update for changes to symbol_list.
5055 * src/scan-code.l: Likewise.
5056 * src/scan-gram.l: Scan new PERCENT_SYMBOL_DEFAULT token.
5057 * src/symlist.c, src/symlist.h: Extend such that a list node may
5058 represent a semantic type or a %symbol-default in addition to just an
5059 ordinary symbol. Add switched functions for setting %destructor's and
5060 %printer's.
5061 * tests/actions.at, tests/input.at: Add %symbol-default to all default
5062 %destructor/%printer declarations.
5063
5064 2006-08-23 Joel E. Denny <jdenny@ces.clemson.edu>
5065
5066 Whether the default %destructor/%printer applies to a particular symbol
5067 isn't a question of whether the user *declares* that symbol (in %token,
5068 for example). It's a question of whether the user by any means
5069 *defines* the symbol at all (by simply using a char token, for
5070 example). $end is defined by Bison whereas any other token with token
5071 number 0 is defined by the user. The error token is always defined by
5072 Bison regardless of whether the user declares it with %token, but we
5073 may one day let the user define error as a nonterminal instead.
5074 * NEWS (2.3+): Say "user-defined" instead of "user-declared".
5075 * doc/bison.texinfo (Freeing Discarded Symbols): Likewise, and document
5076 the meaning of "user-defined".
5077 * tests/actions.at (Default %printer and %destructor for user-declared
5078 end token): Rename to...
5079 (Default %printer and %destructor for user-defined end token): ...
5080 this.
5081
5082 * src/symtab.c (symbol_destructor_get, symbol_printer_get): In the
5083 computation of whether to apply the default, don't maintain a list of
5084 every Bison-defined symbol. Instead, just check for a first character
5085 of '$', which a user symbol cannot have, and check for the error token.
5086
5087 2006-08-21 Joel E. Denny <jdenny@ces.clemson.edu>
5088
5089 Don't apply the default %destructor or %printer to the error token,
5090 $undefined, or $accept. This change fits the general rule that the
5091 default %destructor and %printer are only for user-declared symbols,
5092 and it solves several difficulties that are described in the new test
5093 cases listed below.
5094 * src/symtab.c (symbol_destructor_get, symbol_printer_get): Implement.
5095 * tests/actions.at (Default %printer and %destructor are not for error
5096 or $undefined, Default %printer and %destructor are not for $accept):
5097 New test cases.
5098
5099 2006-08-19 Joel E. Denny <jdenny@ces.clemson.edu>
5100
5101 Allow %start after the first rule.
5102 * src/reader.c (grammar_current_rule_begin): Don't set the start symbol
5103 when parsing the first rule.
5104 (check_and_convert_grammar): Search for it here after all grammar
5105 declarations have been parsed. Skip midrules, which have dummy LHS
5106 nonterminals.
5107 * src/symtab.c (symbol_is_dummy): New function.
5108 * src/symtab.h (symbol_is_dummy): Declare it.
5109 * tests/input.at (%start after first rule): New test.
5110
5111 2006-08-18 Joel E. Denny <jdenny@ces.clemson.edu>
5112
5113 Redo some of the previous commit: add back the ability to use
5114 non-aliased/undeclared string literals since it might be useful to
5115 those declaring %token-table.
5116 * src/reader.c (check_and_convert_grammar): Undo changes in previous
5117 commit: don't worry about complaints from symbols_pack.
5118 * src/symtab.c (symbol_new, symbol_class_set,
5119 symbol_check_alias_consistency): Undo changes in previous commit: count
5120 each string literal as a new symbol and token, assign it a symbol
5121 number, and don't complain about non-aliased string literals.
5122 (symbols_pack): Since symbol_make_alias still does not decrement symbol
5123 and token counts but does still set aliased tokens to the same number,
5124 symbol_pack_processor now leaves empty slots in the symbols array.
5125 Remove those slots.
5126 * tests/regression.at (Undeclared string literal): Remove test case
5127 added in previous commit since non-aliased string literals are allowed
5128 again.
5129 (Characters Escapes, Web2c Actions): Undo changes in previous commit:
5130 remove unnecessary string literal declarations.
5131 * tests/sets.at (Firsts): Likewise.
5132
5133 2006-08-18 Joel E. Denny <jdenny@ces.clemson.edu>
5134
5135 Don't allow an undeclared string literal, but allow a string literal to
5136 be used before its declaration.
5137 * src/reader.c (check_and_convert_grammar): Don't invoke packgram if
5138 symbols_pack complained.
5139 * src/symtab.c (symbol_new): Don't count a string literal as a new
5140 symbol.
5141 (symbol_class_set): Don't count a string literal as a new token, and
5142 don't assign it a symbol number since symbol_make_alias does that.
5143 (symbol_make_alias): It's not necessary to decrement the symbol and
5144 token counts anymore. Don't assume that an alias declaration occurs
5145 before any uses of the identifier or string, and thus don't assert that
5146 one of them has the highest symbol number so far.
5147 (symbol_check_alias_consistency): Complain if there's a string literal
5148 that wasn't declared as an alias.
5149 (symbols_pack): Bail if symbol_check_alias_consistency failed since
5150 symbol_pack asserts that every token has been assigned a symbol number
5151 although undeclared string literals have not.
5152 * tests/regression.at (String alias declared after use, Undeclared
5153 string literal): New test cases.
5154 (Characters Escapes, Web2c Actions): Declare string literals as
5155 aliases.
5156 * tests/sets.at (Firsts): Likewise.
5157
5158 2006-08-14 Joel E. Denny <jdenny@ces.clemson.edu>
5159
5160 In the grammar scanner, STRING_FINISH unclosed constructs and return
5161 them to the parser in order to improve error messages.
5162 * src/scan-gram.l (SC_ESCAPED_STRING, SC_ESCAPED_CHARACTER,
5163 SC_BRACED_CODE, SC_PROLOGUE): Implement.
5164 * tests/input.at (Unclosed constructs): New test case.
5165 * tests/regression.at (Invalid inputs): Update now that unclosed %{ is
5166 seen.
5167
5168 * src/scan-gram.h, src/scan-gram.l (gram_last_braced_code_loc): Remove
5169 unused global.
5170
5171 2006-08-13 Joel E. Denny <jdenny@ces.clemson.edu>
5172
5173 Handle string aliases for character tokens correctly.
5174 * src/symtab.c (symbol_user_token_number_set): If the token has an
5175 alias, check and set its alias's user token number instead of its own,
5176 which is set to indicate the alias. Previously, every occurrence of
5177 the character token in the grammar overwrote that alias indicator with
5178 the character code.
5179 * tests/input.at (String aliases for character tokens): New test.
5180
5181 2006-08-12 Joel E. Denny <jdenny@ces.clemson.edu>
5182
5183 * src/parse-gram.y: Add `%expect 0' so we don't overlook conflicts.
5184
5185 2006-08-11 Paul Eggert <eggert@cs.ucla.edu>
5186
5187 * bootstrap: Put in need-ngettext argument to AM_GNU_GETTEXT,
5188 to prevent failures when building on older platforms.
5189 Check for autopoint failure.
5190 Set XGETTEXT_OPTIONS to values that check for C format strings,
5191 so that translators are warned about them (this also helps
5192 prevent core dumps).
5193
5194 * lib/subpipe.c (create_subpipe): Use new gnulib pipe_safer
5195 function, since it simplifies our code a bit.
5196
5197 * configure.ac (AC_ARG_ENABLE): Use -Wextra -Wno-sign-compare
5198 rather than -W, so we don't get bogus warnings about sign comparisons.
5199 Add -Wpointer-arith, since that warning is useful (it reports code
5200 that does not conform to C89 and that some compilers reject).
5201 * data/c.m4, data/glr.c, data/lalr1.cc, data/yacc.c: Undo latest change,
5202 since it's no longer needed.
5203
5204 2006-08-10 Joel E. Denny <jdenny@ces.clemson.edu>
5205
5206 Clean up scanners a bit.
5207 * src/flex-scanner.h (FLEX_NO_OBSTACK): New macro that blocks obstack
5208 definitions so gcc won't warn when obstack_for_string is unused.
5209 * src/scan-code.l: config.h and system.h are already #include'd by
5210 scan-code-c.c, so get rid of them here.
5211 * src/scan-gram.l: Likewise.
5212 * src/scan-skel.l: Likewise, and use flex-scanner.h without obstack
5213 definitions rather than duplicating the rest of it.
5214 * src/scan-gram-c.c, scan-skel-c.c: #include "system.h".
5215
5216 2006-08-09 Joel E. Denny <jdenny@ces.clemson.edu>
5217
5218 Suppress signed/unsigned comparison warnings for yycheck.
5219 * data/c.m4 (b4_safest_int_type): New macro.
5220 * data/glr.c, data/lalr1.cc: Wherever you compare yycheck[i] against
5221 a signed int type, cast it to b4_safest_int_type first.
5222 * data/yacc.c: Likewise.
5223 (b4_safest_int_type): Overwrite the one from c.m4 since b4_int_type is
5224 also overwritten.
5225
5226 2006-08-09 Ralf Wildenhues <Ralf.Wildenhues@gmx.de> (tiny change)
5227
5228 * doc/bison.texinfo: Fix some typos.
5229
5230 2006-08-02 Paul Eggert <eggert@cs.ucla.edu>
5231
5232 * m4/.cvsignore: Add inttypes_h.m4,lib-ld.m4, lib-prefix.m4,
5233 po.m4, stdint_h.m4, uintmax_t.m4, ulonglong.m4, warning.m4.
5234
5235 * bootstrap (gnulib_tool): Stop using --assume-autoconf;
5236 the latest gnulib does this a different way.
5237 (get_translations): Sharuzzaman Ahmat Raslan reported that the ms
5238 translation was patched, so stop omitting it.
5239
5240 2006-07-29 Joel E. Denny <jdenny@ces.clemson.edu>
5241
5242 Enable declaration of default %printer/%destructor. Make the parser
5243 use these for all user-declared grammar symbols for which the user does
5244 not declare a specific %printer/%destructor. Thus, the parser uses it
5245 for token 0 if the user declares it but not if Bison generates it as
5246 $end. Discussed starting at
5247 <http://lists.gnu.org/archive/html/bison-patches/2006-02/msg00064.html>,
5248 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00091.html>,
5249 and
5250 <http://lists.gnu.org/archive/html/bison-patches/2006-07/msg00019.html>.
5251 * NEWS (2.3+): Mention.
5252 * doc/bison.texinfo (Actions in Mid-Rule): It's no longer impossible to
5253 declare a %destructor for a mid-rule's semantic value. It's just
5254 impossible to declare one specific to it.
5255 (Freeing Discarded Symbols): Mention that @$ can be used in %destructor
5256 code. Describe default %destructor form.
5257 * src/parse-gram.y (grammar_declaration): Parse default
5258 %printer/%destructor declarations.
5259 * src/output.c (symbol_destructors_output): Use symbol_destructor_get
5260 and symbol_destructor_location_get rather than accessing the destructor
5261 and destructor_location members of struct symbol.
5262 (symbol_printers_output): Likewise but for %printer's.
5263 * src/reader.c (symbol_should_be_used): Likewise but for %destructor's
5264 again.
5265 * src/symtab.c (default_destructor, default_destructor_location,
5266 default_printer, default_printer_location): New static global
5267 variables to record the default %destructor and %printer.
5268 (symbol_destructor_get, symbol_destructor_location_get,
5269 symbol_printer_get, symbol_printer_location_get): New functions to
5270 compute the appropriate %destructor and %printer for a symbol.
5271 (default_destructor_set, default_printer_set): New functions to set the
5272 default %destructor and %printer.
5273 * src/symtab.h: Prototype all those new functions.
5274 * tests/actions.at (Default %printer and %destructor): New test to
5275 check that the right %printer and %destructor are called, that they're
5276 not called for $end, and that $$ and @$ work correctly.
5277 (Default %printer and %destructor for user-declared end token): New
5278 test to check that the default %printer and %destructor are called for
5279 a user-declared end token.
5280 * tests/input.at (Default %printer and %destructor redeclared, Unused
5281 values with default %destructor): New tests to check related grammar
5282 warnings and errors.
5283
5284 2006-07-29 Joel E. Denny <jdenny@ces.clemson.edu>
5285
5286 Clean up handling of %destructor for the end token (token 0).
5287 Discussed starting at
5288 <http://lists.gnu.org/archive/html/bison-patches/2006-07/msg00019.html>
5289 and
5290 <http://lists.gnu.org/archive/html/help-bison/2006-07/msg00013.html>.
5291
5292 Make the skeletons consistent in how they pop the end token and invoke
5293 its %destructor.
5294 * data/glr.c (yyrecoverSyntaxError, yyparse): Don't pop the start
5295 state, which has token number 0, since this would invoke the
5296 %destructor for the end token.
5297 * data/lalr1.cc (yy::parser::parse): Don't check for the final state
5298 until after shifting the end token, or else it won't be popped.
5299 * data/yacc.c (yyparse): Likewise.
5300
5301 * data/glr.c (yyparse): Clear the lookahead after shifting it even when
5302 it's the end token. Upon termination, destroy an unshifted lookahead
5303 even when it's the end token.
5304 * data/lalr1.cc (yy::parser::parse): Likewise.
5305 * data/yacc.c (yyparse): Likewise.
5306
5307 * src/reader.c (packgram): Don't check rule 0. This suppresses unused
5308 value warnings for the end token when the user gives the end token a
5309 %destructor.
5310
5311 * tests/actions.at (Printers and Destructors): Test all the above.
5312
5313 2006-07-24 Paul Eggert <eggert@cs.ucla.edu>
5314
5315 Update to latest gnulib and gettext versions.
5316 * bootstrap (gnulib-modules): Remove hard-locale, stdio-safer.
5317 Add fopen-safer.
5318 (gnulib_files): Add m4/warning.m4. Don't worry about files
5319 overwritten by autopoint.
5320 Replace gt_INTL_SUBDIR_CORE with an empty body in m4/gettext_gl.m4.
5321 Suppress "id", "ms", "tr" translations for now, since gettext 0.15
5322 rejects them.
5323 Don't use autoreconf; instead, invoke autopoint etc. by hand,
5324 so that we can remove the intl files at a better time.
5325 (intl_files_to_remove): Remove aclocal.m4, since it gets
5326 rebuilt anyway. Remove m4/inttypes_h.m4, m4/inttypes.m4,
5327 m4/isc-posix.m4, m4/lib-ld.m4, m4/lib-prefix.m4, m4/po.m4,
5328 m4/stdint_h.m4, m4/uintmax_t.m4, m4/ulonglong.m4.
5329 Add m4/inttypes-h.m4, m4/lock.m4, m4/visibility.m4.
5330 Remove datarootdir hack; no longer needed.
5331 * configure.ac: Use gl_WARNING_CFLAGS rather than BISON_WARNING.
5332 (AM_GNU_GETTEXT_VERSION): Bump from 0.12 to 0.15.
5333 * lib/.cvsignore: Remove hard-locale.c, hard-locale.h, strdup.c,
5334 strdup.h.
5335 * m4/.cvsignore: Remove hard-locale.m4, strdup.m4.
5336 * m4/warning.m4: Remove from CVS, since we now use gnulib's version.
5337
5338 2006-07-20 Paul Eggert <eggert@cs.ucla.edu>
5339
5340 * bootstrap: Adjust to today's change to gnulib-tool by invoking
5341 it with --assume-autoconf='latest-stable'.
5342
5343 2006-07-13 Joel E. Denny <jdenny@ces.clemson.edu>
5344
5345 * src/parse-gram.y (grammar_declaration): Don't confuse Doxygen (at
5346 least 1.4.7 and 1.4.4) by putting a #line between `typedef union
5347 YYSTYPE' and `{'.
5348 * src/muscle_tab.h (muscle_grow): Replace the header comments with
5349 those from muscle_tab.c since the old ones are misleading.
5350
5351 2006-07-13 Akim Demaille <akim@epita.fr>
5352
5353 Support %define "KEY" {VALUE}.
5354 * src/scan-code.h, src/scan-code.l (translate_action)
5355 (translate_rule_action, translate_symbol_action, translate_code):
5356 Return char *, not const char *.
5357 * src/parse-gram.y (declaration): Rename as...
5358 (prologue_declaration): this.
5359 (string_content): Remove this nonterminal, use STRING.
5360 (braceless, content, content.opt): New nonterminal.
5361 Use them.
5362 (%define): Now accept content.opt, i.e., accept also BRACED_CODE
5363 as value.
5364 * src/scan-gram.l (getargs.h): Don't include it.
5365
5366 2006-07-12 Paul Eggert <eggert@cs.ucla.edu>
5367
5368 * data/lalr1.cc (YYCDEBUG): Use 'if (yydebug_) (*yycdebug_)'
5369 rather than a for-loop that declares a local bool variable. This
5370 should work around a compatibility problem with a Cray x1e C++
5371 compiler reported by Hung Nguyen in
5372 <http://lists.gnu.org/archive/html/help-bison/2006-07/msg00022.html>.
5373 The for-loop was introduced in the 2004-11-17 change but I don't
5374 know why it was needed.
5375
5376 2006-07-12 Akim Demaille <akim@epita.fr>
5377
5378 * data/c.m4: Comment changes.
5379
5380 2006-07-10 Akim Demaille <akim@lrde.epita.fr>
5381
5382 * src/complain.c (error_message, ERROR_MESSAGE): New.
5383 To factor...
5384 (fatal_at, fatal, warn_at, warn, complain_at, complain): these.
5385 * src/complain.h, src/complain.c (warning_issued): Remove, unused.
5386
5387 2006-07-09 Paul Eggert <eggert@cs.ucla.edu>
5388
5389 * NEWS: Instead of %union, you can define and use your own union type
5390 YYSTYPE if your grammar contains at least one <type> tag.
5391 Your YYSTYPE need not be a macro; it can be a typedef.
5392 * doc/bison.texinfo (Value Type, Multiple Types, Location Type):
5393 (Union Decl, Decl Summary): Document this.
5394 * data/glr.c (YYSTYPE): Implement this.
5395 * data/glr.cc (YYSTYPE): Likewise.
5396 * data/lalr1.cc (YYSTYPE): Likewise.
5397 * data/yacc.c (YYSTYPE): Likewise.
5398 * src/output.c (prepare): Output tag_seen_flag.
5399 * src/parse-gram.y (declaration, grammar_declaration):
5400 Use 'union_seen' rather than 'typed' to determine whether
5401 %union has been seen, since grammars can now be typed without
5402 %union.
5403 (symbol_declaration, type.opt, symbol_def):
5404 Keep track of whether a tag has been seen.
5405 * src/reader.c (union_seen, tag_seen): New vars.
5406 (typed): remove.
5407 * src/reader.h (union_seen, tag_seen, typed): Likewise.
5408 * src/scan-code.l (untyped_var_seen): New variable.
5409 (handle_action_dollar): Adjust to above changes.
5410 (handle_action_dollar, handle_action_at):
5411 Improve overflow checking for outlandish numbers.
5412 * tests/input.at (AT_CHECK_UNUSED_VALUES): Redo test to
5413 avoid new diagnostics generated by above changes.
5414 * tests/regression.at (YYSTYPE typedef): Add test to check
5415 for type tags without %union.
5416
5417 * src/symlist.c (symbol_list_length): Return int, not unsigned
5418 int, since callers expect int. This may need to get revisited
5419 once we have proper integer overflow checking.
5420
5421 * src/scan-gram.h (gram_scanner_cursor): Remove decl, since this
5422 object is now static.
5423
5424 * src/getargs.c (flags_argmatch): Return void, not int,
5425 to pacify ./configure --enable-gcc-warnings.
5426
5427 * src/flex-scanner.h (STRING_FREE): Don't use FLEX_PREFIX (last_string)
5428 since last_string is already defined to FLEX_PREFIX (last_string).
5429
5430 2006-07-09 Akim Demaille <akim@lrde.epita.fr>
5431
5432 Implement --warnings/-W.
5433 * src/getargs.c (report_argmatch, trace_argmatch): Remove,
5434 replaced by...
5435 (flags_argmatch, FLAGS_ARGMATCH): this new function and macro.
5436 Adjust callers.
5437 * src/getargs.h, src/getargs.c (warnings, warnings_flags)
5438 (warnings_args, warnings_types): New.
5439 (getargs, short_options, long_options): Accept -W/--warnings.
5440 Sort the options by alphabetical order, upper case letter right
5441 before its lower case.
5442
5443 2006-07-09 Joel E. Denny <jdenny@ces.clemson.edu>
5444
5445 Change %merge result type clash warnings to errors. Discussed at
5446 <http://lists.gnu.org/archive/html/bison-patches/2006-07/msg00026.html>.
5447 * src/reader.c (record_merge_function_type): Use complain_at.
5448 * tests/glr-regression.at (Missed %merge type warnings when LHS type is
5449 declared later): Update test case results.
5450
5451 2006-07-09 Akim Demaille <akim@lrde.epita.fr>
5452
5453 * src/getargs.h, src/getargs.c: Swap --report and --trace handling
5454 to be in alphabetical order.
5455 (trace_args): Spelling fixes.
5456
5457 2006-07-09 Paul Eggert <eggert@cs.ucla.edu>
5458
5459 * data/yacc.c (YYID, yy_stack_print): Prefix local vars with "yy"
5460 so they don't collide with user-defined macros.
5461 (yy_stack_print): Don't assume that yytype_int16 promotes to int;
5462 this was never guaranteed, and now that we're using gnulib stdint,
5463 which defines int_fast16_t to long int, the problem is exposed.
5464
5465 2006-07-08 Paul Eggert <eggert@cs.ucla.edu>
5466
5467 * data/c.m4 (b4_basename): Simplify a bit, since we don't
5468 need the full POSIX semantics (and weren't implementing them
5469 anyway).
5470
5471 Adjust to Autoconf 2.60 and today's gnulib.
5472 * bootstrap (gnulib_modules): Add stdint.
5473 Remove special case for m4/onceonly_2_57.m4, since gnulib-tool
5474 no longer copies it.
5475 (intl_files_to_remove): Remove m4/longlong.m4 and m4/wchar_t.m4,
5476 since stdint needs the former and wcwidth (which is now required
5477 by mbswidth) needs the latter.
5478 Append 'datarootdir = @datarootdir@' to po/Makefile.in.in, to
5479 work around a compatibility glitch between gettext 0.14.6 and
5480 Autoconf 2.60.
5481 * configure.ac (AC_PREREQ): Require Autoconf 2.60.
5482 Do not check for uintptr_t, since new stdint module does the right
5483 thing.
5484 * lib/.cvsignore: Remove alloca.c, alloca.h, alloca_.h.
5485 Add stdint.h, stdint_.h, wcwidth.h.
5486 * m4/.cvsignore: Remove alloca.m4, onceonly.m4.
5487 Add absolute-header.m4, double-slash-root.m4, longlong.m4,
5488 stdint.m4, wchar_t.m4, wcwidth.m4.
5489 * src/files.c: Include <dirname.h> and <stdio-safer.h> in the
5490 usual order for ../lib/*.h files.
5491 (file_name_split): Use last_component, not base_name, to adjust
5492 to gnulib changes.
5493 * src/parse-gram.h: Include <strverscmp.h> in the usual order
5494 for ../lib/*.h files.
5495 (YYTYPE_INT16, YYTYPE_INT8, YYTYPE_UINT16, YYTYPE_UINT8):
5496 Define unconditionally, since we now assume the stdint module.
5497 * src/scan-skel.l: Include <dirname.h>.
5498 (BASE_QPUTS): Use last_component, not base_name.
5499 * src/system.h: Include <unlocked-io.h> in the usual order
5500 for ../lib/*.h files. Include <stdint.h> unconditionally,
5501 since we now use the stdint module.
5502 (uintptr_t): Declare if UINTPTR_MAX is not defined, not
5503 HAVE_UINTPTR_T, since we now use the stdint module.
5504 (base_name): Remove decl, since files now include <dirname.h>
5505 to get the decl.
5506
5507 2006-07-08 Akim Demaille <akim@lrde.epita.fr>
5508
5509 * data/c.m4 (b4_location_initial_column, b4_location_initial_line):
5510 New, default to 1.
5511 * data/yacc.c, data/glr.c, data/location.cc: Use them.
5512 * NEWS, doc/bison.texinfo: The initial column and line are 1 by
5513 default.
5514 * tests/calc.at: Adjust.
5515
5516 2006-07-08 Akim Demaille <akim@lrde.epita.fr>
5517
5518 * data/c.m4 (b4_basename): New.
5519 (b4_syncline): Also output the location of its invocation (from
5520 the skeleton).
5521 (b4_user_action, b4_define_user_action, b4_user_actions)
5522 (b4_user_initial_action, b4_user_post_prologue, b4_user_start_header)
5523 (b4_user_stype): New.
5524 * data/yacc.c, data/glr.c, data/lalr1.cc, data/glr.cc: Use them.
5525
5526 2006-07-07 Joel E. Denny <jdenny@ces.clemson.edu>
5527
5528 In the grammar file, the first column is 1 not 0 on the first line as
5529 on every other line.
5530 * src/parse-gram.y (%initial-action): Initialize @$ correctly.
5531 * tests/input.at (Torturing the Scanner): Update output.
5532
5533 * src/scan-gram.l (scanner_cursor): Declare it static.
5534
5535 2006-07-07 Joel E. Denny <jdenny@ces.clemson.edu>
5536
5537 In warnings, say "previous declaration" rather than "first
5538 declaration".
5539 * src/symtab.c (redeclaration): Do that here.
5540 * src/reader.c (record_merge_function_type): In the case of a result
5541 type clash, report the previous declaration rather than the very first
5542 one in the grammar file.
5543 * tests/glr-regression.at (Missed %merge type warnings when LHS type is
5544 declared later): Add a third declaration to check this behavior.
5545 * tests/input.at (Incompatible Aliases): Update output.
5546
5547 2006-06-27 Akim Demaille <akim@epita.fr>
5548
5549 * doc/Doxyfile.in: New.
5550 * doc/Makefile.am: Use it.
5551 * src/lalr.h, src/symtab.h: Initial doxygenation.
5552
5553 2006-06-26 Joel E. Denny <jdenny@ces.clemson.edu>
5554
5555 Don't miss %merge result type warnings just because the LHS types are
5556 declared after the %merge. This continues the effort of the previous
5557 patch.
5558 * src/reader.c (get_merge_function): Don't set the merger type yet.
5559 (record_merge_function_type): New function for setting the merger type
5560 and checking for clashes.
5561 (grammar_current_rule_merge_set): Set the location of the %merge for
5562 the current rule.
5563 (packgram): Invoke record_merge_function_type for each rule now that
5564 all symbol type declarations have been parsed.
5565 * src/reader.h (merger_list.type_declaration_location): New member
5566 storing the location of the first %merge from which the type for this
5567 merging function was derived.
5568 * src/symlist.h (symbol_list.merger_declaration_location): New member
5569 storing the location of a rule's %merge, if any.
5570 * tests/glr-regression.at (Missed %merge type warnings when LHS type is
5571 declared later): New test to catch the error fixed by the above patch.
5572
5573 2006-06-26 Joel E. Denny <jdenny@ces.clemson.edu>
5574
5575 Get action warnings (grammar_rule_check) right even when symbol
5576 declarations appear after the rules. Discussed at
5577 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00108.html>
5578 and
5579 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00151.html>.
5580 Don't mistake the type of $$ in a midrule to be that of its parent
5581 rule's $$.
5582 * src/reader.c (grammar_current_rule_end): Don't invoke
5583 grammar_rule_check yet since not all symbol declarations may have been
5584 parsed yet.
5585 (grammar_midrule_action): Likewise.
5586 Don't record whether the midrule's $$ has been used yet since actions
5587 haven't been translated yet.
5588 Record the midrule's parent rule and its RHS index within the parent
5589 rule.
5590 (grammar_current_rule_action_append): Don't translate the action yet
5591 since not all symbol declarations may have been parsed yet and, thus,
5592 warnings about types for $$, $n, @$, and @n can't be reported yet.
5593 (packgram): Translate the action and invoke grammar_rule_check now that
5594 all symbol declarations have been parsed.
5595 * src/scan-code.l (handle_action_dollar): Now that this is invoked
5596 after parsing the entire grammar file, the symbol list here in the case
5597 of a midrule is actually the midrule's empty RHS, so reference its
5598 parent rule's RHS where necessary.
5599 On the other hand, now that you can already know it's a midrule, you
5600 aren't forced to think $$ has the same type as its parent rule's $$.
5601 (handle_action_at): In the case of a midrule, reference the parent rule
5602 where necessary.
5603 * src/symlist.c (symbol_list_new): Initialize new midrule-related
5604 members.
5605 (symbol_list_length): Now that this is invoked after all rules have
5606 been parsed, a NULL symbol (rather than a NULL symbol list node)
5607 terminates a rule. symbol_list_print already does this correctly.
5608 * src/symlist.h (symbol_list.midrule_parent_rule,
5609 symbol_list.midrule_parent_rhs_index): New members so that midrules can
5610 remember their relationships with their parents.
5611 * tests/input.at (Type Clashes): Extend to catch the midrule $$ error
5612 fixed by the above patch.
5613 (_AT_UNUSED_VALUES_DECLARATIONS, AT_CHECK_UNUSED_VALUES): New m4 macros
5614 implementing...
5615 (Unused values): ... this old test case and...
5616 (Unused values before symbol declarations): ... this new test case.
5617 This one is the same as `Unused values' except that all symbol
5618 declarations appear after the rules in order to catch the rest of the
5619 errors fixed by the above patch.
5620
5621 2006-06-26 Joel E. Denny <jdenny@ces.clemson.edu>
5622
5623 More cleanup.
5624 * src/reader.c (current_rule): Declare it static since it's no longer
5625 used outside this file.
5626 (grammar_current_rule_action_append): Remove redundant arguments from
5627 translate_rule_action invocation.
5628 * src/reader.h (current_rule): Remove this unused extern.
5629 * src/scan-code.h (translate_rule_action): Remove redundant arguments.
5630 * src/scan-code.l (translate_rule_action): Likewise.
5631
5632 2006-06-25 Joel E. Denny <jdenny@ces.clemson.edu>
5633
5634 Clean up yesterday's patch.
5635 * parse-gram.y (rhs): Move grammar_midrule_action invocation from here
5636 to...
5637 * src/reader.c (grammar_current_rule_action_append): ... here for
5638 consistency with grammar_current_rule_symbol_append.
5639 * tests/regression.at (Braced code in declaration in rules section):
5640 Make yyerror and yylex static as usual.
5641
5642 2006-06-24 Joel E. Denny <jdenny@ces.clemson.edu>
5643
5644 Fix bug that mistakes braced code in a declaration in the rules section
5645 to be a rule action. Mentioned at
5646 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00105.html>.
5647 * src/scan-gram.l: Move midrule action detection from the start of the
5648 scanning of any braced code to...
5649 * src/parse-gram.y (rhs): ... the parsing of braced code as a rule
5650 action. For readability, use $2 and @2 rather than the equivalent
5651 global variables.
5652 * tests/regression.at (Braced code in declaration in rules section):
5653 New test to catch the error fixed by the above patch.
5654
5655 Work on code readability some.
5656 * src/scan-code.l (current_rule): Get rid of this misleading and
5657 redundant declaration: it's actually extern'ed in reader.h.
5658 (YY_DECL, code_lex, handle_action_dollar, handle_action_at,
5659 translate_action): Add a rule argument and use it instead of the global
5660 current_rule.
5661 (translate_rule_action): This already receives current_rule through an
5662 argument, so pass it on to translate_action instead of assigning
5663 current_rule to current_rule.
5664 (translate_symbol_action, translate_code): Pass rule = NULL to
5665 translate_action.
5666
5667 2006-06-23 Joel E. Denny <jdenny@ces.clemson.edu>
5668
5669 Rename %before-definitions to %start-header and %after-definitions to
5670 %end-header. Don't use these declarations to separate pre-prologue
5671 blocks from post-prologue blocks. Add new order-independent
5672 declarations %before-header and %after-header as alternatives to the
5673 traditional Yacc pre-prologue and post-prologue blocks. Discussed at
5674 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00110.html>.
5675 * NEWS (2.3+): Update for these changes.
5676 * data/glr.c (b4_before_definitions): Update to...
5677 (b4_start_header): ... this.
5678 (b4_after_definitions): Update to...
5679 (b4_end_header): ... this.
5680 * data/glr.cc: Likewise.
5681 * data/lalr1.cc: Likewise.
5682 * data/yacc.c: Likewise.
5683 * doc/bison.texinfo (The prologue): Update names, and replace remaining
5684 prologue blocks with %*-header declarations.
5685 (Calc++ Parser): Likewise.
5686 (Decl Summary): Update names.
5687 (Table of Symbols): Update description.
5688 * src/parse-gram.y (PERCENT_AFTER_DEFINITIONS): Update to...
5689 (PERCENT_END_HEADER): ... this.
5690 (PERCENT_BEFORE_DEFINITIONS): Update to...
5691 (PERCENT_START_HEADER): ... this.
5692 (PERCENT_AFTER_HEADER, PERCENT_BEFORE_HEADER): New tokens.
5693 (declaration): Update token names and m4 macro names.
5694 When parsing %end-header and %start-header, invoke translate_code
5695 before muscle_code_grow, and no longer set global booleans to remember
5696 whether these declarations have been seen.
5697 Parse new %after-header and %before-header.
5698 * src/reader.c (before_definitions, after_definitions): Remove.
5699 (prologue_augment): Accept a new bool argument to specify whether to
5700 augment the pre-prologue or post-prologue.
5701 * src/reader.h (before_definitions, after_definitions): Remove these
5702 extern's.
5703 (prologue_augment): Add new bool argument.
5704 * src/scan-gram.l (PERCENT_AFTER_DEFINITIONS): Update to...
5705 (PERCENT_END_HEADER): ... this.
5706 (PERCENT_BEFORE_DEFINITIONS): Update to...
5707 (PERCENT_START_HEADER): ... this.
5708 (PERCENT_AFTER_HEADER, PERCENT_BEFORE_HEADER): New tokens.
5709 * tests/actions.at (Printers and Destructors): Update names.
5710
5711 2006-06-22 Joel E. Denny <jdenny@ces.clemson.edu>
5712
5713 Add comparison operators for C++ location classes. Discussed at
5714 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00092.html>.
5715 * data/c++.m4 (b4_define_location_comparison): New boolean %define
5716 declaration indicating whether filename_type has an operator==. If
5717 filename_type is `std::string', it defaults to `1', `0' otherwise.
5718 * data/location.cc: Iff b4_define_location_comparison is `1', add
5719 operator== and operator!= for class position and for class location.
5720
5721 Some minor fixes.
5722 * src/scan-action.l: Remove unused file.
5723 * src/symtab.c (symbol_printer_set): Use printer_location not
5724 destructor_location.
5725 * src/symtab.h (struct symbol): Replace incorrect source comment for
5726 printer members.
5727 * tests/input.at (Incompatible Aliases): Update output with correct
5728 printer location.
5729
5730 2006-06-20 Joel E. Denny <jdenny@ces.clemson.edu>
5731
5732 Don't put the pre-prologue in the header file. For the yacc.c code
5733 file and the glr.c header and code files, move the pre-prologue before
5734 the token definitions. Add new %before-definitions and
5735 %after-definitions to declare code that will go in both the header file
5736 and code file. Discussed at
5737 <http://lists.gnu.org/archive/html/bison-patches/2005-12/msg00000.html>,
5738 <http://lists.gnu.org/archive/html/bison-patches/2006-01/msg00016.html>,
5739 and
5740 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00055.html>.
5741 * NEWS (2.3+): Describe these changes.
5742 * data/glr.c (b4_pre_prologue): Move from within to before...
5743 (b4_shared_declarations): ... this.
5744 Add new b4_before_definitions before b4_token_enums.
5745 Add new b4_after_definitions at the end.
5746 * data/glr.cc (b4_pre_prologue): Replace with...
5747 (b4_before_definitions): ... this in the header file.
5748 (b4_after_definitions): New near the end of the header file.
5749 * data/lalr1.cc (b4_pre_prologue): Move from the header file to the
5750 code file right before including the header file.
5751 (b4_before_definitions): New in the previous position of
5752 b4_pre_prologue in the header file.
5753 (b4_after_definitions): New near the end of the header file.
5754 * data/yacc.c: Clean up some m4 quoting especially in the header file.
5755 (b4_token_enums_defines): In the code file, move to right before
5756 YYSTYPE for consistency with the header file.
5757 (b4_before_definitions): New right before b4_token_enums_defines in
5758 both the header and code file.
5759 (b4_after_definitions): New right after YYLTYPE and yylloc in both the
5760 header and code file.
5761 * doc/bison.texinfo (Prologue): Show use of %before-definitions instead
5762 of prologues for %union dependencies.
5763 (Decl Summary): In %defines description, mention the effect of
5764 %before-definitions and %after-definitions on the header file.
5765 (Calc++ Parser): Forward declare driver in a %before-definitions rather
5766 than in the pre-prologue so that make check succeeds.
5767 (Table of Symbols): Add entries for %before-definitions and
5768 %after-definitions.
5769 * src/parse-gram.y (PERCENT_BEFORE_DEFINITIONS): New token for
5770 %before-definitions.
5771 (PERCENT_AFTER_DEFINITIONS): New token for %after-definitions.
5772 (declaration): Parse those declarations and append to
5773 b4_before_definitions and b4_after_definitions, respectively.
5774 * src/reader.c (before_definitions, after_definitions): New bools to
5775 track whether those declarations have been seen.
5776 (prologue_augment): Add to the post-prologue if %union,
5777 %before-definitions, or %after-definitions has been seen.
5778 * src/reader.h (before_definitions, after_definitions): New extern's.
5779 * src/scan-gram.l: Scan the new declarations.
5780 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Place the second
5781 prologue block in a %before-definitions or a %after-definitions based
5782 on whether the %union is declared.
5783 * tests/regression.at (Early token definitions with --yacc, Early token
5784 definitions without --yacc): Move tests for token definitions into the
5785 post-prologue since token names are no longer defined in the
5786 pre-prologue.
5787
5788 2006-06-20 Akim Demaille <akim@epita.fr>
5789
5790 * src/symtab.h, src/symtab.c (symbol_from_uniqstr): New.
5791 (symbol_get): Use it.
5792 * src/parse-gram.y: Use it.
5793
5794 2006-06-19 Joel E. Denny <jdenny@ces.clemson.edu>
5795
5796 * src/scan-gram.l: Remove unused declaration of last_string_1 so the
5797 build succeeds when configured with --enable-gcc-warnings.
5798
5799 2006-06-19 Paul Eggert <eggert@cs.ucla.edu>
5800
5801 * src/parse-gram.y (char_name): New function.
5802 (CHAR, STRING, string_content): For %printer, properly escape.
5803 (ID): Prefer fputs to fprintf.
5804 (id): Reindent to be consistent with other rules.
5805 Properly quote char.
5806
5807 The Translation Project changed its way of publishing translations
5808 to maintainers. I haven't received any responses to my request
5809 for supporting the old way, or for documenting the new way. I
5810 have modified 'bootstrap' to use screen scraping
5811 (in this case, HTML scraping). This is unreliable and inelegant,
5812 but I don't see any better way. Yuck.
5813 * bootstrap (TP_URL, WGET_COMMAND): New vars.
5814 (get_translations): New function, which uses HTML scraping to
5815 deduce locations of latest translations.
5816 Use this function to grab both bison and bison-runtime .po files.
5817 Don't bother priming the pump for the runtime-po domain any more,
5818 as it's now translated better than bison is.
5819
5820 2006-06-19 Akim Demaille <akim@epita.fr>
5821
5822 * src/scan-gram.l: No longer "parse" things after `%union' until
5823 `{'. Rather, return a single "%union" token.
5824 No longer make symbols: return strings, and leave the conversion
5825 to symbols to the parser.
5826 (SC_PRE_CODE, token_type): Remove.
5827 * src/parse-gram.y (%union): New field `character'.
5828 Sort tokens.
5829 (CHAR): New token.
5830 (ID, ID_COLON): Now that the scanner no longer makes them
5831 identifiers, adjust all uses to invoke symbol_get.
5832 (id_colon): New, wraps the conversion from string to symbol.
5833 (%union): Accept a possible union_name.
5834 (symbol): Now can be a char.
5835 * data/c.m4 (b4_union_name): Leave a default value.
5836 * data/glr.c, data/yacc.c: Use it.
5837
5838 2006-06-11 Joel E. Denny <jdenny@ces.clemson.edu>
5839
5840 For associating token numbers with token names for "yacc.c", don't use
5841 #define statements unless `--yacc' is specified; always use enum
5842 yytokentype. Most important discussions start at:
5843 <http://lists.gnu.org/archive/html/bison-patches/2005-09/msg00053.html>,
5844 <http://lists.gnu.org/archive/html/bison-patches/2005-12/msg00052.html>,
5845 and
5846 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00043.html>.
5847 * NEWS (2.3+): Mention.
5848 * data/c.m4 (b4_yacc_if): New.
5849 (b4_token_enums_defines): Use b4_yacc_if to decide whether to add the
5850 token #define's.
5851 * doc/bison.texinfo (Bison Options): Describe the effect of `--yacc'
5852 on token name definitions.
5853 * src/getargs.c (usage): Capitalize `Yacc' in English.
5854 * src/output.c (prepare): Define b4_yacc_flag.
5855 * tests/regression.at (Early token definitions): Test that tokens names
5856 are defined before the pre-prologue not just before the post-prologue.
5857 Remove this test case and copy to...
5858 (Early token definitions with --yacc): ... this to test #define's.
5859 (Early token definitions without --yacc): ... and this to test enums.
5860
5861 2006-06-11 Paul Eggert <eggert@cs.ucla.edu>
5862
5863 * NEWS: Reword the post-2.3 change to not be so optimistic about
5864 removing the old "look-ahead" spelling.
5865 Update previous look-ahead/lookahead change reports.
5866 * REFERENCES: look-ahead -> lookahead (since that's
5867 what he actually wrote).
5868 * doc/refcard.tex: look ahead -> lookahead,
5869 look-ahead -> lookahead
5870
5871 2006-06-09 Joel E. Denny <jdenny@ces.clemson.edu>
5872
5873 For consistency, use `lookahead' instead of `look-ahead' or
5874 `look_ahead'. Discussed starting at
5875 <http://lists.gnu.org/archive/html/bison-patches/2006-01/msg00049.html>
5876 and then at
5877 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00017.html>.
5878 * NEWS: For the next release, note the change to `--report'.
5879 * TODO, doc/bison.1: Update English.
5880 * doc/bison.texinfo: Update English.
5881 (Understanding Your Parser, Bison Options): Document as
5882 `--report=lookahead' rather than `--report=look-ahead'.
5883 * src/conflicts.c: Update English in comments.
5884 (lookahead_set): Rename from look_ahead_set.
5885 (flush_reduce): Rename argument look_ahead_tokens to lookahead_tokens.
5886 (resolve_sr_conflict): Rename local look_ahead_tokens to
5887 lookahead_tokens, and update other uses.
5888 (flush_shift, set_conflicts, conflicts_solve, count_sr_conflicts,
5889 count_rr_conflicts, conflicts_free): Update uses.
5890 * src/getargs.c (report_args): Move "lookahead" before alternate
5891 spellings.
5892 (report_types): Update uses.
5893 (usage): For `--report' usage description, state `lookahead' spelling
5894 rather than `look-ahead'.
5895 * src/getargs.h (report.report_lookahead_tokens): Rename from
5896 report_look_ahead_tokens.
5897 * src/lalr.c: Update English in comments.
5898 (compute_lookahead_tokens): Rename from compute_look_ahead_tokens.
5899 (state_lookahead_tokens_count): Rename from
5900 state_look_ahead_tokens_count.
5901 Rename local n_look_ahead_tokens to n_lookahead_tokens.
5902 (lookahead_tokens_print): Rename from look_ahead_tokens_print.
5903 Rename local n_look_ahead_tokens to n_lookahead_tokens.
5904 Update other uses.
5905 Update English in output.
5906 (add_lookback_edge, initialize_LA, lalr, lalr_free): Update uses.
5907 * src/print.c: Update English in comments.
5908 (lookahead_set): Rename from look_ahead_set.
5909 (print_reduction): Rename argument lookahead_token from
5910 look_ahead_token.
5911 (print_core, state_default_rule, print_reductions, print_results):
5912 Update uses.
5913 * src/print_graph.c: Update English in comments.
5914 (print_core): Update uses.
5915 * src/state.c: Update English in comments.
5916 (reductions_new): Update uses.
5917 (state_rule_lookahead_tokens_print): Rename from
5918 state_rule_look_ahead_tokens_print, and update other uses.
5919 * src/state.h: Update English in comments.
5920 (reductions.lookahead_tokens): Rename from look_ahead_tokens.
5921 (state_rule_lookahead_tokens_print): Rename from
5922 state_rule_look_ahead_tokens_print.
5923 * src/tables.c: Update English in comments.
5924 (conflict_row, action_row): Update uses.
5925 * tests/glr-regression.at
5926 (Incorrect lookahead during deterministic GLR,
5927 Incorrect lookahead during nondeterministic GLR): Rename
5928 print_look_ahead to print_lookahead.
5929 * tests/torture.at: Update English in comments.
5930 (AT_DATA_LOOKAHEAD_TOKENS_GRAMMAR): Rename from
5931 AT_DATA_LOOK_AHEAD_TOKENS_GRAMMAR.
5932 (Many lookahead tokens): Update uses.
5933 * data/glr.c: Update English in comments.
5934 * lalr1.cc: Likewise.
5935 * yacc.c: Likewise.
5936 * src/conflicts.h: Likewise.
5937 * src/lalr.h: Likewise.
5938 * src/main.c: Likewise.
5939 * src/output.c: Likewise.
5940 * src/parse-gram.c: Likewise.
5941 * src/tables.h: Likewise.
5942 * tests/calc.at: Likewise.
5943
5944 2006-06-08 Joel E. Denny <jdenny@ces.clemson.edu>
5945
5946 * src/flex-scanner.h (yytext): Remove stray `*/' in #define.
5947
5948 2006-06-07 Paul Eggert <eggert@cs.ucla.edu>
5949
5950 * TODO: Add request from Nelson H. F. Beebe to be able to install
5951 Bison without installing the yacc script.
5952
5953 2006-06-07 Joel E. Denny <jdenny@ces.clemson.edu>
5954
5955 * src/flex-scanner.h: For the sake of Flex 2.5.4, don't #define yyleng
5956 and yytext if they're already #define'd.
5957 * src/flex-scanner.h, src/location.h: Move #include "system.h" to...
5958 * src/scan-code-c.c: ... here.
5959 * src/scan-code.l, src/scan-gram.l: ... and here. Also #include
5960 <config.h>.
5961
5962 2006-06-07 Joel E. Denny <jdenny@ces.clemson.edu>
5963
5964 Get Bison to build again when configured with --enable-gcc-warnings.
5965 * src/location.c, src/location.h, src/main.c, src/scan-code.l: Add some
5966 missing #include's.
5967 * src/scan-code.l (handle_action_dollar, handle_action_at): Rename
5968 loc argument as it shadows a global.
5969 * src/scan-gram.l: Remove stray comma that prevents boundary_set
5970 invocation.
5971
5972 * src/.cvsignore: Add scan-code.c.
5973
5974 2006-06-07 Akim Demaille <akim@epita.fr>
5975
5976 * src/scan-gram.l: Move the "add a trailing ; to actions" code
5977 to...
5978 * src/scan-code.l: here.
5979 * tests/input.at (Torturing the Scanner): Fix another location
5980 error.
5981
5982 2006-06-07 Akim Demaille <akim@epita.fr>
5983
5984 * src/Makefile.am (BUILT_SOURCES): Fix the trailing backslash.
5985
5986 2006-06-06 Akim Demaille <akim@epita.fr>
5987
5988 Extract the parsing of user actions from the grammar scanner.
5989 As a consequence, the relation between the grammar scanner and
5990 parser is much simpler. We can also split "composite tokens" back
5991 into simple tokens.
5992 * src/gram.h (ITEM_NUMBER_MAX, RULE_NUMBER_MAX): New.
5993 * src/scan-gram.l (add_column_width, adjust_location): Move to and
5994 rename as...
5995 * src/location.h, src/location.c (add_column_width)
5996 (location_compute): these.
5997 Fix the column count: the initial column is 0.
5998 (location_print): Be robust to ending column being 0.
5999 * src/location.h (boundary_set): New.
6000 * src/main.c: Adjust to scanner_free being renamed as
6001 gram_scanner_free.
6002 * src/output.c: Include scan-code.h.
6003 * src/parse-gram.y: Include scan-gram.h and scan-code.h.
6004 Use boundary_set.
6005 (PERCENT_DESTRUCTOR, PERCENT_PRINTER, PERCENT_INITIAL_ACTION)
6006 (PERCENT_LEX_PARAM, PERCENT_PARSE_PARAM): Remove the {...} part,
6007 which is now, again, a separate token.
6008 Adjust all dependencies.
6009 Whereever actions with $ and @ are used, use translate_code.
6010 (action): Remove this nonterminal which is now useless.
6011 * src/reader.c: Include assert.h, scan-gram.h and scan-code.h.
6012 (grammar_current_rule_action_append): Use translate_code.
6013 (packgram): Bound check ruleno, itemno, and rule_length.
6014 * src/reader.h (gram_in, gram__flex_debug, scanner_cursor)
6015 (last_string, last_braced_code_loc, max_left_semantic_context)
6016 (scanner_initialize, scanner_free, scanner_last_string_free)
6017 (gram_out, gram_lineno, YY_DECL_): Move to...
6018 * src/scan-gram.h: this new file.
6019 (YY_DECL): Rename as...
6020 (GRAM_DECL): this.
6021 * src/scan-code.h, src/scan-code.l, src/scan-code-c.c: New.
6022 * src/scan-gram.l (gram_get_lineno, gram_get_in, gram_get_out):
6023 (gram_get_leng, gram_get_text, gram_set_lineno, gram_set_in):
6024 (gram_set_out, gram_get_debug, gram_set_debug, gram_lex_destroy):
6025 Move these declarations, and...
6026 (obstack_for_string, STRING_GROW, STRING_FINISH, STRING_FREE):
6027 these to...
6028 * src/flex-scanner.h: this new file.
6029 * src/scan-gram.l (rule_length, rule_length_overflow)
6030 (increment_rule_length): Remove.
6031 (last_braced_code_loc): Rename as...
6032 (gram_last_braced_code_loc): this.
6033 Adjust to the changes of the parser.
6034 Move all the handling of $ and @ into...
6035 * src/scan-code.l: here.
6036 * src/scan-gram.l (handle_dollar, handle_at): Remove.
6037 (handle_action_dollar, handle_action_at): Move to...
6038 * src/scan-code.l: here.
6039 * src/Makefile.am (bison_SOURCES): Add flex-scanner.h,
6040 scan-code.h, scan-code-c.c, scan-gram.h.
6041 (EXTRA_bison_SOURCES): Add scan-code.l.
6042 (BUILT_SOURCES): Add scan-code.c.
6043 (yacc): Be robust to white spaces.
6044
6045 * tests/conflicts.at, tests/input.at, tests/reduce.at,
6046 * tests/regression.at: Adjust the column numbers.
6047 * tests/regression.at: Adjust the error message.
6048
6049 2006-06-06 Joel E. Denny <jdenny@ces.clemson.edu>
6050
6051 * src/getargs.c (usage): Mention GLR not just LALR(1) in --help output.
6052 Use Akim's wording from
6053 <http://lists.gnu.org/archive/html/bison-patches/2006-05/msg00056.html>.
6054
6055 2006-06-06 Joel E. Denny <jdenny@ces.clemson.edu>
6056
6057 Between Bison releases, manually append `+' to the previous Bison
6058 release number, and use that as a signal to automatically print the
6059 ChangeLog's CVS Id keyword from --version. Discussed starting at
6060 <http://lists.gnu.org/archive/html/bison-patches/2006-05/msg00028.html>.
6061 * ChangeLog: Add Id header.
6062 * configure.ac (AC_INIT): Append `+' to `2.3'.
6063 * src/.cvsignore: Add revision.c.
6064 * src/Makefile.am (bison_SOURCES): Add revision.c and revision.h.
6065 (BUILT_SOURCES): Add revision.c.
6066 (revision.c): New target rule. This file defines a new global variable
6067 named revision. It initializes it with either the Id from ChangeLog
6068 or, if VERSION doesn't contain `+', with the empty string.
6069 * src/getargs.c (version): Print the value of revision.
6070 * src/revision.h: Extern revision.
6071
6072 2006-06-05 Paul Eggert <eggert@cs.ucla.edu>
6073
6074 * NEWS: Version 2.3.
6075 * configure.ac (AC_INIT): Likewise.
6076
6077 2006-05-30 Paul Eggert <eggert@cs.ucla.edu>
6078
6079 * data/glr.c (YYRECOVERING): Define to be a function-like macro
6080 with no arguments, not as an object-like macro. This is for
6081 compatibility with data/yacc.c. Problem reported by John P. Hartmann in
6082 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00059.html>.
6083 * doc/bison.texinfo (Action Features, Error Recovery, Table of Symbols):
6084 Document this.
6085
6086 2006-05-30 Joel E. Denny <jdenny@ces.clemson.edu>
6087
6088 * src/getargs.c (usage): Back out yesterday's modification of the
6089 --help output so that we don't have to wait for translation before
6090 releasing 2.3.
6091
6092 2006-05-29 Paul Eggert <eggert@cs.ucla.edu>
6093
6094 * doc/bison.texinfo (Introduction): Don't say "GLR grammar".
6095 Problem reported by Akim Demaille.
6096
6097 2006-05-29 Joel E. Denny <jdenny@ces.clemson.edu>
6098
6099 * src/getargs.c (usage): Mention GLR not just LALR(1) in --help output.
6100
6101 2006-05-26 Paul Eggert <eggert@cs.ucla.edu>
6102
6103 * data/yacc.c (yy_reduce_print): Omit trailing white space in
6104 generated source code. Problem reported by Frans Englich in
6105 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00049.html>.
6106
6107 2006-05-22 Paul Eggert <eggert@cs.ucla.edu>
6108
6109 * Makefile.maint (gzip_rsyncable, GZIP_ENV): Compute within the
6110 shell, not within 'make', so that 'make' by an ordinary builder
6111 (using GNU make) does not worry about configuring gzip. This also
6112 works around a bug reported independently by Keith Thompson and by
6113 Georg Schwarz, whereby gzip 1.2.4 --help would output usage on
6114 stderr rather than stdout, messing up the build logs.
6115
6116 2006-05-21 Joel E. Denny <jdenny@ces.clemson.edu>
6117
6118 * data/yacc.c (yyparse): Wrap the final return from yyparse inside YYID
6119 to make sure that YYID will never be unused. This fixes a 'make
6120 maintainer-check' failure caused by the recent changes to the 'Trivial
6121 grammars' test case, which caused g++ 4.1.0 to complain that YYID was
6122 not used.
6123 * data/glr.c (yyparse): Wrap yyparse's return inside YYID just in case.
6124
6125 2006-05-21 Joel E. Denny <jdenny@ces.clemson.edu>
6126
6127 * data/glr.c (yyresolveLocations): Remove bogus YYASSERT that the
6128 state before an empty RHS is always resolved here. Only the location
6129 of that state is guaranteed to be resolved, and that's enough. This
6130 fixes the remaining bug reported by Derek M. Jones in
6131 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00027.html>.
6132 * tests/glr-regression.at (Uninitialized location when reporting
6133 ambiguity): Test the above case.
6134 Also, the embedded comments in this test case claim it checks the case
6135 of an empty RHS that has inherited the initial location. However, the
6136 corresponding LHS was already resolved, so yyresolveLocations didn't
6137 actually have reason to modify it. Fix this by forcing
6138 nondeterministic operation at the beginning of the parse.
6139
6140 2006-05-20 Paul Eggert <eggert@cs.ucla.edu>
6141
6142 * data/c.m4 (b4_yy_symbol_print_generate):
6143 (b4_yy_symbol_print_generate): Use 'YYSTYPE const' rather than
6144 'const YYSTYPE', and similarly for YYLTYPE. This fixes one
6145 of the bugs reported today by Derek M Jones in
6146 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00027.html>.
6147 * doc/bison.texinfo (Value Type): Document that YYSTYPE must be
6148 defined to be a type name without parens or brackets.
6149 (Location Type): Similarly for YYLTYPE.
6150 * tests/regression.at (Trivial grammars): Put in a test for this
6151 bug that will be caught by 'make maintainer-check' (though not,
6152 alas, by 'make check' unless your compiler is picky).
6153
6154 2006-05-19 Paul Eggert <eggert@cs.ucla.edu>
6155
6156 * NEWS: Version 2.2.
6157 * configure.ac (AC_INIT): Likewise.
6158
6159 2006-05-17 Joel E. Denny <jdenny@ces.clemson.edu>
6160
6161 * data/glr.c (yyreportTree): Make room in yystates for the state
6162 preceding the RHS. This fixes the segmentation fault reported by Derek
6163 M. Jones in
6164 <http://lists.gnu.org/archive/html/help-bison/2006-05/msg00035.html>.
6165 (yyreportTree, yypdumpstack): Subtract 1 from yyrule before printing
6166 to the user. Reported for yyreportTree by Derek M. Jones later in the
6167 same thread.
6168 * THANKS: Add Derek M. Jones.
6169 Update my email address.
6170 Fix typo in Steve Murphy's name.
6171
6172 2006-05-14 Paul Eggert <eggert@cs.ucla.edu>
6173
6174 * data/glr.c (yyreportSyntaxError): Fix off-by-one error in
6175 checking against YYLAST that caused the parser to miss a potential
6176 alternative in its diagnostic.
6177 Problem reported by Maria Jose Moron Fernandez in
6178 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00024.html>.
6179 * data/lalr1.cc (yysyntax_error_): Likewise.
6180 * data/yacc.c (yysyntax_error): Likewise.
6181 * tests/regression.at (_AT_DATA_DANCER_Y): Use static array for
6182 tokens, in case we run into an older C compiler.
6183 (_AT_DATA_EXPECT2_Y, AT_CHECK_EXPECT2): New macros.
6184 Use them to check for the off-by-one error fixed above.
6185
6186 * data/yacc.c (yytnamerr): Fix typo: local var should be of type
6187 YYSIZE_T, not size_t.
6188 * tests/regression.at (Trivial grammars): New test, to catch
6189 the error fixed by the above patch.
6190
6191 2006-05-14 Akim Demaille <akim@lrde.epita.fr>
6192
6193 * doc/bison.texinfo (C++ Bison Interface): Clarify the naming
6194 scheme.
6195 Reported by Steve Murphy.
6196
6197 2006-05-14 Akim Demaille <akim@lrde.epita.fr>
6198
6199 * data/glr.cc, data/lalr1.cc: Using %defines is mandatory.
6200 * data/glr.cc: b4_location_flag is now b4_locations_flag.
6201
6202 2006-05-14 Akim Demaille <akim@lrde.epita.fr>
6203
6204 Implement --trace=m4.
6205 * src/getargs.c (trace_types, trace_args): Accept trace_m4.
6206 * src/output.c (output_skeleton): When set, pass -dV to m4.
6207
6208 Factor the handling of flags in m4.
6209 * src/output.c (prepare): Rename the muscle names debug, defines,
6210 error_verbose to debug_flag, defines_flag, error_verbose_flag.
6211 * data/c.m4: Adjust.
6212 (_b4_define_flag_if, b4_define_flag_if, b4_defines_if): New.
6213 Use b4_define_flag_if to define other b4_FLAG_if macros.
6214 (b4_location_if): As a consequence, rename as...
6215 (b4_locations_if): this, for consistency.
6216 Adjust all the skeletons.
6217
6218 2006-05-14 Akim Demaille <akim@lrde.epita.fr>
6219
6220 * etc/bench.pm: Shorten bench names.
6221
6222 2006-05-14 Akim Demaille <akim@lrde.epita.fr>
6223
6224 * src/output.h, src/output.c (error_verbose): Move to...
6225 * src/getargs.h, src/getargs.c: here.
6226 Sort the flags.
6227 Adjust dependencies.
6228
6229 2006-05-13 Paul Eggert <eggert@cs.ucla.edu>
6230
6231 * data/c.m4 (b4_copyright): Put the special exception for Bison
6232 skeletons here, so we don't have to put it in each skeleton. All
6233 uses changed. Suggested by Akim Demaille. Also, wrap the
6234 copyright notice, in case it is longer than 80 columns. Replace
6235 comma by newline after title.
6236
6237 2006-05-11 Paul Eggert <eggert@cs.ucla.edu>
6238
6239 * doc/bison.texinfo (Calc++ Scanner): The flex behavior is an
6240 incompatibility, not a bug. Mention that it wasn't fixed as of
6241 flex 2.5.33.
6242
6243 2006-05-11 Akim Demaille <akim@lrde.epita.fr>
6244
6245 * examples/extexi: Enforce the precedence of concatenation over
6246 >>.
6247 Reported by Tommy Nordgren.
6248
6249 2006-05-11 Akim Demaille <akim@lrde.epita.fr>
6250
6251 * data/lalr1.cc (yytranslate_): Rename token as t to avoid clashes
6252 with the member "token".
6253 Reported by Martin Nylin.
6254
6255 2006-05-08 Paul Eggert <eggert@cs.ucla.edu>
6256
6257 * data/glr.c: Switch to Bison 2.2 special-exception language in
6258 the copyright notice. Use more-regular format for titles and
6259 copyright notices.
6260 * data/glr.cc: Likewise.
6261 * data/location.cc: Likewise.
6262 * data/yacc.cc: Likewise.
6263 * doc/bison.texinfo (Conditions): Document this.
6264 * NEWS: likewise. Upgrade version to 2.2.
6265
6266 2006-04-27 Akim Demaille <akim@lrde.epita.fr>
6267
6268 * data/glr.cc: Remove dead code.
6269
6270 2006-04-25 Paul Eggert <eggert@cs.ucla.edu>
6271
6272 * bootstrap: Comment out the AM_CPPFLAGS line, since we don't use
6273 that variable and the line breaks the bootstrap. Problem reported
6274 by Juan M. Guerrero.
6275
6276 2006-04-24 Akim Demaille <akim@lrde.epita.fr>
6277
6278 * doc/bison.texinfo (Multiple start-symbols): New.
6279
6280 2006-04-24 Akim Demaille <akim@lrde.epita.fr>
6281
6282 * etc/README, etc/bench.pl: New.
6283
6284 2006-04-03 Akim Demaille <akim@lrde.epita.fr>
6285
6286 * src/scan-gram.l: Be robust to BRACED_CODE appearing before any
6287 rule.
6288 Reported by Mickael Labau.
6289 * tests/input.at (Torturing the Scanner): Test it.
6290
6291 2006-03-16 Paul Eggert <eggert@cs.ucla.edu>
6292
6293 * doc/bison.texinfo (Decl Summary): Don't mention yylloc twice.
6294 Problem reported by Bob Rossi.
6295
6296 2006-03-13 Paul Eggert <eggert@cs.ucla.edu>
6297
6298 * doc/bison.texinfo: Remove @shorttitlepage stuff; it wasn't used
6299 and didn't really work.
6300 For the index, use @ifnotinfo, not @iftex.
6301 Minor cleanups of spacing and terminology.
6302
6303 2006-03-12 Akim Demaille <akim@lrde.epita.fr>
6304
6305 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Fix the definition
6306 of AT_NAME_PREFIX when %name-prefix is not used.
6307
6308 2006-03-12 Akim Demaille <akim@lrde.epita.fr>
6309
6310 Apply --prefix to C++ skeletons too: they change the namespace.
6311 The test suite already exercize these cases.
6312 * data/c++.m4 (b4_namespace): New.
6313 * data/lalr1.cc, data/glr.cc, data/location.cc: Use it instead of `yy'.
6314 * data/lalr1.cc (yytnameerr_): Move its definition into the namespace.
6315 * data/yacc.c, data/glr.c: Remove a useless `[]'.
6316 * doc/bison.texinfo: Document it.
6317 (Option Cross Key): Use @multitable in all formats. It looks
6318 nicer, even in TeX outputs.
6319 (Rules): Use the same code whatever the output type is.
6320 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS)
6321 (_AT_BISON_OPTION_POPDEFS): Support AT_NAME_PREFIX.
6322 * tests/calc.at: Use it, instead of hard coding `yy'.
6323
6324 2006-03-10 Akim Demaille <akim@lrde.epita.fr>
6325
6326 * TODO: Remove dead items.
6327
6328 2006-03-10 Akim Demaille <akim@lrde.epita.fr>
6329
6330 * doc/FAQ: Remove, merged into...
6331 * doc/bison.texinfo (FAQ): this.
6332 * doc/Makefile.am (EXTRA_DIST): Adjust.
6333
6334 2006-03-10 Akim Demaille <akim@lrde.epita.fr>
6335
6336 * data/c.m4 (b4_token_enum): Always define the enum of tokens,
6337 even if empty.
6338 * data/lalrl1.cc, data/glr.cc (parser::token_type): New.
6339 * doc/bison.texinfo (Calc++ Scanner): Use it.
6340
6341 2006-03-09 Paul Eggert <eggert@cs.ucla.edu>
6342
6343 Fix two nits reported by twlevo, plus one more that I discovered.
6344
6345 * src/assoc.h (assoc_to_string): Give a name to the arg, as
6346 this is the usual Bison style.
6347 * src/location.h (location_print): Likewise.
6348
6349 * src/reader.h (token_name): Likewise.
6350
6351 2006-03-08 Paul Eggert <eggert@cs.ucla.edu>
6352
6353 Fix some nits reported by twlevo.
6354 * doc/FAQ: Remove ancient Y2K FAQ, replacing it with "secure"
6355 and "POSIX". Use more-modern syntax for URLs. Mention C++
6356 and ask for Java. Don't hardwire OS version numbers. Add
6357 copyright notice.
6358 * m4/.cvsignore: Add unistd_h.m4, for latest gnulib.
6359 * src/conflicts.c (solved_conflicts_obstack): Now static.
6360
6361 2006-03-08 Joel E. Denny <jdenny@ces.clemson.edu>
6362
6363 * doc/bison.texinfo (Introduction): Mention GLR and C++ as on the web
6364 page. Say "you can use it" not "you may use it" as on the web page;
6365 we're describing capabilities not granting permission.
6366
6367 2006-03-06 Paul Eggert <eggert@cs.ucla.edu>
6368
6369 * data/glr.c (yyresolveLocations): Rename local variables to avoid
6370 shadowing warnings. Use usual patter for iterating through RHS.
6371 * tests/glr-regression.at
6372 (Uninitialized location when reporting ambiguity):
6373 Modify yylex so that it uses its argument, rather than trying
6374 to rely on ARGSUSED (which doesn't work for gcc with warnings).
6375 const char -> char const.
6376
6377 * tests/Makefile.am ($(srcdir)/package.m4, maintainer-check-valgrind):
6378 Don't use tabs inside commands; it messes up 'ps'.
6379 Problem reported by twlevo.
6380
6381 2006-03-06 Joel E. Denny <jdenny@ces.clemson.edu>
6382
6383 * tests/glr-regression.at (Uninitialized location when reporting
6384 ambiguity): New test case.
6385 * data/glr.c (yyresolveLocations): New function, which uses
6386 YYLLOC_DEFAULT.
6387 (yyresolveValue): Invoke yyresolveLocations before reporting an
6388 ambiguity.
6389 * doc/bison.texinfo (Default Action for Locations): Note
6390 YYLLOC_DEFAULT's usage for ambiguity locations.
6391 (GLR Semantic Actions): Cross-reference those notes.
6392
6393 2006-03-04 Joel E. Denny <jdenny@ces.clemson.edu>
6394
6395 * tests/glr-regression.at (Leaked semantic values when reporting
6396 ambiguity): Remove unnecessary union and type declarations.
6397 (Leaked lookahead after nondeterministic parse syntax error): New test
6398 case.
6399 * data/glr.c (yyparse): Check for zero stacks remaining before
6400 attempting to shift the lookahead so that you don't lose it.
6401
6402 2006-03-02 Joel E. Denny <jdenny@ces.clemson.edu>
6403
6404 Avoid memory leaks by not invoking longjmp in yyreportAmbiguity.
6405 * tests/glr-regression.at (Leaked semantic values when reporting
6406 ambiguity): New test case.
6407 * data/glr.c (yyreportAmbiguity): Invoke yyyerror directly and return
6408 yyabort rather than invoking yyFail, which invokes longjmp. Remove the
6409 now unnecessary yystackp parameter.
6410 (yyresolveValue): Return yyreportAmbiguity's result. Now the necessary
6411 destructors can be called.
6412
6413 * tests/glr-regression.at: Don't invoke bison with `-t' unnecessarily
6414 in existing testcases.
6415
6416 2006-03-02 Joel E. Denny <jdenny@ces.clemson.edu>
6417
6418 Don't leak semantic values for parent RHS when a user action cuts the
6419 parser, and clean up related code a bit.
6420 * tests/glr-regression.at (Leaked merged semantic value if user action
6421 cuts parse): Rename to...
6422 (Leaked semantic values if user action cuts parse): ... this. Add check
6423 for leaked parent RHS values.
6424 * data/glr.c (yydestroyGLRState): In debugging output, distinguish
6425 between an unresolved state (non-empty chain of semantic options) and
6426 an incomplete one (signaled by an empty chain).
6427 (yyresolveStates): Document the interface. Move all manipulation of a
6428 successfully or unsuccessfully resolved yyGLRState to...
6429 (yyresolveValue): ... here so that yyresolveValue always leaves a
6430 yyGLRState with consistent data and thus is easier to understand.
6431 Remove the yyvalp and yylocp parameters since they are always just
6432 taken from the yys parameter. When reporting a discarded merged value
6433 in debugging output, note that it is incompletely merged. Document the
6434 interface.
6435 (yyresolveAction): If resolving any of the RHS states fails, destroy
6436 them all rather than leaking them. Thus, as long as user actions are
6437 written to clean up the RHS correctly, yyresolveAction always cleans up
6438 the RHS of a semantic option. Document the interface.
6439
6440 2006-02-27 Paul Eggert <eggert@cs.ucla.edu>
6441
6442 * data/glr.c (yyexpandGLRStack): Catch an off-by-one error that
6443 led to a segmentation fault in GNU Pascal. Problem reported
6444 by Waldek Hebisch.
6445
6446 2006-02-21 Joel E. Denny <jdenny@ces.clemson.edu>
6447
6448 * doc/bison.texinfo (Mid-Rule Actions): Explain how to bury a
6449 mid-rule action inside a nonterminal symbol in order to declare a
6450 destructor for its semantic value.
6451
6452 2006-02-16 Paul Eggert <eggert@cs.ucla.edu>
6453
6454 * data/yacc.c [(! defined yyoverflow || YYERROR_VERBOSE) && !
6455 YYSTACK_USE_ALLOCA && ! defined YYSTACK_ALLOC && defined
6456 __cplusplus && ! defined _STDLIB_H && !
6457 ((defined YYMALLOC || defined malloc) && (defined YYFREE ||
6458 defined free))]: Include <stdlib.h> rather than rolling our own
6459 declarations of malloc and free, to avoid problems with
6460 incompatible declarations (using 'throw') C++'s stdlib.h. This
6461 should fix Debian bug 340012
6462 <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=340012>,
6463 reported by Guillaume Melquiond.
6464
6465 2006-02-13 Paul Eggert <eggert@cs.ucla.edu>
6466
6467 * NEWS: Clarify symbols versus types in unused-value warnings.
6468
6469 * configure.ac (AC_INIT): Bump version number.
6470
6471 2006-02-13 Paul Eggert <eggert@cs.ucla.edu>
6472
6473 * NEWS: Version 2.1a.
6474 * tests/headers.at (AT_TEST_CPP_GUARD_H): Declare yyerror and yylex,
6475 since C99 requires this.
6476
6477 2006-02-11 Paul Eggert <eggert@cs.ucla.edu>
6478
6479 * m4/c-working.m4: New file.
6480 * configure.ac (BISON_TEST_FOR_WORKING_C_COMPILER): Use it.
6481
6482 2006-02-10 Paul Eggert <eggert@cs.ucla.edu>
6483
6484 * Makefile.maint: Merge from coreutils.
6485
6486 2006-02-09 Paul Eggert <eggert@cs.ucla.edu>
6487
6488 More portability fixes for problems summarized by Nelson H. F. Beebe.
6489
6490 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Catch a
6491 configuration screwup "./configure CC=/opt/SUNWspro/bin/c89
6492 CFLAGS="-xarch=generic64" CXX=/opt/SUNWspro/bin/CC
6493 LDFLAGS="-xarch=generic64" with Sun C 5.7 on Solaris 10; this
6494 messes up because C++ code is compiled in 32-bit mode but linked
6495 in 64-bit mode.
6496
6497 2006-02-08 Paul Eggert <eggert@cs.ucla.edu>
6498
6499 More portability fixes for problems summarized by Nelson H. F. Beebe.
6500
6501 * doc/bison.texinfo (Calc++ Scanner): Work around a bug in flex
6502 2.5.31. This resembles the 2005-10-10 patch to src/scan-skel.l.
6503
6504 * examples/calc++/Makefile.am (check_PROGRAMS): Renamed from
6505 nodist_PROGRAMS, since we don't need to actually compile the
6506 example if we're just doing a plain 'make'. This avoids bothering
6507 the installer unnecessarily about problems due to weird C++
6508 compilers.
6509
6510 2006-02-06 Paul Eggert <eggert@cs.ucla.edu>
6511
6512 More portability fixes for problems summarized by Nelson H. F. Beebe.
6513
6514 * tests/headers.at (AT_TEST_CPP_GUARD_H): Use #include <...> rather
6515 than #include "...", and compile with -I'.'. The old method was
6516 not portable, according to Posix and the C standard, and it does
6517 not work with Sun C 5.7, where previous #line directives affect
6518 the working directory used in later #include "..." directives.
6519
6520 2006-02-06 Juan Manuel Guerrero <juan.guerrero@gmx.de>
6521
6522 Various DJGGP specific issues in /djgpp
6523
6524 2006-02-02 Paul Eggert <eggert@cs.ucla.edu>
6525
6526 More portability fixes for problems summarized by Nelson H. F. Beebe.
6527
6528 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check that
6529 '#include <map>' works and that you can apply ++ to iterators.
6530
6531 2006-02-01 Paul Eggert <eggert@cs.ucla.edu>
6532
6533 Work around portability problems summarized by Nelson H. F. Beebe in
6534 <http://lists.gnu.org/archive/html/bug-bison/2005-09/msg00021.html>.
6535
6536 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check
6537 that '#include <string>' works.
6538
6539 * data/lalr1.cc (yytranslate_): No longer inline, to work around a
6540 porting problem to g++ 3.4.3 on Darwin 7.9.0, where g++ complained
6541 "warning: sorry: semantics of inline function static data `const
6542 unsigned char translate_table[262]' are wrong (you'll wind up with
6543 multiple copies)".
6544
6545 * lib/bbitset.h (struct bitset_vtable): Rename members not, and,
6546 or, xor to not_, and_, or_, and xor_, respectively. This works
6547 around a bug in GCC 3.4.3 on Irix 6.5, which apparently has a
6548 random system header somewhere that includes the equivalent of
6549 <iso646.h>.
6550
6551 * tests/headers.at (AT_TEST_CPP_GUARD_H): Don't assume that "$CC
6552 -E" works; it apparently doesn't work with PathScale EKO Compiler
6553 Suite Version 2.0.
6554
6555 2006-01-30 Joel E. Denny <jdenny@ces.clemson.edu>
6556
6557 During deterministic GLR operation, user actions should be able to
6558 influence the parse by changing yychar. To make this easier to fix and
6559 to make glr.c easier to evolve in general, don't maintain yytoken in
6560 parallel with yychar; just compute yytoken when needed.
6561 * tests/glr-regression.at (Incorrect lookahead during deterministic
6562 GLR): Check that setting yychar in a user action has the intended
6563 effect.
6564 * data/glr.c (yyGLRStack): Remove yytokenp member.
6565 (yyclearin): Don't set *yytokenp.
6566 (yyprocessOneStack, yyreportSyntaxError, yyrecoverSyntaxError): Examine
6567 yychar rather than *yytokenp to determine the current lookahead.
6568 Compute yytoken locally when needed.
6569 (yyparse): Likewise. Remove the local yytoken that yytokenp used to
6570 point to.
6571
6572 * doc/bison.texinfo (Bison Options): Remove stray sentence fragment
6573 after `--report' documentation.
6574
6575 2006-01-30 Paul Eggert <eggert@cs.ucla.edu>
6576
6577 * src/parse-gram.y (grammar_declaration): Location of printer
6578 symbol is @1, not list->location. Bug reported by twlevo.
6579 * tests/input.at (Incompatible Aliases): Adjust to above change.
6580
6581 2006-01-29 Paul Eggert <eggert@cs.ucla.edu>
6582
6583 * tests/input.at (AT_CHECK_UNUSED_VALUES): Remove. Instead, do
6584 all the test at once. This makes the output easier to read in the
6585 normal case.
6586
6587 Fix a longstanding bug uncovered by bro-0.9a9/src/parse.y, which I
6588 got from <http://bro-ids.org/download.html>. The bug is that
6589 when two actions appeared in succession, the second one was
6590 scanned before the first one was added to the grammar rule
6591 as a midrule action. Bison then output the incorrect warning
6592 "parse.y:905.17-906.36: warning: unused value: $3".
6593 * src/parse-gram.y (BRACED_CODE, action): These are no longer
6594 associated with a value.
6595 (rhs): Don't invoke grammar_current_rule_action_append.
6596 (action): Invoke it here instead.
6597 * src/reader.c (grammar_midrule_action): Now extern.
6598 (grammar_current_rule_action_append): Don't invoke
6599 grammar_midrule_action; that is now the scanner's job.
6600 * src/reader.h (last_string, last_braced_code_loc):
6601 (grammar_midrule_action): New decls.
6602 * src/scan-gram.l (last_string): Now extern, sigh.
6603 (last_braced_code_loc): New extern variable.
6604 (<INITIAL>"{"): Invoke grammar_midrule_action if the current
6605 rule already has an action.
6606 (<SC_BRACED_CODE>"}"): Set last_braced_code_loc before returning.
6607 * tests/input.at (AT_CHECK_UNUSED_VALUES):
6608 Add some tests to check that the above changes fixed the bug.
6609
6610 2006-01-27 Paul Eggert <eggert@cs.ucla.edu>
6611
6612 * src/reader.c (symbol_should_be_used): Renamed from symbol_typed_p.
6613 All used changed. Check whether the symbol has a destructor,
6614 not whether it is typed.
6615 * tests/input.at (AT_CHECK_UNUSED_VALUES): Add a destructor, so
6616 that the values are still reported as unused. All line numbers
6617 adjusted.
6618
6619 2006-01-23 Paul Eggert <eggert@cs.ucla.edu>
6620
6621 Work around a bug in bro 0.8, which underparenthesizes its
6622 definition of YYLLOC_DEFAULT.
6623 * data/glr.c: Change all uses of YYLLOC_DEFAULT to parenthesize
6624 their arguments.
6625 * data/lalr1.cc: Likewise.
6626 * data/yacc.cc: Likewise.
6627
6628 2006-01-22 Paul Eggert <eggert@cs.ucla.edu>
6629
6630 Work around a bug in Pike 7.0, and give the Pike folks a
6631 better way to override the usual int widths.
6632 * data/yacc.c (b4_int_type): Use yytype_uint8, etc., so that the
6633 user can override the types.
6634 (short): #undef, to work around a bug in Pike 7.0.
6635 (yytype_uint8, yytype_int8, yytype_uint16, yytype_int16): New types.
6636 (union yyalloc.yyss): Use yytype_int16 rather than short.
6637 All uses changed.
6638 (yysigned_char): Remove.
6639 * src/parse-gram.y (YYTYPE_UINT8, YYTYPE_INT8, YYTYPE_UINT16):
6640 (YYTYPE_INT16): New macros, to test the new facility in yacc.c.
6641 * tests/regression.at (Web2c Actions): Adjust to above changes.
6642
6643 * src/reader.c (check_and_convert_grammar): New function.
6644 (reader): Close the input file even if something went wrong during
6645 parsing. Minor file descriptor leak reported by twlevo.
6646
6647 * src/assoc.c (assoc_to_string): Use a default: abort (); case
6648 to pacify gcc -Wswitch-default.
6649 * src/scan-gram.l (adjust_location): Use a default: break; case
6650 to pacify gcc -Wswitch-default.
6651 * src/scan-skel.h (skel_get_lineno, skel_get_in, skel_get_out):
6652 (skel_get_leng, skel_get_text, skel_set_lineno, skel_set_in):
6653 (skel_set_out, skel_get_debug, skel_set_debug, skel_lex_destroy):
6654 Move these decls to scan-skel.l, since they don't need to be
6655 visible elsewhere.
6656 * src/scan-skel.l: Accept the above decls.
6657 (skel_lex): New decl, to pacify GCC when unpatched flex 2.5.31
6658 is used.
6659
6660 2006-01-21 Paul Eggert <eggert@cs.ucla.edu>
6661
6662 * Makefile.cfg (local-checks-to-skip): Add changelog-check,
6663 since we don't want to insist on a version number at the start
6664 of the changelog every time.
6665 * Makefile.maint: Sync from coreutils a bit better.
6666 (sc_trailing_blank): Renamed from sc_trailing_space.
6667 All uses changed.
6668 (sc_no_if_have_config_h, sc_require_config_h):
6669 (sc_prohibit_assert_without_use): New rules.
6670 (sc_obsolete_symbols): Don't catch Makefile.maint itself.
6671 (sc_dd_max_sym_length): Fix leading spaces in rule.
6672 (sc_system_h_headers): Prefix with @.
6673 (sc_useless_cpp_parens, m4-check): Output line numbers.
6674 (changelog-check): Allow version only in head.
6675 * data/c.m4: Use "defined FOO" instead of "defined (FOO)", to
6676 satisfy new Makefile.maint rule.
6677 * data/glr.c: Likewise.
6678 * data/glr.cc: Likewise.
6679 * data/lalr1.cc: Likewise.
6680 * data/yacc.c: Likewise.
6681 * lib/ebitsetv.c: Likewise.
6682 * lib/lbitset.c: Likewise.
6683 * lib/subpipe.c: Likewise.
6684 * lib/timevar.c: Likewise.
6685 * src/system.h: Likewise.
6686 * data/yacc.c (YYSTYPE): Don't generate trailing spaces in output.
6687 * djgpp/Makefile.maint: Add copyright notice.
6688 * djgpp/README.in: Likewise.
6689 * djgpp/config.bat: Likewise.
6690 * djgpp/config.site: Likewise.
6691 * djgpp/config_h.sed: Likewise.
6692 * djgpp/djunpack.bat: Likewise.
6693 * djgpp/config.sed: Fix copyright notice to match standard format.
6694 * djgpp/subpipe.h: Likewise.
6695 * lib/bitsetv-print.c: Likewise.
6696 * lib/bitsetv.c: Likewise.
6697 * lib/subpipe.h: Likewise.
6698 * lib/timevar.c: Likewise.
6699 * lib/timevar.h: Likewise.
6700 * djgpp/subpipe.c: Use standard recipe for config.h.
6701 * lib/abitset.c: Likewise.
6702 * lib/bitset.c: Likewise.
6703 * lib/bitset_stats.c: Likewise.
6704 * lib/bitsetv-print.c: Likewise.
6705 * lib/bitsetv.c: Likewise.
6706 * lib/ebitsetv.c: Likewise.
6707 * lib/get-errno.c: Likewise.
6708 * lib/lbitset.c: Likewise.
6709 * lib/subpipe.c: Likewise.
6710 * lib/timevar.c: Likewise.
6711 * lib/vbitset.c: Likewise.
6712 * tests/local.at: Likewise.
6713 * src/scan-gram.l: Don't include verify.h, since system.h does
6714 that for us.
6715 * .x-sc_require_config_h: New file.
6716 * .x-sc_unmarked_diagnostics: New file.
6717
6718 2006-01-20 Paul Eggert <eggert@cs.ucla.edu>
6719
6720 Be a bit more systematic about using 'abort'.
6721 * lib/abitset.c (abitset_test): Remove ATTRIBUTE_UNUSED; not needed.
6722 * lib/bitset.c (bitset_bytes, bitset_init, bitset_op4_cmp):
6723 Put 'default: abort ();' before some other case, to satisfy older
6724 pedantic compilers.
6725 * lib/bitset_stats.c (bitset_stats_init): Likewise.
6726 * lib/ebitset.c (ebitset_elt_find, ebitset_op3_cmp): Likewise.
6727 * lib/lbitset.c (lbitset_elt_find, lbitset_op3_cmp): Likewise.
6728 * src/conflicts.c (resolve_sr_conflict): Likewise.
6729 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str):
6730 (get_decision_str, get_orientation_str, get_node_alignment_str):
6731 (get_arrow_mode_str, get_crossing_type_str, get_view_str):
6732 (get_linestyle_str, get_arrowstyle_str): Likewise.
6733 * src/conflicts.c (resolve_sr_conflict):
6734 Use a default case rather than one for the one remaining enum
6735 value, to catch invalid enum values as well.
6736 * src/lalr.c (set_goto_map, map_goto):
6737 Prefer "assert (FOO);" to "if (!FOO) abort ();".
6738 * src/nullable.c (nullable_compute, token_definitions_output):
6739 Likewise.
6740 * src/reader.c (packgram, reader): Likewise.
6741 * src/state.c (transitions_to, state_new, state_reduction_find):
6742 Likewise.
6743 * src/symtab.c (symbol_user_token_number_set, symbol_make_alias):
6744 (symbol_pack): Likewise.
6745 * src/tables.c (conflict_row, pack_vector): Likewise.
6746 * src/scan-skel.l (QPUTS): Remove unnecessary parens.
6747 (BASE_QPUTS, "@output ".*\n): Remove unnecessary asserts.
6748 * src/system.h: Don't include <assert.h>.
6749 (assert): New macro.
6750
6751 * doc/bison.texinfo (Prologue, Rules, Actions, Union Decl, Action Decl):
6752 (Destructor Decl, Parser Function, Pure Calling):
6753 Describe rules for braces inside C code more carefully.
6754
6755 2006-01-19 Paul Eggert <eggert@cs.ucla.edu>
6756
6757 Fix some porting glitches found by Nelson H. F. Beebe.
6758 * lib/abitset.c (abitset_resize): Rewrite to avoid warnings from
6759 compilers that don't understand that abort () does not return.
6760 * src/state.c (transitions_to): Likewise.
6761 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check
6762 that '#include <cstdlib>' works.
6763 * src/system.h (INT8_MIN, INT16_MIN, INT32_MIN, INT8_MAX):
6764 (INT16_MAX, UINT8_MAX, INT32_MAX, UINT16_MAX, UINT32_MAX):
6765 #undef if ! defined __STDC_VERSION__ || __STDC_VERSION__ < 199901,
6766 for the benefit of some pre-C99 compilers.
6767
6768 * bootstrap: Undo changes to gnulib files that autoreconf made.
6769
6770 Minor fixups to get 'make maintainer-check' to work.
6771 * configure.ac: Don't use -Wnested-externs, as it's incompatible
6772 with the new verify.h implementation.
6773 * data/c.m4 (b4_yy_symbol_print_generate): YYUSE (yyoutput).
6774 * data/glr.c (YYUSE): Depend on __GNUC__ as well.
6775 * data/yacc.c (YYUSE): Likewise.
6776 * data/lalr1.cc (yysyntax_error_): YYUSE (yystate).
6777 * lib/subpipe.c (end_of_output_subpipe): The args are unused.
6778 * src/parse-gram.y (declaration): Don't pass a string constant
6779 to a function that expects char *, since GCC might complain
6780 about the constant value.
6781 * src/reader.c (symbol_typed_p): Add parens to pacify GCC.
6782 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): #undef yylloc and yylval
6783 before #defining them.
6784 * tests/glr-regression.at
6785 (Incorrectly initialized location for empty right-hand side in GLR):
6786 In yyerror, use the msg arg.
6787 (Corrupted semantic options if user action cuts parse):
6788 (Incorrect lookahead during deterministic GLR):
6789 (Incorrect lookahead during nondeterministic GLR):
6790 Don't name a local var 'index'; it shadows string.h's 'index'.
6791
6792 2006-01-19 Akim Demaille <akim@epita.fr>
6793
6794 * tests/calc.at (_AT_DATA_CALC_Y): Initialize the whole initial
6795 location, not just parts of it.
6796
6797 2006-01-18 Paul Eggert <eggert@cs.ucla.edu>
6798
6799 * NEWS: Document the fact that multiple %unions are now allowed.
6800 * doc/bison.texinfo (Union Decl): Likewise.
6801 * TODO: This feature is now implemented, so remove it from
6802 the wishlist.
6803
6804 * Makefile.maint: Merge with coreutils Makefile.maint.
6805 (CVS_LIST): Use build-aux version if available.
6806 (VERSION_REGEXP): New macro.
6807 (syntax-check-rules): Add sc_no_if_have_config_h,
6808 sc_prohibit_assert_without_use, sc_require_config_h,
6809 sc_useless_cpp_parens.
6810 (sc_obsolete_symbols): Check for O_NDELAY.
6811 (sc_dd_max_sym_length): Track coreutils.
6812 (sc_unmarked_diagnostics): Look in all files, not just *.c.
6813 (sc_useless_cpp_parens): New rule.
6814 (news-date-check): Look for version or today's date.
6815 (changelog-check): Don't require version number near head.
6816 (copyright-check): Use current year instead of hardwiring 2005.
6817 (my-distcheck): Depend on $(release_archive_dir)/$(prev-tgz).
6818 (announcement): Add --gpg-key-ID.
6819
6820 * djgpp/config.sed: Add copyright notice, and replace "filesystem"
6821 with "file system".
6822
6823 Avoid undefined behavior that addressed just before the start of an
6824 array. Problem reported by twlevo.
6825 * src/reader.c (packgram): Prepend a new sentinel before ritem.
6826 * src/lalr.c (build_relations): Rely on new sentinel.
6827 * src/gram.c (gram_free): Adjust to new sentinel.
6828
6829 2006-01-12 Joel E. Denny <jdenny@ces.clemson.edu>
6830
6831 * data/glr.c (yyGLRStateSet): Rename yylookaheadStatuses to
6832 yylookaheadNeeds. All uses updated.
6833 (yysplitStack): Rename local yynewLookaheadStatuses to
6834 yynewLookaheadNeeds.
6835 * data/glr-regression.at (Incorrect lookahead during nondeterministic
6836 GLR): In comments, change `lookahead status' to `lookahead need'.
6837
6838 2006-01-11 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
6839
6840 * data/glr.c (yysplitStack): A little stylistic rewrite.
6841
6842 2006-01-11 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
6843
6844 * data/glr.c (yyaddDeferredAction): Flesh out the comment.
6845
6846 2006-01-11 Joel E. Denny <jdenny@ces.clemson.edu>
6847
6848 * doc/bison.texinfo: Fix some typos.
6849 (GLR Semantic Actions): New subsection discussing special
6850 considerations because GLR semantic actions might be deferred.
6851 (Actions): Mention look-ahead usage of yylval.
6852 (Actions and Locations): Mention look-ahead usage of yylloc.
6853 (Special Features for Use in Actions): Add YYEOF entry and mention it
6854 in the yychar entry.
6855 In the yychar entry, remove mention of the local yychar case (pure
6856 parser) since this is irrelevant information when writing semantic
6857 actions and since it's already discussed in `Table of Symbols' where
6858 yychar is otherwise described as an external variable.
6859 In the yychar entry, don't call it the `current' look-ahead since it
6860 isn't when semantic actions are deferred.
6861 In the yychar and yyclearin entries, add note about deferred semantic
6862 actions.
6863 Add yylloc and yylval entries discussing look-ahead usage.
6864 (Look-Ahead Tokens): When discussing yychar, don't call it the
6865 `current' look-ahead, and do mention yylval and yylloc.
6866 (Error Recovery): Cross-reference `Action Features' when mentioning
6867 yyclearin.
6868 (Table of Symbols): In the yychar entry, don't call it the `current'
6869 look-ahead.
6870 In the yylloc and yylval entries, mention look-ahead usage.
6871
6872 2006-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
6873
6874 * tests/glr-regression.at: Update copyright year to 2006.
6875
6876 2006-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
6877
6878 * data/glr.c (yyGLRStateSet): Add yybool* yylookaheadStatuses member to
6879 use during nondeterministic operation to track which stacks have
6880 actually needed the current lookahead.
6881 (yyinitStateSet, yyfreeStateSet, yyremoveDeletes, yysplitStack):
6882 Allocate, deallocate, resize, and otherwise shuffle space for
6883 yylookaheadStatuses in parallel with yystates member of yyGLRStateSet.
6884 (yysplitStack, yyprocessOneStack, yyparse): Set lookahead status
6885 appropriately during nondeterministic operation.
6886 (yySemanticOption): Add int yyrawchar, YYSTYPE yyval, and YYLTYPE yyloc
6887 members to store the current lookahead to be used by the deferred
6888 user action.
6889 (yyaddDeferredAction): Add size_t yyk parameter specifying the stack
6890 from which the RHS is taken. Set the lookahead members of the new
6891 yySemanticOption according to the lookahead status for stack yyk.
6892 (yyglrShiftDefer, yyglrReduce): Pass yyk parameter on to
6893 yyaddDeferredAction.
6894 (yyresolveAction): Set yychar, yylval, and yylloc to the lookahead
6895 members of yySemanticOption before invoking yyuserAction, and then set
6896 them back to their current values afterward.
6897 (yyparse): Set yychar = YYEMPTY where yytoken = YYEMPTY.
6898 (yyreportAmbiguity): Add /*ARGSUSED*/ to pacify lint.
6899 * tests/glr-regression.at: Remove `.' from the ends of recent test case
6900 titles for consistency.
6901 (Leaked merged semantic value if user action cuts parse): In order to
6902 suppress lint warnings, use arguments in merge function, and assign
6903 char value < 128 in main.
6904 (Incorrect lookahead during deterministic GLR): New test case.
6905 (Incorrect lookahead during nondeterministic GLR): New test case.
6906
6907 2006-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
6908
6909 * data/c.m4 (b4_yy_symbol_print_generate): In yy_symbol_print, accept
6910 !yyvaluep as signal that no semantic value is available to print.
6911 * data/glr.c (yydestroyGLRState): If state is not resolved, don't try
6912 to print a semantic value.
6913
6914 2006-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
6915
6916 * tests/glr-regression.at: For consistency with my newer test cases,
6917 don't thank myself.
6918
6919 2006-01-05 Joel E. Denny <jdenny@ces.clemson.edu>
6920
6921 * data/glr.c (yyresolveValue): When merging semantic options, if at
6922 least one user action succeeds but a later one cuts the parse, then
6923 destroy the semantic value before returning rather than leaking it.
6924 (yyresolveStates): If a user action cuts the parse and thus
6925 yyresolveValue fails, ignore the (unset) semantic value rather than
6926 corrupting the yyGLRState, and empty the semantic options list since
6927 the user actions should have called all necessary destructors.
6928 Simplify code with YYCHK.
6929 * tests/glr-regression.at (Corrupted semantic options if user action
6930 cuts parse): New test case.
6931 (Undesirable destructors if user action cuts parse): New test case.
6932 Before applying any of this patch, this test case never actually failed
6933 for me... but only because the corrupted semantic options usually
6934 masked this bug.
6935 (Leaked merged semantic value if user action cuts parse): New test
6936 case.
6937
6938 2006-01-05 Akim Demaille <akim@epita.fr>
6939
6940 * src/reader.c, src/symlist.h, src/symlist.c: s/mid_rule/midrule/.
6941
6942 2006-01-04 Paul Eggert <eggert@cs.ucla.edu>
6943
6944 * data/c.m4 (b4_c_modern): New macro, with a new provision for
6945 _MSC_VER. Problem reported by Cenzato Marco.
6946 (b4_c_function_def): Use it.
6947 * data/yacc.c (YYMODERN_C): Remove. All uses replaced by
6948 b4_c_modern.
6949 (yystrlen, yystpcpy, yyparse): Use b4_c_function... macros rather
6950 than rolling our own.
6951
6952 2006-01-04 Akim Demaille <akim@epita.fr>
6953
6954 Also warn about non-used mid-rule values.
6955 * src/symlist.h, src/symlist.c (symbol_list): Add a mid_rule
6956 member.
6957 (symbol_list_new): Adjust.
6958 * src/reader.c (symbol_typed_p): New.
6959 (grammar_rule_check): Use it.
6960 (grammar_midrule_action): Bind a mid-rule LHS to its rule.
6961 Check its rule.
6962 * tests/input.at (AT_CHECK_UNUSED_VALUES): New.
6963 Use it.
6964 * tests/actions.at (Exotic Dollars): Adjust.
6965
6966 2006-01-04 Akim Demaille <akim@epita.fr>
6967
6968 * src/reader.c (grammar_midrule_action): If $$ is set in a
6969 mid-rule, move the `used' bit to its lhs.
6970 * tests/input.at (Unused values): New.
6971 * tests/actions.at (Exotic Dollars): Adjust: exp is not typed.
6972
6973 2006-01-03 Paul Eggert <eggert@cs.ucla.edu>
6974
6975 * doc/bison.texinfo (Bison Options): Say more accurately what
6976 --yacc does.
6977 * src/parse-gram.y (rules_or_grammar_declaration): Don't complain
6978 about declarations in the grammar when in Yacc mode, as POSIX does
6979 not require a diagnostic when the grammar uses extensions.
6980
6981 * src/reduce.c (reduce_grammar): Remove unnecessary cast to bool.
6982
6983 Warn about dubious constructions like "%token T T".
6984 Reported by twlevo.
6985 * src/symtab.h (struct symbol.declared): New member.
6986 * src/symtab.c (symbol_new): Initialize it to false.
6987 (symbol_class_set): New arg DECLARING, specifying whether
6988 this is a declaration that we want to warn about, if there
6989 is more than one of them. All uses changed.
6990
6991 * data/glr.c, data/glr.cc, data/lalr1.cc, data/yacc.c:
6992 Allow multiple %union directives, whose contents concatenate.
6993 * src/parse-gram.y (grammar_declaration): Likewise.
6994 Use muscle_code_grow, so that we don't need stype_line any more.
6995 All uses changed.
6996
6997 * src/muscle_tab.c (muscle_grow): Fix comment.
6998
6999 * ChangeLog, data/c.m4, data/glr.c, data/glr.cc, data/location.cc:
7000 * data/yacc.c, src/getargs.c, src/output.c, tests/cxx-type.at:
7001 Update copyright year to 2006.
7002
7003 2006-01-03 Akim Demaille <akim@epita.fr>
7004
7005 Have glr.cc pass (some of) the calc.at tests.
7006 * data/glr.cc (b4_parse_param_orig): New.
7007 (b4_parse_param): Improve its definition, and bound it more
7008 clearly in the skeleton.
7009 (b4_epilogue): Append, instead of prepending, in order to keep
7010 #line consistency.
7011 Simplify the generation of auxiliary functions: locations and
7012 purity are mandated.
7013 (b4_global_tokens_and_yystype): Honor it.
7014 * data/location.cc (c++.m4): Don't include it.
7015 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Define AT_GLR_CC_IF
7016 and AT_SKEL_CC_IF.
7017 * tests/calc.at (AT_CHECK_CALC): Rely on AT_SKEL_CC_IF instead of
7018 AT_LALR1_CC_IF.
7019 Be sure to initialize the first position's filename.
7020 (AT_CHECK_CALC_LALR1_CC): Add %location and %defines, they are
7021 mandated anyway.
7022 (AT_CHECK_CALC_GLR_CC): New.
7023 Use it to exercise glr.cc as a lalr1.cc drop-in replacement.
7024
7025 2006-01-02 Akim Demaille <akim@epita.fr>
7026
7027 * src/output.c (output_skeleton): Don't hard wire the inclusion of
7028 c.m4.
7029 * data/c++.m4, data/glr.c, data/yacc.c: Include c.m4.
7030 * data/glr.cc: Do not include stack.hh.
7031
7032 2006-01-02 Joel E. Denny <jdenny@ces.clemson.edu>
7033
7034 * data/glr.c: Reformat whitespace with tabs.
7035 (b4_lpure_formals): Remove this unused m4 macro.
7036 * tests/cxx-type.at: Reformat whitespace with tabs.
7037 (_AT_TEST_GLR_CXXTYPES): In union Node, rename node_info to nodeInfo
7038 since it's a member. Rename type to isNterm for clarity.
7039
7040 2005-12-29 Akim <akim@sulaco.local>
7041
7042 Let glr.cc catch up with symbol_value_print.
7043 * data/glr.cc (b4_yysymprint_generate): Replace by...
7044 (b4_yy_symbol_print_generate): this.
7045 (yy_symbol_print, yy_symbol_value_print): Declare them.
7046
7047 2005-12-28 Paul Eggert <eggert@cs.ucla.edu>
7048
7049 * src/location.h (boundary): Note that a line or column equal
7050 to INT_MAX indicates an overflow.
7051 * src/scan-gram.l: Include verify.h. Don't include get-errno.h.
7052 (rule_length_overflow, increment_rule_length, add_column_width):
7053 New functions.
7054 (<INITIAL>{id}, <SC_ESCAPED_STRING>"\"", <SC_ESCAPED_CHARACTER>"'"):
7055 (<SC_BRACED_CODE>"}"):
7056 Use increment_rule_length rather than incrementing it by hand.
7057 (adjust_location, handle_syncline): Diagnose overflow.
7058 (handle_action_dollar, handle_action_at):
7059 Fix bug with monstrosities like $-2147483648.
7060 Remove now-unnecessary checks.
7061 (scan_integer): Verify assumptions and remove now-unnecessary checks.
7062 (convert_ucn_to_byte): Verify assumptions.
7063 (handle_syncline): New arg LOC. All callers changed.
7064 Don't store through a value derived from char const * pointer.
7065
7066 * src/reader.c (grammar_rule_check): Rewrite slightly to avoid
7067 GCC warnings.
7068
7069 2005-12-27 Paul Eggert <eggert@cs.ucla.edu>
7070
7071 * src/reader.c (grammar_midrule_action, grammar_symbol_append):
7072 Remove unnecessary forward static decls.
7073
7074 2005-12-27 Akim Demaille <akim@epita.fr>
7075
7076 * src/reader.c (grammar_current_rule_check): Also check that $$
7077 is used.
7078 Take the rule to check as argument, hence rename as...
7079 (grammar_rule_check): this.
7080 * src/reader.h, src/reader.c (grammar_rule_begin, grammar_rule_end):
7081 Rename as...
7082 (grammar_rule_begin, grammar_rule_end): these, for consistency.
7083 (grammar_midrule_action, grammar_symbol_append): Now static.
7084 * tests/torture.at (input): Don't rely on the default action
7085 being always performed.
7086 * tests/calc.at: "Set" $$ even when the action is "cut" with
7087 YYERROR or other.
7088 * tests/actions.at (Exotic Dollars): Instead of using unused
7089 values, check that the warning is issued.
7090
7091 2005-12-22 Paul Eggert <eggert@cs.ucla.edu>
7092
7093 * NEWS: Improve wording for unused-value warnings.
7094
7095 2005-12-22 Akim Demaille <akim@epita.fr>
7096
7097 * data/lalr1.cc, data/yacc.c, data/glr.c, data/c.m4
7098 (b4_yysymprint_generate): Rename as...
7099 (b4_yy_symbol_print_generate): this.
7100 Generate yy_symbol_print instead of yysymprint.
7101 Generate also yy_symbol_value_print, and use it.
7102
7103 2005-12-22 Akim Demaille <akim@epita.fr>
7104
7105 * NEWS: Warn about unused values.
7106 * src/symlist.h, src/symlist.c (symbol_list, symbol_list_new): Add
7107 a `used' member.
7108 (symbol_list_n_get, symbol_list_n_used_set): New.
7109 (symbol_list_n_type_name_get): Use symbol_list_n_get.
7110 * src/scan-gram.l (handle_action_dollar): Flag used symbols.
7111 * src/reader.c (grammar_current_rule_check): Check that values are
7112 used.
7113 * src/symtab.c (symbol_print): Accept 0.
7114 * tests/existing.at: Remove the type information.
7115 Empty the actions.
7116 Remove useless actions (beware of mid-rule actions: perl -000
7117 -pi -e 's/\s*\{\}(?=[\n\s]*[|;])//g').
7118 * tests/actions.at (Exotic Dollars): Use unused values.
7119 * tests/calc.at: Likewise.
7120 * tests/glr-regression.at (No users destructors if stack 0 deleted):
7121 Likewise.
7122
7123 * src/gram.c (rule_useful_p, rule_never_reduced_p): Use
7124 rule_useful_p.
7125
7126 2005-12-21 Paul Eggert <eggert@cs.ucla.edu>
7127
7128 Undo 2005-12-01 tentative license wording change. The wording is
7129 still being reviewed by the lawyers, and we don't want to wait for
7130 them before publishing a test release. For now, revert to the
7131 previous wording.
7132 * NEWS: Undo 2005-12-01 change.
7133 * data/glr.c: Revert to previous license wording.
7134 * data/glr.cc: Likewise.
7135 * data/lalr1.cc: Likewise.
7136 * data/location.cc: Likewise.
7137 * data/yacc.c: Likewise.
7138
7139 * NEWS: Reword %destructor vs YYABORT etc.
7140 * data/glr.c: Use American spacing, for consistency.
7141 * data/glr.cc: Likewise.
7142 * data/lalr1.cc: Likewise.
7143 * data/yacc.c: Likewise.
7144 * data/yacc.c: Reformat comments slightly.
7145 * doc/bison.texinfo: Replace "non-" with "non" when that makes sense,
7146 for consistency. Fix some spelling errors and reword recently-included
7147 text slightly.
7148 * tests/cxx-type.at: Cast results of malloc, for C++.
7149
7150 2005-12-21 Joel E. Denny <address@hidden>
7151
7152 * tests/cxx-type.at: Construct a tree, count the parents of shared
7153 nodes, and free each node once and only once. Previously, the memory
7154 for semantic values was leaked instead.
7155
7156 2005-12-21 Joel E. Denny <address@hidden>
7157
7158 * data/glr.c (struct yyGLRStack): If pure, add yyval and yyloc members.
7159 (yylval, yylloc): If pure, #define to yystackp->yyval and
7160 yystackp->yyloc similar to yychar and yynerrs.
7161 (yyparse): If pure, remove local yylval and yylloc. Add local
7162 yystackp to accommodate pure definitions of yylval and yylloc.
7163 (b4_lex_param, b4_lyyerror_args, b4_lpure_args): If pure, change
7164 yylvalp and yyllocp to &yylval and &yylloc.
7165 (nerrs, char, lval, lloc): If pure, add #define's for b4_prefix[]
7166 namespace. Previously, nerrs and char were missing, but lval and lloc
7167 weren't necessary.
7168 (yyprocessOneStack, yyreportSyntaxError, yyrecoverSyntaxError): Remove
7169 yylvalp and yyllocp parameters since, if pure, these are now always
7170 accessible through yystackp. If not pure, they are still accessible
7171 globally.
7172 * data/glr.c, data/yacc.c (YYLLOC_DEFAULT): Change `if (N)' to
7173 `if (YYID (N))' to pacify lint.
7174
7175 2005-12-21 Akim Demaille <akim@epita.fr>
7176
7177 YYACCEPT, YYERROR, and YYABORT, as user actions, should not
7178 destroy the RHS symbols of a rule.
7179 * data/yacc.c (yylen): Initialize to 0.
7180 Keep its value to the number of items to possibly shift.
7181 In particular, a regular successful parse that ends on YYFINAL by
7182 a (internal) YYACCEPT must not have yylen != 0.
7183 (yyerrorlab, yyreturn): Pop the RHS.
7184 Reorder a bit to emphasize the `shifting' bits of code.
7185 (YYPOPSTACK): Now accept a number of items to pop.
7186 * data/lalr1.cc: Likewise.
7187 * data/glr.c: Formatting changes.
7188 Use goto instead of fall through.
7189 * doc/bison.texinfo (Destructor Decl): Complete.
7190
7191 2005-12-20 Juan Manuel Guerrero <juan.guerrero@gmx.de>
7192
7193 * Makefile.am: DJGPP specific files added to EXTRA_DIST.
7194 * djgpp/Makefile.maint: Fix PACKAGE variable computation.
7195 * djgpp/config.bat: Replace every occurence of the file name
7196 scan-gram-c.c with c-scan-gram.c. The same for scan-skel-c.c with
7197 c-scan-skel.c to conform with the 8.3 file name restriction on MSDOS.
7198 * djgpp/config.sed: Replace every occurence of the file name
7199 scan-gram-c.c with c-scan-gram.c. The same for scan-skel-c.c with
7200 c-scan-skel.c to conform with the 8.3 file name restriction on MSDOS.
7201 * djgpp/djunpack.bat: DJGPP specific file.
7202 * djgpp/fnchange.lst: DJGPP specific file.
7203 * djgpp/README.in: Add new information about how to unpack the bison
7204 source on MSDOS and other systems which have 8.3 file name restrictions
7205 using djunpack.bat and fnchange.lst.
7206
7207 2005-12-12 Paul Eggert <eggert@cs.ucla.edu>
7208
7209 * bootstrap (build_cvs_prefix): Remove; unused.
7210 (CVS_PREFIX): Adjust to yesterday's Savannah reorganization
7211 when getting gnulib.
7212
7213 2005-12-12 "Joel E. Denny" <jdenny@ces.clemson.edu>
7214
7215 * data/glr.c: Reorder typedef declarations for structs to match order
7216 of struct declarations.
7217 Rename yystack everywhere to yystackp except in yyparse where it's not
7218 a pointer.
7219 (yyglrShift): Change parameter YYSTYPE yysval to YYSTYPE* yyvalp for
7220 consistency.
7221 (yyis_table_ninf): Change 0 to YYID (0) to pacify lint.
7222 (yyreportSyntaxError): Add /*ARGSUSED*/ to pacify lint.
7223 (yyparse): Change while (yytrue) to while ( YYID (yytrue)) to pacify
7224 lint.
7225
7226 2005-12-09 Paul Eggert <eggert@cs.ucla.edu>
7227
7228 * tests/sets.at (Accept): Fix typos in regular expression used to
7229 sed out the final state number.
7230
7231 Work around portability problem on Solaris 10: flex-generated
7232 files include <stdio.h> before <config.h>, which messes up
7233 because the latter defines __EXTENSIONS__. Address the problem
7234 by creating two new little files that include <config.h> first,
7235 then include the flex-generated files. Rewrite everyone else
7236 to include <config.h> first, as well.
7237 * lib/timevar.c: Always include "config.h".
7238 * src/Makefile.am (bison_SOURCES): Replace scan-gram.l with
7239 scan-gram-c.c, and scan-skel.l with scan-skel-c.c.
7240 (EXTRA_bison_SOURCES): New macro.
7241 * src/scan-gram-c.c, src/scan-skel-c.c: New files.
7242 * src/system.h: Don't include config.h.
7243 * src/LR0.c: Include <config.h> first.
7244 * src/assoc.c: Likewise.
7245 * src/closure.c: Likewise.
7246 * src/complain.c: Likewise.
7247 * src/conflicts.c: Likewise.
7248 * src/derives.c: Likewise.
7249 * src/files.c: Likewise.
7250 * src/getargs.c: Likewise.
7251 * src/gram.c: Likewise.
7252 * src/lalr.c: Likewise.
7253 * src/location.c: Likewise.
7254 * src/main.c: Likewise.
7255 * src/muscle_tab.c: Likewise.
7256 * src/nullable.c: Likewise.
7257 * src/output.c: Likewise.
7258 * src/parse-gram.y: Likewise.
7259 * src/print.c: Likewise.
7260 * src/print_graph.c: Likewise.
7261 * src/reader.c: Likewise.
7262 * src/reduce.c: Likewise.
7263 * src/relation.c: Likewise.
7264 * src/state.c: Likewise.
7265 * src/symlist.c: Likewise.
7266 * src/symtab.c: Likewise.
7267 * src/tables.c: Likewise.
7268 * src/uniqstr.c: Likewise.
7269 * src/vcg.c: Likewise.
7270
7271 * src/parse-gram.y: Fix minor problems uncovered by lint.
7272 (current_lhs, current_lhs_location): Now static.
7273 (current_assoc): Remove unused variable.
7274
7275 Cleanups so that Bison-generated parsers have less lint.
7276 * data/c.m4 (b4_yydestruct_generate, b4_yysymprint_generate):
7277 Prepend /*ARGSUSED*/, for lint's sake.
7278 * data/glr.c (YYUSE): Properly parenthesize, and use an alternate
7279 definition if 'lint' is defined.
7280 (YYID): New macro (or function, if lint).
7281 All uses of /*CONSTCOND*/0 replaced by YYID(0).
7282 * data/yacc.c: Likewise.
7283 * data/glr.c (yyuserAction, yyuserMerge, yy_reduce_print):
7284 (yyrecoverSyntaxError): Prepend /*ARGSUSED*/.
7285 * data/glr.cc (YYLLOC_DEFAULT): Omit /*CONSTCOND*/ since this code
7286 is C++ only.
7287 * data/lalr1.cc (YYUSE): Just use a cast, since this code is C++ only.
7288 * data/yacc.c (YYSTACK_FREE) [defined YYSTACK_ALLOC]:
7289 Use YYID(0) rather than 0, for lint.
7290 (yystrlen): Rewrite to avoid lint warning about ptrdiff_t overflow.
7291 (yysyntax_error): Rewrite to avoid lint warnings about parenthesization.
7292
7293 2005-12-07 Paul Eggert <eggert@cs.ucla.edu>
7294
7295 * tests/glr-regression.at
7296 (Improper handling of embedded actions and dollar(-N) in GLR parsers):
7297 Close memory leak reported by twlevo.
7298
7299 2005-12-06 "Joel E. Denny" <jdenny@ces.clemson.edu>
7300
7301 * data/glr.c (yyprocessOneStack, yyparse): Synchronize the shift for
7302 all stacks.
7303 (yyparse): Iterate another stack in order to call user destructors.
7304 * tests/glr-regression.at (No users destructors if stack 0 deleted):
7305 New test case.
7306 (Duplicated user destructor for lookahead): This test now is expected
7307 to succeed.
7308
7309 2005-12-01 Paul Eggert <eggert@cs.ucla.edu>
7310
7311 * NEWS: Document the following change.
7312 * data/yacc.c: Say "parser skeleton" rather than "file", since
7313 it's no longer just a file.
7314 * data/glr.c: Grant a special exception for C GLR parsers, that
7315 reads like the already-existing exception for C LALR(1) parsers.
7316 * data/glr.cc: Likewise.
7317 * data/lalr1.cc: Likewise.
7318 * data/location.cc: Likewise.
7319 * data/yacc.c: Reword the "written by" statement to clarify that
7320 it was the parser skeleton, not the entire output file.
7321 * data/glr.c: Written by Paul Hilfinger.
7322 * data/glr.cc: Written by Akim Demaille.
7323 * data/lalr1.cc: Likewise.
7324
7325 2005-11-18 Paul Eggert <eggert@cs.ucla.edu>
7326
7327 * data/yacc.c (yy_reduce_print, YY_REDUCE_PRINT):
7328 Fix typos in previous change that broke 'make check'.
7329 YY_REDUCE_PRINT cannot be a pseudo-varargs macro; that isn't
7330 supported in C.
7331 * tests/calc.at (_AT_CHECK_CALC,_AT_CHECK_CALC_ERROR):
7332 Don't check NUM-STDERR-LINES, since the output format is fluctuating.
7333 We can revert this once things settle down.
7334
7335 * src/conflicts.c (conflicts_print): Don't print file name twice
7336 when %expect fails because there were no conflicts.
7337 * doc/bison.texinfo (Expect Decl): Tighten up wording in previous
7338 change.
7339 * tests/conflicts.at (%expect not enough, %expect too much):
7340 (%expect with reduce conflicts): Adjust to new behavior.
7341
7342 2005-11-18 Akim Demaille <akim@epita.fr>
7343
7344 * src/conflicts.c (conflicts_print): Unsatisfied %expectation are
7345 errors.
7346 * NEWS: Document this.
7347 * doc/bison.texinfo (Expect Decl): Likewise.
7348
7349 2005-11-16 Akim Demaille <akim@epita.fr>
7350
7351 Generalize the display of semantic values and locations in traces.
7352 * data/glr.c (yy_reduce_print): Fix indices (again).
7353 * data/c++.m4 (b4_rhs_value, b4_rhs_location): Don't expect
7354 literal integers.
7355 * data/lalr1.cc (yyreduce_print): Rename as...
7356 (yy_reduce_print): this.
7357 Display values and locations.
7358 * data/yacc.c (yy_reduce_print): Likewise.
7359 (YY_REDUCE_PRINT): Adjust to pass the required arguments.
7360 (yysymprint): Move higher to be visible from yy_reduce_print).
7361 (yyparse): Adjust.
7362 * tests/calc.at: Adjust the expected length of the traces.
7363
7364 2005-11-14 Akim Demaille <akim@epita.fr>
7365
7366 * data/glr.c (yy_reduce_print): The loop was quite wrong: type are
7367 from 1 to N, while values and location start at 0.
7368 (b4_rhs_location, b4_rhs_value): Add parens around $1 and $2.
7369
7370 2005-11-14 Akim Demaille <akim@epita.fr>
7371
7372 * data/glr.c (yy_reduce_print): Fix the $ number.
7373
7374 2005-11-14 Akim Demaille <akim@epita.fr>
7375
7376 "Use" parse parameters.
7377 * data/c.m4 (b4_parse_param_for, b4_parse_param_use): New.
7378 * data/glr.c, data/glr.cc: Use them.
7379 * data/glr.c (YYUSE): Have a C++ definition that supports
7380 non-pointer types.
7381
7382 2005-11-14 Akim Demaille <akim@epita.fr>
7383
7384 * data/glr.c (yyexpandGLRStack): Declare only if defined.
7385
7386 2005-11-14 Akim Demaille <akim@epita.fr>
7387
7388 * data/glr.cc: New.
7389 * data/m4sugar/m4sugar.m4 (m4_prepend): New.
7390
7391 2005-11-12 Akim Demaille <akim@epita.fr>
7392
7393 Let position and location be PODs.
7394 * data/location.cc (position::initialize, location::initialize): New.
7395 (position::position, location::location): Define only if
7396 b4_location_constructors is defined.
7397 * data/lalr1.cc (b4_location_constructors): Define it for backward
7398 compatibility.
7399 * doc/bison.texinfo (Initial Action Decl): Use initialize.
7400
7401 2005-11-12 Akim Demaille <akim@epita.fr>
7402
7403 * data/lalr1.cc: Move the body of the ctor and dtor into the
7404 parser file (instead of the header).
7405 Wrap the implementations in a "namespace yy".
7406
7407 2005-11-12 Akim Demaille <akim@epita.fr>
7408
7409 Have glr.c include its header file when created.
7410 * data/glr.c (b4_shared_declarations): New.
7411 Output them verbatim in the parser if !%defines, otherwise
7412 output then in the header file, and include it instead.
7413
7414 2005-11-11 Akim Demaille <akim@epita.fr>
7415
7416 * data/glr.c: Comment changes.
7417
7418 2005-11-11 Akim Demaille <akim@epita.fr>
7419
7420 When yydebug, report semantic and location values for reductions.
7421 * data/glr.c (yy_reduce_print): Report the semantic values and the
7422 locations.
7423 (YY_REDUCE_PRINT): Adjust.
7424 (yyglrReduce): Use them.
7425 (b4_rhs_value, b4_rhs_location): Remove m4_eval invocations.
7426 * data/c.m4 (b4_yysymprint_generate): Specify the const arguments.
7427 * tests/calc.at (_AT_CHECK_CALC_ERROR): Remove the reduction
7428 traces.
7429
7430 2005-11-10 Akim Demaille <akim@epita.fr>
7431
7432 * data/glr.c (yynewGLRStackItem, YY_RESERVE_GLRSTACK): New.
7433 (yyaddDeferredAction, yyglrShift, yyglrShiftDefer): Use them.
7434 (yyexpandGLRStack, YYRELOC): Define only when YYSTACKEXPANDABLE.
7435
7436 2005-11-09 Albert Chin-A-Young <china@thewrittenword.com>
7437
7438 * m4/cxx.m4, examples/Makefile.am: Don't build
7439 examples/calc++ if no C++ compiler is available. (trivial change)
7440
7441 2005-11-09 Akim Demaille <akim@epita.fr>
7442
7443 * src/scan-skel.l: Use a couple of asserts.
7444
7445 2005-11-03 Akim Demaille <akim@epita.fr>
7446
7447 In some (weird) cases, the final state number is incorrect.
7448 Reported by Alexandre Duret-Lutz.
7449 * src/LR0.c (state_list_append): Remove the computation of
7450 final_state.
7451 (save_reductions): Do it here.
7452 (get_state): Alpha conversion.
7453 (generate_states): Use a for loop.
7454 * src/gram.h (item_number_is_rule_number)
7455 (item_number_is_symbol_number): New.
7456 * src/state.c: Use assert.
7457 * src/system.h: Include assert.h.
7458 * tests/sets.at (Accept): New.
7459
7460 2005-10-30 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
7461
7462 * data/glr.c (yyfill): Adjust comment.
7463 (yyresolveAction): Initialize default location properly
7464 for empty right-hand sides.
7465 (yydoAction): Ditto.
7466 Add comment explaining apparently dead code.
7467 * tests/glr-regression.at
7468 (Incorrectly initialized location for empty right-hand side in GLR):
7469 New test.
7470
7471 2005-10-30 Paul Eggert <eggert@cs.ucla.edu>
7472
7473 * bootstrap (cleanup_gnulib): New function. Use it to clean up
7474 gnulib when interrupted. This fixes some race conditions and
7475 works around some portability problems (one noted by Paul
7476 Hilfinger).
7477
7478 2005-10-22 Akim <akim@epita.fr>
7479
7480 * Makefile.cfg: Adjust to config -> build-aux.
7481 Reported by twledo.
7482
7483 2005-10-21 Akim Demaille <akim@epita.fr>
7484
7485 * data/c.m4 (b4_yydestruct_generate, b4_yysymprint_generate): Pass
7486 the %parse-params.
7487 * data/glr.c (YY_SYMBOL_PRINT, yydestroyGLRState): Adjust.
7488 * data/yacc.c (b4_Pure_if): Rename as...
7489 (b4_yacc_pure_if): this.
7490 (YY_SYMBOL_PRINT, yyparse): Adjust.
7491 * doc/bison.texinfo: Formatting changes.
7492
7493 2005-10-21 Akim Demaille <akim@epita.fr>
7494
7495 Finish the transition config -> build-aux.
7496 * configure.ac, Makefile.am: Use build-aux.
7497 * config/prev-version, config/announce-gen, config/Makefile.am:
7498 Move to...
7499 * build-aux/prev-version, build-aux/announce-gen,
7500 * build-aux/Makefile.am: here.
7501
7502 2005-10-14 Akim Demaille <akim@epita.fr>
7503
7504 * examples/calc++/test: Use set -x only when VERBOSE.
7505
7506 2005-10-13 Paul Eggert <eggert@cs.ucla.edu>
7507
7508 * NEWS: Bison now warns if it finds a stray `$' or `@' in an action.
7509 * src/scan-gram.l (<SC_BRACED_CODE>[$@]): Implement this.
7510
7511 2005-10-13 Akim Demaille <akim@epita.fr>
7512
7513 * src/scan-skel.l: Output the base name parts of the parser and
7514 header file names.
7515 * tests/output.at (AT_CHECK_OUTPUT): Support subdirectories, and
7516 additional checks.
7517 Use this to exercise C++ outputs in subdirs.
7518 Reported by Oleg Smolsky.
7519
7520 2005-10-12 Paul Eggert <eggert@cs.ucla.edu>
7521
7522 * data/c.m4 (b4_c_function_def): Look at __C99_FUNC__, not at
7523 __STDC_VERSION__, as IBM cc 7.0 doesn't define the latter either.
7524 Problem reported by John P. Hartmann.
7525 * data/yacc.c (YYMODERN_C): Likewise. Don't define if the user has
7526 already defined it.
7527
7528 2005-10-12 Akim Demaille <akim@epita.fr>
7529
7530 * src/parse-gram.y (version_check): Exit 63 to please missing
7531 (stands for "version mismatch).
7532 * tests/input.at, doc/bison.texinfo: Adjust.
7533
7534 2005-10-10 Paul Eggert <eggert@cs.ucla.edu>
7535
7536 Work around portability problems with Visual Age C compiler
7537 (xlc and xlC_r) reported by John P. Hartmann.
7538 * data/location.cc (initial_column, initial_line): Remove.
7539 All uses replaced by 0 and 1.
7540 * src/scan-gram.l (gram_wrap): Redefine to avoid bug in flex 2.5.31
7541 that xlc complains about.
7542 * src/scan-skel.l (skel_wrap): Likewise.
7543 * data/c.m4 (b4_c_function_def): Look at __STDC_VERSION__ as well
7544 as __STDC__.
7545 * data/yacc.c (YYMODERN_C): New macro, which also looks at
7546 __STDC_VERSION__. Use it everywhere instead of looking at
7547 __STDC__ and __cplusplus.
7548
7549 2005-10-10 Akim Demaille <akim@epita.fr>
7550
7551 * examples/calc++/test: Be quiet unless VERBOSE.
7552
7553 2005-10-05 Paul Eggert <eggert@cs.ucla.edu>
7554
7555 * data/c.m4 (yydestruct, yysymprint):
7556 Use YYUSE instead of casting to void.
7557 * data/glr.c (YYUSE): New macro.
7558 (yyuserMerge, yyreportAmbiguity, yyreportSyntaxError):
7559 Use it instead of rolling our own.
7560 (YYLLOC_DEFAULT, YYCHK, YYDPRINTF, YY_SYMBOL_PRINT, YY_REDUCE_PRINT):
7561 (YYCHK1):
7562 Use /*CONSTCOND*/ to suppress lint warnings.
7563 * data/lalr1.cc (YYLLOC_DEFAULT, YY_SYMBOL_PRINT, YY_REDUCE_PRINT):
7564 (YY_STACK_PRINT): Use 'false' not '0'.
7565 (YYUSE): New macro.
7566 (yysymprint_, yydestruct_): Use it instead of rolling our own.
7567 * data/yacc.c (YYUSE): New macro.
7568 (YYCOPY, YYSTACK_RELOCATE, YYBACKUP, YYLLOC_DEFAULT):
7569 (YYDPRINTF, YY_SYMBOL_PRINT, YY_STACK_PRINT, YY_REDUCE_PRINT):
7570 (yyerrorlab): Use /*CONSTCOND*/ to suppress lint warnings.
7571
7572
7573 * data/m4sugar/m4sugar.m4 (_m4_map): New macro.
7574 (m4_map, m4_map_sep): Use it. Handle the empty list correctly.
7575
7576 2005-10-04 Paul Eggert <eggert@cs.ucla.edu>
7577
7578 Undo the parts of the unlocked-I/O change that substituted
7579 putc or puts for printf. This might hurt performance a bit,
7580 but some people prefer the printf style.
7581 * data/c.m4 (yysymprint): Prefer printf to puts and putc.
7582 * data/glr.c (YYFPUTC, YYFPUTS, YYDPUTS): Remove.
7583 All uses replaced by YYFPRINTF and YYDPRINTF.
7584 * data/yacc.c: Likewise.
7585 * lib/bitset.c (bitset_print): Likewise.
7586 * lib/bitsetv.c (bitsetv_dump, debug-bitsetv): Prefer printf to
7587 putc and puts.
7588 * lib/lbitset.c (debug_lbitset): Likewise.
7589 * src/closure.c (print_firsts, print_fderives): Likewise.
7590 * src/gram.c (grammar_dump): Likewise.
7591 * src/lalr.c (look_ahead_tokens_print): Likewise.
7592 * src/output.c (escaped_output): Likewise.
7593 (user_actions_output): Break apart two printfs.
7594 * src/parse-gram.y (%printer): Prefer printf to putc and puts.
7595 * src/reduce.c (reduce_print): Likewise.
7596 * src/state.c (state_rule_look_ahead_tokens_print): Likewise.
7597 * src/system.h: Include unlocked-io.h rathe than stdio.h.
7598
7599 * data/glr.c (yyuserMerge, yyreportAmbiguity, yyreportSyntaxError):
7600 Use assignments rather than casts-to-void to suppress
7601 unused-variable warnings. This pacifies 'lint'.
7602 * data/lalr1.cc (yysymprint_, yydestruct_): Use a call to suppress
7603 unused-variable warnings.
7604
7605 2005-10-03 Juan Manuel Guerrero <juan.guerrero@gmx.de>
7606
7607 * Makefile.am: DJGPP specific files added to EXTRA_DIST.
7608
7609 2005-10-02 Paul Eggert <eggert@cs.ucla.edu>
7610
7611 Use unlocked I/O for a minor performance improvement on hosts like
7612 GNU/Linux and Solaris that support unlocked I/O. The basic idea
7613 is to use the gnlib unlocked-io module, and to prefer putc and
7614 puts to printf when either will work (since the latter doesn't
7615 come in an unlocked flavor).
7616 * bootstrap (gnulib_modules): Add unlocked-io.
7617 * data/c.m4 (yysymprint): Prefer puts and putc to printf.
7618 * data/glr.c (YYFPUTC, YYFPUTS, YYDPUTS): New macros.
7619 Prefer them to YYFPRINTF and YYDPRINTF if either will do,
7620 and similarly for puts and putc and printf.
7621 * data/yacc.c: Likewise.
7622 * lib/bitset.c (bitset_print): Likewise.
7623 * lib/bitset.h [USE_UNLOCKED_IO]: Include unlocked-io.h.
7624 * lib/bitsetv.c (bitsetv_dump, debug-bitsetv): Prefer putc and puts
7625 to printf.
7626 * lib/lbitset.c (debug_lbitset): Likewise.
7627 * src/closure.c (print_firsts, print_fderives): Likewise.
7628 * src/gram.c (grammar_dump): Likewise.
7629 * src/lalr.c (look_ahead_tokens_print): Likewise.
7630 * src/output.c (escaped_output): Likewise.
7631 (user_actions_output): Coalesce two printfs.
7632 * src/parse-gram.y (%printer): Prefer putc and puts to printf.
7633 * src/reduce.c (reduce_print): Likewise.
7634 * src/state.c (state_rule_look_ahead_tokens_print): Likewise.
7635 * src/system.h: Include unlocked-io.h rather than stdio.h.
7636
7637 * data/lalr1.cc: Don't put an unmatched ' in a dnl comment, as
7638 this confuses xgettext.
7639
7640 2005-10-02 Akim Demaille <akim@epita.fr>
7641
7642 * bootstrap (gnulib_modules): Add strverscmp.
7643 * lib/.cvsignore: Add strverscmp.c, strverscmp.h.
7644 * m4/.cvsignore: Add strverscmp.m4.
7645 * src/parse-gram.y (%require): New token, new rule.
7646 (version_check): New.
7647 * src/scan-gram.l (%require): Adjust.
7648 * tests/input.at (AT_REQUIRE): New.
7649 Use it.
7650 * doc/bison.texinfo (Require Decl): New.
7651 (Calc++ Parser): Use %require.
7652
7653 2005-10-02 Akim Demaille <akim@epita.fr>
7654
7655 * data/location.cc: New.
7656
7657 2005-10-02 Paul Eggert <eggert@cs.ucla.edu>,
7658 Akim Demaille <akim@epita.fr>
7659
7660 Make sure -odir/foo.cc creates dir/location.hh etc.
7661 * src/files.h (spec_outfile, parser_file_name, spec_name_prefix)
7662 (spec_file_prefix, spec_verbose_file, spec_graph_file)
7663 (spec_defines_file): Now const.
7664 (dir_prefix): New.
7665 (short_base_name): Remove.
7666 * src/files.c: Adjust.
7667 (dirname.h): Include.
7668 (base_name): Don't prototype it.
7669 (finput): Remove, duplicates gram_in.
7670 (full_base_name, short_base_name): Replace by...
7671 (all_but_ext, all_but_tab_ext): these.
7672 (compute_base_names): Rename as...
7673 (compute_file_name_parts): this.
7674 Update to compute the new variables, including dir_prefix.
7675 Adjust dependencies.
7676 * src/output.c (prepare): Output them.
7677 * src/reader.c: Adjust to use gram_in, not finput.
7678 * src/scan-skel.l (@dir_prefix@): New.
7679
7680 2005-10-02 Juan Manuel Guerrero <juan.guerrero@gmx.de>
7681
7682 * lib/subpipe.c: New function end_of_output_subpipe() added
7683 to allow support for non-posix systems. This is a no-op function
7684 for posix systems.
7685
7686 * lib/subpipe.h: New function end_of_output_subpipe() added
7687 to allow support for non-posix systems. This is a no-op function
7688 for posix systems.
7689
7690 * src/output.c (output_skeleton): Use end_of_output_subpipe() to
7691 handle the lack of pipe/fork functionality on non-posix systems.
7692
7693 * djgpp/Makefile.maint: DJGPP specific file.
7694
7695 * djgpp/README.in: DJGPP specific file.
7696
7697 * djgpp/config.bat: DJGPP specific configuration file.
7698
7699 * djgpp/config.sed: DJGPP specific configuration file.
7700
7701 * djgpp/config.site: DJGPP specific configuration file.
7702
7703 * djgpp/config_h.sed: DJGPP specific configuration file.
7704
7705 * djgpp/subpipe.c: DJGPP specific replacement file for lib/subpipe.c.
7706
7707 * djgpp/subpipe.h: DJGPP specific replacement file for lib/subpipe.h.
7708
7709 2005-10-02 Akim Demaille <akim@epita.fr>
7710
7711 * data/location.cc: New, extract from...
7712 * data/lalr1.cc: here.
7713 (location.hh): Include it after the user prologue, in case the
7714 filename type is defined by the user.
7715 Forward declation location and position before the pre-prologue.
7716 (yyresult_): Rename as...
7717 (yyresult): this, it's a local variable, not an attribute.
7718 * data/Makefile.am (dist_pkgdata_DATA): Adjust.
7719
7720 2005-10-01 Akim Demaille <akim@epita.fr>
7721
7722 * examples/extexi: Restore the #line generation.
7723
7724 2005-09-30 Akim Demaille <akim@epita.fr>,
7725 Alexandre Duret-Lutz <adl@gnu.org>
7726
7727 Move the token type and YYSTYPE in the parser class.
7728 * data/lalr1.cc (stack.hh, location.hh): Include earlier.
7729 (parser::token): New, from the moved free definition of tokens.
7730 (parser::semantic_value): Now a full definition instead of an
7731 indirection to YYSTYPE.
7732 (b4_post_prologue): No longer included in the header file, but
7733 in the implementation file.
7734 * doc/bison.texi (C+ Language Interface): Update.
7735 * src/parse-gram.y: Support unary %define.
7736 * tests/actions.at: Define global_tokens_and_yystype for backward
7737 compatibility until we update the tests.
7738 * tests/calc.at: Idem.
7739 (first_line, first_column, last_line, last_column): Define for lalr1.cc
7740 to simplify the code.
7741
7742 2005-09-29 Paul Eggert <eggert@cs.ucla.edu>
7743
7744 Port to SunOS 4.1.4, which lacks strtoul and strerror.
7745 Ah, the good old days! Problem reported by Peter Klein.
7746 * bootstrap (gnulib_modules): Add strerror, strtoul.
7747 * lib/.cvsignore: Add strerror.c, strtol.c, strtoul.c
7748 * m4/.cvsignore: Add strerror.m4, strtol.m4, strtoul.m4.
7749
7750 2005-09-29 Akim Demaille <akim@epita.fr>
7751
7752 * data/c.m4 (b4_error_verbose_if): New.
7753 * data/lalr1.cc: Use it.
7754 (YYERROR_VERBOSE_IF): Remove.
7755 (yyn_, yylen_, yystate_, yynerrs_, yyerrstatus_): Remove as
7756 parser members, replaced by...
7757 (yyn, yylen, yystate, yynerss, yyerrstatus): these parser::parse
7758 local variables.
7759 (yysyntax_error_): Takes the state number as argument.
7760 (yyreduce_print_): Use the argument yyrule, not the former
7761 attribute yyn_.
7762
7763 2005-09-26 Paul Eggert <eggert@cs.ucla.edu>
7764
7765 * bootstrap (gnulib_modules): Add verify.
7766 * lib/.cvsignore: Add verify.h.
7767 * src/getargs.c: Use ARGMATCH_VERIFY rather than verify.
7768 * src/system.h (verify): Remove.
7769 Include verify.h instead.
7770 * src/tables.c (tables_generate): Use new API for 'verify'.
7771
7772 2005-09-21 Paul Eggert <eggert@cs.ucla.edu>
7773
7774 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Do not use
7775 local variables whose names begin with 'yy'.
7776 * tests/calc.at (_AT_DATA_CALC_Y): Likewise.
7777 Trivial changes from Joel E. Denny.
7778
7779 * bootstrap (gnulib_modules): Remove alloca. Bison doesn't need
7780 it itself.
7781 * src/main.c (main) [C_ALLOCA]: Don't flush alloca'ed memory; we
7782 don't use alloca any more.
7783
7784 * data/yacc.c [YYSTACK_USE_ALLOCA && !defined __GNUC__ && ! defined
7785 __BUILTIN_VA_ARG_INCR && ! defined _AIX && ! defined _MSC_VER &&
7786 defined _ALLOCA_H]: Don't include <stdlib.h>; not needed in this case.
7787 * tests/torture.at (Exploding the Stack Size with Alloca): Adjust
7788 to match yacc.c, to test more hosts.
7789
7790 2005-09-20 Paul Eggert <eggert@cs.ucla.edu>
7791
7792 * data/yacc.c (YYSIZE_T): Reindent to make it clearer. This
7793 doesn't affect behavior.
7794 (YYSTACK_ALLOC) [YYSTACK_USE_ALLOCA]: Improve support for
7795 Solaris, AIX, MSC.
7796 (_STDLIB_H): Renamed from YYINCLUDED_STDLIB_H. All uses changed.
7797 This works a bit better with glibc, if user code has already included
7798 stdlib.h.
7799 * doc/bison.texinfo (Bison Parser): Document that users can't
7800 arbitrarily use malloc and free for other purposes. Document
7801 that <alloca.h> and <malloc.h> might be included.
7802 (Table of Symbols): Under YYSTACK_USE_ALLOCA, Don't claim that the
7803 user must declare alloca.
7804
7805 * HACKING (release): Forwarn the Translation Project about
7806 stable releses.
7807
7808 2005-09-20 Akim Demaille <akim@epita.fr>
7809
7810 * data/glr.c: Use b4_token_enums, not b4_token_enums_defines.
7811
7812 2005-09-19 Paul Eggert <eggert@cs.ucla.edu>
7813
7814 * data/yacc.c (YYSIZE_MAXIMUM): New macro.
7815 (YYSTACK_ALLOC_MAXIMUM): Use it.
7816 (yysyntax_error): New function.
7817 (yyparse) [YYERROR_VERBOSE]: Don't leak memory indefinitely if
7818 multiple syntax errors are reported, and alloca is being used.
7819 Instead, reallocate buffers twice as big each time, so that
7820 we waste at most half the allocated memory. Start with a small
7821 (128-byte) buffer that will suffice in most cases anyway.
7822 Use yysyntax_error to do most of the work.
7823
7824 * doc/bison.texinfo (Error Reporting, Table of Symbols):
7825 yynerrs is the number of errors reported, not the number of
7826 errors encountered.
7827
7828 * tests/glr-regression.at (Duplicated user destructor for lookahead):
7829 Mark it as expected to fail.
7830 Cast result of malloc; problem reported by twlevo@xs4all.nl.
7831 * tests/actions.at, tests/calc.at, tests/glr-regression.at:
7832 Don't start user-code symbols with "yy", to avoid name space problems.
7833
7834 2005-09-19 Akim Demaille <akim@epita.fr>
7835
7836 Remove the traits, failed experiment.
7837 It never proved useful, and anyway because of the current
7838 definition, it was not possible to have several specialization of
7839 this traits, making it useless.
7840 * data/lalr1.cc (yy:traits): Remove.
7841 Inline its definitions in the parser class.
7842
7843 2005-09-19 Akim Demaille <akim@epita.fr>
7844
7845 * tests/atlocal.in (LIBS): Pass INTLLIBS to address failures on at
7846 least Mac OSX with a /usr/local install of gettext.
7847
7848 2005-09-19 Akim Demaille <akim@epita.fr>
7849
7850 * data/lalr1.cc (yyparse): Rename yylooka and yyilooka as yychar
7851 and yytoken for similarity with the other skeletons.
7852
7853 2005-09-19 Akim Demaille <akim@epita.fr>
7854
7855 * NEWS, configure.ac: update version number to 2.1a.
7856
7857 2005-09-16 Paul Eggert <eggert@cs.ucla.edu>
7858
7859 * NEWS: Version 2.1.
7860
7861 * NEWS: Remove notice of yytname change, since it was never in an
7862 official release.
7863 * data/glr.c (yydestroyGLRState): Rename local var to avoid shadowing
7864 diagnostic.
7865 * src/output.c (prepare): Likewise.
7866 * data/lalr1.cc (YYERROR_VERBOSE_IF): New macro.
7867 (yysyntax_error_): Use it to avoid GCC warning when YYERROR_VERBOSE
7868 is not defined. This is an awful hack, but it's enough for now.
7869 All callers changed.
7870 * tests/glr-regression-at (make_value): Args are const pointers now,
7871 to avoid GCC warning.
7872 (Duplicated user destructor for lookahead): New test. Currently
7873 skipped. It fails on my host but I'm not sure it'll always fail.
7874
7875 2005-09-16 Akim Demaille <akim@epita.fr>
7876
7877 * src/symtab.h (struct symbol): Declare the printer and destructor
7878 as const, to avoid accidental calls to free.
7879 (symbol_destructor_set, symbol_printer_set): Adjust.
7880 * src/symtab.c: Adjust.
7881
7882 2005-09-16 Akim Demaille <akim@epita.fr>
7883
7884 * data/c.m4 (b4_token_enums): New.
7885 (b4_token_defines): Rename as...
7886 (b4_token_enums_defines): this.
7887 (b4_token_defines): New, output only the #defines.
7888 * data/yacc.c, data/glr.c: Adjust.
7889 * data/lalr1.cc: Use b4_token_enums instead of b4_token_enums_defines.
7890 * data/c.m4 (b4_yydestruct_generate, b4_yysymprint_generate): Define
7891 as default values.
7892
7893 2005-09-16 Akim Demaille <akim@epita.fr>
7894
7895 * data/lalr1.cc (yylex_): Remove, inline its code.
7896 (yyreport_syntax_error_): Remove, replaced by...
7897 (yysyntax_error_): this which returns a string and leaves to the
7898 caller the call to the users' error function.
7899 (yylooka_, yyilooka_, yylval, yylloc, yyerror_range_, yyval, yyloc):
7900 Move from members of the parser object...
7901 (yylooka, yyilooka, yylval, yylloc, yyerror_range, yyval, yyloc):
7902 to local variables of the parse function.
7903
7904 2005-09-16 Akim Demaille <akim@epita.fr>
7905
7906 * doc/bison.texinfo (Calc++ Parser): Don't promote defining YYEOF
7907 since it's in Bison's name space.
7908
7909 2005-09-15 Paul Eggert <eggert@cs.ucla.edu>
7910
7911 * data/glr.c (yyresolveValue): Add default case to pacify
7912 gcc -Wswitch-default. Problem reported by twlevo@xs4all.nl.
7913
7914 * NEWS: Document when yyparse started to return 2.
7915 * doc/bison.texinfo (Parser Function): Document when yyparse
7916 returns 2.
7917
7918 * data/lalr1.cc: Revert part of previous change, as it's incompatible.
7919 (b4_filename_type): Renamed back from b4_file_name_type. All uses
7920 changed.
7921 (class position): file_name -> filename (reverting). All uses changed.
7922
7923 2005-09-14 Paul Eggert <eggert@cs.ucla.edu>
7924
7925 * examples/calc++/Makefile.am ($(calc_sources_generated)): Don't
7926 do anything if $@ exists. This reverts part of the 2005-07-07
7927 patch.
7928
7929 2005-09-11 Paul Eggert <eggert@cs.ucla.edu>
7930
7931 * Makefile.am (EXTRA_DIST): Do not distribute REFERENCES; it
7932 contains obsolete information and isn't worth distributing as a
7933 separate file anyway.
7934 * data/glr.c [defined YYSETJMP]: Don't include <setjmp.h>.
7935 (YYJMP_BUF, YYSETJMP, YYLONGJMP) [!defined YYSETJMP]: New macros.
7936 All uses of jmp_buf, setjmp, longjmp changed to use these instead.
7937 (yyparse): Abort if user code uses longjmp to throw an unexpected
7938 value.
7939
7940 2005-09-09 Paul Eggert <eggert@cs.ucla.edu>
7941
7942 * data/c.m4 (b4_identification): Define YYBISON_VERSION.
7943 Suggested by twlevo@xs4all.nl.
7944
7945 * data/glr.c (YYCHK1): Do not assume YYE is in range.
7946 This avoids a diagnostic from gcc -Wswitch-enum.
7947 Problem reported by twlevo@xs4all.nl.
7948
7949 * doc/bison.texinfo: Don't use "filename", as per GNU coding
7950 standards. Use "file name" or "file" or "name", depending on
7951 the context.
7952 (Invocation): The output of "bison hack/foo.y" goes to foo.tab.c,
7953 not to hack/foo.tab.c.
7954 (Calc++ Top Level): 2nd arg of main is not const.
7955 * data/glr.c: b4_filename -> b4_file_name.
7956 * data/lalr1.cc: Likewise. Also, b4_filename_type -> b4_file_name_type.
7957 All uses changed.
7958 (class position): filename -> file_name. All uses changed.
7959 * data/yacc.c: b4_filename -> b4_file_name.
7960 * lib/bitset.h: filename -> file_name in local vars.
7961 * lib/bitset_stats.c: Likewise.
7962 * src/files.c: Likewise.
7963 * src/scan-skel.l ("@output ".*\n): Likewise.
7964 * src/files.c (file_name_split): Renamed from filename_split.
7965 * src/muscle_tab.c (muscle_init): Output b4_file_name, not b4_filename.
7966
7967 2005-09-08 Paul Eggert <eggert@cs.ucla.edu>
7968
7969 * lib/.cvsignore: Add pipe-safer.c, stdio--.h, unistd--.h,
7970 to accommodate latest gnulib.
7971
7972 * tests/glr-regression.at (Duplicate representation of merged trees):
7973 Add casts to pacify g++. Problem reported by twlevo@xs4all.nl.
7974
7975 * bootstrap: Add comment as to why the AM_LANGINFO_CODESET hack is
7976 needed.
7977
7978 2005-08-26 Paul Eggert <eggert@cs.ucla.edu>
7979
7980 * data/glr.c (yydestroyGLRState): Renamed from yydestroyStackItem.
7981 All uses changed. Invoke user destructor after an error during a
7982 split parse (trivial change from Joel E. Denny).
7983
7984 * tests/glr-regression.at
7985 (User destructor after an error during a split parse): New test case.
7986 Problem reported by Joel E. Denny in:
7987 http://lists.gnu.org/archive/html/bison-patches/2005-08/msg00029.html
7988
7989 2005-08-25 Paul Eggert <eggert@cs.ucla.edu>
7990
7991 * README-cvs: Give URLs for recommended tools.
7992 Mention Gzip version problem, and bootstrapping issues.
7993 Remove troubleshooting section, as it's somewhat obsolete.
7994
7995 * bootstrap (no_cache): New var, to accommodate different wget
7996 variants. Use it instead of '-C off'. Problem reported by
7997 twlevo@xs4all.nl.
7998
7999 * data/glr.c (yydestroyStackItem): New function.
8000 (yyrecoverSyntaxError, yyreturn): Use it to improve quality of
8001 debugging information. Problem reported by Joel E. Denny.
8002
8003 2005-08-25 Akim Demaille <akim@epita.fr>
8004
8005 * tests/local.at (AT_COMPILE_CXX): Pass $LINKS too.
8006
8007 2005-08-24 Paul Eggert <eggert@cs.ucla.edu>
8008
8009 * data/glr.c (yyrecoverSyntaxError, yyreturn):
8010 Don't invoke destructor on unresolved entries.
8011 * tests/glr-regression.at
8012 (User destructor for unresolved GLR semantic value): New test case.
8013 Problem reported by Joel E. Denny in:
8014 http://lists.gnu.org/archive/html/bison-patches/2005-08/msg00016.html
8015
8016 2005-08-21 Paul Eggert <eggert@cs.ucla.edu>
8017
8018 * lib/.cvsignore: Remove realloc.c, strncasecmp.c, xstrdup.c.
8019 Add strnlen.c.
8020 * m4/.cvsignore: Remove codeset.m4, gettext.m4, lib-ld.m4,
8021 lib-prefix.m4, po.m4.
8022
8023 * data/glr.c (yyreturn): Use "Cleanup:" rather than "Error:"
8024 in yydestruct diagnostic, since it might not be an error.
8025 Problem reported by Joel Denny near end of
8026 <http://lists.gnu.org/archive/html/help-bison/2005-07/msg00040.html>.
8027 * data/lalr1.cc (yyerturn): Likewise.
8028 * data/yacc.c (yyreturn): Likewise.
8029 * tests/calc.at (_AT_CHECK_CALC_ERROR): Adjust to the above change.
8030
8031 * src/files.c: Remove obsolete FIXME comment.
8032
8033 * data/glr.c (YY_SYMBOL_PRINT): Append a newline, for consistency
8034 with the other templates, and to fix bogus run-on messages such
8035 as the one reported at the end of
8036 <http://lists.gnu.org/archive/html/help-bison/2005-07/msg00040.html>.
8037 All callers changed to avoid the newline.
8038 (yyprocessOneStack): Output two lines rather than one, to accommodate
8039 the above change. This changes the debug output format slightly.
8040
8041 * data/glr.c (yyresolveValue): Fix redundant parse tree problem
8042 reported by Joel E. Denny in
8043 <http://lists.gnu.org/archive/html/bison-patches/2005-08/msg00004.html>
8044 (trivial change).
8045 * tests/glr-regression.at (Duplicate representation of merged trees):
8046 New test, from Joel E. Denny in:
8047 <http://lists.gnu.org/archive/html/help-bison/2005-07/msg00013.html>.
8048 * THANKS: Add Joel E. Denny.
8049
8050 * configure.ac (AC_INIT): Bump to 2.0c.
8051
8052 2005-07-24 Paul Eggert <eggert@cs.ucla.edu>
8053
8054 * NEWS: Version 2.0b.
8055
8056 * Makefile.am (SUBDIRS): Put examples before tests, so that
8057 "make check" doesn't finish with "All 1 tests passed".
8058
8059 * tests/regression.at (Token definitions): Don't rely on
8060 AT_PARSER_CHECK for data that contains backslashes. It currently
8061 uses 'echo', and 'echo' isn't portable if its argument contains
8062 backslashes. Problem found on OpenBSD 3.4. Also, do not assume
8063 that the byte '\0xff' is not printable in the C locale; it is,
8064 under OpenBSD 3.4 (!). Luckily, '\0x80' through '\0x9e' are
8065 not printable, so use '\0x81' to test.
8066
8067 * data/glr.c (YYOPTIONAL_LOC): Define even if it's not a recent
8068 version of GCC, since the macro is used with non-GCC compilers.
8069
8070 Fix core dump reported by Pablo De Napoli in
8071 <http://lists.gnu.org/archive/html/bug-bison/2005-07/msg00053.html>.
8072 * tests/regression.at (Invalid inputs with {}): New test.
8073 * src/parse-gram.y (token_name): Translate type before using
8074 it as an index.
8075
8076 * data/glr.c (ATTRIBUTE_UNUSED): Remove, since it infringes on
8077 the user's name space. All uses changed to __attribute__
8078 ((__unused__)).
8079 (yyFail, yyMemoryExhausted, yyreportAmbiguity):
8080 Add __attribute__ ((__noreturn__)).
8081
8082 * etc/clcommit: Remove. We weren't using it, and it failed
8083 "make maintainer-distcheck".
8084 * Makefile.maint: Merge from coreutils.
8085 (CVS_LIST, CVS_LIST_EXCEPT): New macros.
8086 (syntax-check-rules): Change list of rules as described below.
8087 (sc_cast_of_alloca_return_value, sc_dd_max_sym_length):
8088 (sc_file_system, sc_obsolete_symbols, sc_prohibit_atoi_atof):
8089 (sc_prohibit_jm_in_m4, sc_root_tests, sc_tight_scope):
8090 (sc_trailing_space): New rules.
8091 (sc_xalloc_h_in_src): Remove.
8092 (sc_cast_of_argument_to_free, sc_cast_of_x_alloc_return_value):
8093 (sc_space_tab, sc_error_exit_success, sc_changelog):
8094 (sc_system_h_headers, sc_sun_os_names, sc_unmarked_diagnostics):
8095 (makefile-check, po-check, author_mark_check):
8096 (makefile_path_separator_check, copyright-check):
8097 Use grep -n, to make it easier to find violations.
8098 Use CVS_LIST and CVS_LIST_EXCEPT.
8099 (header_regexp, h_re): Remove.
8100 (dd_c): New macro.
8101 (sc_dd_max_sym_length, .re-list, news-date-check): New rules.
8102 (my-distcheck): Use more-modern GCC flags.
8103 (signatures, %.asc): Remove.
8104 (rel-files, announcement): Remove signatures.
8105 Restore old updating code, even though we don't use it, so
8106 that we're the same as coreutils.
8107 (alpha, beta, major): Depend on news-date-check.
8108 Make the upload commands.
8109
8110 * data/c.m4, data/lalr1.cc, data/yacc.c: Normalize white space.
8111 * lib/abitset.h, lib/bbitset.h, lib/bitset.h: Likewise.
8112 * lib/bitset_stats.c, lib/ebitset.h, lib/lbitset.c: Likewise.
8113 * lib/libitset.h, lib/timevar.c, lib/vbitset.h: Likewise.
8114 * src/Makefile.am, src/gram.c, src/muscle_tab.h: Likewise.
8115 * src/parse-gram.y, src/system.h, src/tables.c, src/vcg.c: Likewise.
8116 * src/vcg_defaults.h, tests/cxx-type.at, tests/existing.at: Likewise.
8117 * tests/sets.at: Likewise.
8118
8119 * data/m4sugar/m4sugar.m4: Sync from Autoconf, except that
8120 we comment out the Autoconf version number.
8121 * doc/bison.texinfo (Calc++ Scanner): Don't use atoi, as
8122 it's error-prone and "make maintainer-distcheck" rejects it.
8123
8124 * lib/subpipe.c: Include <fcntl.h> without checking for HAVE_FCNTL_H.
8125 Indent calls to "error" to pacify "make maintainer-distcheck",
8126 when the calls are not intended to be translated.
8127 * m4/subpipe.m4 (BISON_PREREQ_SUBPIPE): Don't check for fcntl.h.
8128
8129 * src/Makefile.am (DEFS): Use +=, to pacify
8130 "make maintainer-distcheck".
8131 (bison_SOURCES): Add scan-skel.h.
8132 (sc_tight_scope): New rule, from coreutils.
8133
8134 * src/files.c (src_extension, header_extension):
8135 Now static, not extern.
8136 * src/getargs.c (short_options): Likewise.
8137 * src/muscle_tab.c (muscle_table): Likewise.
8138 * src/parse-gram.y (current_class, current_type, current_prec):
8139 Likewise.
8140 * src/reader.c (grammar_end, previous_rule_end): Likewise.
8141 * src/getargs.h: Redo comments to pacify "make maintainer-distcheck".
8142 * src/main.c (main): Cast bindtextdomain and textdomain calls to
8143 void, to avoid warning when NLS is disabled.
8144 * src/output.c: Include scan-skel.h.
8145 (scan_skel): Remove decl, since scan-skel.h does this.
8146 (output_skeleton):
8147 Indent calls to "error" to pacify "make maintainer-distcheck".
8148 * src/print_graph.c: Don't include <obstack.h>, as system.h does this.
8149 * src/reader.h (gram_end, gram_lineno): New decls to pacify
8150 "make maintainer-distcheck".
8151 * src/scan-skel.l (skel_lex, skel_get_lineno, skel_get_in):
8152 (skel_get_out, skel_get_leng, skel_get_text, skel_set_lineno):
8153 (skel_set_in, skel_set_out, skel_get_debug, skel_set_debug):
8154 (skel_lex_destroy, scan_skel): Move these decls to...
8155 * src/scan-skel.h: New file.
8156 * src/uniqstr.c (uniqstr_assert):
8157 Indent calls to "error" to pacify "make maintainer-distcheck".
8158
8159 * tests/Makefile.am ($(srcdir)/package.m4): Use $(VAR),
8160 not @VAR@.
8161
8162 * tests/torture.at: Revamp to avoid misuse of atoi that
8163 "make maintainer-distcheck" complained about.
8164
8165 * examples/extexi (message): Don't print a message more than once,
8166 and omit line-number decoration that makes Emacs compile think
8167 that informative messages are worth worrying about.
8168
8169 2005-07-22 Paul Eggert <eggert@cs.ucla.edu>
8170
8171 * configure.ac: Update version number.
8172
8173 * Makefile.am (SUBDIRS): Add examples; somehow this got removed
8174 accidentally.
8175 * examples/calc++/calc++-parser.yy: Remove from CVS, as it's
8176 autogenerated by the maintainer.
8177 * examples/calc++/.cvsignore: Add *.yy.
8178
8179 * lib/bitset.c (bitset_alloc): Don't cast xcalloc result.
8180 * lib/bitset_stats.c (bitset_stats_init): Likewise.
8181 * lib/bitsetv.c (bitsetv_alloc): Likewise.
8182
8183 * po/POTFILES.in: Add lib/xalloc-die.c; remove lib/xmalloc.c.
8184
8185 * src/relation.c (relation_transpose): Rewrite to avoid bogus complaint
8186 from maintainer-distcheck about casting the argument of 'free'.
8187
8188 * NEWS: Mention recent yytname changes.
8189 * THANKS: Add Anthony Heading, twlevo@xs4all.nl.
8190
8191 * bootstrap: For translations that have not yet been upgraded to
8192 the new runtime-po domain, prime the pump by extracting the
8193 relevant strings from the obsolete translations. This code can be
8194 removed once the bison-runtime domain has been translated by each
8195 team.
8196
8197 * src/scan-gram.l (<SC_PRE_CODE>.): Don't double-quote token names,
8198 now that token names are already quoted.
8199
8200 Fix problem reported by Anthony Heading.
8201 * data/glr.c (YYTOKEN_TABLE): New macro.
8202 (yytname): Define if YYTOKEN_TABLE.
8203 * data/yacc.c (YYTOKEN_TABLE, yytname): Likewise.
8204 * data/lalr1.cc (YYTOKEN_TABLE, yytname_): Likewise.
8205 (YYERROR_VERBOSE): Define the same way the other skeletons do.
8206 * src/output.c (prepare_symbols): Output token_table_flag.
8207
8208 2005-07-21 Paul Eggert <eggert@cs.ucla.edu>
8209
8210 * data/glr.c (yyinitGLRStack, yyreturn): Don't call malloc
8211 again if the first call fails.
8212
8213 * data/glr.c (yytnamerr): New function.
8214 (yyreportSyntaxError): Use it to dequote most string literals.
8215 * data/lalr1.c (yytname_): Renamed from yyname_, for compatibility
8216 with other skeletons. All uses changed.
8217 (yytnameerr_): New function.
8218 (yyreport_syntax_error): Use it to dequote most string literals.
8219 * data/yacc.c (yytnamerr): New function.
8220 (yyerrlab): Use it to decode most string literals.
8221 * doc/bison.texinfo (Decl Summary, Calling Convention):
8222 Clarify quoting convention of yytname.
8223 * src/output.c (prepare_symbols): Quote all names. This undoes
8224 the 2005-04-17 change, which is now accomplished (mostly) via
8225 changes in the parsers as described above.
8226 * tests/regression.at (Token definitions, Web2c Actions):
8227 Undo most 2005-04-17 change here, too.
8228
8229 2005-07-20 Paul Eggert <eggert@cs.ucla.edu>
8230
8231 Fix more problems reported by twlevo@xs4all.nl.
8232 * tests/cxx-type.at: Don't pipe output of ./types through sed to
8233 remove trailing spaces. This loses the exit status of ./types,
8234 and isn't needed since ./types shouldn't be emitting trailing
8235 spaces.
8236 * data/glr.c (yyreturn): Don't pop stack if yyinitStateSet failed,
8237 as the stack isn't valid in that case.
8238
8239 * src/scan-gram.l (gram_get_lineno, gram_get_in, gram_get_out):
8240 (gram_get_leng, gram_get_text, gram_set_lineno, gram_set_in):
8241 (gram_set_out, gram_get_debug, gram_set_debug, gram_lex_destroy):
8242 Add declarations to pacify "gcc -Wmissing-prototypes" when flex 2.5.31
8243 is used.
8244 * src/scan-skel.l (skel_get_lineno, skel_get_in, skel_get_out):
8245 (skel_get_leng, skel_get_text, skel_set_lineno, skel_set_in):
8246 (skel_set_out, skel_get_debug, skel_set_debug, skel_lex_destroy):
8247 Likewise.
8248
8249 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Work even with
8250 overly-picky compilers that reject 'char *foo = "bar";'.
8251
8252 * src/symtab.c (SYMBOL_ATTR_PRINT, symbol_print): Direct output
8253 to FILE * parameter, not to stderr. This fixes a typo introduced
8254 in the 2005-07-12 change.
8255
8256 * lib/subpipe.c (create_subpipe): Rewrite slightly to avoid
8257 warnings from GCC 4.
8258
8259 * data/glr.c (yyexpandGLRStack, yyaddDeferredAction, yyexpandGLRStack):
8260 (yyglrShiftDefer, yysplitStack):
8261 Remove unused parameters b4_pure_formals. All uses changed.
8262 (yyglrShift): Remove unused parameters b4_user_formals.
8263 All uses changed.
8264 (yyglrReduce): Removed unused parameter yylocp. All uses changed.
8265
8266 2005-07-18 Paul Eggert <eggert@cs.ucla.edu>
8267
8268 Destructor cleanups and regularization among the three skeletons.
8269 * NEWS: Document the behavior changes.
8270 * data/glr.c (yyrecoverSyntaxError): Don't bother to pop the
8271 stack before failing, as the cleanup code will do it for us now.
8272 * data/lalr1.cc (yyerrlab): Likewise.
8273 * data/glr.c (yyparse): Pop everything off the stack before
8274 freeing it, so that destructors get called properly.
8275 * data/lalr1.cc (yyreturn): Likewise.
8276 * data/yacc.c (yyreturn): Pop and destroy the start symbol, too.
8277 This is more consistent.
8278 * doc/bison.texinfo (Destructor Decl): Mention more reasons
8279 why destructors might be called. 1.875 -> 2.1.
8280 (Destructor Decl, Decl Summary, Table of Symbols):
8281 Some English-language cleanups for %destructor.
8282 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
8283 Add output line for destructor of start symbol.
8284 * tests/calc.at (AT_CHECK_CALC): Add one to line counts,
8285 because of that same extra output line.
8286
8287 * NEWS: Document minor wording changes in diagnostics of
8288 Bison-generated parsers.
8289 * data/glr.c (yyMemoryExhausted): Renamed from yyStackOverflow.
8290 Remove unused formals. All uses changed.
8291 (yyreportAmbiguity): "ambiguity detected" -> "syntax is ambiguous".
8292 (yyparse): Rename yyoverflowlab to yyexhaustedlab.
8293 * data/yacc.c (yyparse): "parser stack overflow" -> "memory exhausted".
8294 Rename yyoverflowab to yyexhaustedlab.
8295 When memory exhaustion occurs during syntax-error reporting,
8296 report it separately rather than in a single diagnostic; this
8297 eases translation.
8298 * doc/bison.texinfo (Memory Management): Renamed from Stack Overflow.
8299 (Memory Exhausted): Renamed from Parser Stack Overflow.
8300 Revamp wording slightly to prefer "memory exhaustion".
8301 * tests/actions.at: "parser stack overflow" -> "memory exhausted".
8302
8303 * data/c.m4 (b4_yysymprint_generate): Use YYFPRINTF, not fprintf.
8304
8305 Add i18n support to the GLR skeleton. Partially fix the C++
8306 skeleton; a C++ expert needs to finish this. Remove debugging
8307 msgids; there's little point to having them translated, since they
8308 can be understood only by someone who can read the
8309 (English-language) source code.
8310
8311 Generate runtime-po/bison-runtime.pot automatically, so that we
8312 don't have to worry about garbage getting in that file. We'll
8313 make sure after the next official release that old msgids don't
8314 get lost. See
8315 <http://lists.gnu.org/archive/html/bison-patches/2005-07/msg00119.html>.
8316
8317 * runtime-po/Makefile.in.in, runtime-po/bison-runtime.pot: Remove.
8318 Now auto-generated.
8319 * PACKAGING: Don't claim that Gawk, GCC, Perl use this method yet.
8320 Fix typos in explanations of the runtime file.
8321 * bootstrap: Change gettext keyword from YYI18N to YY_.
8322 Use standard Makefile.in.in in runtime-po, since we'll arrange
8323 for backward-compatible bison-runtime.po files in a different way.
8324 * data/glr.c (YY_): New macro, from yacc.c.
8325 (yyuserAction, yyreportAmbiguity, yyreportSyntaxError, yyparse):
8326 Translate messages intended for users.
8327 (yyreportSyntaxError): Change "virtual memory" to "memory" to match
8328 the wording in the other skeletons. We don't know that the memory
8329 is virtual.
8330 * data/lalr1.cc (YY_): Renamed from _. All uses changed.
8331 Use same method that yacc.c uses.
8332 Don't translate debugging messages.
8333 (yy::yyreport_syntax_error): Put in a FIXME for the i18n stuff;
8334 it doesn't work (yet), and requires C++ expertise to fix.
8335 * data/yacc.c (YY_): Renamed from YY18N. All uses changed.
8336 Move defn to a more logical place, to be consistent with other
8337 skeletons.
8338 Don't translate debugging messages.
8339 Don't assume line numbers fit in unsigned int; use unsigned long fmts.
8340 * doc/bison.texinfo: Mention <libintl.h>. Change glibc cross reference
8341 to gettext cross reference. Add indexing terms. Mention YYENABLE_NLS.
8342 * runtime-po/POTFILES.in: Add data/glr.c, data/lalr1.cc.
8343
8344 Fix yyerror / yylex test glitches noted by twlevo@xs4all.nl.
8345 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Have yyerror return
8346 void, not int.
8347 * tests/glr-regression.at (Badly Collapsed GLR States):
8348 Likewise.
8349 (Improper handling of embedded actions and dollar(-N) in GLR parsers):
8350 yylex should return 0 at EOF rather than aborting.
8351
8352 Improve tests for stack overflow in GLR parser.
8353 Problem reported by twlevo@xs4all.nl.
8354 * data/glr.c (struct yyGLRStack): Remove yyerrflag member.
8355 All uses removed.
8356 (yyStackOverflow): Just longjmp, but with value 2 so that caller
8357 can handle the problem.
8358 (YYCHK1): Use goto (a la yacc.c) rather than setting a flag.
8359 (yyparse): New local variable yyresult to record the result.
8360 Use result of setjmp to set it, rather than storing itinto
8361 struct.
8362 (yyDone): Remove label.
8363 (yyacceptlab, yyabortlab, yyoverflowlab, yyreturn): New labels,
8364 to mimic yacc.c. Do not discard lookahead if it's EOF (possible
8365 if YYABORT is used).
8366 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Exit with
8367 yyparse status; put status > 1 into diagnostic.
8368 Check that status==2 works.
8369 * tests/calc.at, tests/cxx-type.at, tests/glr-regression.at:
8370 Use exit status 3 for failure to open (which shouldn't happen).
8371
8372 2005-07-17 Paul Eggert <eggert@cs.ucla.edu>
8373
8374 * tests/conflicts.at (%nonassoc and eof): Don't exit with status
8375 1 on syntax error; just let yyparse do its thing.
8376 * tests/glr-regression.at (Badly Collapsed GLR States): Likewise.
8377 * tests/torture.at (AT_DATA_STACK_TORTURE): Likewise.
8378 (Exploding the Stack Size with Alloca):
8379 (Exploding the Stack Size with Malloc):
8380 Expect exit status 2, not 1, since the parser is supposed to blow
8381 its stack. Problem reported by twlevo@xs4all.nl.
8382
8383 * data/glr.c (yyparse): Don't assume that the initial calls
8384 to YYMALLOC succeed; in that case, yyparse incorrectly returned 0.
8385 Print a stack-overflow message and fail instead.
8386 Initialize the line-number information before creating the stack,
8387 so that the stack-overflow message can report line zero safely.
8388
8389 2005-07-14 Paul Eggert <eggert@cs.ucla.edu>
8390
8391 Fix problems reported by twlevo@xs4all.nl.
8392 * data/glr.c (YYSTACKEXPANDABLE): Don't define if already defined.
8393 (yyuserMerge): Provide a default case if b4_mergers is empty.
8394 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Define YYSTACKEXPANDABLE.
8395 * tests/glr-regression.at
8396 (Improper handling of embedded actions and dollar(-N) in GLR parsers):
8397 Add casts to pacify C++ compilers.
8398 * tests/glr-regression.at (Improper merging of GLR delayed action
8399 sets): Declare yylex before using it.
8400 * tests/Makefile.am (maintainer-check-g++): Fix a stray
8401 $(GXX) that escaped the renaming of GXX to CXX. Remove bogus
8402 test for valgrind; valgrind is independent of g++.
8403 (maintainer-check-posix): Add _POSIX2_VERSION=200112, to check
8404 for compatibility with POSIX 1003.1-2001 (if running coreutils).
8405 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Port to stricter C++.
8406 Use a destructor, so that we can expand the stack. Change
8407 YYSTYPE to char * so that we can free it. Cast result of malloc.
8408
8409 2005-07-13 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
8410
8411 * data/glr.c (yyuserAction): Fix uninitialized variable that caused
8412 a valgrind failure. Problem reported by twlevo@xs4all.nl.
8413
8414 2005-07-13 Paul Eggert <eggert@cs.ucla.edu>
8415
8416 * PACKAGING: New file, suggested by Bruno Haible and taken from
8417 similar wording in gettext's PACKAGING file.
8418 * NEWS: Mention PACKAGING.
8419 * Makefile.am (EXTRA_DIST): Add PACKAGING.
8420
8421 2005-07-12 Paul Eggert <eggert@cs.ucla.edu>
8422
8423 * NEWS: Document recent i18n improvements.
8424 * bootstrap: Get runtime translations into runtime-po.
8425 Create runtime-po files automatically, if possible.
8426 * configure.ac: Invoke BISON_I18N, so that we eat our own dog food.
8427 * data/yacc.c: Rewrite inclusion of <libintl.h> so that ENABLE_NLS
8428 does not infringe on the user's name space.
8429 (YYENABLE_NLS): Renamed from ENABLE_BISON_NLS.
8430 * doc/bison.texinfo (Internationalization): Revamp the English
8431 and Texinfo syntax a bit, to try to make it clearer.
8432 (Bison Options, Option Cross Key): Mention --print-localedir.
8433 * m4/bison-i18n.m4 (BISON_I18N): Rename ENABLE_BISON_NLS to
8434 YYENABLE_NLS. Quote a bit more.
8435 * runtime-po/.cvsignore: New file.
8436 * runtime-po/Makefile.in.in (mostlyclean): Remove *.old.pot.
8437 * runtime-po/Rules-quot: Remove; now created by bootstrap.
8438 * runtime-po/quot.sed: Likewise.
8439 * runtime-po/boldquot.sed: Likewise.
8440 * runtime-po/en@quot.header: Likewise.
8441 * runtime-po/en@boldquot.header: Likewise.
8442 * runtime-po/insert-header.sin: Likewise.
8443 * runtime-po/remove-potcdate.sin: Likewise.
8444 * runtime-po/Makevars: Likewise.
8445 * runtime-po/LINGUAS: Likewise.
8446 * runtime-po/de.po: Likewise; we will rely on the translation project
8447 to maintain this, so "bootstrap" should get it.
8448 * src/getarg.c (PRINT_LOCALEDIR_OPTION): Let the C compiler determine
8449 its value.
8450 * src/main.c (main): Bind the bison-runtime domain, too.
8451
8452 2005-07-12 Bruno Haible <bruno@clisp.org>
8453
8454 * data/yacc.c: Include <libintl.h> when NLS is enabled.
8455 (YYI18N): Renamed from _. Use dgettext when NLS is enabled.
8456 * po/POTFILES.in: Remove autogenerated file src/parse-gram.c.
8457 * runtime-po: New directory.
8458 * runtime-po/Makefile.in.in: New file, copied from po/, with modified
8459 $(DOMAIN).pot-update rule, so that old messages are never dropped.
8460 * runtime-po/Rules-quot: New file, copied from po/.
8461 * runtime-po/quot.sed: Likewise.
8462 * runtime-po/boldquot.sed: Likewise.
8463 * runtime-po/en@quot.header: Likewise.
8464 * runtime-po/en@boldquot.header: Likewise.
8465 * runtime-po/insert-header.sin: Likewise.
8466 * runtime-po/remove-potcdate.sin: Likewise.
8467 * runtime-po/Makevars: New file.
8468 * runtime-po/POTFILES.in: New file.
8469 * runtime-po/LINGUAS: New file.
8470 * runtime-po/bison-runtime.pot: New file.
8471 * runtime-po/de.po: New file.
8472 * m4/bison.m4: New file.
8473 * Makefile.am (SUBDIRS): Add runtime-po.
8474 (aclocaldir, aclocal_DATA): New variables.
8475 * configure.ac: Add AC_CONFIG_FILES of runtime-po/Makefile.in.
8476 Define aclocaldir.
8477 * src/getargs.c (usage): Document --print-localedir option.
8478 (PRINT_LOCALEDIR_OPTION): New enum item.
8479 (long_options): Add --print-localedir option.
8480 (getargs): Handle --print-localedir option.
8481 * doc/bison.texinfo (Bison Parser): Remove paragraph about _().
8482 (Internationalization): New section.
8483
8484 2005-07-12 Akim Demaille <akim@epita.fr>
8485
8486 * src/symtab.h, src/symtab.c (symbol_print): Swap the arguments,
8487 for consistency with the rest of the code.
8488 * src/symlist.h, src/symlist.c (symbol_list_print): Ditto.
8489 Add separators.
8490
8491 2005-07-12 Akim Demaille <akim@epita.fr>
8492
8493 * src/parse-gram.y: Use %printer instead of YYPRINT.
8494
8495 2005-07-12 Akim Demaille <akim@epita.fr>
8496
8497 * src/symtab.h, src/symtab.c (symbol_print): New.
8498 * src/symlist.h, src/symlist.c (symbol_list_print): New.
8499 * src/symlist.c (symbol_list_n_type_name_get): Report the culprit.
8500
8501 2005-07-12 Akim Demaille <akim@epita.fr>
8502
8503 * data/glr.c (b4_syncline): Fix (swap) the definitions of
8504 b4_at_dollar and b4_dollar_dollar.
8505
8506 2005-07-11 Paul Eggert <eggert@cs.ucla.edu>
8507
8508 * doc/bison.texinfo (Mystery Conflicts): Add reference to DeRemer
8509 and Pennello's paper.
8510
8511 2005-07-09 Paul Eggert <eggert@cs.ucla.edu>
8512
8513 * data/yacc.c (yyparse): Undo previous patch. Instead,
8514 set yylsp[0] and yyvsp[0] only if the initial action
8515 sets yylloc and yylval, respectively.
8516
8517 * data/yacc.c (yyparse): In the initial action, set
8518 yylsp[0] and yyvsp[0] rather than yylloc and yylval.
8519 This avoids the use of undefined variables if the initial
8520 action does not set yylloc and/or yylval.
8521
8522 2005-07-07 Paul Eggert <eggert@cs.ucla.edu>
8523
8524 * examples/calc++/calc++-driver.cc, examples/calc++/calc++-driver.hh:
8525 * examples/calc++/calc++-scanner.ll, examples/calc++/calc++.cc:
8526 Remove from CVS. These files are automatically generated.
8527 * examples/extexi: Clarify that this file is now part of Bison,
8528 not GNU M4, and that it works with any POSIX-compatible Awk.
8529 * examples/calc++/Makefile.am (run_extexi): Remove; not used.
8530 ($(calc_extracted)): Renamed from $(calc_sources_extracted),
8531 so that we also get calc++-parser.yy. Geneate it.
8532 Use $(AWK), not gawk, since any conforming Awk will do.
8533 Put comment before action, since older 'make' can't handle comment
8534 in action.
8535 $(BUILT_SOURCES): List all built sources, not just some of them.
8536 $(MAINTAINERCLEANFILES): Remove *.stamp, and all built sources.
8537 $($(srcdir)/calc++-parser.stamp): Work even if POSIXLY_CORRECT.
8538 $($(calc_sources_generated)): Remove unnecessary test for existence
8539 of target. (This had a shell syntax error anyway; a stray "x".)
8540 (calc_extracted): List $(srcdir)/calc++-parser.yy, not
8541 calc++-parser.yy.
8542 * examples/.cvsignore, examples/calc++/.cvsignore: New files.
8543
8544 * bootstrap (gnulib_modules): Add gettext, now that it's no longer
8545 implied by the other modules.
8546
8547 2005-07-06 Akim Demaille <akim@epita.fr>
8548
8549 Bind examples/calc++ to the package.
8550 * examples/calc++/Makefile: Remove, replaced by...
8551 * examples/calc++/Makefile.am: ... this new file.
8552 * examples/calc++/test: Remove input.
8553 * examples/calc++/compile: Remove.
8554 * examples/Makefile.am: New.
8555 * configure.ac, Makefile.am: Adjust.
8556 * doc/Makefile.am (clean-local): New, for more recent texi2dvis.
8557
8558 2005-07-05 Paul Eggert <eggert@cs.ucla.edu>
8559
8560 * data/glr.c (yyFail): Drastically simplify; since the format argument
8561 never had any % directives, we can simply pass it to yyerror.
8562 (yyparse): Use "t a; a=b;" rather than "t a = b;" when a will
8563 be modified later, as that is the usual style in glr.c.
8564 Problems reported by Paul Hilfinger.
8565
8566 Rewrite GLR parser to catch more buffer overrun, storage exhaustion,
8567 and size overflow errors.
8568 * data/glr.c: Include <stdio.h> etc. after user prolog, not before,
8569 in case the user prolog sets feature-test macros like _GNU_SOURCE.
8570 (YYSIZEMAX): New macro.
8571 (yystpcpy): New function, taken from yacc.c.
8572 (struct yyGLRStack.yyspaceLeft): Now size_t, not int.
8573 (yyinitGLRStack, yyfreeGLRstack): Remove unnecessary forward decls,
8574 so that we don't have to maintain their signatures.
8575 (yyFail): Check for buffer overflow, by using vsnprintf rather
8576 than vsprintf. Allocate a bigger buffer if possible.
8577 Report an error if buffer allocation fails.
8578 (yyStackOverflow): New function.
8579 (yyinitStateSet, yyinitGLRStack): Return a boolean indicating whether
8580 the initialization was successful. It might fail if storage was
8581 exhausted.
8582 (yyexpandGLRStack): Add more checks for storage allocation failure.
8583 Use yyStackOverflow to report failures.
8584 (yymarkStackDeleted, yyglrShift, yyglrShiftDefer, yydoAction):
8585 (yysplitStack, yyprocessOneStack, yyparse, yypstack):
8586 Don't assume stack number fits in int.
8587 (yysplitStack): Check for storage allocation failure.
8588 (yysplitStack, yyprocessOneStack): Add pure_formals, so that we
8589 can print diagnostics on storage allocation failure. All callers
8590 changed.
8591 (yyresolveValue): Use yybool for boolean.
8592 (yyreportSyntaxError): Check for size-calculation overflow.
8593 This code is taken from yacc.c.
8594 (yyparse): Check for storage allocation errors when allocating
8595 the initial stack.
8596
8597 2005-07-05 Akim Demaille <akim@epita.fr>
8598
8599 Extract calc++ from the documentation.
8600 * doc/bison.texinfo (Calc++): Add the extraction marks.
8601 * examples/extexi: New, from the aborted GNU Programming 2E.
8602 Separate the different paragraph of a file with empty lines.
8603 * examples/Makefile: Use it to extract the whole calc++ example.
8604
8605 2005-06-24 Akim Demaille <akim@epita.fr>
8606
8607 * doc/bison.texinfo (C++ Parser Interface): Use defcv to define
8608 class typedefs.
8609
8610 2005-06-22 Akim Demaille <akim@epita.fr>
8611
8612 * doc/bison.texinfo (C++ Language Interface): First stab.
8613 (C++ Parsers): Remove.
8614
8615 2005-06-22 Akim Demaille <akim@epita.fr>
8616
8617 * data/lalr1.cc (yylex_): Honor %lex-param.
8618
8619 2005-06-22 Akim Demaille <akim@epita.fr>
8620
8621 Start a set of simple examples.
8622 * examples/calc++/Makefile, examples/calc++/calc++-driver.cc,
8623 * examples/calc++/calc++-driver.hh,
8624 * examples/calc++/calc++-parser.yy,
8625 * examples/calc++/calc++-scanner.ll, examples/calc++/calc++.cc,
8626 * examples/calc++/compile, examples/calc++/test: New.
8627
8628 2005-06-09 Paul Eggert <eggert@cs.ucla.edu>
8629
8630 * data/yacc.c (malloc, free) [defined __cplusplus]: Wrap inside
8631 extern "C" {}. This fixes a problem reported by Paul Hilfinger,
8632 which stems from the 2005-05-27 patch.
8633
8634 2005-06-06 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
8635
8636 * data/glr.c: Modify treatment of unused parameters to permit use
8637 of g++ (which doesn't allow __attribute__ ((unused)) for parameters).
8638
8639 2005-05-30 Paul Eggert <eggert@cs.ucla.edu>
8640
8641 Fix infringement on user name space reported by Janos Zoltan Szabo.
8642 * data/yacc.c (yyparse): strlen -> yystrlen.
8643
8644 2005-05-30 Akim Demaille <akim@epita.fr>
8645
8646 * data/lalr1.cc (_): New.
8647 Translate the various messages.
8648
8649 2005-05-27 Paul Eggert <eggert@cs.ucla.edu>
8650
8651 Fix infringement on user name space reported by Bruno Haible.
8652 * data/yacc.c (YYSIZE_T): Define first, so that later decls can use it.
8653 Prefer GCC's __SIZE_TYPE__ if available, so that we don't infringe on
8654 the user's name space.
8655 (alloca): Include <stdlib.h> to get it, if it's not built in.
8656 (YYMALLOC, YYFREE): Define only if needed.
8657 (malloc, free): Declare, but only if needed, as this infringes on
8658 the user name space.
8659
8660 2005-05-25 Paul Eggert <eggert@cs.ucla.edu>
8661
8662 Fix BeOS, FreeBSD, MacOS porting problems reported by Bruno Haible.
8663 * lib/bitset.c (bitset_print): Don't assume size_t can be printed
8664 with %d format.
8665 * lib/ebitset.c (min, max): Undef before defining.
8666 * lib/vbitset.c (min, max): Likewise.
8667 * lib/subpipe.c (create_subpipe): Save local variables in case
8668 vfork clobbers them.
8669
8670 2005-05-24 Bruno Haible <bruno@clisp.org>
8671
8672 * tests/synclines.at (AT_SYNCLINES_COMPILE): Add support for the
8673 error message syntax used by gcc-4.0.
8674
8675 2005-05-23 Paul Eggert <eggert@cs.ucla.edu>
8676
8677 * README: Mention m4 1.4.3. Remove obsolete advice about
8678 Sun Forte Developer 6 update 2, VMS, and MS-DOS.
8679
8680 * bootstrap: Remove workaround for problem I encountered with
8681 gettext 0.14.1; it seems to be fixed now.
8682
8683 2005-05-22 Paul Eggert <eggert@cs.ucla.edu>
8684
8685 * NEWS: Version 2.0a.
8686
8687 * src/files.c: Include "stdio-safer.h"; this fixes a typo in
8688 the previous change.
8689
8690 Various maintainer cleanups.
8691 * .cvsignore: Add a.exe, a.out, b.out,, conf[0-9]*, confdefs*,
8692 conftest*, for benefit of CVS commands run at the same time as
8693 "configure". Add build-aux, since "bootstrap" now creates it and
8694 its subfiles.
8695 * Makefile.cfg (move_if_change): Remove.
8696 * Makefile.maint: Remove the update stuff; we now use "bootstrap".
8697 (ftp-gnu, www-gnu, move_if_change, local_updates, update):
8698 (po_repo, do-po-update, po-update, wget_files, get-targets):
8699 (config.guess-url_prefix, config.sub-url_prefix):
8700 (ansi2knr.c-url_prefix, texinfo.tex-url_prefix):
8701 (standards.texi-url_prefix, make-stds.texi-url_prefix, taget, url):
8702 ($(get-targets), cvs-files, automake_repo, wget-update, cvs-update):
8703 Remove.
8704 * configure.ac (AC_CONFIG_AUX_DIR): Change from config to build-aux;
8705 this is now the recommended name.
8706 * config/.cvsignore: Remove config.guess, config.rpath, config.sub,
8707 depcomp, install-sh, mdate-sh, missing, mkinstalldirs, texinfo.tex,
8708 ylwrap. These files now go into build-aux.
8709 * config/move-if-change: Remove.
8710 * config/prev-version.txt: Bump from 1.75 to 2.0.
8711
8712 * bootstrap: Add stdio-safer, unistd-safer modules.
8713 Remove m4/glibc2.m4 (introduced by latest gnulib, but
8714 we don't need it).
8715 * lib/.cvsignore: Add dup-safer.c, fd-safer.c,
8716 fopen-safer.c, stdio-safer.h, unistd-safer.h.
8717 * lib/subpipe.c: Include "unistd-safer.h".
8718 (create_subpipe): Make sure all the newly-created
8719 file descriptors are > 2, so that diagnostics don't
8720 get sent down them (which might cause Bison to hang, in theory).
8721 * m4/.cvsignore: Add stdio-safer.m4, unistd-safer.m4.
8722 * src/files.c (xfopen): Use fopen_safer, not fopen.
8723
8724 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Port
8725 yesterday's yacc.c fix.
8726
8727 2005-05-21 Paul Eggert <eggert@cs.ucla.edu>
8728
8729 * data/glr.c, data/lalr1.cc: Update copyright date.
8730
8731 Fix a destructor bug reported by Wolfgang Spraul in
8732 <http://lists.gnu.org/archive/html/bug-bison/2005-05/msg00042.html>.
8733 * data/yacc.c (yyabortlab): Don't call destructor, and
8734 don't set yychar to EMPTY.
8735 (yyoverflowlab): Don't call destructor.
8736 (yyreturn): Call destructor, if yychar is neither YYEOF nor YYEMPTY.
8737 * tests/calc.at (AT_CHECK_CALC): Expect one fewer output lines,
8738 since we no longer output the message "discarding lookahead token
8739 end of input ()".
8740
8741 2005-05-20 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
8742
8743 * data/glr.c (YY_SYMBOL_PRINT): Don't print newline at end to
8744 fix a small glitch in debugging output.
8745 (yyprocessOneStack, yyrecoverSyntaxError, yyparse): Print newline
8746 after YY_SYMBOL_PRINT where needed.
8747
8748 (struct yyGLRState): Add some comments.
8749 (struct yySemanticOption): Add some comments.
8750 (union yyGLRStackItem): Add comment.
8751
8752 (yymergeOptionSets): Correct this to properly perform the union,
8753 avoiding infinite reported by Michael Rosien.
8754 Update comment.
8755
8756 * tests/glr-regression.at: Add test for GLR merging error reported
8757 by M. Rosien.
8758
8759 2005-05-13 Paul Eggert <eggert@cs.ucla.edu>
8760
8761 * COPYING, ChangeLog, GNUmakefile, HACKING, Makefile.am,
8762 Makefile.cfg, Makefile.maint, NEWS, README, README-alpha,
8763 README-cvs, TODO, bootstrap, configure.ac, data/Makefile.am,
8764 data/README, data/c.m4, data/glr.c, data/lalr1.cc, data/yacc.c,
8765 data/m4sugar/m4sugar.m4, doc/Makefile.am, doc/bison.texinfo,
8766 doc/fdl.texi, doc/gpl.texi, doc/refcard.tex, lib/Makefile.am,
8767 lib/abitset.c, lib/abitset.h, lib/bbitset.h, lib/bitset.c,
8768 lib/bitset.h, lib/bitset_stats.c, lib/bitset_stats.h,
8769 lib/bitsetv-print.c, lib/bitsetv-print.h, lib/bitsetv.c,
8770 lib/bitsetv.h, lib/ebitset.c, lib/ebitset.h, lib/get-errno.c,
8771 lib/get-errno.h, lib/lbitset.c, lib/lbitset.h, lib/libiberty.h,
8772 lib/main.c, lib/subpipe.c, lib/subpipe.h, lib/timevar.c,
8773 lib/timevar.def, lib/timevar.h, lib/vbitset.c, lib/vbitset.h,
8774 lib/yyerror.c, m4/cxx.m4, m4/m4.m4, m4/subpipe.m4, m4/timevar.m4,
8775 m4/warning.m4, src/LR0.c, src/LR0.h, src/Makefile.am, src/assoc.c,
8776 src/assoc.h, src/closure.c, src/closure.h, src/complain.c,
8777 src/complain.h, src/conflicts.c, src/conflicts.h, src/derives.c,
8778 src/derives.h, src/files.c, src/files.h, src/getargs.c,
8779 src/getargs.h, src/gram.c, src/gram.h, src/lalr.c, src/lalr.h,
8780 src/location.c, src/location.h, src/main.c, src/muscle_tab.c,
8781 src/muscle_tab.h, src/nullable.c, src/nullable.h, src/output.c,
8782 src/output.h, src/parse-gram.c, src/parse-gram.h,
8783 src/parse-gram.y, src/print.c, src/print.h, src/print_graph.c,
8784 src/print_graph.h, src/reader.c, src/reader.h, src/reduce.c,
8785 src/reduce.h, src/relation.c, src/relation.h, src/scan-gram.l,
8786 src/scan-skel.l, src/state.c, src/state.h, src/symlist.c,
8787 src/symlist.h, src/symtab.c, src/symtab.h, src/system.h,
8788 src/tables.c, src/tables.h, src/uniqstr.c, src/uniqstr.h,
8789 src/vcg.c, src/vcg.h, src/vcg_defaults.h, tests/Makefile.am,
8790 tests/actions.at, tests/c++.at, tests/calc.at, tests/conflicts.at,
8791 tests/cxx-type.at, tests/existing.at, tests/glr-regression.at,
8792 tests/headers.at, tests/input.at, tests/local.at, tests/output.at,
8793 tests/reduce.at, tests/regression.at, tests/sets.at,
8794 tests/synclines.at, tests/testsuite.at, tests/torture.at:
8795 Update FSF postal mail address.
8796
8797 2005-05-11 Paul Eggert <eggert@cs.ucla.edu>
8798
8799 * tests/local.at (AT_COMPILE_CXX): Treat LDFLAGS like AT_COMPILE does.
8800 Problem reported by Ralf Menzel.
8801
8802 2005-05-01 Paul Eggert <eggert@cs.ucla.edu>
8803
8804 * tests/actions.at: Test that stack overflow invokes destructors.
8805 From Marcus Holland-Moritz.
8806 * data/yacc.c (yyerrlab): Move the code that destroys the stack
8807 from here....
8808 (yyreturn): to here. That way, destructors are called properly
8809 even if the stack overflows, or the user calls YYACCEPT or
8810 YYABORT. Stack-overflow problem reported by Marcus Holland-Moritz.
8811 (yyoverflowlab): Destroy the lookahead.
8812
8813 2005-04-24 Paul Eggert <eggert@cs.ucla.edu>
8814
8815 * data/yacc.c (YYSTACK_ALLOC_MAXIMUM): Add more-descriptive comment.
8816
8817 2005-04-17 Paul Eggert <eggert@cs.ucla.edu>
8818
8819 * NEWS: Bison-generated C parsers no longer quote literal strings
8820 associated with tokens.
8821 * src/output.c (prepare_symbols): Don't escape strings,
8822 since users don't want to see C escapes.
8823 * tests/calc.at (AT_CHECK_CALC): Adjust to lack of quotes
8824 in diagnostics.
8825 * tests/input.at (Torturing the Scanner): Likewise.
8826 * tests/regression.at (Token definitions, Web2c Actions): Likewise.
8827
8828 2005-04-16 Paul Eggert <eggert@cs.ucla.edu>
8829
8830 * tests/torture.at (AT_INCREASE_DATA_SIZE): Skip the test if
8831 the data size is known to be too small and we can't increase it.
8832 This works around an HP-UX 11.00 glitch reported by Andrew Benham.
8833
8834 2005-04-15 Paul Eggert <eggert@cs.ucla.edu>
8835
8836 * src/parse-gram.y: Include quotearg.h.
8837 (string_as_id): Quote $1 before using it as a key, since the
8838 lexer no longer quotes it for us.
8839 (string_content): Don't strip quotes, since lexer no longer
8840 quotes it for us.
8841 * src/scan-gram.l: Include quotearg.h.
8842 ("\""): Omit quote.
8843 ("'"<SC_ESCAPED_CHARACTER>): Quote symbol before using it as
8844 a key, since the rest of the lexer doesn't quote it.
8845 * src/symtab.c (symbol_get): Don't quote symbol; caller does it now.
8846 * tests/regression.at (Token definitions): Check for backslashes
8847 in token strings.
8848
8849 * data/yacc.c (YYSTACK_ALLOC_MAXIMUM): New macro.
8850 (YYSIZE_T): Define to unsigned long int when using an older compiler.
8851 (yyparse): Revamp code to generate long syntax error message, to
8852 make it easier to translate, and to avoid problems with arithmetic
8853 overflow. Change "virtual memory" to "memory" in diagnostic, since
8854 we don't know whether the memory is virtual.
8855
8856 2005-04-13 Paul Eggert <eggert@cs.ucla.edu>
8857
8858 * NEWS: Bison-generated C parsers now use the _ macro to
8859 translate strings.
8860 * data/yacc.c (_) [!defined _]: New macro.
8861 All English strings wrapped inside this macro.
8862 * doc/bison.texinfo (Bison Parser): Document _.
8863 * po/POTFILES.in: Include src/parse-gram.c, since it now
8864 includes translateable strings that parse-gram.y doesn't.
8865
8866 2005-04-12 Paul Eggert <eggert@cs.ucla.edu>
8867
8868 * src/symtab.c (symbol_make_alias): Call symbol_type_set,
8869 reverting the 2004-10-11 change to this function.
8870 (symbol_check_alias_consistency): Don't call symbol_type_set
8871 if the type name is already correct.
8872 * tests/input.at (Typed symbol aliases): New test, from Tim Van Holder.
8873
8874 2005-03-25 Paul Eggert <eggert@cs.ucla.edu>
8875
8876 * tests/regression.at (Token definitions): Don't use a token named
8877 c, as that generates a "#define c ..." that runs afoul of buggy
8878 stdlib.h that uses the identifier c as a member of struct
8879 drand48_data. Problem reported by Horst Wente.
8880
8881 2005-03-21 Paul Eggert <eggert@cs.ucla.edu>
8882
8883 * bootstrap: Change translation URL from
8884 http://www2.iro.umontreal.ca/~gnutra/po/maint/bison/ to
8885 http://www.iro.umontreal.ca/translation/maint/bison/ to avoid
8886 redirection glitches. Problem reported by twlevo@xs4all.nl.
8887
8888 2005-03-20 Paul Eggert <eggert@cs.ucla.edu>
8889
8890 * tests/local.at (AT_COMPILE, AT_COMPILE_CXX): Don't put options
8891 after operands; POSIX says this isn't portable for the c99 command.
8892
8893 2005-03-18 Paul Eggert <eggert@cs.ucla.edu>
8894
8895 * tests/glr-regression.at (glr-regr2a.y): Try to dump core
8896 immediately if a data overrun has occurred; this may help us track
8897 down what may be a spurious failure on MacOS.
8898
8899 2005-03-17 Paul Eggert <eggert@cs.ucla.edu>
8900
8901 Respond to problems reported by twlevo@xs4all.nl.
8902
8903 * bootstrap: Use "trap - 0" rather than the unportable "trap 0".
8904
8905 * src/vcg.h: Comment fix.
8906 * src/vcg_defaults.h: Parenthesize macro bodies to make them safe.
8907 (G_CMAX): Change to -1 instead of INT_MAX.
8908
8909 * data/yacc.c (yyparse): Omit spaces before #line.
8910
8911 2005-03-15 Paul Eggert <eggert@cs.ucla.edu>
8912
8913 * src/tables.c (state_number_to_vector_number): Put it inside an
8914 "#if 0", since it's not currently used. Problem reported by
8915 Roland McGrath.
8916
8917 2005-03-06 Paul Eggert <eggert@cs.ucla.edu>
8918
8919 * src/output.c (escaped_output): Renamed from
8920 escaped_file_name_output, since we now use it for symbol tags as
8921 well. All uses changed.
8922 (symbol_destructors_output, symbol_printers_output):
8923 Escape symbol tags too.
8924 Problem reported by Matyas Forstner in
8925 <http://lists.gnu.org/archive/html/bug-bison/2005-03/msg00009.html>.
8926
8927 * src/muscle_tab.c (muscle_code_grow): Don't quote numbers; it's
8928 not needed.
8929 * src/output.c (user_actions_output, token_definitions_output,
8930 symbol_destructors_output, symbol_printers_output): Likewise.
8931 * src/reader.c (prologue_augment): Likewise.
8932 * src/scan-gram.l (handle_action_dollar, handle_action_at): Likewise.
8933
8934 * src/vcg.c (output_edge): Don't quote linestyle arg.
8935 Problem reported by twlevo@xs4all.nl.
8936
8937 2005-02-28 Paul Eggert <eggert@cs.ucla.edu>
8938
8939 * doc/bison.texinfo (Semantic Tokens): Fix scoping problem in
8940 example, reported by Derek M Jones. Also, make the example even
8941 more outrageous, to better illustrate how bad the problem is.
8942
8943 2005-02-24 Paul Eggert <eggert@cs.ucla.edu>
8944
8945 * doc/bison.texinfo (Mfcalc Symtab): Correct the prototype for
8946 putsym. Typo reported by Sebastian Piping.
8947
8948 2005-02-23 Paul Eggert <eggert@cs.ucla.edu>
8949
8950 * doc/bison.texinfo (Language and Grammar): some -> same
8951 (Epilogue): int he -> in the
8952 Typos reported by Sebastian Piping via Justin Pence.
8953
8954 2005-02-07 Paul Eggert <eggert@cs.ucla.edu>
8955
8956 * tests/glr-regression.at (Improper handling of embedded actions
8957 and dollar(-N) in GLR parsers): Renamed from "Improper handling of
8958 embedded actions and $-N in GLR parsers", work around an Autoconf bug
8959 with dollar signs in test names.
8960 * tests/input.at (Invalid dollar-n): Renamed from "Invalid \$n",
8961 for a similar reason.
8962
8963 2005-01-28 Paul Eggert <eggert@cs.ucla.edu>
8964
8965 * src/vcg.c (output_graph): G_VIEW -> normal_view in case someone
8966 wants to redefine G_VIEW.
8967
8968 2005-01-27 Paul Eggert <eggert@cs.ucla.edu>
8969
8970 * src/vcg.c (get_view_str): Remove case for normal_view.
8971 Problem reported by twlevo@xs4all.nl.
8972
8973 2005-01-24 Paul Eggert <eggert@cs.ucla.edu>
8974
8975 * configure.ac (O0CFLAGS, O0CXXFLAGS): Fix quoting bug.
8976 Problem reported by twlevo@xs4all.nl.
8977
8978 * doc/bison.texinfo: Change @dircategory from "GNU programming
8979 tools" to "Software development". Requested by Richard Stallman
8980 via Karl Berry.
8981
8982 2005-01-23 Paul Eggert <eggert@cs.ucla.edu>
8983
8984 * tests/c++.at (AT_CHECK_DOXYGEN): Don't use options after operands.
8985 Problem reported by twlevo@xs4all.nl.
8986
8987 2005-01-21 Paul Eggert <eggert@cs.ucla.edu>
8988
8989 * data/yacc.c (YYCOPY, yystpcpy, yyparse): Remove "register"
8990 keyword; it's not needed with modern compilers, and it doesn't
8991 affect correctness with older compilers. Suggested by
8992 twlevo@xs4all.nl.
8993
8994 2005-01-17 Paul Eggert <eggert@cs.ucla.edu>
8995
8996 * data/glr.c (yyuserAction): Add "default: break;" case to pacify
8997 gcc -Wswitch-default.
8998 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Likewise.
8999 * data/yacc.c (yyparse): Likewise.
9000
9001 2005-01-12 Paul Eggert <eggert@cs.ucla.edu>
9002
9003 * src/system.h (OUTPUT_EXT, TAB_EXT): Define only if not defined
9004 already. Let config.h define any nonstandard values.
9005
9006 2005-01-10 Paul Eggert <eggert@cs.ucla.edu>
9007
9008 * tests/calc.at (_AT_DATA_CALC_Y): Use alarm (100), not alarm (10),
9009 for the benefit of slower hosts. Problem reported by
9010 Nelson H. F. Beebe.
9011
9012 2005-01-07 Paul Eggert <eggert@cs.ucla.edu>
9013
9014 * data/yacc.c (yyparse): Pacify non-GCC compilers about yyerrorlab
9015 being defined and not used.
9016 * data/lalr1.cc (yyparse): Likewise.
9017 Use "if (false)" rather than "if (0)".
9018
9019 2005-01-05 Paul Eggert <eggert@cs.ucla.edu>
9020
9021 * TODO: Mention that we should allow NUL bytes in tokens.
9022
9023 2005-01-02 Paul Eggert <eggert@cs.ucla.edu>
9024
9025 * src/scan-skel.l (<<EOF>>): Don't close standard output.
9026 Problem reported by Hans Aberg.
9027
9028 2005-01-01 Paul Eggert <eggert@cs.ucla.edu>
9029
9030 * src/getargs.c (version): Happy new year; update overall
9031 program copyright date from 2004 to 2005.
9032
9033 * src/scan-skel.l ("@output ".*\n): Don't close standard output.
9034 Problem reported by Hans Aberg.
9035 * tests/output.at (AT_CHECK_OUTPUT): New arg SHELLIO.
9036 (Output file names.): Add a test for the case when standard output
9037 is closed.
9038
9039 2004-12-26 Paul Eggert <eggert@cs.ucla.edu>
9040
9041 * doc/bison.texinfo (@copying): Update FDL version number to 1.2,
9042 to fix an oversight in the Bison 2.0 manual.
9043
9044 2004-12-25 Paul Eggert <eggert@cs.ucla.edu>
9045
9046 * NEWS: Version 2.0. Reformat the existing news items since
9047 1.875, so that related items are grouped together.
9048 * configure.ac (AC_INIT): Bump version to 2.0.
9049 * src/parse-gram.c, src/parse-gram.h: Regenerate with 2.0.
9050
9051 * tests/torture.at (Exploding the Stack Size with Alloca): Set
9052 YYSTACK_USE_ALLOCA to 1 if __GNUC__ or alloca are defined;
9053 otherwise, we're not testing alloca. Unfortunately there's no
9054 simple way to consult HAVE_ALLOCA here.
9055
9056 * data/lalr1.cc (yydestruct_): Pacify unused variable warning
9057 for yymsg, too.
9058
9059 * src/LR0.c (new_itemsets): Use memset rather than zeroing by
9060 hand. This avoids a warning about comparing int to size_t when
9061 GCC warnings are enabled.
9062
9063 2004-12-22 Paul Eggert <eggert@cs.ucla.edu>
9064
9065 * NEWS: Bison-generated parsers no longer default to using the
9066 alloca function (when available) to extend the parser stack, due
9067 to widespread problems in unchecked stack-overflow detection.
9068 * data/glr.c (YYMAXDEPTH): Remove undef when zero. It's the user's
9069 responsibility to set it to a positive value. This lets the user
9070 specify a value that is not a preprocessor constant.
9071 * data/yacc.c (YYMAXDEPTH): Likewise.
9072 (YYSTACK_ALLOC): Define only if YYSTACK_USE_ALLOCA is nonzero.
9073 * doc/bison.texinfo (Stack Overflow): YYMAXDEPTH no longer needs
9074 to be a compile-time constant. However, explain the constraints on it.
9075 Also, explain the constraints on YYINITDEPTH.
9076 (Table of Symbols): Explain that alloca is no longer the default.
9077 Explain the user's responsibility if they define YYSTACK_USE_ALLOCA
9078 to 1.
9079
9080 * doc/bison.texinfo (Location Default Action): Mention that n must
9081 be zero when k is zero. Suggested by Frank Heckenbach.
9082
9083 2004-12-22 Akim Demaille <akim@epita.fr>
9084
9085 * data/lalr1.cc (parser::token_number_type, parser::rhs_number_type)
9086 (parser::state_type, parser::semantic_type, parser::location_type):
9087 Private, not public.
9088 (parser::parse): Return ints, not bool.
9089 Returning a bool introduces a problem: 0 corresponds to false, and
9090 it seems weird to return false on success. Returning true changes
9091 the conventions for yyparse.
9092 Alternatively we could return void and send an exception.
9093 There is no clear consensus (yet?).
9094 (state_stack, semantic_stack, location_stack): Rename as...
9095 (state_stack_type, semantic_stack_type, location_stack_type): these.
9096 Private, not public.
9097 * tests/c++.at: New.
9098 * tests/testsuite.at, tests/Makefile.am: Adjust.
9099
9100 2004-12-21 Akim Demaille <akim@epita.fr>
9101
9102 * data/lalr1.cc (parser::parse): Return a bool instead of an int.
9103
9104 2004-12-21 Akim Demaille <akim@epita.fr>
9105
9106 Don't impose std::string for filenames.
9107
9108 * data/lalr1.cc (b4_filename_type): New.
9109 (position::filename): Use it.
9110 (parser.hh): Move the inclusion of stack.hh and location.hh below
9111 the user code, so that needed headers for the filename type can be
9112 included first.
9113 Forward declare them before the user code.
9114 * tests/Makefile.am (check-local, installcheck-local): Pass
9115 TESTSUITEFLAGS to the TESTSUITE.
9116
9117 2004-12-20 Akim Demaille <akim@epita.fr>
9118
9119 Use more STL like names: my_class instead of MyClass.
9120
9121 * data/lalr1.cc (LocationStack, LocationType, RhsNumberType)
9122 (SemanticStack, SemanticType, StateStack, StateType)
9123 (TokenNumberType, Stack, Slice, Traits, Parser::location)
9124 (Parser::value): Rename as...
9125 (location_stack, location_type, rhs_number_type, semantic_stack)
9126 (semantic_type, state_stack, state_type, token_number_type, stack)
9127 (slice, traits, parser::yylloc, parser::yylval): these.
9128
9129 * tests/calc.at, tests/regression.at, tests/actions.at: Adjust.
9130
9131 2004-12-19 Paul Eggert <eggert@cs.ucla.edu>
9132
9133 * data/glr.c (YYLLOC_DEFAULT): Use GNU spacing conventions.
9134 * data/yacc.c (YYLLOC_DEFAULT): Likewise.
9135
9136 2004-12-17 Paul Eggert <eggert@cs.ucla.edu>
9137
9138 Remove uses of 'short int' and 'unsigned short int'. This raises
9139 some arbitrary limits. It uses more memory but nowadays that's
9140 not much of an issue.
9141
9142 This change does not affect the generated parsers; that's a different
9143 task, as some users will want to conserve memory there.
9144
9145 Ideally we should use size_t to represent all object counts, and
9146 something like ptrdiff_t to represent signed differences of object
9147 counts; but that will require more code-cleanup than I have the
9148 time to do right now.
9149
9150 * src/LR0.c (allocate_itemsets, new_itemsets, save_reductions):
9151 Use size_t, not int or short int, to count objects.
9152 * src/closure.c (nritemset, closure): Likewise.
9153 * src/closure.h (nritemset, closure): Likewise.
9154 * src/nullable.c (nullable_compute): Likewise.
9155 * src/print.c (print_core): Likewise.
9156 * src/print_graph.c (print_core): Likewise.
9157 * src/state.c (state_compare, state_hash): Likewise.
9158 * src/state.h (struct state): Likewise.
9159 * src/tables.c (default_goto, goto_actions): Likewise.
9160
9161 * src/gram.h (rule_number, rule): Use int, not short int.
9162 * src/output.c (prepare_rules): Likewise.
9163 * src/state.h (state_number, STATE_NUMBER_MAXIMUM, transitions,
9164 errs, reductions): Likewise.
9165 * src/symtab.h (symbol_number, SYMBOL_NUMBER_MAXIMUM, struct symbol):
9166 Likewise.
9167 * src/tables.c (vector_number, tally, action_number,
9168 ACTION_NUMBER_MINIMUM): Likewise.
9169 * src/output.c (muscle_insert_short_int_table): Remove.
9170
9171 2004-12-17 Akim Demaille <akim@epita.fr>
9172
9173 * data/lalr1.cc: Extensive Doxygenation.
9174 (error_): Rename as...
9175 (error): this, since it is visible to the user.
9176 Adjust callers.
9177 (Parser::message): Now an automatic variable from...
9178 (Parser::yyreport_syntax_error_): here.
9179 * tests/actions.at, tests/calc.at, tests/regression.at: Adjust to
9180 Parser::error.
9181 * tests/input.at: Escape $.
9182
9183 2004-12-16 Paul Eggert <eggert@cs.ucla.edu>
9184
9185 * data/glr.c (b4_lhs_value, b4_rhs_value, b4_rhs-location):
9186 Parenthesize rhs to avoid obscure problems with mistakes like
9187 "foo$$bar = foo$1bar;". Problem reported by twlevo at xs4all.
9188 * data/lalr1.cc (b4_lhs_value, b4_rhs_value, b4_lhs_location,
9189 b4_rhs_location): Likewise.
9190 * data/yacc.c (b4_lhs_value, b4_rhs_value, b4_lhs_location,
9191 b4_rhs_location): Likewise.
9192
9193 2004-12-16 Akim Demaille <akim@epita.fr>
9194
9195 * data/lalr1.cc (yyreport_syntax_error_): Catch up with glr.c and
9196 yacc.c: be sure to stay within yycheck_.
9197 * tests/actions.at: Re-enable C++ tests.
9198
9199 2004-12-16 Akim Demaille <akim@epita.fr>
9200
9201 * src/print_graph.c (print_graph): Remove layoutalgorithm uses for
9202 real.
9203
9204 2004-12-16 Akim Demaille <akim@epita.fr>
9205
9206 Use #define to handle the %name-prefix.
9207
9208 * data/glr.c, data/yacc.c: Comment changes.
9209 * data/lalr1.cc (yylex): Use #define to select the name of yylex,
9210 so that one can refer to yylex in the parser file, and have it
9211 renamed, as is the case with other skeletons.
9212
9213 2004-12-16 Akim Demaille <akim@epita.fr>
9214
9215 Move lalr1.cc internals into yy*.
9216
9217 * data/lalr1.cc (semantic_stack_, location_stack_, state_stack_)
9218 (semantic_stack_, location_stack_, pact_, pact_ninf_, defact_)
9219 (pgoto_, defgoto_, table_, table_ninf_, check_, stos_, r1_, r2_)
9220 (name_, rhs_, prhs_, rline_, token_number_, eof_, last_, nnts_)
9221 (empty_, final_, terror_, errcode_, ntokens_)
9222 (user_token_number_max_, undef_token_, n_, len_, state_, nerrs_)
9223 (looka_, ilooka_, error_range_, nerrs_):
9224 Rename as...
9225 (yysemantic_stack_, yylocation_stack_, yystate_stack_)
9226 (yysemantic_stack_, yylocation_stack_, yypact_, yypact_ninf_)
9227 (yydefact_, yypgoto_, yydefgoto_, yytable_, yytable_ninf_)
9228 (yycheck_, yystos_, yyr1_, yyr2_, yyname_, yyrhs_, yyprhs_)
9229 (yyrline_, yytoken_number_, yyeof_, yylast_, yynnts_, yyempty_)
9230 (yyfinal_, yyterror_, yyerrcode_, yyntokens_)
9231 (yyuser_token_number_max_, yyundef_token_, yyn_, yylen_, yystate_)
9232 (yynerrs_, yylooka_, yyilooka_, yyerror_range_, yynerrs_):
9233 these.
9234
9235 2004-12-15 Paul Eggert <eggert@cs.ucla.edu>
9236
9237 Fix some problems reported by twlevo at xs4all.
9238 * src/symtab.c (symbol_new): Report an error if the input grammar
9239 contains too many symbols. This is better than calling abort() later.
9240 * src/vcg.h (enum layoutalgorithm): Remove. All uses removed.
9241 (struct node, struct graph):
9242 Rename member expand to stretch. All uses changed.
9243 (struct graph): Remove member layoutalgorithm. All uses removed.
9244 * src/vcg.c (get_layoutalgorithm_str): Remove. All uses removed.
9245 * src/vcg_defaults.h (G_STRETCH): Renamed from G_EXPAND.
9246 All uses changed.
9247 (N_STRETCH): Rename from N_EXPAND. All uses changed.
9248
9249 2004-12-15 Akim Demaille <akim@epita.fr>
9250
9251 * data/lalr1.cc: Normalize /** \brief ... */ to ///.
9252 Add more Doxygen comments.
9253 (symprint_, stack_print_, reduce_print_, destruct_, pop)
9254 (report_syntax_error_, translate_): Rename as...
9255 (yysymprint_, yystack_print_, yyreduce_print_, yydestruct_)
9256 (yypop_, yyreport_syntax_error_, yytranslate_): this.
9257
9258 2004-12-15 Akim Demaille <akim@epita.fr>
9259
9260 * data/lalr1.cc (lex_): Rename as...
9261 (yylex_): this.
9262 Move the trace here.
9263 Take the %name-prefix into account.
9264 Reported by Alexandre Duret-Lutz.
9265
9266 2004-12-15 Akim Demaille <akim@epita.fr>
9267
9268 Simplify the C++ parser constructor.
9269
9270 * data/lalr1.cc (debug_): Rename as...
9271 (yydebug_): so that the parser's internals are always in the yy*
9272 pseudo namespace.
9273 Adjust uses.
9274 (b4_parse_param_decl): Remove the leading comma as it is now only
9275 called as unique argument list.
9276 (Parser::Parser): Remove the constructor accepting a location and
9277 an initial debugging level.
9278 Remove from the other ctor the argument for the debugging level.
9279 (debug_level_type, debug_level, set_debug_level): New.
9280
9281 * tests/actions.at, tests/calc.at, tests/regression.at: Adjust
9282 constructor calls.
9283
9284 2004-12-15 Akim Demaille <akim@epita.fr>
9285
9286 Remove b4_root related material: failure experiment
9287 (which goal was to allow to derive from a class).
9288
9289 * data/lalr1.cc (b4_root, b4_param, b4_constructor): Remove
9290 definitions and uses.
9291
9292 2004-12-14 Paul Eggert <eggert@cs.ucla.edu>
9293
9294 * data/glr.c (struct yyGLRStack): yyerror_range now has 3 items,
9295 not 2, since it's not portable to subtract 1 from the start of an
9296 array. The new item 0 is never set or used. All uses changed.
9297
9298 (yyrecoverSyntaxError): Use YYLLOC_DEFAULT instead of assuming
9299 the default definition of YYLLOC_DEFAULT. Problem reported
9300 by Frank Heckenbach.
9301
9302 2004-12-12 Paul Eggert <eggert@cs.ucla.edu>
9303
9304 * data/glr.c (YYRHSLOC): Don't have two definitions, one for
9305 the normal case and one for the error case. Just use the
9306 first one uniformly. Problem reported by Frank Heckenbach.
9307 (YYLLOC_DEFAULT): Use the conventions of yacc.c, so we can
9308 use exactly the same macro in both places.
9309 (yyerror_range): Now of type yyGLRStackItem, not YYLTYPE,
9310 so that the normal-case YYRHSLOC works for the error case too.
9311 All uses changed.
9312 * data/yacc.c (YYRHSLOC): New macro, taken from glr.c.
9313 (YYLLOC_DEFAULT): Use the same macro as glr.c.
9314 * doc/bison.texinfo (Location Default Action): Don't claim that
9315 we have an array of locations. Use the same macro for both glr
9316 and lalr parsers. Mention YYRHSLOC. Mention what happens when
9317 the index is 0.
9318
9319 2004-12-10 Paul Eggert <eggert@cs.ucla.edu>
9320
9321 * HACKING: Update email addresses to send announcements to.
9322
9323 * configure.ac (AC_INIT): Bump version to 1.875f.
9324
9325 2004-12-10 Paul Eggert <eggert@cs.ucla.edu>
9326
9327 * NEWS: Version 1.875e.
9328 * src/parse-gram.c, src/parse-gram.h: Regenerate with 1.875e.
9329
9330 * src/scan-skel.l: Include "complain.h", for "fatal".
9331
9332 * src/relation.h (relation_print, relation_digraph):
9333 Relation sizes are of type relation_node, not size_t (this is
9334 merely a doc fix, since the two types are equivalent).
9335 (relation_transpose): Relation sizes are of type relation_node,
9336 not int.
9337 * src/relation.c: Likewise.
9338 (top, infinity): Now of type relation_node, not int.
9339 (traverse, relation_transpose): Use relation_node, not int.
9340
9341 * data/glr.c (yyuserAction, yyrecoverSyntaxError): Mark args
9342 with ATTRIBUTE_UNUSED if they're not used, to avoid GCC warning.
9343 (yyparse): Remove unused local introduced in 2004-10-25 patch.
9344
9345 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): New arg
9346 specifying whether the test should be skipped. Use it tp
9347 specify that the [%defines %skeleton "lalr1.cc"] tests currently
9348 fail on some hosts, and should be skipped.
9349
9350 2004-12-08 Paul Eggert <eggert@cs.ucla.edu>
9351
9352 * src/system.h (CALLOC, MALLOC, REALLOC): Remove. All callers
9353 changed to use xcalloc, xnmalloc, xnrealloc, respectively,
9354 unless otherwise specified below.
9355
9356 * src/LR0.c (allocate_itemsets): Use xnmalloc, not xcalloc,
9357 to allocate kernel_base, kernel_items, kernel_size, since
9358 they needn't be initialized to 0.
9359 (allocate_storgae): Likewise, for shiftset, redset, shift_symbol.
9360 * src/closure.c (new_closure): Likewise, for itemset.
9361 * src/derives.c (derives_compute): Likewise, for delts, derives, q.
9362 * src/lalr.c (set_goto_map): Likewise, for temp_map.
9363 (initialize_F): Likewise, for reads, edge, reads[i], includes[i].
9364 (build_relations): Likewise for edge, states1, includes.
9365 * src/nullable.c (nullable_compute): Likewise, for squeue, relts.
9366 * src/reader.c (packgram): Likewise, for ritem, rules.
9367 * src/reduce.c (nonterminals_reduce): Likewise for nontermmap.
9368 * src/relation.c (relation_digraph): Likewise for VERTICES.
9369 (relation_transpose): Likewise for new_R, end_R.
9370 * src/symtab.c (symbols_token_translations_init): Likewise for
9371 token_translations.
9372 * src/tables.c (save_row): Likewise for froms, tos, conflict_tos.
9373 (token_actions): Likewise for yydefact, actrow, conflrow,
9374 conflict_list.
9375 (save_column): Likewise for froms[symno], tos[symno].
9376 (goto_actions): Likewise for state_count.
9377 (pack_table): Likewise for base, pos, check.
9378 (tables_generate): Likewise for width.
9379
9380 * src/LR0.c (set_states): Don't reuse kernel_size and kernel_base
9381 for initial core. Just have a separate core, so we needn't worry
9382 about whether kernel_size and kernel_base are initialized.
9383
9384 * src/LR0.c (shift_symbol, redset, shiftset, kernel_base,
9385 kernel_size, kernel_items): Remove unnecessary initialization.
9386 * src/conflicts.c (conflicts): Likewise.
9387 * src/derives.c (derives): Likewise.
9388 * src/muscle_tablc (muscle_insert): Likewise.
9389 * src/relation.c (relation_digraph): Likewise.
9390 * src/tables.c (froms, tos, conflict_tos, tally, width, actrow, order,
9391 conflrow, conflict_table, conflict_list, table, check):
9392 Likewise.
9393
9394 * src/closure.c (new_closure): Arg is of type unsigned int, not int.
9395 This is because all callers pass unsigned int.
9396 * src/closure.h (new_closure): Likewise.
9397
9398 * src/lalr.c (initialize_F): Initialize reads[i] in all cases.
9399 (build_relations): Initialize includes[i] in all cases.
9400 * src/reader.c (packgram): Always initialize rules[ruleno].prec
9401 and rules[ruleno].precsym. Initialize members in order.
9402 * src/relation.c (relation_transpose): Always initialize new_R[i]
9403 and end_R[i].
9404 * src/table.c (conflict_row): Initialize 0 at end of conflict_list.
9405
9406 * src/output.c (prepare_actions): Pass 0 instead of conflict_list[0];
9407 conflict_list[0] was always 0, but now it isn't initialized.
9408
9409 * src/table.c (table_grow): When conflict_table grew, the grown
9410 area wasn't cleared. Fix this.
9411
9412 * lib/.cvsignore: Add strdup.c, strdup.h.
9413 * m4/.cvsignore: Add strdup.m4.
9414
9415 2004-12-07 Paul Eggert <eggert@cs.ucla.edu>
9416
9417 * src/lalr.h (GOTO_NUMBER_MAXIMUM): New macro.
9418 * src/lalr.c (set_goto_map): Don't allow ngotos to equal
9419 GOTO_NUMBER_MAXIMUM, since we occasionally compute
9420 ngotos + 1 without checking for overflow.
9421 (build_relations): Use END_NODE, not -1, to denote end of edges.
9422 * src/lalr.c (set_goto_map, map_goto, initialize_F, add_loopback_edge,
9423 build_relations): Use goto_number, not int, for goto numbers.
9424 * src/tables.c (save_column, default_goto): Likewise.
9425
9426 2004-11-23 Akim Demaille <akim@epita.fr>
9427
9428 * data/lalr1.cc (YYSTYPE): Define it as is done for C, instead
9429 of #defining from yystype.
9430 Don't typedef yystype, C++ does not need it.
9431 This lets it possible to forward declare it as union.
9432
9433 2004-11-23 Paul Eggert <eggert@cs.ucla.edu>
9434
9435 * bootstrap (gnulib_modules): Add extensions.
9436 Problem reported by Jim Meyering.
9437
9438 2004-11-22 Paul Eggert <eggert@cs.ucla.edu>
9439
9440 * src/LR0.c, src/closure.c, src/derives.c, src/gram.c,
9441 src/lalr.c, src/nullable.c, src/relation.c, src/scan-skel.l,
9442 src/system.h, src/tables.c: XFREE -> free, to accommodate
9443 recent change to gnulib xalloc.h.
9444 Problem reported by Jim Meyering.
9445
9446 2004-11-17 Akim Demaille <akim@epita.fr>
9447
9448 * data/lalr1.cc (symprint_): Use cdebug_ to avoid warnings.
9449
9450 2004-11-17 Akim Demaille <akim@epita.fr>,
9451 Alexandre Duret-Lutz <adl@gnu.org>
9452
9453 * data/lalr1.cc (Parser::yycdebug_): New, a pointer, to allow
9454 changes.
9455 (YYCDEBUG): Adjust.
9456 Use it instead of cdebug_.
9457 (Parser::debug_stream, Parser::set_debug_stream): New.
9458 (Parser::symprint_): Define cdebug_ for temporary backward
9459 compatibility.
9460 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Use
9461 debug_stream ().
9462
9463 2004-11-17 Akim Demaille <akim@epita.fr>
9464
9465 * data/lalr1.cc (Parser:print_): Remove, use %printer instead.
9466 * tests/regression.at (_AT_DATA_DANCER_Y): Adjust.
9467 * tests/calc.at (_AT_DATA_CALC_Y): Ditto.
9468 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise.
9469
9470 2004-10-27 Paul Eggert <eggert@cs.ucla.edu>
9471
9472 * data/glr.c (yyloc_default): Remove; not used.
9473 Problem reported by Frank Heckenbach.
9474
9475 2004-10-25 Akim Demaille <akim@epita.fr>
9476
9477 * data/glr.c (YYRHSLOC): Move its definition next to its uses.
9478 Introduce another definition to address simple location arrays.
9479 (yyGLRStack): New member: yyerror_range.
9480 (yyrecoverSyntaxError, yyparse): Update it.
9481 (yyrecoverSyntaxError): Use it when shifting the error token to
9482 have an accurate range, equivalent to the one computed by both
9483 yacc.c and lalr1.cc.
9484 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Change its yylex so
9485 that column numbers start at column 0, as per GNU Coding
9486 Standards, the others tests, and the doc.
9487 (_AT_RESOLVED_GLR_OUTPUT_WITH_LOC, _AT_AMBIG_GLR_OUTPUT_WITH_LOC):
9488 Adjust to the above change (first column is 0).
9489 And adjust the location of the "<error>", now covering the whole
9490 line.
9491
9492 2004-10-22 Akim Demaille <akim@epita.fr>
9493 and Paul Eggert <eggert@cs.ucla.edu>
9494
9495 Remove some arbitrary limits on goto numbers and relations.
9496 * src/lalr.c (goto_map, ngotos, from_state, to_state): Omit
9497 initial values, since they're never used.
9498 (set_goto_map): ngotos is now unsigned, so test for overflow
9499 by seeing whether it wraps around to zero.
9500 * src/lalr.h (goto_number): Now size_t, not short int.
9501 (GOTO_NUMBER_MAXIMUM): Remove.
9502 * src/relation.c (relation_print, traverse, relation_transpose):
9503 Check for END_NODE rather than looking at sign.
9504 * src/relation.h (END_NODE): New macro.
9505 (relation_node): Now size_t, not short int.
9506
9507 2004-10-22 Paul Eggert <eggert@cs.ucla.edu>
9508
9509 * doc/bison.texinfo (Language and Grammar): In example, "int" is a
9510 keyword, not an identifier. Problem reported by Baron Schwartz in
9511 <http://lists.gnu.org/archive/html/bug-bison/2004-10/msg00017.html>.
9512
9513 2004-10-11 Akim Demaille <akim@epita.fr>
9514
9515 * src/symtab.c (symbol_check_alias_consistency): Also check
9516 type names, destructors, and printers.
9517 Reported by Alexandre Duret-Lutz.
9518 Recode the handling of associativity and precedence in terms
9519 of symbol_precedence_set.
9520 Accept no redeclaration at all, not even equal to the previous
9521 value.
9522 (redeclaration): New.
9523 Use it to factor redeclaration complaints.
9524 (symbol_make_alias): Don't set the type of the alias, let
9525 symbol_check_alias_consistency do it as for other features.
9526 * src/symtab.h (symbol): Add new member prec_location, and
9527 type_location.
9528 * src/symtab.c (symbol_precedence_set, symbol_type_set): Set them.
9529 * tests/input.at (Incompatible Aliases): New.
9530
9531 2004-10-09 Paul Eggert <eggert@cs.ucla.edu>
9532
9533 .cvsignore fixes to accommodate gnulib changes,
9534 and the practice of naming build directories "_build".
9535 * .cvsignore: Add "_*". Sort.
9536 * lib/.cvsignore: Add getopt_.h, xalloc-die.c.
9537 * m4/.cvsignore: Add "*_gl.m4".
9538
9539 2004-10-06 Akim Demaille <akim@epita.fr>
9540
9541 * src/parse-gram.y (add_param): Fix the truncation of trailing
9542 spaces.
9543
9544 2004-10-05 Akim Demaille <akim@epita.fr>
9545
9546 In Bison 1.875's yacc.c, YYLLOC_DEFAULT was called regardless
9547 whether the reducion was empty or not. This leaves room to
9548 improve the use of YYLLOC_DEFAULT in such a case.
9549 lalr1.cc is still experimental, so changing this is acceptable.
9550 And finally, there are probably not many users who changed the
9551 handling of locations in GLR, so changing is admissible too.
9552
9553 * data/glr.c, data/lalr1.cc, data/yacc.c (YYLLOC_DEFAULT): On an
9554 empty reduction, set @$ to an empty location ending the previously
9555 stacked symbol.
9556 Adjust uses to make sure the code is triggered on empty
9557 reductions.
9558 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust the
9559 expected output: empty reductions have empty locations.
9560
9561 2004-09-29 Akim Demaille <akim@epita.fr>
9562
9563 * data/lalr1.cc: Move towards a more standard C++ coding style
9564 for templates: Class < T > -> Class<T>.
9565
9566 2004-09-29 Akim Demaille <akim@epita.fr>
9567
9568 * data/lalr1.cc: Reinstall the former ctor, for sake of
9569 compatibility, but warn it will be removed.
9570 Move towards a more standard C++ coding style (i.e., type *var ->
9571 type* var).
9572
9573 2004-09-27 Paul Eggert <eggert@cs.ucla.edu>
9574
9575 * src/parse-gram.y (add_param): Rewrite to avoid strchr,
9576 since it's less likely to work if NULs are involved in the future.
9577
9578 2004-09-27 Akim Demaille <akim@epita.fr>
9579
9580 * data/yacc.c (YY_LOCATION_PRINT): Fix its default declaration.
9581
9582 2004-09-27 Akim Demaille <akim@epita.fr>
9583
9584 * data/lalr1.cc (b4_parse_param_decl_1): New.
9585 (b4_parse_param_decl): Use it to have different names between attribute
9586 and argument names.
9587 (b4_cc_constructor_call): Likewise.
9588
9589 2004-09-24 Akim Demaille <akim@epita.fr>
9590
9591 * src/parse-gram.y (add_param): Strip the leading and trailing
9592 blanks from a formal argument declaration.
9593 (YY_LOCATION_PRINT): New.
9594
9595 2004-09-24 Akim Demaille <akim@epita.fr>
9596
9597 * data/c.m4 (b4_yysymprint_generate): Move the YYINPUT invocation
9598 after the location.
9599
9600 2004-09-24 Akim Demaille <akim@epita.fr>
9601
9602 * doc/bison.texinfo (Table of Symbols): Sort.
9603
9604 2004-09-21 Akim Demaille <akim@epita.fr>
9605
9606 * data/yacc.c, data/glr.c (b4_at_dollar, b4_dollar_dollar): Remove
9607 the useless parentheses.
9608 Suggested by Paul Eggert.
9609
9610 2004-09-20 Akim Demaille <akim@epita.fr>
9611
9612 Let the initial-action act on the look-ahead, and use it for the
9613 "initial push" (corresponding to an hypothetical beginning-of-file).
9614 And let lalr1.cc honor %initial-action.
9615
9616 * doc/bison.texinfo (Initial Action Decl): Clarify, and add an
9617 example.
9618 * data/lalr1.cc (Parser::initlocation_): Remove, bad experiment.
9619 (Parser::Parser): Remove the ctor that used to initialize it.
9620 (Parser::parse): Like in the other skeletons, issue the "starting
9621 parse" message before any action.
9622 Honor %initial-action.
9623 Initialize the stacks with the lookahead.
9624 * data/yacc.c: Let $$ and @$ in %initial-action designate the
9625 look-ahead.
9626 Push them in the stacks.
9627 * tests/actions.at, tests/calc.at: Adjust the C++ ctor invocations.
9628
9629 2004-09-20 Akim Demaille <akim@epita.fr>
9630
9631 * doc/bison.texinfo (Initial Action Decl): New.
9632
9633 2004-09-20 Akim Demaille <akim@epita.fr>
9634
9635 * data/yacc.c (YY_LOCATION_PRINT): Use YYLTYPE_IS_TRIVIAL as a
9636 clearer criterion to define it.
9637 (parse): Initialize the initial location when YYLTYPE_IS_TRIVIAL.
9638 When reducing on an empty RHS, use the latest stacked location as
9639 location.
9640 yylloc is not always available.
9641 * data/glr.c: Likewise.
9642 Also, honor initial-actions.
9643
9644 2004-09-20 Akim Demaille <akim@epita.fr>
9645
9646 * data/yacc.c (YY_LOCATION_PRINT): New.
9647 Define when we know YYLTYPE's structure, i.e., when the default
9648 YYLLOC_DEFAULT is used.
9649 * data/c.m4 (b4_yysymprint_generate): Use it.
9650 * data/lalr1.cc (YYLLOC_DEFAULT): Stop relying on the initial
9651 value of the result.
9652 (error_start_): Replace with...
9653 (error_range_): this location array.
9654 This allows to replace code relying on the implementation of
9655 locations by portable code.
9656 * data/yacc.c (yylerrsp): Replace with...
9657 (yyerror_range): this.
9658 Every time a token is popped, update yyerror_range[0], to have an
9659 accurate location for the error token.
9660 * data/glr.c (YY_LOCATION_PRINT): New.
9661 (yyprocessOneStack): Fix an invocation of YY_SYMBOL_PRINT:
9662 deference a pointer.
9663 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): No longer
9664 report the location in %printers.
9665
9666 * src/scan-skel.l: Instead of abort, report error messages to ease
9667 understanding skeleton scanning failures.
9668
9669 2004-09-16 Akim Demaille <akim@epita.fr>
9670
9671 * data/lalr1.cc (Stack::Iterator, Stack::ConstIterator): Rename as...
9672 (iterator, const_iterator): these, to be more in the C++ spirit.
9673 Also, return reverse iterators so that when displaying the stack
9674 we display its bottom first.
9675 (Parser::stack_print_, Parser::reduce_print_): Match the messages
9676 from yacc.c.
9677 We should probably use vector here though.
9678
9679 2004-09-16 Akim Demaille <akim@epita.fr>
9680
9681 Have more complete shift traces.
9682
9683 * data/yacc.c, data/lalr1.c, data/glr.c: Use YY_SYMBOL_PRINT
9684 to report Shifts instead of ad hoc YYDPRINTF invocations,
9685 including for the error token.
9686 * data/lalr1.cc (symprint_): Output the location.
9687 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): In C++, don't
9688 output the location within the %printer.
9689 Activate GLR tests, at least to make sure they compile properly.
9690 They still don't pass though.
9691 * tests/calc.at: Adjust expect verbose output, since now "Entering
9692 state..." is on a different line than the "Shifting" message.
9693
9694 2004-09-08 Akim Demaille <akim@epita.fr>
9695
9696 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Move the
9697 Bison directive from the Bison file to the invocation of this
9698 macro, so that these directives are passed to
9699 AT_BISON_OPTION_PUSHDEFS to get correct help macros.
9700 Use these helping macros (e.g., AT_LOC, AT_VAL and so forth).
9701 Move the AT_SETUP/AT_CLEANUP outside, to report as test title
9702 the extra Bison directives instead of the whole series.
9703 Change the grammar so that there are recoverable errors, and
9704 unrecoverable errors. Now we can have the parser give up before
9705 consuming the whole input. As a result we now can observe that
9706 the lookahead is freed when needed.
9707 Change the parser source to parse argv[1] instead of a hard coded
9708 string.
9709 Simplify yylex, and give a value and location to EOF.
9710 Simplify some invocations of AT_CHECK_PRINTER_AND_DESTRUCTOR that
9711 passed directives already coded in the file.
9712 Add some tests to check the location of "error".
9713 For some tests, the C++ parser is correct, and not yacc.c.
9714 For other tests, they provide different, but unsatisfying, values,
9715 so keep the C++ value so that at least one parser is "correct"
9716 according to the test suite.
9717 (Actions after errors): Remove, this is subsumed by the
9718 AT_CHECK_PRINTER_AND_DESTRUCTOR series.
9719
9720 2004-09-06 Akim Demaille <akim@epita.fr>
9721
9722 * data/lalr1.cc: Adjust the indentation of the labels.
9723 (Parser::pop): New.
9724 Use it.
9725
9726 2004-09-06 Akim Demaille <akim@epita.fr>
9727
9728 * data/yacc.cc, data/glr.cc (yydestruct): Accept an additional
9729 argument, an informative message.
9730 Call YY_SYMBOL_PRINT.
9731 Adjust all callers: integrate the associated YY_SYMBOL_PRINT.
9732 * data/lalr1.cc (destruct_): Likewise.
9733 In addition, no longer depend on b4_yysymprint_generate and
9734 b4_yydestruct_generate to generate these functions, do it "by
9735 hand".
9736
9737 2004-09-03 Akim Demaille <akim@epita.fr>
9738
9739 * data/glr.c, data/lalr1.cc, data/yacc.c: When YYABORT was
9740 invoked, yydestruct the lookahead.
9741 * tests/calc.at (Calculator $1): Update the expected lengths of
9742 traces: there is an added line for the discarded lookahead.
9743 * doc/bison.texinfo (Destructor Decl): Some rewording.
9744 Define "discarded" symbols.
9745
9746 2004-09-02 Akim Demaille <akim@epita.fr>
9747
9748 * data/lalr1.cc (translate_, destruct_): No reason to be static.
9749
9750 2004-09-02 Akim Demaille <akim@epita.fr>
9751
9752 * data/glr.c, yacc.c (YYDSYMPRINT): Remove, not used.
9753 (YYDSYMPRINTF): Rename as...
9754 (YY_SYMBOL_PRINT): this.
9755 * data/lalr1.cc (YY_SYMBOL_PRINT): New, modeled after the previous
9756 two.
9757 Use it instead of direct symprint_ calls.
9758 (yybackup): Tweak the "Now at end of input" case to match yacc.c's
9759 one.
9760
9761 2004-09-02 Akim Demaille <akim@epita.fr>
9762
9763 * data/lalr1.cc (b4_yysymprint_generate): New.
9764 (symprint_): New member function, defined when YYDEBUG.
9765 Use it consistently instead of token/nterm debugging output by
9766 hand.
9767 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust
9768 %printer calls to use cdebug_ when using lalr1.cc.
9769
9770 2004-08-30 Florian Krohm <florian@edamail.fishkill.ibm.com>
9771
9772 * data/glr.c: Guard the declarations of yypstack and yypdumpstack
9773 with #ifdef YYDEBUG.
9774
9775 2004-08-26 Akim Demaille <akim@epita.fr>
9776
9777 * doc/bison.texinfo (Implementing Loops): Rename as...
9778 (Implementing Gotos/Loops): this.
9779
9780 2004-08-13 Paul Eggert <eggert@cs.ucla.edu>
9781
9782 Adjust to latest gnulib.
9783 * bootstrap (gnulib_modules): Add xalloc-die.
9784 Set LC_ALL=C so that file names sort consistently.
9785 Prefer the gnulib copies of gettext.m4, glibc21.m4,
9786 inttypes_h.m4, lib-ld.m4, lib-prefix.m4, po.m4, stdint_h.m4,
9787 uintmax_t.m4, ulonglong.m4.
9788 (intl_files_to_remove): Add gettext.m4, lib-ld.m4, lib-prefix.m4,
9789 po.m4 since we are now using _gl.m4 instead.
9790
9791 2004-08-10 Florian Krohm <florian@edamail.fishkill.ibm.com>
9792
9793 * src/scan-action.l: Remove. Scanning of semantic actions is
9794 handled in scan-gram.l.
9795
9796 2004-08-07 Florian Krohm <florian@edamail.fishkill.ibm.com>
9797
9798 * src/scan-gram.l (handle_syncline): Use uniqstr_new not xstrdup.
9799
9800 * src/location.h (struct): The file member is a uniqstr.
9801 (equal_boundaries): Use UNIQSTR_EQ for comparison.
9802
9803 2004-07-22 Paul Eggert <eggert@cs.ucla.edu>
9804
9805 Fix bug with non-%union parsers that have printers or destructors,
9806 which led to a Bison core dump. Reported by Peter Fales in
9807 <http://lists.gnu.org/archive/html/bug-bison/2004-07/msg00014.html>.
9808
9809 * data/c.m4 (b4_symbol_actions): Don't assume %union was used.
9810 * data/lalr1.cc (yystype) [defined YYSTYPE]: Define to YYSTYPE,
9811 not to our own type.
9812 * src/output.c (symbol_destructors_output, symbol_printers_output):
9813 Don't assume %union.
9814 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR,
9815 AT_CHECK_PRINTER_AND_DESTRUCTOR): New argument
9816 UNION-FLAG. All callers changed.
9817 (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Don't assume %union.
9818 Use type char, not unsigned int, when declaring an array of char;
9819 this lets us remove a cast.
9820 (Printers and Destructors): Add non-%union test cases.
9821
9822 2004-06-21 Paul Eggert <eggert@cs.ucla.edu>
9823
9824 * doc/bison.texinfo: Minor editorial changes, mostly to the new
9825 GLR writeups. E.g., avoid frenchspacing and the future tense,
9826 change "lookahead" to "look-ahead", and change "wrt" to "with
9827 respect to".
9828
9829 2004-06-21 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
9830
9831 * doc/bison.texinfo (Merging GLR Parses, Compiler Requirements):
9832 New sections, split off from the GLR Parsers section. Put the new
9833 Simple GLR Parser near the start of the GLR section, for clarity.
9834 Rewrite connective text.
9835
9836 2004-06-21 Frank Heckenbach <frank@g-n-u.de>
9837
9838 * doc/bison.texinfo (Simple GLR Parsers): New section.
9839
9840 2004-06-21 Paul Eggert <eggert@cs.ucla.edu>
9841
9842 * NEWS, TODO, doc/bison.texinfo:
9843 Use "look-ahead" instead of "lookahead", to be consistent.
9844 * REFERENCES: Fix incorrect reference to DeRemer and Pennello,
9845 while we're fixing "look-ahead".
9846 * src/conflicts.c (shift_set): Renamed from shiftset.
9847 (look_ahead_set): Renamed from lookaheadset.
9848 * src/print.c: Likewise.
9849 * src/getargs.c (report_args): Add "look-ahead" as the new canonical
9850 name for "lookahead".
9851 (report_types, usage): Likewise.
9852 * src/getargs.h (report_look_ahead_tokens): Renamed from
9853 report_lookaheads.
9854 * src/lalr.c (compute_look_ahead_tokens): Renamed from
9855 compute_lookaheads.
9856 (state_look_ahead_tokens_count): Renamed from state_lookaheads_count.
9857 (look_ahead_tokens_print): Renamed from lookaheads_print.
9858 * src/state.c (state_rule_look_ahead_tokens_print): Renamed from
9859 state_rule_lookaheads_print.
9860 * src/state.h: Likewise.
9861 (reductions.look_ahead_tokens): Renamed from lookaheads.
9862 * tests/torture.at (AT_DATA_LOOK_AHEAD_TOKENS_GRAMMAR): Renamed from
9863 AT_DATA_LOOKAHEADS_GRAMMAR.
9864
9865 2004-06-03 Paul Eggert <eggert@cs.ucla.edu>
9866
9867 * README: Update location of patched M4 distribution.
9868
9869 2004-05-30 Albert Chin-A-Young <china@thewrittenword.com>
9870
9871 Don't assume the C++ compiler takes the same arguments as the C compiler
9872 (trivial change).
9873 * configure.ac (O0CXXFLAGS): New var.
9874 * tests/atlocal.in (CXXFLAGS): Use it.
9875
9876 2004-05-29 Paul Eggert <eggert@cs.ucla.edu>
9877
9878 Fix some "make check" problems with C++ reported by
9879 Albert Chin-A-Young for Tru64 C++ in this thread:
9880 http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00049.html
9881
9882 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check for std::cerr.
9883 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
9884 Output to a .cc file for C++, not to a .c file.
9885 * tests/calc.at (AT_CHECK_CALC): Likewise.
9886 * tests/regression.at (AT_CHECK_DANCER): Likewise.
9887 * tests/local.at (AT_COMPILE_CXX): Default to OUTPUT.cc, not OUTPUT.c.
9888
9889 2004-05-28 Albert Chin-A-Young <china@thewrittenword.com>
9890
9891 * tests/calc.at, tests/actions.at: Workaround for SGI
9892 C++ compiler. (trivial change)
9893
9894 2004-05-27 Paul Eggert <eggert@cs.ucla.edu>
9895
9896 Spent a few hours checking out which prerequisite versions the
9897 current sources actually require. I went all the way back to
9898 Gettext 0.10.40, Automake 1.4, and Autoconf 2.57 and investigated
9899 a seemingly endless set of combinations of versions more recent
9900 than that. The bottom line is that the current sources require
9901 fairly recent versions of the build tools, and it'll be some work
9902 to change this.
9903 * configure.ac (AC_PREREQ): Increase from 2.58 to 2.59.
9904 (AM_INIT_AUTOMAKE): Increase from 1.7 to 1.8.
9905 (AM_GNU_GETTEXT_VERSION): Increase from 0.11.5 to 0.12.
9906 Add comments explaining why those particular versions are
9907 currently needed.
9908
9909 * src/parse-gram.y (lloc_default): Rewrite to avoid compiler bug
9910 in SGI MIPSpro 7.4.1m. Problem reported by Albert Chin-A-Young in
9911 <http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00037.html>.
9912
9913 * configure.ac (AC_PREREQ): Bump to 2.58, since 2.57 doesn't work
9914 (it fails with a Autoconf-without-aclocal-m4 diagnostic).
9915
9916 2004-05-26 Paul Eggert <eggert@cs.ucla.edu>
9917
9918 * configure.ac (AM_GNU_GETTEXT_VERSION): Lower it from 0.14.1 to
9919 0.11.5. Suggested by Bruno Haible.
9920 * bootstrap: Remove gettext version checking.
9921
9922 * doc/bison.texinfo (Decl Summary): Also mention that %union
9923 can depend on prerequisite types. Problem reported by Tim
9924 Van Holder.
9925
9926 2004-05-25 Paul Eggert <eggert@cs.ucla.edu>
9927
9928 * README: Mention GNU m4 1.4 bugs and Akim's patched version.
9929 * README-alpha: Don't tell people not to package this.
9930
9931 * bootstrap: Don't assume $(...) works; use `...` instead.
9932 Problem reported by Paul Hilfinger. Also, diagnose non-GNU
9933 gettext better.
9934
9935 * doc/bison.texinfo (Decl Summary, Bison Options): Clarify what's
9936 put into the -d output file, and mention what to do if YYSTYPE is
9937 defined as a macro.
9938
9939 2004-05-24 Paul Eggert <eggert@cs.ucla.edu>
9940
9941 Undo change made earlier today: it caused autopoint to not bring
9942 in ABOUT-NLS. Ouch. Instead, substitute our own diagnostic for
9943 autopoint's.
9944
9945 * bootstrap: Check that gettext version matches what's in
9946 configure.ac. Warn users to ignore robots.txt ERROR 404.
9947 * bootstrap: Undo today's earlier change (logged below).
9948 * configure.ac (AM_GNU_GETTEXT_VERSION): Likewise.
9949
9950 The gettext version checking is causing more trouble than it's
9951 curing; remove it. Problem reported by Paul Hilfinger.
9952
9953 * bootstrap: Issue a warning that one can expect a message
9954 'AM_GNU_GETTEXT is used, but not AM_GNU_GETTEXT_VERSION'.
9955 * configure.ac (AM_GNU_GETTEXT_VERSION): Remove.
9956
9957 2004-05-23 Paul Eggert <eggert@cs.ucla.edu>
9958
9959 Ensure that the C++ compiler used for testing actually works on a
9960 simple test program; if not, skip the C++-related tests. Problem
9961 reported by Vin Shelton in:
9962 http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00026.html
9963
9964 * m4/cxx.m4: New file.
9965 * configure.ac (BISON_TEST_FOR_WORKING_CXX_COMPILER): Add.
9966 * tests/atlocal.in (BISON_CXX_WORKS): Add.
9967 * tests/local.at (AT_COMPILE_CXX): Use it.
9968
9969 2004-05-21 Paul Eggert <eggert@cs.ucla.edu>
9970
9971 * data/glr.c (yylloc): Output this macro even if locations are not
9972 being generated, as the GLR parser needs it even in that case.
9973 Problem reported by Troy A. Johnson
9974 <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=195946>.
9975
9976 * configure.ac (AC_INIT): Update to 1.875e.
9977
9978 2004-05-21 Paul Eggert <eggert@cs.ucla.edu>
9979
9980 * NEWS: Version 1.875d.
9981 * configure.ac (AC_INIT): Likewise.
9982 * src/parse-gram.c, src/parse-gram.h: Regenerate with 1.875d.
9983
9984 * configure.ac (--enable-gcc-warnings): Do not enable -Wshadow,
9985 -Wmissing-prototypes, or -Wstrict-prototypes for C++. The current
9986 lalr1.cc runs afoul of the first, and the last two are no longer
9987 supported by GCC 3.4.0.
9988 * README: Mention GNU m4 1.4 or later; mention m4 patches.
9989 * HACKING: Use ./bootstrap, not "make update" to import foreign files.
9990
9991 2004-05-06 Paul Eggert <eggert@cs.ucla.edu>
9992
9993 * src/muscle_tab.c (hash_muscle): Accept and return size_t, not
9994 unsigned int, for compatibility with latest gnulib hash module.
9995 * src/state.c (state_hash, state_hasher): Likewise.
9996 * src/symtab.c (hash_symbol, hash_symbol_hasher): Likewise.
9997 * src/uniqstr.c (hash_uniqstr): Likewise.
9998
9999 2004-05-03 Paul Eggert <eggert@cs.ucla.edu>
10000
10001 * NEWS: Unescaped newlines are no longer allowed in char & strings.
10002
10003 * src/scan-gram.l (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER,
10004 SC_CHARACTER,SC_STRING>): Reject unescaped newlines in
10005 character and string literals.
10006 (unexpected_end): New function.
10007 (unexpected_eof): Use it.
10008 (unexpected_newline): New function.
10009 (<INITIAL,SC_AFTER_IDENTIFIER,SC_PRE_CODE>): Coalesce duplicate
10010 actions.
10011
10012 * NEWS: Document %expect-rr.
10013
10014 * bootstrap (--gnulib-srcdir=*, --cvs-user=*):
10015 Fix typo by replacing $1 with $option.
10016 Remove more 'intl'-related files.
10017 Don't DEFUN AM_INTL_SUBDIR twice.
10018
10019 * lib/.cvsignore: Add strndup.h. Remove memchr.c, memcmp.c,
10020 memrchr.c, strcasecmp.c, strchr.c, strrchr.c, strspn.c, strtol.c,
10021 strtoul.c.
10022 * m4/.cvsignore: Add exitfail.m4, extensions.m4, gnulib.m4,
10023 hard-locale.m4, mbstate_t.m4, strerror_r.m4, strndup.m4,
10024 xstrndup.m4. Remove glibc21.m4, intdiv0.m4, inttypes-pri.m4,
10025 inttypes.m4, inttypes_h.m4, isc-posix.m4, lcmessage.m4,
10026 stdint_h.m4, uintmax_t.m4, ulonglong.m4.
10027 * src/.cvsignore: Add *.output.
10028
10029 * src/parse-gram.y: Put copyright notice inside %{ %} so it
10030 gets copied to the output file.
10031
10032 2004-04-28 Paul Eggert <eggert@twinsun.com>
10033
10034 Get files from the gnulib and po repositories, instead of relying
10035 on them being in our CVS. Upgrade to latest versions of gnulib
10036 and Automake.
10037
10038 * Makefile.am (SUBDIRS): Remove m4; Automake now does m4.
10039 * bootstrap: Bootstrap from gnulib and po repositories.
10040 Much of this code was stolen from GNU diff and GNU tar's bootstrap.
10041 * README-cvs: Document these changes. Remove version numbers from
10042 mentions of build tools, since they change so often. Mention Flex.
10043
10044 * configure.ac (AC_CONFIG_MACRO_DIR): Add, with m4 as arg.
10045 (gl_USE_SYSTEM_EXTENSIONS): Add.
10046 (AC_GNU_SOURCE, AC_AIX, AC_MINIX):
10047 Remove; no longer needed, as gl_USE_SYSTEM_EXTENSIONS
10048 does this for us.
10049 (AC_ISC_POSIX): Remove; we no longer support this
10050 ancient OS, as it gets in the way of latest Autoconf & gnulib.
10051 (AC_HEADER_STDC): Remove: we now assume C89 or better.
10052 (AC_CHECK_HEADERS_ONCE): Use instead of AC_CHECK_HEADERS.
10053 Do not check for C89 headers, except for locale.h which is used
10054 by the Yacc library and must port to K&R hosts.
10055 (AC_CHECK_FUNCS_ONCE): Use instead of AC_CHECK_FUNCS.
10056 Do not check for C89 functions, except for setlocale which is
10057 used by the Yacc library.
10058 (AC_CHECK_DECLS, AC_REPLACE_FUNCS): Remove; no longer needed.
10059 (gl_DIRNAME, gl_ERROR, gl_FUNC_ALLOCA, gl_FUNC_MEMCHR,
10060 gl_FUNC_MEMRCHR, gl_FUNC_STPCPY, gl_FUNC_STRNLEN, gl_FUNC_STRTOL,
10061 gl_GETOPT, gl_HASH, gl_MBSWIDTH, gl_OBSTACK, gl_QUOTE,
10062 gl_QUOTEARG, gl_XALLOC, jm_FUNC_GLIBC_UNLOCKED_IO, jm_FUNC_MALLOC,
10063 AM_GNU_GETTEXT): Remove; now done by:
10064 (GNULIB_AUTOCONF_SNIPPET): Add. "bootstrap" builds this for us.
10065 (AC_CONFIG_FILES): Remove m4/Makefile, as Automake now does this
10066 for us.
10067
10068 * lib/Makefile.am: Include gnulib.mk, built for us by "bootstrap".
10069 (BUILT_SOURCES, EXTRA_DIST, MOSTLYCLEANFILES):
10070 Define to empty, as gnulib.mk will do the rest for us.
10071 ($(libbison_a_OBJECTS), stdbool.h): Remove, as gnulib.mk does this
10072 for us.
10073 (libbison_a_SOURCES): Define to $(lib_SOURCES) now.
10074 (lib_SOURCES): New symbol, containing only the non-gnulib libs.
10075
10076 * src/files.c: Include gnulib's xstrndup.h.
10077
10078 * src/system.h (MALLOC): Use xnmalloc, for better overflow checking.
10079 (REALLOC): Use xnrealloc, for likewise.
10080 (xstrndup, stpcpy): Remove decls, as gnulib does this for us now.
10081 (strnlen, memrchr): Remove decls; functions no longer used.
10082 Include <stpcpy.h>.
10083
10084 * config/depcomp, config/install-sh, lib/alloca.c, lib/argmatch.c,
10085 lib/argmatch.h, lib/basename.c, lib/dirname.c, lib/dirname.h,
10086 lib/error.c, lib/error.h, lib/getopt.c, lib/getopt.h,
10087 lib/getopt1.c, lib/gettext.h, lib/hash.c, lib/hash.h,
10088 lib/malloc.c, lib/mbswidth.c, lib/mbswidth.h, lib/memchr.c,
10089 lib/memcmp.c, lib/memrchr.c, lib/obstack.c, lib/obstack.h,
10090 lib/quote.c, lib/quote.h, lib/quotearg.c, lib/quotearg.h,
10091 lib/realloc.c, lib/stdbool_.h, lib/stpcpy.c, lib/strcasecmp.c,
10092 lib/strchr.c, lib/strncasecmp.c, lib/strnlen.c, lib/strrchr.c,
10093 lib/strspn.c, lib/strtol.c, lib/strtoul.c, lib/unlocked-io.h,
10094 lib/xalloc.h, lib/xmalloc.c, lib/xstrdup.c, lib/xstrndup.c,
10095 m4/Makefile.am, m4/alloca.m4, m4/dirname.m4, m4/dos.m4,
10096 m4/error.m4, m4/getopt.m4, m4/hash.m4, m4/malloc.m4,
10097 m4/mbrtowc.m4, m4/mbswidth.m4, m4/memchr.m4, m4/memcmp.m4,
10098 m4/memrchr.m4, m4/obstack.m4, m4/onceonly.m4, m4/prereq.m4,
10099 m4/quote.m4, m4/quotearg.m4, m4/realloc.m4, m4/stdbool.m4,
10100 m4/stpcpy.m4, m4/strnlen.m4, m4/strtol.m4, m4/strtoul.m4,
10101 m4/unlocked-io.m4, m4/xalloc.m4, po/LINGUAS, po/Makefile.in.in,
10102 po/Makevars, po/da.po, po/de.po, po/es.po, po/et.po, po/fr.po,
10103 po/hr.po, po/id.po, po/it.po, po/ja.po, po/ms.po, po/nl.po,
10104 po/pt_BR.po, po/ro.po, po/ru.po, po/sv.po, po/tr.po:
10105 Remove, as these files are now generated automatically
10106 by bootstrap or automake.
10107
10108 * po/ChangeLog: Remove: all but one entry was a duplicate
10109 of this file, and I moved that 2000-11-02 entry here.
10110
10111 * config/.cvsignore: Add Makefile, depcomp, install-sh.
10112 * lib/.cvsignore: Add alloca.c, alloca.h, alloca_.h, argmatch.c,
10113 argmatch.h, basename.c, dirname.c, dirname.h, error.c, error.h,
10114 exit.h, exitfail.c, exitfail.h, getopt.c, getopt.h, getopt1.c,
10115 getopt_int.h, gettext.h, gnulib.mk, hard-locale.c, hard-locale.h,
10116 hash.c, hash.h, malloc.c, mbswidth.c, mbswidth.h, memchr.c,
10117 memcmp.c, memrchr.c, obstack.c, obstack.h, quote.c, quote.h,
10118 quotearg.c, quotearg.h, realloc.c, stdbool_.h, stpcpy.c, stpcpy.h,
10119 strcasecmp.c, strchr.c, stripslash.c, strncasecmp.c, strndup.c,
10120 strnlen.c, strrchr.c, strspn.c, strtol.c, strtoul.c,
10121 unlocked-io.h, xalloc.h, xmalloc.c, xstrdup.c, xstrndup.c,
10122 xstrndup.h.
10123 * m4/.cvsignore: Remove Makefile, Makefile.in. Add alloca.m4,
10124 dirname.m4, dos.m4, error.m4, getopt.m4, hash.m4, mbrtowc.m4,
10125 mbswidth.m4, obstack.m4, onceonly.m4, quote.m4, quotearg.m4,
10126 stdbool.m4, stpcpy.m4, strnlen.m4, unlocked-io.m4, xalloc.m4.
10127 * po/.cvsignore: Add *.po, LINGUAS, Makefile.in.in, Makevars.
10128 * src/.cvsignore: Remove *_.c.
10129
10130
10131 * Makefile.maint (GZIP_ENV): Don't use --rsyncable if gzip doesn't
10132 support it. (The latest stable gzip doesn't.)
10133
10134 2004-04-27 Paul Eggert <eggert@twinsun.com>
10135
10136 * data/lalr1.cc (Parser::stos_) [! YYDEBUG]: Define even in this
10137 case, as stos_ is now used by destructors due to the 2004-02-09
10138 change.
10139
10140 Remove more K&R C support.
10141 * lib/libiberty.y (PARAMS): Remove. All uses removed.
10142 * lib/subpipe.c (errno): Remove decl.
10143 Include <stdlib.h> unconditionally.
10144 (EXIT_FAILURE): Remove macro.
10145 * src/complain.c (vfprintf, strerror): Remove.
10146 * src/system.h: Include limits.h, stdlib.h, string.h, locale.h
10147 unconditionally.
10148 (EXIT_FAILURE, EXIT_SUCCESS, setlocale): Remove defns.
10149 Use latest Autoconf recommendations for including inttypes.h, stdint.h.
10150 (strchr, strspn, memchr): Remove decls.
10151 * tests/calc.at (_AT_DATA_CALC_Y): Include stdlib.h, string.h
10152 unconditionally. Do not declare perror.
10153 * tests/conflicts.at (%nonassoc and eof): Include stdlib.h
10154 unconditionally.
10155
10156 * src/complain.c (_): Remove useless defn, as system.h defines this.
10157
10158 * lib/bitset.h (__INT_TO_PTR): Remove; workaround no longer needed
10159 with latest obstack.h.
10160 * lib/ebitset.c (ebitset_elt_alloc): Don't bother to cast args
10161 to procedure types, as obstack.h now does that for us.
10162 * lib/lbitset.c (lbitset_elt_alloc): Likewise.
10163
10164 * lib/subpipe.h [HAVE_SYS_TYPES_H]: Include <sys/types.h>,
10165 so that this include file can stand alone.
10166 * lib/subpipe.c: Do not include <sys/types.h>, as subpipe.h
10167 does this now. Include subpipe.h first after config.h, to
10168 test whether it can stand alone.
10169
10170 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Don't
10171 declare yyerror when using lalr.cc, as GCC 3.4.0 warns about the
10172 unused declaration.
10173
10174 * tests/synclines.at (%union synch line): Put a dummy member in
10175 the union, because empty unions aren't allowed in C. Caught
10176 by GCC 3.4.0.
10177
10178 2004-04-13 Jim Meyering <jim@meyering.net>
10179
10180 * src/conflicts.c (conflicts_print): Correct format string typo:
10181 use `%%' to produce literal `%'. (trivial change)
10182
10183 2004-03-30 Paul Eggert <eggert@twinsun.com>
10184
10185 * src/getargs.c (version): Update copyright year to 2004.
10186
10187 * data/c.m4 (b4_int_type): Use 'short int' rather than
10188 'short', and similarly for 'long', 'unsigned', etc.
10189 * data/glr.c (YYTRANSLATE, yyconfl, yySymbol, yyItemNum,
10190 yygetLRActions, yyprocessOneStack, yyrecoverSyntaxError,
10191 yy_yypstack, yydumpstack): Likewise.
10192 * data/lalr1.cc (user_token_number_max_, user_token_number_max_,
10193 translate_, seq_, [], pop, Slice, range_, operator+, operator+=):
10194 Likewise.
10195 * data/yacc.c (b4_int_type, yyss, YYSTACK_BYTES, yysigned_char,
10196 yy_stack_print, yyparse): Likewise.
10197 * doc/bison.texinfo (Prologue, Multiple Types): Likewise.
10198 * lib/bbitset.h (bitset_word, BITSET_WORD_BITS): Likewise.
10199 * lib/bitset.c (bitset_print): Likewise.
10200 * lib/bitset_stats.c (bitste_log_histogram_print): Likewise.
10201 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
10202 * lib/bitsetv.c (bitsetv_dump): Likewise.
10203 * lib/ebitset.c (EBITSET_ELT_BITS, ebitset_elt_alloc): Likewise.
10204 * lib/lbitset.c (LBITSET_ELT_BITS, lbitset_elt_alloc, debug_lbitset):
10205 Likewise.
10206 * src/LR0.c (allocate_itemsets): Likewise.
10207 * src/gram.h (rule_number, rule): Likewise.
10208 * src/lalr.h (goto_number): Likewise.
10209 * src/nullable.c (nullable_compute): Likewise.
10210 * src/output.c (prepare_rules): Likewise.
10211 * src/relation.c (relation_print, relation_digraph): Likewise.
10212 * src/relation.h (relation_node): Likewise.
10213 * src/state.h (state_number, transitions, errs, reductions,
10214 struct state): Likewise.
10215 * src/symtab.h (symbol_number, struct symbol): Likewise.
10216 * src/tables.c (vector_number, tally, action_number,
10217 default_goto, goto_actions): Likewise.
10218 * tests/existing.at (GNU Cim Grammar): Likewise.
10219 * tests/regression.at (Web2c Actions): Likewise.
10220
10221 * src/output.c (muscle_insert_short_int_table): Renamed from
10222 muscle_insert_short_table. All uses changed.
10223
10224 2004-03-25 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
10225
10226 * src/parse-gram.y: Define PERCENT_EXPECT_RR.
10227 (declaration): Replace expected_conflicts with expected_sr_conflicts.
10228 Add %expect-rr rule.
10229
10230 * src/scan-gram.l: Recognize %expect-rr.
10231
10232 * src/conflicts.h (expected_sr_conflicts): Rename from
10233 expected_conflicts.
10234 (expected_rr_conflicts): Declare.
10235
10236 * src/conflicts.c (expected_sr_conflicts): Rename from
10237 expected_conflicts.
10238 (expected_rr_conflicts): Define.
10239 (conflicts_print): Check r/r conflicts against expected_rr_conflicts
10240 for GLR parsers.
10241 Use expected_sr_conflicts in place of expected_conflicts.
10242 Warn if expected_rr_conflicts used in non-GLR parser.
10243
10244 * doc/bison.texinfo: Add documentation for %expect-rr.
10245
10246 2004-03-08 Paul Eggert <eggert@gnu.org>
10247
10248 Add support for hex token numbers. Suggested by Odd Arild Olsen in
10249 <http://lists.gnu.org/archive/html/bison-patches/2004-03/msg00000.html>.
10250
10251 * NEWS: Document hexadecimal tokens, no NUL bytes, %destructor
10252 in lalr1.cc.
10253 * doc/bison.texinfo (Token Decl): Add hexadecimal token numbers.
10254 * src/scan-gram.l (scan_integer): New function.
10255 ({int}): Use it.
10256 (0[xX][0-9abcdefABCDEF]+): New pattern, to support hex numbers.
10257 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>, \\x[0-9abcdefABCDEF]+,
10258 handle_action_dollar, handle_action_at, convert_ucn_to_byte):
10259 Say "long int", not "long", for uniformity with GNU style.
10260
10261 2004-02-25 Paul Eggert <eggert@twinsun.com>
10262
10263 * tests/local.at (AT_COMPILE, AT_COMPILE_CXX): Ignore stdout from
10264 compilers. This fixes a problem with Intel's C++ compiler being
10265 chatty, reported by Guido Trentalancia in
10266 <http://lists.gnu.org/archive/html/bug-bison/2004-02/msg00030.html>.
10267
10268 2004-02-09 Alexandre Duret-Lutz <adl@gnu.org>
10269
10270 Support %destructor and merge error locations in lalr1.cc.
10271
10272 * data/lalr1.cc (b4_cxx_destruct_def): New macro.
10273 (Parser::stos_): Define unconditionally.
10274 (Parser::destruct_): New method. Generate its body with
10275 b4_yydestruct_generate.
10276 (Parser::error_start_): New attribute.
10277 (Parser::parse) <yyerrlab, yyerrlab1>: Call destruct_ on erroneous
10278 token which are discarded.
10279 (Parser::parse) <yyerrlab, yyerrorlab, yyerrlab1>: Update
10280 error_start_ when erroneous token are discarded.
10281 (Parser::parse) <yyerrlab1>: Compute the location of the error
10282 token so that it covers all the discarded tokens.
10283 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust so
10284 it can be called with `%skeleton "lalr1.cc"', and do that.
10285
10286 2004-02-02 Paul Eggert <eggert@twinsun.com>
10287
10288 * src/Makefile.am (AM_CPPFLAGS): New macro. It mentions
10289 $(top_srcdir)/lib and ../lib. This fixes a bug reported
10290 by Paul Hilfinger; the old INCLUDES value didn't mention ../lib.
10291 There's no need to mention top_builddir since Automake does that
10292 for us.
10293 (INCLUDES): Remove, as Automake says it's obsolescent.
10294 Contents migrated into AM_CPPFLAGS as described above.
10295 * lib/Makefile.am (INCLUDES): Remove; obsolescent.
10296
10297 2004-01-14 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
10298
10299 * data/glr.c (yytokenName): Bullet-proof against YYEMPTY token.
10300 (yyreportSyntaxError): Handle case where lookahead token is
10301 YYEMPTY.
10302
10303 2004-01-13 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
10304
10305 * data/glr.c: Put casts on uses of YYREALLOC and YYMALLOC so that
10306 resulting parsers are compilable with C++.
10307
10308 2003-12-23 Paul Eggert <eggert@twinsun.com>
10309
10310 * config/depcomp, config/install-sh: Sync with Automake 1.8.
10311 * src/output.c (output_skeleton): Rename local var.
10312 * tests/input.at (Torturing the Scanner): Don't use \x0 or \0 in
10313 Bison tokens, as this runs afoul of the 2003-10-07 change that
10314 disallowed NUL bytes in character constants or string literals.
10315
10316 * tests/local.at: Require Autoconf 2.59's Autotest.
10317 * tests/testsuite.at: Don't include local.at, since we now assume
10318 Autoconf 2.59 or later. Autoconf 2.59 had some problems with
10319 including it.
10320 * tests/Makefile.am ($(TESTSUITE)): Remove warning about ignoring
10321 multiple inclusion warnings.
10322
10323 2003-12-02 Akim Demaille <akim@epita.fr>
10324
10325 * doc/bison.texinfo (How Can I Reset the Parser): More about start
10326 conditions.
10327 From Bruno Haible.
10328
10329 2003-11-18 Alexandre Duret-Lutz <adl@gnu.org>
10330
10331 * doc/bison.texinfo (Bison Options): Escape `@' in `$@'.
10332
10333 2003-10-07 Paul Eggert <eggert@twinsun.com>
10334
10335 * tests/Makefile.am (clean-local): Don't run 'testsuite --clean'
10336 if testsuite doesn't exist.
10337
10338 * doc/bison.texinfo (Symbols): NUL bytes are not allowed in string
10339 literals, unfortunately.
10340 * src/scan-gram.l (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>):
10341 Complain about NUL bytes in character constants or string literals.
10342
10343 2003-10-05 Paul Eggert <eggert@twinsun.com>
10344
10345 * NEWS: Don't document %no-default-prec, as it's still
10346 too experimental.
10347 * doc/bison.texinfo: Document %no-default-prec only if
10348 the defaultprec flag is set. Normally it's not.
10349
10350 2003-10-04 Paul Eggert <eggert@twinsun.com>
10351
10352 * data/glr.c (b4_rhs_value, b4_rhs_location): Yield a
10353 non-modifiable lvalue, instead of a modifiable one.
10354 * doc/bison.texinfo (Actions): Document that $$ can
10355 be assigned to. Do not claim that $$ and $N are
10356 array element references: user code should not rely on this.
10357
10358 2003-10-01 Paul Eggert <eggert@twinsun.com>
10359
10360 * src/parse-gram.h (PERCENT_NO_DEFAULT_PREC): New token.
10361 (grammar_declaration): Use it.
10362 * src/scan-gram.l: New token %no-default-prec.
10363 * tests/conflicts.at: Revamp tests to use %no-default-prec.
10364 * NEWS, doc/bison.texinfo: Document the above.
10365
10366 2003-10-01 Akim Demaille <akim@epita.fr>
10367
10368 VCG no longer supports long_straight_phase.
10369
10370 * src/vcg.c, src/vcg.h: Remove the handling of long_straight_phase.
10371 * src/print_graph.c (print_graph): Adjust.
10372
10373 2003-09-30 Frank Heckenbach <frank@g-n-u.de>
10374 and Paul Eggert <eggert@twinsun.com>
10375
10376 * doc/bison.texinfo (Decl Summary, Contextual Precedence,
10377 Table of Symbols): Document %default-prec.
10378 * src/parse-gram.y (PERCENT_DEFAULT_PREC): New token.
10379 (grammar_declaration): Set default_prec on %default-prec.
10380 * src/scan-gram.l (%default-prec): New token.
10381 * src/reader.h (default_prec): New flag.
10382 * src/reader.c: Likewise.
10383 (packgram): Handle it.
10384 * tests/conflicts.at (%default-prec without %prec,
10385 %default-prec with %prec, %default-prec 1): New tests.
10386
10387 2003-09-30 Paul Eggert <eggert@twinsun.com>
10388
10389 * tests/testsuite.at: Include local.at, not input.at, fixing
10390 a typo in the 2003-08-25 patch.
10391
10392 2003-08-27 Akim Demaille <akim@epita.fr>
10393
10394 * data/lalr1.cc (yyparse) [__GNUC__]: "Use" yyerrorlab to pacify
10395 GCC warnings.
10396
10397 2003-08-26 Akim Demaille <akim@epita.fr>
10398
10399 * config/announce-gen (print_changelog_deltas): Neutralize "<#" as
10400 "<\#" to avoid magic from Gnus when posting parts of this script.
10401
10402 2003-08-26 Akim Demaille <akim@epita.fr>
10403
10404 * data/lalr1.cc (Parser::report_syntax_error_): New, extracted from
10405 (Parser::parse): here.
10406 Adjust: nerrs and errstatus is now replaced by...
10407 (Parser::nerrs_, Parser::errstatus_): New.
10408
10409 2003-08-25 Akim Demaille <akim@epita.fr>
10410
10411 * config/announce-gen, Makefile.cfg: New.
10412 * Makefile.am: Adjust.
10413 * GNUmakefile, Makefile.maint: Update from CVS Autoconf, but
10414 keeping local WGET and WGETFLAGS modifications from Paul Eggert.
10415
10416 2003-08-25 Akim Demaille <akim@epita.fr>
10417
10418 When reducing initial empty rules, Bison parser read an initial
10419 location that is not defined. This results in garbage, and that
10420 affects Bison's own parser. Therefore we need (i) to extend Bison
10421 to support a means to initialize this location, and (ii) to use
10422 this CVS Bison to fix CVS Bison's parser.
10423
10424 * src/reader.h, reader.c (epilogue_augment): Remove, replace
10425 with...
10426 * src/muscle_tab.h, src/muscle_tab.c (muscle_code_grow): this.
10427 * src/parse-gram.y: Adjust.
10428 (%initial-action): New.
10429 (%error-verbose): Since we require CVS Bison, there is no reason
10430 not to use it.
10431 * src/scan-gram.l: Adjust.
10432 * src/Makefile.am (YACC): New, to make sure we use our own parser.
10433 * data/yacc.c (yyparse): Use b4_initial_action.
10434
10435 2003-08-25 Akim Demaille <akim@epita.fr>
10436
10437 * doc/bison.texinfo: Don't promote stdout for error messages.
10438
10439 2003-08-25 Akim Demaille <akim@epita.fr>
10440
10441 * data/lalr1.cc (Parser::reduce_print_): Remove unused yyi.
10442 From Alexandre Duret-Lutz.
10443
10444 2003-08-25 Akim Demaille <akim@epita.fr>
10445
10446 Version 1.875c.
10447
10448 2003-08-25 Akim Demaille <akim@epita.fr>
10449
10450 * data/lalr1.cc (Parser::stack_print_, YY_STACK_PRINT): New.
10451 Use them.
10452
10453 2003-08-25 Akim Demaille <akim@epita.fr>
10454
10455 * data/lalr1.cc (Parser::reduce_print_): New.
10456 Use it.
10457
10458 2003-08-25 Akim Demaille <akim@epita.fr>
10459
10460 Have lalr1.cc catch with Paul Eggert's patch to fix the infinite
10461 error recovery loops. This patch is based on
10462 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00000.html>.
10463 Also, augment the similarity between lalr1.cc and yacc.c.
10464 Note: the locations of error recovery rules are not correct yet.
10465
10466 * data/lalr1.cc: Comment changes to augment the similarity between
10467 lalr1.cc and yacc.c.
10468 (YYERROR): Goto to yyerrorlab, not yyerrlab1.
10469 (yyerrlab1): Remove, but where it used to be (now the bottom part of
10470 yyerrlab), when hitting EOF, pop the whole stack here instead of
10471 merely falling thru the default error handling mechanism.
10472 (yyerrorlab): New label, with the old contents of YYERROR,
10473 plus the following change: pop the stack of rhs corresponding
10474 to the production that invoked YYERROR. That is how Yacc
10475 behaves (required by POSIX).
10476 * tests/calc.at (AT_CHECK_CALC_LALR1_CC): No longer expected to
10477 fail.
10478
10479 2003-08-25 Akim Demaille <akim@epita.fr>
10480
10481 Tune local.at so that people can "autom4te -l autotest calc.at -o
10482 calc" for instance, to extract a sub test suite.
10483
10484 * tests/testsuite.at: Move the initialization, Autotest version
10485 requirement, and AT_TESTED invocation into...
10486 * tests/local.at: here.
10487 * tests/testsuite.at: Include it for compatibility with Autoconf
10488 2.57.
10489 * tests/Makefile.am ($(TESTSUITE)): Report that the warning should
10490 be ignore.
10491
10492 2003-08-04 Paul Eggert <eggert@twinsun.com>
10493
10494 Rework code slightly to avoid gcc -Wtraditional warnings.
10495 * data/glr.c (yyuserMerge): Return void, not YYSTYPE.
10496 The returned value is now stored in *YY0. All callers changed.
10497 * src/output.c (merge_output): Adjust to the above change.
10498
10499 2003-07-26 Paul Eggert <eggert@twinsun.com>
10500
10501 * data/glr.c (YYASSERT): New macro.
10502 (yyfillin, yydoAction, yyglrReduce, yysplitStack,
10503 yyresolveStates, yyprocessOneStack):
10504 Use `YYASSERT (FOO);' rather than `if (! (FOO)) abort ();'.
10505 Derived from a suggestion by Frank Heckenbach.
10506
10507 2003-07-25 Paul Eggert <eggert@twinsun.com>
10508
10509 * data/glr.c (yyglrReduce): Don't use C89 string concatenation,
10510 for portability to K&R C (after ansi2knr, presumably). See
10511 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00041.html>
10512 by Frank Heckenbach, though I have omitted the structure-initialization
10513 part of his glr-knr.diff patch since I recall that the Portable
10514 C Compiler didn't require that change.
10515
10516 Let the user specify how to allocate and free memory.
10517 Derived from a suggestion by Frank Heckenbach in
10518 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00041.html>.
10519 * data/glr.c (YYFREE, YYMALLOC, YYREALLOC): New macros.
10520 All uses of free, malloc, realloc changed to use these macros,
10521 and unnecessary casts removed.
10522 * data/yacc.c (YYFREE, YYMALLOC): Likewise.
10523
10524 2003-07-06 Matthias Mann <MatthiasMann@gmx.de>
10525
10526 * data/lalr1.cc (operator<<(std::ostream&, const Position&)):
10527 use s.empty() rather than s == "" to test for empty string; see
10528 <http://lists.gnu.org/archive/html/bison-patches/2003-07/msg00003.html>
10529 (trivial change)
10530
10531 2003-06-25 Akim Demaille <akim@epita.fr>
10532
10533 * config/depcomp, config/install-sh: Update from masters.
10534
10535 2003-06-20 Paul Eggert <eggert@twinsun.com>
10536
10537 * data/glr.c (YYLLOC_DEFAULT): Parenthesize arguments as needed,
10538 and return properly parenthesized result.
10539 * data/lalar1.cc (YYLLOC_DEFAULT): Likewise.
10540 * data/yacc.c (YYLLOC_DEFAULT): Likewise.
10541 Remove unnecessary parentheses from uses.
10542 * doc/bison.texinfo (Location Default Action): Describe the
10543 conventions for parentheses.
10544
10545 2003-06-19 Paul Eggert <eggert@twinsun.com>
10546
10547 * data/glr.c (yyremoveDeletes, yy_reduce_print, yyglrReduce,
10548 yyreportTree): Do not assume that size_t is the same width as int,
10549 when printing sizes. Print sizes using an unsigned format.
10550 Problem reported by Frank Heckenbach in
10551 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00035.html>.
10552
10553 Port to Forte Developer 7 C compiler.
10554 * data/glr.c (struct YYLTYPE): If locations are not being used,
10555 declare a single dummy member, as empty structs do not conform
10556 to the C standard.
10557 (YYERROR, YYBACKUP): Do not use "do { ...; return foo; } while (0)";
10558 the Forte Developer 7 C compiler complains that end-of-loop
10559 code is not reached.
10560
10561 2003-06-17 Paul Eggert <eggert@twinsun.com>
10562
10563 * lib/libiberty.h (PARAMS): Spell argument as Args, not as X, to
10564 avoid warnings from picky compilers about redefinition of PARAMS.
10565
10566 2003-06-17 Paul Eggert <eggert@twinsun.com>
10567
10568 Version 1.875b.
10569
10570 * NEWS: Document 1.875b.
10571
10572 * lib/bbitset.h: Do not include config.h; that's the includer's job.
10573 Do not include <sys/types.h>; shouldn't be needed on a C89 host.
10574 * lib/bitset.h (bitset_compatible_p): Indent as per GNU standard.
10575 Don't use 'index' in comments, as it's a builtin fn on some hosts.
10576 * lib/bitset_stats.c: Include gettext.h unconditionally, as
10577 per recent gettext manual's suggestion.
10578 * lib/ebitset.c (ebitset_resize, ebitset_unused_clear):
10579 Use prototypes, not old-style definitions.
10580 * lib/lbitset.c (lbitset_unused_clear): Likewise.
10581 * lib/vbitset.c (vbitset_resize, vbitset_ones, vbitset_zero,
10582 vbitset_empty_p, vbitset_copy1, vbitset_not, vbitset_equal_p,
10583 vbitset_subset_p, vbitset_disjoint_p, vbitset_and, vbitset_and_cmp,
10584 vbitset_andn, vbitset_andn_cmp, vbitset_or, vbitset_or_cmp,
10585 vbitset_xor, vbitset_xor_cmp, vbitset_and_or, vbitset_and_or_cmp,
10586 vbitset_andn_or, vbitset_andn_or_cmp, vbitset_or_and,
10587 vbitset_or_and_cmp, vbitset_copy): Likewise.
10588
10589 * lib/libiberty.h: Do not include config.h; that's the includer's job.
10590 Do not include <stdlib.h>.
10591 (PARAMS): Define unconditionally for C89.
10592 (ATTRIBUTE_NORETURN): Remove.
10593 (ATTRIBUTE_UNUSED): Define unconditionally.
10594
10595 Upgrade to 2003-06-08 libbitset, submitted by Michael Hayes in:
10596 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00005.html>
10597 * lib/Makefile.am (bitsets_sources): Add vbitset.c, vbitset.h.
10598 * lib/vbitset.c, lib/vbitset.h: New files.
10599 * lib/abitset.c, lib/bbitset.h, lib/bitset.c, lib/bitset.h,
10600 lib/bitset_stats.c, lib/ebitset.c, lib/lbitset.c: Import
10601 from libbitset.
10602
10603 * doc/bison.texinfo (How Can I Reset the Parser): Renamed from
10604 `How Can I Reset @code{yyparse}', since texinfo does not allow
10605 arbitrary @ in node names.
10606
10607 * m4/Makefile.am (EXTRA_DIST): Add the following files, which
10608 shouldn't be needed according to the gettext 0.12.1 documentation
10609 but which seem to be needed anyway: codeset.m4 glibc21.m4
10610 intdiv0.m4 inttypes-pri.m4 inttypes.m4 inttypes_h.m4 isc-posix.m4
10611 lcmessage.m4 nls.m4 po.m4 stdint_h.m4 uintmax_t.m4 ulonglong.m4.
10612 * po/Makefile.in.in: Upgrade to gettext 0.12.1 version.
10613
10614 * lib/.cvsignore: Add stdbool.h.
10615 * m4/.cvsignore: Add nls.m4, po.m4.
10616
10617 Upgrade to CVS gnulib.
10618 * stdbool_.h: File renamed from stdbool.h.in.
10619 * configure.ac (AM_STDBOOL_H): Invoke this instead of
10620 AC_HEADER_STDBOOL.
10621 (AM_GNU_GETTEXT): Put brackets around args, as latest manual suggests.
10622 (AM_GNU_GETTEXT_VERSION): Update to 0.12.1.
10623 * lib/Makefile.am (EXTRA_DIST): Add stdbool_.h.
10624 (MOSTLYCLEANFILES): New var.
10625 ($(libbison_a_OBJECTS)): Depend on $(STDBOOL_H).
10626 (stdbool.h): New rule.
10627 * lib/dirname.c, lib/dirname.h, lib/hash.c, lib/hash.h,
10628 lib/malloc.c, lib/obstack.h, lib/quote.c, lib/realloc.c,
10629 lib/strcasecmp.c, lib/xalloc.h, m4/alloca.m4, m4/onceonly.m4,
10630 m4/quote.m4: Upgrade to today's gnulib.
10631
10632 * tests/calc.at (AT_CHECK_CALC): New option EXPECTED-TO-FAIL.
10633 (AT_CHECK_CALC_LALR1_CC): Use it, since the C++ LALR parser fails
10634 the tests right now.
10635 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Ensure yylex and
10636 yyerror are declared before use; C99 requires this.
10637
10638 2003-06-09 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
10639
10640 * data/glr.c (YYERROR): Update definition to reset yyerrState to 0
10641 first.
10642 (yyrecoverSyntaxError): Correct the logic for setting and testing
10643 yyerrState.
10644 Correct comment on handling EOF.
10645 Allow states with only a default reduction, rather than failing
10646 (I can't quite reconstruct why these were not allowed before).
10647
10648 Fixes to avoid problem that $-N rules in GLR parsers can cause
10649 buffer overruns, corrupting state.
10650
10651 * src/output.c (prepare_rules): Output max_left_semantic_context
10652 definition.
10653 * src/reader.h (max_left_semantic_context): New variable declaration.
10654 * src/scan-gram.l (max_left_semantic_context): Define.
10655 (handle_action_dollar): Update max_left_semantic_context.
10656 * data/glr.c (YYMAXLEFT): New definition.
10657 (yydoAction): Increase size of yyrhsVals by YYMAXLEFT.
10658 (yyresolveAction): Ditto.
10659
10660 Fixes to problems with location handling in GLR parsers reported by
10661 Frank Heckenbach (2003/06/05).
10662
10663 * data/glr.c (YYLTYPE): Make trivial if locations not used.
10664 (YYRHSLOC): Add parentheses, and define only if locations used.
10665 (YYLLOC_DEFAULT): Add parentheses, and give trivial definition if
10666 locations not used.
10667 (yyuserAction): Use YYLLOC_DEFAULT to set *yylocp.
10668 (yydoAction): Remove redundant initialization of *yyvalp and *yylocp.
10669
10670 * tests/cxx-type.at: Exercise location information; update tests
10671 to differentiate output with and without locations.
10672 Remove forward declarations of yylex and yyerror---caused errors
10673 because default YYLTYPE not yet defined.
10674 Change semantic actions to compute strings, rather than printing
10675 them directly (to test proper passing of semantics values). Change
10676 output to prefix notation and update test data and expected results.
10677 (yylex): Track locations.
10678 (stmtMerge): Return value rather than printing, and include arguments
10679 in value.
10680
10681 2003-06-03 Paul Eggert <eggert@twinsun.com>
10682
10683 Avoid warnings generated by GCC 2.95.4 when Bison is
10684 configured with --enable-gcc-warnings.
10685 * data/lalr1.cc (yy::]b4_parser_class_name[::parse,
10686 yy::]b4_parser_class_name[::translate_,
10687 yy::Stack::operator[] (unsigned),
10688 yy::Stack::operator[] (unsigned) const,
10689 yy::Slice::operator[] (unsigned),
10690 yy::Slice::operator[] (unsigned) const):
10691 Rename local vars to avoid warnings.
10692 * tests/glr-regression.at (Improper handling of embedded actions
10693 and $-N in GLR parsers): Remove unused local variable from yylex.
10694 * tests/regression.at (_AT_DATA_DANCER_Y): Declare yylex to take
10695 (void) as arg when not pure, since we now assume C89 when building
10696 Bison. Pacify GCC by using parameter.
10697
10698 2003-06-02 Paul Eggert <eggert@twinsun.com>
10699
10700 * data/lalr1.cc (yy::Position::lines, yy::Position::columns,
10701 yy::Location::lines, yy::Location::columns): Rename arguments
10702 to avoid shadowing; this removes a warning generated by GCC 3.3.
10703
10704 2003-06-01 Paul Eggert <eggert@twinsun.com>
10705
10706 Don't pass C-only warning optins (e.g., -Wmissing-declarations)
10707 to g++, as GCC 3.3 complains if you do it.
10708 * configure.ac (WARNING_CXXFLAGS): New subst. Set it to
10709 everything that WARNING_CFLAGS has, except omit warnings
10710 not suitable for C++.
10711 (AC_PROG_CXX): Use this instead of AC_CHECK_PROGS([CXX], [g++]).
10712 * tests/atlocal.in (CXXFLAGS): New var.
10713 * tests/local.at (AT_COMPILE_CXX): Use it instead of CFLAGS.
10714
10715 Fix a GLR parser bug I reported in February; see
10716 <http://lists.gnu.org/archive/html/bison-patches/2003-02/msg00008.html>.
10717 The problem was that GLR parsers did not conform to the C standard,
10718 because actions like { $1 = $2 + $3; } expanded to expressions
10719 that invoked YYFILL in separate subexpressions, and YYFILL assigned
10720 to a local variable. The C standard says that expressions
10721 like (var = f ()) + (var = f ()) have undefined behavior.
10722 Another problem was that GCC sometimes issues warnings that
10723 yyfill and its parameters are unused.
10724
10725 * data/glr.c (yyfillin): Renamed from the old yyfill. Mark
10726 as possibly unused.
10727 (yyfill): New function.
10728 (YYFILL): Use it.
10729 (yyuserAction): Change type of yynormal to bool, so that it matches
10730 the new yyfill signature. Mark it as possibly unused.
10731
10732
10733 Follow up on a bug I reported in February, where a Bison-generated
10734 parser can loop. Provide a test case and a fix for yacc.c. I
10735 don't have a fix for lalr1.cc or for glr.c, unfortunately.
10736 The original bug report is in:
10737 <http://lists.gnu.org/archive/html/bison-patches/2003-02/msg00044.html>
10738
10739 * data/yacc.c (YYERROR): Now just 'goto yyerrorlab', since the
10740 macro's size was becoming unwieldy.
10741 (yyerrlab): Do not discard an empty lookahead symbol, as this
10742 might destroy garbage.
10743 (yyerrorlab): New label, with the old contents of YYERROR,
10744 plus the following change: pop the stack of rhs corresponding
10745 to the production that invoked YYERROR. That is how Yacc
10746 behaves, and POSIX requires this behavior.
10747 (yyerrlab1): Use YYPOPSTACK instead of its definiens.
10748 * tests/calc.at (_AT_DATA_CALC_Y): Include unistd.h if available.
10749 Define 'alarm' to do nothing if unistd.h is not available.
10750 Add a new rule "exp: '-' error;" to test the above change to
10751 data/yacc.c. Use 'alarm' to abort any test taking longer than
10752 10 seconds, as it's probably looping.
10753 (AT_CHECK_CALC): Test recovery from error in new grammar rule.
10754 Also, the new yacc.c generates two fewer diagnostics for an
10755 existing test.
10756
10757 2003-05-24 Paul Eggert <eggert@twinsun.com>
10758
10759 * data/glr.c (YYSTACKEXPANDABLE): Do not evaluate
10760 YYSTYPE_IS_TRIVIAL or YYSTYPE_IS_TRIVIAL unless they are defined.
10761 This fixes a problem reported by John Bowman when the Compaq/HP
10762 Alpha cxx compiler happy (e.g. using cxx -D__USE_STD_IOSTREAM
10763 -ansi -Wall -gall).
10764 * data/yacc.c (union yyalloc): Likewise.
10765 (YYCOPY): Do not evaluate __GNUC__ unless it is defined.
10766
10767 Switch from 'int' to 'bool' where that makes sense.
10768
10769 * lib/abitset.c (abitset_test, abitset_empty_p, abitset_equal_p,
10770 abitset_subset_p, abitset_disjoint_p, abitset_and_cmp,
10771 abitset_andn_cmp, abitset_or_cmp, abitset_xor_cmp, abitset_and_or,
10772 abitset_and_or_cmp, abitset_andn_or_cmp, abitset_or_and_cmp):
10773 Return or accept bool, not int. All callers changed.
10774 * lib/bbitset.h: (bitset_toggle_, bitset_copy_, bitset_and_or_cmp_,
10775 bitset_andn_or_cmp_, bitset_or_and_cmp_): Likewise.
10776 * lib/bitset.c (bitset_only_set_p, bitset_print, bitset_toggle_,
10777 bitset_copy_, bitset_op4_cmp, bitset_and_or_cmp_, bitset_andn_or_cmp_,
10778 bitset_or_and_cmp_): Likewise.
10779 * lib/bitset.h (bitset_test, bitset_only_set_p): Likewise.
10780 * lib/bitset_stats.c (bitset_stats_print, bitset_stats_toggle,
10781 bitset_stats_test, bitset_stats_empty_p, bitset_stats_disjoint_p,
10782 bitset_stats_equal_p, bitset_stats_subset_p, bitset_stats_and_cmp,
10783 bitset_stats_andn_cmp, bitset_stats_or_cmp, bitset_stats_xor_cmp,
10784 bitset_stats_and_or_cmp, bitset_stats_andn_or_cmp,
10785 bitset_stats_or_and_cmp): Likewise.
10786 * lib/ebitset.c (ebitset_elt_zero_p, ebitset_equal_p, ebitset_copy_cmp,
10787 ebitset_test, ebitset_empty_p, ebitset_subset_p, ebitset_disjoint_p,
10788 ebitset_op3_cmp, ebitset_and_cmp, ebitset_andn_cmp, ebitset_or_cmp,
10789 ebitset_xor_cmp): Likewise.
10790 * lib/lbitset.c (lbitset_elt_zero_p, lbitset_equal_p, lbitset_copy_cmp,
10791 lbitset_test, lbitset_empty_p, lbitset_subset_p, lbitset_disjoint_p,
10792 lbitset_op3_cmp, lbitset_and_cmp, lbitset_andn_cmp, lbitset_or_cmp,
10793 lbitset_xor_cmp): Likewise.
10794 * lib/bbitset.h: Include <stdbool.h>.
10795 (struct bitset_vtable): The following members now return bool, not
10796 int: toggle, test, empty_p, disjoint_p, equal_p, subset_p,
10797 and_cmp, andn_cmp, or_cmp, xor_cmp, and_or_cmp, andn_or_cmp,
10798 or_and_cmp).
10799 * src/conflicts.c (count_rr_conflicts): Likewise.
10800 * lib/bitset_stats.h (bitset_stats_enabled): Now bool, not int.
10801 All uses changed.
10802 * lib/ebitset.c (ebitset_obstack_init): Likewise.
10803 * lib/lbitset.c (lbitset_obstack_init): Likewise.
10804 * src/getargs.c (debug_flag, defines_flag, locations_flag,
10805 no_lines_flag, no_parser_flag, token_table_flag, yacc_flag,
10806 graph_flag): Likewise.
10807 * src/getargs.h (debug_flag, defines_flag, locations_flag,
10808 no_lines_flag, no_parser_flag, token_table_flag, yacc_flag,
10809 graph_flag): Likewise.
10810 * src/output.c (error_verbose): Likewise.
10811 * src/output.h (error_verbose): Likewise.
10812 * src/reader.c (start_flag, typed): Likewise.
10813 * src/reader.h (typed): Likewise.
10814 * src/getargs.c (LOCATIONS_OPTION): New constant.
10815 (long_options, getargs): Use it.
10816 * src/lalr.c (build_relations): Use bool, not int.
10817 * src/nullable.c (nullable_compute): Likewise.
10818 * src/print.c (print_reductions): Likewise.
10819 * src/tables.c (action_row, pack_vector): Likewise.
10820 * src/muscle_tab.h (MUSCLE_INSERT_BOOL): New macro.
10821 * src/output.c (prepare): Use it.
10822 * src/output.c (token_definitions_output,
10823 symbol_destructors_output, symbol_destructors_output): Use string,
10824 not boolean integer, to keep track of whether to output separator.
10825 * src/print_graph.c (print_core): Likewise.
10826 * src/state.c (state_rule_lookaheads_print): Likewise.
10827
10828 * config/install-sh: Sync from automake 1.7.5.
10829
10830 2003-05-14 Paul Eggert <eggert@twinsun.com>
10831
10832 * src/parse-gram.y (rules_or_grammar_declaration): Require a
10833 semicolon after a grammar declaration, in the interest of possible
10834 future changes to the Bison input language.
10835 Do not allow a stray semicolon at the start of the grammar.
10836 (rhses.1): Allow one or more semicolons after any rule, including
10837 just before "|" as required by POSIX.
10838 * tests/input.at (Torturing the Scanner): Add tests for ";|" in a
10839 grammar.
10840
10841 2003-05-14 Alexandre Duret-Lutz <adl@gnu.org>
10842
10843 %parse-param support for lalr1.cc.
10844
10845 * data/lalr1.cc (b4_parse_param_decl, b4_parse_param_cons,
10846 b4_cc_constructor_calls, b4_cc_constructor_call,
10847 b4_parse_param_vars, b4_cc_var_decls, b4_cc_var_decl): New m4
10848 definitions.
10849 (yy::b4_parser_class_name::b4_parser_class_name): Take extra
10850 parse-param arguments.
10851 (yy::b4_parser_class_name): Declare instance variables to
10852 hold parse-param arguments.
10853 * tests/calc.at: s/value/semantic_value/ because value clashes
10854 with a member of yy::b4_parser_class_name. Adjust C++ code
10855 to handle %parse-param. Enable %parse-param test in C++.
10856
10857 2003-05-12 Paul Eggert <eggert@twinsun.com>
10858
10859 * doc/bison.texinfo (How Can I Reset @code{yyparse}): Reword the
10860 English a bit. Fix fclose typo. Change "const char" to "char
10861 const", and use ANSI C rather than K&R for "main". Suggest
10862 YY_FLUSH_BUFFER over yyrestart (as that is what Flex recommends)
10863 and suggest yy_switch_to_buffer.
10864
10865 2003-05-05 Paul Eggert <eggert@twinsun.com>
10866
10867 * lib/bitset.h (__INT_TO_PTR): Define to a value that presumes
10868 C89. This avoids a diagnostic on compilers that define __STDC__
10869 to 0, fixing a problem with Tru64 cc reported by Martin Mokrejs in
10870 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00041.html>.
10871
10872 2003-05-03 Paul Eggert <eggert@twinsun.com>
10873
10874 * lib/bitset.h (BITSET_FOR_EACH, BITSET_FOR_EACH_REVERSE):
10875 Do not overrun array bounds.
10876 This should fix a bug reported today by Olatunji Oluwabukunmi in
10877 <http://lists.gnu.org/archive/html/bug-bison/2003-05/msg00004.html>.
10878
10879 2003-04-29 Akim Demaille <akim@epita.fr>
10880
10881 * src/gram.h, src/gram.c (pure_parser, glr_parser): Move to...
10882 * src/getargs.c, src/getargs.h: here, as bool, not int.
10883 (nondeterministic_parser): New.
10884 * src/parse-gram.y, src/scan-gram.l: Support
10885 %nondeterministic-parser.
10886 * src/output.c (prepare): Use nondeterministic_parser instead
10887 of glr_parser where appropriate.
10888 * src/tables.c (conflict_row, action_row, save_row)
10889 (token_actions, token_actions, pack_vector): Ditto.
10890
10891 2003-04-29 Akim Demaille <akim@epita.fr>
10892
10893 * doc/bison.texinfo (C++ Parsers, Implementing Loops): New.
10894
10895 2003-04-29 Akim Demaille <akim@epita.fr>
10896
10897 * tests/calc.at: Also test yacc.c and glr.c (but not lalr1.cc yet)
10898 with %pure-parser and %locations to exercise the patch from Yakov
10899 Markovitch below.
10900
10901 2003-04-28 Tim Van Holder <tim.van.holder@pandora.be>
10902
10903 * data/yacc.c: (b4_lex_param): Corrected for the case where
10904 %lex-param is provided and %pure-parser isn't.
10905
10906 2003-04-27 Paul Eggert <eggert@twinsun.com>
10907
10908 Avoid gcc -Wundef warnings reported by Gerald Pfeifer in
10909 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00044.html>.
10910 * data/yacc.c (YYSTACK_ALLOC): Don't evaluate YYSTACK_USE_ALLOCA
10911 if it is not defined.
10912 (YYMAXDEPTH): Don't evaluate YYMAXDEPTH if it is not defined.
10913
10914 2003-04-26 Paul Eggert <eggert@twinsun.com>
10915
10916 * data/lalr1.cc (yy::Parser::pact_ninf_, yy::Parser::table_ninf_):
10917 Declare to be of type suitable for the ninf value itself, not of
10918 type suitable for the corresponding table, since the latter might
10919 be unsigned but the ninf value might be negative. This fixes a
10920 bug reported by Alexandre Duret-Lutz in
10921 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00017.html>.
10922
10923 * configure.ac (AC_FUNC_ERROR_AT_LINE): Remove, since gl_ERROR
10924 invokes it. We shouldn't invoke it twice because it will attempt
10925 to put error.o in the archive twice. This fixes a glitch reported
10926 by Martin Mokrejs in
10927 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00041.html>.
10928
10929 2003-04-21 Paul Eggert <eggert@twinsun.com>
10930
10931 * m4/error.m4: Update from Bruno Haible's 2003-04-14 patch
10932 to gnulib.
10933
10934 2003-04-21 Yakov Markovitch <Markovitch@iso.ru>
10935
10936 * data/glr.c (yyexpandGLRStack) [!YYSTACKEXPANDABLE]:
10937 Fix obvious typo that results in uncompilable GLR parsers
10938 when both %pure-parser and %locations are used. (trivial change)
10939
10940 2003-04-17 Paul Eggert <eggert@twinsun.com>
10941
10942 * src/scan-gram.l: Add %option nounput, since we no longer use unput.
10943 (unexpected_eof): Renamed from unexpected_end_of_file, for brevity.
10944 Do not insert the expected token via unput, as this runs afoul
10945 of a POSIX-compatibility bug in flex 2.5.31.
10946 All uses changed to BEGIN the parent state,
10947 since we no longer insert the expected token via unput.
10948 * tests/regression.at (Invalid inputs): Remove cascaded diagnostic
10949 that is no longer emitted after the above change.
10950
10951 * src/conflicts.c (set_conflicts): Resolve all conflicts, not just
10952 the first one. This change is from Paul Hilfinger, and it fixes
10953 regression reported by Werner Lemberg in
10954 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00026.html>.
10955
10956 (resolve_sr_conflict): Don't invoke state_errs_set
10957 unless one or more tokens have been explicitly made errors.
10958 Otherwise, the above change causes Bison to abort.
10959
10960 * tests/existing.at (GNU pic Grammar): New test case, taken from
10961 Lemberg's email.
10962
10963 2003-03-31 Akim Demaille <akim@epita.fr>
10964
10965 * doc/Makefile.am (AM_MAKEINFOFLAGS): Don't split the info file.
10966
10967 2003-03-31 Akim Demaille <akim@epita.fr>
10968
10969 * src/output.c (prepare_symbols): Avoid trailing spaces in the
10970 output.
10971
10972 2003-03-31 Akim Demaille <akim@epita.fr>
10973
10974 * doc/bison.texinfo (Strings are Destroyed): s/losses/loses/.
10975 From Paul Hilfinger.
10976
10977 2003-03-29 Akim Demaille <akim@epita.fr>
10978
10979 * m4/error.m4: Do not put under dynamic conditions some code which
10980 expansion is under static control.
10981
10982 2003-03-29 Akim Demaille <akim@epita.fr>
10983
10984 * doc/bison.texinfo (How Can I Reset @code{yyparse}): New.
10985
10986 2003-03-29 Akim Demaille <akim@epita.fr>
10987
10988 * doc/bison.texinfo (Strings are Destroyed): New.
10989
10990 2003-03-13 Paul Eggert <eggert@twinsun.com>
10991
10992 * .cvsignore: Add configure.lineno.
10993 * src/.cvsignore: Add yacc.
10994 * tests/.cvsignore: Add testsuite.log.
10995 * doc/fdl.texi: Sync with latest FSF version.
10996
10997 2003-03-12 Paul Eggert <eggert@twinsun.com>
10998
10999 * scan-gram.l (YY_USER_INIT): Initialize code_start, too.
11000 (<INITIAL><<EOF>>, <SC_PRE_CODE><<EOF>>): Set *loc to the scanner
11001 cursor, instead of leaving it undefined. This fixes a bug
11002 reported by Tim Van Holder in
11003 <http://lists.gnu.org/archive/html/bug-bison/2003-03/msg00023.html>.
11004 * tests/input.at (Torturing the Scanner): Test the scanner on
11005 an empty input file, which was Tim Van Holder's test case.
11006
11007 * m4/timevar.m4 (BISON_PREREQ_TIMEVAR): When checking whether
11008 <sys/resource.h> can be included, include sys/time.h and
11009 sys/times.h first, if available. This works around the SunOS
11010 4.1.4 porting bug reported by Bruce Becker in
11011 <http://lists.gnu.org/archive/html/bug-bison/2003-03/msg00018.html>.
11012
11013 * m4/subpipe.m4 (BISON_PREREQ_SUBPIPE): Don't
11014 AC_CHECK_HEADERS([sys/wait.h]), as this interferes with
11015 AC_HEADER_SYS_WAIT.
11016
11017 Merge changes from gnulib. This was prompted because the CVS
11018 snapshot didn't build on Solaris 7 due to strnlen problems.
11019
11020 These changes need to be merged back into gnulib:
11021 * lib/hash.c: Include <stdbool.h> unconditionally.
11022 * m4/onceonly.m4 (m4_quote): New macro.
11023 (AC_CHECK_HEADERS_ONCE, AC_CHECK_FUNCS_ONCE, AC_CHECK_DECLS_ONCE):
11024 Quote AC_FOREACH variable-expansions properly.
11025 The 2003-01-03 obstack.h change also needs merging.
11026 {end of changes requiring merging}
11027
11028 * lib/stdbool.h.in, m4/alloca.m4, m4/dirname.m4, m4/dos.m4,
11029 m4/getopt.m4, m4/hash.m4, m4/malloc.m4, m4/memchr.m4,
11030 m4/memrchr.m4, m4/obstack.m4, m4/onceonly.m4, m4/quote.m4,
11031 m4/quotearg.m4, m4/realloc.m4, m4/stpcpy.m4, m4/strnlen.m4,
11032 m4/strtol.m4, m4/strtoul.m4, m4/unlocked-io.m4, m4/xalloc.m4:
11033 New files, imported from gnulib.
11034 * m4/Makefile.am (EXTRA_DIST): Add the new m4/*.m4 files mentioned
11035 above.
11036
11037 * lib/mbswidth.c, m4/error.m4, m4/mbrtowc.m4, m4/mbswidth.m4,
11038 m4/memcmp.m4, m4/prereq.m4, m4/stdbool.m4: Update to current
11039 gnulib sources.
11040
11041 * configure.ac (gl_DIRNAME, gl_GETOPT, gl_HASH, gl_QUOTE, gl_XALLOC):
11042 Add.
11043 (gl_ERROR): New, replacing jm_PREREQ_ERROR.
11044 (gl_FUNC_ALLOCA): New, replacing AC_FUNC_ALLOCA.
11045 (gl_FUNC_STPCPY): New, replacing AC_REPLACE_FUNCS(stpcpy).
11046 (gl_FUNC_STRNLEN): New, replacing AC_FUNC_STRNLEN.
11047 (gl_MBSWIDTH): New, replacing jm_PREREQ_MBSWIDTH.
11048 (gl_OBSTACK): New, replacing AC_FUNC_OBSTACK.
11049 (gl_QUOTEARG): New, replacing jm_PREREQ_QUOTEARG.
11050 (jm_FUNC_GLIBC_UNLOCKED_IO, gl_FUNC_STPCPY, gl_FUNC_STRTOL): New.
11051 (jm_FUNC_MALLOC): New, replacing AC_FUNC_MALLOC.
11052 (jm_FUNC_REALLOC): New, replacing AC_FUNC_REALLOC.
11053 (jm_PREREQ_ARGMATCH): Remove.
11054 (AC_REPLACE_FUNCS): Remove memchr, memrchr, stpcpy, strtol, strtoul.
11055 * lib/Makefile.am (libbison_a_SOURCES): Add argmatch.c, argmatch.h.
11056
11057 * src/system.h: Include <stdbool.h> unconditionally.
11058
11059 * lib/bbitset.h: Include <limits.h> unconditionally. We have been
11060 assuming at least C89 in the bitset code for some time now.
11061
11062 2003-03-03 Akim Demaille <akim@epita.fr>
11063
11064 * ro.po: New.
11065
11066 2003-03-02 Akim Demaille <akim@epita.fr>
11067
11068 * doc/bison.texinfo (Table of Symbols): Reactivate the
11069 documentation for %lex-param, and %parse-param.
11070
11071 2003-03-02 Akim Demaille <akim@epita.fr>
11072
11073 * data/yacc.c, data/glr.c, data/lal1.cc: Use similar code to
11074 generate verbose error messages.
11075 Use the number of tokens as an upper bound in yytname, as it
11076 cannot be a non terminal.
11077
11078 2003-03-02 Akim Demaille <akim@epita.fr>
11079
11080 * tests/regression.at (_AT_DATA_DANCER_Y): Fix the expected error
11081 message.
11082
11083 2003-03-02 Akim Demaille <akim@epita.fr>
11084
11085 * tests/regression.at (_AT_DATA_DANCER_Y, AT_CHECK_DANCER): New.
11086 Use them to exercise yycheck overrun.
11087 Based on Andrew Suffield's grammar.
11088
11089 2003-03-02 Akim Demaille <akim@epita.fr>
11090
11091 Create tests/local.at for Bison generic testing macros.
11092
11093 * tests/calc.at (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): Move to...
11094 * tests/local.at (AT_BISON_OPTION_PUSHDEFS, AT_BISON_OPTION_POPDEFS):
11095 This new file.
11096 * tests/calc.at (AT_CHECK_CALC): Adjust.
11097 * tests/testsuite.at (AT_DATA_GRAMMAR_PROLOGUE, AT_DATA_GRAMMAR)
11098 (AT_COMPILE, AT_COMPILE_CXX, AT_PARSER_CHECK): Move to...
11099 * tests/local.at: here.
11100 (AT_COMPILE_CXX): Tags the tests using it as c++.
11101 Ignore the test if CXX is not functional.
11102
11103 2003-03-01 Paul Eggert <eggert@twinsun.com>
11104
11105 * src/scan-gram.l (code_start): Initialize it to scanner_cursor,
11106 not loc->end, since loc->end might contain garbage and this leads
11107 to undefined behavior on some platforms.
11108 (id_loc, token_start): Use (IF_LINTed) initial values that do not
11109 depend on *loc, so that the reader doesn't give the the false
11110 impression that *loc is initialized.
11111 (<INITIAL>"%%"): Do not bother setting code_start, since its value
11112 does not survive the return.
11113
11114 2003-03-01 Akim Demaille <akim@epita.fr>
11115
11116 * src/scan-gram.l (code_start): Always initialize it when entering
11117 into yylex, as SC_EPILOGUE is activated *before* the corresponding
11118 yylex invocation. An alternative would be making it static, but
11119 then it starts with the second %%'s beginning, instead of its end.
11120
11121 2003-02-28 Paul Eggert <eggert@twinsun.com>
11122
11123 * lib/mbswidth.c: Include <wchar.h> before "mbswidth.h", to work
11124 around a UnixWare 7.1.1 porting bug reported by John Hughes in
11125 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00030.html>.
11126
11127 2003-02-26 Paul Eggert <eggert@twinsun.com>
11128
11129 * README: Mention compiler bug in Sun Forte Developer 6 update 2.
11130 Remove Sequent/Pyramid discussion (nobody uses them any more).
11131 Merge VMS and MS-DOS discussion; these ports may well be dead
11132 but let's keep mentioning them for now. Put <> around email
11133 addresses. Add copyright notice.
11134
11135 2003-02-24 Paul Eggert <eggert@twinsun.com>
11136
11137 * data/glr.c (yy_reduce_print): yylineno -> yylno,
11138 to avoid collision with flex use of yylineno.
11139 Problem reported by Bruce Lilly in
11140 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00016.html>.
11141 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Likewise.
11142 * data/yacc.c (yy_reduce_print): Likewise.
11143
11144 * config/depcomp: Sync with Automake 1.7.3.
11145
11146 2003-02-21 Akim Demaille <akim@epita.fr>
11147
11148 * data/lalr1.cc: Use temporary variables instead of casts to
11149 change integer types.
11150 Suggested by Paul Eggert.
11151
11152 2003-02-21 Akim Demaille <akim@epita.fr>
11153
11154 * doc/bison.texinfo: Use "location" consistently to refer to @n,
11155 to avoid confusions with lalr1.cc's notion of Position.
11156 Suggested by Paul Eggert.
11157
11158 2003-02-20 Akim Demaille <akim@epita.fr>
11159
11160 * data/lalr1.cc (position.hh): Make sure "columns" never pushes
11161 before initial_columns.
11162 (location.hh): Use consistent variable names when defining the
11163 operator<<.
11164 Use "last" so that we subtract from Positions, not from unsigned.
11165
11166 2003-02-20 Akim Demaille <akim@epita.fr>
11167
11168 * data/lalr1.cc (position.hh): New subfile, including the extended
11169 and Doxygen'ed documentation of class Position.
11170 (location.hh): Use it.
11171 Document a` la Doxygen.
11172 With the help of Benoit Perrot.
11173
11174 2003-02-20 Akim Demaille <akim@epita.fr>
11175
11176 * tests/calc.at (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): Define
11177 AT_YACC_IF.
11178 Redefine AT_YYERROR_SEES_LOC_IF using it.
11179 (_AT_DATA_CALC_Y): Don't declare yyerror when lalr1.cc, as it is
11180 not defined.
11181 Don't use the location in yy::Parser::error_ and
11182 yy::Parser::print_ when not %locations.
11183 Activate more lalr1.cc tests.
11184
11185 2003-02-19 Akim Demaille <akim@epita.fr>
11186
11187 * data/lalr1.cc: When displaying a line number, be sure to make it
11188 an int.
11189
11190 2003-02-19 Akim Demaille <akim@epita.fr>
11191
11192 * data/lalr1.cc (b4_stack_depth_init, yy::Parser::initdepth_):
11193 Remove, useless.
11194 (YYABORT, YYACCEPT, YYERROR): New.
11195 * tests/calc.at: Renable the lalr1.cc test.
11196
11197 2003-02-19 Akim Demaille <akim@epita.fr>
11198
11199 * tests/calc.at (AT_CHECK_CALC): Check different scenarios of
11200 error recovery, mixing with/without pops and discarding of the
11201 lookahead.
11202 Exercise YYERROR.
11203 Disable the lalr1.cc tests as currently it doesn't support YYERROR.
11204
11205 2003-02-17 Paul Eggert <eggert@twinsun.com>
11206
11207 * tests/atlocal.in (LDFLAGS, LIBS): New vars.
11208 * tests/testsuite.at (AT_COMPILE): Use them.
11209 This fixes the testsuite problem reported by Robert Lentz in
11210 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00011.html>.
11211
11212 2003-02-12 Paul Eggert <eggert@twinsun.com>
11213
11214 * data/yacc.c (yyerrlab) [YYERROR_VERBOSE]:
11215 Avoid subscript error in yycheck. Bug reported by Andrew Suffield in
11216 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00003.html>.
11217 * data/glr.c (yyreportSyntaxError) [YYERROR_VERBOSE]: Likewise.
11218 Check for malloc failure, for consistency with yacc.c.
11219 (yytname_size): Remove, for consistency with yacc.c.
11220
11221 The bug still remains in data/lalr1.cc, as I didn't have time
11222 to fix it there.
11223
11224 2003-02-06 Akim Demaille <akim@epita.fr>
11225
11226 * configure.ac (GXX): Rename as...
11227 (CXX): this, to keep the original Autoconf semantics.
11228 Require 2.57.
11229 * data/lalr1.cc: Fix b4_copyright invocations.
11230 If YYDEBUG is not defined, don't depend upon name_ being defined.
11231 (location.hh): Include string and iostream.
11232 (Position::filename): New member.
11233 (Position::Position ()): New.
11234 (operator<< (Position)): New.
11235 (operator- (Position, int)): New.
11236 (Location::first, Location::last): Rename as...
11237 (Location::begin, Location::end): these, to mock the conventional
11238 iterator names.
11239 (operator<< (Location)): New.
11240 * tests/atlocal.in (CXX): New.
11241 * tests/testsuite.at (AT_COMPILE_CXX): New.
11242 * tests/calc.at (_AT_DATA_CALC_Y): Adjust yyerror to report the
11243 locations in a more synthetic way.
11244 (AT_CHECK_PUSHDEFS): AT_YYERROR_SEES_LOC_IF is positive if
11245 lalr1.cc is used.
11246 Adjust the C locations to match those from Emacs: first column is
11247 column 0.
11248 Change all the expected results.
11249 Conform to the GCS: simplify the locations when applicable.
11250 (LOC, VAL, YYLLOC_FORMAL, YYLLOC_ARG, USE_YYLLOC, LEX_FORMALS)
11251 (LEX_ARGS, USE_LEX_ARGS, LEX_PRE_FORMALS, LEX_PRE_ARGS): Replace
11252 these CPP macros with the m4 macros new defined by...
11253 (AT_CHECK_PUSHDEFS): this, i.e.:
11254 (AT_LALR1_CC_IF, AT_PURE_LEX_IF, AT_LOC, AT_VAL, AT_LEX_FORMALS)
11255 (AT_LEX_ARGS, AT_USE_LEX_ARGS, AT_LEX_PRE_FORMALS, AT_LEX_PRE_ARGS)
11256 New macros.
11257 (AT_CHECK_POPDEFS): Undefine them.
11258 (AT_CHECK_CALC_LALR1_CC): New.
11259 Use it for the first lalr1.cc test.
11260
11261 2003-02-04 Akim Demaille <akim@epita.fr>
11262
11263 * data/lalr1.cc (YYLLOC_DEFAULT): Fix its definition: be based on
11264 Location as is defined.
11265
11266 2003-02-04 Akim Demaille <akim@epita.fr>
11267
11268 * data/lalr1.cc: If YYDEBUG is not defined, don't depend upon
11269 name_ being defined.
11270
11271 2003-02-03 Paul Eggert <eggert@twinsun.com>
11272
11273 * src/gram.h (start_symbol): Remove unused decl.
11274
11275 Use more-consistent naming conventions for local vars.
11276
11277 * src/derives.c (derives_compute): Change type of local var from
11278 int to rule_number.
11279 * src/gram.c (grammar_rules_partial_print): Likewise.
11280 * src/print.c (print_core): Likewise.
11281 * src/reduce.c (reduce_grammar_tables): Likewise.
11282
11283 * src/gram.c (grammar_dump): Change name of item_number *
11284 local var from r to rp.
11285 * src/nullable.c (nullable_compute): Likewise.
11286
11287 * src/gram.h (ISTOKEN, ISVAR): Use i, not s, for int var.
11288
11289 * src/gram.h (symbol_number_as_item_number): Use sym, not s,
11290 for symbol or symbol_number var.
11291 * src/reader.c (grammar_start_symbol_set): Likewise.
11292 * src/reader.h (grammar_start_symbol_set, grammar_symbol_append):
11293 Likewise.
11294 * src/state.c (transitions_to): Likewise.
11295 * src/state.h: Likewise.
11296 * src/tables.c (symbol_number_to_vector_number): Likewise.
11297
11298 * src/muscle_tab.h (MUSCLE_OBSTACK_SGROW): Use p, not s, for
11299 char * var.
11300
11301 * src/parse-gram.y (lloc_default): Use loc, not r, for YYLTYPE
11302 var.
11303
11304 * src/scan-gram.l (no_cr_read): Use bytes_read, not s, for size
11305 var.
11306
11307 * src/system.h (xstrndup, strchr, strspn, strnlen, memchr, memrchr):
11308 Use str, not s, for char * var. Use ch, not c, for character var.
11309 Use size for size var.
11310
11311 * src/uniqstr.c (uniqstr_new, uniqstr_assert): Use str, not s, for
11312 char * var.
11313 (uniqstr_print, uniqst_print_processor): Use ustr, not s, for
11314 uniqstr var.
11315 * src/uniqstr.h: Likewise.
11316
11317 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str,
11318 get_layoutalgorithm_str, get_decision_str, get_orientation_str,
11319 get_node_alignment_str, get_arrow_mode_str, get_crossing_type_str,
11320 get_view_str, get_linestyle_str, get_arrowstyle_str): Rename
11321 param to have same name as that of enum, so that we don't use
11322 "s" to stand for a non-state.
11323
11324 2003-02-02 Akim Demaille <akim@epita.fr>
11325
11326 * src/scan-skel.l: Scan more than one inert character per yylex
11327 invocation.
11328
11329 2003-02-01 Paul Eggert <eggert@twinsun.com>
11330
11331 Version 1.875a.
11332
11333 * po/LINGUAS: Add ms.
11334
11335 2003-01-30 Akim Demaille <akim@epita.fr>
11336
11337 * doc/Makefile.am (CLEANFILES): Add bison.fns for distcheck.
11338
11339 2003-01-29 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
11340
11341 * tests/cxx-type.at: Correct apparent typo in Bison input: $$ instead
11342 of $1.
11343
11344 Changes in response to error report by S. Eken: GLR mode does not
11345 handle negative $ indices or $ indices in embedded rules correctly.
11346 See <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00076.html>.
11347
11348 * data/glr.c (b4_rhs_value): Change to use YYFILL macro.
11349 (b4_rhs_location): Ditto.
11350 (yyfill): New function to copy from stack tree into array
11351 incrementally.
11352 (yyuserAction): Modify to allow incremental move of semantic values
11353 to rhs array when in GLR mode.
11354 Define YYFILL to use in user-defined actions to fill semantic array
11355 as needed.
11356 Remove dummy use of yystack, as there is now a guaranteed use.
11357 (yydoAction): Modify to allow incremental move of semantic values
11358 to rhs array when in GLR mode.
11359 (yyresolveAction): Ditto.
11360 (yyglrShiftDefer): Update comment.
11361 (yyresolveStates): Use X == NULL for pointers, not !X.
11362 (yyglrReduce): Ditto.
11363 (yydoAction): Ditto
11364
11365 * tests/glr-regr1.at: Rename to ...
11366 * tests/glr-regression.at: Add new regression test for the problems
11367 described above (adapted from S. Eken).
11368 Update copyright notice.
11369 * tests/testsuite.at: Rename glr-regr1.at to glr-regression.at.
11370 * tests/Makefile.am: Ditto.
11371
11372 2003-01-28 Paul Eggert <eggert@twinsun.com>
11373
11374 * data/lalr1.cc: Do not use @output_header_name@ unless
11375 b4_defines_flag is set. This fixes two bugs reported by
11376 Tim Van Holder in
11377 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00071.html>
11378 and <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00073.html>.
11379
11380 2003-01-21 Paul Eggert <eggert@twinsun.com>
11381
11382 * data/yacc.c (YYERROR): Move code from yyerrlab1 to here, so that
11383 we don't need to worry about yyerrlab1 being reported as an
11384 "unused label" by non-GCC C compilers. The downside is that if
11385 locations are used then a couple of statements are duplicated each
11386 time YYERROR is invoked, but the upside is that the warnings
11387 should vanish.
11388 (yyerrlab1): Move code to YERROR.
11389 (yyerrlab2): Remove. Change uses back to yyerrlab1.
11390 This reverts some of the 2002-12-27 change.
11391
11392 2003-01-17 Paul Eggert <eggert@twinsun.com>
11393
11394 * src/output.c (symbol_printers_output): Fix typo that led
11395 to core dump. Problem reported by Antonio Rus in
11396 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00058.html>.
11397
11398 2003-01-13 Akim Demaille <akim@epita.fr>,
11399 Quoc Peyrot <chojin@lrde.epita.fr>,
11400 Robert Anisko <anisko_r@lrde.epita.fr>
11401
11402 * data/lalr1.cc (parse::yyerrlab1): When popping the stack, stop
11403 when the stacks contain one element, as the loop would otherwise
11404 free the last state, and then use the top state (the one we just
11405 popped). This means that the initial elements will not be freed
11406 explicitly, as is the case in yacc.c; it is not a problem, as
11407 these elements have fake values.
11408
11409 2003-01-11 Paul Eggert <eggert@twinsun.com>
11410
11411 * NEWS: %expect-violations are now just warnings, reverting
11412 to Bison 1.30 and 1.75 behavior. This fixes the GCC 3.2
11413 bootstrapping problem reported by Matthias Klose; see
11414 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00053.html>.
11415 * src/conflicts.c (conflicts_print): Likewise.
11416 * tests/conflicts.at (%expect not enough, %expect too much,
11417 %expect with reduce conflicts): Likewise.
11418 * doc/bison.texinfo (Expect Decl): Document this. Also mention
11419 that the warning is enabled if the number of conflicts changes
11420 (not necessarily increases).
11421
11422 * src/getargs.c (version): Update copyright year.
11423
11424 2003-01-09 Akim Demaille <akim@epita.fr>
11425
11426 * src/Makefile.am, lib/Makefile.am: Use $(VAR) instead of @VAR@.
11427
11428 2003-01-08 Paul Eggert <eggert@twinsun.com>
11429
11430 * Makefile.maint (WGETFLAGS):
11431 New macro, containing "-C off" to disable proxy caches.
11432 All uses of $(WGET) changed to $(WGET) $(WGETFLAGS).
11433 (rel-check): Use $(WGET) instead of wget.
11434
11435 2003-01-06 Paul Eggert <eggert@twinsun.com>
11436
11437 * doc/bison.texinfo (Generalized LR Parsing): Add a reference to
11438 the GLR paper of Scott, Johnstone and Hussain.
11439
11440 2003-01-04 Paul Eggert <eggert@twinsun.com>
11441
11442 * configure.ac (AC_ARG_ENABLE): Add --disable-yacc.
11443 (YACC_SCRIPT, YACC_LIBRARY): New vars to AC_SUBST.
11444 * lib/Makefile.am (lib_LIBRARIES): liby.a -> @YACC_LIBRARY@.
11445 (EXTRA_LIBRARIES): New var, for liby.a.
11446 * src/Makefile.am (bin_SCRIPTS): yacc -> @YACC_SCRIPT@.
11447 (EXTRA_SCRIPTS): New var, for yacc.
11448
11449 * data/yacc.c (yyerrlab1): Omit attribute if __cplusplus is defined,
11450 since GNU C++ (as of 3.2.1) does not allow attributes on labels.
11451 Problem reported by Nelson H. F. Beebe.
11452
11453 2003-01-03 Paul Eggert <eggert@twinsun.com>
11454
11455 * lib/obstack.h (__INT_TO_PTR) [__STDC__]: Cast result to
11456 (void *) to avoid diagnostic with native c89 on SGI IRIX 6.5
11457 when compiling Bison 1.875's `bitset bset = obstack_alloc
11458 (bobstack, bytes);'. Problem reported by Nelson H. F. Beebe.
11459
11460 * src/scan-skel.l (QPUTS): Omit redundant `;' from macro definition.
11461 ([^@\n]): Renamed from [^@\n]+ so that the token buffer does not
11462 grow to a huge size with typical invocation.
11463
11464 * lib/hash.c (_Bool, bool, false, true, __bool_true_false_are_defined):
11465 Use the pattern recommended by Autoconf 2.57, except also protect
11466 against double-definition.
11467 * src/system.h: Likewise.
11468 Portability issues reported by Nelson H. F. Beebe.
11469
11470 * data/glr.c (yybool): Renamed from bool, to avoid collisions in C.
11471 All uses changed. Provide a definition in both C and C++.
11472 (yytrue, yyfalse): Define even if defined (__cplusplus).
11473
11474 * lib/bitset_stats.c (bitset_stats_list): Remove unused var.
11475 Reported by Nelson H. F. Beebe.
11476
11477 * src/scan-skel.l ("@oline@"): Output lineno+1, not lineno.
11478
11479 2003-01-02 Paul Eggert <eggert@twinsun.com>
11480
11481 * data/yacc.c (yyerrlab1): Append `;' after attribute, to
11482 pacify the buggy "smart preprocessor" in MacOS 10.2.3.
11483 Bug reported by Nelson H. F. Beebe.
11484
11485 2003-01-01 Paul Eggert <eggert@twinsun.com>
11486
11487 * Version 1.875.
11488
11489 2002-12-30 Paul Eggert <eggert@twinsun.com>
11490
11491 * src/scan-gram.l (<INITIAL,SC_AFTER_IDENTIFIER,SC_PRE_CODE>","):
11492 Moved here from...
11493 (<INITIAL>","): Here. This causes stray "," to be treated
11494 more uniformly.
11495
11496 * src/scan-gram.l (<SC_BRACED_CODE>"}"): Output ";" before the
11497 last brace in braced code when not in Yacc mode, for compatibility
11498 with Bison 1.35. This resurrects the 2001-12-15 patch to
11499 src/reader.c.
11500
11501 * src/reader.h (YYDECL): Use YYSTYPE, not its deprecated alias
11502 yystype. This follows up the 2002-12-24 YYSTYPE bug fix.
11503
11504 2002-12-28 Paul Eggert <eggert@twinsun.com>
11505
11506 * src/symtab.c (symbol_make_alias): Set type of SYMVAL to be
11507 that of SYM's type. This fixes Debian bug 168069, reported by
11508 Thomas Olsson.
11509
11510 2002-12-28 Paul Eggert <eggert@twinsun.com>
11511
11512 Version 1.75f.
11513
11514 Switch back to the Yacc style of conflict reports, undoing some
11515 of the 2002-07-30 change.
11516 * doc/bison.texinfo (Understanding): Use Yacc style for
11517 conflict reports. Also, use new way of locating rules.
11518 * src/conflicts.c (conflict_report):
11519 Renamed from conflict_report_yacc, removing the old
11520 'conflict_report'. Translate the entire conflict report at once,
11521 so that we don't assume that "," has the same interpretation in
11522 all languages.
11523 (conflicts_output): Use Yacc-style conflict report for each state,
11524 instead of our more-complicated style.
11525 (conflicts_print): Use Yacc-style conflict report, except print
11526 the input file name when not emulating Yacc.
11527 * tests/conflicts.at (Unresolved SR Conflicts, Defaulted
11528 Conflicted Reduction, %expect not enough, %expect too much,
11529 %expect with reduce conflicts): Switch to Yacc-style conflict reports.
11530 * tests/existing.at (GNU Cim Grammar): Likewise.
11531 * tests/glr-regr1.at (Badly Collapsed GLR States): Likewise.
11532
11533 * src/complain.c (warn_at, warn, complain_at, complain, fatal_at,
11534 fatal): Don't invoke fflush; it's not needed and it might even be
11535 harmful for stdout, as stdout might not be open.
11536 * src/reduce.c (reduce_print): Likewise.
11537
11538 2002-12-27 Paul Eggert <eggert@twinsun.com>
11539
11540 Fix a bug where error locations were not being recorded correctly.
11541 This problem was originally reported by Paul Hilfinger in
11542 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00086.html>.
11543
11544 * data/yacc.c (yyparse): New local var yylerrsp, to record the
11545 top of the location stack's error locations.
11546 (yyerrlab): Set it. When discarding a token, push its location
11547 onto yylerrsp so that we don't lose track of the error's end.
11548 (yyerrlab1): Now is only the target of YYERROR, so that we can
11549 properly record the location of the action that failed. For GCC
11550 2.93 and later, insert an __attribute__ ((__unused__)) to avoid
11551 GCC warning about yyerrlab1 being unused if YYERROR is unused.
11552 (yyerrlab2): New label, which yyerrlab now falls through to.
11553 Compute the error's location by applying YYLLOC_DEFAULT to
11554 the locations of all the symbols that went into the error.
11555 * doc/bison.texinfo (Location Default Action): Mention that
11556 YYLLOC_DEFAULT is also invoked for syntax errors.
11557 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
11558 Error locations include the locations of all the tokens that were
11559 discarded, not just the last token.
11560
11561 2002-12-26 Paul Eggert <eggert@twinsun.com>
11562
11563 * src/files.c: Include quote.h.
11564 (compute_output_file_names): Warn if we detect conflicting
11565 outputs to the same file. This should catch the misunderstanding
11566 exemplified by Debian Bug 165349, reported by Bruce Stephens..
11567
11568 * src/conflicts.c (conflicts_print): If the user specifies
11569 "%expect N", report an error if there are any reduce/reduce
11570 conflicts. This is what the manual says should happen.
11571 This fixes Debian bug 130890, reported by Anthony DeRobertis.
11572 * tests/conflicts.at (%expect with reduce conflicts): New test.
11573
11574 Don't use m4_include on relative file names, as it doesn't work as
11575 desired if there happens to be a file with that name under ".".
11576
11577 * m4sugar/version.m4: Remove; it was included but it wasn't used.
11578 * data/Makefile.am (dist_m4sugar_DATA): Remove m4sugar/version.m4.
11579 * data/m4sugar/m4sugar.m4: Don't include m4sugar/version.m4.
11580 * data/glr.c, data/lalr1.cc, data/yacc.c: Don't include c.m4.
11581 * src/output.c (output_skeleton): Use full path names when
11582 specifying a file to include; don't rely on include path, as
11583 it's unreliable when the working file contains a file with
11584 that name.
11585
11586 2002-12-25 Paul Eggert <eggert@twinsun.com>
11587
11588 Remove obsolete references to bison.simple and bison.hairy.
11589 Problem mentioned by Aubin Mahe in
11590 <http://lists.gnu.org/archive/html/help-bison/2002-12/msg00010.html>.
11591 * data/glr.c: Comment fix.
11592 * doc/bison.1: Remove references. Also, mention "yacc".
11593
11594 * src/getargs.c (getargs) [MSDOS]: Don't assume optarg != NULL
11595 with -g option.
11596
11597 * src/parse-gram.y (declaration): Use enum "report_states" rather
11598 than its numeric value 1.
11599
11600 * src/scan-skel.l ("@output ".*\n): Close any old yyout before
11601 opening a new one. This fixes Debian bug 165349, reported by
11602 Bruce Stephens.
11603
11604 2002-12-24 Paul Eggert <eggert@twinsun.com>
11605
11606 Version 1.75e.
11607
11608 * Makefile.maint (cvs-update): Don't assume that the shell
11609 supports $(...), as Solaris sh doesn't.
11610
11611 * src/parse-gram.y (lloc_default): Remove test for empty
11612 nonterminals at the end, since it didn't change the result.
11613
11614 2002-12-24 Paul Eggert <eggert@twinsun.com>
11615
11616 If the user does not define YYSTYPE as a macro, Bison now declares it
11617 using typedef instead of defining it as a macro. POSIX requires this.
11618 For consistency, YYLTYPE is also declared instead of defined.
11619
11620 %union directives can now have a tag before the `{', e.g., the
11621 directive `%union foo {...}' now generates the C code
11622 `typedef union foo { ... } YYSTYPE;'; this is for Yacc compatibility.
11623 The default union tag is `YYSTYPE', for compatibility with Solaris 9
11624 Yacc. For consistency, YYLTYPE's struct tag is now `YYLTYPE'
11625 instead of `yyltype'.
11626
11627 `yystype' and `yyltype' are now obsolescent macros instead of being
11628 typedefs or tags; they are no longer documented and will be
11629 withdrawn in a future release.
11630
11631 * data/glr.c (b4_location_type): Remove.
11632 (YYSTYPE): Renamed from yystype.
11633 (YYSTYPE_IS_DECLARED): New macro, used to prevent double-typedef.
11634 (struct YYLTYPE): Renamed from struct yyltype.
11635 (YYLTYPE): Renamed from yyltype.
11636 (yyltype, yystype): New (and obsolescent) macros,
11637 for backward compatibility.
11638 * data/yacc.c: Likewise.
11639
11640 * data/yacc.c (YYSTYPE): Declare as union YYSTYPE if the user
11641 does not specify a union tag. This is for compatibility with
11642 Solaris 9 yacc.
11643
11644 * src/parse-gram.y (add_param): 2nd arg is now char * not char
11645 const *, since it is now modified by stripping surrounding { }.
11646 (current_braced_code): Remove.
11647 (PERCENT_DESTRUCTOR, PERCENT_PRINTER, PERCENT_UNION,
11648 PERCENT_LEX_PARAM, PERCENT_PARSE_PARAM): Change names to include
11649 trailing " {...}". Now of type <chars>.
11650 (grammar_declaration): Adjust to bundled tokens.
11651 (code_content): Remove; stripping is now done by add_param.
11652 (print_token_value): Print contents of bundled tokens.
11653 (token_name): New function.
11654
11655 * src/reader.h (braced_code, current_braced_code): Remove.
11656 (token_name): New decl.
11657
11658 * src/scan-gram.l (handle_dollar, handle_at): Now takes int
11659 token_type, not braced_code code_kind. All uses changed.
11660 (SC_PRE_CODE): New state, for scanning after a keyword that
11661 has (or usually has) an immediately-following braced code.
11662 (token_type): New local var, to keep track of which token type
11663 to return when scanning braced code.
11664 (<INITIAL>"%destructor", <INITIAL>"%lex-param",
11665 <INITIAL>"%parse-param", <INITIAL>"%printer",
11666 <INITIAL>"%union"): Set token type and BEGIN SC_PRE_CODE
11667 instead of returning a token type immediately.
11668 (<INITIAL>"{"): Set token type.
11669 (<SC_BRACED_CODE>"}"): Use it.
11670 (handle_action_dollar, handle_action_at): Now returns bool
11671 indicating success. Fail if ! current_rule; this prevents a core dump.
11672 (handle_symbol_code_dollar, handle_symbol_code_at):
11673 Remove; merge body into caller.
11674 (handle_dollar, handle_at): Complain in invalid contexts.
11675
11676 * NEWS, doc/bison.texinfo: Document the above.
11677 * NEWS: Fix years and program names in copyright notice.
11678
11679 2002-12-17 Paul Eggert <eggert@twinsun.com>
11680
11681 * NEWS, doc/bison.texinfo (Parser Function, Pure Calling, Error
11682 Reporting, Table of Symbols): Omit mentions of %lex-param and
11683 %parse-param from the documentation for now.
11684
11685 2002-12-15 Paul Eggert <eggert@twinsun.com>
11686
11687 Undo most of the 2002-11-12 yychar -> yytoken patch, as it broke
11688 GCC 3.2.1 (which depends on yychar == YYEMPTY when there is no
11689 lookahead symbol, and which sets yychar in parser actions) and it
11690 disagreed with the Bison documentation. Bug
11691 reported by Andrew Walrond.
11692
11693 * data/yacc.c (YYTRANSLATE): Don't check for negative argument,
11694 as the caller now does that.
11695 (yyclearin, YYBACKUP, yyparse): Use yychar, not yytoken.
11696 (YYEMPTY): Parenthesize right hand side, since others use it.
11697 (yyparse): Don't assume that our generated code is the only code
11698 that sets yychar.
11699
11700 2002-12-13 Paul Eggert <eggert@twinsun.com>
11701
11702 Version 1.75d.
11703
11704 POSIX requires a "yacc" command.
11705 * src/Makefile.am (bin_SCRIPTS): New macro, for yacc.
11706 (MOSTLYCLEANFILES): Add yacc.
11707 (yacc): New rule.
11708 * doc/bison.texinfo (Invocation, Bison Options): Mention yacc
11709 as an alias for bison y.
11710
11711 * po/LINGUAS: Add da.
11712
11713 * src/getargs.c (__GNU_LIBRARY__) [lint]: Define to work around
11714 problem with latest <getopt.h>.
11715 (HACK_FOR___GNU_LIBRARY___PROTOTYPE): New macro.
11716
11717 * doc/fdl.texi: Upgrade to 1.2.
11718 * lib/alloca.c, lib/error.c, lib/getopt.c, lib/getopt.h
11719 lib/getopt1.c, lib/gettext.h, lib/memrchr.c, lib/obstack.c,
11720 lib/obstack.h, lib/strnlen.c, lib/unlocked-io.h: Sync with
11721 gnulib.
11722 * config/install-sh: Sync with autotools.
11723
11724 Fix a bad interaction with flex 2.5.23 reported by Bruce Lilly in
11725 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00114.html>.
11726 * data/yacc.c (YYLTYPE, struct yyltype): Do not define unless
11727 locations are requested.
11728 (union yyalloc): Do not depend on YYLTYPE_IS_TRIVIAL unless
11729 locations are requested.
11730
11731 2002-12-12 Paul Eggert <eggert@twinsun.com>
11732
11733 Remove unportable casts and storage allocation tricks.
11734 While we're at it, remove almost all casts, since they
11735 usually aren't needed and are a sign of trouble.
11736
11737 * configure.ac (AC_CHECK_TYPES): Check for uintptr_t.
11738
11739 * src/derives.c (derives_compute): Do not subtract NTOKENS from
11740 the pointer DSET returned by malloc; this isn't portable.
11741 Instead, always use DSET[i - NTOKENS] rather than DSET[i].
11742 Similarly for DERIVES.
11743 * src/lalr.c (set_goto_map): Likewise, for GOTO_MAP and TEMP_MAP.
11744 * src/nullable.c (nullable_compute): Likewise, for RSETS and NULLABLE.
11745 * src/reduce.c (reduce_grammar_tables): Likewise, for nontermmap
11746
11747 * src/derives.c (derives_compute): Do not bother invoking
11748 int_of_rule_number, since rule numbers are integers.
11749
11750 * src/files.c (concat2, tr, compute_base_name): Use xmalloc (N)
11751 rather than XMALLOC (char, N).
11752
11753 * src/files.c (filename_split): Rewrite to avoid cast.
11754
11755 * src/gram.h (symbol_number_as_item_number,
11756 item_number_as_symbol_number, rule_number_as_item_number,
11757 item_number_as_rule_number):
11758 Now inline functions rather than macros, to avoid casts.
11759 * src/state.h (state_number_as_int): Likewise.
11760 * src/tables.c (state_number_to_vector_number,
11761 symbol_number_to_vector_number): Likewise.
11762
11763 * src/gram.h (int_of_rule_number): Remove; no longer used.
11764
11765 * src/lalr.c (add_lookback_edge): Use malloc rather than calloc,
11766 since the resulting storage is always stored into.
11767
11768 * src/main.c (alloca) [C_ALLOCA]: Add decl here, the only place
11769 where it's needed.
11770
11771 * src/muscle_tab.c (muscle_m4_output):
11772 Now inline. Return bool, not int.
11773 * src/state.c (state_compare): Likewise.
11774 * src/symtab.c (symbol_check_defined,
11775 symbol_check_alias_consistency, symbol_pack, symbol_translation,
11776 hash_compare_symbol, hash_symbol):
11777 Likewise.
11778 * src/uniqstr.c (uniqstr_print): Likewise.
11779 * src/muscle_tab.c (muscle_m4_output_processor):
11780 New function, to avoid casts.
11781 * src/state.c (state_comparator, stage_hasher): Likewise.
11782 * src/symtab.c (symbol_check_defined_processor,
11783 symbol_check_alias_consistency_processor, symbol_pack_processor,
11784 symbol_translation_processor, hash_symbol_comparator,
11785 hash_symbol_hasher): Likewise.
11786 * src/uniqstr.c (uniqstr_print_processor): Likewise.
11787 * src/muscle_tab.c (muscles_m4_output):
11788 Use new functions instead of casting old functions unportably.
11789 * src/state.c (state_hash_new): Likewise.
11790 * src/symtab.c (symbols_new, symbols_do, symbols_check_defined,
11791 symbols_token_translations_init):
11792 Likewise.
11793 * src/uniqstr.c (uniqstrs_new, hash_initialize, uniqstrs_do): Likewise.
11794
11795 * src/output.c (GENERATE_MUSCLE_INSERT_TABLE): Use long local
11796 var instead of casting to long, to avoid casts.
11797 (prepare_states): Use MALLOC rather than alloca, so that we don't
11798 have to worry about alloca.
11799 * src/state.c (state_hash_lookup): Likewise.
11800
11801 * src/scan-gram.l (<SC_ESCAPED_CHARACTER>"'"): Use unsigned char
11802 local var instead of casting to unsigned char, to avoid casts.
11803
11804 * src/state.c (TRANSITIONS_ALLOC, ERRS_ALLOC, REDUCTIONS_ALLOC,
11805 STATE_ALLOC): Remove.
11806 (transitions_new, errs_new, reductions_new, state_new): Use malloc
11807 rather than calloc, and use offsetof to avoid allocating slightly
11808 too much storage.
11809 (state_new): Initialize all members.
11810
11811 * src/state.c (state_hash): Use unsigned accumulator, not signed.
11812
11813 * src/symtab.c (symbol_free): Remove; unused.
11814 (symbol_get): Remove cast in lhs of assignment.
11815 (symbols_do): Now static. Accept generic arguments, not
11816 hashing-related ones.
11817
11818 * src/symtab.h: (NUMBER_UNDEFINED): Remove unnecessary cast.
11819 (symbol_processor): Remove.
11820 (symbols_do): Remove decl; now static.
11821
11822 * src/system.h (alloca): Remove; decl no longer needed.
11823 (<stddef.h>): Include, for offsetof.
11824 (<inttypes.>, <stdint.h>): Include if available.
11825 (uintptr_t): New type, if system lacks it.
11826 (CALLOC, MALLOC, REALLOC): New macros.
11827 All uses of XCALLOC, XMALLOC, and XREALLOC changed to use these
11828 new macros.
11829
11830 * src/tables.c (table_size): Now int, to pacify GCC.
11831 (table_grow, table_ninf_remap): Use signed table size.
11832 (save_row): Don't bother initializing locals when not needed.
11833 (default_goto, goto_actions, pack_vector): Remove unnecessary casts.
11834 * src/uniqstr.c (hash_compare_uniqstr): Likewise.
11835
11836 * src/vcg.h: Correct misspellings.
11837
11838 * src/vcg_defaults.h (G_CMAX): Now INT_MAX.
11839
11840
11841 * src/getargs.c (getargs): Don't assume EOF == -1.
11842
11843 2002-12-09 Paul Eggert <eggert@twinsun.com>
11844
11845 Change identifier spellings to avoid collisions with names
11846 that are reserved by POSIX.
11847
11848 Don't use names ending in _t, since POSIX reserves them.
11849 For consistency, remove _e and _s endings -- they're weren't
11850 needed to remove ambiguity. All uses changed.
11851 * src/uniqstr.h (uniqstr): Renamed from uniqstr_t, which in
11852 turn was just renamed from struniq_t.
11853 * src/uniqstr.c (uniqstr_processor): Renamed from struniq_processor,
11854 which in turn was just renamed from struniq_processor_t.
11855 (hash_compare_uniqstr): Renamed from hash_compare_struniq, which
11856 in turn was renamed from hash_compare_struniq_t.
11857 * src/LR0.c (struct state_list): Renamed from struct state_list_s.
11858 (state_list): Renamed from state_list_t.
11859 * src/assoc.h (assoc): Renamed from assoc_t.
11860 * src/conflicts.c (enum conflict_resolution): Renamed from
11861 enum conflict_resolution_e.
11862 * src/derives.c (struct rule_list): Renamed from struct rule_list_s.
11863 (rule_list): Renamed from rule_list_t.
11864 * src/getargs.h (enum trace): Renamed from enum trace_e.
11865 (enum report): Renamed from enum report_e.
11866 * src/gram.h (item_number): Renamed from item_number_t.
11867 (rule_number): Renamed from rule_number_t.
11868 (struct rule_s): Remove the "rule_s" part; not used.
11869 (rule): Renamed from rule_t.
11870 (rule_filter): Renamed from rule_filter_t.
11871 * src/lalr.c (struct goto_list): Renamed from struct goto_list_s.
11872 (goto_list): Renamed from goto_list_t.
11873 * src/lalr.h (goto_number): Renamed from goto_number_t.
11874 * src/location.h (location): Renamed from location_t.
11875 * src/muscle_tab.c (muscle_entry): Renamed from muscle_entry_t,
11876 and moved here from:
11877 * src/muscle_tab.h (muscle_entry_t): here.
11878 * src/nullable.c (struct rule_list): Renamed from struct rule_list_s.
11879 (rule_list): Renamed from rule_list_t.
11880 * src/print_graph.c (static_graph): Renamed from graph.
11881 * src/reader.h (braced_code): Renamed from braced_code_t.
11882 Remove brace_code_e tag.
11883 * src/relation.h (relation_node): Renamed from relation_node_t.
11884 (relation_nodes): Renamed from relation_nodes_t.
11885 (relation): Renamed from relation_t.
11886 * src/state.h (state_number): Renamed from state_number_t.
11887 (struct state): Renamed from struct state_s.
11888 (state): Renamed from state_t.
11889 (transitions): Renamed from transitions_t. Unused (and
11890 misspelled) transtion_s tag removed.
11891 (errs): Renamed from errs_t. Unused errs_s tag removed.
11892 (reductions): Renamed from reductions_t. Unused tag
11893 reductions_s removed.
11894 * src/symlist.h (symbol_list): Renamed from symbol_list_t.
11895 (struct symbol_list): Renamed from struct symbol_list_s.
11896 * src/symtab.h (symbol_number): Renamed from symbol_number_t.
11897 (struct symbol): Renamed from struct symbol_s.
11898 (symbol): Renamed from symbol_t.
11899 * src/tables.c (vector_number): Renamed from vector_number_t.
11900 (action_number): Renamed from action_t.
11901 * src/tables.h (base_number): Renamed from base_t.
11902 * src/vcg.h (enum color): Renamed from enum color_e.
11903 (enum textmode): Renamed from enum textmode_e.
11904 (enum shape): Renamed from enum shape_e.
11905 (struct colorentry): Renamed from struct colorentry_s.
11906 (struct classname): Renamed from struct classname_s.
11907 (struct infoname): Renamed from struct infoname_s.
11908 (enum layoutalgorithm): Renamed from enum layoutalgorithm_e.
11909 (enum decision): Renamed from enum decision_e.
11910 (enum orientation): Renamed from enum orientation_e.
11911 (enum alignment): Renamed from enum alignment_e.
11912 (enum arrow_mode): Renamed from enum arrow_mode_e.
11913 (enum crossing_type): Renamed from enum crossing_type_e.
11914 (enum view): Renamed from enum view_e.
11915 (struct node): Renamed from struct node_s.
11916 (node): Renamed from node_t.
11917 (enum linestyle): Renamed from enum linestyle_e.
11918 (enum arrowstyle): Renamed from enum arrowstyle_e.
11919 (struct edge): Renamed from struct edge.
11920 (edge): Renamed from edge_t.
11921 (struct graph): Renamed from struct graph_s.
11922 (graph): Renamed from graph_t.
11923 * tests/calc.at (_AT_DATA_CALC_Y, Simple LALR Calculator):
11924 Rename value_t -> value.
11925 * tests/input.at (Torturing the Scanner): Rename value_t -> value,
11926 value_t_as_yystype -> value_as_yystype.
11927
11928 Don't include <errno.h> in the mainstream code, since it
11929 reserves E[A-Z0-9]* and we want to use symbols like 'EQUALS'.
11930 * lib/get-errno.c, lib/get-errno.h: New files.
11931 * lib/Makefile.am (libbison_a_SOURCES): Add get-errno.h,
11932 get-errno.c.
11933 * src/files.c (xfopen, xfclose): Use get_errno instead of errno.
11934 * src/output.c (output_skeleton): Likewise.
11935 * src/scan-gram.l (<INITIAL>{int}): Use set_errno and get_errno
11936 instead of errno.
11937 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>\\x[0-9abcdefABCDEF]+):
11938 Likewise.
11939 (handle_action_dollar, handle_action_at): Likewise.
11940 * src/system.h: Do not include <errno.h>.
11941 (TAB_EXT): Renamed from EXT_TAB.
11942 (OUTPUT_EXT): Renamed from EXT_OUTPUT.
11943
11944 Avoid str[a-z]*, since <string.h> reserves that name space.
11945 Change all instances of "struniq" in names to "uniqstr", and
11946 likewise for "STRUNIQ" and "UNIQSTR".
11947 * src/uniqstr.c: Renamed from src/struniq.c.
11948 * src/uniqstr.h: Renamed from src/struniq.h.
11949 * src/Makefile.am (bison_SOURCES): Adjust to these renamings.
11950 * src/files.c (strsuffix): Remove; unused.
11951 (concat2): Renamed from stringappend. Now static.
11952 * src/files.h (strsuffix, stringappend): Remove; unused.
11953 * src/parse-gram.y (<chars>): Renamed from <string>.
11954 (<uniqstr>): Renamed from <struniq>.
11955 * src/scan-gram.l (obstack_for_string): Renamed from string_obstack.
11956 * src/vcg.h (struct node_s.expand): Renamed from struct node_s.stretch.
11957 (struct graph_s.expand): Renamed from struct graph_s.stretch.
11958 * src/vcg_defaults.h (G_EXPAND): Renamed from G_STRETCH.
11959 (G_LONG_STRAIGHT_PHASE): Renamed from G_STRAIGHT_PHASE.
11960 (N_EXPAND): Renamed from N_STRETCH.
11961
11962 Avoid *_MAX and *_MIN, since <limits.h> reserves that name space.
11963 * data/yacc.c (YYSTACK_GAP_MAXIMUM): Renamed from YYSTACK_GAP_MAX.
11964 * src/gram.h (ITEM_NUMBER_MAX, ITEM_NUMBER_MIN, RULE_NUMBER_MAX):
11965 Remove; unused.
11966 * src/lalr.h (GOTO_NUMBER_MAXIMUM): Renamed from GOTO_NUMBER_MAX.
11967 * src/state.h (STATE_NUMBER_MAXIMUM): Renamed from STATE_NUMBER_MAX.
11968 * src/symtab.h (SYMBOL_NUMBER_MAXIMUM): Renamed from SYMBOL_NUMBER_MAX.
11969 * src/tables.c (VECTOR_NUMBER_MAX, VECTOR_NUMBER_MIN): Remove; unused.
11970 (BASE_MAXIMUM): Renamed from BASE_MAX.
11971 (BASE_MINIMUM): Renamed from BASE_MIN.
11972 (ACTION_MAX): Remove; unused.
11973 (ACTION_NUMBER_MINIMUM): Renamed from ACTION_MIN.
11974 Unnecessary casts removed from above defines.
11975
11976
11977 Fix misspelling in names.
11978 * src/vcg.h (enum_alignment_e): Renamed from enum_alignement_e.
11979 * src/vcg_defaults.h (G_NODE_ALIGNMENT): Renamed from
11980 G_NODE_ALIGNEMENT.
11981
11982
11983 * lib/timevar.c (timevar_report): Renamed from time_report,
11984 for consistency with other names.
11985 * lib/timevar.h (timevar_report): New decl.
11986 * src/system.h (time_report): Remove; decl is now in lib/timevar.h.
11987
11988
11989 Sort include-file uses.
11990
11991 Reorder all include files under src to be in the order "system.h".
11992 then the ../lib include files in angle brackets (alphabetized),
11993 then the . include files in double-quotes (alphabetized). Fix
11994 dependency breakages encountered in this process, as follows:
11995 * src/closure.h, src/derives.h, src/state.h: Include "gram.h".
11996 * src/complain.c: Don't include stdlib.h, string.h _LIBC stuff.
11997 * src/state.h: Include "symtab.h".
11998
11999 2002-12-08 Paul Eggert <eggert@twinsun.com>
12000
12001 * data/glr.c, data/lalr1.cc, data/yacc.c: Do not use __file__,
12002 since this causes problems when __file__ contains character
12003 sequences like "@" that are treated specially by src/scan-skel.l.
12004 Instead, just use the file's basename. This fixes the bug
12005 reported by Martin Mokrejs in
12006 <http://lists.gnu.org/archive/html/bug-bison/2002-12/msg00007.html>.
12007
12008 2002-12-06 Paul Eggert <eggert@twinsun.com>
12009
12010 Add support for rules that do not have trailing semicolons, as
12011 POSIX requires. Improve the quality of locations in Bison
12012 diagnostics.
12013
12014 * src/location.c: Include <quotearg.h>.
12015 (empty_location): Now const.
12016 (location_print): New function. Follow the recommendation of the
12017 GNU Coding Standards for locations that span file boundaries.
12018 * src/location.h: Do not include <quotearg.h>; no longer needed.
12019 (boundary): New type.
12020 (location_t): Use it. This allows locations to span file boundaries.
12021 All member uses changed: file -> start.file or end.file (as needed),
12022 first_line -> start.line, first_column -> start.column,
12023 last_line -> end.line, last_column -> end.column.
12024 (equal_boundaries): New function.
12025 (LOCATION_RESET, LOCATION_STEP): Remove.
12026 (LOCATION_PRINT): Remove. All callers changed to use location_print.
12027 (empty_location): Now const.
12028 (location_print): New decl.
12029 * src/parse-gram.y (lloc_default): New function, which handles
12030 empty locations more accurately.
12031 (YYLLOC_DEFAULT): Use it.
12032 (%token COLON): Remove.
12033 (%token ID_COLON): New token.
12034 (rules): Use it.
12035 (declarations, rules): Remove trailing semicolon.
12036 (declaration, rules_or_grammar_declaration):
12037 Allow empty (";") declaration.
12038 (symbol_def): Remove empty actions; no longer needed.
12039 (rules_or_grammar_declaration): Remove trailing semicolon.
12040 (semi_colon.opt): Remove.
12041 * src/reader.h: Include location.h.
12042 (scanner_cursor): New decl.
12043 * src/reduce.c (nonterminals_reduce): Use warn_at rather than
12044 rolling our own.
12045 * src/scan-gram.l (YY_USER_INIT): Initialize scanner_cursor instead
12046 of *loc.
12047 (STEP): Remove. No longer needed, now that adjust_location does
12048 the work. All uses removed.
12049 (scanner_cursor): New var.
12050 (adjust_location): Renamed from extend_location. It now sets
12051 *loc and adjusts the scanner cursor. All uses changed.
12052 Don't bother testing for CR.
12053 (handle_syncline): Remove location arg; now updates scanner cursor.
12054 All callers changed.
12055 (unexpected_end_of_file): Now accepts start boundary of token or
12056 comment, not location. All callers changed. Update scanner cursor,
12057 not the location.
12058 (SC_AFTER_IDENTIFIER): New state.
12059 (context_state): Renamed from c_context. All uses changed.
12060 (id_loc, code_start, token_start): New local vars.
12061 (<INITIAL,SC_AFTER_IDENTIFIER>): New initial context. Move all
12062 processing of Yacc white space and equivalents here.
12063 (<INITIAL>{id}): Save id_loc. Begin state SC_AFTER_IDENTIFIER
12064 instead of returning ID immediately, since we need to search for
12065 a subsequent colon.
12066 (<INITIAL>"'", "\""): Save token_start.
12067 (<INITIAL>"%{", "{", "%%"): Save code_start.
12068 (<SC_AFTER_IDENTIFIER>): New state, looking for a colon.
12069 (<SC_YACC_COMMENT>, <SC_COMMENT>, <SC_LINE_COMMENT>):
12070 BEGIN context_state at end, not INITIAL.
12071 (<SC_ESCAPED_STRING>"\"", <SC_ESCAPED_CHARACTER>"'",
12072 <SC_BRACED_CODE>"}", <SC_PROLOGUE>"%}", <SC_EPILOGUE><<EOF>>):
12073 Return correct token start.
12074 (<SC_BRACED_CODE,SC_PROLOGUE,SC_EPILOGUE>): Save start boundary when
12075 the start of a character, string or multiline comment is found.
12076 * tests/conflicts.at (S/R in initial, Defaulted Conflicted
12077 Reduction): Adjust reported locations to match the more-precise
12078 results now expected.
12079 * tests/input.at (Invalid $n, Invalid @n, Type Clashes): Likewise.
12080 * tests/reduce.at (Useless Rules, Reduced Automaton,
12081 Underivable Rules): Likewise.
12082 * tests/regression.at (Invalid inputs): No longer `expecting ";"
12083 or "|"' now that so many other tokens are allowed by the new grammar.
12084
12085 * src/complain.h (current_file): Remove duplicate decl;
12086 current_file is now owned by files.h.
12087 * src/complain.c, src/scan-gram.l: Include files.h.
12088
12089 2002-12-06 Paul Eggert <eggert@twinsun.com>
12090
12091 * data/glr.c (yy_reduce_print): Don't assume that yyrline[yyrule]
12092 promotes to int; it might be unsigned int.
12093 * data/yacc.c (yy_reduce_print): Likewise.
12094
12095 * doc/bison.texinfo (Table of Symbols): YYERROR_VERBOSE should
12096 be #defined in the prologue, not in the Bison declarations.
12097 This fixes Debian Bug 102878, reported by Shaul Karl.
12098
12099 2002-12-02 Paul Eggert <eggert@twinsun.com>
12100
12101 * configure.ac (AC_REPLACE_FUNCS): Add strtoul.
12102 * lib/strtoul.c: New file, from gnulib.
12103 This fixes a porting bug reported by Peter Klein in
12104 <http://lists.gnu.org/archive/html/bug-bison/2002-12/msg00000.html>.
12105
12106 2002-11-30 Paul Eggert <eggert@twinsun.com>
12107
12108 * src/scan-gram.l (no_cr_read, extend_location): Move to epilogue,
12109 and put only a forward declaration in the prologue. This is for
12110 consistency with the other scanner helper functions.
12111
12112 Type clashes now generate warnings, not errors, since it
12113 appears that POSIX may allow some grammars with type clashes.
12114 * src/reader.c (grammar_current_rule_check): Warn about
12115 type clashes instead of complaining.
12116 * tests/input.at (Type Clashes): Expect warnings, not complaints.
12117
12118 Add Yacc library, since POSIX requires it.
12119 * doc/bison.texinfo (Yacc Library): New node. Regenerate top menu.
12120 * lib/Makefile.am (lib_LIBRARIES, liby_a_SOURCES): New macros.
12121 * lib/main.c, lib/yyerror.c: New files.
12122
12123 gram_error can be static; it need not be extern.
12124 * src/reader.h (gram_error): Remove decl.
12125 * src/parse-gram.y (gram_error): Now static. Add static decl.
12126 (print_token_value): Omit parameter names from forward decl,
12127 for consistency.
12128
12129 2002-11-29 Paul Eggert <eggert@twinsun.com>
12130
12131 * doc/bison.texinfo: Emphasize that yylex and yyerror must
12132 be declared before being used. E.g., one should typically
12133 declare them in the prologue. Use GNU coding style in examples.
12134 Put "const" consistently after the type it modifies. Mention
12135 that C99 supports "inline". Mention that yyerror traditionally
12136 returns "int".
12137
12138 %parse-param and %lex-param now take just one argument, the
12139 declaration; the argument name is deduced from the declaration.
12140
12141 * doc/bison.texinfo (Parser Function, Pure Calling, Error
12142 Reporting, Table of Symbols): Document this.
12143 * src/parse-gram.y (add_param): New function.
12144 (COMMA): Remove.
12145 (declaration): Implement new rule for %parse-param and %lex-param.
12146 * src/scan-gram.l: "," now elicits a warning, rather than being
12147 a token; this is more compatible with byacc.
12148 * tests/calc.at (Simple LALR Calculator): Adopt new convention.
12149
12150 2002-11-27 Paul Eggert <eggert@twinsun.com>
12151
12152 Rename identifiers to avoid real and potential collisions.
12153
12154 * data/c.m4 (b4_yysymprint_generate): yyout -> yyoutput,
12155 to avoid collision with lex macro described by Bruce Lilly in
12156 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00114.html>.
12157 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise.
12158 * doc/bison.texinfo (Prologue, Tracing): yyprint -> print_token_value.
12159 * src/parse-gram.y (print_token_value): Renamed from yyprint.
12160 All uses changed.
12161 (YYPARSE_PARAM, YYLEX_PARAM, yycontrol): Remove. All uses changed.
12162 The name "yycontrol" violates the name space rules, and this stuff
12163 wasn't being used anyway.
12164 (input): Remove action; this stuff wasn't being used.
12165 (gram_error): Rename local variable yylloc -> loc.
12166 * src/reader.h (struct gram_control_s, gram_control_t): Remove.
12167 (YY_DECL): Don't use "yy" at start of local variables.
12168 All uses changed, e.g., yylloc -> loc.
12169 * src/scan-gram.l (STEP): Renamed from YY_STEP. All uses changed.
12170 (STRING_GROW): Renamed from YY_OBS_GROW. All uses changed.
12171 (STRING_FINISH): Renamed from YY_OBS_FINISH. All uses changed.
12172 (STRING_FREE): Renamed from YY_OBS_FREE. All uses changed.
12173
12174 * src/parse-gram.y (gram_error): loc is now const *.
12175 * src/reader.h (gram_error): Likewise.
12176
12177 2002-11-24 Paul Eggert <eggert@twinsun.com>
12178
12179 Version 1.75c.
12180
12181 * tests/actions.at (Actions after errors): Use an output format
12182 more similar to that of the Printers and Destructors test.
12183 Test the position of the ';' token too.
12184 (Printers and Destructors): Likewise.
12185 (Printers and Destructors: %glr-parser): Remove for now, to avoid
12186 unnecessarily alarming people when the test fails.
12187
12188 * data/yacc.c (yyerrlab1): Move this label down, so that the
12189 parser does not discard the lookahead token if the user code
12190 invokes YYERROR. This change is required for POSIX conformance.
12191
12192 * lib/error.c: Sync with gnulib.
12193
12194 2002-11-22 Paul Eggert <eggert@twinsun.com>
12195
12196 * lib/quotearg.c, lib/quotearg.h: Sync with gnulib.
12197 * lib/mbswidth.c, lib/mbswidth.h: Likewise.
12198 * lib/xmalloc.c: Likewise.
12199
12200 2002-11-20 Paul Eggert <eggert@twinsun.com>
12201
12202 * lib/argmatch.c, lib/argmatch.h: Sync with gnulib.
12203
12204 2002-11-20 Paul Eggert <eggert@twinsun.com>
12205
12206 Avoid use of <assert.h>, as the GNU Coding Standards hint that one
12207 should use `if (! x) abort ();' rather than `assert (x);', and
12208 anyway it's one less thing to worry about configuring.
12209
12210 * data/glr.c, lib/hash.c, src/system.h: Do not include <assert.h>.
12211 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise,
12212 and replace all instances of assert with abort.
12213 * tests/calc.at (_AT_DATA_CALC_Y): Likewise.
12214 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Likewise.
12215
12216 * data/glr.c (yydoAction, yyglrReduce, yysplitStack, yyresolveStates,
12217 yyresolveAction, yyprocessOneStack): Use abort rather than assert.
12218 * lib/hash.c (hash_lookup, hash_get_first, hash_get_next,
12219 hash_find_entry, hash_rehash, hash_insert): Likewise.
12220 * src/conflicts.c (resolve_sr_conflict): Likewise.
12221 * src/lalr.c (set_goto_map, map_goto): Likewise.
12222 * src/nullable.c (nullable_compute): Likewise.
12223 * src/output.c (prepare_rules, token_definitions_output): Likewise.
12224 * src/reader.c (packgram, reader): Likewise.
12225 * src/state.c (state_new, state_free, state_transitions_set,
12226 state_reduction_find): Likewise.
12227 * src/symtab.c (symbol_user_token_number_set, symbol_make_alias,
12228 symbol_pack): Likewise.
12229 * src/tables.c (conflict_row, pack_vector): Likewise.
12230 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str,
12231 get_layoutalgorithm_str, get_decision_str, get_orientation_str,
12232 get_node_alignement_str, get_arrow_mode_str, get_crossing_type_str,
12233 get_view_str, get_linestyle_str, get_arrowstyle_str): Likewise.
12234
12235 * lib/argmatch.h (ARRAY_CARDINALITY): Do not bother to #undef.
12236 (ARGMATCH_CONSTRAINT): New macro.
12237 (ARGMATCH_ASSERT): Use it.
12238
12239 * src/system.h (verify): New macro.
12240 * src/getargs.c (trace_argmatch, report_argmatch): Use verify
12241 rather than assert.
12242 * src/tables.c (tables_generate): Likewise.
12243
12244 * src/struniq.c (struniq_assert): Now returns void, and aborts
12245 if the assertion is false.
12246 (struniq_assert_p): Remove.
12247 * src/struniq.h: Likewise.
12248
12249 2002-11-18 Paul Eggert <eggert@twinsun.com>
12250
12251 * data/glr.c (yygetLRActions): Replace `yyindex' with
12252 `yytable[yyindex]' to fix typo introduced in my 2002-11-09 patch.
12253 This fixes the regression with Sun ONE Studio 7 cc that I reported in
12254 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00077.html>.
12255
12256 2002-11-18 Akim Demaille <akim@epita.fr>
12257
12258 * doc/bison.texinfo (Tracing): `yyprint' shouldn't prepend a
12259 space.
12260 From Tim Van Holder.
12261
12262 2002-11-17 Paul Eggert <eggert@twinsun.com>
12263
12264 Pacify Sun ONE Studio 7 lint. Also, rename "ParseError"
12265 to "SyntaxError" for consistency with my 2002-11-15 change.
12266
12267 * data/glr.c (YYDPRINTF, YYDSYMPRINT, YYDSYMPRINTF) [!YYDEBUG]: Do
12268 not define to {}, since this breaks the common use of `YYDPRINTF
12269 ((...));' if a single statement is desired (e.g. before `else').
12270 Work around GCC warnings by surrounding corresponding calls with
12271 {} if needed.
12272 (yyhasResolvedValue): Remove unused function.
12273 (yymergeOptionSets, yyresolvStack): Use `continue;' for empty
12274 loop body.
12275 (yyreportSyntaxError): Renamed from yyreportParseError.
12276 (yyrecoverSyntaxError): Renamed from yyrecoverParseError.
12277 All uses changed.
12278 * tests/calc.at (_AT_DATA_CALC_Y): Make vars static instead of
12279 extern when possible. Remove unused initializations.
12280
12281 2002-11-16 Akim Demaille <akim@epita.fr>
12282
12283 Augment the similarity between GLR and LALR traces.
12284
12285 * data/yacc.c (yy_stack_print, YY_STACK_PRINT, yy_reduce_print)
12286 (YY_REDUCE_PRINT): New.
12287 (yyparse): Use them.
12288 * data/glr.c (yy_reduce_print): Use YYFPRINTF, no need for
12289 YYDPRINT here.
12290 (yyglrReduce, yyrecoverParseError, yyparse): Don't report the
12291 state reached after the reduction/recovery, since...
12292 (yyparse, yyprocessOneStack): Report the state we are entering in.
12293
12294 2002-11-16 Akim Demaille <akim@epita.fr>
12295
12296 * src/getargs.h, src/getargs.c (trace_e, trace_args, trace_types):
12297 Add support for --trace=skeleton.
12298 * src/scan-skel.l: %option debug.
12299 Scan strings of non-@ or \n instead of character by character.
12300 (scan_skel): Handle trace_skeleton.
12301 (QPUTS): New.
12302 (@output_parser_name@, @output_header_name@): ``Restore'' their
12303 support (used to be M4 macros).
12304 * data/yacc.c: Quote larger chunks, a la glr.c.
12305 * data/lalr1.cc: Likewise.
12306 The header guards are no longer available, so use some other
12307 string than `YYLSP_NEEDED'.
12308
12309 2002-11-16 Akim Demaille <akim@epita.fr>
12310
12311 Make the ``Printers and Destructors'' test more verbose, taking
12312 `yacc.c''s behavior as (possibly wrong) reference.
12313
12314 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Use printf
12315 instead of fprint on stdout.
12316 Set and report the last_line of the symbols.
12317 Consistently display values and locations.
12318
12319 2002-11-16 Paul Eggert <eggert@twinsun.com>
12320
12321 * data/yacc.c: Avoid over-quoting of __line__ and __file__.
12322
12323 2002-11-15 Paul Eggert <eggert@twinsun.com>
12324
12325 * tests/actions.at (Actions after errors): New test case.
12326
12327 * data/glr.c, data/lalr1.cc, data/yacc.cc, doc/bison.texinfo,
12328 src/conflicts.c, src/parse-gram.y, src/tables.c, src/tables.h,
12329 tests/action.at, tests/calc.at, tests/conflicts.at,
12330 tests/cxx-type.at, tests/regression.at:
12331 "parse error" -> "syntax error" for POSIX compatibility.
12332 "parsing stack overflow..." -> "parser stack overflow" so
12333 that code matches Bison documentation.
12334
12335 2002-11-15 Akim Demaille <akim@epita.fr>
12336
12337 * src/parse-gram.y (declaration): Have %parse-param and %lex-param
12338 take two BRACED_CODE, not two string_content.
12339 Free the scanner's obstack when we are done.
12340 (code_content): New.
12341 * tests/calc.at: Adjust.
12342 * doc/bison.texinfo: Adjust.
12343 Also, make sure to include the `,' for these declarations.
12344
12345 2002-11-15 Tim Van Holder <tim.van.holder@pandora.be>
12346
12347 * m4/prereq.m4: Removed the commented jm_PREREQ_HASH
12348 definition; avoids potential autoreconf problems.
12349
12350 2002-11-15 Akim Demaille <akim@epita.fr>
12351
12352 Always check the value returned by yyparse.
12353
12354 * tests/calc.at (_AT_DATA_CALC_Y): Have `main' exit with the value
12355 returned by yyparse.
12356 (_AT_CHECK_CALC_ERROR): Take the expected exit value as argument.
12357 Adjust calls.
12358 * tests/glr-regr1.at (glr-regr1.y): Have `main' exit with the value
12359 returned by yyparse.
12360
12361 2002-11-14 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
12362
12363 * data/glr.c (yyFail): Always set yyerrflag. Corrects regression
12364 on input.at test.
12365
12366 2002-11-14 Paul Eggert <eggert@twinsun.com>
12367
12368 * src/output.c (output_skeleton): Call xfopen instead of
12369 duplicating xfopen's body.
12370
12371 Fix bugs reported by Nelson H. F. Beebe in
12372 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00078.html>.
12373
12374 * tests/headers.at (AT_TEST_CPP_GUARD_H): Don't assume that
12375 "$CC -E foo.h" is allowed, as this doesn't work with the Portland
12376 Group compiler. Instead, use "$CC -E bar.c". Include the .h
12377 file twice in the grammar, as an extra check.
12378
12379 * tests/input.at (Torturing the Scanner): Surround the
12380 backslash-newline tests with "#if 0", to make it less likely that
12381 we'll run into compiler bugs. Bring back solitary \ inside
12382 comment, but add a closing comment to work around HP C bug. Don't
12383 test backslash-newline in C character constant.
12384
12385 2002-11-14 Akim Demaille <akim@epita.fr>
12386
12387 * tests/synclines.at (AT_SYNCLINES_COMPILE): Ignore the exit
12388 status of the compiler.
12389 Calling `exit 1' is no longer needed.
12390 Reported by Nelson H. F. Beebe.
12391
12392 2002-11-14 Akim Demaille <akim@epita.fr>
12393
12394 * tests/atlocal.in (CPPFLAGS): We have config.h.
12395 * tests/testsuite.at (AT_DATA_GRAMMAR_PROLOGUE, AT_DATA_GRAMMAR):
12396 New.
12397 * tests/actions.at, tests/calc.at, tests/conflicts.at,
12398 * tests/cxx-type.at, tests/glr-regr1.at, tests/headers.at,
12399 * tests/regression.at, tests/torture.at: Use them for all the
12400 grammars that are to be compiled.
12401 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Rename as...
12402 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): this.
12403 * doc/bison.texinfo (GLR Parsers): Document `inline'.
12404
12405 2002-11-14 Akim Demaille <akim@epita.fr>
12406
12407 * doc/bison.texinfo: Various formatting changes (alignments in
12408 samples, additional @group/@end group, GCS in samples.
12409 Use @deffn instead of simple @table to define the directives,
12410 macros, variables etc.
12411
12412 2002-11-13 Paul Eggert <eggert@twinsun.com>
12413
12414 Fix some bugs reported by Albert Chin-A-Young in
12415 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00066.html>.
12416
12417 * tests/input.at (Torturing the Scanner): Don't invoke "cc a.c b.c
12418 -o c"; the HP C compiler chatters during compilation.
12419 Instead, invoke "cc -c a.c -o a.o; cc -c b.c -o b.o; cc a.o b.o -o c".
12420 * tests/headers.at (export YYLTYPE): Likewise.
12421
12422 * tests/input.at (Torturing the Scanner): Remove lines containing
12423 solitary backslashes, as they tickle a bug in the HP C compiler.
12424
12425 * tests/glr-regr1.at (Badly Collapsed GLR States): Avoid //
12426 comments, since they're not portable. Use GNU coding style.
12427
12428 2002-11-13 Akim Demaille <akim@epita.fr>
12429
12430 * data/yacc.c: Leave bigger chunks of quoted text.
12431 (YYDSYMPRINTF): New.
12432 Use it to report symbol activities.
12433 * data/glr.c (YYDSYMPRINTF): New.
12434 Use it.
12435
12436 2002-11-12 Paul Eggert <eggert@twinsun.com>
12437
12438 Version 1.75b.
12439
12440 * data/glr.c (yydoAction): Return YYRESULTTAG, not int.
12441 (yyglrReduce): Return yyok, not 0.
12442 This should avoid the enumerated-type warnings reported
12443 by Nelson H. F. Beebe in
12444 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00057.html>.
12445
12446 * lib/bbitset.h (BITSET_INLINE): Remove.
12447 * lib/bitset.h [! BITSET_INLINE]: Remove.
12448 (bitset_set, bitset_reset, bitset_test): Rename local vars
12449 to avoid shadowing warnings by GCC.
12450
12451 * data/glr.c (inline): Remove #define. It's the user's
12452 responsibility to #define it away, just like 'const'.
12453 This fixes one of the bugs reported by Nelson H. F. Beebe in
12454 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00058.html>.
12455
12456 * Makefile.maint (po-check): Scan .l and .y files instead of the
12457 .c and the .h files that they generate. This fixes the bug
12458 reported by Tim Van Holder in:
12459 <http://lists.gnu.org/archive/html/bison-patches/2002-11/msg00062.html>
12460 Look for N_ as well as for _. Try to avoid matching #define for
12461 N_ and _.
12462 * po/POTFILES.in: Remove src/parse-gram.c, src/scan-gram.c,
12463 src/system.h. Add src/parse-gram.y, src/scan-gram.l.
12464 * src/scan-gram.l: Revamp regular expressions so that " and '
12465 do not confuse xgettext.
12466
12467 * src/struniq.h (struniq_new): Do not declare the return type
12468 to be 'const'; this violates the C standard.
12469 * src/struniq.c (struniq_new): Likewise.
12470
12471 2002-11-12 Albert Chin-A-Young <china@thewrittenword.com>
12472
12473 * src/Makefile.am (LDADD): Link $(LIBINTL) last to avoid the
12474 duplicate definition of optind on Tru64 UNIX 4.0D with the Compaq
12475 linker.
12476
12477 2002-11-12 Akim Demaille <akim@epita.fr>
12478
12479 * Makefile.maint: Sync with Autoconf:
12480 (local_updates): New.
12481
12482 2002-11-12 Akim Demaille <akim@epita.fr>
12483
12484 * po/POTFILES.in (src/lalr.c, src/state.c): Remove
12485
12486 2002-11-12 Akim Demaille <akim@epita.fr>
12487
12488 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Display the
12489 locations.
12490
12491 2002-11-12 Akim Demaille <akim@epita.fr>
12492
12493 * data/c.m4 (b4_yysymprint_generate): Pass *yyvaluep to YYPRINT,
12494 not yyvalue.
12495
12496 2002-11-12 Akim Demaille <akim@epita.fr>
12497
12498 * tests/actions.at (AT_CHECK_PRINTER_AND_DESTRUCTOR): New.
12499 Use it to test the GLR parser.
12500
12501 2002-11-12 Akim Demaille <akim@epita.fr>
12502
12503 * tests/regression.at (input.y): s/YYEOF/MYEOF/, as the skeleton
12504 defines it.
12505 * data/glr.c (yystos): New.
12506 (b4_yysymprint_generate, b4_yydestruct_generate): Invoke.
12507 (YYDSYMPRINT): New.
12508 (yyval): Don't define it, it is handled via M4.
12509 (yyrecoverParseError): Free verbosely the discarded symbols.
12510 * data/yacc.c (yysymprint): Remove, rather...
12511 (b4_yysymprint_generate): invoke.
12512 * data/c.m4 (b4_yysymprint_generate): New.
12513 Accept pointers as arguments, as opposed to the version from
12514 yacc.c.
12515 (b4_yydestruct_generate): Likewise.
12516 * tests/cations.at (Printers and Destructors): Use Bison directives
12517 instead of CPP macros.
12518 Don't rely on internal details.
12519
12520 2002-11-12 Akim Demaille <akim@epita.fr>
12521
12522 * data/c.m4 (b4_yydestruct_generate, b4_symbol_actions): New.
12523 * data/yacc.c: Rename yychar1 as yytoken, as in glr.c.
12524 Don't work on yychar (i.e., do set it to YYEMPTY, don't match
12525 it against YYEMPTY and so forth), work on yytoken (i.e., set
12526 it to YYEMPTY etc.).
12527 (yydestruct): Replace with a b4_yydestruct_generate invocation.
12528 (b4_symbol_actions): Remove.
12529 * data/glr.c (YYTRANSLATE): As for yacc.c, if negative, it stands
12530 for 0, end-of-input.
12531
12532 2002-11-12 Akim Demaille <akim@epita.fr>
12533
12534 * doc/bison.texinfo (Destructor Decl): New.
12535
12536 2002-11-12 Akim Demaille <akim@epita.fr>
12537
12538 * src/tables.c (tables_generate): Use free for pointers that
12539 cannot be NULL, not XFREE.
12540 (pack_vector): Use assert, not fatal, for bound violations.
12541 * src/state.c (state_new): Likewise.
12542 * src/reader.c (reader): Likewise.
12543 * src/lalr.c (set_goto_map): Likewise.
12544 * src/location.h (LOCATION_PRINT): If first_line is 0, just issue
12545 the file name.
12546
12547 2002-11-12 Akim Demaille <akim@epita.fr>
12548
12549 * src/scan-gram.l, src/reader.h (scanner_last_string_free):
12550 Restore.
12551 * src/scan-gram.l (last_string): Is global to the file, not to
12552 yylex.
12553 * src/parse-gram.y (input): Don't append the epilogue here,
12554 (epilogue.opt): do it here, and free the scanner's obstack.
12555 * src/reader.c (epilogue_set): Rename as...
12556 (epilogue_augment): this.
12557 * data/c.m4 (b4_epilogue): Defaults to empty.
12558
12559 2002-11-12 Akim Demaille <akim@epita.fr>
12560
12561 * src/getargs.c (long_options): Remove duplicates.
12562 * src/vmsgetargs.c, src/build.com, src/bison.cld, src/vmshlp.mar:
12563 Remove.
12564 * doc/bison.rnh: Remove.
12565 * doc/bison.texinfo (VMS Invocation): Remove.
12566
12567 2002-11-12 Akim Demaille <akim@epita.fr>
12568
12569 * src/struniq.h, src/struniq.c (struniq_t): Is const.
12570 (STRUNIQ_EQ, struniq_assert, struniq_assert_p): New.
12571
12572 Use struniq for symbols.
12573
12574 * src/symtab.h (symbol_t): The tag member is a struniq.
12575 (symbol_type_set): Adjust.
12576 * src/symtab.c (symbol_new): Takes a struniq.
12577 (symbol_free): Don't free the tag member.
12578 (hash_compare_symbol_t, hash_symbol_t): Rename as...
12579 (hash_compare_symbol, hash_symbol): these.
12580 Use the fact that tags as struniqs.
12581 (symbol_get): Use struniq_new.
12582 * src/symlist.h, src/symlist.c (symbol_list_n_type_name_get):
12583 Returns a strniq.
12584 * src/reader.h (merger_list, grammar_currentmerge_set): The name
12585 and type members are struniqs.
12586 * src/reader.c (get_merge_function)
12587 (grammar_current_rule_merge_set): Adjust.
12588 (TYPE, current_type): Are struniq.
12589
12590 Use struniq for file names.
12591
12592 * src/files.h, src/files.c (infile): Split into...
12593 (grammar_file, current_file): these.
12594 * src/scan-gram.c (YY_USER_INIT, handle_syncline): Adjust.
12595 * src/reduce.c (reduce_print): Likewise.
12596 * src/getargs.c (getargs): Likewise.
12597 * src/complain.h, src/complain.c: Likewise.
12598 * src/main.c (main): Call struniqs_new early enough to use it for
12599 file names.
12600 Don't free the input file name.
12601
12602 2002-11-12 Akim Demaille <akim@epita.fr>
12603
12604 * src/symtab.c (symbol_free): Remove dead deactivated code:
12605 type_name are properly removed.
12606 Don't use XFREE to free items that cannot be NULL.
12607 * src/struniq.h, src/struniq.c: New.
12608 * src/main.c (main): Initialize/free struniqs.
12609 * src/parse-gram.y (%union): Add astruniq member.
12610 (yyprint): Adjust.
12611 * src/scan-gram.l (<{tag}>): Return a struniq.
12612 Free the obstack bit that used to store it.
12613 * src/symtab.h (symbol_t): The 'type_name' member is a struniq.
12614
12615 2002-11-11 Paul Eggert <eggert@twinsun.com>
12616
12617 Revamp to fix many (but not all) of the C- and M4-related quoting
12618 problems. Among other things, this fixes the Bison bug reported
12619 by Jan Hubicka when processing the Bash grammar; see:
12620 <http://lists.gnu.org/archive/html/bison-patches/2002-11/msg00039.html>
12621
12622 Use new @ escapes consistently. Represent brackets with @{ and @}
12623 rather than @<:@ and @:>@, since this works a bit better with dumb
12624 editors like vi. Represent @ with @@, since @ is now consistently
12625 an escape. Use @oline@ and @ofile@ rather than __oline__ and
12626 __ofile__, to avoid unexpected expansions. Similarly, use @output
12627 rather than #output.
12628
12629 * data/c.m4 (b4_copyright): Omit file name from comment, since
12630 the file name could contain "*/".
12631 (b4_synclines_flag): Don't quote the 2nd argument; it should already
12632 be quoted. All uses changed.
12633
12634 * data/glr.c: Use new @ escapes consistently.
12635 (b4_input_suffix, b4_output_parser_suffix, b4_output_parser_name,
12636 b4_output_header_suffix, b4_output_header_name, b4_header_guard):
12637 Remove, since they couldn't handle arbitrary characters in file
12638 names.
12639 * data/lalr1.cc: Likewise.
12640 * data/yacc.c: Likewise.
12641
12642 * src/files.c (output_infix): Remove; all uses removed.
12643 * src/files.h: Likewise.
12644
12645 * data/glr.c: Remove use of "#ifdef b4_header_guard", since it
12646 mishandled funny characters in file names, and anyway it isn't
12647 needed any more.
12648 * data/yacc.c: Likewise.
12649 * data/lalr1.cc: Use YYSLP_NEEDED instead of b4_header_guard.
12650
12651 * data/glr.c (YYSTYPE_IS_TRIVIAL): Define when the .h file would.
12652 * data/yacc.c: Likewise.
12653
12654 * src/muscle_tab.c: Include quotearg.h, since we need to quote C
12655 strings now.
12656 (muscle_init): Quote filename as a C string.
12657 * src/muscle_tab.h (MUSCLE_GROW_STRING_PAIR): Remove; unused.
12658 (MUSCLE_OBSTACK_SGROW, MUSCLE_INSERT_C_STRING): New macros.
12659 * src/output.c (escaped_file_name_output): New function.
12660 (prepare_symbols): Quote tokens for M4.
12661 (prepare): Don't insert output_infix, output_prefix,
12662 output_parser_name, output_header_name; this is now down by scan-skel.
12663 Insert skeleton as a C string.
12664
12665 * src/output.c (user_actions_output, symbol_destructors_output,
12666 symbol_printers_output): Quote filenames for C and M4.
12667 * src/reader.c (prologue_augment, epilogue_set): Likewise.
12668
12669 * src/scan-gram.l (<SC_CHARACTER>): Don't worry about any backslash
12670 escapes other than \\ and \'; this simplifies the code.
12671 (<SC_STRING>): Likewise, for \\ and \".
12672 (<SC_COMMENT,SC_LINE_COMMENT,SC_STRING,SC_CHARACTER,SC_BRACED_CODE,
12673 SC_PROLOGUE,SC_EPILOGUE>): Escape $ and @, too.
12674 Use new escapes @{ and @} for [ and ].
12675
12676 * src/scan-skel.l (yylineno, yyoutname): Remove static vars, replacing
12677 them with auto vars.
12678 Switch to new escape scheme, where @ is the escape character uniformly.
12679 Abort if a stray escape character is found. Avoid unbounded input
12680 buffer when parsing non-escaped text.
12681
12682 * tests/input.at (Torturing the Scanner): Add tests that @oline@,
12683 __oline__, #output, $@, and @{ do not have unintended meanings.
12684
12685 2002-11-09 Paul Eggert <eggert@twinsun.com>
12686
12687 Fix the test failure due to GCC warnings described in
12688 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00000.html>.
12689 * data/glr.c (yyis_pact_ninf, yyis_table_ninf): New macros, which
12690 evaluate to 0 if it's impossible for NINF to be in the respective
12691 table.
12692 (yygetLRActions, yyrecoverParseError): Use them.
12693
12694 * src/scan-gram.l (unexpected_end_of_file): Fix bug: columns were
12695 counted in the token inserted at end of file. Now takes
12696 location_t *, not location_t, so that the location can be
12697 adjusted. All uses changed.
12698
12699 * tests/regression.at (Invalid inputs): Adjust wording in
12700 diagnostic to match the new behavior.
12701
12702 * tests/torture.at (AT_DATA_TRIANGULAR_GRAMMAR,
12703 AT_DATA_HORIZONTAL_GRAMMAR, AT_DATA_LOOKAHEADS_GRAMMAR,
12704 AT_DATA_STACK_TORTURE): Replace `assert (x);' with `if (! (x))
12705 abort ();'. This reduces the runtime of the "Many lookaheads"
12706 test from 27.6 to 2.7 minutes on a 440 MHz Ultrasparc III running
12707 GCC 3.2.
12708
12709 2002-11-07 Paul Eggert <eggert@twinsun.com>
12710
12711 * src/parse-gram.y (CHARACTER): Remove unused token.
12712 All uses removed.
12713
12714 * src/scan-gram.l: Remove stack option. We no longer use the
12715 stack, since the stack was never deeper than 1; instead, use the
12716 new auto var c_context to record the stacked value.
12717
12718 Remove nounput option. At an unexpected end of file, we now unput
12719 the minimal input necessary to end cleanly; this simplifies the
12720 code.
12721
12722 Avoid unbounded token sizes where this is easy.
12723
12724 (unexpected_end_of_file): New function.
12725 Use it to systematize the error message on unexpected EOF.
12726 (last-string): Now auto, not static.
12727 (YY_OBS_FREE): Remove unnecessary do while (0) wrapper.
12728 (scanner_last_string_free): Remove; not used.
12729 (percent_percent_count): Move decl to just before use.
12730 (SC_ESCAPED_CHARACTER): Return ID at unexpected end of file,
12731 not the (never otherwised-used) CHARACTER.
12732
12733 2002-11-07 Akim Demaille <akim@epita.fr>
12734
12735 Let yyerror always receive the msg as last argument, so that
12736 yyerror can be variadic.
12737
12738 * data/yacc.c (b4_yyerror_args): New.
12739 Use it when calling yyerror.
12740 * data/glr.c (b4_yyerror_args, b4_lyyerror_args): New.
12741 Use it when calling yyerror.
12742 * doc/bison.texinfo (Error Reporting): Adjust.
12743 * tests/calc.at (_AT_DATA_CALC_Y): Adjust.
12744 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Adjust.
12745
12746 2002-11-06 Akim Demaille <akim@epita.fr>
12747
12748 #line should have quoted strings.
12749 Ideally, this should be done by m4_quotearg.
12750
12751 * src/scan-skel.l: Include quotearg.h.
12752 Quote __ofile__.
12753 * src/output.c (symbol_printers_output)
12754 (symbol_destructors_output): Quote the file name.
12755
12756 2002-11-06 Akim Demaille <akim@epita.fr>
12757
12758 * tests/regression.at (Invalid inputs): Adjust to the recent
12759 messages.
12760
12761 2002-11-06 Akim Demaille <akim@epita.fr>
12762
12763 Restore --no-lines.
12764 Reported by Jim Kent.
12765
12766 * data/c.m4 (b4_syncline): New.
12767 * data/glr.c, data/yacc.c, data/lalr1.cc: Use it.
12768 * src/reader.c (prologue_augment, epilogue_set): Use b4_syncline.
12769 * src/output.c (user_actions_output): Likewise.
12770 (prepare): Define 'b4_synclines_flag'.
12771 * src/muscle_tab.c (muscle_init): Don't define b4_linef.
12772
12773 2002-11-06 Akim Demaille <akim@epita.fr>
12774
12775 * src/main.c (main): Free `infile'.
12776 * src/scan-gram.l (handle_syncline): New.
12777 Recognize `#line'.
12778 * src/output.c (user_actions_output, symbol_destructors_output)
12779 (symbol_printers_output): Use the location's file name, not
12780 infile.
12781 * src/reader.c (prologue_augment, epilogue_set): Likewise.
12782
12783 2002-11-05 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
12784
12785 * src/tables.c (matching_state): Don't allow states to match if
12786 either has GLR conflict entries.
12787
12788 2002-11-05 Paul Eggert <eggert@twinsun.com>
12789
12790 * src/scan-gram.l: Use more accurate diagnostics, e.g.
12791 "integer out of range" rather than "invalid value".
12792 * tests/input.at (Invalid $n, Invalid @n): Change expected wording
12793 accordingly.
12794
12795 Scan <% and %> digraphs in C code as POSIX 1003.1-2001 requires.
12796 Also, remove one static variable in the scanner.
12797
12798 * src/scan-gram.l (braces_level): Now auto, not static.
12799 Initialize to zero if the compiler is being picky.
12800 (INITIAL): Clear braces_level instead of incrementing it.
12801 (SC_BRACED_CODE): Treat <% and %> as { and } when inside C code,
12802 as POSIX 1003.1-2001 requires.
12803 * src/system.h (IF_LINT): New macro, taken from coreutils.
12804 * configure.ac: Define "lint" if --enable-gcc-warnings.
12805
12806 2002-11-05 Akim Demaille <akim@epita.fr>
12807
12808 * src/scan-gram.l: When it starts with `%', complain about the
12809 whole directive, not just that `invalid character: %'.
12810
12811 2002-11-04 Akim Demaille <akim@epita.fr>
12812
12813 * Makefile.maint: Update from Autoconf.
12814 (update, cvs-update, po-update, do-po-update): New.
12815
12816 2002-11-04 Akim Demaille <akim@epita.fr>
12817
12818 * tests/glr-regr1.at (Badly Collapsed GLR States): Prototype yylex
12819 and yyerror.
12820 Have yyerror `use' its arguments.
12821 * tests/calc.at (AT_CHECK_PUSHDEFS): AT_YYERROR_SEES_LOC_IF
12822 returns true when location & yacc & pure & parse-param.
12823 (_AT_DATA_CALC_Y): Let yyerror ``use'' its arguments.
12824
12825 2002-11-04 Akim Demaille <akim@epita.fr>
12826
12827 * src/location.h (LOCATION_PRINT): Use quotearg slot 3 to avoid
12828 clashes.
12829 * src/scan-gram.l: Use [\'] instead of ['] to pacify
12830 font-lock-mode.
12831 Use complain_at.
12832 Use quote, not quote_n since LOCATION_PRINT no longer uses the
12833 slot 0.
12834
12835 2002-11-03 Paul Eggert <eggert@twinsun.com>
12836
12837 * src/reader.c (get_merge_function, grammar_current_rule_check):
12838 Use consistent diagnostics for reporting type name clashes.
12839 Quote the types with <>, for consistency with Yacc.
12840 * tests/input.at (Type Clashes): Adjust to diagnostic changes.
12841
12842 2002-11-03 Akim Demaille <akim@epita.fr>
12843
12844 * data/c.m4 (b4_identification, b4_user_args, b4_parse_param):
12845 New.
12846 * data/yacc.m4 (b4_pure_args, b4_Pure_args): New.
12847 (b4_parse_param): Remove.
12848 Use b4_identification.
12849 Propagate b4_pure_args where needed to pass them to yyerror.
12850 * data/glr.m4 (b4_parse_param): Remove.
12851 (b4_user_formals, b4_pure_args, b4_pure_formals, b4_lpure_args)
12852 (b4_lpure_formals): New.
12853 Use b4_identification.
12854 (YY_USER_FORMALS, YY_USER_ARGS): Remove, replaced by
12855 b4_user_formals and b4_user_args.
12856 (yyexpandGLRStack, yyFail, yyaddDeferredAction, yyglrShiftDefer)
12857 (yyreportAmbiguity): When using a pure parser, also need
12858 the location, and the parse-params.
12859 Adjust callers.
12860 (yyuserAction, yyglrShift, yyreportParseError, yyrecoverParseError):
12861 When using a pure parser, also need the parse-params.
12862 Adjust callers.
12863 * tests/calc.at: Test pure (%pure-parser) and absolutely pure
12864 (%pure-parser + %parse-param) LALR and GLR parsers.
12865 (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): New, define AT_PARAM_IF,
12866 AT_LOCATION_IF, AT_PURE_IF, AT_GLR_IF, AAT_PURE_AND_LOC_IF,
12867 AT_GLR_OR_PARAM_IF, AT_YYERROR_ARG_LOC_IF, AT_YYERROR_SEES_LOC_IF.
12868 (_AT_DATA_CALC_Y): Equip for purity of yyerror.
12869 (_AT_CHECK_CALC_ERROR): Use AT_YYERROR_SEES_LOC_IF.
12870 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Equip for yyerror purity.
12871 * doc/bison.texinfo: Untabify the whole file.
12872 (Parser Function): Document %parse-param, deprecate YYPARSE_PARAM.
12873 (Pure Calling): Document %lex-param, deprecate YYLEX_PARAM.
12874 (Error Reporting): Adjust to these new directives.
12875 Document %error-verbose, deprecate YYERROR_VERBOSE.
12876
12877 2002-11-03 Akim Demaille <akim@epita.fr>
12878
12879 * tests/calc.at: Change all the AT_CHECK_CALC_LALR and
12880 AT_CHECK_CALC_GLR invocations to use % directives, instead of
12881 command line options.
12882 * tests/cxx-type.at: Formatting changes.
12883
12884 2002-11-03 Paul Eggert <eggert@twinsun.com>
12885
12886 * src/scan-gram.l: Revamp to fix POSIX incompatibilities,
12887 to count columns correctly, and to check for invalid inputs.
12888
12889 Use mbsnwidth to count columns correctly. Account for tabs, too.
12890 Include mbswidth.h.
12891 (YY_USER_ACTION): Invoke extend_location rather than LOCATION_COLUMNS.
12892 (extend_location): New function.
12893 (YY_LINES): Remove.
12894
12895 Handle CRLF in C code rather than in Lex code.
12896 (YY_INPUT): New macro.
12897 (no_cr_read): New function.
12898
12899 Scan UCNs, even though we don't fully handle them yet.
12900 (convert_ucn_to_byte): New function.
12901
12902 Handle backslash-newline correctly in C code.
12903 (SC_LINE_COMMENT, SC_YACC_COMMENT): New states.
12904 (eols, blanks): Remove. YY_USER_ACTION now counts newlines etc.;
12905 all uses changed.
12906 (tag, splice): New EREs. Do not allow NUL or newline in tags.
12907 Use {splice} wherever C allows backslash-newline.
12908 YY_STEP after space, newline, vertical-tab.
12909 ("/*"): BEGIN SC_YACC_COMMENT, not yy_push_state (SC_COMMENT).
12910
12911 (letter, id): Don't assume ASCII; e.g., spell out a-z.
12912
12913 ({int}, handle_action_dollar, handle_action_at): Check for integer
12914 overflow.
12915
12916 (YY_STEP): Omit trailing semicolon, so that it's more like C.
12917
12918 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>): Allow \0 and \00
12919 as well as \000. Check for UCHAR_MAX, not 255.
12920 Allow \x with an arbitrary positive number of digits, as in C.
12921 Check for overflow here.
12922 Allow \? and UCNs, for compatibility with C.
12923
12924 (handle_symbol_code_dollar): Use quote_n slot 1 to avoid collision
12925 with quote slot used by complain_at.
12926
12927 * tests/input.at: Add tests for backslash-newline, m4 quotes
12928 in symbols, long literals, and funny escapes in strings.
12929
12930 * configure.ac (jm_PREREQ_MBSWIDTH): Add.
12931 * lib/Makefile.am (libbison_a_SOURCES): Add mbswidth.h, mbswidth.c.
12932 * lib/mbswidth.h, lib/mbswidth.c: New files, from GNU gettext.
12933 * m4/Makefile.am (EXTRA_DIST): Add mbswidth.m4.
12934 * m4/mbswidth.m4: New file, from GNU coreutils.
12935
12936 * doc/bison.texinfo (Grammar Outline): Document // comments.
12937 (Symbols): Document that trigraphs have no special meaning in Bison,
12938 nor is backslash-newline allowed.
12939 (Actions): Document that trigraphs have no special meaning.
12940
12941 * src/location.h (LOCATION_COLUMNS, LOCATION_LINES): Remove;
12942 no longer used.
12943
12944 2002-11-02 Paul Eggert <eggert@twinsun.com>
12945
12946 * src/reader.c: Don't include quote.h; not needed.
12947 (get_merge_function): Reword warning to be consistent with
12948 type clash diagnostic in grammar_current_rule_check.
12949
12950 * lib/quotearg.c (quotearg_buffer_restyled): Fix off-by-two
12951 bug in trigraph handling.
12952
12953 * src/output.c (prepare_symbols): When printing token names,
12954 escape "[" as "@<:@" and likewise for "]".
12955
12956 * src/system.h (errno): Remove declaration, as we are now
12957 assuming C89 or better, and C89 guarantees errno.
12958
12959 2002-10-30 Paul Eggert <eggert@twinsun.com>
12960
12961 * lib/bitset_stats.c (bitset_stats_read, bitset_stats_write):
12962 Check for close failures.
12963 * src/files.h (xfclose): Return void, not int, since it always
12964 returned zero.
12965 * src/files.c (xfclose): Likewise. Report I/O error if ferror
12966 indicates one.
12967 * src/output.c (output_skeleton): Use xfclose rather than fclose
12968 and ferror. xfclose now checks ferror.
12969
12970 * data/glr.c (YYLEFTMOST_STATE): Remove.
12971 (yyreportTree): Use a stack-based leftmost state. This avoids
12972 our continuing battles with bogus warnings about initializers.
12973
12974 2002-10-30 Akim Demaille <akim@epita.fr>
12975
12976 * src/system.h: Don't use #ifdef/#ifndef on HAVE_ values, only
12977 #if.
12978
12979 2002-10-29 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
12980
12981 * tests/glr-regr1.at: New test for reported regressions.
12982 * tests/testsuite.at: Add glr-regr1.at test.
12983 * tests/Makefile.am: Add glr-regr1.at test.
12984
12985 2002-10-24 Paul Eggert <eggert@twinsun.com>
12986
12987 Version 1.75a.
12988
12989 * tests/calc.at (_AT_DATA_CALC_Y): Remove unused strcat declaration.
12990 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Include stdlib.h, since
12991 we use malloc. Don't assume 'A' through 'Z' are contiguous.
12992 Don't assume strdup exists; POSIX says its an XSI extension.
12993 Check for buffer overflow on input.
12994
12995 2002-10-24 Akim Demaille <akim@epita.fr>
12996
12997 * src/output.c (output_skeleton): Don't disable M4sugar comments
12998 too soon: it results in comments being expanded.
12999 * data/yacc.c, data/glr.c, data/lalr1.cc: Do it right before the
13000 first output.
13001
13002 2002-10-24 Akim Demaille <akim@epita.fr>
13003
13004 * data/yacc.c (m4_int_type): New.
13005 * data/c.m4 (m4_int_type): Don't use yysigned_char, but `signed
13006 char' as only yacc.c wants K&R portability.
13007 * data/glr.c (yysigned_char): Remove.
13008 * data/lalr1.cc: Rename the trailing b4_name as b4_parser_class_name.
13009 Reported by Quoc Peyrot.
13010
13011 2002-10-23 Paul Eggert <eggert@twinsun.com>
13012
13013 * src/main.c (main): With --trace=time, report times even if a
13014 non-fatal error occurs. Formerly, the times were reported in some
13015 such cases but not in others.
13016 * src/reader.c (reader): Just return if a complaint has been issued,
13017 instead of exiting, so that 'main' can report times.
13018
13019 2002-10-22 Akim Demaille <akim@epita.fr>
13020
13021 * src/system.h: Include sys/types.
13022 Reported by Bert Deknuydt.
13023
13024 2002-10-23 Paul Eggert <eggert@twinsun.com>
13025
13026 * configure.ac (AC_PROG_LEX): Use instead of AM_PROG_LEX.
13027 Suggested by Art Haas.
13028
13029 2002-10-22 Paul Eggert <eggert@twinsun.com>
13030
13031 * src/complain.c (exit) [! (STDC_HEADERS || _LIBC)]: Remove exit
13032 decl; not needed any more.
13033 * src/main.c (main): Use return to exit, undoing yesterday's change.
13034 The last OS that we could find where this wouldn't work is
13035 SunOS 3.5, and that's too old to worry about now.
13036
13037 * data/glr.c (struct yyltype): Define members even when not
13038 doing locations. This is more consistent with yacc.c, and it
13039 works around the following bug reports:
13040 http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00106.html
13041 http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00111.html
13042
13043 * doc/bison.texinfo: Minor spelling and typographical fixes. Use
13044 @acronym consistently. Standardize on "Yacc" instead of "YACC",
13045 "Algol" instead of "ALGOL". Give a bit more history about BNF.
13046
13047 2002-10-22 Akim Demaille <akim@epita.fr>
13048
13049 * data/README: New.
13050
13051 2002-10-21 Paul Eggert <eggert@twinsun.com>
13052
13053 Be consistent about 'bool'; the old code used an enum in one
13054 module and an int in another, and this violates the C standard.
13055 * m4/stdbool.m4: New file, from coreutils 4.5.3.
13056 * configure.ac (AC_HEADER_STDBOOL): Add.
13057 * m4/Makefile.am (EXTRA_DIST): Add stdbool.m4.
13058 * src/muscle_tab.c (hash_compare_muscles): (a ? FALSE : TRUE) -> (! a)
13059 * src/symtab.c (hash_compare_symbol_t): Likewise.
13060 * src/system.h (bool, false, true): Use a definition consistent
13061 with ../lib/hash.c. All uses changed.
13062
13063 * src/complain.c (warning_issued): Renamed from warn_message_count,
13064 so that we needn't worry about integer overflow (!).
13065 Now of type bool. All uses changed.
13066 (complaint_issued): Renamed from complain_message_count; likewise.
13067
13068 * src/main.c (main): Use exit to exit with failure.
13069
13070 * src/complain.c (fatal_at, fatal): Use EXIT_FAILURE and EXIT_SUCCESS
13071 rather than 1 and 0.
13072 * src/main.c (main): Likewise.
13073 * src/getargs.c (getargs): Likewise.
13074 * src/reader.c (reader): Likewise.
13075
13076 * src/getarg.c (getargs): Remove duplicate code for
13077 "Try `bison --help'".
13078
13079 * src/files.c (xfopen, xfclose): Use EXIT_FAILURE rather than 2.
13080 What was that "2" for?
13081
13082 * src/complain.h (fatal, fatal_at): Add __attribute__((__noreturn__)).
13083 * src/getargs.c (usage): Likewise.
13084
13085 * src/getargs.c (getargs): When there are too few operands, report
13086 the last one. When there are too many, report the first extra
13087 one. This is how diffutils does it.
13088
13089 2002-10-20 Paul Eggert <eggert@twinsun.com>
13090
13091 Remove K&R vestiges.
13092 * configure.ac (AC_C_CONST, AM_C_PROTOTYPES): Remove.
13093 * src/complain.c (VA_START): Remove. Assume prototypes.
13094 (vfprintf) [! (HAVE_VPRINTF || defined vfprintf)]: New macro.
13095 (private_strerror, warn_at, warn, complain_at, complain, fatal_at,
13096 fatal): Assume prototypes.
13097 * src/complain.h: Assume prototypes.
13098 * src/system.h (PARAMS): Remove.
13099 Include <limits.h> unconditionally, since it's guaranteeed even
13100 for a freestanding C89 compiler.
13101 (SHRT_MIN, SHRT_MAX): Remove, since C89 guarantees them.
13102 * src/vmsgetargs.c (getargs, cli_present, cli_get_value): Prototype.
13103
13104 2002-10-20 Akim Demaille <akim@epita.fr>
13105
13106 * src/muscle_tab.c (muscle_grow): Remove trailing debugging code.
13107 * data/glr.c (YY_USER_FORMALS, YY_USER_ARGS): New.
13108 (yyuserAction, yydoAction, yyglrReduce, yyresolveValue)
13109 (yyresolveStates, yyresolveAction, yyresolveStack)
13110 (yyprocessOneStack): Use them.
13111 (yy_reduce_print): New.
13112 * tests/calc.at (_AT_DATA_CALC_Y): Exercise %parse-param.
13113
13114 2002-10-20 Akim Demaille <akim@epita.fr>
13115
13116 * data/c.m4 (b4_c_ansi_args): Recognize functions with no
13117 arguments and output `void'.
13118 (b4_c_function): Rename as...
13119 (b4_c_function_def): this.
13120 (b4_c_function_decl, b4_c_ansi_function_def)
13121 (b4_c_ansi_function_decl): New.
13122 Change the interpretation of the arguments: before `int, foo', now
13123 `int foo, foo'.
13124 * data/yacc.c (yyparse): Prototype and define thanks to these.
13125 Adjust b4_c_function_def uses.
13126 * data/glr.c (yyparse): Likewise, but ANSI only.
13127
13128 2002-10-20 Akim Demaille <akim@epita.fr>
13129
13130 * src/output.c (prepare): Move the definition of `tokens_number',
13131 `nterms_number', `undef_token_number', `user_token_number_max'
13132 to...
13133 (prepare_tokens): Here.
13134 (prepare_tokens): Rename as...
13135 (prepare_symbols): this.
13136 (prepare): Move the definition of `rules_number' to...
13137 (prepare_rules): here.
13138 (prepare): Move the definition of `last', `final_state_number',
13139 `states_number' to...
13140 (prepare_states): here.
13141 * data/yacc.c, data/lalr1.cc, data/glr.c: Normalize `>' into `<'.
13142
13143 2002-10-20 Akim Demaille <akim@epita.fr>
13144
13145 * src/tables.h, src/tables.c, src/output.c: Comment changes.
13146
13147 2002-10-20 Akim Demaille <akim@epita.fr>
13148
13149 * data/yacc.c, data/yacc.c (b4_location_if, b4_pure_if): Move to...
13150 * data/c.m4: here.
13151
13152 2002-10-20 Akim Demaille <akim@epita.fr>
13153
13154 * src/output.c (prepare): Use MUSCLE_INSERT_STRING.
13155 * src/muscle_tab.c (muscle_pair_list_grow): Rename `val as
13156 `pair'.
13157 (muscle_init): Move the `b4_ltype', `b4_maxdepth', `b4_initdepth',
13158 `name' to...
13159 * data/glr.c, data/lalr1.cc, data/yacc.c (b4_location_type)
13160 (b4_stack_depth_init, b4_stack_depth_max, b4_parser_class_name):
13161 These.
13162
13163 2002-10-19 Paul Eggert <eggert@twinsun.com>
13164
13165 Do not create a temporary file, as that involves security and
13166 cleanup headaches. Instead, use a pair of pipes.
13167 Derived from a suggestion by Florian Krohm.
13168 * lib/subpipe.c, lib/subpipe.h, m4/subpipe.m4: New files.
13169 * lib/mkstemp.c, lib/readpipe.c, lib/tempname.c, m4/mkstemp.m4: Remove.
13170 * configure.ac (UTILS_FUNC_MKSTEMP, jm_PREREQ_TEMPNAME): Remove.
13171 (BISON_PREREQ_SUBPIPE): Add.
13172 * lib/Makefile.am (libbison_a_SOURCES): Remove readpipe.c.
13173 Add subpipe.h, subpipe.c.
13174 * m4/Makefile.am (EXTRA_DIST): Remove mkstemp.m4. Add subpipe.m4.
13175 * po/POTFILES.in: Add lib/subpipe.c.
13176 * src/output.c: Include "subpipe.h".
13177 (m4_invoke): Remove decl.
13178 (scan_skel): New decl.
13179 (output_skeleton): Use pipe rather than temporary file for m4 input.
13180 Check that m4sugar.m4 is readable, to avoid deadlock.
13181 Check for pipe I/O error.
13182 * src/scan-skel.l (readpipe): Remove decl.
13183 (scan_skel): New function, to be used in place of m4_invoke.
13184 Read from stream rather than file.
13185
13186 * lib/timevar.c (TICKS_TO_MSEC, CLOCKS_TO_MSEC): Do not cast to
13187 float, as this generates a warning on Solaris 8 + GCC 3.2 with
13188 --enable-gcc-warnings. Instead, divide into 1.0 rather than 1;
13189 this generates a more-accurate value anyway.
13190
13191 * lib/timevar.c (timervar_accumulate): Rename locals to
13192 avoid confusion with similarly-named more-global.
13193 * src/muscle_tab.c (muscle_pair_list_grow): Likewise.
13194
13195 * src/output.c (prepare): Use xstrdup to convert char const *
13196 to char *, to avoid GCC warning.
13197
13198 2002-10-19 Akim Demaille <akim@epita.fr>
13199
13200 * tests/calc.at (_AT_DATA_CALC_Y): Define VAL, LOC, LEX_FORMALS,
13201 LEX_PRE_FORMALS, LEX_ARGS, LEX_PRE_ARGS, USE_LEX_ARGS.
13202 Use them to have `calc.y' ready for %pure-parser.
13203 * data/yacc.c (YYLEX): Pass a yylex return type to
13204 b4_c_function_call.
13205
13206 2002-10-19 Akim Demaille <akim@epita.fr>
13207
13208 Prototype support of %lex-param and %parse-param.
13209
13210 * src/parse-gram.y: Add the definition of the %lex-param and
13211 %parse-param tokens, plus their rules.
13212 Drop the `_' version of %glr-parser.
13213 Add the "," token.
13214 * src/scan-gram.l (INITIAL): Scan them.
13215 * src/muscle_tab.c: Comment changes.
13216 (muscle_insert, muscle_find): Rename `pair' as `probe'.
13217 * src/muscle_tab.h (MUSCLE_INSERT_PREFIX): Remove unused.
13218 (muscle_entry_s): The `value' member is no longer const.
13219 Adjust all dependencies.
13220 * src/muscle_tab.c (muscle_init): Adjust: use
13221 MUSCLE_INSERT_STRING.
13222 Initialize the obstack earlier.
13223 * src/muscle_tab.h, src/muscle_tab.c (muscle_grow)
13224 (muscle_pair_list_grow): New.
13225 * data/c.m4 (b4_c_function_call, b4_c_args): New.
13226 * data/yacc.c (YYLEX): Use b4_c_function_call to honor %lex-param.
13227 * tests/calc.at: Use %locations, not --locations.
13228 (AT_CHECK_CALC_GLR): Use %glr-parser, not %glr_parser.
13229
13230 2002-10-19 Akim Demaille <akim@epita.fr>
13231
13232 * src/getargs.c (usage): Take status as argument and exit
13233 accordingly.
13234 Report the traditional `Try ... --help' message when status != 0.
13235 (usage, version): Don't take a FILE * as arg, it is pointless.
13236 (getargs): When there is an incorrect number of arguments, make it
13237 an error, and report it GNUlically thanks to `usage ()'.
13238
13239 2002-10-18 Paul Eggert <eggert@twinsun.com>
13240
13241 * data/glr.c (yyreportParseError): Don't assume that sprintf
13242 yields the length of the printed string, as this is not true
13243 on SunOS 4.1.4. Reported by Peter Klein.
13244
13245 * tests/calc.at (_AT_DATA_CALC_Y): #undef memcmp and realloc.
13246 * tests/conflicts.at (%nonassoc and eof): Likewise.
13247 Fixes SunOS 4.1.4 test failure reported by Peter Klein.
13248
13249 2002-10-17 Akim Demaille <akim@epita.fr>
13250
13251 * src/getargs.h (trace_e): Add trace_scan, and trace_parse.
13252 * src/getargs.c (trace_types, trace_args): Adjust.
13253 * src/reader.c (grammar_current_rule_prec_set)
13254 (grammar_current_rule_dprec_set, grammar_current_rule_merge_set):
13255 Standardize error messages.
13256 And s/@prec/%prec/!
13257 (reader): Use trace_flag to enable scanner/parser debugging,
13258 instead of an adhoc scheme.
13259 * src/scan-gram.l: Remove trailing debugging code.
13260
13261 2002-10-16 Paul Eggert <eggert@twinsun.com>
13262
13263 * src/muscle_tab.h (MUSCLE_TAB_H_): Was misspelled as
13264 MUSCLE_TAB_H.
13265
13266 * NEWS: Officially drop support for building Bison with K&R C,
13267 since it didn't work anyway and it's not worth worrying about.
13268 * Makefile.maint (wget_files): Remove ansi2knr.c.
13269 (ansi2knr.c-url_prefix): Remove.
13270 * lib/.cvsignore: Remove ansi2knr, ansi2knr.*.
13271 * lib/Makefile.am (AUTOMAKE_OPTIONS): Remove.
13272 * src/Makefile.am (AUTOMAKE_OPTIONS): Remove.
13273
13274 2002-10-15 Paul Eggert <eggert@twinsun.com>
13275
13276 Stop using the "enum_" trick for K&R-style function definitions;
13277 it confused me, and I was the author! Instead, assume that people
13278 who want to use K&R C compilers (when using these modules in GCC,
13279 perhaps?) will run ansi2knr.
13280
13281 * lib/bbitset.h: (enum_bitset_ops, enum_bitset_type): Remove.
13282 All uses of "enum_" changed to "enum ".
13283 * lib/ebitset.c (enum_ebitset_find_mode): Likewise.
13284 * lib/lbitset.c (enum_lbitset_find_mode): Likewise.
13285
13286 * lib/abitset.c (abitset_and, abitset_and_cmp, abitset_and_or,
13287 abitset_and_or_cmp, abitset_andn, abitset_andn_cmp,
13288 abitset_andn_or, abitset_andn_or_cmp, abitset_bytes, abitset_copy,
13289 abitset_copy1, abitset_disjoint_p, abitset_empty_p,
13290 abitset_equal_p, abitset_init, abitset_list, abitset_list_reverse,
13291 abitset_not, abitset_ones, abitset_or, abitset_or_and,
13292 abitset_or_and_cmp, abitset_or_cmp, abitset_reset, abitset_set,
13293 abitset_size, abitset_small_list, abitset_subset_p, abitset_test,
13294 abitset_unused_clear, abitset_xor, abitset_xor_cmp, abitset_zero):
13295 Use function prototypes; this removes the need for declaring
13296 static functions simply to provide their prototypes.
13297 * lib/bitset.c (bitset_alloc, bitset_and_or_, bitset_and_or_cmp_,
13298 bitset_andn_or_, bitset_andn_or_cmp_, bitset_bytes, bitset_copy_,
13299 bitset_count_, bitset_create, bitset_dump, bitset_first,
13300 bitset_free, bitset_init, bitset_last, bitset_next,
13301 bitset_obstack_alloc, bitset_obstack_free, bitset_only_set_p,
13302 bitset_op4_cmp, bitset_or_and_, bitset_or_and_cmp_, bitset_prev,
13303 bitset_print, bitset_release_memory, bitset_toggle_,
13304 bitset_type_choose, bitset_type_get, bitset_type_name_get,
13305 debug_bitset): Likewise.
13306 * lib/bitset.h (bitset_set, bitset_reset, bitset_test): Likewise.
13307 * lib/bitset_stats.c (bitset_log_histogram_print,
13308 bitset_percent_histogram_print, bitset_stats_and,
13309 bitset_stats_and_cmp, bitset_stats_and_or,
13310 bitset_stats_and_or_cmp, bitset_stats_andn, bitset_stats_andn_cmp,
13311 bitset_stats_andn_or, bitset_stats_andn_or_cmp, bitset_stats_copy,
13312 bitset_stats_count, bitset_stats_disable, bitset_stats_disjoint_p,
13313 bitset_stats_dump, bitset_stats_empty_p, bitset_stats_enable,
13314 bitset_stats_equal_p, bitset_stats_free, bitset_stats_init,
13315 bitset_stats_list, bitset_stats_list_reverse, bitset_stats_not,
13316 bitset_stats_ones, bitset_stats_or, bitset_stats_or_and,
13317 bitset_stats_or_and_cmp, bitset_stats_or_cmp, bitset_stats_print,
13318 bitset_stats_print_1, bitset_stats_read, bitset_stats_reset,
13319 bitset_stats_set, bitset_stats_size, bitset_stats_subset_p,
13320 bitset_stats_test, bitset_stats_toggle, bitset_stats_type_get,
13321 bitset_stats_write, bitset_stats_xor, bitset_stats_xor_cmp,
13322 bitset_stats_zero): Likewise.
13323 * lib/bitsetv.c (bitsetv_alloc, bitsetv_create, bitsetv_free,
13324 bitsetv_zero, bitsetv_ones, bitsetv_transitive_closure,
13325 bitsetv_dump, debug_bitsetv): Likewise.
13326 * lib/ebitset.c (ebitset_and, ebitset_and_cmp, ebitset_andn,
13327 ebitset_andn_cmp, ebitset_bytes, ebitset_copy, ebitset_copy_,
13328 ebitset_copy_cmp, ebitset_disjoint_p, ebitset_elt_add,
13329 ebitset_elt_alloc, ebitset_elt_calloc, ebitset_elt_find,
13330 ebitset_elt_free, ebitset_elt_last, ebitset_elt_remove,
13331 ebitset_elt_zero_p, ebitset_elts_grow, ebitset_empty_p,
13332 ebitset_equal_p, ebitset_free, ebitset_init, ebitset_list,
13333 ebitset_list_reverse, ebitset_not, ebitset_ones, ebitset_op3_cmp,
13334 ebitset_or, ebitset_or_cmp, ebitset_release_memory, ebitset_reset,
13335 ebitset_set, ebitset_size, ebitset_subset_p, ebitset_test,
13336 ebitset_weed, ebitset_xor, ebitset_xor_cmp, ebitset_zero):
13337 Likewise.
13338 * lib/lbitset.c (debug_lbitset, lbitset_and, lbitset_and_cmp,
13339 lbitset_andn, lbitset_andn_cmp, lbitset_bytes, lbitset_copy,
13340 lbitset_copy_cmp, lbitset_disjoint_p, lbitset_elt_alloc,
13341 lbitset_elt_calloc, lbitset_elt_find, lbitset_elt_free,
13342 lbitset_elt_link, lbitset_elt_unlink, lbitset_elt_zero_p,
13343 lbitset_empty_p, lbitset_equal_p, lbitset_free, lbitset_init,
13344 lbitset_list, lbitset_list_reverse, lbitset_not, lbitset_ones,
13345 lbitset_op3_cmp, lbitset_or, lbitset_or_cmp, lbitset_prune,
13346 lbitset_release_memory, lbitset_reset, lbitset_set, lbitset_size,
13347 lbitset_subset_p, lbitset_test, lbitset_weed, lbitset_xor,
13348 lbitset_xor_cmp, lbitset_zero): Likewise.
13349
13350 2002-10-14 Akim Demaille <akim@epita.fr>
13351
13352 Version 1.75.
13353
13354 2002-10-14 Akim Demaille <akim@epita.fr>
13355
13356 * tests/Makefile.am (maintainer-check-posix): New.
13357
13358 2002-10-14 Akim Demaille <akim@epita.fr>
13359
13360 * data/glr.c [YYDEBUG] (YYLEFTMOST_STATE): Initialize the yyloc
13361 member.
13362
13363 2002-10-14 Akim Demaille <akim@epita.fr>
13364
13365 * src/tables.c (table_ninf_remap): base -> tab.
13366 Reported by Matt Rosing.
13367
13368 2002-10-14 Paul Eggert <eggert@twinsun.com>
13369
13370 * tests/action.at, tests/calc.at, tests/conflicts.at,
13371 tests/cxx-type.at, tests/headers.at, tests/input.at,
13372 tests/regression.at, tests/synclines.at, tests/torture.at:
13373 Say "bison -o foo.c foo.y", not "bison foo.y -o foo.c",
13374 so that the tests still work even if POSIXLY_CORRECT is set.
13375 * doc/bison.texinfo (Rpcalc Compile, Invocation): Likewise.
13376
13377 * data/c.m4 (b4_int_type): Use yysigned_char instead of signed char,
13378 for portability to K&R hosts. Fix typo: signed char is guaranteed
13379 only to 127, not to 128.
13380 * data/glr.c (yysigned_char): New type.
13381 * data/yacc.c (yysigned_char): Likewise.
13382 * tests/regression.at (Web2c Actions): signed char -> yysigned_char.
13383
13384 2002-10-13 Paul Eggert <eggert@twinsun.com>
13385
13386 * data/yacc.c (yyparse): Rewrite to avoid "comparison is always
13387 true due to limited range of data type" warning from GCC.
13388
13389 * data/c.m4 (b4_token_defines): Protect against double-inclusion
13390 by wrapping enum yytokentype's definition inside #ifndef
13391 YYTOKENTYPE. This undoes a bug I introduced on 2002-10-12.
13392
13393 2002-10-13 Akim Demaille <akim@epita.fr>
13394
13395 * data/glr.c (yyglrShiftDefer, yyaddDeferredAction, yydoAction):
13396 Un yy- yyrhs to avoid the name clash with the global YYRHS.
13397
13398 2002-10-13 Akim Demaille <akim@epita.fr>
13399
13400 * Makefile.maint: Update from Autoconf 2.54.
13401 * m4/strerror_r.m4 (AC_FUNC_STRERROR_R): Remove, shipped with 2.54.
13402
13403 2002-10-13 Akim Demaille <akim@epita.fr>
13404
13405 * src/print.c (print_state): Separate the list of solved conflicts
13406 from the other items.
13407 * tests/conflicts.at (Resolved SR Conflicts): Adjust.
13408
13409 2002-10-13 Akim Demaille <akim@epita.fr>
13410
13411 Let nondeterministic skeletons be usable with deterministic
13412 tables.
13413
13414 With the patch, GAWK compiled by GCC without -O2 passes its test
13415 suite using a GLR parser driven by LALR tables. It fails with -O2
13416 because `struct stat' gives two different answers on my machine:
13417 88 (definition of an auto var) and later 96 (memset on this var).
13418 Hence the stack is badly corrumpted. The headers inclusion is to
13419 blame: if I move the awk.h inclusion before GLR's system header
13420 inclusion, the two struct stat have the same size.
13421
13422 * src/tables.c (pack_table): Always create conflict_table.
13423 (token_actions): Always create conflict_list.
13424 * data/glr.c (YYFLAG): Remove, unused.
13425
13426 2002-10-13 Akim Demaille <akim@epita.fr>
13427
13428 * configure.ac (AC_GNU_SOURCE): Use it instead of hand written code.
13429 (O0FLAGS): New.
13430 (VALGRIND, GXX): New.
13431 * tests/atlocal.in (CFLAGS): Use O0FLAGS.
13432 * tests/bison.in: Run $PREBISON a pre-command.
13433 * tests/Makefile.am (maintainer-check, maintainer-check-valgrind)
13434 (maintainer-check-g++): New.
13435 * Makefile.am (maintainer-check): New.
13436
13437 2002-10-13 Akim Demaille <akim@epita.fr>
13438
13439 * data/glr.c: Formatting changes.
13440 Tweak some trace messages to match yacc.c's.
13441
13442 2002-10-13 Akim Demaille <akim@epita.fr>
13443
13444 GLR parsers sometimes raise parse errors instead of performing the
13445 default reduction.
13446 Reported by Charles-Henry de Boysson.
13447
13448 * tests/calc.at (_AT_CHECK_CALC, _AT_CHECK_CALC_ERROR): Don't
13449 check the length of the traces when %glr.
13450 (_AT_CHECK_CALC_ERROR): Also skip `^Stack' lines, coming from
13451 GLR's traces.
13452 (AT_CHECK_CALC_LALR, AT_CHECK_CALC_GLR): New.
13453 Test GLR parsers.
13454 * data/glr.c (YYLEFTMOST_STATE): Fix its value.
13455 (yyltype): Remove the yy prefix from the member names.
13456 (yytable): Complete its comment.
13457 (yygetLRActions): Map error action number from YYTABLE from
13458 YYTABLE_NINF to 0.
13459 (yyisErrorAction): No longer compare YYACTION to YYPACT_NINF
13460 (which was a bug: it should have been YYTABEL_NINF, and yet it was
13461 not satisfying as we could compare an YYACTION computed from
13462 YYDEFACT to YYTABLE_NINF although they are unrelated): 0 is the
13463 only value for error actions.
13464 (yyreportParseError): In verbose parse error messages, don't issue
13465 `error' in the list of expected tokens.
13466 * data/yacc.c (yyparse) <yybackup>: Rewrite the decoding of the
13467 next action to perform to match glr.c's decoding.
13468 (yytable): Complete its comment.
13469
13470 2002-10-13 Paul Eggert <eggert@twinsun.com>
13471
13472 Fix problem reported by Henrik Grubbstroem in
13473 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00098.html>:
13474 "nonterm: { $$ = 123; } { $$ = $1; };" was wrongly rejected,
13475 because the Bison parser reads the second action before reducing
13476 the first one.
13477 * src/scan-gram.l (rule_length): New static var.
13478 Use it to keep track of the rule length in the scanner, since
13479 we can't expect the parser to be in lock-step sync with the scanner.
13480 (handle_action_dollar, handle_action_at): Use this var.
13481 * tests/actions.at (Exotic Dollars): Test for the problem.
13482
13483 2002-10-12 Paul Eggert <eggert@twinsun.com>
13484
13485 * lib/timevar.c [! IN_GCC && HAVE_SYS_TIME_H]: Include <sys/time.h>.
13486 * m4/timevar.m4 (BISON_PREREQ_TIMEVAR): Check for <sys/time.h>.
13487 Include <sys/time.h> when checking for clock_t and struct tms.
13488 Use same include order as source.
13489 This is for the SunOS 4.1.4 porting bug reported by Peter Klein in
13490 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00016.html>.
13491
13492 * lib/timevar.c: Update copyright date and clarify comments.
13493 (get_time) [IN_GCC]: Keep the GCC version for reference.
13494
13495 * lib/timevar.c, lib/timevar.h, lib/timevar.def: Import
13496 GCC version as of today, then merge Bison's changes.
13497 Change "GCC" to "Bison" in copyright notice. timevar.def's
13498 author is Akim, so change that too.
13499
13500 * src/reader.c (grammar_current_rule_check):
13501 Don't worry about the default action if $$ is untyped.
13502 Prevents bogus warnings reported by Jim Gifford in
13503 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00015.html>.
13504
13505 * data/c.m4 (b4_token_enum): Do not define YYTOKENTYPE.
13506 * data/glr.c, data/lalr1.cc, data/yacc.c:
13507 Output token definitions before the first part of user declarations.
13508 Fixes compatibility problem reported by Jim Gifford for kbd in
13509 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00014.html>.
13510
13511 2002-10-11 Paul Eggert <eggert@twinsun.com>
13512
13513 * data/yacc.c (yyreport_parse_error): Remove, putting its body into...
13514 (yyparse): here. This undoes some of the 2002-07-25 change.
13515 Compatibility problem reported by Ralf S. Engelschall with
13516 OSSP cfg <http://www.ossp.org/pkg/lib/cfg/>.
13517
13518 2002-10-11 Akim Demaille <akim@epita.fr>
13519
13520 * tests/regression.at Characters Escapes): New.
13521 * src/scan-gram.l (SC_ESCAPED_CHARACTER): Accept \' in strings and
13522 characters.
13523 Reported by Jan Nieuwenhuizen.
13524
13525 2002-10-11 Akim Demaille <akim@epita.fr>
13526
13527 * po/id.po: New.
13528
13529 2002-10-10 Paul Eggert <eggert@twinsun.com>
13530
13531 Portability fixes for bitsets; this also avoids several GCC
13532 warnings.
13533
13534 * lib/abitset.c: Include <stddef.h>, for offsetof.
13535 * lib/lbitset.c: Likewise.
13536
13537 * lib/abitset.c (abitset_bytes): Return a size that is aligned
13538 properly for vectors of objects. Do not assume that adding a
13539 header size to a multiple of a word size yields a value that is
13540 properly aligned for the whole union.
13541 * lib/bitsetv.c (bitsetv_alloc): Likewise.
13542
13543 * lib/bitset_stats.c (bitset_stats_bytes): Adjust to new,
13544 unique names for structures.
13545 * lib/ebitset.c (ebitset_bytes): Likewise.
13546 * lib/lbitset.c (lbitset_bytes): Likewise.
13547
13548 * lib/abitset.c (abitset_ones, abitset_zero, abitset_empty_p,
13549 abitset_copy1, abitset_not, abitset_equal_p, abitset_subset_p,
13550 abitset_disjoint_p, abitset_and, abitset_and_cmp, abitset_andn,
13551 abitset_andn_cmp, abitset_or, abitset_or_cmp, abitset_xor,
13552 abitset_xor_cmp, abitset_and_or, abitset_and_or_cmp,
13553 abitset_andn_or, abitset_andn_or_cmp, abitset_or_and,
13554 abitset_or_and_cmp, abitset_copy): Supply prototype decls,
13555 to improve the type-checking that GCC can do.
13556 * lib/bitset.c (bitset_op4_cmp): Likewise.
13557 * lib/bitset_stats.c (bitset_stats_count,
13558 bitset_stats_empty_p, bitset_stats_ones, bitset_stats_zero,
13559 bitset_stats_copy, bitset_stats_disjoint_p,
13560 bitset_stats_equal_p, bitset_stats_not, bitset_stats_subset_p,
13561 bitset_stats_and, bitset_stats_and_cmp, bitset_stats_andn,
13562 bitset_stats_andn_cmp, bitset_stats_or, bitset_stats_or_cmp,
13563 bitset_stats_xor, bitset_stats_xor_cmp, bitset_stats_and_or,
13564 bitset_stats_and_or_cmp, bitset_stats_andn_or,
13565 bitset_stats_andn_or_cmp, bitset_stats_or_and,
13566 bitset_stats_or_and_cmp): Likewise.
13567 * lib/lbitset.c (lbitset_and, lbitset_and_cmp, lbitset_andn,
13568 lbitset_andn_cmp, lbitset_or, lbitset_or_cmp, lbitset_xor,
13569 lbitset_xor_cmp, lbitset_empty_p, lbitset_ones, lbitset_not,
13570 lbitset_subset_p, lbitset_disjoint_p, debug_lbitset): Likewise.
13571
13572 * lib/abitset.h: Include bitset.h, not bbitset.h.
13573 * lib/ebitset.h: Likewise.
13574 * lib/lbitset.h: Likewise.
13575
13576 * lib/bbitset.h: (enum_bitset_ops, enum_bitset_type): New types.
13577 All instances of parameters of type enum bitset_opts are now of
13578 type enum_bitset_opts, to conform to the C Standard, and similarly
13579 for enum_bitset_type.
13580 * lib/ebitset.c (enum_ebitset_find_mode): Likewise.
13581 * lib/lbitset.c (enum_lbitset_find_mode): Likewise.
13582
13583 Do not use "struct bitset_struct" to mean different things in
13584 different modules. Not only is this confusing, it violates
13585 the C Standard, which requires that structure types in different
13586 modules must be compatible if one is to be passed to the other.
13587 * lib/bbitset.h (bitset): Now points to a union, not to a struct.
13588 All instances of "struct bitset_struct *" replaced with "bitset".
13589 * lib/bitset.h (struct bitset_struct): Remove, replacing with....
13590 (union bitset_union, struct abitset_struct, struct ebitset_struct,
13591 struct lbitset_struct, struct bitset_stats_struct): New types.
13592 All uses of struct bitset_struct changed to union bitset_union,
13593 etc.
13594 * lib/abitset.c (struct abitset_struct, abitset,
13595 struct bitset_struct): Remove.
13596 * lib/bitset_stats.c (struct bitset_stats_struct, bitset_stats,
13597 struct bitset_struct): Remove.
13598 * lib/ebitset.c (struct ebitset_struct, ebitset, struct
13599 bitset_struct): Remove.
13600 * lib/lbitset.c (struct lbitset_struct, lbitset, bitset_struct):
13601 Likewise.
13602
13603 Do not call a function of type T using a call that assumes the
13604 function is of a different type U. Standard C requires that a
13605 function must be called with a type that is compatible with its
13606 definition.
13607 * lib/bbitset.h (bitset_and_or_, bitset_andn_or_, bitset_or_and_):
13608 New decls.
13609 * lib/bitset.c (bitset_and_or_, bitset_andn_or_, bitset_or_and_):
13610 New functions.
13611 * lib/ebitset.c (PFV): Remove.
13612 * lib/lbitset.c (PFV): Likewise.
13613 * lib/ebitset.c (ebitset_and, ebitset_andn, ebitset_or,
13614 ebitset_xor, ebitset_copy, ebitset_ones, ebitset_empty_p): New
13615 decls.
13616 (ebitset_and, ebitset_andn, ebitset_or, ebitset_xor): New functions.
13617 (ebitset_vtable): Use them.
13618 * lib/lbitset.c (lbitset_and, lbitset_andn, lbitset_or,
13619 lbitset_xor): New functions.
13620 (lbitset_vtable): Use them.
13621
13622 * lib/bitset.h (bitset_next, bitset_prev, bitset_only_set_p):
13623 Declare.
13624
13625 * lib/bitsetv.c (bitsetv_alloc): Add a cast to (void *) to avoid a
13626 GCC warning.
13627 * lib/lbitset.c (LBITSET_CURRENT1): Likewise.
13628 Use offsetof, for simplicity.
13629
13630 2002-10-06 Paul Eggert <eggert@twinsun.com>
13631
13632 * lib/bitset.h (bitset_reset): Do not assume that bitset_word is
13633 the same width as int. This reapplies a hunk of the 2002-08-12 patch
13634 <http://lists.gnu.org/archive/html/bison-patches/2002-08/msg00007.html>,
13635 which was inadvertently undone by the 2002-09-30 patch.
13636 * lib/lbitset.c (debug_lbitset): Do not assume that bitset_word is
13637 the same width as int.
13638
13639 2002-10-04 Paul Eggert <eggert@twinsun.com>
13640
13641 Version 1.50.
13642
13643 * configure.ac (AC_INIT), NEWS: Increment version number.
13644
13645 * doc/bison.texinfo: Minor spelling, grammar, and white space
13646 fixes.
13647 (Symbols): Mention that any negative value returned from yylex
13648 signifies end-of-input. Warn about negative chars. Mention
13649 the portable Standard C character set.
13650
13651 The GNU coding standard says CFLAGS and YFLAGS are reserved
13652 for the installer to set.
13653 * lib/Makefile.am (AM_CFLAGS): Renamed from CFLAGS.
13654 * src/Makefile.am (AM_CFLAGS): Likewise.
13655 (AM_YFLAGS): Renamed from YFLAGS.
13656
13657 Fix some MAX and MIN problems.
13658 * src/gram.h (ITEM_NUMBER_MIN): MIN_MAX -> INT_MIN.
13659 * src/lalr.h (GOTO_NUMBER_MAX): INT_MAX -> SHRT_MAX.
13660 * src/symtab.h (SYMBOL_NUMBER_MAX): New macro.
13661 * src/reader.c (reader): Use it.
13662
13663 * tests/regression.at (Braces parsing): Use grep, not fgrep, as
13664 POSIX 1003.1-2001 has removed fgrep.
13665
13666 2002-10-04 Michael Hayes <m.hayes@elec.canterbury.ac.nz>
13667
13668 * lib/bbitset.h (BITSET_WINDEX_MAX): Redefine so that it cannot be
13669 interpreted as signed.
13670 * lib/ebitset.c (ebitset_list): Fix bug.
13671
13672 2002-10-01 Paul Eggert <eggert@twinsun.com>
13673
13674 More fixes for 64-bit hosts and large bitsets.
13675
13676 * lib/abitset.c (struct abitset_struct.n_bits, abitset_small_list,
13677 abitset_size, abitset_list, abitset_list_reverse, abitset_list):
13678 Use bitset_bindex, not int or unsigned int or size_t, to count bits.
13679 * lib/bbitset.h (struct bitset_vtable.size, struct bitset_vtable.count,
13680 struct bitset_vtable.list, struct bitset_vtable.list_reverse,
13681 bitset_count_, bitset_next, bitset_prev, bitset_first, bitset_last,
13682 bitset_count_): Likewise.
13683 * lib/bitset.h (bitset_iterator.num, bitset_iterator.i,
13684 bitset_first, bitset_last): Likewise.
13685 * lib/bitset_stats.c (bitset_stats_size, bitset_stats_list,
13686 bitset_stats_list_reverse, bitset_stats_size,
13687 bitset_stats_count, bitset_stats_list, bitset_stat_list_reverse):
13688 Likewise.
13689 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
13690 * lib/bitsetv.c (bitsetv_alloc, bitsetv_create, bitsetv_free,
13691 bitsetv_zero, bitsetv_ones, bitsetv_transitive_closure,
13692 bitsetv_reflexive_transitive_closure): Likewise.
13693 * lib/bitsetv.h (bitsetv_alloc, bitsetv_create): Likewise.
13694 * lib/ebitset.c (ebitset_size, ebitset_list, ebitset_list_reverse):
13695 Likewise.
13696 * lib/lbitset.c (lbitset_size, lbitset_list, lbitset_list_merge):
13697 Likewise.
13698
13699 * lib/abitset.c (abitset_ones, abitset_zero, abitset_bytes):
13700 Use size_t, not unsigned int, to count bytes.
13701 * lib/abitset.h (abitset_bytes): Likewise.
13702 * lib/bitset.c (bitset_bytes, bitset_alloc, bitset_obstack_alloc):
13703 Likewise.
13704 * lib/bitset.h (bitset_bytes): Likewise.
13705 * lib/bitset_stats.c (bitset_stats_bytes, bitset_stats_init): Likewise.
13706 * lib/bitset_stats.h (bitset_stats_bytes): Likewise.
13707 * lib/bitsetv.c (bitsetv_alloc): Likewise.
13708 * lib/ebitset.c (ebitset_bytes): Likewise.
13709 * lib/ebitset.h (ebitset_bytes): Likewise.
13710 * lib/lbitset.c (lbitset_bytes): Likewise.
13711 * lib/lbitset.h (lbitset_bytes): Likewise.
13712
13713 * lib/abitset.c (abitset_empty_p, abitset_not, abitset_equal_p,
13714 abitset_subset_p, abitset_disjoint_p, abitset_and,
13715 abitset_and_cmp, abitset_andn, abitset_andn_cmp, abitset_or,
13716 abitset_or_cmp, abitset_xor, abitset_xor_cmp, abitset_and_or,
13717 abitset_and_or_cmp, abitset_andn_or, abitset_andn_or_cmp,
13718 abitset_or_and, abitset_or_and_cmp):
13719 Use bitset_windex instead of unsigned int.
13720 * lib/bitsetv.c (bitsetv_dump, debug_bitsetv): Likewise.
13721 * lib/ebitset.c (struct ebitset_struct.size, ebitset_elts_grow,
13722 ebitset_elt_add, ebitset_elt_remove, ebitset_weed,
13723 ebitset_elt_find, ebitset_list_reverse, ebitset_list, ebitset_init):
13724 Likewise.
13725 * lib/lbitset.c (lbitset_ones, lbitset_not): Likewise.
13726
13727 * lib/bitset.c (bitset_print):
13728 Use proper printf formats for widths of integer types.
13729 * lib/bitset_stats.c (bitset_percent_histogram_print,
13730 bitset_log_histogram_print, bitset_stats_print_1): Likewise.
13731 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
13732 * lib/bitsetv.c (bitsetv_dump, debug_bitsetv): Likewise.
13733 * lib/lbitset.c (lbitset_bytes): Likewise.
13734
13735 * lib/bbitset.h (BITSET_BINDEX_MAX, BITSET_WINDEX_MAX,
13736 BITSET_SIZE_MAX): New macros.
13737 (BITSET_INDEX_MAX): Remove. It wasn't right, since it assumed that
13738 sizeof (bitset_word) == sizeof (bitset_windex). All uses changed
13739 to BITSET_WINDEX_MAX.
13740
13741 * lib/bitset.c (bitset_next, bitset_prev, bitset_first,
13742 bitset_last): Return BITSET_BINDEX_MAX (not -1) for no value,
13743 since we now return the bitset_bindex type (not int).
13744
13745 * lib/bitsetv.c (bitsetv_alloc): Check for arithmetic overflow
13746 when computing sizes.
13747 * lib/ebitset.c (ebitset_elts_grow): Likewise.
13748
13749 * lib/lbitset.c (lbitset_elt_find): Simplify windex calculation
13750 and avoid cast to unsigned.
13751
13752 2002-09-30 Akim Demaille <akim@epita.fr>
13753
13754 * lib/abitset.c, lib/bbitset.h, lib/bitset.c, lib/bitset.h,
13755 * lib/bitset_stats.c, lib/bitsetv.c, lib/ebitset.c, lib/lbitset.c:
13756 Updates from Michael Hayes.
13757
13758 2002-09-30 Art Haas <ahaas@neosoft.com>
13759
13760 * configure.ac: Update AC_OUTPUT and AM_CONFIG_HEADER
13761 invocations.
13762 * tests/cxx-type.at (declarator): Don't rely on NDEBUG being not
13763 defined.
13764
13765 2002-09-27 Akim Demaille <akim@epita.fr>
13766
13767 Version 1.49c.
13768
13769 2002-09-27 Akim Demaille <akim@epita.fr>
13770
13771 * configure.ac (AM_INIT_AUTOMAKE): We _need_ 1.7.
13772 (Because of AC_LIBSOURCE).
13773
13774 2002-09-27 Akim Demaille <akim@epita.fr>
13775
13776 Playing with Autoscan.
13777
13778 * configure.ac: Remove the old LIBOBJ tweaks.
13779 (AC_REPLACE_FUNCS): Add strrchr and strtol.
13780 * lib/strrchr.c: New.
13781 * lib/strtol.c: New, from the Coreutils 4.5.1.
13782
13783 2002-09-27 Akim Demaille <akim@epita.fr>
13784
13785 Playing with Autoscan.
13786
13787 * m4/prereq.m4 (jm_PREREQ_ARGMATCH, jm_FUNC_ARGMATCH): New.
13788 * lib/Makefile.am (libbison_a_SOURCES): No longer include
13789 argmatch.c and argmatch.h, since they are AC_LIBSOURCE'd.
13790 * lib/strcasecmp.c, lib/strncasecmp.c, lib/memcmp.c: New, from the
13791 Coreutils 4.5.1.
13792
13793 2002-09-24 Akim Demaille <akim@epita.fr>
13794
13795 * doc/bison.texinfo (Stack Overflow): xref to Recursion.
13796 (Frequently Asked Questions, Parser Stack Overflow): New.
13797
13798 2002-09-13 Akim Demaille <akim@epita.fr>
13799
13800 Playing with autoscan.
13801
13802 * src/reader.c (get_merge_function): Use xstrdup, not strdup.
13803 * src/files.c (skeleton_find): Remove, unused.
13804 * m4/memcmp.m4: New, from the Coreutils 4.5.1.
13805 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Run jm_FUNC_MEMCMP.
13806
13807 2002-09-13 Akim Demaille <akim@epita.fr>
13808
13809 * configure.ac (AM_INIT_AUTOMAKE): Require Automake 1.6.3.
13810 * Makefile.am (AUTOMAKE_OPTIONS): Don't.
13811
13812 2002-09-13 Akim Demaille <akim@epita.fr>
13813
13814 * configure.ac: Require 2.54.
13815 s/jm_FUNC_MALLOC/AC_FUNC_MALLOC/.
13816 s/jm_FUNC_REALLOC/AC_FUNC_REALLOC/.
13817 * m4/c-bs-a.m4, m4/malloc.m4, m4/mbstate_t.m4, m4/realloc.m4:
13818 Remove, provided by Autoconf macros.
13819
13820 2002-09-12 Akim Demaille <akim@epita.fr>
13821
13822 * m4/prereq.m4: Update, from Coreutils 4.5.1.
13823
13824 2002-09-12 Akim Demaille <akim@epita.fr>
13825
13826 * m4/prereq.m4: Update, from Fileutils 4.1.5.
13827 * configure.ac (jm_PREREQ_TEMPNAME): Invoke it.
13828 Reported by Martin Mokrejs.
13829
13830 2002-09-10 Akim Demaille <akim@epita.fr>
13831
13832 * src/parse-gram.y: Associate a human readable string to each
13833 token type.
13834 * tests/regression.at (Invalid inputs): Adjust.
13835
13836 2002-09-10 Gary V. Vaughan <gary@gnu.org>
13837
13838 * tests/Makefile.am ($(srcdir)/package.m4): Bison now ships
13839 with an Autoconf-2.5x style configure.ac.
13840
13841 2002-09-06 Paul Eggert <eggert@twinsun.com>
13842
13843 * doc/bison.texinfo (Conditions): Make explicit that the GPL
13844 exception applies only to yacc.c. This is a modification of a
13845 patch originally suggested by Akim Demaille.
13846
13847 2002-09-06 Akim Demaille <akim@epita.fr>
13848
13849 * data/c.m4 (b4_copyright): Move the GPL exception comment from
13850 here to...
13851 * data/yacc.c: here.
13852
13853 * data/lalr1.cc (struct yyltype): Don't define it, since we use
13854 LocationType.
13855 (b4_ltype): Default to yy::Location from location.hh.
13856
13857 2002-09-04 Jim Meyering <jim@meyering.net>
13858
13859 * data/yacc.c: Guard the declaration of yytoknum also with
13860 `#ifdef YYPRINT', so it is declared only when used.
13861
13862 2002-09-04 Akim Demaille <akim@epita.fr>
13863
13864 * configure.in: Rename as...
13865 * configure.ac: this.
13866 Bump to 1.49c.
13867
13868 2002-09-04 Akim Demaille <akim@epita.fr>
13869
13870 * src/assoc.c, src/closure.c, src/gram.c, src/injections.c,
13871 * src/lalr.c, src/LR0.c, src/relation.c, src/tables.c: Don't
13872 translate maintainer only messages.
13873
13874 2002-08-12 Paul Eggert <eggert@twinsun.com>
13875
13876 Version 1.49b.
13877
13878 * Makefile.am (SUBDIRS): Remove intl.
13879 (DISTCLEANFILES): Remove.
13880 * NEWS: Mention that GNU M4 is now required. Clarify what is
13881 meant by "larger grammars". Mention the pt_BR translation.
13882 * configure.in (AC_CHECK_DECLS): Add getenv, getopt.
13883 (AM_GNU_GETTEXT_VERSION): New macro, replacing GETTEXT_VERSION var.
13884 Bump version from 0.11.2 to 0.11.5.
13885 (BISON_PREREQ_STAGE): Remove.
13886 (AM_GNU_GETTEXT): Use external gettext.
13887 (AC_OUTPUT): Remove intl/Makefile.
13888
13889 * config/depcomp, config/install-sh: Sync with Automake 1.6.3.
13890
13891 * data/glr.c: Include string.h, for strlen.
13892 (yyreportParseError): Use size_t for yysize.
13893 (yy_yypstack): No longer nested inside yypstates, as nested
13894 functions are not portable. Do not assume size_t is the
13895 same width as int.
13896 (yypstates): Do not assume that ptrdiff_t is the same width
13897 as int, and similarly for yyposn and YYINDEX.
13898
13899 * data/yacc.c: Fix comment about `$$ = $1': it can copy garbage.
13900
13901 * lib/Makefile.am (INCLUDES): Do not include from the intl
13902 directory, which has been removed.
13903 * src/Makefile.am (INCLUDES): Likewise.
13904
13905 * lib/Makefile.am (libbison_a_SOURCES): Add unlocked-io.h.
13906 (bitsets_sources, additional_bitsets_sources, timevars_sources):
13907 New vars.
13908
13909 * lib/Makefile.am (libbison_a_SOURCES): Avoid +=, a GNU make extension.
13910 * tests/Makefile.am (EXTRA_DIST): Likewise.
13911
13912 * lib/abitset.c (abitset_reverse_list, ebitset_reverse_list):
13913 Do not assume that bitset_windex is the same width as unsigned.
13914
13915 * lib/abitset.c (abitset_unused_clear): Do not assume that
13916 bitset_word is the same width as int.
13917 * lib/bbitset.h (BITSET_INDEX_MAX, BITSET_MSB): Likewise.
13918 * lib/bitset.h (bitset_set, bitset_reset): Likewise.
13919 * lib/bitset_stats.c (bitset_stats_set, bitset_stats_reset): Likewise.
13920 * lib/ebitset.c (ebitset_set, ebitset_reset): Likewise.
13921 * lib/lbitset.c (lbitset_set, lbitset_reset): Likewise.
13922
13923 * lib/abitset.c (abitset_op1): Use -1, not ~0, as memset arg (for
13924 portability to one's complement hosts!).
13925 * lib/ebitset.c (ebitset_op1): Likewise.
13926 * lib/lbitset.c (lbitset_op1): Likewise.
13927
13928 * lib/argmatch.c, lib/quotearg.c, quotearg.h: Sync with GNU tar.
13929 * lib/argmatch.h, lib/basename.c, lib/dirname.c, lib/dirname.h,
13930 lib/hash.c, lib/hash.h, lib/strnlen.c, lib/xmalloc.c:
13931 Sync with fileutils.
13932 * lib/error.c, lib/getopt.c, lib/getopt.h, lib/getopt1.c,
13933 lib/gettext.h: Sync with diffutils.
13934
13935 * lib/memrchr.c, lib/mkstemp.c, lib/strchr.c, lib/strnlen.c,
13936 lib/strspn.c, lib/tempname.c: Use GPL, not LGPL.
13937
13938 * lib/obstack.c, lib/obstack.h: Sync with fileutils, except use
13939 PROTOTYPES to check for prototypes, and "defined __STDC__" to
13940 check for void *.
13941
13942 * lib/bbitset.h (BITSET_WORD_BITS): Now of type unsigned, not
13943 size_t; the old version tried to do this but casted improperly.
13944 (bitset_bindex, bitset_windex): Now size_t, not unsigned long.
13945 (bitset_test): Now returns int, not unsigned long.
13946
13947 * lib/bitset_stats.c: Include "gettext.h".
13948 (_): New macro.
13949 (bitset_stats_set, bitset_stats_reset, bitset_stats_test): Don't
13950 name locals "index", as it generates unnecessary warnings on some
13951 hosts that have an "index" function.
13952
13953 * lib/bitset_stats.c (bitset_stats_print_1, bitset_stats_print,
13954 bitset_stats_read, bitset_stats_write): Wrap strings in _() if
13955 they need translation.
13956 * src/LR0.c (state_list_append, new_itemsets, get_state,
13957 append_states, generate_states): Likewise.
13958 * src/assoc.c (assoc_to_string): Likewise.
13959 * src/closure.c (print_closure, set_firsts, closure): Likewise.
13960 * src/gram.c (grammar_dump): Likewise.
13961 * src/injections.c (injections_compute): Likewise.
13962 * src/lalr.c (lookaheads_print): Likewise.
13963 * src/relation.c (relation_transpose): Likewise.
13964 * src/scan-gram.l: Likewise.
13965 * src/tables.c (table_grow, pack_vector): Likewise.
13966
13967 * m4/Makefile.am (EXTRA_DIST): Remove codeset.m4,
13968 glibc21.m4, isc-posix.m4 lcmessage.m4, stage.m4.
13969 * m4/malloc.m4, m4/realloc.m4: Sync with diffutils.
13970 * m4/mbstate_t.m4: Sync with fileutils.
13971 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): AC_MBSTATE_T -> AC_TYPE_MBSTATE_T.
13972
13973 * po/LINGUAS: Add pt_BR.
13974 * po/POTFILES.in: Add src/assoc.c, src/closure.c, src/gram.c,
13975 src/main.c, src/relation.c, src/state.c, lib/bitset_stats.c,
13976 lib/timevar.c.
13977 Use src/parse-gram.y instead of src/parse-gram.c, as the gettext
13978 manual recommends.
13979 Similarly, use src/scan-gram.l instead of src/scan-gram.c.
13980
13981 * src/complain.c (strerror_r): Remove decl; not needed.
13982 (strerror): Use same pattern as ../lib/error.c.
13983
13984 * src/files.c, src/files.h (compute_header_macro): Remove; unused.
13985
13986 * src/gram.c (grammar_dump): Do not assume ptrdiff_t fits in int.
13987
13988 * src/main.c (main): Cast result of bindtextdomain and textdomain
13989 to void, to avoid a GCC warning when --disable-nls is in effect.
13990
13991 * src/scan-gram.l: Use strings rather than escapes when possible,
13992 to minimize the number of warnings from xgettext.
13993 (handle_action_dollar, handle_action_at): Don't use isdigit,
13994 as it mishandles negative chars and it may not work as expected
13995 outside the C locale.
13996
13997 * src/symtab.c (symbol_get): Don't cast LHS of an assignment;
13998 this is a GCC extension and is not portable to other compilers.
13999
14000 * src/system.h (alloca): Use same pattern as ../lib/error.c.
14001 Do not include <ctype.h>; no longer needed.
14002 Do not include <malloc.h>; no longer needed (and generates
14003 warnings on OpenBSD 3.0).
14004
14005 * tests/cxx-type.at (yylex): Do not pass signed char to isupper;
14006 it's not portable.
14007
14008 * tests/regression.at: Do not use 'cc -c input.c -o input';
14009 Sun C rejects this. Instead, use 'cc -c input.c -o input.o'.
14010
14011 * tests/synclines.at (AC_SYNCLINES_COMPILE): Accept any nonzero
14012 exit status as failure, not just exit status 1. Sun C exits
14013 with status 2 sometimes.
14014
14015 * tests/torture.at (AT_INCREASE_DATA_SIZE): New macro.
14016 Use it for the two large tests.
14017
14018 2002-08-02 Akim Demaille <akim@epita.fr>
14019
14020 * src/conflicts.c (conflicts_output): Don't output rules never
14021 reduced here, since anyway that computation doesn't work.
14022 * src/gram.h, src/gram.h (rule_filter_t, rule_useful_p)
14023 (rule_useless_p, rule_never_reduced_p): New.
14024 (grammar_rules_partial_print): Use a filter instead of a range.
14025 Display the title only if needed.
14026 (grammar_rules_print): Adjust.
14027 (grammar_rules_never_reduced_report): New.
14028 * src/tables.c (action_row): Move the computation of rules never
14029 reduced to...
14030 (token_actions): here.
14031 * src/main.c (main): Make the parser before making the report, so
14032 that rules never reduced are computed.
14033 Call grammar_rules_never_reduced_report.
14034 * src/print.c (print_results): Report rules never reduced.
14035 * tests/conflicts.at, tests/reduce.at: Adjust.
14036
14037 2002-08-01 Akim Demaille <akim@epita.fr>
14038
14039 Instead of attaching lookaheads and duplicating the rules being
14040 reduced by a state, attach the lookaheads to the reductions.
14041
14042 * src/state.h (state_t): Remove the `lookaheads',
14043 `lookaheads_rule' member.
14044 (reductions_t): Add a `lookaheads' member.
14045 Use a regular array for the `rules'.
14046 * src/state.c (reductions_new): Initialize the lookaheads member
14047 to 0.
14048 (state_rule_lookaheads_print): Adjust.
14049 * src/state.h, src/state.c (state_reductions_find): New.
14050 * src/conflicts.c (resolve_sr_conflict, set_conflicts)
14051 (count_rr_conflicts): Adjust.
14052 * src/lalr.c (LArule): Remove.
14053 (add_lookback_edge): Adjust.
14054 (state_lookaheads_count): New.
14055 (states_lookaheads_initialize): Merge into...
14056 (initialize_LA): this.
14057 (lalr_free): Adjust.
14058 * src/main.c (main): Don't free nullable and derives too early: it
14059 is used by --verbose.
14060 * src/print.c, src/print_graph.c, src/tables.c: Adjust.
14061
14062 2002-08-01 Akim Demaille <akim@epita.fr>
14063
14064 * src/derives.h, src/derives.c (derives): A `rule_t***' instead of
14065 `rule_number_t**'.
14066 (set_derives, free_derives): Rename as...
14067 (derives_compute, derives_free): this.
14068 Adjust all dependencies.
14069 * src/nullable.c (set_nullable, free_nullable): Rename as...
14070 (nullable_compute, nullable_free): these.
14071 (rule_list_t): Store rule_t *, not rule_number_t.
14072 * src/state.c (state_rule_lookaheads_print): Directly compare rule
14073 pointers, instead of their numbers.
14074 * src/main.c (main): Call nullable_free, and derives_free earlier,
14075 as they were lo longer used.
14076
14077 2002-08-01 Akim Demaille <akim@epita.fr>
14078
14079 * lib/timevar.c (get_time): Include children time.
14080 * src/lalr.h (LA, LArule): Don't export them: used with the
14081 state_t.
14082 * src/lalr.c (LA, LArule): Static.
14083 * src/lalr.h, src/lalr.c (lalr_free): New.
14084 * src/main.c (main): Call it.
14085 * src/tables.c (pack_vector): Check whether loc is >= to the
14086 table_size, not >.
14087 (pack_tables): Don't free froms, tos, conflict_tos, and pos...
14088 (tables_generate): do it, since that's also it which allocates
14089 them.
14090 Don't free LA and LArule, main does.
14091
14092 2002-07-31 Akim Demaille <akim@epita.fr>
14093
14094 Separate parser tables computation and output.
14095
14096 * src/output.c (nvectors, base_t, base, base_ninf, conflict_table)
14097 (conflict_list, conflict_list_cnt, table, check, table_ninf)
14098 (yydefgoto, yydefact, high): Move to...
14099 * src/tables.h, src/tables.c: here.
14100 * src/output.c (vector_number_t, VECTOR_NUMBER_MAX)
14101 (VECTOR_NUMBER_MIN, state_number_to_vector_number)
14102 (symbol_number_to_vector_number, nvectors, BASE_MAX, BASE_MIN)
14103 (froms, tos, conflict_tos, tally, width, action_t, ACTION_MAX)
14104 (ACTION_MIN, actrow, order, nentries, pos, conflrow)
14105 (conflict_list_free, table_size, lowzero, table_grow, conflict_row)
14106 (action_row, save_row, token_actions, save_column, default_goto)
14107 (goto_actions, sort_actions, matching_state, pack_vector)
14108 (table_ninf_remap, pack_table, prepare_actions): Move to...
14109 * src/tables.c: here.
14110 * src/tables.h, src/tables.c(tables_generate, tables_free): New.
14111 * src/output.c (token_actions, output_base, output_conflicts)
14112 (output_check): Merge into...
14113 (prepare_actions): this.
14114 (actions_output): Rename as...
14115 (user_actions_output): this.
14116 * src/main.c (main): Call tables_generate and tables_free.
14117
14118 2002-07-31 Akim Demaille <akim@epita.fr>
14119
14120 Steal GCC's --time-report support.
14121
14122 * lib/timevar.c, lib/timevar.h, lib/timevar.def: New,
14123 stolen/adjusted from GCC.
14124 * m4/stage.m4: Remove time related checks.
14125 * m4/timevar.m4: New.
14126 * configure.in: Adjust.
14127 * src/system.h: Adjust to using timevar.h.
14128 * src/getargs.h, src/getargs.c: Support trace_time for
14129 --trace=time.
14130 * src/main.c (stage): Remove.
14131 (main): Replace `stage' invocations with timevar calls.
14132 * src/output.c: Insert pertinent timevar calls.
14133
14134 2002-07-31 Akim Demaille <akim@epita.fr>
14135
14136 Let --trace have arguments.
14137
14138 * src/getargs.h (enum trace_e): New.
14139 * src/getargs.c (trace_args, trace_types, trace_argmatch): New.
14140 (long_options, short_options): --trace/-T takes an optional
14141 argument.
14142 Change all the uses of trace_flag to reflect the new flags.
14143 * tests/sets.at (Firsts, Nullable, Broken Closure): Use --trace=sets.
14144
14145 Strengthen `stage' portability.
14146
14147 * m4/stage.m4 (BISON_PREREQ_STAGE): New.
14148 * configure.in: Use it.
14149 Don't check for malloc.h and sys/times.h.
14150 * src/system.h: Include them when appropriate.
14151 * src/main.c (stage): Compile only when mallinfo, struct mallinfo,
14152 times and struct tms are available.
14153
14154 2002-07-30 Akim Demaille <akim@epita.fr>
14155
14156 In verbose parse error message, don't report `error' as an
14157 expected token.
14158 * tests/actions.at (Printers and Destructors): Adjust.
14159 * tests/calc.at (Calculator $1): Adjust.
14160 * data/yacc.c, data/glr.c, data/lalr1.c: When making the verbose
14161 error message, do not report the parser accepts the error token in
14162 that state.
14163
14164 2002-07-30 Akim Demaille <akim@epita.fr>
14165
14166 Normalize conflict related messages.
14167
14168 * src/complain.h, src/complain.c (warn, complain): New.
14169 * src/conflicts.c (conflicts_print): Use them.
14170 (conflict_report_yacc): New, extracted from...
14171 (conflicts_print): here.
14172 * tests/conflicts.at, tests/existing.at: Adjust.
14173
14174 2002-07-30 Akim Demaille <akim@epita.fr>
14175
14176 Report rules which are never reduced by the parser: those hidden
14177 by conflicts.
14178
14179 * src/LR0.c (save_reductions): Don't make the final state too
14180 different: save its reduction (accept) instead of having a state
14181 without any action (no shift or goto, no reduce).
14182 Note: the final state is now a ``regular'' state, i.e., the
14183 parsers now contain `reduce 0' as default reduction.
14184 Nevertheless, since they decide to `accept' when yystate =
14185 final_state, they still will not reduce rule 0.
14186 * src/print.c (print_actions, print_reduction): Adjust.
14187 * src/output.c (action_row): Track reduced rules.
14188 (token_actions): Report rules never reduced.
14189 * tests/conflicts.at, tests/regression.at: Adjust.
14190
14191 2002-07-30 Akim Demaille <akim@epita.fr>
14192
14193 `stage' was accidently included in a previous patch.
14194 Initiate its autoconfiscation.
14195
14196 * configure.in: Look for malloc.h and sys/times.h.
14197 * src/main.c (stage): Adjust.
14198 Report only when trace_flag.
14199
14200 2002-07-29 Akim Demaille <akim@epita.fr>
14201
14202 * src/state.h, src/state.c (transitions_t): Holds state_t*'s, not
14203 state_number_t.
14204 (errs_t): symbol_t*, not symbol_number_t.
14205 (reductions_t): rule_t*, not rule_number_t.
14206 (FOR_EACH_SHIFT): New.
14207 * src/LR0.c, src/conflicts.c, src/lalr.c, src/output.c
14208 * src/print.c, src/print_graph.c: Adjust.
14209
14210 2002-07-29 Akim Demaille <akim@epita.fr>
14211
14212 Use $accept and $end, as BYacc and BTYacc do, instead of $axiom and $.
14213
14214 * src/symtab.h, src/symtab.c (eoftoken, axiom): Rename as...
14215 (endtoken, accept): these.
14216 * src/reader.c (reader): Set endtoken's default tag to "$end".
14217 Set undeftoken's tag to "$undefined" instead of "$undefined.".
14218 * doc/bison.texinfo (Table of Symbols): Mention $accept and $end.
14219 Adjust.
14220
14221 2002-07-29 Akim Demaille <akim@epita.fr>
14222
14223 * src/reduce.c (reduce_grammar): When the language is empty,
14224 complain about the start symbol, not the axiom.
14225 Use its location.
14226 * tests/reduce.at (Empty Language): New.
14227
14228 2002-07-26 Akim Demaille <akim@epita.fr>
14229
14230 * src/reader.h, src/reader.c (gram_error): ... can't get
14231 yycontrol without making too strong assumptions on the parser
14232 itself.
14233 * src/output.c (prepare_tokens): Use the real 0th value of
14234 token_translations instead of `0'.
14235 * src/parse-gram.y (yyerror): Don't rely on yycontrol being
14236 visible here.
14237 * data/yacc.c (yyreport_parse_error): Rename yylocation as yylloc
14238 for the time being: %locations ought to provide it to yyerror.
14239
14240 2002-07-25 Akim Demaille <akim@epita.fr>
14241
14242 * src/output.c (prepare_tokens): Go up to ntokens, not ntokens + 1.
14243 * doc/bison.texinfo (Decl Summary): s/$illegal/$undefined./.
14244 * tests/regression.at (Web2c Actions): Adjust.
14245
14246 2002-07-25 Akim Demaille <akim@epita.fr>
14247
14248 Stop storing rules from 1 to nrules + 1.
14249
14250 * src/LR0.c, src/closure.c, src/derives.c, src/gram.c, src/lalr.c
14251 * src/nullable.c, src/output.c, src/print.c, src/reader.c
14252 * src/reduce.c: Allocate and free from &rules[0], not &rules[1].
14253 Iterate from 0 to nrules.
14254 Use rule_number_as_item_number and item_number_as_rule_number.
14255 Adjust to `derive' now containing possibly 0.
14256 * src/gram.h (rule_number_as_item_number, item_number_as_rule_number):
14257 Handle the `- 1' part in rule numbers from/to item numbers.
14258 * src/conflicts.c (log_resolution): Fix the message which reversed
14259 shift and reduce.
14260 * src/output.c (action_row): Initialize default_rule to -1.
14261 (token_actions): Adjust.
14262 * tests/sets.at (Nullable, Firsts): Fix the previously bogus
14263 expected output.
14264 * tests/conflicts.at (Resolved SR Conflicts): Likewise.
14265
14266 2002-07-25 Akim Demaille <akim@epita.fr>
14267
14268 * data/c.m4 (b4_c_function, b4_c_ansi_args, b4_c_ansi_arg)
14269 (b4_c_knr_arg_names, b4_c_knr_arg_name, b4_c_knr_arg_decls)
14270 (b4_c_knr_arg_decl): New.
14271 * data/yacc.c: Use it to define yysymprint, yydestruct, and
14272 yyreport_parse_error.
14273
14274 2002-07-25 Akim Demaille <akim@epita.fr>
14275
14276 * data/yacc.c (yyreport_parse_error): New, extracted from...
14277 (yyparse): here.
14278 (yydestruct, yysymprint): Move above yyparse.
14279 Be K&R compliant.
14280
14281 2002-07-25 Akim Demaille <akim@epita.fr>
14282
14283 * data/c.m4 (b4_ints_in, b4_int_type, b4_int_type_for): New,
14284 replace...
14285 (b4_sint_type, b4_uint_type): these.
14286 * data/yacc.c, data/glr.c, data/lalr1.cc: Use b4_int_type_for.
14287 * tests/regression.at (Web2c Actions): Adjust.
14288
14289 2002-07-25 Akim Demaille <akim@epita.fr>
14290
14291 * src/gram.h (TIEM_NUMBER_MAX): New.
14292 (item_number_of_rule_number, rule_number_of_item_number): Rename
14293 as...
14294 (rule_number_as_item_number, item_number_as_rule_number): these.
14295 Adjust dependencies.
14296 * src/output.c (vector_number_t, VECTOR_NUMBER_MAX)
14297 (VECTOR_NUMBER_MIN, state_number_to_vector_number)
14298 (symbol_number_to_vector_number): New.
14299 (order): Of vector_number_t* type.
14300 (base_t, BASE_MAX, BASE_MIN): New.
14301 (froms, tos, width, pos, check): Of base_t type.
14302 (action_number_t, ACTION_MIN, ACTION_MAX): New.
14303 (actrow): Of action_number_t type.
14304 (conflrow): Of unsigned int type.
14305 (table_ninf, base_ninf): New.
14306 (GENERATE_MUSCLE_INSERT_TABLE): Also output the `*_min' value.
14307 (muscle_insert_int_table, muscle_insert_base_table)
14308 (muscle_insert_rule_number_table): New.
14309 (prepare_tokens): Output `toknum' as int_table.
14310 (action_row): Returns a rule_number_t.
14311 Use ACTION_MIN, not SHRT_MIN.
14312 (token_actions): yydefact is rule_number_t*.
14313 (table_ninf_remap): New.
14314 (pack_table): Use it for `base' and `table'.
14315 * data/yacc.c, data/glr.c, data/lalr1.cc (YYFLAG): Remove,
14316 replaced with...
14317 (YYPACT_NINF, YYTABLE_NINF): these.
14318 (yypact, yytable): Compute their types instead of hard-coded
14319 `short'.
14320 * tests/regression.at (Web2c Actions): Adjust.
14321
14322 2002-07-19 Akim Demaille <akim@epita.fr>
14323
14324 * src/scan-gram.l (id): Can start with an underscore.
14325
14326 2002-07-16 Akim Demaille <akim@epita.fr>
14327
14328 * src/assoc.c, src/asssoc.h (assoc_t, assoc_to_string): New.
14329 Adjust all former `associativity' dependencies.
14330 * src/symtab.c (symbol_new): Default associativity is `undef', not
14331 `right'.
14332 (symbol_check_alias_consistence): Adjust.
14333
14334 2002-07-09 Akim Demaille <akim@epita.fr>
14335
14336 * doc/bison.texinfo: Properly set the ``header'' part.
14337 Use @dircategory ``GNU programming tools'' as per Texinfo's
14338 documentation.
14339 Use @copying.
14340
14341 2002-07-09 Akim Demaille <akim@epita.fr>
14342
14343 * lib/quotearg.h: Protect against multiple inclusions.
14344 * src/location.h (location_t): Add a `file' member.
14345 (LOCATION_RESET, LOCATION_PRINT): Adjust.
14346 * src/complain.c (warn_at, complain_at, fatal_at): Drop
14347 `error_one_per_line' support.
14348
14349 2002-07-09 Akim Demaille <akim@epita.fr>
14350
14351 * src/complain.h, src/complain.c (warn, complain): Remove, unused.
14352 * src/reader.c (lineno): Remove.
14353 Adjust all dependencies.
14354 (get_merge_function): Take a location and use complain_at.
14355 * src/symtab.h, src/symtab.c (symbol_make_alias): Likewise.
14356 * tests/regression.at (Invalid inputs, Mixing %token styles):
14357 Adjust.
14358
14359 2002-07-09 Akim Demaille <akim@epita.fr>
14360
14361 * src/parse-gram.y (rules_or_grammar_declaration): Add an error
14362 recovery rule, and forbid extensions when --yacc.
14363 (gram_error): Use complain_at.
14364 * src/reader.c (reader): Exit if there were parse errors.
14365
14366 2002-07-09 Akim Demaille <akim@epita.fr>
14367
14368 * tests/synclines.at (AT_SYNCLINES_COMPILE): New.
14369 (AT_TEST_SYNCLINE): Adjust to unusual GCC outputs.
14370 Reported by R Blake <blakers@mac.com>.
14371
14372 2002-07-09 Akim Demaille <akim@epita.fr>
14373
14374 * data/yacc.c: Output the copyright notive in the header.
14375
14376 2002-07-03 Akim Demaille <akim@epita.fr>
14377
14378 * src/output.c (froms, tos): Are state_number_t.
14379 (save_column): sp, sp1, and sp2 are state_number_t.
14380 (prepare): Rename `final' as `final_state_number', `nnts' as
14381 `nterms_number', `nrules' as `rules_number', `nstates' as
14382 `states_number', and `ntokens' as `tokens_number'. Remove `nsym',
14383 unused.
14384 * data/yacc.c, data/glr.c, data/lalr1.cc: Adjust.
14385 * data/lalr1.cc (nsym_): Remove, unused.
14386
14387 2002-07-03 Akim Demaille <akim@epita.fr>
14388
14389 * src/lalr.h, src/lalr.c (goto_number_t): New.
14390 * src/lalr.c (goto_list_t): New.
14391 Propagate them.
14392 * src/nullable.c (rule_list_t): New.
14393 Propagate.
14394 * src/types.h: Remove.
14395
14396 2002-07-03 Akim Demaille <akim@epita.fr>
14397
14398 * src/closure.c (print_fderives): Use rule_rhs_print.
14399 * src/derives.c (print_derives): Use rule_rhs_print.
14400 (rule_list_t): New, replaces `shorts'.
14401 (set_derives): Add comments.
14402 * tests/sets.at (Nullable, Firsts): Adjust.
14403
14404 2002-07-03 Akim Demaille <akim@epita.fr>
14405
14406 * src/output.c (prepare_actions): Free `tally' and `width'.
14407 (prepare_actions): Allocate and free `order'.
14408 * src/symtab.c (symbols_free): Free `symbols'.
14409 * src/scan-gram.l (scanner_free): Clear Flex's scanners memory.
14410 * src/output.c (m4_invoke): Move to...
14411 * src/scan-skel.l: here.
14412 (<<EOF>>): Close yyout, and free its name.
14413
14414 2002-07-03 Akim Demaille <akim@epita.fr>
14415
14416 Fix some memory leaks, and fix a bug: state 0 was examined twice.
14417
14418 * src/LR0.c (new_state): Merge into...
14419 (state_list_append): this.
14420 (new_states): Merge into...
14421 (generate_states): here.
14422 (set_states): Don't ensure a proper `errs' state member here, do it...
14423 * src/conflicts.c (conflicts_solve): here.
14424 * src/state.h, src/state.c: Comment changes.
14425 (state_t): Rename member `shifts' as `transitions'.
14426 Adjust all dependencies.
14427 (errs_new): For consistency, also take the values as argument.
14428 (errs_dup): Remove.
14429 (state_errs_set): New.
14430 (state_reductions_set, state_transitions_set): Assert that no
14431 previous value was assigned.
14432 (state_free): New.
14433 (states_free): Use it.
14434 * src/conflicts.c (resolve_sr_conflict): Don't use an `errs_t' as
14435 temporary storage: use `errs' and `nerrs' as elsewhere.
14436 (set_conflicts): Allocate and free this `errs'.
14437
14438 2002-07-02 Akim Demaille <akim@epita.fr>
14439
14440 * lib/libiberty.h: New.
14441 * lib: Update the bitset implementation from upstream.
14442 * src/closure.c, src/lalr.c, src/output.c, src/print_graph.c,
14443 * src/state.c: Use BITSET_FOR_EACH, not BITSET_EXECUTE.
14444 * src/main.c: Adjust bitset stats calls.
14445
14446 2002-07-01 Paul Eggert <eggert@twinsun.com>
14447
14448 * src/scan-gram.l (<SC_ESCAPED_CHARACTER>): Convert to unsigned
14449 char, so that negative chars don't collide with $.
14450
14451 2002-06-30 Akim Demaille <akim@epita.fr>
14452
14453 Have the GLR tests be `warning' checked, and fix the warnings.
14454
14455 * data/glr.c (YYFPRINTF): Always define it, not only when YYDEBUG
14456 (yyuserAction, yyreportAmbiguity): `Use' all the arguments.
14457 (yyremoveDeletes): `yyi' and `yyj' are size_t.
14458 Use YYFPRINTF when under if (YYDEBUG) to avoid empty `if' bodies.
14459 (yyaddDeferredAction): static.
14460 (yyglrReduce): yyi, yyk, amd yyposn are size_t.
14461 (yyreportParseError): yyprefix is const.
14462 yytokenp is used only when verbose.
14463 (yy__GNUC__): Replace with __GNUC__.
14464 (yypdumpstack): yyi is size_t.
14465 (yypreference): Un-yy local variables and arguments, to avoid
14466 clashes with `yyr1'. Anyway, we are not in the user name space.
14467 (yytname_size): be an int, as is compared with ints.
14468 * tests/testsuite.at (AT_COMPILE, AT_PARSER_CHECK): New.
14469 Use them.
14470 * tests/cxx-gram.at: Use quotation to protect $1.
14471 Use AT_COMPILE to enable warnings hunts.
14472 Prototype yylex and yyerror.
14473 `Use' argc.
14474 Include `string.h', not `strings.h'.
14475 Produce and prototype stmtMerge only when used.
14476 yylex takes a location.
14477
14478 2002-06-30 Akim Demaille <akim@epita.fr>
14479
14480 We spend a lot of time in quotearg, in particular when --verbose.
14481
14482 * src/symtab.c (symbol_get): Store a quoted version of the key.
14483 (symbol_tag_get, symbol_tag_get_n, symbol_tag_print): Remove.
14484 Adjust all callers.
14485
14486 2002-06-30 Akim Demaille <akim@epita.fr>
14487
14488 * src/state.h (reductions_t): Rename member `nreds' as num.
14489 (errs_t): Rename members `nerrs' and `errs' as `num' and `symbols'.
14490 * src/state.c (ERRS_ALLOC, REDUCTIONS_ALLOC): Use the correct types.
14491
14492 2002-06-30 Akim Demaille <akim@epita.fr>
14493
14494 * src/state.h, src/state.c (shift_t, SHIFT_SYMBOL, SHIFT_IS_SHIFT)
14495 (SHIFT_IS_GOTO, SHIFT_IS_ERROR, SHIFT_DISABLE, SHIFT_IS_DISABLED)
14496 (shifts_to): Rename as...
14497 (transition_t, TRANSITION_SYMBOL, TRANSITION_IS_TRANSITION)
14498 (TRANSITION_IS_GOTO, TRANSITION_IS_ERROR, TRANSITION_DISABLE)
14499 (TRANSITION_IS_DISABLED, transitions_to): these.
14500
14501 2002-06-30 Akim Demaille <akim@epita.fr>
14502
14503 * src/print.c (print_shifts, print_gotos): Merge into...
14504 (print_transitions): this.
14505 (print_transitions, print_errs, print_reductions): Align the
14506 lookaheads columns.
14507 (print_core, print_transitions, print_errs, print_state,
14508 print_grammar): Output empty lines separator before, not after.
14509 (state_default_rule_compute): Rename as...
14510 (state_default_rule): this.
14511 * tests/conflicts.at (Defaulted Conflicted Reduction),
14512 (Unresolved SR Conflicts, Resolved SR Conflicts): Adjust.
14513 * tests/regression.at (Rule Line Numbers, Web2c Report): Adjust.
14514
14515 2002-06-30 Akim Demaille <akim@epita.fr>
14516
14517 Display items as we display rules.
14518
14519 * src/gram.h, src/gram.c (rule_lhs_print): New.
14520 * src/gram.c (grammar_rules_partial_print): Use it.
14521 * src/print.c (print_core): Likewise.
14522 * tests/conflicts.at (Defaulted Conflicted Reduction),
14523 (Unresolved SR Conflicts): Adjust.
14524 (Unresolved SR Conflicts): Adjust and rename as...
14525 (Resolved SR Conflicts): this, as was meant.
14526 * tests/regression.at (Web2c Report): Adjust.
14527
14528 2002-06-30 Akim Demaille <akim@epita.fr>
14529
14530 * src/print.c (state_default_rule_compute): New, extracted from...
14531 (print_reductions): here.
14532 Pessimize, but clarify the code.
14533 * tests/conflicts.at (Defaulted Conflicted Reduction): New.
14534
14535 2002-06-30 Akim Demaille <akim@epita.fr>
14536
14537 * src/output.c (action_row): Let default_rule be always a rule
14538 number.
14539
14540 2002-06-30 Akim Demaille <akim@epita.fr>
14541
14542 * src/closure.c (print_firsts, print_fderives, closure):
14543 Use BITSET_EXECUTE.
14544 * src/lalr.c (lookaheads_print): Likewise.
14545 * src/state.c (state_rule_lookaheads_print): Likewise.
14546 * src/print_graph.c (print_core): Likewise.
14547 * src/print.c (print_reductions): Likewise.
14548 * src/output.c (action_row): Likewise.
14549 Use SHIFT_IS_DISABLED, SHIFT_IS_SHIFT and SHIFT_SYMBOL.
14550
14551 2002-06-30 Akim Demaille <akim@epita.fr>
14552
14553 * src/print_graph.c: Use report_flag.
14554
14555 2002-06-30 Akim Demaille <akim@epita.fr>
14556
14557 * src/lalr.c (traverse, digraph, matrix_print, transpose): Move
14558 to...
14559 * src/relation.h, src/relation.c (traverse, relation_digraph)
14560 (relation_print, relation_transpose): New.
14561
14562 2002-06-30 Akim Demaille <akim@epita.fr>
14563
14564 * src/state.h, src/state.c (shifts_to): New.
14565 * src/lalr.c (build_relations): Use it.
14566
14567 2002-06-30 Akim Demaille <akim@epita.fr>
14568
14569 * src/gram.h (rule_number_t, RULE_NUMBER_MAX, int_of_rule_number)
14570 (item_number_of_rule_number, rule_number_of_item_number): New.
14571 * src/LR0.c, src/closure.c, src/derives.c, src/derives.h,
14572 * src/gram.c, src/lalr.c, src/nullable.c, src/output.c, src/print.c,
14573 * src/print_graph.c, src/reader.c, src/reduce.c, src/reduce.h:
14574 Propagate their use.
14575 Much remains to be done, in particular wrt `shorts' from types.h.
14576
14577 2002-06-30 Akim Demaille <akim@epita.fr>
14578
14579 * src/symtab.c (symbol_new): Initialize the `printer' member.
14580
14581 2002-06-30 Akim Demaille <akim@epita.fr>
14582
14583 * src/LR0.c (save_reductions): Remove, replaced by...
14584 * src/state.h, src/state.c (state_reductions_set): New.
14585 (reductions, errs): Rename as...
14586 (reductions_t, errs_t): these.
14587 Adjust all dependencies.
14588
14589 2002-06-30 Akim Demaille <akim@epita.fr>
14590
14591 * src/LR0.c (state_list_t, state_list_append): New.
14592 (first_state, last_state): Now symbol_list_t.
14593 (this_state): Remove.
14594 (new_itemsets, append_states, save_reductions): Take a state_t as
14595 argument.
14596 (set_states, generate_states): Adjust.
14597 (save_shifts): Remove, replaced by...
14598 * src/state.h, src/state.c (state_shifts_set): New.
14599 (shifts): Rename as...
14600 (shifts_t): this.
14601 Adjust all dependencies.
14602 * src/state.h (state_t): Remove the `next' member.
14603
14604 2002-06-30 Akim Demaille <akim@epita.fr>
14605
14606 * src/vcg.c (quote): Use slot 2, since we often pass symbol tag
14607 escaped in slot 0.
14608
14609 2002-06-30 Akim Demaille <akim@epita.fr>
14610
14611 Use hash.h for the state hash table.
14612
14613 * src/LR0.c (STATE_HASH_SIZE, state_hash): Remove.
14614 (allocate_storage): Use state_hash_new.
14615 (free_storage): Use state_hash_free.
14616 (new_state, get_state): Adjust.
14617 * src/lalr.h, src/lalr.c (states): Move to...
14618 * src/states.h (state_t): Remove the `link' member, no longer
14619 used.
14620 * src/states.h, src/states.c: here.
14621 (state_hash_new, state_hash_free, state_hash_lookup)
14622 (state_hash_insert, states_free): New.
14623 * src/states.c (state_table, state_compare, state_hash): New.
14624 * src/output.c (output_actions): Do not free states now, since we
14625 still need to know the final_state number in `prepare', called
14626 afterwards. Do it...
14627 * src/main.c (main): here: call states_free after `output'.
14628
14629 2002-06-30 Akim Demaille <akim@epita.fr>
14630
14631 * src/state.h, src/state.c (state_new): New, extracted from...
14632 * src/LR0.c (new_state): here.
14633 * src/state.h (STATE_ALLOC): Move to...
14634 * src/state.c: here.
14635 * src/LR0.h, src/LR0.c (nstates, final_state): Move to...
14636 * src/state.h, src/state.c: here.
14637
14638 2002-06-30 Akim Demaille <akim@epita.fr>
14639
14640 * src/reader.c (gensym): Rename as...
14641 * src/symtab.h, src/symtab.c (dummy_symbol_get): this.
14642 (getsym): Rename as...
14643 (symbol_get): this.
14644
14645 2002-06-30 Akim Demaille <akim@epita.fr>
14646
14647 * src/state.h (state_number_t, STATE_NUMBER_MAX): New.
14648 * src/LR0.c, src/LR0.h, src/conflicts.c, src/lalr.c, src/lalr.h,
14649 * src/output.c, src/print.c, src/print_graph.c: Propagate.
14650 * src/LR0.h, src/LR0.h (final_state): Is a state_t*.
14651
14652 2002-06-30 Akim Demaille <akim@epita.fr>
14653
14654 Make the test suite pass with warnings checked.
14655
14656 * tests/actions.at (Printers and Destructors): Improve.
14657 Avoid unsigned vs. signed issues.
14658 * tests/calc.at: Don't exercise the scanner here, do it...
14659 * tests/input.at (Torturing the Scanner): here.
14660
14661 2002-06-28 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
14662
14663 * data/glr.c: Correct typo in Emacs-mode directive. Slightly
14664 reorganize first lines parallel to yacc.c.
14665
14666 2002-06-28 Akim Demaille <akim@epita.fr>
14667
14668 * data/c.m4 (b4_copyright, b4_sint_type, b4_uint_type, b4_token_define)
14669 (b4_token_enum, b4_token_defines): New, factored from...
14670 * data/lalr1.cc, data/yacc.c, glr.c: here.
14671
14672 2002-06-28 Akim Demaille <akim@epita.fr>
14673
14674 * data/yacc.c (yydestruct, yysymprint): Pacify GCC warnings for
14675 unused variables.
14676 * src/output.c (merger_output): static.
14677
14678 2002-06-28 Akim Demaille <akim@epita.fr>
14679
14680 * src/reader.h: s/grammer_current_rule_merge_set/grammar_.../.
14681 * src/conflicts.c (conflicts_total_count): `i' is unsigned, to
14682 pacify GCC.
14683 * src/output.c (save_row): Initialize all the variables to pacify GCC.
14684
14685 2002-06-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
14686
14687 Accumulated changelog for new GLR parsing features.
14688
14689 * src/conflicts.c (count_total_conflicts): Change name to
14690 conflicts_total_count.
14691 * src/conflicts.h: Ditto.
14692 * src/output.c (token_actions): Use the new name.
14693 (output_conflicts): Change conflp => conflict_list_heads, and
14694 confl => conflict_list for better readability.
14695 * data/glr.c: Use the new names.
14696 * NEWS: Add self to GLR announcement.
14697
14698 * src/reader.c (free_merger_functions): Cleanup: XFREE->free.
14699
14700 * doc/bison.texinfo (GLR Parsers): Make corrections suggested by
14701 Akim Demaille.
14702
14703 * data/bison.glr: Change name to glr.c
14704 * data/glr.c: Renamed from bison.glr.
14705 * data/Makefile.am: Add glr.c
14706
14707 * src/getargs.c:
14708
14709 * src/symlist.h: Add dprec and merger fields to symbol_list_s.
14710 * src/symlist.c (symbol_list_new): Initialize dprec and merger fields.
14711
14712 Originally 2002-06-16 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
14713
14714 * data/bison.glr: Be sure to restore the
14715 current #line when returning to the skeleton contents after having
14716 exposed the input file's #line.
14717
14718 Originally 2002-06-13 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
14719
14720 * data/bison.glr: Bring up to date with changes to bison.simple.
14721
14722 Originally 2002-06-03 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
14723
14724 * data/bison.glr: Correct definitions that use b4_prefix.
14725 Various reformatting.
14726 (GLRStack): Make yychar (in YYPURE case) and yytokenp as part of stack.
14727 (yyreportParseError, yyrecoverParseError, yyprocessOneStack): remove
14728 yytokenp argument; now part of stack.
14729 (yychar): Define to behave as documented.
14730 (yyclearin): Ditto.
14731
14732 Originally 2002-05-14 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
14733
14734 * src/reader.h: Add declaration for free_merger_functions.
14735
14736 * src/reader.c (merge_functions): New variable.
14737 (get_merge_function): New function.
14738 (free_merger_functions): New function.
14739 (readgram): Check for %prec that is not followed by a symbol.
14740 Handle %dprec and %merge declarations.
14741 (packgram): Initialize dprec and merger fields in rules array.
14742
14743 * src/output.c (conflict_tos, conflrow, conflict_table, conflict_list,
14744 conflict_list_cnt, conflict_list_free): New variables.
14745 (table_grow): Also grow conflict_table.
14746 (prepare_rules): Output dprec and merger tables.
14747 (conflict_row): New function.
14748 (action_row): Output conflict lists for GLR parser. Don't use
14749 default reduction in conflicted states for GLR parser so that there
14750 are spaces for the conflict lists.
14751 (save_row): Also save conflict information.
14752 (token_actions): Allocate conflict list.
14753 (merger_output): New function.
14754 (pack_vector): Pack conflict table, too.
14755 (output_conflicts): New function to output yyconflp and yyconfl.
14756 (output_check): Allocate conflict_tos.
14757 (output_actions): Output conflict tables, also.
14758 (output_skeleton): Output b4_mergers definition.
14759 (prepare): Output b4_max_rhs_length definition.
14760 Use 'bison.glr' as default skeleton for GLR parsers.
14761
14762 * src/gram.c (glr_parser): New flag.
14763 (grammar_free): Call free_merger_functions.
14764
14765 * src/conflicts.c (count_rr_conflicts): Augment to optionally count
14766 all pairs of conflicting reductions, rather than just all tokens
14767 causing conflicts. Needed to size conflict tables.
14768 (conflicts_output): Modify call to count_rr_conflicts for new
14769 interface.
14770 (conflicts_print): Ditto.
14771 (count_total_conflicts): New function.
14772
14773 * src/reader.h (merger_list): New type.
14774 (merge_functions): New variable.
14775
14776 * src/lex.h (tok_dprec, tok_merge): New token types.
14777
14778 * src/gram.h (rule_s): Add dprec and merger fields.
14779 (glr_parser): New flag.
14780
14781 * src/conflicts.h (count_total_conflicts): New function.
14782
14783 * src/options.c (option_table): Add %dprec, %merge, and %glr-parser.
14784
14785 * doc/bison.texinfo (Generalized LR Parsing): New section.
14786 (GLR Parsers): New section.
14787 (Language and Grammar): Mention GLR parsing.
14788 (Table of Symbols): Add %dprec, %glr-parser, %merge, GLR
14789 Correct typo ("tge" -> "the").
14790
14791 * data/bison.glr: New skeleton for GLR parsing.
14792
14793 * tests/cxx-gram.at: New tests for GLR parsing.
14794
14795 * tests/testsuite.at: Include cxx-gram.at.
14796
14797 * tests/Makefile.am: Add cxx-gram.at.
14798
14799 * src/parse-gram.y:
14800
14801 * src/scan-gram.l: Add %dprec, %glr-parser, %merge.
14802
14803 * src/parse-gram.y: Grammar for %dprec, %merge, %glr-parser.
14804
14805 2002-06-27 Akim Demaille <akim@epita.fr>
14806
14807 * src/options.h, src/options.c: Remove.
14808 * src/getargs.c (short_options, long_options): New.
14809
14810 2002-06-27 Akim Demaille <akim@epita.fr>
14811
14812 * data/bison.simple, data/bison.c++: Rename as...
14813 * data/yacc.c, data/lalr1.cc: these.
14814 * doc/bison.texinfo (Environment Variables): Remove.
14815
14816 2002-06-25 Raja R Harinath <harinath@cs.umn.edu>
14817
14818 * src/getargs.c (report_argmatch): Initialize strtok().
14819
14820 2002-06-20 Akim Demaille <akim@epita.fr>
14821
14822 * data/bison.simple (b4_symbol_actions): New, replaces...
14823 (b4_symbol_destructor, b4_symbol_printer): these.
14824 (yysymprint): Be sure to call YYPRINT only for tokens, and using
14825 user token numbers.
14826
14827 2002-06-20 Akim Demaille <akim@epita.fr>
14828
14829 * data/bison.simple (yydestructor): Rename as...
14830 (yydestruct): this.
14831
14832 2002-06-20 Akim Demaille <akim@epita.fr>
14833
14834 * src/symtab.h, src/symtab.c (symbol_type_set)
14835 (symbol_destructor_set, symbol_precedence_set): The location is
14836 the last argument.
14837 Adjust all callers.
14838
14839 2002-06-20 Akim Demaille <akim@epita.fr>
14840
14841 * src/parse-gram.y (YYPRINT, yyprint): Don't mess with the parser
14842 internals.
14843 * src/reader.h, src/reader.c (grammar_current_rule_prec_set):
14844 Takes a location.
14845 * src/symtab.h, src/symtab.c (symbol_class_set)
14846 (symbol_user_token_number_set): Likewise.
14847 Adjust all callers.
14848 Promote complain_at.
14849 * tests/input.at (Type Clashes): Adjust.
14850
14851 2002-06-20 Akim Demaille <akim@epita.fr>
14852
14853 * data/bison.simple (YYLEX): Fix the declaration when
14854 %pure-parser.
14855
14856 2002-06-20 Akim Demaille <akim@epita.fr>
14857
14858 * data/bison.simple (yysymprint): Don't print the token number,
14859 just its name.
14860 * tests/actions.at (Destructors): Rename as...
14861 (Printers and Destructors): this.
14862 Also exercise %printer.
14863
14864 2002-06-20 Akim Demaille <akim@epita.fr>
14865
14866 * data/bison.simple (YYDSYMPRINT): New.
14867 Use it to remove many of the #if YYDEBUG/if (yydebug).
14868
14869 2002-06-20 Akim Demaille <akim@epita.fr>
14870
14871 * src/symtab.h, src/symtab.c (symbol_t): printer and
14872 printer_location are new members.
14873 (symbol_printer_set): New.
14874 * src/parse-gram.y (PERCENT_PRINTER): New token.
14875 Handle its associated rule.
14876 * src/scan-gram.l: Adjust.
14877 (handle_destructor_at, handle_destructor_dollar): Rename as...
14878 (handle_symbol_code_at, handle_symbol_code_dollar): these.
14879 * src/output.c (symbol_printers_output): New.
14880 (output_skeleton): Call it.
14881 * data/bison.simple (yysymprint): New. Cannot be named yyprint
14882 since there are already many grammar files with a user `yyprint'.
14883 Replace the calls to YYPRINT to calls to yysymprint.
14884 * tests/calc.at: Adjust.
14885 * tests/torture.at (AT_DATA_STACK_TORTURE): Remove YYPRINT: it was
14886 taking advantage of parser very internal details (stack size!).
14887
14888 2002-06-20 Akim Demaille <akim@epita.fr>
14889
14890 * src/scan-gram.l: Complete the scanner with the missing patterns
14891 to pacify Flex.
14892 Use `quote' and `symbol_tag_get' where appropriate.
14893
14894 2002-06-19 Akim Demaille <akim@epita.fr>
14895
14896 * tests/actions.at (Destructors): Augment to test locations.
14897 * data/bison.simple (yydestructor): Pass it the current location
14898 if locations are enabled.
14899 Prototype only when __STDC__ or C++.
14900 Change the argument names to move into the yy name space: there is
14901 user code here.
14902
14903 2002-06-19 Akim Demaille <akim@epita.fr>
14904
14905 * data/bison.simple (b4_pure_if): New.
14906 Use it instead of #ifdef YYPURE.
14907
14908 2002-06-19 Akim Demaille <akim@epita.fr>
14909
14910 * data/bison.simple (b4_location_if): New.
14911 Use it instead of #ifdef YYLSP_NEEDED.
14912
14913 2002-06-19 Akim Demaille <akim@epita.fr>
14914
14915 Prepare @$ in %destructor, but currently don't bind it in the
14916 skeleton, as %location use is not cleaned up yet.
14917
14918 * src/scan-gram.l (handle_dollar, handle_destructor_at)
14919 (handle_action_at): New.
14920 (handle_at, handle_action_dollar, handle_destructor_dollar): Take
14921 a braced_code_t and a location as additional arguments.
14922 (handle_destructor_dollar): Instead of requiring `b4_eval', just
14923 unquote one when outputting `b4_dollar_dollar'.
14924 Adjust callers.
14925 * data/bison.simple (b4_eval): Remove.
14926 (b4_symbol_destructor): Adjust.
14927 * tests/input.at (Invalid @n): Adjust.
14928
14929 2002-06-19 Zack Weinberg <zack@codesourcery.com>
14930
14931 * doc/bison.texinfo: Document ability to have multiple
14932 prologue sections.
14933
14934 2002-06-18 Akim Demaille <akim@epita.fr>
14935
14936 * src/files.c (compute_base_names): When computing the output file
14937 names from the input file name, strip the directory part.
14938
14939 2002-06-18 Akim Demaille <akim@epita.fr>
14940
14941 * data/bison.simple.new: Comment changes.
14942 Reported by Andreas Schwab.
14943
14944 2002-06-18 Matt Kraai <kraai@alumni.cmu.edu>
14945
14946 * data/bison.simple (yyoverflowlab): #ifndef yyoverflow, so that
14947 there are no `label `yyoverflowlab' defined but not used' warnings
14948 when yyoverflow is defined.
14949
14950 2002-06-18 Akim Demaille <akim@epita.fr>
14951
14952 * src/symtab.h, src/symtab.c (symbol_t): destructor_location is a
14953 new member.
14954 (symbol_destructor_set): Adjust.
14955 * src/output.c (symbol_destructors_output): Output the destructor
14956 locations.
14957 Output the symbol name.
14958 * data/bison.simple (b4_symbol_destructor): Adjust.
14959
14960 2002-06-18 Cris Bailiff <c.bailiff@awayweb.com>
14961 and Akim Demaille <akim@epita.fr>
14962
14963 * data/bison.simple.new (yyerrlab1): Be sure to pop and destroy
14964 what's left on the stack when the error recovery hits EOF.
14965 * tests/actions.at (Destructors): Complete to exercise this case.
14966
14967 2002-06-17 Akim Demaille <akim@epita.fr>
14968
14969 * data/m4sugar/m4sugar.m4 (m4_map): Recognize when the list of
14970 arguments is really empty, not only equal to `[]'.
14971 * src/symtab.h, src/symtab.c (symbol_t): `destructor' is a new
14972 member.
14973 (symbol_destructor_set): New.
14974 * src/output.c (symbol_destructors_output): New.
14975 * src/reader.h (brace_code_t, current_braced_code): New.
14976 * src/scan-gram.l (BRACED_CODE): Use it to branch on...
14977 (handle_dollar): Rename as...
14978 (handle_action_dollar): this.
14979 (handle_destructor_dollar): New.
14980 * src/parse-gram.y (PERCENT_DESTRUCTOR): New.
14981 (grammar_declaration): Use it.
14982 * data/bison.simple (yystos): Is always defined.
14983 (yydestructor): New.
14984 * tests/actions.at (Destructors): New.
14985 * tests/calc.at (_AT_CHECK_CALC_ERROR): Don't rely on egrep.
14986
14987 2002-06-17 Akim Demaille <akim@epita.fr>
14988
14989 * src/symlist.h, src/symlist.c (symbol_list_length): New.
14990 * src/scan-gram.l (handle_dollar, handle_at): Compute the
14991 rule_length only when needed.
14992 * src/output.c (actions_output, token_definitions_output): Output
14993 the full M4 block.
14994 * src/symtab.c: Don't access directly to the symbol tag, use
14995 symbol_tag_get.
14996 * src/parse-gram.y: Use symbol_list_free.
14997
14998 2002-06-17 Akim Demaille <akim@epita.fr>
14999
15000 * src/reader.h, src/reader.c (symbol_list, symbol_list_new)
15001 (symbol_list_prepend, get_type_name): Move to...
15002 * src/symlist.h, src/symlist.c (symbol_list_t, symbol_list_new)
15003 (symbol_list_prepend, symbol_list_n_type_name_get): here.
15004 Adjust all callers.
15005 (symbol_list_free): New.
15006 * src/scan-gram.l (handle_dollar): Takes a location.
15007 * tests/input.at (Invalid $n): Adjust.
15008
15009 2002-06-17 Akim Demaille <akim@epita.fr>
15010
15011 * src/reader.h, src/reader.c (symbol_list_new): Export it.
15012 (symbol_list_prepend): New.
15013 * src/parse-gram.y (%union): `list' is a new member.
15014 (symbols.1): New, replaces...
15015 (terms_to_prec.1, nterms_to_type.1): these.
15016 * src/symtab.h, src/symtab.c (symbol_type_set, symbol_precedence_set)
15017 Take a location as additional argument.
15018 Adjust all callers.
15019
15020 2002-06-15 Akim Demaille <akim@epita.fr>
15021
15022 * src/parse-gram.y: Move %token in the declaration section so that
15023 we don't depend upon CVS Bison.
15024
15025 2002-06-15 Akim Demaille <akim@epita.fr>
15026
15027 * src/state.h, src/state.c (state_rule_lookaheads_print): New.
15028 * src/print.c (print_core): Use it.
15029
15030 2002-06-15 Akim Demaille <akim@epita.fr>
15031
15032 * src/conflicts.c (log_resolution): Accept the rule involved in
15033 the sr conflicts instead of the lookahead number that points to
15034 that rule.
15035 (flush_reduce): Accept the current lookahead vector as argument,
15036 instead of the index in LA.
15037 (resolve_sr_conflict): Accept the current number of lookahead
15038 bitset to consider for the STATE, instead of the index in LA.
15039 (set_conflicts): Adjust.
15040 * src/lalr.c, src/lalr.h, src/state.h: Comment changes.
15041
15042 2002-06-15 Akim Demaille <akim@epita.fr>
15043
15044 * src/state.h (state_t): Replace the `lookaheadsp' member, a
15045 short, with `lookaheads' (bitsetv), `lookaheads_rule' (rule_t**).
15046 Adjust all dependencies.
15047 * src/lalr.c (initialize_lookaheads): Split into...
15048 (states_lookaheads_count, states_lookaheads_initialize): these.
15049 (lalr): Adjust.
15050
15051 2002-06-15 Akim Demaille <akim@epita.fr>
15052
15053 * src/gram.h, src/gram.c (grammar_rules_partial_print): New, eved
15054 out of...
15055 (grammar_rules_print): here.
15056 * src/reduce.c (reduce_output): Use it.
15057 * tests/reduce.at (Useless Rules, Reduced Automaton)
15058 (Underivable Rules): Adjust.
15059
15060 2002-06-15 Akim Demaille <akim@epita.fr>
15061
15062 Copy BYacc's nice way to report the grammar.
15063
15064 * src/gram.h, src/gram.c (grammar_rhs_print, grammar_rules_print):
15065 New.
15066 Don't print the rules' location, it is confusing and useless.
15067 (rule_print): Use grammar_rhs_print.
15068 * src/print.c (print_grammar): Use grammar_rules_print.
15069
15070 2002-06-15 Akim Demaille <akim@epita.fr>
15071
15072 Complete and rationalize `useless thing' warnings.
15073
15074 * src/symtab.h, src/symtab.c (symbol_tag_get, symbol_tag_get_n)
15075 (symbol_tag_print): New.
15076 Use them everywhere in place of accessing directly the tag member.
15077 * src/gram.h, src/gram.c (rule_print): New.
15078 Use it where a rule used to be printed `by hand'.
15079 * src/reduce.c (nonterminals_reduce): Report the use nonterminals.
15080 (reduce_grammar_tables): Report the useless rules.
15081 (reduce_print): Useless things are a warning, not an error.
15082 Report it as such.
15083 * tests/reduce.at (Useless Nonterminals, Useless Rules):
15084 (Reduced Automaton, Underivable Rules): Adjust.
15085 * tests/regression.at (Web2c Report, Web2c Report): Adjust.
15086 * tests/conflicts.at (Unresolved SR Conflicts)
15087 (Solved SR Conflicts): Adjust.
15088
15089 2002-06-15 Akim Demaille <akim@epita.fr>
15090
15091 Let symbols have a location.
15092
15093 * src/symtab.h, src/symtab.c (symbol_t): Location is a new member.
15094 (getsym): Adjust.
15095 Adjust all callers.
15096 * src/complain.h, src/complain.c (complain_at, fatal_at, warn_at):
15097 Use location_t, not int.
15098 * src/symtab.c (symbol_check_defined): Take advantage of the
15099 location.
15100 * tests/regression.at (Invalid inputs): Adjust.
15101
15102 2002-06-15 Akim Demaille <akim@epita.fr>
15103
15104 * src/parse-gram.y (YYLLOC_DEFAULT, current_lhs_location): New.
15105 (input): Don't try to initialize yylloc here, do it in the
15106 scanner.
15107 * src/scan-gram.l (YY_USER_INIT): Initialize yylloc.
15108 * src/gram.h (rule_t): Change line and action_line into location
15109 and action_location, of location_t type.
15110 Adjust all dependencies.
15111 * src/location.h, src/location.c (empty_location): New.
15112 * src/reader.h, src/reader.c (grammar_start_symbol_set)
15113 (grammar_symbol_append, grammar_rule_begin, grammar_rule_end)
15114 (grammar_current_rule_symbol_append)
15115 (grammar_current_rule_action_append): Expect a location as argument.
15116 * src/reader.c (grammar_midrule_action): Adjust to attach an
15117 action's location as dummy symbol location.
15118 * src/symtab.h, src/symtab.c (startsymbol_location): New.
15119 * tests/regression.at (Web2c Report, Rule Line Numbers): Adjust
15120 the line numbers.
15121
15122 2002-06-14 Akim Demaille <akim@epita.fr>
15123
15124 Grammar declarations may be found in the grammar section.
15125
15126 * src/parse-gram.y (rules_or_grammar_declaration): New.
15127 (declarations): Each declaration may end with a semicolon, not
15128 just...
15129 (grammar_declaration): `"%union"'.
15130 (grammar): Branch to rules_or_grammar_declaration.
15131
15132 2002-06-14 Akim Demaille <akim@epita.fr>
15133
15134 * src/main.c (main): Invoke scanner_free.
15135
15136 2002-06-14 Akim Demaille <akim@epita.fr>
15137
15138 * src/output.c (m4_invoke): Extracted from...
15139 (output_skeleton): here.
15140 Free tempfile.
15141
15142 2002-06-14 Akim Demaille <akim@epita.fr>
15143
15144 * src/parse-gram.y (directives, directive, gram)
15145 (grammar_directives, precedence_directives, precedence_directive):
15146 Rename as...
15147 (declarations, declaration, grammar, grammar_declaration)
15148 (precedence_declaration, precedence_declarator): these.
15149 (symbol_declaration): New.
15150
15151 2002-06-14 Akim Demaille <akim@epita.fr>
15152
15153 * src/files.c (action_obstack): Remove, unused.
15154 (output_obstack): Remove it, and all its dependencies, as it is no
15155 longer needed.
15156 * src/reader.c (epilogue_set): Build the epilogue in the
15157 muscle_obstack.
15158 * src/output.h, src/output.c (muscle_obstack): Move to...
15159 * src/muscle_tab.h, src/muscle_tab.h: here.
15160 (muscle_init): Initialize muscle_obstack.
15161 (muscle_free): New.
15162 * src/main.c (main): Call it.
15163
15164 2002-06-14 Akim Demaille <akim@epita.fr>
15165
15166 * src/location.h: New, extracted from...
15167 * src/reader.h: here.
15168 * src/Makefile.am (noinst_HEADERS): Merge into
15169 (bison_SOURCES): this.
15170 Add location.h.
15171 * src/parse-gram.y: Use location_t instead of Bison's.
15172 * src/reader.h, src/reader.c (prologue_augment, epilogue_set):
15173 Use location_t instead of ints.
15174
15175 2002-06-14 Akim Demaille <akim@epita.fr>
15176
15177 * data/bison.simple, data/bison.c++: Be sure to restore the
15178 current #line when returning to the skeleton contents after having
15179 exposed the input file's #line.
15180
15181 2002-06-12 Akim Demaille <akim@epita.fr>
15182
15183 * src/scan-gram.l (SC_BRACED_CODE): Don't use `<.*>', it is too
15184 eager.
15185 * tests/actions.at (Exotic Dollars): New.
15186
15187 2002-06-12 Akim Demaille <akim@epita.fr>
15188
15189 * src/scan-gram.l (SC_PROLOGUE): Don't eat characters amongst
15190 ['"/] too eagerly.
15191 * tests/input.at (Torturing the Scanner): New.
15192
15193 2002-06-11 Akim Demaille <akim@epita.fr>
15194
15195 * src/scan-gram.l (YY_OBS_INIT): Remove, replace with...
15196 [SC_COMMENT,SC_STRING,SC_CHARACTER,SC_BRACED_CODE,SC_PROLOGUE]
15197 [SC_EPILOGUE]: Output the quadrigraphs only when not in a comment.
15198 * src/reader.h, src/scan-gram.l (scanner_initialize): this.
15199 * src/reader.c (reader): Use it.
15200
15201 2002-06-11 Akim Demaille <akim@epita.fr>
15202
15203 * src/scan-gram.l (YY_OBS_FINISH): Don't set yylval.
15204 Adjust all callers.
15205 (scanner_last_string_free): New.
15206
15207 2002-06-11 Akim Demaille <akim@epita.fr>
15208
15209 * src/scan-gram.l (YY_INIT, YY_GROW, YY_FINISH): Rename as...
15210 (YY_OBS_INIT, YY_OBS_GROW, YY_OBS_FINISH): these.
15211 (last_string, YY_OBS_FREE): New.
15212 Use them when returning an ID.
15213
15214 2002-06-11 Akim Demaille <akim@epita.fr>
15215
15216 Have Bison grammars parsed by a Bison grammar.
15217
15218 * src/reader.c, src/reader.h (prologue_augment): New.
15219 * src/reader.c (copy_definition): Remove.
15220
15221 * src/reader.h, src/reader.c (gram_start_symbol_set, prologue_augment)
15222 (grammar_symbol_append, grammar_rule_begin, grammar_midrule_action)
15223 (grammar_current_rule_prec_set, grammar_current_rule_check)
15224 (grammar_current_rule_symbol_append)
15225 (grammar_current_rule_action_append): Export.
15226 * src/parse-gram.y (symbol_list_new, symbol_list_symbol_append_
15227 (symbol_list_action_append): Remove.
15228 Hook the routines from reader.
15229 * src/scan-gram.l: In INITIAL, characters and strings are tokens.
15230 * src/system.h (ATTRIBUTE_NORETURN, ATTRIBUTE_UNUSED): Now.
15231
15232 * src/reader.c (read_declarations): Remove, unused.
15233
15234 * src/parse-gram.y: Handle the epilogue.
15235 * src/reader.h, src/reader.c (gram_start_symbol_set): Rename as...
15236 (grammar_start_symbol_set): this.
15237 * src/scan-gram.l: Be sure to ``use'' yycontrol to keep GCC quiet.
15238 * src/reader.c (readgram): Remove, unused.
15239 (reader): Adjust to insert eoftoken and axiom where appropriate.
15240
15241 * src/reader.c (copy_dollar): Replace with...
15242 * src/scan-gram.h (handle_dollar): this.
15243 * src/parse-gram.y: Remove `%thong'.
15244
15245 * src/reader.c (copy_at): Replace with...
15246 * src/scan-gram.h (handle_at): this.
15247
15248 * src/complain.h, src/complain.c (warn_at, complain_at, fatal_at):
15249 New.
15250
15251 * src/scan-gram.l (YY_LINES): Keep lineno synchronized for the
15252 time being.
15253
15254 * src/reader.h, src/reader.c (grammar_rule_end): New.
15255
15256 * src/parse.y (current_type, current_class): New.
15257 Implement `%nterm', `%token' support.
15258 Merge `%term' into `%token'.
15259 (string_as_id): New.
15260 * src/symtab.h, src/symtab.c (symbol_make_alias): Don't pass the
15261 type name.
15262
15263 * src/parse-gram.y: Be sure to handle properly the beginning of
15264 rules.
15265
15266 * src/parse-gram.y: Handle %type.
15267 * src/reader.c (grammar_rule_end): Call grammar_current_rule_check.
15268
15269 * src/parse-gram.y: More directives support.
15270 * src/options.c: No longer handle source directives.
15271
15272 * src/parse-gram.y: Fix %output.
15273
15274 * src/parse-gram.y: Handle %union.
15275 Use the prologue locations.
15276 * src/reader.c (parse_union_decl): Remove.
15277
15278 * src/reader.h, src/reader.c (epilogue_set): New.
15279 * src/parse-gram.y: Use it.
15280
15281 * data/bison.simple, data/bison.c++: b4_stype is now either not
15282 defined, then default to int, or to the contents of %union,
15283 without `union' itself.
15284 Adjust.
15285 * src/muscle_tab.c (muscle_init): Don't predefine `stype'.
15286
15287 * src/output.c (actions_output): Don't output braces, as they are
15288 already handled by the scanner.
15289
15290 * src/scan-gram.l (SC_CHARACTER): Set the user_token_number of
15291 characters to themselves.
15292
15293 * tests/reduce.at (Reduced Automaton): End the grammars with %% so
15294 that the epilogue has a proper #line.
15295
15296 * src/parse-gram.y: Handle precedence/associativity.
15297
15298 * src/symtab.c (symbol_precedence_set): Requires the symbol to be
15299 a terminal.
15300 * src/scan-gram.l (SC_BRACED_CODE): Catch strings and characters.
15301 * tests/calc.at: Do not use `%token "foo"' as it makes not sense
15302 at all to define terminals that cannot be emitted.
15303
15304 * src/scan-gram.l: Escape M4 characters.
15305
15306 * src/scan-gram.l: Working properly with escapes in user
15307 strings/characters.
15308
15309 * tests/torture.at (AT_DATA_TRIANGULAR_GRAMMAR)
15310 (AT_DATA_HORIZONTAL_GRAMMAR): Respect the `%token ID NUM STRING'
15311 grammar.
15312 Use more modest sizes, as for the time being the parser does not
15313 release memory, and therefore the process swallows a huge amount
15314 of memory.
15315
15316 * tests/torture.at (AT_DATA_LOOKAHEADS_GRAMMAR): Adjust to the
15317 stricter %token grammar.
15318
15319 * src/symtab.h (associativity): Add `undef_assoc'.
15320 (symbol_precedence_set): Do nothing when passed an undef_assoc.
15321 * src/symtab.c (symbol_check_alias_consistence): Adjust.
15322
15323 * tests/regression.at (Invalid %directive): Remove, as it is now
15324 meaningless.
15325 (Invalid inputs): Adjust to the new error messages.
15326 (Token definitions): The new grammar doesn't allow too many
15327 eccentricities.
15328
15329 * src/lex.h, src/lex.c: Remove.
15330 * src/reader.c (lastprec, skip_to_char, read_signed_integer)
15331 (copy_character, copy_string2, copy_string, copy_identifier)
15332 (copy_comment, parse_token_decl, parse_type_decl, parse_assoc_decl)
15333 (parse_muscle_decl, parse_dquoted_param, parse_skel_decl)
15334 (parse_action): Remove.
15335 * po/POTFILES.in: Adjust.
15336
15337 2002-06-11 Akim Demaille <akim@epita.fr>
15338
15339 * src/reader.c (parse_action): Don't store directly into the
15340 rule's action member: return the action as a string.
15341 Don't require `rule_length' as an argument: compute it.
15342 (grammar_current_rule_symbol_append)
15343 (grammar_current_rule_action_append): New, eved out from
15344 (readgram): here.
15345 Remove `action_flag', `rulelength', unused now.
15346
15347 2002-06-11 Akim Demaille <akim@epita.fr>
15348
15349 * src/reader.c (grammar_current_rule_prec_set).
15350 (grammar_current_rule_check): New, eved out from...
15351 (readgram): here.
15352 Remove `xaction', `first_rhs': useless.
15353 * tests/input.at (Type clashes): New.
15354 * tests/existing.at (GNU Cim Grammar): Adjust.
15355
15356 2002-06-11 Akim Demaille <akim@epita.fr>
15357
15358 * src/reader.c (grammar_midrule_action): New, Eved out from
15359 (readgram): here.
15360
15361 2002-06-11 Akim Demaille <akim@epita.fr>
15362
15363 * src/reader.c (grammar_rule_begin, previous_rule, current_rule):
15364 New.
15365 (readgram): Use them as replacement of inlined code, crule and
15366 crule1.
15367
15368 2002-06-11 Akim Demaille <akim@epita.fr>
15369
15370 * src/reader.c (grammar_end, grammar_symbol_append): New.
15371 (readgram): Use them.
15372 Make the use of `p' as local as possible.
15373
15374 2002-06-10 Akim Demaille <akim@epita.fr>
15375
15376 GCJ's parser requires the tokens to be defined before the prologue.
15377
15378 * data/bison.simple: Output the token definition before the user's
15379 prologue.
15380 * tests/regression.at (Braces parsing, Duplicate string)
15381 (Mixing %token styles): Check the output from bison.
15382 (Early token definitions): New.
15383
15384 2002-06-10 Akim Demaille <akim@epita.fr>
15385
15386 * src/symtab.c (symbol_user_token_number_set): Don't complain when
15387 assigning twice the same user number to a token, so that we can
15388 use it in...
15389 * src/lex.c (lex): here.
15390 Also use `symbol_class_set' instead of hand written code.
15391 * src/reader.c (parse_assoc_decl): Likewise.
15392
15393 2002-06-10 Akim Demaille <akim@epita.fr>
15394
15395 * src/symtab.c, src/symtab.c (symbol_class_set)
15396 (symbol_user_token_number_set): New.
15397 * src/reader.c (parse_token_decl): Use them.
15398 Use a switch instead of ifs.
15399 Use a single argument.
15400
15401 2002-06-10 Akim Demaille <akim@epita.fr>
15402
15403 Remove `%thong' support as it is undocumented, unused, duplicates
15404 `%token's job, and creates useless e-mail traffic with people who
15405 want to know what it is, why it is undocumented, unused, and
15406 duplicates `%token's job.
15407
15408 * src/reader.c (parse_thong_decl): Remove.
15409 * src/options.c (option_table): Remove "thong".
15410 * src/lex.h (tok_thong): Remove.
15411
15412 2002-06-10 Akim Demaille <akim@epita.fr>
15413
15414 * src/symtab.c, src/symtab.c (symbol_type_set)
15415 (symbol_precedence_set): New.
15416 * src/reader.c (parse_type_decl, parse_assoc_decl): Use them.
15417 (value_components_used): Remove, unused.
15418
15419 2002-06-09 Akim Demaille <akim@epita.fr>
15420
15421 Move symbols handling code out of the reader.
15422
15423 * src/reader.h, src/reader.c (errtoken, undeftoken, eoftoken)
15424 (axiom): Move to...
15425 * src/symtab.h, src/symtab.c: here.
15426
15427 * src/gram.c (start_symbol): Remove: use startsymbol->number.
15428 * src/reader.c (startval): Rename as...
15429 * src/symtab.h, src/symtab.c (startsymbol): this.
15430 * src/reader.c: Adjust.
15431
15432 * src/reader.c (symbol_check_defined, symbol_make_alias)
15433 (symbol_check_alias_consistence, symbol_pack, symbol_translation)
15434 (token_translations_init)
15435 Move to...
15436 * src/symtab.c: here.
15437 * src/reader.c (packsymbols): Move to...
15438 * src/symtab.h, src/symtab.c (symbols_pack): here.
15439 * src/symtab.h, src/symtab.c (symbol_make_alias): Takes SYMVAL as
15440 argument.
15441
15442 2002-06-03 Akim Demaille <akim@epita.fr>
15443
15444 * src/muscle_tab.c (muscle_insert, muscle_find): Declarations,
15445 then statements.
15446
15447 2002-06-03 Akim Demaille <akim@epita.fr>
15448
15449 * src/muscle_tab.c (muscle_find, muscle_insert): Don't initialize
15450 structs with non literals.
15451 * src/scan-skel.l: never-interactive.
15452 * src/conflicts.c (enum conflict_resolution_e): No trailing
15453 comma.
15454 * src/getargs.c (usage): Split long literal strings.
15455 Reported by Hans Aberg.
15456
15457 2002-05-28 Akim Demaille <akim@epita.fr>
15458
15459 * data/bison.c++: Use C++ ostreams.
15460 (cdebug_): New member.
15461
15462 2002-05-28 Akim Demaille <akim@epita.fr>
15463
15464 * src/output.c (output_skeleton): Be sure to allocate enough room
15465 for `/' _and_ for `\0' in full_skeleton.
15466
15467 2002-05-28 Akim Demaille <akim@epita.fr>
15468
15469 * data/bison.c++: Catch up with bison.simple:
15470 2002-05-24 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
15471 and Paul Eggert <eggert@twinsun.com>: `error' handing.
15472 2002-05-26 Akim Demaille <akim@epita.fr>: stos_, token_number_,
15473 and popping traces.
15474
15475 2002-05-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
15476
15477 * src/output.c (output_skeleton): Put an explicit path in front of
15478 the skeleton file name, rather than relying on the -I directory,
15479 to partially alleviate effects of having a skeleton file lying around
15480 in the current directory.
15481
15482 2002-05-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
15483
15484 * src/conflicts.c (log_resolution): Correct typo:
15485 obstack_printf should be obstack_fgrow1.
15486
15487 2002-05-26 Akim Demaille <akim@epita.fr>
15488
15489 * src/state.h (state_t): `solved_conflicts' is a new member.
15490 * src/LR0.c (new_state): Set it to 0.
15491 * src/conflicts.h, src/conflicts.c (print_conflicts)
15492 (free_conflicts, solve_conflicts): Rename as...
15493 (conflicts_print, conflicts_free, conflicts_solve): these.
15494 Adjust callers.
15495 * src/conflicts.c (enum conflict_resolution_e)
15496 (solved_conflicts_obstack): New, used by...
15497 (log_resolution): this.
15498 Adjust to attach the conflict resolution to each state.
15499 Complete the description with the precedence/associativity
15500 information.
15501 (resolve_sr_conflict): Adjust.
15502 * src/print.c (print_state): Output its solved_conflicts.
15503 * tests/conflicts.at (Unresolved SR Conflicts)
15504 (Solved SR Conflicts): Exercise --report=all.
15505
15506 2002-05-26 Akim Demaille <akim@epita.fr>
15507
15508 * src/LR0.c, src/derives.c, src/gram.c, src/gram.h, src/lalr.c,
15509 * src/nullable.c, src/output.c, src/print.c, src/print_graph.c,
15510 * src/reader.c, src/reduce.c, src/state.h, src/symtab.h
15511 (token_number_t, item_number_as_token_number)
15512 (token_number_as_item_number, muscle_insert_token_number_table):
15513 Rename as...
15514 (symbol_number_t, item_number_as_symbol_number)
15515 (symbol_number_as_item_number, muscle_insert_symbol_number_table):
15516 these, since it is more appropriate.
15517
15518 2002-05-26 Akim Demaille <akim@epita.fr>
15519
15520 * tests/calc.at (AT_CHECK_CALC): Adjust: there are now additional
15521 `Error:' lines.
15522 * data/bison.simple (yystos) [YYDEBUG]: New.
15523 (yyparse) [YYDEBUG]: Display the symbols which are popped during
15524 error recovery.
15525 * tests/regression.at (Web2c Actions): Adjust: yystos is output now.
15526
15527 2002-05-25 Akim Demaille <akim@epita.fr>
15528
15529 * doc/bison.texinfo (Debugging): Split into...
15530 (Tracing): this new section, its former contents, and...
15531 (Understanding): this new section.
15532 * src/getargs.h, src/getargs.c (verbose_flag): Remove, replaced
15533 by...
15534 (report_flag): this.
15535 Adjust all dependencies.
15536 (report_args, report_types, report_argmatch): New.
15537 (usage, getargs): Report/support -r, --report.
15538 * src/options.h
15539 (struct option_table_struct): Rename as..,
15540 (struct option_table_s): this.
15541 Rename the `set_flag' member to `flag' to match with getopt_long's
15542 struct.
15543 * src/options.c (option_table): Split verbose into an entry for
15544 %verbose, and another for --verbose.
15545 Support --report/-r, so remove -r from the obsolete --raw.
15546 * src/print.c: Attach full item sets and lookaheads reports to
15547 report_flag instead of trace_flag.
15548 * lib/argmatch.h, lib/argmatch.c: New, from Fileutils 4.1.
15549
15550 2002-05-24 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
15551 and Paul Eggert <eggert@twinsun.com>
15552
15553 * data/bison.simple (yyparse): Correct error handling to conform to
15554 POSIX and yacc. Specifically, after syntax error is discovered,
15555 do not reduce further before shifting the error token.
15556 Clean up the code a bit by removing the labels yyerrdefault,
15557 yyerrhandle, yyerrpop.
15558 * NEWS: Document the above.
15559
15560 2002-05-20 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
15561
15562 * data/bison.simple (yyr1): Don't use yy_token_number_type as element
15563 type; it isn't always big enough, since it doesn't necessarily
15564 include non-terminals.
15565 (yytranslate): Expand definition of yy_token_number_type, so that
15566 the latter can be removed.
15567 (yy_token_number_type): Remove, only one use.
15568 * data/bison.c++ (r1_): Parallel change to yyr1 in bison.simple---
15569 don't use TokenNumberType as element type.
15570
15571 * tests/regression.at: Modify expected output to agree with change
15572 to yyr1 and yytranslate.
15573
15574 2002-05-13 Florian Krohm <florian@edamail.fishkill.ibm.com>
15575
15576 * src/reader.c (parse_action): Use copy_character instead of
15577 obstack_1grow.
15578
15579 2002-05-13 Akim Demaille <akim@epita.fr>
15580
15581 * tests/regression.at (Token definitions): Prototype yylex and
15582 yyerror.
15583
15584 2002-05-12 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
15585
15586 * src/scan-skel.l: Correct off-by-one error in handling of __oline__.
15587 * data/bison.simple (b4_sint_type, b4_uint_type): Correct to reflect
15588 32-bit arithmetic.
15589 * data/bison.c++ (b4_sint_type, b4_uint_type): Ditto.
15590
15591 2002-05-07 Akim Demaille <akim@epita.fr>
15592
15593 * tests/synclines.at: Be sure to prototype yylex and yyerror to
15594 avoid GCC warnings.
15595
15596 2002-05-07 Akim Demaille <akim@epita.fr>
15597
15598 Kill GCC warnings.
15599
15600 * src/reduce.c (nonterminals_reduce): Don't loop over RITEM: loop
15601 over the RHS of each rule.
15602 * src/gram.h, src/gram.c (nritems): Is `unsigned int', not int.
15603 * src/state.h (state_t): Member `nitems' is unsigned short.
15604 * src/LR0.c (get_state): Adjust.
15605 * src/reader.c (packgram): Likewise.
15606 * src/output.c (GENERATE_MUSCLE_INSERT_TABLE): `max' is of type
15607 `Type'.
15608 (muscle_insert_int_table): Remove, unused.
15609 (prepare_rules): Remove `max'.
15610
15611 2002-05-06 Akim Demaille <akim@epita.fr>
15612
15613 * src/closure.c (print_firsts): Display of the symbol tags.
15614 (bitmatrix_print): Move to...
15615 * lib/bitsetv-print.h, lib/bitsetv-print.c (bitsetv_matrix_dump):
15616 here.
15617 * tests/sets.at (Nullable, Broken Closure, Firsts): Adjust.
15618
15619 2002-05-06 Akim Demaille <akim@epita.fr>
15620
15621 * src/muscle_tab.c (muscle_m4_output): Must return TRUE for
15622 hash_do_for_each.
15623
15624 2002-05-06 Akim Demaille <akim@epita.fr>
15625
15626 * src/LR0.c (new_state, get_state): Instead of using the global
15627 `kernel_size' and `kernel_base', have two new arguments:
15628 `core_size' and `core'.
15629 Adjust callers.
15630
15631 2002-05-06 Akim Demaille <akim@epita.fr>
15632
15633 * src/reader.c (packgram): No longer end `ritem' with a 0
15634 sentinel: it is not used.
15635
15636 2002-05-05 Akim Demaille <akim@epita.fr>
15637
15638 New experimental feature: display the lookaheads in the report and
15639 graph.
15640
15641 * src/print (print_core): When --trace-flag, display the rules
15642 lookaheads.
15643 * src/print_graph.c (print_core): Likewise.
15644 Swap the arguments.
15645 Adjust caller.
15646
15647 2002-05-05 Akim Demaille <akim@epita.fr>
15648
15649 * tests/torture.at (Many lookaheads): New test.
15650
15651 2002-05-05 Akim Demaille <akim@epita.fr>
15652
15653 * src/output.c (GENERATE_OUTPUT_TABLE): Replace with...
15654 (GENERATE_MUSCLE_INSERT_TABLE): this.
15655 (output_int_table, output_unsigned_int_table, output_short_table)
15656 (output_token_number_table, output_item_number_table): Replace with...
15657 (muscle_insert_int_table, muscle_insert_unsigned_int_table)
15658 (muscle_insert_short_table, muscle_insert_token_number_table)
15659 (muscle_insert_item_number_table): these.
15660 Adjust all callers.
15661 (prepare_tokens): Don't free `translations', since...
15662 * src/reader.h, src/reader.c (grammar_free): do it.
15663 Move to...
15664 * src/gram.h, src/gram.c (grammar_free): here.
15665 * data/bison.simple, data/bison.c++: b4_token_number_max is now
15666 b4_translate_max.
15667
15668 2002-05-05 Akim Demaille <akim@epita.fr>
15669
15670 * src/output.c (output_unsigned_int_table): New.
15671 (prepare_rules): `i' is unsigned.
15672 `prhs', `rline', `r2' are unsigned int.
15673 Rename muscle `rhs_number_max' as `rhs_max'.
15674 Output muscles `prhs_max', `rline_max', and `r2_max'.
15675 Free rline and r1.
15676 * data/bison.simple, data/bison.c++: Adjust to use these muscles
15677 to compute types instead of constant types.
15678 * tests/regression.at (Web2c Actions): Adjust.
15679
15680 2002-05-04 Akim Demaille <akim@epita.fr>
15681
15682 * src/symtab.h (SALIAS, SUNDEF): Rename as...
15683 (USER_NUMBER_ALIAS, USER_NUMBER_UNDEFINED): these.
15684 Adjust dependencies.
15685 * src/output.c (token_definitions_output): Be sure not to output a
15686 `#define 'a'' when fed with `%token 'a' "a"'.
15687 * tests/regression.at (Token definitions): New.
15688
15689 2002-05-03 Paul Eggert <eggert@twinsun.com>
15690
15691 * data/bison.simple (b4_token_defines): Also define YYTOKENTYPE
15692 for K&R C.
15693
15694 2002-05-03 gettextize <bug-gnu-gettext@gnu.org>
15695
15696 * Makefile.am (SUBDIRS): Remove intl.
15697 (EXTRA_DIST): Add config/config.rpath.
15698
15699 2002-05-03 Akim Demaille <akim@epita.fr>
15700
15701 * data/bison.simple (m4_if): Don't output empty enums.
15702 And actually, output valid enum definitions :(.
15703
15704 2002-05-03 Akim Demaille <akim@epita.fr>
15705
15706 * configure.bat: Remove, completely obsolete.
15707 * Makefile.am (EXTRA_DIST): Adjust.
15708 Don't distribute config.rpath...
15709 * config/Makefile.am (EXTRA_DIST): Do it.
15710
15711 2002-05-03 Akim Demaille <akim@epita.fr>
15712
15713 * configure.in (GETTEXT_VERSION): New.
15714 Suggested by Bruno Haible for the forthcoming Gettext 0.10.3.
15715
15716 2002-05-03 Akim Demaille <akim@epita.fr>
15717
15718 * data/bison.simple (b4_token_enum): New.
15719 (b4_token_defines): Use it to output tokens both as #define and
15720 enums.
15721 Suggested by Paul Eggert.
15722 * src/output.c (token_definitions_output): Don't output spurious
15723 white spaces.
15724
15725 2002-05-03 Akim Demaille <akim@epita.fr>
15726
15727 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
15728
15729 2002-05-02 Robert Anisko <robert@lrde.epita.fr>
15730
15731 * data/bison.c++: Adapt expansion of $s and @s to the C++ parser.
15732 Update the stack class, give a try to deque as the default container.
15733
15734 2002-05-02 Akim Demaille <akim@epita.fr>
15735
15736 * data/bison.simple (yyparse): Do not implement @$ = @1.
15737 (YYLLOC_DEFAULT): Adjust to do it.
15738 * doc/bison.texinfo (Location Default Action): Fix.
15739
15740 2002-05-02 Akim Demaille <akim@epita.fr>
15741
15742 * src/reader.c (parse_braces): Merge into...
15743 (parse_action): this.
15744
15745 2002-05-02 Akim Demaille <akim@epita.fr>
15746
15747 * configure.in (ALL_LINGUAS): Remove.
15748 * po/LINGUAS, hr.po: New.
15749
15750 2002-05-02 Akim Demaille <akim@epita.fr>
15751
15752 Remove the so called hairy (semantic) parsers.
15753
15754 * src/system.h (EXT_GUARD_C, EXT_STYPE_H): Remove.
15755 * src/gram.h, src/gram.c (semantic_parser): Remove.
15756 (rule_t): Remove the guard and guard_line members.
15757 * src/lex.h (token_t): remove tok_guard.
15758 * src/options.c (option_table): Remove %guard and %semantic_parser
15759 support.
15760 * src/output.c, src/output.h (guards_output): Remove.
15761 (prepare): Adjust.
15762 (token_definitions_output): Don't output the `T'
15763 tokens (???).
15764 (output_skeleton): Don't output the guards.
15765 * src/files.c, src/files.c (attrsfile): Remove.
15766 * src/reader.c (symbol_list): Remove the guard and guard_line
15767 members.
15768 Adjust dependencies.
15769 (parse_guard): Remove.
15770 * data/bison.hairy: Remove.
15771 * doc/bison.texinfo (Environment Variables): Remove occurrences of
15772 BISON_HAIRY.
15773
15774 2002-05-02 Akim Demaille <akim@epita.fr>
15775
15776 * src/reader.c (copy_at, copy_dollarm parse_braces, parse_action)
15777 (parse_guard): Rename the formal argument `stack_offset' as
15778 `rule_length', which is more readable.
15779 Adjust callers.
15780 (copy_at, copy_dollar): Instead of outputting the hard coded
15781 values of $$, $n and so forth, output invocation to b4_lhs_value,
15782 b4_lhs_location, b4_rhs_value, and b4_rhs_location.
15783 Note: this patch partially drops `semantic-parser' support: it
15784 always does `rule_length - n', where semantic parsers ought to
15785 always use `-n'.
15786 * data/bison.simple, data/bison.c++ (b4_lhs_value)
15787 (b4_lhs_location, b4_rhs_value, and b4_rhs_location: New.
15788
15789 2002-05-02 Akim Demaille <akim@epita.fr>
15790
15791 * configure.in (AC_INIT): Bump to 1.49b.
15792 (AM_INIT_AUTOMAKE): Short invocation.
15793
15794 2002-05-02 Akim Demaille <akim@epita.fr>
15795
15796 Version 1.49a.
15797
15798 2002-05-01 Akim Demaille <akim@epita.fr>
15799
15800 * src/skeleton.h: Remove.
15801
15802 2002-05-01 Akim Demaille <akim@epita.fr>
15803
15804 * src/skeleton.h: Fix the #endif.
15805 Reported by Magnus Fromreide.
15806
15807 2002-04-26 Paul Eggert <eggert@twinsun.com>
15808
15809 * data/bison.simple (YYSTYPE_IS_TRIVIAL, YYLTYPE_IS_TRIVIAL):
15810 Define if we define YYSTYPE and YYLTYPE, respectively.
15811 (YYCOPY): Fix [] quoting problem in the non-GCC case.
15812
15813 2002-04-25 Robert Anisko <robert@lrde.epita.fr>
15814
15815 * src/scan-skel.l: Postprocess quadrigraphs.
15816
15817 * src/reader.c (copy_character): New function, used to output
15818 single characters while replacing `[' and `]' with quadrigraphs, to
15819 avoid troubles with M4 quotes.
15820 (copy_comment): Output characters with copy_character.
15821 (read_additionnal_code): Likewise.
15822 (copy_string2): Likewise.
15823 (copy_definition): Likewise.
15824
15825 * tests/calc.at: Exercise M4 quoting.
15826
15827 2002-04-25 Akim Demaille <akim@epita.fr>
15828
15829 * tests/sets.at (AT_EXTRACT_SETS): Sed portability issue: no space
15830 between `!' and the command.
15831 Reported by Paul Eggert.
15832
15833 2002-04-24 Robert Anisko <robert@lrde.epita.fr>
15834
15835 * tests/calc.at: Exercise prologue splitting.
15836
15837 * data/bison.simple, data/bison.c++: Use `b4_pre_prologue' and
15838 `b4_post_prologue' instead of `b4_prologue'.
15839
15840 * src/output.c (prepare): Add the `pre_prologue' and `post_prologue'
15841 muscles.
15842 (output): Free pre_prologue_obstack and post_prologue_obstack.
15843 * src/files.h, src/files.c (attrs_obstack): Remove.
15844 (pre_prologue_obstack, post_prologue_obstack): New.
15845 * src/reader.c (copy_definition): Add a parameter to specify the
15846 obstack to fill, instead of using attrs_obstack unconditionally.
15847 (read_declarations): Pass pre_prologue_obstack to copy_definition if
15848 `%union' has not yet been seen, pass post_prologue_obstack otherwise.
15849
15850 2002-04-23 Paul Eggert <eggert@twinsun.com>
15851
15852 * data/bison.simple: Remove unnecessary commentary and white
15853 space differences from 1_29-branch.
15854 Depend on YYERROR_VERBOSE, not defined (YYERROR_VERBOSE).
15855
15856 (union yyalloc, YYSTACK_GAP_MAX, YYSTACK_BYTES, YYCOPY,
15857 YYSTACK_RELOCATE): Do not define if yyoverflow is defined, or
15858 if this is a C++ parser and YYSTYPE or YYLTYPE has nontrivial
15859 constructors or destructors.
15860
15861 (yyparse) [! defined YYSTACK_RELOCATE]: Do not relocate the stack.
15862
15863 2002-04-23 Akim Demaille <akim@epita.fr>
15864
15865 * tests/sets.at (AT_EXTRACT_SETS): Don't use 8 char long sed labels.
15866 * tests/synclines.at (AT_TEST_SYNCLINE): Be robust to GCC's
15867 location with columns.
15868 * tests/conflicts.at (%nonassoc and eof): Don't use `error.h'.
15869 All reported by Paul Eggert.
15870
15871 2002-04-22 Akim Demaille <akim@epita.fr>
15872
15873 * src/reduce.c (dump_grammar): Move to...
15874 * src/gram.h, src/gram.c (grammar_dump): here.
15875 Be sure to separate long item numbers.
15876 Don't read the members of a rule's prec if its nil.
15877
15878 2002-04-22 Akim Demaille <akim@epita.fr>
15879
15880 * src/output.c (table_size, table_grow): New.
15881 (MAXTABLE): Remove, replace uses with table_size.
15882 (pack_vector): Instead of dying when the table is too big, grow it.
15883
15884 2002-04-22 Akim Demaille <akim@epita.fr>
15885
15886 * data/bison.simple (yyr1): Its type is that of a token number.
15887 * data/bison.c++ (r1_): Likewise.
15888 * tests/regression.at (Web2c Actions): Adjust.
15889
15890 2002-04-22 Akim Demaille <akim@epita.fr>
15891
15892 * src/reader.c (token_translations_init): 256 is now the default
15893 value for the error token, i.e., it will be assigned another
15894 number if the user assigned 256 to one of her tokens.
15895 (reader): Don't force 256 to error.
15896 * doc/bison.texinfo (Symbols): Adjust.
15897 * tests/torture.at (AT_DATA_HORIZONTAL_GRAMMAR)
15898 (AT_DATA_TRIANGULAR_GRAMMAR): Number the tokens as 1, 2, 3
15899 etc. instead of 10, 20, 30 (which was used to `jump' over error
15900 (256) and undefined (2)).
15901
15902 2002-04-22 Akim Demaille <akim@epita.fr>
15903
15904 Propagate more token_number_t.
15905
15906 * src/gram.h (token_number_as_item_number)
15907 (item_number_as_token_number): New.
15908 * src/output.c (GENERATE_OUTPUT_TABLE): New.
15909 Use it to create output_item_number_table and
15910 output_token_number_table.
15911 * src/LR0.c, src/derives.c, src/gram.c, src/gram.h, src/lalr.c,
15912 * src/lex.c, src/nullable.c, src/output.c, src/print.c,
15913 * src/print_graph.c, src/reader.c, src/reduce.c, src/state.h,
15914 * src/symtab.c, src/symtab.h: Use token_number_t instead of shorts.
15915
15916 2002-04-22 Akim Demaille <akim@epita.fr>
15917
15918 * src/output.h, src/output.c (get_lines_number): Remove.
15919
15920 2002-04-19 Akim Demaille <akim@epita.fr>
15921
15922 * doc/bison.texinfo (Actions): Make clear that `|' is not the same
15923 as Lex/Flex'.
15924 (Debugging): More details about enabling the debugging features.
15925 (Table of Symbols): Describe $$, $n, @$, and @n.
15926 Suggested by Tim Josling.
15927
15928 2002-04-19 Akim Demaille <akim@epita.fr>
15929
15930 * doc/bison.texinfo: Remove the uses of the obsolete @refill.
15931
15932 2002-04-10 Akim Demaille <akim@epita.fr>
15933
15934 * src/system.h: Rely on HAVE_LIMITS_H.
15935 Suggested by Paul Eggert.
15936
15937 2002-04-09 Akim Demaille <akim@epita.fr>
15938
15939 * tests/calc.at (_AT_CHECK_CALC_ERROR): Receive as argument the
15940 full stderr, and strip it according to the bison options, instead
15941 of composing the error message from different bits.
15942 This makes it easier to check for several error messages.
15943 Adjust all the invocations.
15944 Add an invocation exercising the error token.
15945 Add an invocation demonstrating a stupid error message.
15946 (_AT_DATA_CALC_Y): Follow the GCS: initial column is 1, not 0.
15947 Adjust the tests.
15948 Error message are for stderr, not stdout.
15949
15950 2002-04-09 Akim Demaille <akim@epita.fr>
15951
15952 * src/gram.h, src/gram.c (error_token_number): Remove, use
15953 errtoken->number.
15954 * src/reader.c (reader): Don't specify the user token number (2)
15955 for $undefined, as it uselessly prevents using it.
15956 * src/gram.h (token_number_t): Move to...
15957 * src/symtab.h: here.
15958 (state_t.number): Is a token_number_t.
15959 * src/print.c, src/reader.c: Use undeftoken->number instead of
15960 hard coded 2.
15961 (Even though this 2 is not the same as above: the number of the
15962 undeftoken remains being 2, it is its user token number which
15963 might not be 2).
15964 * src/output.c (prepare_tokens): Rename the `maxtok' muscle with
15965 `user_token_number_max'.
15966 Output `undef_token_number'.
15967 * data/bison.simple, data/bison.c++: Use them.
15968 Be sure to map invalid yylex return values to
15969 `undef_token_number'. This saves us from gratuitous SEGV.
15970
15971 * tests/conflicts.at (Solved SR Conflicts)
15972 (Unresolved SR Conflicts): Adjust.
15973 * tests/regression.at (Web2c Actions): Adjust.
15974
15975 2002-04-08 Akim Demaille <akim@epita.fr>
15976
15977 * data/bison.c++: s/b4_item_number_max/b4_rhs_number_max/.
15978 Adding #line.
15979 Remove the duplicate `typedefs'.
15980 (RhsNumberType): Fix the declaration and various other typos.
15981 Use __ofile__.
15982 * data/bison.simple: Use __ofile__.
15983 * src/scan-skel.l: Handle __ofile__.
15984
15985 2002-04-08 Akim Demaille <akim@epita.fr>
15986
15987 * src/gram.h (item_number_t): New, the type of item numbers in
15988 RITEM. Note that it must be able to code symbol numbers as
15989 positive number, and the negation of rule numbers as negative
15990 numbers.
15991 Adjust all dependencies (pretty many).
15992 * src/reduce.c (rule): Remove this `short *' pointer: use
15993 item_number_t.
15994 * src/system.h (MINSHORT, MAXSHORT): Remove.
15995 Include `limits.h'.
15996 Adjust dependencies to using SHRT_MAX and SHRT_MIN.
15997 (shortcpy): Remove.
15998 (MAXTABLE): Move to...
15999 * src/output.c (MAXTABLE): here.
16000 (prepare_rules): Use output_int_table to output rhs.
16001 * data/bison.simple, data/bison.c++: Adjust.
16002 * tests/torture.at (Big triangle): Move the limit from 254 to
16003 500.
16004 * tests/regression.at (Web2c Actions): Ajust.
16005
16006 Trying with bigger grammars shows various phenomena: at 3000 (28Mb
16007 of grammar file) bison is killed by my system, at 2000 (12Mb) bison
16008 passes, but produces negative #line number, once fixed, GCC is
16009 killed while compiling 14Mb, at 1500 (6.7 Mb of grammar, 8.2Mb of
16010 C), it passes.
16011 * src/state.h (state_h): Code input lines on ints, not shorts.
16012
16013 2002-04-08 Akim Demaille <akim@epita.fr>
16014
16015 * src/reduce.c (reduce_grammar): First reduce the nonterminals,
16016 and then the grammar.
16017
16018 2002-04-08 Akim Demaille <akim@epita.fr>
16019
16020 * src/system.h: No longer using strndup.
16021
16022 2002-04-07 Akim Demaille <akim@epita.fr>
16023
16024 * src/muscle_tab.h (MUSCLE_INSERT_LONG_INT): New.
16025 * src/output.c (output_table_data): Return the longest number.
16026 (prepare_tokens): Output `token_number_max').
16027 * data/bison.simple, data/bison.c++ (b4_sint_type, b4_uint_type):
16028 New.
16029 Use them to define yy_token_number_type/TokenNumberType.
16030 Use this type for yytranslate.
16031 * tests/torture.at (Big triangle): Push the limit from 124 to
16032 253.
16033 * tests/regression.at (Web2c Actions): Adjust.
16034
16035 2002-04-07 Akim Demaille <akim@epita.fr>
16036
16037 * tests/torture.at (Big triangle): New.
16038 (GNU AWK Grammar, GNU Cim Grammar): Move to...
16039 * tests/existing.at: here.
16040
16041 2002-04-07 Akim Demaille <akim@epita.fr>
16042
16043 * src/gram.h, src/gram.c (nitems): Remove, it is an alias of
16044 nritems.
16045 Adjust dependencies.
16046
16047 2002-04-07 Akim Demaille <akim@epita.fr>
16048
16049 * src/reader.c: Normalize increments to prefix form.
16050
16051 2002-04-07 Akim Demaille <akim@epita.fr>
16052
16053 * src/reader.c, symtab.c: Remove debugging code.
16054
16055 2002-04-07 Akim Demaille <akim@epita.fr>
16056
16057 Rename all the `bucket's as `symbol_t'.
16058
16059 * src/gram.c, src/gram.h, src/lex.c, src/lex.h, src/output.c,
16060 * src/reader.c, src/reader.h, src/reduce.c, src/state.h,
16061 * src/symtab.c, src/symtab.h (bucket): Rename as...
16062 (symbol_t): this.
16063 (symbol_list_new, bucket_check_defined, bucket_make_alias)
16064 (bucket_check_alias_consistence, bucket_pack, bucket_translation)
16065 (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
16066 (buckets_new, buckets_free, buckets_do): Rename as...
16067 (symbol_list_new, symbol_check_defined, symbol_make_alias)
16068 (symbol_check_alias_consistence, symbol_pack, symbol_translation)
16069 (symbol_new, symbol_free, hash_compare_symbol_t, hash_symbol_t)
16070 (symbols_new, symbols_free, symbols_do): these.
16071
16072 2002-04-07 Akim Demaille <akim@epita.fr>
16073
16074 Use lib/hash for the symbol table.
16075
16076 * src/gram.c (ntokens): Initialize to 1, to reserve a slot for
16077 EOF.
16078 * src/lex.c (lex): Set the `number' member of new terminals.
16079 * src/reader.c (bucket_check_defined, bucket_make_alias)
16080 (bucket_check_alias_consistence, bucket_translation): New.
16081 (reader, grammar_free, readgram, token_translations_init)
16082 (packsymbols): Adjust.
16083 (reader): Number the predefined tokens.
16084 * src/reduce.c (inaccessable_symbols): Just use hard coded numbers
16085 for predefined tokens.
16086 * src/symtab.h (bucket): Remove all the hash table related
16087 members.
16088 * src/symtab.c (symtab): Replace by...
16089 (bucket_table): this.
16090 (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
16091 (buckets_new, buckets_do): New.
16092
16093 2002-04-07 Akim Demaille <akim@epita.fr>
16094
16095 * src/gram.c (nitems, nrules, nsyms, ntokens, nvars, nritems)
16096 (start_symbol, max_user_token_number, semantic_parser)
16097 (error_token_number): Initialize.
16098 * src/reader.c (grammar, start_flag, startval, typed, lastprec):
16099 Initialize.
16100 (reader): Don't.
16101 (errtoken, eoftoken, undeftoken, axiom): Extern.
16102
16103 2002-04-07 Akim Demaille <akim@epita.fr>
16104
16105 * src/gram.h (rule_s): prec and precsym are now pointers
16106 to the bucket giving the priority/associativity.
16107 Member `associativity' removed: useless.
16108 * src/reduce.c, src/conflicts.c: Adjust.
16109
16110 2002-04-07 Akim Demaille <akim@epita.fr>
16111
16112 * src/lalr.c, src/LR0.c, src/closure.c, src/gram.c, src/reduce.c:
16113 Properly escape the symbols' TAG when outputting them.
16114
16115 2002-04-07 Akim Demaille <akim@epita.fr>
16116
16117 * src/lalr.h (LA): Is a bitsetv, not bitset*.
16118
16119 2002-04-07 Akim Demaille <akim@epita.fr>
16120
16121 * src/lalr.h, src/lalr.c (LAruleno): Replace with...
16122 (LArule): this, which is an array to rule_t*.
16123 * src/print.c, src/conflicts.c: Adjust.
16124
16125 2002-04-07 Akim Demaille <akim@epita.fr>
16126
16127 * src/gram.h (rule_t): Rename `number' as `user_number'.
16128 `number' is a new member.
16129 Adjust dependencies.
16130 * src/reduce.c (reduce_grammar_tables): Renumber rule_t.number.
16131
16132 2002-04-07 Akim Demaille <akim@epita.fr>
16133
16134 As a result of the previous patch, it is no longer needed
16135 to reorder ritem itself.
16136
16137 * src/reduce.c (reduce_grammar_tables): Don't sort RITEM.
16138
16139 2002-04-07 Akim Demaille <akim@epita.fr>
16140
16141 Be sure never to walk through RITEMS, but use only data related to
16142 the rules themselves. RITEMS should be banished.
16143
16144 * src/output.c (output_token_translations): Rename as...
16145 (prepare_tokens): this.
16146 In addition to `translate', prepare the muscles `tname' and
16147 `toknum', which were handled by...
16148 (output_rule_data): this.
16149 Remove, and move the remainder of its outputs into...
16150 (prepare_rules): this new routines, which also merges content from
16151 (output_gram): this.
16152 (prepare_rules): Be sure never to walk through RITEMS.
16153 (output_stos): Rename as...
16154 (prepare_stos): this.
16155 (output): Always invoke prepare_states, after all, just don't use it
16156 in the output if you don't need it.
16157
16158 2002-04-07 Akim Demaille <akim@epita.fr>
16159
16160 * src/LR0.c (new_state): Display `nstates' as the name of the
16161 newly created state.
16162 Adjust to initialize first_state and last_state if needed.
16163 Be sure to distinguish the initial from the final state.
16164 (new_states): Create the itemset of the initial state, and use
16165 new_state.
16166 * src/closure.c (closure): Now that the initial state has its
16167 items properly set, there is no need for a special case when
16168 creating `ruleset'.
16169
16170 As a result, now the rule 0, reducing to $axiom, is visible in the
16171 outputs. Adjust the test suite.
16172
16173 * tests/conflicts.at (Solved SR Conflicts)
16174 (Unresolved SR Conflicts): Adjust.
16175 * tests/regression.at (Web2c Report, Rule Line Numbers): Idem.
16176 * tests/conflicts.at (S/R in initial): New.
16177
16178 2002-04-07 Akim Demaille <akim@epita.fr>
16179
16180 * src/LR0.c (allocate_itemsets): Don't loop over ritem: loop over
16181 the RHS of the rules.
16182 * src/output.c (output_gram): Likewise.
16183
16184 2002-04-07 Akim Demaille <akim@epita.fr>
16185
16186 * src/gram.h (rule_t): `lhs' is now a pointer to the symbol's
16187 bucket.
16188 Adjust all dependencies.
16189 * src/reduce.c (nonterminals_reduce): Don't forget to renumber the
16190 `number' of the buckets too.
16191 * src/gram.h: Include `symtab.h'.
16192 (associativity): Move to...
16193 * src/symtab.h: here.
16194 No longer include `gram.h'.
16195
16196 2002-04-07 Akim Demaille <akim@epita.fr>
16197
16198 * src/gram.h, src/gram.c (rules_rhs_length): New.
16199 (ritem_longest_rhs): Use it.
16200 * src/gram.h (rule_t): `number' is a new member.
16201 * src/reader.c (packgram): Set it.
16202 * src/reduce.c (reduce_grammar_tables): Move the useless rules at
16203 the end of `rules', and count them out of `nrules'.
16204 (reduce_output, dump_grammar): Adjust.
16205 * src/print.c (print_grammar): It is no longer needed to check for
16206 the usefulness of a rule, as useless rules are beyond `nrules + 1'.
16207 * tests/reduce.at (Reduced Automaton): New test.
16208
16209 2002-04-07 Akim Demaille <akim@epita.fr>
16210
16211 * src/reduce.c (inaccessable_symbols): Fix a buglet: because of a
16212 lacking `+ 1' to nrules, Bison reported as useless a token if it
16213 was used solely to set the precedence of the last rule...
16214
16215 2002-04-07 Akim Demaille <akim@epita.fr>
16216
16217 * data/bison.c++, data/bison.simple: Don't output the current file
16218 name in #line, to avoid useless diffs between two identical
16219 outputs under different names.
16220
16221 2002-04-07 Akim Demaille <akim@epita.fr>
16222
16223 * src/closure.c, src/print.c, src/reader.c, src/reduce.c:
16224 Normalize loops to using `< nrules + 1', not `<= nrules'.
16225
16226 2002-04-07 Akim Demaille <akim@epita.fr>
16227
16228 * TODO: Update.
16229
16230 2002-04-07 Akim Demaille <akim@epita.fr>
16231
16232 * src/output.c, src/reader.c, src/symtab.c, src/symtab.h: Rename
16233 bucket.value as bucket.number.
16234
16235 2002-04-07 Akim Demaille <akim@epita.fr>
16236
16237 * src/closure.c, src/derives.c, src/gram.h, src/lalr.c,
16238 * src/nullable.c, src/output.c, src/print.c, src/print_graph.c,
16239 * src/reader.c, src/reduce.c: Let rule_t.rhs point directly to the
16240 RHS, instead of being an index in RITEMS.
16241
16242 2002-04-04 Paul Eggert <eggert@twinsun.com>
16243
16244 * doc/bison.texinfo: Update copyright date.
16245 (Rpcalc Lexer, Symbols, Token Decl): Don't assume ASCII.
16246 (Symbols): Warn about running Bison in one character set,
16247 but compiling and/or running in an incompatible one.
16248 Warn about character code 256, too.
16249
16250 2002-04-03 Paul Eggert <eggert@twinsun.com>
16251
16252 * src/bison.data (YYSTACK_ALLOC): Depend on whether
16253 YYERROR_VERBOSE is nonzero, not whether it is defined.
16254
16255 Merge changes from bison-1_29-branch.
16256
16257 2002-03-20 Paul Eggert <eggert@twinsun.com>
16258
16259 Merge fixes from Debian bison_1.34-1.diff.
16260
16261 * configure.in (AC_PREREQ): 2.53.
16262
16263 2002-03-20 Akim Demaille <akim@epita.fr>
16264
16265 * src/conflicts.c (log_resolution): Argument `resolution' is const.
16266
16267 2002-03-19 Paul Eggert <eggert@twinsun.com>
16268
16269 * src/bison.simple (YYCOPY): New macro.
16270 (YYSTACK_RELOCATE): Use it.
16271 Remove Type arg; no longer needed. All callers changed.
16272 (yymemcpy): Remove; no longer needed.
16273
16274 * Makefile.am (AUTOMAKE_OPTIONS): 1.6.
16275 * doc/Makefile.am (AUTOMAKE_OPTIONS): Remove.
16276
16277 2002-03-19 Akim Demaille <akim@epita.fr>
16278
16279 Test and fix the #line outputs.
16280
16281 * tests/atlocal.at (GCC): New.
16282 * tests/synclines.at (AT_TEST_SYNCLINE): New macro.
16283 (Prologue synch line, %union synch line, Postprologue synch line)
16284 (Action synch line, Epilogue synch line): New tests.
16285 * src/reader.c (parse_union_decl): Define the muscle stype_line.
16286 * data/bison.simple, data/bison.c++: Use it.
16287
16288 2002-03-19 Akim Demaille <akim@epita.fr>
16289
16290 * tests/regression.at (%nonassoc and eof, Unresolved SR Conflicts)
16291 (Solved SR Conflicts, %expect not enough, %expect right)
16292 (%expect too much): Move to...
16293 * tests/conflicts.at: this new file.
16294
16295 2002-03-19 Akim Demaille <akim@epita.fr>
16296
16297 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
16298 * data/bison.simple, data/bison.c++: Handle the `#define' part, so
16299 that we can move to enums for instance.
16300 * src/output.c (token_definitions_output): Output a list of
16301 `token-name, token-number' instead of the #define.
16302 (output_skeleton): Name this list `b4_tokens', not `b4_tokendefs'.
16303
16304 2002-03-14 Akim Demaille <akim@epita.fr>
16305
16306 Use Gettext 0.11.1.
16307
16308 2002-03-09 Robert Anisko <robert@lrde.epita.fr>
16309
16310 * data/bison.c++: Make the user able to add members to the generated
16311 parser by subclassing.
16312
16313 2002-03-05 Robert Anisko <robert@lrde.epita.fr>
16314
16315 * src/reader.c (read_additionnal_code): `c' should be an integer, not
16316 a character.
16317 Reported by Nicolas Tisserand and Nicolas Burrus.
16318
16319 2002-03-04 Robert Anisko <robert@lrde.epita.fr>
16320
16321 * src/reader.c: Warn about lacking semi-colons, do not complain.
16322
16323 2002-03-04 Robert Anisko <robert@lrde.epita.fr>
16324
16325 * data/bison.c++: Remove a debug line.
16326
16327 2002-03-04 Robert Anisko <robert@lrde.epita.fr>
16328
16329 * data/bison.c++: Unmerge value as yylval and value as yyval. Unmerge
16330 location as yylloc and location as yyloc. Use YYLLOC_DEFAULT, and
16331 provide a default implementation.
16332
16333 2002-03-04 Akim Demaille <akim@epita.fr>
16334
16335 * tests/input.at (Invalid $n, Invalid @n): Add the ending `;'.
16336 * tests/output.at (AT_CHECK_OUTPUT): Likewise.
16337 * tests/headers.at (AT_TEST_CPP_GUARD_H): Ditto.
16338 * tests/semantic.at (Parsing Guards): Similarly.
16339 * src/reader.at (readgram): Complain if the last rule is not ended
16340 with a semi-colon.
16341
16342 2002-03-04 Akim Demaille <akim@epita.fr>
16343
16344 * src/warshall.h, src/warshall.c (bitmatrix_print): Move to...
16345 * src/closure.c: here.
16346 (set_firsts): Use bitsetv_reflexive_transitive_closure instead of
16347 RTC.
16348 * src/warshall.h, src/warshall.c: Remove.
16349 * tests/sets.at (Broken Closure): Adjust.
16350
16351 2002-03-04 Akim Demaille <akim@epita.fr>
16352
16353 * src/output.c (output_skeleton): tempdir is const.
16354 bytes_read is unused.
16355
16356 2002-03-04 Akim Demaille <akim@epita.fr>
16357
16358 * lib/bbitset.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
16359 * lib/bitsetv.h, lib/ebitset.c, lib/lbitset.c, lib/sbitset.c:
16360 Update.
16361 From Michael Hayes.
16362
16363 2002-03-04 Akim Demaille <akim@epita.fr>
16364
16365 * src/closure.c (closure): `r' is unused.
16366
16367 2002-03-04 Akim Demaille <akim@epita.fr>
16368
16369 * tests/sets.at (Broken Closure): Add the ending `;'.
16370 * src/reader.at (readgram): Complain if a rule is not ended with a
16371 semi-colon.
16372
16373 2002-03-04 Akim Demaille <akim@epita.fr>
16374
16375 * src/conflicts.c (set_conflicts): Use bitset_disjoint_p.
16376 (count_sr_conflicts): Use bitset_count.
16377 * src/reduce.c (inaccessable_symbols): Ditto.
16378 (bits_size): Remove.
16379 * src/warshall.h, src/warshall.c: Convert to bitsetv.
16380
16381 2002-03-04 Akim Demaille <akim@epita.fr>
16382
16383 * src/closure.c, src/conflicts.c, src/lalr.c, src/print.c,
16384 * src/reduce.c: Remove the `bitset_zero's following the
16385 `bitset_create's, as now it is performed by the latter.
16386
16387 2002-03-04 Akim Demaille <akim@epita.fr>
16388
16389 * lib/bitset.c, lib/bitset.h, lib/bitsetv.c, lib/bitsetv.h,
16390 * lib/ebitset.c, lib/ebitset.h, lib/lbitset.c, lib/lbitset.h,
16391 * lib/sbitset.c, lib/sbitset.h, lib/bbitset.h: Update from the
16392 latest sources from Michael.
16393
16394 2002-03-04 Akim Demaille <akim@epita.fr>
16395
16396 * src/output.c (output): Don't free the grammar.
16397 * src/reader.c (grammar_free): New.
16398 * src/main.c (main): Call it and don't free symtab here.
16399
16400 2002-03-04 Akim Demaille <akim@epita.fr>
16401
16402 * src/lex.c (parse_percent_token): Be sure to 0-end token_buffer
16403 before returning.
16404 Reported by Benoit Perrot.
16405
16406 2002-03-04 Akim Demaille <akim@epita.fr>
16407
16408 Use bitset operations when possible, not loops over bits.
16409
16410 * src/conflicts.c (set_conflicts, count_sr_conflicts): Use
16411 bitset_or.
16412 * src/print.c (print_reductions): Use bitset_and, bitset_andn.
16413 * src/reduce.c (useless_nonterminals): Formatting changes.
16414 * src/warshall.c (TC): Use bitset_or.
16415
16416 2002-03-04 Akim Demaille <akim@epita.fr>
16417
16418 * src/lalr.h, src/lalr.c (tokensetsize): Remove, unused.
16419 * src/system.h (BITS_PER_WORD, WORDSIZE, SETBIT, RESETBIT, BITISSET):
16420 Ditto.
16421
16422 2002-03-04 Akim Demaille <akim@epita.fr>
16423
16424 * src/lalr.c (F): Now a bitset*.
16425 Adjust all dependencies.
16426
16427 2002-03-04 Akim Demaille <akim@epita.fr>
16428
16429 * src/conflicts.c (shiftset, lookaheadset): Now bitset.
16430 Adjust all dependencies.
16431
16432 2002-03-04 Akim Demaille <akim@epita.fr>
16433
16434 * src/L0.c, src/LR0.h (nstates): Be size_t.
16435 Adjust comparisons (signed vs unsigned).
16436 * src/conflics.c, src/lalr.c, src/lalr.h, src/output.c (LA): Now a
16437 bitset*.
16438 Adjust all dependencies.
16439
16440 2002-03-04 Akim Demaille <akim@epita.fr>
16441
16442 * src/closure.c (firsts): Now, also a bitset.
16443 Adjust all dependencies.
16444 (varsetsize): Remove, now unused.
16445 * src/warshall.h, src/warshall.c: Now work on arrays of bitsets.
16446
16447 2002-03-04 Akim Demaille <akim@epita.fr>
16448
16449 * src/print.c: Convert to use bitset.h, not hand coded iterations
16450 over ints.
16451
16452 2002-03-04 Akim Demaille <akim@epita.fr>
16453
16454 * src/reduce.c: Convert to use bitset.h, not hand coded BSet.
16455
16456 2002-03-04 Akim Demaille <akim@epita.fr>
16457
16458 * src/closure.c (ruleset): Be a bitset.
16459 (rulesetsize): Remove.
16460
16461 2002-03-04 Akim Demaille <akim@epita.fr>
16462
16463 * lib/bitset-int.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
16464 * lib/bitsetv.h, lib/ebitset.c, lib/ebitset.h, lib/lbitset.c,
16465 * lib/lbitset.h, lib/sbitset.c, lib/sbitset.h: New.
16466 * src/closure.c (fderives): Be an array of bitsets.
16467
16468 2002-02-28 Robert Anisko <robert@lrde.epita.fr>
16469
16470 * data/bison.c++: Merge the two generated headers. Insert a copyright
16471 notice in each output file.
16472
16473 2002-02-28 Akim Demaille <akim@epita.fr>
16474
16475 * data/bison.c++: Copy the prologue of bison.simple to fetch
16476 useful M4 definitions, such as b4_header_guard.
16477
16478 2002-02-25 Akim Demaille <akim@epita.fr>
16479
16480 * src/getargs.c (version): Give the name of the authors, and use a
16481 translator friendly scheme for the bgr
16482 copyright notice.
16483
16484 2002-02-25 Akim Demaille <akim@epita.fr>
16485
16486 * src/output.c (header_output): Remove, now handled completely via
16487 M4.
16488
16489 2002-02-25 Akim Demaille <akim@epita.fr>
16490
16491 * m4/m4.m4: New, from CVS Autoconf.
16492 * configure.in: Invoke it.
16493 * src/output.c (output_skeleton): Use its result instead of the
16494 hard coded name.
16495
16496 2002-02-25 Akim Demaille <akim@epita.fr>
16497
16498 * lib/tempname.c, lib/mkstemp.c, m4/mkstemp.m4: New, stolen from
16499 Fileutils 4.1.5.
16500 * configure.in: Invoke UTILS_FUNC_MKSTEMP.
16501 * src/output.c (output_skeleton): Use mkstemp to create a real
16502 temporary file.
16503 Move the filling of `skeleton' and its muscle to...
16504 (prepare): here.
16505 (output): Move the definition of the prologue muscle to...
16506 (prepare): here.
16507 * src/system.h (DEFAULT_TMPDIR): New.
16508
16509 2002-02-14 Paul Eggert <eggert@twinsun.com>
16510
16511 Remove the support for C++ namespace cleanliness; it was
16512 causing more problems than it was curing, since it didn't work
16513 properly on some nonstandard C++ compilers. This can wait
16514 for a proper C++ parser.
16515
16516 * NEWS: Document this.
16517 * doc/bison.texinfo (Bison Parser, Debugging): Remove special mention
16518 of C++, as it's treated like C now.
16519 * src/bison.simple (YYSTD): Remove.
16520 (YYSIZE_T, YYFPRINTF, YYPARSE_PARAM_ARG, YYPARSE_PARAM_DECL):
16521 Treat C++ just like Standard C instead of trying to support
16522 namespace cleanliness.
16523
16524 2002-02-14 Akim Demaille <akim@epita.fr>
16525
16526 * tests/regression.at (else): Adjust to Andreas' change.
16527
16528 2002-02-14 Akim Demaille <akim@epita.fr>
16529
16530 * lib/Makefile.am (EXTRA_DIST): Ship strnlen.c.
16531
16532 2002-02-13 Andreas Schwab <schwab@suse.de>
16533
16534 * src/output.c (output_rule_data): Don't output NULL, it might
16535 not be defined yet.
16536
16537 2002-02-11 Robert Anisko <robert@lrde.epita.fr>
16538
16539 * data/bison.c++ (YYDEBUG, YYERROR_VERBOSE): After the prologue.
16540 (Copyright notice): Update.
16541
16542 2002-02-11 Akim Demaille <akim@epita.fr>
16543
16544 * tests/regression.at (%nonassoc and eof): Don't include
16545 nonportable headers.
16546
16547 2002-02-08 Robert Anisko <robert@lrde.epita.fr>
16548
16549 * data/bison.c++: Correct error recovery. Make the user able to
16550 initialize the starting location.
16551
16552 2002-02-07 Akim Demaille <akim@epita.fr>
16553
16554 * tests/input.at: New.
16555
16556 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
16557
16558 * data/bison.c++: Replace some direct m4 expansions by constants. Be
16559 more consistent when naming methods and variables. Put preprocessor
16560 directives around tables only needed for debugging.
16561
16562 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
16563
16564 * data/bison.c++ (yy::b4_name::print_): New method, replaces yyprint in
16565 C++ parsers.
16566 (yy::b4_name::parse): Use print_.
16567
16568 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
16569
16570 * data/bison.c++ (yy::b4_name::parse): Error recovery is back.
16571
16572 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
16573
16574 * data/bison.c++ (yy::b4_name::error_): New method, replaces yyerror in
16575 C++ parsers.
16576 (yy::b4_name::parse): Build verbose error messages, and use error_.
16577
16578 2002-02-06 Robert Anisko <robert@lrde.epita.fr>
16579
16580 * data/bison.c++: Fix m4 quoting in comments.
16581
16582 2002-02-06 Robert Anisko <robert@lrde.epita.fr>
16583
16584 * data/bison.c++: Adjust the parser code. Fix some muscles that were
16585 not expanded by m4.
16586
16587 2002-02-05 Akim Demaille <akim@epita.fr>
16588
16589 * data/bison.c++: Adjust to the M4 back end.
16590 More is certainly needed.
16591
16592 2002-02-05 Akim Demaille <akim@epita.fr>
16593
16594 Give a try to M4 as a back end.
16595
16596 * lib/readpipe.c: New, from wdiff.
16597 * src/Makefile.am (DEFS): Define PKGDATADIR, not BISON_SIMPLE and
16598 BISON_HAIRY.
16599 * src/system.h (BISON_HAIRY, BISON_SIMPLE): Remove the DOS and VMS
16600 specific values. Now it is m4 that performs the lookup.
16601 * src/parse-skel.y: Remove.
16602 * src/muscle_tab.c, src/muscle_tab.h (muscles_m4_output): New.
16603 * src/output.c (actions_output, guards_output)
16604 (token_definitions_output): No longer keeps track of the output
16605 line number, hence remove the second argument.
16606 (guards_output): Check against the guard member of a rule, not the
16607 action member.
16608 Adjust callers.
16609 (output_skeleton): Don't look for the skeleton location, let m4 do
16610 that.
16611 Create `/tmp/muscles.m4'. This is temporary, a proper temporary
16612 file will be used.
16613 Invoke `m4' on m4sugar.m4, muscles.m4, and the skeleton.
16614 (prepare): Given that for the time being changesyntax is not
16615 usable in M4, rename the muscles using `-' to `_'.
16616 Define `defines_flag', `output_parser_name' and `output_header_name'.
16617 * src/output.h (actions_output, guards_output)
16618 (token_definitions_output): Adjust prototypes.
16619 * src/scan-skel.l: Instead of scanning the skeletons, it now
16620 processes the output of m4: `__oline__' and `#output'.
16621 * data/bison.simple: Adjust to be used by M4(sugar).
16622 * tests/Makefile.am: Use check_SCRIPTS to make sure `bison' is up
16623 to date.
16624 * tests/bison.in: Use the secrete envvar `BISON_PKGDATADIR'
16625 instead of the dead `BISON_SIMPLE' and `BISON_HAIRY'.
16626 * data/m4sugar/m4sugar.m4, data/m4sugar/version.m4: New,
16627 shamelessly stolen from CVS Autoconf.
16628
16629 2002-02-05 Akim Demaille <akim@epita.fr>
16630
16631 * lib/hash.c, lib/hash.h: Replace with Fileutils 4.1's version.
16632 * configure.in: Check for the declarations of free and malloc.
16633 * src/muscle_tab.c: Adjust.
16634
16635 2002-02-05 Akim Demaille <akim@epita.fr>
16636
16637 * src/muscle_tab.c (muscle_init): Don't default to NULL muscle
16638 which have no values.
16639
16640 2002-02-05 Akim Demaille <akim@epita.fr>
16641
16642 * src/bison.simple, src/bison.hairy, src/bison.c++: Move to...
16643 * data/: here.
16644
16645 2002-01-29 Paul Eggert <eggert@twinsun.com>
16646
16647 * src/bison.simple (YYSIZE_T): Do not define merely because
16648 YYSTACK_USE_ALLOCA is nonzero or alloca or _ALLOCA_H are defined.
16649 On some platforms, <alloca.h> does not declare YYSTD (size_t).
16650
16651 2002-01-27 Akim Demaille <akim@epita.fr>
16652
16653 Fix `%nonassoc and eof'.
16654
16655 * src/state.c (errs_dup): Aaaah! The failure was due to bytes
16656 which were not properly copied! Replace
16657 memcpy (res->errs, src->errs, src->nerrs);
16658 with
16659 memcpy (res->errs, src->errs, src->nerrs * sizeof (src->errs[0]));
16660 !!!
16661 * tests/regression.at (%nonassoc and eof): Adjust to newest
16662 Autotest: `.' is not in the PATH.
16663
16664 2002-01-27 Akim Demaille <akim@epita.fr>
16665
16666 * tests/sets.at (AT_EXTRACT_SETS): New.
16667 (Nullable): Use it.
16668 (Firsts): New.
16669
16670 2002-01-26 Akim Demaille <akim@epita.fr>
16671
16672 * tests/actions.at, tests/calc.at, tests/headers.at,
16673 * tests/torture.at: Adjust to the newest Autotest which no longer
16674 forces `.' in the PATH.
16675
16676 2002-01-25 Akim Demaille <akim@epita.fr>
16677
16678 * tests/regression.at (%nonassoc and eof): New.
16679 Suggested by Robert Anisko.
16680
16681 2002-01-24 Akim Demaille <akim@epita.fr>
16682
16683 Bison dumps core when trying to complain about broken input files.
16684 Reported by Cris van Pelt.
16685
16686 * src/lex.c (parse_percent_token): Be sure to set token_buffer.
16687 * tests/regression.at (Invalid input: 1, Invalid input: 2): Merge
16688 into...
16689 (Invalid inputs): Strengthen: exercise parse_percent_token.
16690
16691 2002-01-24 Robert Anisko <robert.anisko@epita.fr>
16692
16693 * src/Makefile.am: Add bison.c++.
16694 * src/bison.c++: New skeleton.
16695
16696 2002-01-21 Paolo Bonzini <bonzini@gnu.org>
16697
16698 * po/it.po: New.
16699
16700 2002-01-21 Kees Zeelenberg <kzlg@users.sourceforge.net>
16701
16702 * src/files.c (skeleton_find) [MSDOS]: Fix cp definition.
16703
16704 2002-01-20 Marc Autret <marc@gnu.org>
16705
16706 * src/files.c (compute_output_file_names): Fix
16707
16708 2002-01-20 Marc Autret <marc@gnu.org>
16709
16710 * tests/output.at: New test.
16711 * src/files.c (compute_base_names): Don't map extensions when
16712 the YACC flag is set, use defaults.
16713 Reported by Evgeny Stambulchik.
16714
16715 2002-01-20 Marc Autret <marc@gnu.org>
16716
16717 * src/system.h: Need to define __attribute__ away for non-GCC
16718 compilers as well (i.e., the vendor C compiler).
16719 Suggested by Albert Chin-A-Young.
16720
16721 2002-01-11 Tim Van Holder <tim.van.holder@pandora.be>
16722
16723 * lib/hash.h, lib/hash.c: Renamed __P to PARAMS and used the
16724 canonical definition.
16725 * src/system.h: Use the canonical definition for PARAMS (avoids
16726 a conflict with the macro from lib/hash.h).
16727
16728 2002-01-11 Akim Demaille <akim@epita.fr>
16729
16730 * configure.in: Use AC_FUNC_STRNLEN.
16731 Fixes the failures observed on AIX 4.3 by H.Merijn Brand.
16732
16733 2002-01-09 Akim Demaille <akim@epita.fr>
16734
16735 * src/files.c, src/files.h (output_infix): New.
16736 (tab_extension): Remove.
16737 (compute_base_names): Compute the former, drop the latter.
16738 * src/output.c (prepare): Insert the muscles `output-infix', and
16739 `output-suffix'.
16740 * src/parse-skel.y (string, string.1): New.
16741 (section.header): Use it.
16742 (section.yacc): Remove.
16743 (prefix): Remove too.
16744 * src/scan-skel.l: Adjust.
16745 * src/bison.simple, src/bison.hairy: Adjust.
16746
16747 2002-01-09 Akim Demaille <akim@epita.fr>
16748
16749 * configure.in (WERROR_CFLAGS): Compute it.
16750 * src/Makefile.am (CFLAGS): Pass it.
16751 * tests/atlocal.in (CFLAGS): Idem.
16752 * src/files.c: Fix a few warnings.
16753 (get_extension_index): Remove, unused.
16754
16755 2002-01-08 Akim Demaille <akim@epita.fr>
16756
16757 * src/getargs.c (AS_FILE_NAME): New.
16758 (getargs): Use it to convert DOSish file names.
16759 * src/files.c (base_name): Rename as full_base_name to avoid
16760 clashes with `base_name ()'.
16761 (filename_split): New.
16762 (compute_base_names): N-th rewrite, using filename_split.
16763
16764 2002-01-08 Akim Demaille <akim@epita.fr>
16765
16766 * lib/basename.c, lib/dirname.h, lib/dirname.c, lib/memrchr.c:
16767 New, stolen from the Fileutils 4.1.
16768 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
16769 * configure.in: Check for the presence of memrchr, and of its
16770 prototype.
16771
16772 2002-01-07 Tim Van Holder <tim.van.holder@pandora.be>
16773
16774 * lib/hash.h (__P): Added definition for this macro.
16775 * src/Makefile.am: Add parse-skel.c and scan-skel.c to
16776 BUILT_SOURCES, to ensure they are generated first.
16777 * src/parse-skel.y: Use YYERROR_VERBOSE instead of
16778 %error-verbose to allow bootstrapping with bison 1.30x.
16779
16780 2002-01-06 Akim Demaille <akim@epita.fr>
16781
16782 * src/reader.c (parse_braces): Don't fetch the next char, the
16783 convention is to fetch on entry.
16784 * tests/torture.at (GNU Cim Grammar): Reintroduce their weird
16785 'switch' without a following semicolon.
16786 * tests/regression.at (braces parsing): New.
16787
16788 2002-01-06 Akim Demaille <akim@epita.fr>
16789
16790 Bison is dead wrong in its RR conflict reports.
16791
16792 * tests/torture.at (GNU Cim Grammar): New.
16793 * src/conflicts.c (count_rr_conflicts): Fix.
16794
16795 2002-01-06 Akim Demaille <akim@epita.fr>
16796
16797 Creating package.m4 from configure.ac causes too many problems.
16798
16799 * tests/Makefile.am (package.m4): Create it by hand,
16800 AC_CONFIG_TESTDIR no longer does in the most recent CVS Autoconf.
16801
16802 2002-01-06 Akim Demaille <akim@epita.fr>
16803
16804 * src/Makefile.am (bison_SOURCES): Add parse-skel.h and
16805 skeleton.h.
16806
16807 2002-01-04 Paul Eggert <eggert@twinsun.com>
16808
16809 * doc/bison.texinfo (Debugging):
16810 Remove YYSTDERR; it's no longer defined or used.
16811 Also, s/cstdio.h/cstdio/.
16812
16813 2002-01-03 Akim Demaille <akim@epita.fr>
16814
16815 * tests/bison.in, tests/atlocal.in: Adjust to CVS Autoconf.
16816
16817 2002-01-03 Akim Demaille <akim@epita.fr>
16818
16819 * src/parse-skel.y (process_skeleton): Don't bind the parser's
16820 tracing code to --trace, wait for a better --trace option, with
16821 args.
16822
16823 2002-01-03 Akim Demaille <akim@epita.fr>
16824
16825 * src/bison.simple (YYSTDERR): Remove, replace `stderr'.
16826 The ISO C++ standard is extremely clear about it: stderr is
16827 considered a macro, not a regular symbol (see table 94 `Header
16828 <cstdio> synopsis', [lib.c.files] 27.8.2 C Library files).
16829 Therefore std:: does not apply to it. It still does with fprintf.
16830 Also, s/cstdio.h/cstdio/.
16831
16832 2002-01-03 Akim Demaille <akim@epita.fr>
16833
16834 * lib/quotearg.c: Use `#include "..."' instead of `#include <...>'
16835 for non system headers.
16836
16837 2002-01-02 Akim Demaille <akim@epita.fr>
16838
16839 Equip the skeleton chain with location tracking, runtime trace,
16840 pure parser and scanner.
16841
16842 * src/parse-skel.y: Request a pure parser, locations, and prefix
16843 renaming.
16844 (%union): Having several members with the same type does not help
16845 type mismatches, simplify.
16846 (YYPRINT, yyprint): New.
16847 (yyerror): ``Rename'' (there is a #define yyerror skel_error) as...
16848 (skel_error): this.
16849 Handle locations.
16850 * src/scan-skel.l: Adjust to these changes.
16851 * src/skeleton.h (LOCATION_RESET, LOCATION_LINES, LOCATION_STEP)
16852 (LOCATION_PRINT, skel_control_t): New.
16853
16854 2001-12-30 Akim Demaille <akim@epita.fr>
16855
16856 * src/parse-skel.y: Get rid of the shift/reduce conflict:
16857 replace `gb' with BLANKS.
16858 * src/scan-skel.l: Adjust.
16859
16860 2001-12-30 Akim Demaille <akim@epita.fr>
16861
16862 * src/system.h: We don't need nor want bcopy.
16863 Throw away MS-DOS crap: we don't need getpid.
16864 * configure.in: We don't need strndup. It was even causing
16865 problems: because Flex includes the headers *before* us,
16866 _GNU_SOURCE is not defined by config.h, and therefore strndup was
16867 not visible.
16868 * lib/xstrndup.c: New.
16869 * src/scan-skel.l: Use it.
16870 Be sure to initialize yylval.muscle member when scanning a MUSCLE.
16871 * src/parse-skel.y: Use %directives instead of #defines.
16872
16873 2001-12-30 Akim Demaille <akim@epita.fr>
16874
16875 * src/skeleton.h: New.
16876 * src/output.c (output_parser, output_master_parser): Remove, dead
16877 code.
16878 * src/output.h (get_lines_number, actions_output, guards_output)
16879 (token_definitions_output): Prototype them.
16880 * src/parse-skel.y: Add the license notice.
16881 Include output.h and skeleton.h.
16882 (process_skeleton): Returns void, and takes a single parameter.
16883 * src/scan-skel.l: Add the license notice.
16884 Include skeleton.h.
16885 Don't use %option yylineno: it seems that then Flex imagines
16886 REJECT has been used, and therefore it won't reallocate its
16887 buffers (which makes no other sense to me than a bug). It results
16888 in warnings for `unused: yy_flex_realloc'.
16889
16890 2001-12-30 Robert Anisko <robert.anisko@epita.fr>
16891
16892 * src/muscle_tab.h (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
16893 (MUSCLE_INSERT_PREFIX): ...to there.
16894 * src/output.c (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
16895 (MUSCLE_INSERT_PREFIX): Move from here...
16896
16897 * src/bison.hairy: Add a section directive. Put braces around muscle
16898 names. This parser skeleton is still broken, but Bison should not
16899 choke on a bad muscle 'syntax'.
16900 * src/bison.simple: Add a section directive. Put braces around muscle
16901 names.
16902
16903 * src/files.h (strsuffix, stringappend): Add declarations.
16904 (tab_extension): Add declaration.
16905 (short_base_name): Add declaration.
16906
16907 * src/files.c (strsuffix, stringappend): No longer static. These
16908 functions are used in the skeleton parser.
16909 (tab_extension): New.
16910 (compute_base_names): Use the computations done in this function
16911 to guess if the generated parsers should have '.tab' in their
16912 names.
16913 (short_base_name): No longer static.
16914
16915 * src/output.c (output_skeleton): New.
16916 (output): Disable call to output_master_parser, and give a try to
16917 a new skeleton handling system.
16918 (guards_output, actions_output): No longer static.
16919 (token_definitions_output, get_lines_number): No longer static.
16920
16921 * configure.in: Use AM_PROG_LEX and AC_PROG_YACC.
16922
16923 * src/Makefile.am (bison_SOURCES): Add scan-skel.l and
16924 parse-skel.y.
16925
16926 * src/parse-skel.y: New file.
16927 * src/scan-skel.l: New file.
16928
16929 2001-12-29 Akim Demaille <akim@epita.fr>
16930
16931 %name-prefix is broken.
16932
16933 * src/files.c (spec_name_prefix): Initialize to NULL, not to "yy".
16934 Adjust all dependencies.
16935 * tests/headers.at (export YYLTYPE): Strengthen this test: use
16936 %name-prefix.
16937
16938 Renaming yylval but not yylloc is not consistent. Now we do.
16939
16940 * src/bison.simple: Prefix yylloc if used.
16941 * doc/bison.texinfo (Decl Summary): Document that.
16942
16943 2001-12-29 Akim Demaille <akim@epita.fr>
16944
16945 * doc/bison.texinfo: Promote `%long-directive' over
16946 `%long_directive'.
16947 Remove all references to fixed-output-files, yacc is enough.
16948
16949 2001-12-29 Akim Demaille <akim@epita.fr>
16950
16951 * src/bison.simple: Define YYDEBUG and YYERROR_VERBOSE *after* the
16952 user prologue. These are defaults.
16953 * tests/actions.at (Mid-rule actions): Make sure the user can
16954 define YYDEBUG and YYERROR_VERBOSE.
16955
16956 2001-12-29 Akim Demaille <akim@epita.fr>
16957
16958 * src/output.c (header_output): Don't forget to export YYLTYPE and
16959 yylloc.
16960 * tests/headers.at (export YYLTYPE): New, make sure it does.
16961 * tests/regression.at (%union and --defines, Invalid CPP headers):
16962 Move to...
16963 * tests/headers.at: here.
16964
16965 2001-12-29 Akim Demaille <akim@epita.fr>
16966
16967 * src/gram.h (rule_s): Member `assoc' is of type `associativity'.
16968
16969 2001-12-29 Akim Demaille <akim@epita.fr>
16970
16971 * tests/actions.at (Mid-rule actions): Output on a single line
16972 instead of several.
16973
16974 2001-12-29 Akim Demaille <akim@epita.fr>
16975
16976 * doc/bison.texinfo: Formatting changes.
16977
16978 2001-12-29 Akim Demaille <akim@epita.fr>
16979
16980 Don't store the token defs in a muscle, just be ready to output it
16981 on command. Now possible via `symbols'. Fixes a memory leak.
16982
16983 * src/output.c (token_definitions_output): New.
16984 (output_parser, header_output): Use it.
16985 * src/reader.c (symbols_save): Remove.
16986
16987 2001-12-29 Akim Demaille <akim@epita.fr>
16988
16989 * src/bison.simple: Do not provide a default for YYSTYPE and
16990 YYLTYPE before the user's prologue. Otherwise it's hardly... a
16991 default.
16992
16993 2001-12-29 Akim Demaille <akim@epita.fr>
16994
16995 Mid-rule actions are simply... ignored!
16996
16997 * src/reader.c (readgram): Be sure to attach mid-rule actions to
16998 the empty-rule associated to the dummy symbol, not to the host
16999 rule.
17000 * tests/actions.at (Mid-rule actions): New.
17001
17002 2001-12-29 Akim Demaille <akim@epita.fr>
17003
17004 Memory leak.
17005
17006 * src/reader.c (reader): Free grammar.
17007
17008 2001-12-29 Akim Demaille <akim@epita.fr>
17009
17010 Memory leak.
17011
17012 * src/LR0.c (new_itemsets): Don't allocate `shift_symbol' here,
17013 since it allocates it for each state, although only one is needed.
17014 (allocate_storage): Do it here.
17015
17016 2001-12-29 Akim Demaille <akim@epita.fr>
17017
17018 * src/options.h, src/options.c (create_long_option_table): Rename
17019 as...
17020 (long_option_table_new): this, with a clearer prototype.
17021 (percent_table): Remove, unused,
17022 * src/getargs.c (getargs): Adjust.
17023
17024 2001-12-29 Akim Demaille <akim@epita.fr>
17025
17026 * src/LR0.c, src/conflicts.c, src/lalr.c, src/lalr.h, src/output.c
17027 * src/print.c, src/print_graph.c, src/state.h: Rename state_table
17028 as states.
17029
17030 2001-12-29 Akim Demaille <akim@epita.fr>
17031
17032 * src/lalr.c (build_relations): Rename `states' as `states1'.
17033 Sorry, I don't understand exactly what it is, no better name...
17034
17035 2001-12-29 Akim Demaille <akim@epita.fr>
17036
17037 * src/closure.c, src/conflicts.c, src/derives.c, src/gram.c
17038 * src/gram.h, src/lalr.c, src/nullable.c, src/output.c, src/print.c
17039 * src/print_graph.c, src/reader.c, src/reduce.c: Rename rule_table
17040 as rules.
17041
17042 2001-12-29 Akim Demaille <akim@epita.fr>
17043
17044 * src/gram.c (rprec, rprecsym, rassoc): Remove, unused since long
17045 ago.
17046
17047 2001-12-29 Akim Demaille <akim@epita.fr>
17048
17049 * src/reader.c, src/reader.h (user_toknums): Remove.
17050 Adjust all users to use symbols[i]->user_token_number.
17051
17052 2001-12-29 Akim Demaille <akim@epita.fr>
17053
17054 * src/gram.c, src/gram.h (sprec, sassoc): Remove.
17055 Adjust all users to use symbols[i]->prec or ->assoc.
17056
17057 2001-12-29 Akim Demaille <akim@epita.fr>
17058
17059 * src/reader.c, src/reader.h (tags): Remove.
17060 Adjust all users to use symbols[i]->tag.
17061
17062 2001-12-29 Akim Demaille <akim@epita.fr>
17063
17064 * src/gram.h, src/gram.c (symbols): New, similar to state_table
17065 and rule_table.
17066 * src/reader.c (packsymbols): Fill this table.
17067 Drop sprec.
17068 * src/conflicts.c (resolve_sr_conflict): Adjust.
17069 * src/reduce.c (reduce_grammar): Adjust: just sort symbols, a
17070 single table.
17071 Use symbols[i]->tag instead of tags[i].
17072
17073 2001-12-29 Akim Demaille <akim@epita.fr>
17074
17075 * tests/calc.at (_AT_DATA_CALC_Y): Also use %union.
17076 In addition, put a comment in there, to replace...
17077 * tests/regression.at (%union and C comments): Remove.
17078
17079 2001-12-29 Akim Demaille <akim@epita.fr>
17080
17081 * tests/regression.at (Web2c Actions): Blindly move the actual
17082 output as expected output. The contents *seem* right to me, but I
17083 can't pretend reading perfectly parser tables... Nonetheless, all
17084 the other tests pass correctly, the table look OK, even though the
17085 presence of `$axiom' is to be noted: AFAICS it is useless (but
17086 harmless).
17087
17088 2001-12-29 Akim Demaille <akim@epita.fr>
17089
17090 * src/reader.c (readgram): Don't add the rule 0 if there were no
17091 rules read. In other words, add it _after_ having performed
17092 grammar sanity checks.
17093 Fixes the `tests/regression.at (Invalid input: 1)' Failure.
17094
17095 2001-12-29 Akim Demaille <akim@epita.fr>
17096
17097 * tests/regression.at (Web2c Report): Catch up: the rule 0 is now
17098 visible, and some states have now a different number.
17099
17100 2001-12-29 Akim Demaille <akim@epita.fr>
17101
17102 * src/reader.c (readgram): Bind the initial rule's lineno to that
17103 of the first rule.
17104 * tests/regression.at (Rule Line Numbers, Unresolved SR Conflicts):
17105 (Solved SR Conflicts): Adjust rule 0's line number.
17106
17107 2001-12-29 Akim Demaille <akim@epita.fr>
17108
17109 Fix the `GAWK Grammar' failure.
17110
17111 * src/LR0.c (final_state): Initialize to -1 so that we do compute
17112 the reductions of the first state which was mistakenly confused
17113 with the final state because precisely final_state was initialized
17114 to 0.
17115 * tests/sets.at (Nullable): Adjust: state 0 does have lookaheads,
17116 now noticed by Bison.
17117 * tests/regression.at (Rule Line Numbers): Adjust: state 0 does
17118 have a reduction on $default.
17119
17120 2001-12-29 Akim Demaille <akim@epita.fr>
17121
17122 * src/gram.c (ritem_print): Be sure to subtract 1 when displaying
17123 rule line numbers.
17124 * src/closure.c (print_closure): Likewise.
17125 * src/derives.c (print_derives): Likewise.
17126 * tests/sets.at (Nullable): Adjust: the rule numbers are correct
17127 now.
17128
17129 2001-12-29 Akim Demaille <akim@epita.fr>
17130
17131 * src/lalr.c (lookaheads_print): New.
17132 (lalr): Call it when --trace-flag.
17133 * tests/sets.at (Nullable): Adjust: when tracing, the lookaheads
17134 are dumped.
17135
17136 2001-12-29 Akim Demaille <akim@epita.fr>
17137
17138 * src/derives.c (print_derives): Be sure to use `>= 0', not `> 0',
17139 when walking through ritem, even via rule->rhs.
17140 * src/reduce.c (dump_grammar, useful_production, reduce_output)
17141 (useful_production, useless_nonterminals): Likewise.
17142 (reduce_grammar_tables): Likewise, plus update nritems.
17143 * src/nullable.c (set_nullable): Likewise.
17144 * src/lalr.c (build_relations): Likewise.
17145 * tests/sets.at (Nullable): Adjust.
17146 Fortunately, now, the $axiom is no longer nullable.
17147
17148 2001-12-29 Akim Demaille <akim@epita.fr>
17149
17150 * src/LR0.c (generate_states): Use nritems, not nitems, nor using
17151 the 0-sentinel.
17152 * src/gram.c (ritem_longest_rhs): Likewise.
17153 * src/reduce.c (nonterminals_reduce): Likewise.
17154 * src/print_graph.c (print_graph): Likewise.
17155 * src/output.c (output_rule_data): Likewise.
17156 * src/nullable.c (set_nullable): Likewise.
17157
17158 2001-12-29 Akim Demaille <akim@epita.fr>
17159
17160 * src/output.c: Comment changes.
17161
17162 2001-12-27 Paul Eggert <eggert@twinsun.com>
17163
17164 * src/bison.simple (YYSTACK_ALLOC, YYSIZE_T): Remove special
17165 cases for non-GNU systems like AIX, HP-UX, SGI, Sun, and
17166 Sparc, as they were causing more porting problems than the
17167 (minor) performance improvement was worth.
17168
17169 Also, catch up with 1.31's YYSTD.
17170
17171 2001-12-27 Akim Demaille <akim@epita.fr>
17172
17173 * src/output.c (output_gram): Rely on nritems, not the
17174 0-sentinel. See below.
17175 Use -1 as separator, not 0.
17176 * src/bison.simple (yyparse): Subtract 1 to the rule numbers.
17177 Rely on -1 as separator in yyrhs, instead of 0.
17178 * tests/calc.at (AT_CHECK_CALC): Now, the parsers no longer issue
17179 twice `Now at end of input', therefore there are two lines less to
17180 expect.
17181
17182 2001-12-27 Akim Demaille <akim@epita.fr>
17183
17184 * tests/regression.at (Unresolved SR Conflicts):
17185 (Solved SR Conflicts, Rule Line Numbers): Adjust to the changes
17186 below.
17187
17188 2001-12-27 Akim Demaille <akim@epita.fr>
17189
17190 * src/LR0.c (new_state): Recognize the final state by the fact it
17191 is reached by eoftoken.
17192 (insert_start_shifting_state, insert_eof_shifting_state)
17193 (insert_accepting_state, augment_automaton): Remove, since now
17194 these states are automatically computed from the initial state.
17195 (generate_states): Adjust.
17196 * src/print.c: When reporting a rule number to the user, substract
17197 1, so that the axiom rule is rule 0, and the first user rule is 1.
17198 * src/reduce.c: Likewise.
17199 * src/print_graph.c (print_core): For the time being, just as for
17200 the report, depend upon --trace-flags to dump the full set of
17201 items.
17202 * src/reader.c (readgram): Once the grammar read, insert the rule
17203 0: `$axiom: START-SYMBOL $'.
17204 * tests/set.at: Adjust: rule 0 is now displayed, and since the
17205 number of the states has changed (the final state is no longer
17206 necessarily the last), catch up.
17207
17208 2001-12-27 Akim Demaille <akim@epita.fr>
17209
17210 Try to make the use of the eoftoken valid. Given that its value
17211 is 0 which was also used as a sentinel in ritem, (i) make sure >= 0
17212 is used instead of > 0 where appropriate, (ii), depend upon nritems
17213 instead of the 0-sentinel.
17214
17215 * src/gram.h, src/gram.c (nritems): New.
17216 Expected to be duplication of nitems, but for the time being...
17217 * src/reader.c (packgram): Assert nritems and nitems are equal.
17218 * src/LR0.c (allocate_itemsets, new_itemsets): Adjust.
17219 * src/closure.c (print_closure, print_fderives): Likewise.
17220 * src/gram.c (ritem_print): Likewise.
17221 * src/print.c (print_core, print_grammar): Likewise.
17222 * src/print_graph.c: Likewise.
17223
17224 2001-12-27 Akim Demaille <akim@epita.fr>
17225
17226 * src/main.c (main): If there are complains after grammar
17227 reductions, then output the report anyway if requested, then die.
17228 * src/symtab.c (bucket_new): Initialize `value' to -1, not 0.
17229 * src/reader.c (eoftoken): New.
17230 (parse_token_decl): If the token being defined has value `0', it
17231 is the eoftoken.
17232 (packsymbols): No longer hack `tags' to insert `$' by hand.
17233 Be sure to preserve the value of the eoftoken.
17234 (reader): Make sure eoftoken is defined.
17235 Initialize nsyms to 0: now eoftoken is created just like the others.
17236 * src/print.c (print_grammar): Don't special case the eof token.
17237 * src/regression.at: Adjust: `$' has value 0, not -1, which was a
17238 lie anyway, albeit pleasant.
17239 * tests/calc.at: Exercise error messages with eoftoken.
17240 Change the grammar so that empty input is invalid.
17241 Adjust expectations.
17242 When yyungeting, be sure to use a valid yylloc: use last_yylloc.
17243
17244 2001-12-27 Akim Demaille <akim@epita.fr>
17245
17246 * configure.in: Check the protos of strchr ans strspn.
17247 Replace strchr if needed.
17248 * src/system.h: Provide the protos of strchr, strspn and memchr if
17249 missing.
17250 * lib/strchr.c: New.
17251 * src/reader.c (symbols_save): Use strchr.
17252
17253 2001-12-27 Akim Demaille <akim@epita.fr>
17254
17255 * src/print.c, src/print_graph.c (escape): New.
17256 Use it to quote the TAGS outputs.
17257 * src/print_graph.c (print_state): Now errors are in red, and
17258 reductions in green.
17259 Prefer high to wide: output the state number on a line of its own.
17260
17261 2001-12-27 Akim Demaille <akim@epita.fr>
17262
17263 * src/state.h, src/state.c (reductions_new): New.
17264 * src/LR0.c (set_state_table): Let all the states have a
17265 `reductions', even if reduced to 0.
17266 (save_reductions): Adjust.
17267 * src/lalr.c (initialize_LA, initialize_lookaheads): Adjust.
17268 * src/print.c (print_reductions, print_actions): Adjust.
17269 * src/output.c (action_row): Adjust.
17270
17271 2001-12-27 Akim Demaille <akim@epita.fr>
17272
17273 * src/state.h, src/state.c (errs_new, errs_dup): New.
17274 * src/LR0.c (set_state_table): Let all the states have an errs,
17275 even if reduced to 0.
17276 * src/print.c (print_errs, print_reductions): Adjust.
17277 * src/output.c (output_actions, action_row): Adjust.
17278 * src/conflicts.c (resolve_sr_conflict): Adjust.
17279
17280 2001-12-27 Akim Demaille <akim@epita.fr>
17281
17282 * src/lalr.c (set_goto_map, initialize_F): Use SHIFT_SYMBOL.
17283
17284 2001-12-27 Akim Demaille <akim@epita.fr>
17285
17286 * src/conflicts.c, src/conflicts.h (print_reductions): Move to...
17287 * src/print.c: here.
17288 (lookaheadset, shiftset): New, used as additional storage by
17289 print_reductions.
17290 (print_results): Adjust.
17291 (print_shifts, print_gotos, print_errs): New, extracted from...
17292 (print_actions): here.
17293 * src/print_graph.c (print_actions): Remove dead code.
17294
17295 2001-12-27 Akim Demaille <akim@epita.fr>
17296
17297 * src/reader.c (copy_dollar, copy_at): Better checking of `n' in
17298 `$n' and `@n'.
17299
17300 2001-12-27 Akim Demaille <akim@epita.fr>
17301
17302 * src/lalr.c (add_lookback_edge): Use state_t instead of ints.
17303 (build_relations): Adjust.
17304
17305 2001-12-27 Akim Demaille <akim@epita.fr>
17306
17307 * src/lalr.c (set_goto_map): Remove a wrong but benign loop
17308 duplication.
17309
17310 2001-12-27 Akim Demaille <akim@epita.fr>
17311
17312 * src/reader.c (packgram): Catch nitems overflows.
17313
17314 2001-12-27 Akim Demaille <akim@epita.fr>
17315
17316 * src/files.c, src/files.h (guard_obstack): Remove.
17317 * src/output.c (output): Adjust.
17318 * src/reader.c (parse_braces): New, factoring...
17319 (copy_action, copy_guard): these two which are renamed as...
17320 (parse_action, parse_guard): these.
17321 As a voluntary consequence, using braces around guards is now
17322 mandatory.
17323
17324 2001-12-27 Akim Demaille <akim@epita.fr>
17325
17326 * src/gram.h (rule_t): `guard' and `guard_line' are new members.
17327 * src/reader.c (symbol_list): `guard' and `guard_line' are new
17328 members.
17329 (symbol_list_new): Adjust.
17330 (copy_action): action_line is the first line, not the last.
17331 (copy_guard): Just as for actions, store the `action' only, not
17332 the switch/case/break flesh.
17333 Don't parse the user action that might follow the guard, let...
17334 (readgram): do it, i.e., now, there can be an action after a
17335 guard.
17336 In other words the guard is just explicitly optional.
17337 (packgram): Adjust.
17338 * src/output.c (guards_output): New.
17339 (output_parser): Call it when needed.
17340 (output): Also free the guard and attrs obstacks.
17341 * src/files.c, src/files.h (obstack_save): Remove.
17342 (output_files): Remove.
17343 As a result, if one needs the former `.act' file, using an
17344 appropriate skeleton which requires actions and guards is now
17345 required.
17346 * src/main.c (main): Adjust.
17347 * tests/semantic.at: New.
17348 * tests/regression.at: Use `input.y' as input file name.
17349 Avoid 8+3 problems by requiring input.c when the test needs the
17350 parser.
17351
17352 2001-12-27 Akim Demaille <akim@epita.fr>
17353
17354 * src/reader.c (symbol_list_new): Be sure to initialize all the
17355 fields.
17356
17357 2001-12-27 Akim Demaille <akim@epita.fr>
17358
17359 All the hacks using a final pseudo state are now useless.
17360
17361 * src/LR0.c (set_state_table): state_table holds exactly nstates.
17362 * src/lalr.c (nLA): New.
17363 (initialize_LA, compute_lookaheads, initialize_lookaheads): Use it
17364 instead of lookaheadsp from the pseudo state (nstate + 1).
17365
17366 2001-12-27 Akim Demaille <akim@epita.fr>
17367
17368 * src/output.c (action_row, token_actions): Use a state_t instead
17369 of a integer, and nlookaheads instead of the following state's
17370 lookaheadsp.
17371
17372 2001-12-27 Akim Demaille <akim@epita.fr>
17373
17374 * src/conflicts.c (log_resolution, flush_shift)
17375 (resolve_sr_conflict, set_conflicts, solve_conflicts)
17376 (count_sr_conflicts, count_rr_conflicts, conflicts_output)
17377 (conflicts_print, print_reductions): Use a state_t instead of an
17378 integer when referring to a state.
17379 As much as possible, depend upon nlookaheads, instead of the
17380 `lookaheadsp' member of the following state (since lookaheads of
17381 successive states are successive, the difference between state n + 1
17382 and n served as the number of lookaheads for state n).
17383 * src/lalr.c (add_lookback_edge): Likewise.
17384 * src/print.c (print_core, print_actions, print_state)
17385 (print_results): Likewise.
17386 * src/print_graph.c (print_core, print_actions, print_state)
17387 (print_graph): Likewise.
17388 * src/conflicts.h: Adjust.
17389
17390 2001-12-27 Akim Demaille <akim@epita.fr>
17391
17392 * src/bison.hairy: Formatting/comment changes.
17393 ANSIfy.
17394 Remove `register' indications.
17395 Add plenty of `static'.
17396
17397 2001-12-27 Akim Demaille <akim@epita.fr>
17398
17399 * src/output.c (prepare): Drop the muscle `ntbase' which
17400 duplicates ntokens.
17401 * src/bison.simple: Formatting/comment changes.
17402 Use YYNTOKENS only, which is documented, but not YYNTBASE, which
17403 is an undocumented synonym.
17404
17405 2001-12-22 Akim Demaille <akim@epita.fr>
17406
17407 * src/output.c (output_table_data): Change the prototype to use
17408 `int' for array ranges: some invocations do pass an int, not a
17409 short.
17410 Reported by Wayne Green.
17411
17412 2001-12-22 Akim Demaille <akim@epita.fr>
17413
17414 Some actions of web2c.y are improperly triggered.
17415 Reported by Mike Castle.
17416
17417 * src/lalr.c (traverse): s/F (i)[k] = F (j)[k]/F (j)[k] = F (i)[k]/.
17418 * tests/regression.at (Web2c): Rename as...
17419 (Web2c Report): this.
17420 (Web2c Actions): New.
17421
17422 2001-12-22 Akim Demaille <akim@epita.fr>
17423
17424 Reductions in web2c.y are improperly reported.
17425 Reported by Mike Castle.
17426
17427 * src/conflicts.c (print_reductions): Fix.
17428 * tests/regression.at (Web2c): New.
17429
17430 2001-12-18 Akim Demaille <akim@epita.fr>
17431
17432 Some host fail on `assert (!"foo")', which expands to
17433 ((!"foo") ? (void)0 : __assert("!"foo."", __FILE__, __LINE__))
17434 Reported by Nelson Beebee.
17435
17436 * src/output.c, src/vcg.c: Replace `assert (!"it succeeded")' with
17437 `#define it_succeeded 0' and `assert (it_succeeded)'.
17438
17439 2001-12-17 Marc Autret <autret_m@epita.fr>
17440
17441 * src/bison.simple: Don't hard code the skeleton line and filename.
17442 * src/output.c (output_parser): Rename 'line' as 'output_line'.
17443 New line counter 'skeleton_line' (skeleton-line muscle).
17444
17445 2001-12-17 Paul Eggert <eggert@twinsun.com>
17446
17447 * NEWS, doc/bison.texinfo, doc/bison.1, doc/bison.rnh: Document that
17448 YYDEBUG must be defined to a nonzero value.
17449
17450 * src/bison.simple (yytname): Do not assume that the user defines
17451 YYDEBUG to a properly parenthesized expression.
17452
17453 2001-12-17 Akim Demaille <akim@epita.fr>
17454
17455 * src/state.h (state_t): Rename lookaheads as lookaheadsp.
17456 nlookaheads is a new member.
17457 Adjust all users.
17458 * src/lalr.h (nlookaheads): Remove this orphan declaration.
17459 * src/lalr.c (initialize_lookaheads): Set nlookaheads for each
17460 state.
17461
17462 2001-12-17 Akim Demaille <akim@epita.fr>
17463
17464 * src/files.h, src/files.c (open_files, close_files): Remove.
17465 * src/main.c (main): Don't open/close files, nor invoke lex_free,
17466 let...
17467 * src/reader.c (reader): Do it.
17468
17469 2001-12-17 Akim Demaille <akim@epita.fr>
17470
17471 * src/conflicts.c (print_reductions): Formatting changes.
17472
17473 2001-12-17 Akim Demaille <akim@epita.fr>
17474
17475 * src/conflicts.c (flush_shift): Also adjust lookaheadset.
17476 (flush_reduce): New.
17477 (resolve_sr_conflict): Adjust.
17478
17479 2001-12-17 Akim Demaille <akim@epita.fr>
17480
17481 * src/output.c (output_obstack): Be static and rename as...
17482 (format_obstack): this, to avoid any confusion with files.c's
17483 output_obstack.
17484 * src/reader.h (muscle_obstack): Move to...
17485 * src/output.h: here, since it's defined in output.c.
17486
17487 2001-12-17 Akim Demaille <akim@epita.fr>
17488
17489 * src/output.c (action_row, save_column, default_goto)
17490 (sort_actions, matching_state, pack_vector): Better variable
17491 locality.
17492
17493 2001-12-17 Akim Demaille <akim@epita.fr>
17494
17495 * src/output.c: Various formatting changes.
17496
17497 2001-12-17 Akim Demaille <akim@epita.fr>
17498
17499 * src/files.c (output_files): Free the output_obstack.
17500 * src/main.c (main): Call print and print_graph conditionally.
17501 * src/print.c (print): Work unconditionally.
17502 * src/print_graph.c (print_graph): Work unconditionally.
17503 * src/conflicts.c (log_resolution): Output only if verbose_flag.
17504
17505 2001-12-16 Marc Autret <autret_m@epita.fr>
17506
17507 * src/output.c (actions_output): Fix. When we use %no-lines,
17508 there is one less line per action.
17509
17510 2001-12-16 Marc Autret <autret_m@epita.fr>
17511
17512 * src/bison.simple: Remove a useless #line directive.
17513 s/#line %%line %%skeleton/#line %%line "%%parser-file-name"/'.
17514 * src/output.c (get_lines_number): New.
17515 (output_parser): Adjust, now takes care about the lines of a
17516 output muscles.
17517 Fix line numbering.
17518 (actions_output): Computes the number of lines taken by actions.
17519 (output_master_parser): Insert new skeleton which is the name of
17520 the output parser file name.
17521
17522 2001-12-15 Marc Autret <autret_m@epita.fr>
17523
17524 * src/bison.simple [YYERROR_VERBOSE]: Restore backward compatibility.
17525
17526 2001-12-15 Marc Autret <autret_m@epita.fr>
17527
17528 * src/output.c (output_gram): Keep track of the hairy one.
17529
17530 2001-12-15 Akim Demaille <akim@epita.fr>
17531
17532 Make `make distcheck' work.
17533
17534 * lib/Makefile.am (INCLUDES): Add top_srcdir/intl, since hash uses
17535 system.h which uses libgettext.h.
17536
17537 2001-12-15 Akim Demaille <akim@epita.fr>
17538
17539 * src/nullable.c (set_nullable): Useless rules must be skipped,
17540 otherwise, since we range over their symbols, we might look at a
17541 nonterminal which no longer ``exists'', i.e., it is not counted in
17542 `nvars', hence we overflow our arrays.
17543
17544 2001-12-15 Akim Demaille <akim@epita.fr>
17545
17546 The header can also be produced directly, without any obstack!
17547 Yahoo!
17548
17549 * src/files.c, src/files.h (defines_obstack): Remove.
17550 (compute_header_macro): Global.
17551 (defines_obstack_save): Remove.
17552 * src/reader.c (parse_union_decl): No longer output to
17553 defines_obstack: its content can be found in the `stype' muscle
17554 anyway.
17555 (output_token_translations): Merge into...
17556 (symbols_output): this.
17557 Rename as...
17558 (symbols_save): this.
17559 (reader): Adjust.
17560 * src/output.c (header_output): New.
17561 (output): Call it.
17562
17563 2001-12-15 Akim Demaille <akim@epita.fr>
17564
17565 * src/reader.c (parse_union_decl): Instead of handling two obstack
17566 simultaneously, use one to define the `stype' muscle, and use the
17567 value of the latter to fill defines_obstack.
17568 (copy_comment): Remove.
17569 (copy_comment2): Work for a single obstack.
17570 Rename as...
17571 (copy_comment): this.
17572
17573 2001-12-15 Akim Demaille <akim@epita.fr>
17574
17575 * src/lex.c, src/lex.h (xgetc): No longer static.
17576 * src/reader.c (parse_union_decl): Revamp.
17577
17578 2001-12-15 Akim Demaille <akim@epita.fr>
17579
17580 Still making progress in separating Bison into (i) input, (ii)
17581 process, (iii) output: now we can directly output the parser file
17582 without using table_obstack at all.
17583
17584 * src/files.c, src/files.h (table_obstack): Bye bye.
17585 (parser_file_name): New.
17586 * src/files.c (compute_output_file_names): Compute it.
17587 * src/output.c (actions_output, output_parser)
17588 (output_master_parser): To a file instead of an obstack.
17589
17590 2001-12-15 Akim Demaille <akim@epita.fr>
17591
17592 Attach actions to rules, instead of pre-outputting them to
17593 actions_obstack.
17594
17595 * src/gram.h (rule_t): action and action_line are new members.
17596 * src/reader.c (symbol_list): Likewise.
17597 (copy_action): Save the actions within the rule.
17598 (packgram): Save them in rule_table.
17599 * src/output.c (actions_output): New.
17600 (output_parser): Use it on `%%actions'.
17601 (output_rule_data): Don't free rule_table.
17602 (output): Do it.
17603 (prepare): Don't save the `action' muscle.
17604 * src/bison.simple: s/%%action/%%actions/.
17605
17606 2001-12-15 Akim Demaille <akim@epita.fr>
17607
17608 * src/reader.c (copy_action): When --yacc, don't append a `;'
17609 to the user action: let it fail if lacking.
17610 Suggested by Arnold Robbins and Tom Tromey.
17611
17612 2001-12-14 Akim Demaille <akim@epita.fr>
17613
17614 * src/lex.c (literalchar): Simply return the char you decoded, non
17615 longer mess around with obstacks and int pointers.
17616 Adjust all callers.
17617
17618 2001-12-14 Akim Demaille <akim@epita.fr>
17619
17620 * src/lex.c (literalchar): Don't escape the special characters,
17621 just decode them, and keep them as char (before, eol was output as
17622 the 2 char string `\n' etc.).
17623 * src/output.c (output_rule_data): Use quotearg to output the
17624 token strings.
17625
17626 2001-12-13 Paul Eggert <eggert@twinsun.com>
17627
17628 * src/bison.simple (YYSIZE_T, YYSTACK_ALLOC, YYSTACK_FREE):
17629 Do not infringe on the global user namespace when using C++.
17630 (YYFPRINTF, YYSTDERR): New macros, needed for the above.
17631 All uses of `fprintf' and `stderr' changed.
17632
17633 * doc/bison.texinfo: Document YYFPRINTF, YYSTDERR.
17634
17635 2001-12-13 Akim Demaille <akim@epita.fr>
17636
17637 The computation of nullable is broken: it doesn't handle empty
17638 RHS's properly.
17639
17640 * tests/torture.at (GNU AWK Grammar): New.
17641 * tests/sets.at (Nullable): New.
17642 * src/nullable.c (set_nullable): Instead of blindly looping over
17643 `ritems', loop over the rules, and then over their rhs's.
17644
17645 Work around Autotest bugs.
17646
17647 * src/warshall.c (bitmatrix_print): Don't use `+--+' as table
17648 frame, because Autotest understand lines starting with a `+' as
17649 traces from the shell. Then, they are not processed properly.
17650 Admittedly an Autotest bug, but we don't have time to wait for
17651 Autotest to catch up.
17652 * tests/regression.at (Broken Closure): Adjust to the new table
17653 frames.
17654 Move to...
17655 * tests/sets.at: here.
17656
17657 2001-12-13 Akim Demaille <akim@epita.fr>
17658
17659 * src/closure.c (closure): Use nrules instead of playing tricks
17660 with BITS_PER_WORD.
17661
17662 2001-12-13 Akim Demaille <akim@epita.fr>
17663
17664 * src/print.c (print_actions): Output the handling of `$' as the
17665 traces do: shifting the token EOF. Before EOF was treated as a
17666 nonterminal.
17667 * tests/regression.at: Adjust some tests.
17668 * src/print_graph.c (print_core): Complete the set of items via
17669 closure. The next-to-final and final states are still unsatisfying,
17670 but that's to be addressed elsewhere.
17671 No longer output the rule numbers, but do output the state number.
17672 A single loop for the shifts + gotos is enough, but picked a
17673 distinct color for each.
17674 (print_graph): Initialize and finalize closure.
17675
17676 2001-12-13 Akim Demaille <akim@epita.fr>
17677
17678 * src/reader.c (readgram): Remove dead code, an strip useless
17679 braces.
17680 (get_type): Remove, unused.
17681
17682 2001-12-12 Akim Demaille <akim@epita.fr>
17683
17684 * src/complain.h, src/complain.c: Remove error_one_per_line, rely
17685 on that of lib/error.c.
17686
17687 2001-12-12 Akim Demaille <akim@epita.fr>
17688
17689 Some hosts don't like `/' in includes.
17690
17691 * src/system.h: Include libgettext.h without qualifying the path.
17692 * src/Makefile.am (INCLUDES): Add $(top_srcdir)/intl, remove
17693 $(top_srcdir).
17694
17695 2001-12-11 Marc Autret <autret_m@epita.fr>
17696
17697 * src/output.c (output_parser): Remove useless muscle.
17698
17699 2001-12-11 Marc Autret <autret_m@epita.fr>
17700
17701 * src/bison.simple: Remove #line just before %%epilogue. It
17702 is now handled in ...
17703 * src/reader.c (read_additionnal_code): Add the output of a
17704 #line for the epilogue.
17705
17706 2001-12-10 Marc Autret <autret_m@epita.fr>
17707
17708 * src/reader.c (copy_definition): Re-use CPP-outed code which
17709 replace precedent remove.
17710 * src/bison.simple: Remove #line before %%prologue because
17711 %%input-line is wrong at this time.
17712
17713 2001-12-10 Marc Autret <autret_m@epita.fr>
17714
17715 * src/reader.c (symbols_output): Clean up.
17716 * src/output.c (output_gram, output): Clean up.
17717
17718 2001-12-10 Akim Demaille <akim@epita.fr>
17719
17720 * src/lalr.c (initialize_lookaheads): New. Extracted from...
17721 * src/LR0.c (set_state_table): here.
17722 * src/lalr.c (lalr): Call it.
17723
17724 2001-12-10 Akim Demaille <akim@epita.fr>
17725
17726 * src/state.h (shifts): Remove the `number' member: shifts are
17727 attached to state, hence no longer need to be labelled with a
17728 state number.
17729
17730 2001-12-10 Akim Demaille <akim@epita.fr>
17731
17732 Now that states have a complete set of members, the linked list of
17733 shifts is useless: just fill directly the state's shifts member.
17734
17735 * src/state.h (shifts): Remove the `next' member.
17736 * src/LR0.c (first_state, last_state): Remove.
17737 Adjust the callers.
17738 (augment_automaton): Don't look for the shifts that must be added
17739 a shift on EOF: it is those of the state we looked for! But now,
17740 since shifts are attached, it is no longer needed to looking
17741 merely by its id: its number.
17742
17743 2001-12-10 Akim Demaille <akim@epita.fr>
17744
17745 * src/LR0.c (augment_automaton): Better variable locality.
17746 Remove an impossible branch: if there is a state corresponding to
17747 the start symbol being shifted, then there is shift for the start
17748 symbol from the initial state.
17749
17750 2001-12-10 Akim Demaille <akim@epita.fr>
17751
17752 * src/LR0.c (augment_automaton): Call `insert_eof_shifting_state'
17753 only when appropriate: when insert_start_shifting_state' is not
17754 invoked.
17755 * tests/regression.at (Rule Line Numbers): Adjust.
17756
17757 2001-12-10 Akim Demaille <akim@epita.fr>
17758
17759 * src/LR0.c (augment_automaton): Now that all states have shifts,
17760 merge the two cases addition shifts to the initial state.
17761
17762 2001-12-10 Akim Demaille <akim@epita.fr>
17763
17764 * src/lalr.c (set_state_table): Move to...
17765 * src/LR0.c: here.
17766 * src/lalr.c (lalr): Don't call it...
17767 * src/LR0.c (generate_states): do it.
17768 * src/LR0.h (first_state): Remove, only the table is used.
17769
17770 2001-12-10 Akim Demaille <akim@epita.fr>
17771
17772 * src/LR0.h (first_shift, first_reduction): Remove.
17773 * src/lalr.c: Don't use first_shift: find shifts through the
17774 states.
17775
17776 2001-12-10 Akim Demaille <akim@epita.fr>
17777
17778 * src/LR0.c: Attach shifts to states as soon as they are
17779 computed.
17780 * src/lalr.c (set_state_table): Instead of assigning shifts to
17781 state, just assert that the mapping was properly done.
17782
17783 2001-12-10 Akim Demaille <akim@epita.fr>
17784
17785 * src/LR0.c (insert_start_shift): Rename as...
17786 (insert_start_shifting_state): this.
17787 (insert_eof_shifting_state, insert_accepting_state): New.
17788 (augment_automaton): Adjust.
17789 Better locality of the variables.
17790 When looking if the start_symbol is shifted from the initial
17791 state, using `while (... symbol != start_symbol ...)' sounds
17792 better than `while (... symbol < start_symbol ...)': If fail
17793 to see how the order between symbols could be relevant!
17794
17795 2001-12-10 Akim Demaille <akim@epita.fr>
17796
17797 * src/getargs.h: Don't declare `spec_name_prefix' and
17798 `spec_file_prefix', declared by src/files.h.
17799 * src/files.c, src/files.h: Default for spec_name_prefix is "yy".
17800 * src/muscle_tab.c (muscle_init): Default prefix to NULL.
17801 * src/output.c (prepare): Adjust.
17802 * src/reader.c (symbols_output): Likewise.
17803 * src/vmsgetargs.c: Vaguely adjust, but who cares?
17804
17805 2001-12-10 Akim Demaille <akim@epita.fr>
17806
17807 * src/muscle_tab.c (muscle_init): NULL is a better default than
17808 `"0"'.
17809
17810 2001-12-10 Akim Demaille <akim@epita.fr>
17811
17812 * src/reader.c (reader): Calling symbols_output once is enough.
17813
17814 2001-12-10 Akim Demaille <akim@epita.fr>
17815
17816 Now that states have a complete set of members, the linked list of
17817 reductions is useless: just fill directly the state's reductions
17818 member.
17819
17820 * src/state.h (struct reductions): Remove member `number' and
17821 `next'.
17822 * src/LR0.c (first_reduction, last_reduction): Remove.
17823 (save_reductions): Don't link the new reductions, store them in
17824 this_state.
17825 * src/lalr.c (set_state_table): No need to attach reductions to
17826 states, it's already done.
17827 * src/output.c (output_actions): No longer free the shifts, then
17828 the reductions, then the states: free all the states and their
17829 members.
17830
17831 2001-12-10 Akim Demaille <akim@epita.fr>
17832
17833 * src/options.c (OPTN, DRTV, BOTH): New.
17834 (option_table): Use them.
17835
17836 * src/muscle_tab.c: Don't include xalloc.h and string.h: that's
17837 the job of system.h.
17838 * src/options.c: Don't include stdio.h and xalloc.h for the same
17839 reasons.
17840
17841 2001-12-10 Akim Demaille <akim@epita.fr>
17842
17843 * src/output.c (output, prepare): Make sure the values of the
17844 muscles `action' and `prologue' are 0-terminated.
17845
17846 2001-12-10 Akim Demaille <akim@epita.fr>
17847
17848 Clean up GCC warnings.
17849
17850 * src/reader.c (copy_action): `buf' is not used.
17851 (parse_skel_decl): Be static.
17852 * src/muscle_tab.c (mhash1, mhash2, muscle_insert): Preserve `const'.
17853 * src/options.h (create_long_option_table): Have a real prototype.
17854 * lib/hash.c, lib/hash.h (hash_insert, hash_insert_at, hash_delete)
17855 (hash_delete_at): Return const void *.
17856 Adjust casts to preserve the const.
17857
17858 2001-12-10 Akim Demaille <akim@epita.fr>
17859
17860 * configure.in: Require 2.52g.
17861 M4 is not needed, but AUTOM4TE is.
17862 * m4/m4.m4: Remove.
17863 * tests/Makefile.am: Adjust.
17864
17865 2001-12-10 Akim Demaille <akim@epita.fr>
17866
17867 One structure for states is enough, even though theoretically
17868 there are LR(0) states and LALR(1) states.
17869
17870 * src/lalr.h (state_t): Remove.
17871 (state_table): Be state_t **, not state_t *.
17872 * src/state.h (core, CORE_ALLOC): Rename as...
17873 (state_t, STATE_ALLOC): this.
17874 Add the LALR(1) members: shifts, reductions, errs.
17875 * src/LR0.c (state_table): Rename as...
17876 (state_hash): this, to avoid name clashes with the global
17877 `state_table'.
17878 * src/print_graph.c, src/LR0.c, src/LR0.h, src/conflicts.c
17879 * src/lalr.c, src/lalr.h, src/output.c, src/print.c: Adjust.
17880
17881 2001-12-10 Akim Demaille <akim@epita.fr>
17882
17883 Bison dumps core on bash.y.
17884 Reported by Pascal Bart.
17885
17886 * src/warshall.c (bitmatrix_print): New.
17887 (TC): Use it.
17888 When performing a transitive closure R(i, j) && R(j, k) => R(i, k),
17889 j must be the outer loop.
17890 * tests/regression.at (Broken Closure): New.
17891
17892 2001-12-05 Akim Demaille <akim@epita.fr>
17893
17894 * tests/atlocal.in (CPPFLAGS): Do not leave a space between -I and
17895 its argument.
17896 Reported by Peter Hamorsky.
17897
17898 2001-12-05 Akim Demaille <akim@epita.fr>
17899
17900 * src/conflicts.c (err_table): Remove.
17901 (resolve_sr_conflict): Adjust.
17902 * src/lalr.h (state_t.reduction_table, state_t.shift_table):
17903 Rename as...
17904 (state_t.reductions, state_t.shifts): this.
17905
17906 2001-12-05 Akim Demaille <akim@epita.fr>
17907
17908 * src/reduce.c (reduce_grammar_tables): No longer disable the
17909 removal of useless rules via CPP but via `if (0)', so that the
17910 compiler still check the code is valid.
17911 For instance, it should have noticed `rline' no longer exists: use
17912 the `line' member of rule_t.
17913 * src/gram.c (dummy, rline): Remove, unused.
17914
17915 2001-12-05 Akim Demaille <akim@epita.fr>
17916
17917 * src/output.c (pack_vector): Use assert, not berror.
17918 * src/main.c (berror): Remove, unused.
17919
17920 2001-12-05 Akim Demaille <akim@epita.fr>
17921
17922 New experimental feature: if --verbose --trace output all the
17923 items of a state, not only its kernel.
17924
17925 * src/print.c (print_core): If `trace_flag', then invoke closure
17926 before outputting the items of the state (print_core is no longer
17927 a correct name them).
17928 (print_results): Invoke new_closure/free_closure if needed.
17929
17930 2001-12-05 Akim Demaille <akim@epita.fr>
17931
17932 * src/LR0.c (new_itemsets): Use nshifts only, not shiftcount.
17933 * src/closure.c, src/closure.h (itemsetsize): Rename as...
17934 (nitemset): for consistency with the rest of the project.
17935
17936 2001-12-05 Akim Demaille <akim@epita.fr>
17937
17938 * src/closure.c (print_closure): Improve.
17939 (closure): Use it for printing input and output.
17940
17941 2001-12-05 Akim Demaille <akim@epita.fr>
17942
17943 * src/closure.c (FIRSTS, FDERIVES): Adjust to reality: they are
17944 indexed by nonterminals.
17945
17946 2001-12-05 Akim Demaille <akim@epita.fr>
17947
17948 * src/warshall.c (TC, RTC): De-obsfucate (source reduced to 22% of
17949 what it was!).
17950 * src/warshall.h: Remove accidental duplication of the content.
17951
17952 2001-12-05 Akim Demaille <akim@epita.fr>
17953
17954 * src/closure.c (set_fderives): De-obfuscate.
17955
17956 2001-12-05 Akim Demaille <akim@epita.fr>
17957
17958 * src/closure.c (print_firsts, print_fderives): De-obfuscate.
17959
17960 2001-12-05 Akim Demaille <akim@epita.fr>
17961
17962 * src/closure.c (set_firsts): De-obfuscate.
17963
17964 2001-12-05 Akim Demaille <akim@epita.fr>
17965
17966 * src/output.c (action_row): De-obfuscate
17967 using the good o' techniques: arrays not pointers, variable
17968 locality, BITISSET, RESETBIT etc.
17969
17970 2001-12-05 Akim Demaille <akim@epita.fr>
17971
17972 Pessimize the code to simplify it: from now on, all the states
17973 have a valid SHIFTS, which NSHIFTS is possibly 0.
17974
17975 * src/LR0.c (shifts_new): Be global and move to..
17976 * src/state.c, src/state.h: here.
17977 * src/conflicts, src/lalr.c, src/output.c, src/print.c,
17978 * src/print_graph: Adjust.
17979
17980 2001-12-05 Akim Demaille <akim@epita.fr>
17981
17982 * src/state.h (SHIFT_DISABLE, SHIFT_IS_DISABLED): New.
17983 * src/conflicts.c: Use it.
17984 Restore a few missing `if (!SHIFT_IS_DISABLED)' which were
17985 incorrectly ``simplified''.
17986
17987 2001-12-05 Akim Demaille <akim@epita.fr>
17988
17989 * src/conflicts.c (flush_shift, resolve_sr_conflict): De-obfuscate
17990 using the good o' techniques: arrays not pointers, variable
17991 locality, BITISSET, RESETBIT etc.
17992
17993 2001-12-05 Akim Demaille <akim@epita.fr>
17994
17995 * src/state.h (SHIFT_SYMBOL): New.
17996 * src/conflicts.c: Use it to deobfuscate.
17997
17998 2001-12-05 Akim Demaille <akim@epita.fr>
17999
18000 * src/conflicts.c (count_sr_conflicts, count_rr_conflicts)
18001 (print_reductions): De-obfuscate using the good o' techniques:
18002 arrays not pointers, variable locality, BITISSET.
18003
18004 2001-12-05 Akim Demaille <akim@epita.fr>
18005
18006 * src/conflicts.c (print_reductions): Arrays, not pointers.
18007 Use BITISSET.
18008
18009 2001-12-05 Akim Demaille <akim@epita.fr>
18010
18011 * src/conflicts.c (print_reductions): Pessimize, but clarify.
18012
18013 2001-12-05 Akim Demaille <akim@epita.fr>
18014
18015 * src/conflicts.c (print_reductions): Improve variable locality.
18016
18017 2001-12-05 Akim Demaille <akim@epita.fr>
18018
18019 * src/conflicts.c (print_reductions): Pessimize, but clarify.
18020
18021 2001-12-05 Akim Demaille <akim@epita.fr>
18022
18023 * src/conflicts.c (print_reductions): Improve variable locality.
18024
18025 2001-12-05 Akim Demaille <akim@epita.fr>
18026
18027 * src/state.h (SHIFT_IS_ERROR, SHIFT_IS_GOTO, SHIFT_IS_SHIFT): New.
18028 * src/lalr.c: Use them.
18029
18030 2001-12-05 Akim Demaille <akim@epita.fr>
18031
18032 * src/LR0.c (augment_automaton): Formatting changes.
18033 Better variable locality.
18034
18035 2001-12-05 Akim Demaille <akim@epita.fr>
18036
18037 * src/lalr.c (matrix_print): New.
18038 (transpose): Use it.
18039 Use arrays instead of pointers.
18040
18041 2001-12-05 Akim Demaille <akim@epita.fr>
18042
18043 * src/lalr.c (maxrhs): Move to...
18044 * src/gram.c, src/gram.h (ritem_longest_rhs): here.
18045 * src/lalr.c (build_relations): Adjust.
18046
18047 2001-12-05 Akim Demaille <akim@epita.fr>
18048
18049 * src/lalr.c (transpose): Free the memory allocated to the
18050 argument, as it is replaced by the results by the unique caller.
18051 (build_relations): Merely invoke transpose: it handles the memory
18052 deallocation.
18053 Improve variable locality.
18054 Avoid variables used as mere abbreviations.
18055 (compute_lookaheads): Use arrays instead of pointers.
18056
18057 2001-12-05 Akim Demaille <akim@epita.fr>
18058
18059 * src/lalr.c (initialize_F): Improve variable locality.
18060 Avoid variables used as mere abbreviations.
18061
18062 2001-12-05 Akim Demaille <akim@epita.fr>
18063
18064 * src/derives.c (print_derives): Display the ruleno.
18065 * src/lalr.c (initialize_F, transpose): Better variable locality
18066 to improve readability.
18067 Avoid variables used as mere abbreviations.
18068
18069 2001-12-05 Akim Demaille <akim@epita.fr>
18070
18071 * src/lalr.c (traverse): Use arrays instead of pointers.
18072
18073 2001-12-05 Akim Demaille <akim@epita.fr>
18074
18075 * src/nullable.c (set_nullable): Use a for loop to de-obfuscate
18076 the handling of squeue.
18077 `symbol >= 0' is wrong now, use `rule_table[ruleno].useful'.
18078
18079 2001-12-05 Akim Demaille <akim@epita.fr>
18080
18081 Because useless nonterminals are now kept alive (instead of being
18082 `destroyed'), we now sometimes examine them, and store information
18083 related to them. Hence we need to know their number, and adjust
18084 memory allocations.
18085
18086 * src/reduce.c, src/reduce.h (nuseless_nonterminals): No longer
18087 static.
18088 * src/LR0.c (allocate_itemsets): The memory allocated to
18089 `symbol_count' was used for two different purpose: once to count
18090 the number of occurrences of each symbol, and later reassigned to
18091 `shift_symbol', containing the symbol that can be shifted from a
18092 given state.
18093 Deobfuscate, i.e., allocate, use and free `symbol_count' here
18094 only, and...
18095 (new_itemsets): Allocate `shift_symbol' here.
18096 (allocate_itemsets): symbol_count includes useless nonterminals.
18097 Make room for them.
18098 (free_storage): Use `free', not `XFREE', for pointers that cannot
18099 be null.
18100
18101 2001-12-05 Akim Demaille <akim@epita.fr>
18102
18103 * src/nullable.c (set_nullable): Deobfuscate the handling of
18104 ritem.
18105 `symbol >= 0' is wrong now, use `rule_table[ruleno].useful'.
18106
18107 2001-12-05 Akim Demaille <akim@epita.fr>
18108
18109 * src/gram.c, src/gram.h (ritem_print): New.
18110 * src/gram.c (dummy): Remove, now there is actual code in gram.c.
18111 (This useless function was defined only to work around VMS linkers
18112 that can't handle compilation units with variables only).
18113 * src/reduce.c (dump_grammar): Use it to trace the construction of
18114 ritem.
18115
18116 2001-12-04 Paul Eggert <eggert@twinsun.com>
18117
18118 * src/bison.simple (union yyalloc): Change member names
18119 to be the same as the stack names.
18120 (yyparse): yyptr is now union yyalloc *, not char *.
18121 (YYSTACK_RELOCATE): Likewise. This avoids a GCC warning,
18122 and may generate better code on some machines.
18123 (yystpcpy): Use prototype if __STDC__ is defined, not just
18124 if __cplusplus is defined.
18125
18126 2001-11-30 Akim Demaille <akim@epita.fr>
18127
18128 * configure.in (WARNING_CFLAGS): Add -Werror when possible.
18129 (CFLAGS): Do not include the WARNING_CFLAGS here, since GNU
18130 Gettext doesn't compile cleanly, and dies with -Werror.
18131 * src/Makefile.am, lib/Makefile.am, tests/atlocal.in (CFLAGS):
18132 Include WARNING_CFLAGS here.
18133 * lib/xstrdup.c: Include xalloc.h, so that xstrdup be declared
18134 before being defined.
18135
18136 2001-11-27 Paul Eggert <eggert@twinsun.com>
18137
18138 * lib/quotearg.h (quotearg_n, quotearg_n_style):
18139 First arg is int, not unsigned.
18140 * lib/quotearg.c (quotearg_n, quotearg_n_style): Likewise.
18141 (SIZE_MAX, UINT_MAX): New macros.
18142 (quotearg_n_options): Abort if N is negative.
18143 Avoid overflow check on hosts where size_t is 64 bits and int
18144 is 32 bits, as overflow is impossible there.
18145 Fix off-by-one typo that caused unnecessary reallocation.
18146
18147 2001-11-29 Paul Eggert <eggert@twinsun.com>
18148
18149 Name space cleanup in generated parser.
18150
18151 * doc/bison.texinfo (Bison Parser): Discuss system headers
18152 and their effect on the user name space.
18153
18154 * src/bison.simple:
18155 (YYSTACK_ALLOC, YYSTACK_FREE, union yyalloc, YYSTACK_GAP_MAX,
18156 YYSTACK_BYTES, YYSTACK_RELOCATE): Do not define unless necessary,
18157 i.e. unless ! defined (yyoverflow) || defined (YYERROR_VERBOSE).
18158
18159 (YYSIZE_T): New macro. Use it instead of size_t, to avoid infringing
18160 on user names when possible.
18161
18162 (YYSTACK_USE_ALLOCA): Do not define; just use any existing defn.
18163 Simplify test for whather <alloca.h> exists.
18164
18165 (<stdlib.h>): Include if we will use malloc, and if standard C or C++.
18166
18167 (<stdio.h>): Include if YYDEBUG.
18168
18169 (yymemcpy): Renamed from __yy_memcpy. Do not define unless
18170 ! defined (yyoverflow) && ! defined (yymemcpy).
18171
18172 (yymemcpy, yyparse): Rename local variables as needed so that
18173 they all begin with 'yy'.
18174
18175 (yystrlen, yystpcpy): New functions.
18176
18177 (YY_DECL_NON_LSP_VARIABLES): Renamed from _YY_DECL_VARIABLES.
18178 All uses changed.
18179
18180 (yyparse): size_t -> YYSIZE_T. Use yystrlen and yystpcpy
18181 instead of relying on string.h functions. Use YYSTACK_ALLOC
18182 and YYSTACK_FREE instead of malloc and free.
18183
18184 2001-11-30 Akim Demaille <akim@epita.fr>
18185
18186 * src/bison.simple (YYSTYPE, YYLTYPE): Move their definitions
18187 before their first uses.
18188 (YYBISON, YYPURE): Move to the top of the output.
18189
18190 2001-11-30 Akim Demaille <akim@epita.fr>
18191
18192 * tests/reduce.at (Useless Nonterminals): Fix.
18193
18194 2001-11-30 Akim Demaille <akim@epita.fr>
18195
18196 * src/bison.simple (YYSTACK_FREE): Use `do {;} while (0)' as empty
18197 if body instead of `;' to pacify GCC's warnings.
18198
18199 2001-11-30 Akim Demaille <akim@epita.fr>
18200
18201 Instead of mapping the LHS of unused rules to -1, keep the LHS
18202 valid, but flag the rules as invalid.
18203
18204 * src/gram.h (rule_t): `useful' is a new member.
18205 * src/print.c (print_grammar): Adjust.
18206 * src/derives.c (set_derives): Likewise.
18207 * src/reader.c (packgram, reduce_output): Likewise.
18208 * src/reduce.c (reduce_grammar_tables): Likewise.
18209 * tests/reduce.at (Underivable Rules, Useless Rules): New.
18210
18211 2001-11-30 Akim Demaille <akim@epita.fr>
18212
18213 * src/reduce.c (reduce_output): Formatting changes.
18214 * src/print.c (print_results, print_grammar): Likewise.
18215 * tests/regression.at (Rule Line Numbers)
18216 (Solved SR Conflicts, Unresolved SR Conflicts): Adjust.
18217
18218 2001-11-30 Akim Demaille <akim@epita.fr>
18219
18220 * src/reduce.c (nonterminals_reduce): Instead of throwing away
18221 useless nonterminals, move them at the end of the symbol arrays.
18222 (reduce_output): Adjust.
18223 * tests/reduce.at (Useless Nonterminals): Adjust.
18224
18225 2001-11-30 Akim Demaille <akim@epita.fr>
18226
18227 * src/reduce.c: Various comment/formatting changes.
18228 (nonterminals_reduce): New, extracted from...
18229 (reduce_grammar_tables): here.
18230 (reduce_grammar): Call nonterminals_reduce.
18231
18232 2001-11-29 Paul Eggert <eggert@twinsun.com>
18233
18234 * src/bison.simple (YYSTACK_REALLOC): Remove.
18235 (YYSTACK_ALLOC): Resurrect this macro, with its old meaning.
18236 (YYSTACK_FREE, YYSTACK_GAP_MAX, YYSTACK_BYTES, YYSTACK_RELOCATE):
18237 New macros.
18238 (union yyalloc): New type.
18239 (__yy_memcpy): Last arg is size_t, not unsigned int, to remove
18240 an arbitrary restriction on hosts where size_t is wider than int.
18241
18242 (yyparse): Don't dump core if alloca or malloc fails; instead, report
18243 a parser stack overflow. Allocate just one block of memory for all
18244 three stacks, instead of allocating three blocks; this typically is
18245 faster and reduces fragmentation.
18246
18247 Do not limit the number of items in the stack to a value that fits
18248 in 'int', as this is an arbitrary limit on hosts with 64-bit
18249 size_t and 32-bit int.
18250
18251 2001-11-29 Marc Autret <autret_m@epita.fr>
18252
18253 * tests/calc.at [AT_DATA_CALC_Y]: Use %error-verbose instead
18254 of defining YYERROR_VERBOSE.
18255 [AT_DATA]: $4 is now out of C declarations in the prologue.
18256
18257 2001-11-28 Marc Autret <autret_m@epita.fr>
18258
18259 * src/reader.c (parse_dquoted_param): New.
18260 (parse_skel_decl): Use it.
18261 * src/lex.h: Add its prototype.
18262 * src/lex.c (literalchar): Become not static.
18263
18264 2001-11-28 Marc Autret <autret_m@epita.fr>
18265
18266 * src/output.h: And put its extern declaration here.
18267 * src/output.c (error_verbose): Define here.
18268 (prepare): Echo name modification.
18269 * src/getargs.h: Clean its extern declaration.
18270 * src/getargs.c (error_verbose_flag): Remove.
18271 (getargs): Remove case 'e'.
18272 * src/options.c (option_table): 'error-verbose' is now seen as simple
18273 percent option.
18274 Include output.h.
18275
18276 * src/reader.c (read_declarations): Remove case tok_include.
18277 (parse_include_decl): Remove.
18278 * src/lex.h (token_t): Remove tok_include.
18279 * src/options.c (option_table): 'include' is now a simple command line
18280 option.
18281
18282 2001-11-28 Marc Autret <autret_m@epita.fr>
18283
18284 * src/bison.simple: Adjust muscle names.
18285 * src/muscle_tab.c (muscle_init): Also rename the muscles.
18286 * src/output.c (prepare): s/_/-/ for the muscles names.
18287 (output_parser): When scanning for a muscle, allow '-' instead of '_'.
18288
18289 2001-11-28 Marc Autret <autret_m@epita.fr>
18290
18291 * src/bison.simple: Fix debug.
18292 [YYERROR_VERBOSE]: Re-integrate as an internal macro.
18293
18294 2001-11-28 Akim Demaille <akim@epita.fr>
18295
18296 * src/LR0.c (shifts_new): New.
18297 (save_shifts, insert_start_shift, augment_automaton): Use it.
18298
18299 2001-11-28 Akim Demaille <akim@epita.fr>
18300
18301 * src/closure.c (closure): `b' and `ruleno' denote the same value:
18302 keep ruleno only.
18303
18304 2001-11-28 Akim Demaille <akim@epita.fr>
18305
18306 * src/closure.c (closure): Instead of looping over word in array
18307 then bits in words, loop over bits in array.
18308
18309 2001-11-28 Akim Demaille <akim@epita.fr>
18310
18311 * src/closure.c (closure): No longer optimize the special case
18312 where all the bits of `ruleset[r]' are set to 0, to make the code
18313 clearer.
18314
18315 2001-11-28 Akim Demaille <akim@epita.fr>
18316
18317 * src/closure.c (closure): `r' and `c' are new variables, used to
18318 de-obfuscate accesses to RULESET and CORE.
18319
18320 2001-11-28 Akim Demaille <akim@epita.fr>
18321
18322 * src/reduce.c (reduce_print): Use ngettext.
18323 (dump_grammar): Improve the trace accuracy.
18324
18325 2001-11-28 Akim Demaille <akim@epita.fr>
18326
18327 * src/reduce.c (dump_grammar): Don't translate trace messages.
18328
18329 2001-11-28 Akim Demaille <akim@epita.fr>
18330
18331 * tests/reduce.at (Useless Terminals, Useless Nonterminals): New.
18332 * src/reduce.c (reduce_grammar_tables): Do not free useless tags,
18333 as all tags are free'ed afterwards.
18334 From Enrico Scholz.
18335
18336 2001-11-27 Paul Eggert <eggert@twinsun.com>
18337
18338 * src/bison.simple (YYSTACK_REALLOC): Fix typo that caused us to
18339 use alloca when we didn't want to, and vice versa.
18340
18341 2001-11-27 Marc Autret <autret_m@epita.fr>
18342
18343 * src/muscle_tab.c (muscle_init): Remove 'verbose' muscle
18344 initialization.
18345 * src/output.c (prepare): Remove its update.
18346
18347 2001-11-27 Marc Autret <autret_m@epita.fr>
18348
18349 * tests/torture.at [AT_DATA]: Remove YYERROR_VERBOSE definition.
18350 Use %error-verbose.
18351
18352 2001-11-27 Marc Autret <autret_m@epita.fr>
18353
18354 * src/bison.simple: Remove YYERROR_VERBOSE using.
18355 Use %%error_verbose.
18356 (yyparse): Likewise.
18357 * src/output.c (prepare): Give its final value.
18358 * src/muscle_tab.c (muscle_init): Init new muscle 'error_verbose'.
18359 * src/getargs.h: Add its extern declaration.
18360 * src/getargs.c (error_verbose_flag): New int.
18361 (getargs): Update to catch new case.
18362 * src/options.c (option_table): 'error-verbose' is a new option.
18363 (shortopts): Update.
18364
18365 2001-11-27 Akim Demaille <akim@epita.fr>
18366
18367 * src/system.h: Use intl/libgettext.h.
18368 * src/Makefile.am (INCLUDES): Add -I $(top_srcdir).
18369
18370 2001-11-27 Akim Demaille <akim@epita.fr>
18371
18372 * tests/torture.at (Exploding the Stack Size with Malloc):
18373 s/YYSTACK_USE_ALLOCA_ALLOCA/YYSTACK_USE_ALLOCA/.
18374
18375 2001-11-27 Akim Demaille <akim@epita.fr>
18376
18377 * src/files.c: Include error.h.
18378 Reported by Hans Aberg.
18379
18380 2001-11-26 Marc Autret <autret_m@epita.fr>
18381
18382 * src/reader.c (parse_include_decl): New, not yet implemented.
18383 (read_declarations): Add case tok_include.
18384 * src/getargs.h (include): Add its extern definition.
18385 * src/getargs.c (include): New const char *.
18386 (getargs): Add case '-I'.
18387 * src/options.c (option_table): Add include as command line and
18388 percent option.
18389 * src/lex.h (token_t): Add tok_include.
18390
18391 2001-11-26 Akim Demaille <akim@epita.fr>
18392
18393 * src/reader.c (readgram): Make sure rules for mid-rule actions
18394 have a lineno equal to that of their host rule.
18395 Reported by Hans Aberg.
18396 * tests/regression.at (Rule Line Numbers): New.
18397
18398 2001-11-26 Akim Demaille <akim@epita.fr>
18399
18400 * src/LR0.c (allocate_itemsets): kernel_size contains ints, not
18401 size_ts.
18402
18403 2001-11-26 Akim Demaille <akim@epita.fr>
18404
18405 * src/complain.c, src/complain.h (error): Remove, provided by
18406 lib/error.[ch].
18407
18408 2001-11-26 Akim Demaille <akim@epita.fr>
18409
18410 * src/reader.c (read_declarations): Don't abort on tok_illegal,
18411 issue an error message.
18412 * tests/regression.at (Invalid %directive): New.
18413 Reported by Hans Aberg.
18414
18415 2001-11-26 Akim Demaille <akim@epita.fr>
18416
18417 * configure.in: Invoke AC_FUNC_OBSTACK and AC_FUNC_ERROR_AT_LINE.
18418 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
18419
18420 2001-11-26 Akim Demaille <akim@epita.fr>
18421
18422 * src/conflicts.c (conflicts_print): Don't complain at all when
18423 there are no reduce/reduce conflicts, and as many shift/reduce
18424 conflicts as expected.
18425 * tests/regression.at (%expect right): Adjust.
18426
18427 2001-11-23 Akim Demaille <akim@epita.fr>
18428
18429 * lib/alloca.c: Update, from fileutils.
18430
18431 2001-11-23 Akim Demaille <akim@epita.fr>
18432
18433 * lib/Makefile.am (libbison_a_LIBADD): Add @ALLOCA@.
18434
18435 2001-11-23 Akim Demaille <akim@epita.fr>
18436
18437 * src/system.h: Include alloca.h.
18438 * src/main.c (main) [C_ALLOCA]: Call alloca (0).
18439
18440 2001-11-23 Akim Demaille <akim@epita.fr>
18441
18442 * src/print_graph.c (print_actions): Remove `rule', unused.
18443 * src/LR0.c (kernel_size): Contain `int' instead of `size_t' to
18444 pacify GCC's signed < unsigned warnings.
18445 * src/closure.c (itemsetsize): Likewise.
18446 * src/reader.c (symbol_list_new): Static.
18447
18448 2001-11-23 Akim Demaille <akim@epita.fr>
18449
18450 Attaching lineno to buckets is stupid, since only one copy of each
18451 symbol is kept, only the line of the first occurrence is kept too.
18452
18453 * src/symtab.h, src/symtab.c (bucket): Remove the line member.
18454 * src/reader.c (rline_allocated): Remove, unused.
18455 (symbol_list): Have a `line' member.
18456 (symbol_list_new): New.
18457 (readgram): Use it.
18458 * src/print.c (print_grammar): Output the rule line numbers.
18459 * tests/regression.at (Solved SR Conflicts)
18460 (Unresolved SR Conflicts): Adjust.
18461 Reported by Hans Aberg.
18462
18463 2001-11-22 Marc Autret <autret_m@epita.fr>
18464
18465 * src/bison.simple [YYERROR_VERBOSE]: Force its value to be 1 or 0.
18466
18467 2001-11-22 Marc Autret <autret_m@epita.fr>
18468
18469 * src/muscle_tab.c (muscle_init): Remove initialization of
18470 skeleton muscle.
18471 * src/output.c (output_master_parser): Do it here.
18472
18473 2001-11-20 Akim Demaille <akim@epita.fr>
18474
18475 * po/sv.po: New.
18476 * configure.in (ALL_LINGUAS): Adjust.
18477 * po/POTFILE.in: Remove `nullable.c' and `derives.c' which no
18478 longer contains strings to translate.
18479
18480 2001-11-19 Akim Demaille <akim@epita.fr>
18481
18482 * src/conflicts.c (conflicts_print): Add a missing \n.
18483
18484 2001-11-19 Akim Demaille <akim@epita.fr>
18485
18486 * src/nullable.c (nullable_print): New.
18487 (set_nullable): Call it when tracing.
18488 Better locality of variables.
18489
18490 2001-11-19 Akim Demaille <akim@epita.fr>
18491
18492 * src/print.c (print_actions): Better locality of variables.
18493
18494 2001-11-19 Akim Demaille <akim@epita.fr>
18495
18496 * src/derives.c (print_derives): Fix and enrich.
18497 * src/closure.c (print_fderives): Likewise.
18498
18499 2001-11-19 Akim Demaille <akim@epita.fr>
18500
18501 * src/closure.c (itemsetend): Remove, replaced with...
18502 (itemsetsize): new.
18503
18504 2001-11-19 Akim Demaille <akim@epita.fr>
18505
18506 * src/LR0.c (kernel_end): Remove, replaced with...
18507 (kernel_size): new.
18508
18509 2001-11-19 Akim Demaille <akim@epita.fr>
18510
18511 * src/conflicts.c (set_conflicts): Use arrays instead of pointers
18512 to clarify.
18513
18514 2001-11-19 Akim Demaille <akim@epita.fr>
18515
18516 * src/closure.c (closure): Use arrays instead of pointers to clarify.
18517
18518 2001-11-19 Akim Demaille <akim@epita.fr>
18519
18520 * src/closure.c, src/derives.c, src/nullable.c: Adjust various
18521 trace messages.
18522 * src/LR0.c: Likewise.
18523 (allocate_itemsets): Use arrays instead of pointers to clarify.
18524
18525 2001-11-19 Akim Demaille <akim@epita.fr>
18526
18527 * src/getargs.c (statistics_flag): Replace with...
18528 (trace_flag): New.
18529 (longopts): Accept --trace instead of --statistics.
18530 * src/getargs.h, src/options.c: Adjust.
18531 * src/LR0.c, src/closure.c, src/derives.c, src/nullable.c,
18532 * src/reduce.c: Use trace_flags instead of the CPP conditional TRACE.
18533
18534 2001-11-19 Akim Demaille <akim@epita.fr>
18535
18536 * src/LR0.c (new_itemsets, get_state): Use more arrays and fewer
18537 pointers to clarify the code.
18538 (save_reductions, save_shifts): Factor common parts of alternatives.
18539
18540 2001-11-19 Akim Demaille <akim@epita.fr>
18541
18542 * src/LR0.c (new_state, get_state): Complete TRACE code.
18543 * src/closure.c: Include `reader.h' to get `tags', needed by the
18544 trace code.
18545 Rename the conditional DEBUG as TRACE.
18546 Output consistently TRACEs to stderr, not stdout.
18547 * src/derives.c: Likewise.
18548 * src/reduce.c: (inaccessable_symbols): Using if is better style
18549 than goto.
18550 Use `#if TRACE' instead of `#if 0' for tracing code.
18551
18552 2001-11-19 Akim Demaille <akim@epita.fr>
18553
18554 * src/system.h (LIST_FREE, shortcpy): New.
18555 * src/LR0.c: Use them.
18556 * src/output.c (free_itemsets, free_reductions, free_shifts):
18557 Remove, replaced by LIST_FREE.
18558
18559 2001-11-19 Akim Demaille <akim@epita.fr>
18560
18561 * src/state.h (CORE_ALLOC, SHIFTS_ALLOC, ERRS_ALLOC)
18562 (REDUCTIONS_ALLOC): New.
18563 * src/LR0.c, src/conflicts.c: Use them to de-obfuscate memory
18564 allocation.
18565
18566 2001-11-19 Akim Demaille <akim@epita.fr>
18567
18568 * src/LR0.c (new_state): Complete trace code.
18569 * src/nullable.c (set_nullable): Don't translate traces.
18570
18571 2001-11-19 Akim Demaille <akim@epita.fr>
18572
18573 * src/print_graph.c (print_core): Better locality of variables.
18574 * src/print.c (print_core): Likewise.
18575
18576 2001-11-19 Akim Demaille <akim@epita.fr>
18577
18578 * src/vcg.c: You do the output, so you are responsible of the
18579 handling of VCG syntax, in particular: use quotearg.
18580 * src/print_graph.c: Don't.
18581 (print_actions): Don't output the actions as part of the nodes,
18582 since that's the job of the edges.
18583 (print_state): Don't output by hand: fill the node description,
18584 and ask for its output.
18585
18586 2001-11-19 Akim Demaille <akim@epita.fr>
18587
18588 * src/bison.simple (yyparse): When verbosely reporting an error,
18589 no longer put additional quotes around token names.
18590 * tests/calc.at: Adjust.
18591
18592 2001-11-19 Akim Demaille <akim@epita.fr>
18593
18594 * src/symtab.h, src/symtab.c: `line' is a new member of `bucket'.
18595 * src/reader.c (record_rule_lines, rline, rline_allocated): Remove.
18596 * src/output.c: Adjust.
18597
18598 2001-11-19 Akim Demaille <akim@epita.fr>
18599
18600 * src/gram.h (rprec, rprecsym, rassoc): Remove, now part of...
18601 (rule_t): this.
18602 * src/conflicts.c, src/reader.c, src/reduce.c: Adjust.
18603
18604 2001-11-19 Akim Demaille <akim@epita.fr>
18605
18606 * src/gram.h (rule_t): New.
18607 (rule_table): New.
18608 (rrhs, rlhs): Remove, part of state_t.
18609 * src/print_graph.c, src/closure.c, src/conflicts.c, src/derives.c,
18610 * src/lalr.c, src/nullable.c, src/output.c, src/print.c,
18611 * src/reader.c, src/reduce.c: Adjust.
18612
18613 2001-11-19 Akim Demaille <akim@epita.fr>
18614
18615 * src/reader.c (symbols_output): New, extracted from...
18616 (packsymbols): Here.
18617 (reader): Call it.
18618
18619 2001-11-19 Akim Demaille <akim@epita.fr>
18620
18621 * src/lalr.c (set_maxrhs, maxrhs): Remove, replaced with...
18622 (maxrhs): this new function.
18623
18624 2001-11-19 Akim Demaille <akim@epita.fr>
18625
18626 * src/lalr.c (F): New macro to access the variable F.
18627 Adjust.
18628
18629 2001-11-19 Akim Demaille <akim@epita.fr>
18630
18631 * src/lalr.h (LA): New macro to access the variable LA.
18632 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
18633 * src/lalr.c: Adjust.
18634
18635 2001-11-19 Akim Demaille <akim@epita.fr>
18636
18637 * src/lalr.c (initialize_LA): Only initialize LA. Let...
18638 (set_state_table): handle the `lookaheads' members.
18639
18640 2001-11-19 Akim Demaille <akim@epita.fr>
18641
18642 * src/lalr.h (lookaheads): Removed array, whose contents is now
18643 a member of...
18644 (state_t): this structure.
18645 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
18646 Adjust.
18647
18648 2001-11-19 Akim Demaille <akim@epita.fr>
18649
18650 * src/lalr.h (consistent): Removed array, whose contents is now
18651 a member of...
18652 (state_t): this structure.
18653 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
18654 Adjust.
18655
18656 2001-11-19 Akim Demaille <akim@epita.fr>
18657
18658 * src/lalr.h (reduction_table, shift_table): Removed arrays, whose
18659 contents are now members of...
18660 (state_t): this structure.
18661 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
18662 Adjust.
18663
18664 2001-11-19 Akim Demaille <akim@epita.fr>
18665
18666 * src/lalr.h (state_t): New.
18667 (state_table): Be a state_t * instead of a core **.
18668 (accessing_symbol): Remove, part of state_t.
18669 * src/lalr.c: Adjust.
18670 (set_accessing_symbol): Merge into...
18671 (set_state_table): this.
18672 * src/print_graph.c, src/conflicts.c: Adjust.
18673
18674 2001-11-14 Akim Demaille <akim@epita.fr>
18675
18676 * tests/calc.at, tests/output.at, tests/regression.at,
18677 * tests/testsuite.at, tests/torture.at: Rely on Autotest 2.52g:
18678 now the tests are run in private dirs, therefore AC_CLEANUP and
18679 family can be simplified to 0-ary.
18680 * tests/atlocal.in: Now that we run `elsewhere' than in tests/,
18681 use abs. path to find config.h.
18682 * tests/calc.at (AT_CHECK_CALC): Don't try to check the compiler's
18683 stderr, there can be way too much random noise.
18684 Instead pass -Werror to GCC and rely on the exit status.
18685 Reported by Wolfram Wagner.
18686
18687 2001-11-14 Akim Demaille <akim@epita.fr>
18688
18689 * src/bison.simple (yyparse): Let yyls1, yyss1 and yyvs1 be
18690 defined only if yyoverflow is defined, to avoid `warning: unused
18691 variable `yyvs1''.
18692 Reported by The Test Suite.
18693
18694 2001-11-14 Akim Demaille <akim@epita.fr>
18695
18696 * src/print.c: Include reduce.h.
18697 Reported by Hans Aberg.
18698
18699 2001-11-14 Akim Demaille <akim@epita.fr>
18700
18701 * src/lex.c, src/lex.h (token_buffer, unlexed_token_buffer):
18702 Revert a previous patch: these are really const.
18703 * src/conflicts.c (conflict_report): Additional useless pair of
18704 braces to pacify GCC's warnings for `if () if () {} else {}'.
18705 * src/lex.c (parse_percent_token): Replace equal_offset with
18706 arg_offset.
18707 arg is const.
18708 Be sure to strdup `arg' when used, since there is no reason for
18709 token_buffer not to change.
18710
18711 2001-11-14 Akim Demaille <akim@epita.fr>
18712
18713 * src/system.h (EXIT_SUCCESS, EXIT_FAILURE): Ensure a proper
18714 definition.
18715 * src/main.c (main): Use them.
18716 Suggested by Hans Aberg.
18717
18718 2001-11-12 Akim Demaille <akim@epita.fr>
18719
18720 * src/system.h (ngettext): Now that we use ngettext, be sure to
18721 provide a default definition when NLS are not used.
18722
18723 2001-11-12 Akim Demaille <akim@epita.fr>
18724
18725 * doc/bison.texinfo: Use `$' as shell prompt, not `%'.
18726 Use @kbd to denote user input.
18727 (Language and Grammar): ANSIfy the example.
18728 Adjust its layout for info/notinfo.
18729 (Location Tracking Calc): Output error messages to stderr.
18730 Output locations in a more GNUtically correct way.
18731 Fix a couple of Englishos.
18732 Adjust @group/@end group pairs.
18733
18734 2001-11-12 Akim Demaille <akim@epita.fr>
18735
18736 %expect was not functioning at all.
18737
18738 * src/conflicts.c (expected_conflicts): Set to -1.
18739 (conflict_report): Use ngettext.
18740 (conflicts_print): Check %expect and make its violation an error.
18741 * doc/bison.texinfo (Expect Decl): Adjust.
18742 * configure.in (AM_GNU_GETTEXT): Ask for ngettext.
18743 * tests/regression.at (%expect not enough, %expect right)
18744 (%expect too much): New.
18745
18746 2001-11-12 Akim Demaille <akim@epita.fr>
18747
18748 * tests/regression.at (Conflicts): Rename as...
18749 (Unresolved SR Conflicts): this.
18750 (Solved SR Conflicts): New.
18751
18752 2001-11-12 Akim Demaille <akim@epita.fr>
18753
18754 * src/reduce.c (print_results): Rename as...
18755 (reduce_output): This.
18756 Output to OUT, passed as argument, instead of output_obstack.
18757 (dump_grammar): Likewise.
18758 (reduce_free): New.
18759 Also free V1.
18760 (reduce_grammar): No longer call reduce_output, since...
18761 * src/print.c (print_results): do it.
18762 * src/main.c (main): Call reduce_free;
18763
18764 2001-11-12 Akim Demaille <akim@epita.fr>
18765
18766 * src/conflicts.c (print_reductions): Accept OUT as argument.
18767 Output to it, not to output_obstack.
18768 * src/print.c (print_actions): Adjust.
18769
18770 2001-11-12 Akim Demaille <akim@epita.fr>
18771
18772 * src/conflicts.c (count_sr_conflicts, count_rr_conflicts): Return
18773 the result instead of using...
18774 (src_total, rrc_total, src_count, rrc_count): Remove.
18775 (any_conflicts): Remove.
18776 (print_conflicts): Split into...
18777 (conflicts_print, conflicts_output): New.
18778 * src/conflicts.h: Adjust.
18779 * src/main.c (main): Invoke both conflicts_output and conflicts_print.
18780 * src/print.c (print_grammar): Issue `\n' between two rules.
18781 * tests/regression.at (Conflicts): New.
18782 Reported by Tom Lane.
18783
18784 2001-11-12 Akim Demaille <akim@epita.fr>
18785
18786 * tests/regression.at (Invalid input): Remove, duplicate with
18787 ``Invalid input: 1''.
18788
18789 2001-11-12 Akim Demaille <akim@epita.fr>
18790
18791 * tests/torture.at (AT_DATA_STACK_TORTURE)
18792 (Exploding the Stack Size with Alloca)
18793 (Exploding the Stack Size with Malloc): New.
18794
18795 2001-11-12 Akim Demaille <akim@epita.fr>
18796
18797 * src/bison.simple (YYSTACK_REALLOC): New.
18798 (yyparse) [!yyoverflow]: Use it and free the old stack.
18799 Reported by Per Allansson.
18800
18801 2001-11-12 Pascal Bart <pascal.bart@epita.fr>
18802
18803 * src/bison.simple: Define type yystype instead of YYSTYPE, and
18804 define CPP macro, which substitute YYSTYPE by yystype.
18805 * src/reader.c (parse_union_decl): Output yystype/YYSTYPE as we do
18806 with yyltype/YYLTYPE. This allows inclusion of the generated
18807 header within the parser if the compiler, such as GGC, accepts
18808 multiple equivalent #defines.
18809 From Akim.
18810
18811 2001-11-05 Akim Demaille <akim@epita.fr>
18812
18813 * src/reader.c (symbols_output): New, extracted from...
18814 (packsymbols): here.
18815 (reader): Adjust.
18816
18817 2001-11-05 Akim Demaille <akim@epita.fr>
18818
18819 * src/lex.c (parse_percent_token): s/quotearg/quote/.
18820
18821 2001-11-05 Akim Demaille <akim@epita.fr>
18822
18823 * tests/regression.at (AT_TEST_CPP_GUARD_H): Adjust the clean up
18824 pattern.
18825
18826 2001-11-05 Akim Demaille <akim@epita.fr>
18827
18828 * src/options.h (struct option_table_struct): set_flags is void*.
18829 * src/options.c (longopts): Support `--output' and `%output'.
18830 (usage): Adjust.
18831 * src/lex.h (tok_setopt): Remove, replaced with...
18832 (tok_intopt, tok_stropt): these new guys.
18833 * src/lex.c (getopt.h): Not needed.
18834 (token_buffer, unlexed_token_buffer): Not const.
18835 (percent_table): Promote `-' over `_' in directive names.
18836 Active `%name-prefix', `file-prefix', and `output'.
18837 (parse_percent_token): Accept possible arguments to directives.
18838 Promote `-' over `_' in directive names.
18839
18840 2001-11-04 Akim Demaille <akim@epita.fr>
18841
18842 * doc/bison.texinfo (Decl Summary): Split the list into
18843 `directives for grammars' and `directives for bison'.
18844 Sort'em.
18845 Add description of `%name-prefix', `file-prefix', and `output'.
18846 Promote `-' over `_' in directive names.
18847 (Bison Options): s/%locactions/%locations/. Nice Freudian slip.
18848 Simplify the description of `--name-prefix'.
18849 Promote `-' over `_' in directive names.
18850 Promote `--output' over `--output-file'.
18851 Fix the description of `--defines'.
18852 * tests/output.at: Exercise %file-prefix and %output.
18853
18854 2001-11-02 Akim Demaille <akim@epita.fr>
18855
18856 * doc/refcard.tex: Update.
18857
18858 2001-11-02 Akim Demaille <akim@epita.fr>
18859
18860 * src/symtab.h (SUNDEF): New.
18861 * src/symtab.c (bucket_new): Init user_token_number to SUNDEF to
18862 stand for `uninitialized', instead of 0.
18863 * src/reader.c (packsymbols, parse_thong_decl): Adjust.
18864 * src/lex.c (lex): Adjust.
18865
18866 * tests/calc.at (_AT_DATA_CALC_Y): Declare a token for EOF.
18867 Number it 0.
18868 Let yylex return it instead of a plain 0.
18869 Reported by Dick Streefland.
18870
18871 2001-11-02 Akim Demaille <akim@epita.fr>
18872
18873 * tests/regression.at (Mixing %token styles): New test.
18874
18875 2001-11-02 Akim Demaille <akim@epita.fr>
18876
18877 * src/reader.c (parse_thong_decl): Formatting changes.
18878 (token_translations_init): New, extracted from...
18879 (packsymbols): Here.
18880 Adjust.
18881
18882 2001-11-01 Akim Demaille <akim@epita.fr>
18883
18884 * tests/regression.at (AT_TEST_CPP_GUARD_H): New.
18885 Check that `9foo.y' produces correct cpp guards.
18886 * src/files.c (compute_header_macro): Prepend `BISON_' to CPP
18887 guards.
18888 Reported by Wwp.
18889
18890 2001-11-01 Akim Demaille <akim@epita.fr>
18891
18892 * tests/regression.at (Invalid input: 2): New.
18893 * src/lex.c (unlexed_token_buffer): New.
18894 (lex, unlex): Adjust: when unlexing, be sure to save token_buffer
18895 too.
18896 Reported by Wwp.
18897
18898 2001-11-01 Akim Demaille <akim@epita.fr>
18899
18900 * tests/calc.at: Catch up with 1.30.
18901 * configure.in: Bump to 1.49a.
18902 Adjust to newer Autotest.
18903
18904 2001-10-19 Pascal Bart <pascal.bart@epita.fr>
18905
18906 * src/conflicts.c: Move global variables rrc_total and src_total ...
18907 (print_conflicts): here.
18908 * src/output.c (output): Free global variable user_toknums.
18909 * src/lex.c (token_obstack): Become static.
18910
18911 2001-10-18 Akim Demaille <akim@epita.fr>
18912
18913 * tests/atlocal.in (GCC): Add.
18914 * tests/calc.at: s/m4_match/m4_bmatch/.
18915 s/m4_patsubst/m4_bpatsubst/.
18916 (AT_CHECK_CALC): Check the compiler's stderr only if it's GCC.
18917 * configure.in: AC_SUBST(GCC).
18918
18919 2001-10-14 Marc Autret <autret_m@epita.fr>
18920
18921 * src/options.c (create_long_option_table): Fix.
18922
18923 2001-10-10 Akim Demaille <akim@epita.fr>
18924
18925 * src/bison.simple: Be sure to set YYSTACK_USE_ALLOCA.
18926
18927 2001-10-04 Akim Demaille <akim@epita.fr>
18928
18929 * src/reader.c (parse_union_decl): Push the caracters in
18930 union_obstack, not attrs_obstack.
18931
18932 2001-10-04 Akim Demaille <akim@epita.fr>
18933
18934 Merge in the branch 1.29.
18935
18936 * src/reader.c (packsymbols): Use a temporary obstack for
18937 `%%tokendef', since output_stack is already used elsewhere.
18938
18939 2001-10-02 Akim Demaille <akim@epita.fr>
18940
18941 Bump 1.29d.
18942
18943 2001-10-02 Akim Demaille <akim@epita.fr>
18944
18945 Version 1.29c.
18946
18947 2001-10-02 Akim Demaille <akim@epita.fr>
18948
18949 * tests/regression.at (Invalid CPP headers): New.
18950 From Alexander Belopolsky.
18951 * src/files.c (compute_header_macro): Map non alnum chars to `_'.
18952
18953 2001-10-02 Akim Demaille <akim@epita.fr>
18954
18955 * tests/regression.at (Invalid input): New.
18956 * src/lex.c (lex): Be sure to set `token_buffer' in any case.
18957 Reported by Shura.
18958
18959 2001-10-02 Akim Demaille <akim@epita.fr>
18960
18961 * tests/calc.at: Now that --debug works, the tests must be adjusted.
18962
18963 2001-10-02 Akim Demaille <akim@epita.fr>
18964
18965 * src/output.c (output_parser): Assert `skeleton'.
18966 * src/files.c (skeleton_find): Look harder for skeletons on DOSish
18967 systems.
18968 From Shura.
18969
18970 2001-10-01 Marc Autret <autret_m@epita.fr>
18971
18972 * src/lex.h: Echo modifications.
18973 * src/lex.c (unlex): Parameter is now token_t.
18974 From Hans Aberg.
18975
18976 2001-10-01 Marc Autret <autret_m@epita.fr>
18977
18978 * src/main.c: Include lex.h.
18979 From Hans Aberg.
18980
18981 2001-09-29 Akim Demaille <akim@epita.fr>
18982
18983 * src/getargs.c (longopts): `--debug' is `-t', not `-d'.
18984
18985 2001-09-28 Akim Demaille <akim@epita.fr>
18986
18987 * tests/testsuite.at: Update to newer Autotest.
18988 * tests/Makefile.am (EXTRA_DIST): bison is not to be shipped.
18989
18990 2001-09-27 Akim Demaille <akim@epita.fr>
18991
18992 Position independent wrapper.
18993
18994 * tests/bison: Remove.
18995 * tests/bison.in: New.
18996 * configure.in: Adjust.
18997
18998 2001-09-27 Paul Eggert <eggert@twinsun.com>
18999
19000 Port quotearg fixes from tar 1.13.24.
19001
19002 * lib/quotearg.c: BSD/OS 4.1 wchar.h requires FILE and struct
19003 tm to be declared.
19004 (HAVE_MBSINIT): Undef if !HAVE_MBRTOWC.
19005 (mbsinit): Define to 1 if !defined mbsinit && !HAVE_MBSINIT.
19006
19007 * m4/Makefile.am (EXTRA_DIST): Add mbrtowc.m4.
19008 * m4/mbrtowc.m4: New file.
19009 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Check for mbsinit and stddef.h.
19010 Use jm_FUNC_MBRTOWC instead of AC_CHECK_FUNCS(mbrtowc).
19011
19012 2001-09-27 Akim Demaille <akim@epita.fr>
19013
19014 Bump to 1.29c.
19015
19016 2001-09-27 Akim Demaille <akim@epita.fr>
19017
19018 Version 1.29b.
19019
19020 2001-09-25 Akim Demaille <akim@epita.fr>
19021
19022 * src/system.h: Include `xalloc.h'.
19023 Remove it from the C files.
19024 * src/files.c (output_files): Free the obstacks.
19025 * src/lex.c (init_lex): Rename as...
19026 (lex_init): this.
19027 (lex_free): New.
19028 * src/main.c (main): Use it.
19029
19030 2001-09-24 Marc Autret <autret_m@epita.fr>
19031
19032 * src/vcg.c (open_edge, close_edge, open_node, close_node): Change
19033 to output informations in fout (FILE*).
19034 (open_graph, close_graph): Likewise.
19035 (output_graph, output_edge, output_node): Likewise.
19036 * src/vcg.h: Update function prototypes.
19037 * src/print_graph.c (print_graph): Open output graph file.
19038 (print_actions): Adjust.
19039 * src/files.h: Remove extern declaration.
19040 * src/files.c: Remove graph_obstack declaration.
19041 (open_files): Remove graph_obstack initialization.
19042 (output_files): Remove graph_obstack saving.
19043
19044 2001-09-24 Marc Autret <autret_m@epita.fr>
19045
19046 * src/files.c (compute_output_file_names): Fix.
19047
19048 2001-09-24 Marc Autret <autret_m@epita.fr>,
19049 Akim Demaille <akim@epita.fr>
19050
19051 * src/reader.c (reader): Remove call to free_symtab ().
19052 * src/main.c (main): Call it here.
19053 Include symtab.h.
19054 * src/conflicts.c (initialize_conflicts): Rename as...
19055 (solve_conflicts): this.
19056 * src/print.c (print_core, print_actions, print_state)
19057 (print_grammar): Dump to a file instead a `output_obstack'.
19058 (print_results): Dump `output_obstack', and then proceed with the
19059 FILE *.
19060 * src/files.c (compute_output_file_names, close_files): New.
19061 (output_files): Adjust.
19062 * src/main.c (main): Adjust.
19063
19064 2001-09-23 Marc Autret <autret_m@epita.fr>
19065
19066 * src/files.c (compute_header_macro): Computes header macro name
19067 from spec_defines_file when given.
19068
19069 2001-09-23 Marc Autret <autret_m@epita.fr>
19070
19071 * src/files.c (output_files): Add default extensions.
19072
19073 2001-09-22 Akim Demaille <akim@epita.fr>
19074
19075 * src/conflicts.c (finalize_conflicts): Rename as...
19076 (free_conflicts): this.
19077
19078 2001-09-22 Akim Demaille <akim@epita.fr>
19079
19080 * src/gram.c (gram_free): Rename back as...
19081 (dummy): this.
19082 (output_token_translations): Free `token_translations'.
19083 * src/symtab.c (free_symtab): Free the tag field.
19084
19085 2001-09-22 Akim Demaille <akim@epita.fr>
19086
19087 Remove `translations' as it is always set to true.
19088
19089 * src/gram.h: Adjust.
19090 * src/reader.c (packsymbols, parse_token_decl): Adjust
19091 * src/print.c (print_grammar): Adjust.
19092 * src/output.c (output_token_translations): Adjust.
19093 * src/lex.c (lex): Adjust.
19094 * src/gram.c: Be sure the set pointers to NULL.
19095 (dummy): Rename as...
19096 (gram_free): this.
19097
19098 2001-09-22 Akim Demaille <akim@epita.fr>
19099
19100 * configure.in: Invoke AM_LIB_DMALLOC.
19101 * src/system.h: Use dmalloc.
19102 * src/LR0.c: Be sure to have pointers initialized to NULL.
19103 (allocate_itemsets): Allocate kernel_items only if needed.
19104
19105 2001-09-22 Akim Demaille <akim@epita.fr>
19106
19107 * configure.in: Bump to 1.29b.
19108 * tests/Makefile.am (DISTCLEANFILES): Add package.m4.
19109 * tests/calc.at (_AT_DATA_CALC_Y): #undef malloc so that we don't
19110 need xmalloc.c in calc.y.
19111 From Pascal Bart.
19112
19113 2001-09-21 Akim Demaille <akim@epita.fr>
19114
19115 Version 1.29a.
19116 * Makefile.maint, config/config.guess, config/config.sub,
19117 * config/missing: Update from masters.
19118 * tests/Makefile.am ($(srcdir)/$(TESTSUITE)): No longer depend
19119 upon package.m4.
19120 * configure.in (ALL_LINGUAS): Add `tr'.
19121
19122 2001-09-21 Akim Demaille <akim@epita.fr>
19123
19124 * tests/Makefile.am (package.m4): Move to...
19125 ($(srcdir)/$(TESTSUITE)): here.
19126
19127 2001-09-20 Akim Demaille <akim@epita.fr>
19128
19129 * src/complain.c: No longer try to be standalone: use system.h.
19130 Don't assume __STDC__ is defined to 1. Just test if it is defined.
19131 * src/complain.h: Likewise.
19132 * src/reduce.c (useless_nonterminals, inaccessable_symbols):
19133 Remove the unused variable `n'.
19134 From Albert Chin-A-Young.
19135
19136 2001-09-18 Marc Autret <autret_m@epita.fr>
19137
19138 * doc/bison.1: Update.
19139 * doc/bison.texinfo (Bison Options): Update --defines and --graph
19140 descriptions.
19141 (Option Cross Key): Update.
19142 Add --graph.
19143
19144 2001-09-18 Marc Autret <autret_m@epita.fr>
19145
19146 * tests/regression.at: New test (comment in %union).
19147
19148 2001-09-18 Marc Autret <autret_m@epita.fr>
19149
19150 * src/reader.c (parse_union_decl): Do not output '/'. Let copy_comment
19151 do that.
19152 Reported by Keith Browne.
19153
19154 2001-09-18 Marc Autret <autret_m@epita.fr>
19155
19156 * tests/output.at: Add tests for --defines and --graph.
19157
19158 2001-09-18 Marc Autret <autret_m@epita.fr>
19159
19160 * tests/output.at: Removes tests of %{header,src}_extension features.
19161
19162 2001-09-18 Akim Demaille <akim@epita.fr>
19163
19164 * tests/Makefile.am (package.m4): New.
19165 * tests/calc.at (_AT_CHECK_CALC): Just run `calc input'.
19166 (_AT_CHECK_CALC_ERROR): Likewise.
19167 Factor the `, ' part of verbose error messages.
19168
19169 2001-09-18 Marc Autret <autret_m@epita.fr>
19170
19171 * src/getargs.c (longopts): Declare --defines and --graph as options
19172 with optional arguments.
19173 * src/files.h: Add extern declarations.
19174 * src/files.c (spec_graph_file, spec_defines_file): New.
19175 (output_files): Update.
19176 Remove CPP-outed code.
19177
19178 2001-09-18 Marc Autret <autret_m@epita.fr>
19179
19180 Turn off %{source,header}_extension feature.
19181
19182 * src/files.c (compute_exts_from_gf): Update.
19183 (compute_exts_from_src): Update.
19184 (output_files): CPP-out useless code.
19185 * src/files.h: Remove {header,source}_extension extern declarations.
19186 * src/reader.c (parse_dquoted_param): CPP-out.
19187 (parse_header_extension_decl): Remove.
19188 (parse_source_extension_decl): Remove.
19189 (read_declarations): Remove cases tok_{hdrext,srcext}.
19190 * src/lex.c (percent_table): Remove {header,source}_extension entries.
19191 * src/lex.h (token_t): Remove tok_hdrext and tok_srcext.
19192
19193 2001-09-10 Akim Demaille <akim@epita.fr>
19194
19195 * tests/output.at (AT_CHECK_BISON_FLAGS, AT_CHECK_BISON_PERCENT):
19196 (AT_CHECK_BISON_PERCENT_FLAGS): Merge into...
19197 (AT_CHECK_OUTPUT): this.
19198 Merely check ls' exit status, its output is useless.
19199
19200 2001-09-10 Akim Demaille <akim@epita.fr>
19201
19202 * tests/calc.at: Use m4_match.
19203 (_AT_DATA_CALC_Y): Check `yyin != NULL', not `stdin != NULL'.
19204
19205 2001-09-10 Marc Autret <autret_m@epita.fr>,
19206 Akim Demaille <akim@epita.fr>
19207
19208 * src/vcg.h (graph_s): color, textcolor, bordercolor are now
19209 enum color_e.
19210 * src/print_graph.c (print_graph): Initalize graph.layoutalgorithm
19211 to `normal'.
19212 * src/reader.c (parse_token_decl): Initialize token with tok_eof.
19213 * src/lex.h: Adjust prototype.
19214 (token_t): Add `tok_undef'.
19215 * src/lex.c (struct percent_table_struct): Retval is now a token_t.
19216 (parse_percent_token): Now returns token_t.
19217 Add default statement in switch.
19218 (lex): Separate `c' as an input variable, from the token_t result
19219 part.
19220 (unlexed): Is a token_t.
19221
19222 2001-09-10 Akim Demaille <akim@epita.fr>
19223
19224 * configure.in: Bump to 1.29a.
19225
19226 2001-09-07 Akim Demaille <akim@epita.fr>
19227
19228 Version 1.29.
19229
19230 2001-08-30 Akim Demaille <akim@epita.fr>
19231
19232 * tests/atgeneral.m4, tests/atconfig.in, tests/suite.at: Remove.
19233 * m4/atconfig.m4: Remove.
19234 * tests/testsuite.at, tests/atlocal.in, tests/output.at,
19235 * tests/bison: New.
19236 * tests/regression.at, tests/calc.at: Use m4_define, AT_BANNER,
19237 m4_if, m4_patsubst, and m4_regexp.
19238 * tests/calc.at (_AT_CHECK_CALC, _AT_CHECK_CALC_ERROR): Use an
19239 `input' file instead of echo.
19240
19241 2001-08-29 Akim Demaille <akim@epita.fr>
19242
19243 Bump to 1.28e.
19244
19245 2001-08-29 Akim Demaille <akim@epita.fr>
19246
19247 Version 1.28d.
19248
19249 2001-08-29 Paul Eggert <eggert@twinsun.com>
19250
19251 * src/bison.simple (yyparse): Don't take the address of an
19252 item before the start of an array, as that doesn't conform to
19253 the C Standard.
19254
19255 2001-08-29 Robert Anisko <anisko_r@epita.fr>
19256
19257 * doc/bison.texinfo (Location Tracking Calc): New node.
19258
19259 2001-08-29 Paul Eggert <eggert@twinsun.com>
19260
19261 * src/output.c (output): Do not define const, as this now
19262 causes more problems than it cures.
19263
19264 2001-08-29 Akim Demaille <akim@epita.fr>
19265
19266 * doc/bison.texinfo: Modernize `@node' and `@top' use: just name
19267 the nodes.
19268 Be sure to tag the `detailmenu'.
19269
19270 2001-08-29 Akim Demaille <akim@epita.fr>
19271
19272 * Makefile.maint (do-po-update): Wget refuses to overwrite files:
19273 download in a tmp dir.
19274
19275 2001-08-28 Marc Autret <autret_m@epita.fr>
19276
19277 * config/depcomp: New file.
19278
19279 2001-08-28 Marc Autret <autret_m@epita.fr>
19280
19281 * doc/bison.1 (mandoc): Adjust.
19282 From Juan Manuel Guerrero.
19283
19284 2001-08-28 Marc Autret <autret_m@epita.fr>
19285
19286 * src/print_graph.c (print_state): Fix.
19287
19288 2001-08-27 Marc Autret <autret_m@epita.fr>
19289
19290 * src/vcg.h (classname_s, infoname_s, node_s): Constify the
19291 char * members.
19292 Echo modifications to the functions prototypes.
19293 * src/vcg.c (add_classname, add_infoname): Adjust arguments.
19294
19295 2001-08-27 Marc Autret <autret_m@epita.fr>
19296
19297 * src/vcg.c: Include `xalloc.h'.
19298 (add_colorentry): New.
19299 (add_classname): New.
19300 (add_infoname): New.
19301 * src/vcg.h: Add new prototypes.
19302
19303 2001-08-27 Akim Demaille <akim@epita.fr>
19304
19305 * Makefile.maint: Sync. again with CVS Autoconf.
19306
19307 2001-08-27 Akim Demaille <akim@epita.fr>
19308
19309 * Makefile.maint: Formatting changes.
19310 (po-update, cvs-update, update): New targets.
19311 (AMTAR): Remove.
19312
19313 2001-08-27 Akim Demaille <akim@epita.fr>
19314
19315 * Makefile.am (AUTOMAKE_OPTIONS): 1.5.
19316 * Makefile.maint: Sync. with CVS Autoconf.
19317
19318 2001-08-27 Marc Autret <autret_m@epita.fr>
19319
19320 * src/vcg.h (struct infoname_s): New.
19321 (struct colorentry_s): New.
19322 (graph_s): New fields {vertical,horizontal}_order in structure.
19323 Add `infoname' field.
19324 Add `colorentry' field;
19325 * src/vcg_defaults.h (G_VERTICAL_ORDER): New.
19326 (G_HORIZONTAL_ORDER): New.
19327 (G_INFONAME): New.
19328 (G_COLORENTRY): New.
19329 * src/vcg.c (output_graph): Add output of {vertical,horizontal}_order.
19330 Add output of `infoname'.
19331 Add output of `colorentry'.
19332
19333 2001-08-27 Marc Autret <autret_m@epita.fr>
19334
19335 * src/reader.c (parse_dquoted_param): Rename variable `index' to `i'.
19336 This one shadowed a global parameter.
19337
19338 2001-08-24 Marc Autret <autret_m@epita.fr>
19339
19340 * src/print_graph.c (node_output_size): Declared POSIX `size_t' type,
19341 instead of `unsigned'.
19342 (print_state): Do not call obstack_object_size () in obstack_grow ()
19343 to avoid macro variables shadowing.
19344
19345 2001-08-23 Marc Autret <autret_m@epita.fr>
19346
19347 * src/lex.c (percent_table): Typo: s/naem/name/.
19348 Add graph option.
19349 Normalize new options declarations.
19350
19351 2001-08-20 Pascal Bart <pascal.bart@epita.fr>
19352
19353 * tests/suite.at: Exercise %header_extension and %source_extension.
19354
19355 2001-08-16 Marc Autret <autret_m@epita.fr>
19356
19357 * src/reader.c (parse_dquoted_param): New.
19358 (parse_header_extension_decl): Use it.
19359 (parse_source_extension_decl): Likewise.
19360
19361 2001-08-16 Marc Autret <autret_m@epita.fr>
19362
19363 * src/vcg.c: Remove includes of `complain.h' and `xalloc.h'.
19364 (get_xxxx_str): Use assert () instead of complain ().
19365 Remove return invokations in default cases.
19366 (get_decision_str): Modify default behaviour. Remove second argument.
19367 Echo modifications on calls.
19368 (output_graph): Fix.
19369
19370 2001-08-16 Marc Autret <autret_m@epita.fr>
19371
19372 * src/getargs.c (usage): Update with ``-g, --graph''.
19373
19374 2001-08-16 Marc Autret <autret_m@epita.fr>
19375
19376 * doc/bison.texinfo (Bison Options): Add items `-g', `--graph'.
19377 (Option Cross Key): Likewise.
19378 * doc/bison.1: Update.
19379
19380 2001-09-25 Pascal Bart <pascal.bart@epita.fr>
19381
19382 * src/output.c (output_master_parser): Don't finish action_obstack.
19383 (output_parser): Don't care about the muscle action, here.
19384 (prepare): Copy the action_obstack in the action muscle.
19385 (output): Free action_obstack.
19386
19387 2001-09-23 Pascal Bart <pascal.bart@epita.fr>
19388
19389 * src/reader.c (parse_union_decl): Add new obstack union_obstack. Which
19390 will contain `%union' declaration.
19391 (parse_union_decl): Delete #line directive output.
19392 (parse_union_decl): Substitute /attrs_obstack/union_obstack for all
19393 informations about %union.
19394 (parse_union_decl): Copy the union_obstack in the muscle stype.
19395 * src/bison.simple: Add new #line directive.
19396 Add typdef %%stype YYSTYPE.
19397
19398 2001-09-23 Pascal Bart <pascal.bart@epita.fr>
19399
19400 * src/bison.simple: Add new `#line' directive.
19401
19402 2001-09-22 Pascal Bart <pascal.bart@epita.fr>
19403
19404 * src/bison.simple: New `#line' directive.
19405 * src/output.c (output_parser): Support new dynamic muscle input_line.
19406
19407 2001-09-22 Marc Autret <autret_m@epita.fr>
19408
19409 * src/output.c (output_master_parser): New.
19410 (output_parser): Be more re-entrant.
19411
19412 2001-09-21 Marc Autret <autret_m@epita.fr>
19413
19414 * src/reader.c (copy_definition, parse_union_decl): Update and use
19415 `linef' muscle.
19416 (copy_action): Likewise.
19417 Use obstack_1grow ().
19418 * src/muscle_tab.c (muscle_init): Add muscle `linef'.
19419
19420 2001-09-21 Marc Autret <autret_m@epita.fr>
19421
19422 * src/options.c (option_table): Adjust.
19423 * src/lex.c (parse_percent_token): Fix.
19424
19425 2001-09-20 Pascal Bart <pascal.bart@epita.fr>
19426
19427 * src/options.c (symtab.h): Include it, need by lex.h.
19428
19429 2001-09-20 Pascal Bart <pascal.bart@epita.fr>
19430
19431 * src/lex.c (parse_percent_token): Change type of variable `tx', which
19432 is now an option_table_struct*.
19433 (option_strcmp): New function option_strcmp.
19434 (parse_percent_token): Call option_strcmp.
19435 * src/getargs.c (xalloc.h, options.h): Include it.
19436 (getargs): Call create_long_option_table.
19437 (getargs): Free longopts at the end of the function.
19438 (shortopts): Move in options.c.
19439 * src/options.c (create_long_option_table): New function. Convert
19440 information from option_table to option structure.
19441 * src/reader.c (options.h): Include it.
19442
19443 * src/Makefile.am: Adjust.
19444 * src/options.c (option_table): Create from longopts and percent_table.
19445 * src/getargs.c (longopts): Delete.
19446 * src/lex.c (struct percent_table_struct): Delete.
19447 (percent_table): Delete.
19448 (options.h): Include it.
19449 * src/options.c: Create.
19450 * src/options.h: Create.
19451 Declare enum opt_access_e.
19452 Define struct option_table_struct.
19453
19454 2001-09-20 Marc Autret <autret_m@epita.fr>
19455
19456 * doc/bison.texinfo: Adjust terminologies about prologue and epilogue
19457 sections of Bison.
19458
19459 2001-09-19 Pascal Bart <pascal.bart@epita.fr>
19460
19461 * src/bison.simple: s/%%filename/%%skeleton.
19462 * src/muscle_tab.c (getargs.h): Include it.
19463 (muscle_init): Insert new muscle skeleton.
19464
19465 2001-09-18 Pascal Bart <pascal.bart@epita.fr>
19466
19467 * src/output.c (output_parser): Delete unused variable actions_dumped.
19468
19469 2001-09-07 Pascal Bart <pascal.bart@epita.fr>
19470
19471 * src/output.c (output): Delete call to reader_output_yylsp.
19472 * src/reader.c (reader): Likewise.
19473 * src/reader.h: Delete declaration of reader_output_yylsp.
19474
19475 2001-09-02 Marc Autret <autret_m@epita.fr>
19476
19477 * src/reader.c: Include muscle_tab.h.
19478 (parse_union_decl): Update.
19479 (parse_macro_decl): Rename parse_muscle_decl.
19480 Update to use renamed functions and variable.
19481 (read_declarations, copy_action, read_additionnal_code, : Updated
19482 with correct variables and functions names.
19483 (packsymbols, reader): Likewise.
19484
19485 * src/reader.h (muscle_obstack): Extern declaration update.
19486
19487 * src/output.c: Include muscle_tab.h
19488 In all functions using macro_insert, change by using muscle_insert ().
19489 (macro_obstack): Rename muscle_obstack.
19490 Echo modifications in the whole file.
19491 (MACRO_INSERT_INT): Rename MUSCLE_INSERT_INT.
19492 (MACRO_INSERT_STRING): Rename MUSCLE_INSERT_STRING.
19493 (MACRO_INSERT_PREFIX): Rename MUSCLE_INSERT_PREFIX.
19494
19495 * src/muscle_tab.h: Update double inclusion macros.
19496 (macro_entry_s): Rename muscle_entry_s.
19497 Update prototypes.
19498
19499 * src/muscle_tab.c: Include muscle_tab.h.
19500 Rename macro_tabble to muscle_table.
19501 (mhash1, mhash2, mcmp): Use muscle_entry.
19502 (macro_init): Rename muscle_init. Update.
19503 (macro_insert): Rename muscle_insert. Update.
19504 (macro_find): Rename muscle_find. Update.
19505
19506 * src/main.c: Include muscle_tab.h.
19507 (main): Call muscle_init ().
19508 * src/Makefile.am (bison_SOURCES): Echo modifications.
19509
19510 2001-09-02 Marc Autret <autret_m@epita.fr>
19511
19512 Now the files macro_tab.[ch] are named muscle_tab.[ch].
19513
19514 * src/muscle_tab.c, src/muscle_tab.h: Add files.
19515
19516 2001-09-02 Marc Autret <autret_m@epita.fr>
19517
19518 * src/macrotab.c, src/macrotab.h: Remove.
19519
19520 2001-09-01 Pascal Bart <pascal.bart@epita.fr>
19521
19522 * src/reader.c (copy_guard): Use muscle to specify the `#line'
19523 filename.
19524
19525 2001-09-01 Marc Autret <autret_m@epita.fr>
19526
19527 * tests/calc.at (exp): Now, YYERROR_VERBOSE need to be set
19528 to an explicit value to activate the feature. We do it here.
19529
19530 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
19531
19532 * src/output.c (prepare): Delete the `filename' muscule insertion.
19533 * src/reader.c (copy_action): Use `filename' muscule with `#line'.
19534 (parse_union_decl): Likewise.
19535 * src/macrotab.c (macro_init): Initialize filename by infile.
19536
19537 2001-08-31 Marc Autret <autret_m@epita.fr>
19538
19539 * src/bison.simple (YYLSP_NEEDED): New definition.
19540 * src/output.c (prepare): Add macro insertion of `locations_flag'
19541
19542 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
19543
19544 * src/output.c (prepare): Delete insertion of previous muscles,
19545 and insert the `prefix' muscles.
19546 * src/macrotab.c (macro_init): Likewise.
19547 (macro_init): Initialization prefix directive by `yy'.
19548 * src/bison.simple: Substitute all %%yylex, %%yychar, %%yylval,
19549 %%yydebug, %%yyerror, %%yynerrs and %%yyparse by yylex, yychar,
19550 yylval, yydebug, yyerror, yynerrs and yyparse.
19551 New directive `#define' to substitute yydebug, ... with option
19552 name_prefix.
19553
19554 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
19555
19556 * src/main.c (main): Standardize.
19557 * src/output.c (output_table_data, output_parser): Likewise.
19558 * src/macrotab.h, src/macrotab.c, src/bison.simple: Likewise.
19559
19560 2001-08-31 Pascal Bart <pascal.bart@epita.fr>, Marc Autret <autret_m@epita.fr>
19561
19562 * src/reader.c (read_additionnal_code): Rename %%user_code to
19563 %%epilogue.
19564 * src/output.c (output): Rename %%declarations to %%prologue.
19565 * src/bison.simple: Echo modifications.
19566
19567 2001-08-31 Marc Autret <autret_m@epita.fr>
19568
19569 * src/reader.c (readgram): CleanUp.
19570 (output_token_defines): Likewise.
19571 (packsymbols): Likewise.
19572 (reader): Likewise.
19573 * src/output.c (output): CPP-out useless code.
19574
19575 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
19576
19577 * src/reader.c (reader): Delete obsolete call to function
19578 output_trailers and output_headers.
19579 * src/output.h: Remove obsolete functions prototypes of output_headers
19580 and output_trailers.
19581
19582 2001-08-30 Pascal Bart <pascal.bart@epita.fr>
19583
19584 * src/main.c: Include macrotab.h.
19585 * src/macrotab.h (macro_entry_s): Constify fields.
19586 Adjust functions prototypes.
19587 * src/macrotab.c (macro_insert): Constify key and value.
19588 (macro_find): Constify key.
19589 (macro_insert): Include 'xalloc.h'
19590 (macro_insert): Use XMALLOC.
19591 (macro_find): Constify return value.
19592 * src/output.c (output_table_data): Rename table to table_data.
19593 (output_parser): Constify macro_key, macro_value.
19594
19595 2001-08-30 Marc Autret <autret_m@epita.fr>
19596
19597 * src/reader.c (parse_skel_decl): New.
19598 (read_declarations): Add case `tok_skel', call parse_skel_decl ().
19599 * src/lex.h (token_t): New token `tok_skel'.
19600 * src/lex.c (percent_table): Add skeleton option entry.
19601 Standardize.
19602
19603 2001-08-29 Marc Autret <autret_m@epita.fr>
19604
19605 * src/bison.simple: Add %%user_code directive at the end.
19606 * src/reader.c (read_additionnal_code): New.
19607 (reader): Use it.
19608 * src/output.c (output_program): Remove.
19609 (output): Update.
19610
19611 2001-08-28 Marc Autret <autret_m@epita.fr>
19612
19613 * src/output.c (output_actions): Clean up.
19614 (output_gram): CPP-out useless code.
19615 * src/reader.c (reader): Clean up, CPP-out useless code.
19616
19617 2001-08-28 Pascal Bart <pascal.bart@epita.fr>
19618
19619 * src/output.c (output): Copy attrs_obstack in the '%%definitions'
19620 directive.
19621 * src/bison.simple: Add `%%definitions'.
19622
19623 2001-08-28 Marc Autret <autret_m@epita.fr>
19624
19625 * config/depcomp: New file.
19626
19627 2001-08-27 Paul Eggert <eggert@twinsun.com>
19628
19629 * src/bison.simple (yyparse): Don't take the address of an
19630 item before the start of an array, as that doesn't conform to
19631 the C Standard.
19632
19633 2001-08-27 Robert Anisko <robert.anisko@epita.fr>
19634
19635 * src/output.c (output): Remove the initialization of the macro
19636 obstack. It was done too late here.
19637
19638 * src/reader.c (parse_macro_decl): Fix. Use of the macro obstack was
19639 completely wrong.
19640 (reader): Initialize the macro obstack here, since we need it to grow
19641 '%define' directives.
19642
19643 * src/reader.h: Declare the macro obstack as extern.
19644
19645 2001-08-27 Robert Anisko <robert.anisko@epita.fr>
19646
19647 * src/output.c (output_parser): Fix. Store single '%' characters in
19648 the output obstack instead of throwing them away.
19649
19650 2001-08-27 Akim Demaille <akim@epita.fr>
19651
19652 * Makefile.am (AUTOMAKE_OPTIONS): 1.5.
19653
19654 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
19655
19656 * lib/Makefile.am: Adjust.
19657
19658 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
19659
19660 * src/bison.simple: Update and add '%%' directives.
19661
19662 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
19663
19664 * src/reader.c (reader): Remove calls to 'output_headers' and
19665 'output_trailers'. Remove some C output.
19666 (readgram): Disable a piece of code that was writing a default
19667 definition for 'YYSTYPE'.
19668 (reader_output_yylsp): Remove.
19669 (packsymbols): Output token defintions to a macro.
19670 (copy_definition): Disable C output.
19671
19672 * src/reader.c (parse_macro_decl): New function used to parse macro
19673 declarations.
19674 (copy_string2): Put the body of copy_string into this new function.
19675 Add a parameter to let the caller choose whether he wants to copy the
19676 string delimiters or not.
19677 (copy_string): Be a simple call to copy_string2 with the last argument
19678 bound to true.
19679 (read_declarations): Add case for macro definition.
19680 (copy_identifier): New.
19681 (parse_macro_decl): Read macro identifiers using copy_identifier
19682 rather than lex.
19683
19684 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
19685
19686 * src/output.c (prepare): Add prefixed names.
19687 (output_parser): Output semantic actions.
19688 (output_parser): Fix bug on '%%line' directives.
19689
19690 * src/output.c (output_headers): Remove. The C code printed by this
19691 function should now be in the skeletons.
19692 (output_trailers): Remove.
19693 (output): Disable call to 'reader_output_yylsp'.
19694 (output_rule_data): Do not output tables to the table obstack.
19695
19696 * src/output.c: Remove some C dedicated output.
19697 Improve the use of macro and output obstacks.
19698 (output_defines): Remove.
19699
19700 * src/output.c (output_token_translations): Associate 'translate'
19701 table with a macro. No output to the table obstack.
19702 (output_gram): Same for 'rhs' and 'prhs'.
19703 (output_stos): Same for 'stos'.
19704 (output_rule_data): Same for 'r1' and 'r2'.
19705 (token_actions): Same for 'defact'.
19706 (goto_actions): Same for 'defgoto'.
19707 (output_base): Same for 'pact' and 'pgoto'.
19708 (output_table): Same for 'table'.
19709 (output_check): Same for 'check'.
19710
19711 * src/output.c (output_table_data): New function.
19712 (output_short_table): Remove.
19713 (output_short_or_char_table): Remove.
19714
19715 * src/output.c (output_parser): Replace most of the skeleton copy code
19716 with something new. Skeletons are now processed character by character
19717 rather than line by line, and Bison looks for '%%' macros. This is the
19718 first step in making Bison's output process (a lot) more flexible.
19719 (output_parser): Use the macro table.
19720
19721 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
19722
19723 * src/main.c (main): Initialize the macro table.
19724
19725 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
19726
19727 * src/lex.c (percent_table): Add tok_define.
19728 * src/lex.h: Add tok_define.
19729
19730 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
19731
19732 * src/macrotab.c: New file.
19733 * src/macrotab.h: New file.
19734 * src/Makefile.am: Update.
19735
19736 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
19737
19738 * lib/hash.c: New file.
19739 * lib/hash.h: New file.
19740 * lib/Makefile.am: Update.
19741
19742 2001-08-15 Akim Demaille <akim@epita.fr>
19743
19744 Version 1.28c.
19745
19746 2001-08-15 Marc Autret <autret_m@epita.fr>
19747
19748 * src/reader.c (readgram): Indent output macro YYSTYPE.
19749 (packsymbols): Likewise.
19750 (output_token_defines): Likewise.
19751 * src/files.c: Standardize.
19752 (compute_header_macro): New.
19753 (defines_obstack_save): New. Use compute_header_macro.
19754 (output_files): Update. Use defines_obstack_save.
19755
19756 2001-08-15 Akim Demaille <akim@epita.fr>
19757
19758 * doc/bison.texinfo (Table of Symbols): Document
19759 YYSTACK_USE_ALLOCA.
19760
19761 2001-08-15 Akim Demaille <akim@epita.fr>
19762
19763 * missing: Update from CVS Automake.
19764 * config/config.guess, config/config.sub, config/texinfo.tex:
19765 Update from gnu.org.
19766
19767 2001-08-15 Akim Demaille <akim@epita.fr>
19768
19769 * Makefile.maint: Sync with CVS Autoconf.
19770
19771 2001-08-14 Pascal Bart <pascal.bart@epita.fr>
19772
19773 * doc/bison.texinfo: Include GNU Free Documentation License from
19774 `fdl.texi'.
19775 * doc/fdl.texi: Add to package.
19776
19777 2001-08-14 Marc Autret <autret_m@epita.fr>
19778
19779 Turn on %{source,header}_extension features.
19780
19781 * src/lex.c (percent_table): Un-CPP out header_extension and
19782 source_extension.
19783 * src/files.c (compute_exts_from_gf): Compare pointers with NULL.
19784 (compute_exts_from_src): Remove conditions. It restores priorities
19785 between options.
19786
19787 2001-08-14 Marc Autret <autret_m@epita.fr>
19788
19789 * src/files.c (compute_base_names): Add extensions computing when
19790 `--file-prefix' used.
19791 Standardize function calls.
19792
19793 2001-08-13 Marc Autret <autret_m@epita.fr>
19794
19795 * src/bison.simple (YYSTACK_USE_ALLOCA): Changed to allow users
19796 defining it (defined but null disables alloca).
19797
19798 2001-08-13 Marc Autret <autret_m@epita.fr>
19799
19800 * src/bison.simple (_yy_memcpy): CPP reformat.
19801
19802 2001-08-13 Pascal Bart <pascal.bart@epita.fr>
19803
19804 * tests/atconfig.in (CPPFLAGS): Fix.
19805
19806 2001-08-10 Pascal Bart <pascal.bart@epita.fr>
19807
19808 * doc/bison.texinfo: Include GNU General Public License from
19809 `gpl.texi'.
19810 * doc/gpl.texi: Add to package.
19811
19812 2001-08-10 Marc Autret <autret_m@epita.fr>
19813
19814 * src/print_graph.h: Fix.
19815 * src/reader.c (read_declarations): Use parse_header_extension_decl ().
19816
19817 2001-08-10 Akim Demaille <akim@epita.fr>
19818
19819 * src/system.h: Provide default declarations for stpcpy, strndup,
19820 and strnlen.
19821
19822 2001-08-10 Robert Anisko <anisko_r@epita.fr>
19823
19824 * doc/bison.texinfo (Locations): Update @$ stuff.
19825
19826 2001-08-09 Robert Anisko <anisko_r@epita.fr>
19827
19828 * src/bison.simple (YYLLOC_DEFAULT): Update.
19829 (yyparse): Adjust.
19830
19831 2001-08-08 Marc Autret <autret_m@epita.fr>
19832
19833 * doc/bison.texinfo: Change @samp{$<@dots{}>} to
19834 @samp{$<@dots{}>@var{n}} in Section Actions in Mid-Rule.
19835 Reported by Fabrice Bauzac.
19836
19837 2001-08-08 Marc Autret <autret_m@epita.fr>
19838
19839 * src/vcg_default.h: Use NULL instead of 0 to initialize pointers.
19840 * src/vcg.c (output_node): Fix.
19841 * src/vcg.h: Cleanup.
19842 * src/print_graph.c: Add comments.
19843 (node_output_size): New global variable. Simplify the formatting of
19844 the VCG graph output.
19845 (print_actions): Unused code is now used. It notifies the final state
19846 and no action states in the VCG graph. It also give the reduce actions.
19847 The `shift and goto' edges are red and the `go to state' edges are
19848 blue.
19849 Get the current node name and node_obstack by argument.
19850 (node_obstack): New variable.
19851 (print_state): Manage node_obstack.
19852 (print_core): Use node_obstack given by argument.
19853 A node is not only computed here but in print_actions also.
19854 (print_graph): CPP out useless code instead of commenting it.
19855
19856 2001-08-07 Pascal Bart <pascal.bart@epita.fr>
19857
19858 * tests/atconfig.in (CPPFLAGS): Fix.
19859
19860 2001-08-07 Akim Demaille <akim@epita.fr>
19861
19862 * src/print_graph.c (quote): New.
19863 (print_core): Use it.
19864
19865 2001-08-06 Akim Demaille <akim@epita.fr>, Marc Autret <autret_m@epita.fr>
19866
19867 * src/vcg.c (complain.h): Include it.
19868 Unepitaize `return' invocations.
19869 [NDEBUG] (main): Remove.
19870 * src/vcg.h (node_t, edge_t, graph_t): Constify the char * members.
19871 * src/files.c (open_files): Initialize graph_obstack.
19872 * src/print_graph.c (print_actions): CPP out useless code.
19873 (print_core): Don't output the last `\n' in labels.
19874 Use `quote'.
19875 * src/files.c (output_files): Output the VCG file.
19876 * src/main.c (main): Invoke print_graph ();
19877
19878 2001-08-06 Marc Autret <autret_m@epita.fr>
19879
19880 Automaton VCG graph output.
19881 Using option ``-g'' or long option ``--graph'', you can generate
19882 a gram_filename.vcg file containing a VCG description of the LALR (1)
19883 automaton of your grammar.
19884
19885 * src/main.c: Call to print_graph() function.
19886 * src/getargs.h: Update.
19887 * src/getargs.c (options): Update to catch `-g' and `--graph' options.
19888 (graph_flag): New flag.
19889 (longopts): Update.
19890 (getargs): Add case `g'.
19891 * src/files.c (graph_obstack): New obstack struct.
19892 (open_files): Initialize new obstack.
19893 (output_files): Saves graph_obstack if required.
19894 * src/files.h (graph_obstack): New extern declaration.
19895 * src/Makefile.am: Add new source files.
19896
19897 2001-08-06 Marc Autret <autret_m@epita.fr>
19898
19899 * src/print_graph.c, src/print_graph.h (graph): New.
19900 * src/vcg.h: New file.
19901 * src/vcg.c: New file, VCG graph handling.
19902
19903 2001-08-06 Marc Autret <autret_m@epita.fr>
19904
19905 Add of %source_extension and %header_extension which specify
19906 the source or/and the header output file extension.
19907
19908 * src/files.c (compute_base_names): Remove initialisation of
19909 src_extension and header_extension.
19910 (compute_exts_from_gf): Update.
19911 (compute_exts_from_src): Update.
19912 (output_files): Update.
19913 * src/reader.c (parse_header_extension_decl): New.
19914 (parse_source_extension_decl): New.
19915 (read_declarations): New case statements for the new tokens.
19916 * src/lex.c (percent_table): Add entries for %source_extension
19917 and %header_extension.
19918 * src/lex.h (token_e): New tokens tok_hdrext and tok_srcext.
19919
19920 2001-08-06 Marc Autret <autret_m@epita.fr>
19921
19922 * configure.in: Bump to 1.28c.
19923 * doc/bison.texinfo: Texinfo thingies.
19924
19925 2001-08-04 Pascal Bart <pascal.bart@epita.fr>
19926
19927 * tests/atconfig.in (CPPFLAGS): Add.
19928 * tests/calc.at (AT_CHECK): Use CPPFLAGS.
19929
19930 2001-08-03 Akim Demaille <akim@epita.fr>
19931
19932 Version 1.28b.
19933
19934 2001-08-03 Akim Demaille <akim@epita.fr>
19935
19936 * tests/Makefile.am (check-local): Ship testsuite.
19937 * tests/calc.at (_AT_DATA_CALC_Y): Prototype all the functions.
19938 Include `string.h'.
19939
19940 2001-08-03 Akim Demaille <akim@epita.fr>
19941
19942 * configure.in: Try using -Wformat when compiling.
19943
19944 2001-08-03 Akim Demaille <akim@epita.fr>
19945
19946 * configure.in: Bump to 1.28b.
19947
19948 2001-08-03 Akim Demaille <akim@epita.fr>
19949
19950 * src/complain.c: Adjust strerror_r portability issues.
19951
19952 2001-08-03 Akim Demaille <akim@epita.fr>
19953
19954 Version 1.28a.
19955
19956 2001-08-03 Akim Demaille <akim@epita.fr>
19957
19958 * src/getargs.c, src/getarg.h (skeleton)): Constify.
19959 * src/lex.c (literalchar): Avoid name clashes on `buf'.
19960 * src/getargs.c: Include complain.h.
19961 * src/files.c, src/files.h (skeleton_find): Avoid name clashes.
19962 * lib/quotearg.c, lib/quotearg.h: Update from fileutils 4.1.
19963
19964 2001-08-03 Akim Demaille <akim@epita.fr>
19965
19966 * src/reader.c (readgram): Display hidden chars in error messages.
19967
19968 2001-08-03 Akim Demaille <akim@epita.fr>
19969
19970 Update to gettext 0.10.39.
19971
19972 2001-08-03 Akim Demaille <akim@epita.fr>
19973
19974 * lib/strspn.c: New.
19975
19976 2001-08-01 Marc Autret <autret_m@epita.fr>
19977
19978 * doc/bison.texinfo: Update.
19979 * doc/bison.1 (mandoc): Update.
19980 * src/system.h (EXT_GUARD_C, EXT_STYPE_H): Remove .c and .h.
19981 * src/files.c: Support output files extensions computing.
19982 (src_extension): New static variable.
19983 (header_extension): New static variable.
19984 (tr): New function.
19985 (get_extension_index): New function, gets the index of an extension
19986 filename in a string.
19987 (compute_exts_from_gf): New function, computes extensions from the
19988 grammar file extension.
19989 (compute_exts_from_src): New functions, computes extensions from the
19990 C source file extension, file given by ``-o'' option.
19991 (compute_base_names): Update.
19992 (output_files): Update.
19993
19994 2001-08-01 Robert Anisko <anisko_r@epita.fr>
19995
19996 * doc/bison.texi: Document @$.
19997 (Locations): New section.
19998
19999 2001-07-18 Akim Demaille <akim@epita.fr>
20000
20001 * Makefile.maint, GNUmakefile: New, from Autoconf 2.52.
20002 * config/prev-version.txt, config/move-if-change: New.
20003 * Makefile.am: Adjust.
20004
20005 2001-07-08 Pascal Bart <pascal.bart@epita.fr>
20006
20007 * src/bison.simple (yyparse): Suppress warning `comparaison
20008 between signed and unsigned'.
20009
20010 2001-07-05 Pascal Bart <pascal.bart@epita.fr>
20011
20012 * src/getargs.h (raw_flag): Remove.
20013 * src/getargs.c: Die on `-r'/`--raw'.
20014 * src/lex.c (parse_percent_token): Die on `%raw'.
20015 * src/reader.c (output_token_defines): Suppress call to `raw_flag'.
20016 * tests/calc.at: Suppress test with option `--raw'.
20017
20018 2001-07-14 Akim Demaille <akim@epita.fr>
20019
20020 * config/: New.
20021 * configure.in: Require Autoconf 2.50.
20022 Update to gettext 0.10.38.
20023
20024 2001-03-16 Akim Demaille <akim@epita.fr>
20025
20026 * doc/bison.texinfo: ANSIfy the examples.
20027
20028 2001-03-16 Akim Demaille <akim@epita.fr>
20029
20030 * getargs.c (skeleton): New variable.
20031 (longopts): --skeleton is a new option.
20032 (shortopts, getargs): -S is a new option.
20033 * getargs.h: Declare skeleton.
20034 * output.c (output_parser): Use it.
20035
20036 2001-03-16 Akim Demaille <akim@epita.fr>
20037
20038 * m4/strerror_r.m4: New.
20039 * m4/error.m4: Run AC_FUNC_STRERROR_R.
20040 * lib/error.h, lib/error.c: Update.
20041
20042 2001-03-16 Akim Demaille <akim@epita.fr>
20043
20044 * src/getargs.c (longopts): Clean up.
20045
20046 2001-02-21 Akim Demaille <akim@epita.fr>
20047
20048 * src/reader.c (gensym): `gensym_count' is your own.
20049 Use a static buf to create the symbol name, as token_buffer is no
20050 longer a buffer.
20051
20052 2001-02-08 Akim Demaille <akim@epita.fr>
20053
20054 * src/conflicts.c (conflict_report): Be sure not to append to res
20055 between two calls, which could happen if both first sprintf were
20056 skipped, but not the first cp += strlen.
20057
20058 2001-02-08 Akim Demaille <akim@epita.fr>
20059
20060 * lib/memchr.c, lib/stpcpy.c, lib/strndup.c, lib/strnlen.c:
20061 New, from fileutils 4.0.37.
20062 * configure.in: Require Autoconf 2.49c. I took some time before
20063 making this decision. This is the only way out for portability
20064 issues in Bison, it would mean way too much duplicate effort to
20065 import in Bison features implemented in 2.49c since 2.13.
20066 AC_REPLACE_FUNCS and AC_CHECK_DECLS the functions above.
20067
20068 2001-02-02 Akim Demaille <akim@epita.fr>
20069
20070 * lib/malloc.c, lib/realloc.c: New, from the fileutils 4.0.37.
20071 * lib/xalloc.h, lib/xmalloc.c: Update.
20072
20073 2001-01-19 Akim Demaille <akim@epita.fr>
20074
20075 Get rid of the ad hoc handling of token_buffer in the scanner: use
20076 the obstacks.
20077
20078 * src/lex.c (token_obstack): New.
20079 (init_lex): Initialize it. No longer call...
20080 (grow_token_buffer): this. Remove it.
20081 Adjust all the places which used it to use the obstack.
20082
20083 2001-01-19 Akim Demaille <akim@epita.fr>
20084
20085 * src/lex.h: Rename all the tokens:
20086 s/\bENDFILE\b/tok_eof/g;
20087 s/\bIDENTIFIER\b/tok_identifier/g;
20088 etc.
20089 Let them be enums, not #define, to ease debugging.
20090 Adjust all the code.
20091
20092 2001-01-18 Akim Demaille <akim@epita.fr>
20093
20094 * src/lex.h (MAXTOKEN, maxtoken, grow_token_buffer): Remove, private.
20095 * src/lex.c (maxtoken, grow_token_buffer): Static.
20096
20097 2001-01-18 Akim Demaille <akim@epita.fr>
20098
20099 Since we now use obstacks, more % directives can be enabled.
20100
20101 * src/lex.c (percent_table): Also accept `%yacc',
20102 `%fixed_output_files', `%defines', `%no_parser', `%verbose', and
20103 `%debug'.
20104 Handle the actions for `%semantic_parser' and `%pure_parser' here,
20105 instead of returning a token.
20106 * src/lex.h (SEMANTIC_PARSER, PURE_PARSER): Remove, unused.
20107 * src/reader.c (read_declarations): Adjust.
20108 * src/files.c (open_files): Don't call `compute_base_names', don't
20109 compute `attrsfile' since they depend upon data which might be
20110 *in* the input file now.
20111 (output_files): Do it here.
20112 * src/output.c (output_headers): Document the fact that this patch
20113 introduces a guaranteed SEGV for semantic parsers.
20114 * doc/bison.texinfo: Document them.
20115 * tests/suite.at: Exercise these %options.
20116
20117 2000-12-20 Akim Demaille <akim@epita.fr>
20118
20119 Also handle the output file (--verbose) with obstacks.
20120
20121 * files.c (foutput): Remove.
20122 (output_obstack): New.
20123 Adjust all dependencies.
20124 * src/conflicts.c: Return a string.
20125 * src/system.h (obstack_grow_string): Rename as...
20126 (obstack_sgrow): this. Be ready to work with non literals.
20127 (obstack_fgrow4): New.
20128
20129 2000-12-20 Akim Demaille <akim@epita.fr>
20130
20131 * src/files.c (open_files): Fix the computation of short_base_name
20132 in the case of `-o foo.tab.c'.
20133
20134 2000-12-20 Akim Demaille <akim@epita.fr>
20135
20136 * src/reader.c (copy_string, copy_comment, copy_comment2, copy_at)
20137 (copy_dollar): Now that everything uses obstacks, get rid of the
20138 FILE * parameters.
20139
20140 2000-12-20 Akim Demaille <akim@epita.fr>
20141
20142 * src/files.c (open_files): Actually the `.output' file is based
20143 on the short_base_name, not base_name.
20144 * tests/suite.at (Checking output file names): Adjust.
20145
20146 2000-12-20 Akim Demaille <akim@epita.fr>
20147
20148 * src/bison.s1: Remove, we now use directly...
20149 * src/bison.simple: this.
20150 * src/Makefile.am: Use pkgdata instead of data.
20151
20152 2000-12-20 Akim Demaille <akim@epita.fr>
20153
20154 * src/files.c (guard_obstack): New.
20155 (open_files): Initialize it.
20156 (output_files): Dump it...
20157 * src/files.h: Export it.
20158 * src/reader.c (copy_guard): Use it.
20159
20160 2000-12-19 Akim Demaille <akim@epita.fr>
20161
20162 * src/files.c (outfile, defsfile, actfile): Removed as global
20163 vars.
20164 (open_files): Don't compute them.
20165 (output_files): Adjust.
20166 (base_name, short_base_name): Be global.
20167 Adjust dependencies.
20168
20169 2000-12-19 Akim Demaille <akim@epita.fr>
20170
20171 * src/files.c (strsuffix): New.
20172 (stringappend): Be just like strcat but allocate.
20173 (base_names): Eve out from open_files.
20174 Try to simplify the rather hairy computation of base_name and
20175 short_base_name.
20176 (open_files): Use it.
20177 * tests/suite.at (Checking output file names): New test.
20178
20179 2000-12-19 Akim Demaille <akim@epita.fr>
20180
20181 * src/system.h (obstack_grow_literal_string): Rename as...
20182 (obstack_grow_string): this.
20183 * src/output.c (output_parser): Recognize `%% actions' instead of
20184 `$'.
20185 * src/bison.s1: s/$/%% actions/.
20186 * src/bison.hairy: Likewise.
20187
20188 2000-12-19 Akim Demaille <akim@epita.fr>
20189
20190 * src/output.c (output_parser): Compute the `#line' lines when
20191 there are.
20192 * src/Makefile.am (bison.simple): Be a simple copy of bison.s1.
20193 Suggested by Hans Aberg.
20194
20195 2000-12-19 Akim Demaille <akim@epita.fr>
20196
20197 Let the handling of the skeleton files be local to the procedures
20198 that use it.
20199
20200 * src/files.c (xfopen, xfclose, skeleton_find, guardfile): No
20201 longer static.
20202 (fparser, open_extra_files): Remove.
20203 (open_files, output_files): Don't take care of fparser.
20204 * src/files.h: Adjust.
20205 * src/output.c (output_parser): Open and close the file to the
20206 skeleton.
20207 * src/reader.c (read_declarations): When %semantic_parser, open
20208 fguard.
20209
20210 2000-12-19 Akim Demaille <akim@epita.fr>
20211
20212 * src/file.h (BISON_SIMPLE, BISON_HAIRY): Move from here...
20213 * src/system.h (BISON_SIMPLE, BISON_HAIRY): ... to here.
20214
20215 2000-12-19 Akim Demaille <akim@epita.fr>
20216
20217 * src/files.c (open_files): Yipee! We no longer need all the code
20218 looking for `/tmp' since we have no tmp file.
20219
20220 2000-12-19 Akim Demaille <akim@epita.fr>
20221
20222 * src/system.h (EXT_TAB, EXT_OUTPUT, EXT_STYPE_H, EXT_GUARD_C):
20223 New macros.
20224 * src/files.c (open_files): Less dependency on MSDOS etc.
20225
20226 2000-12-14 Akim Demaille <akim@epita.fr>
20227
20228 * src/bison.s1 (YYLLOC_DEFAULT): New macro.
20229 Provide a default definition.
20230 Use it when executing the default @ action.
20231 * src/reader.c (reader_output_yylsp): No longer include
20232 `timestamp' and `text' in the default YYLTYPE.
20233
20234 2000-12-12 Akim Demaille <akim@epita.fr>
20235
20236 * src/reader.c (copy_definition, parse_union_decl, copy_action)
20237 (copy_guard): Quote the file names.
20238 Reported by Laurent Mascherpa.
20239
20240 2000-12-12 Akim Demaille <akim@epita.fr>
20241
20242 * src/output.c (output_headers, output_program, output): Be sure
20243 to escape special characters when outputting filenames.
20244 (ACTSTR_PROLOGUE, ACTSTR_EPILOGUE): Remove.
20245 (output_headers): Don't depend on them, Use ACTSTR.
20246
20247 2000-11-17 Akim Demaille <akim@epita.fr>
20248
20249 * lib/obstack.h: Formatting changes.
20250 (obstack_grow, obstack_grow0): Don't cast WHERE at all: it
20251 prevents type checking.
20252 (obstack_ptr_grow, obstack_ptr_grow_fast): When assigning, don't
20253 cast the value to (void *): assigning a `foo *' to a `void *'
20254 variable is valid.
20255 (obstack_int_grow, obstack_int_grow_fast): Don't cast AINT to int.
20256 * src/reader.c (parse_union_decl): Typo: use obstack_1grow to
20257 append characters.
20258
20259 2000-11-17 Akim Demaille <akim@epita.fr>
20260
20261 * tests/Makefile.am (suite.m4, regression.m4, calc.m4): Rename
20262 as...
20263 (suite.m4, regression.m4, calc.m4): these.
20264 * tests/atgeneral.m4: Update from CVS Autoconf.
20265
20266 2000-11-17 Akim Demaille <akim@epita.fr>
20267
20268 * tests/regression.m4 (%union and --defines): New test,
20269 demonstrating a current bug in the obstack implementation.
20270
20271 2000-11-17 Akim Demaille <akim@epita.fr>
20272
20273 * src/bison.s1 (_YY_DECL_VARIABLES, YY_DECL_VARIABLES): New
20274 macros.
20275 Use them to declare the variables which are global or local to
20276 `yyparse'.
20277
20278 2000-11-17 Akim Demaille <akim@epita.fr>
20279
20280 * acconfig.h: Remove, no longer used.
20281
20282 2000-11-07 Akim Demaille <akim@epita.fr>
20283
20284 * src: s/Copyright (C)/Copyright/g.
20285
20286 2000-11-07 Akim Demaille <akim@epita.fr>
20287
20288 * src/reader.c (reader): #define YYLSP_NEEDED to 1 instead of just
20289 defining.
20290 * src/bison.s1: s/#ifdef YYLSP_NEEDED/#if YYLSP_NEEDED/.
20291
20292 2000-11-07 Akim Demaille <akim@epita.fr>
20293
20294 * src/bison.s1 (YYLEX): Use #if instead of #ifdef.
20295 Merge in a single CPP if/else.
20296
20297 2000-11-07 Akim Demaille <akim@epita.fr>
20298
20299 * src/output.c (output): Remove useless variables.
20300 * lib/obstack.c (obstack_grow, obstack_grow0): Rename the second
20301 argument `data' for consistency with the prototypes.
20302 Qualify it `const'.
20303 (obstack_copy, obstack_copy0): Rename the second argument as
20304 `address' for consistency. Qualify it `const'.
20305 * lib/obstack.h (obstack_copy, obstack_copy0, obstack_grow)
20306 (obstack_grow0, obstack_ptr_grow, obstack_ptr_grow_fast): Qualify
20307 `const' their input argument (`data' or `address').
20308 Adjust the corresponding macros to include `const' in casts.
20309
20310 2000-11-03 Akim Demaille <akim@epita.fr>
20311
20312 * src/Makefile.am (INCLUDES): s/PFILE/BISON_SIMPLE/.
20313 s/PFILE1/BISON_HAIRY/.
20314 Adjust dependencies.
20315
20316 2000-11-03 Akim Demaille <akim@epita.fr>
20317
20318 For some reason, this was not applied.
20319
20320 * src/files.c [VMS]: No longer include `ssdef.h', no longer define
20321 `unlink': it's no longer used.
20322
20323 2000-11-03 Akim Demaille <akim@epita.fr>
20324
20325 * src/files.c (skeleton_find): New function, eved out of...
20326 (open_files, open_extra_files): here.
20327
20328 2000-11-03 Akim Demaille <akim@epita.fr>
20329
20330 Don't use `atexit'.
20331
20332 * src/files.c (obstack_save): New function.
20333 (done): Rename as...
20334 (output_files): this.
20335 Use `obstack_save'.
20336 * src/main.c (main): Don't use `atexit' to register `done', since
20337 it no longer has to remove tmp files, just call `output_files'
20338 when there are no errors.
20339
20340 2000-11-02 Akim Demaille <akim@epita.fr>
20341
20342 * src/files.c [VMS]: No longer include `ssdef.h', no longer define
20343 `unlink': it's no longer used.
20344 * src/files.h: Formatting changes.
20345
20346 2000-11-02 Akim Demaille <akim@epita.fr>
20347
20348 Remove the last uses of mktemp and unlink/delete.
20349
20350 * src/files.c (fdefines, ftable): Removed.
20351 (defines_ostack, table_obstack): New.
20352 Adjust dependencies of the former into uses of the latter.
20353 * src/output.c (output_short_or_char_table, output_short_table):
20354 Convert to using obstacks.
20355 * src/reader.c (copy_comment2): Accept one FILE * and two
20356 obstacks.
20357 (output_token_defines, reader_output_yylsp): Use obstacks.
20358 * src/system.h (obstack_fgrow3): New.
20359 * po/POTFILES.in: Adjust.
20360
20361 2000-11-01 Akim Demaille <akim@epita.fr>
20362
20363 Change each use of `fattrs' into a use of `attrs_obstack'.
20364
20365 * src/reader.c (copy_at): Typo: s/yylloc/yyloc/.
20366 * src/files.c (fattrs): Remove.
20367 (attrs_obstack): New.
20368 Adjust all dependencies.
20369 (done): If SEMANTIC_PARSER, dump attrs_obstack into attrsfile.
20370
20371 2000-11-01 Akim Demaille <akim@epita.fr>
20372
20373 Introduce obstacks.
20374 Change each use of `faction' into a use of `action_obstack'.
20375
20376 * lib/obstack.h, lib/obstack.c: New files.
20377 * src/files.c (faction): Remove.
20378 (action_obstack): New.
20379 Adjust all dependencies.
20380
20381 2000-10-20 Akim Demaille <akim@epita.fr>
20382
20383 * lib/quote.h (PARAMS): New macro. Use it.
20384
20385 2000-10-16 Akim Demaille <akim@epita.fr>
20386
20387 * src/output.c (output_short_or_char_table): New function.
20388 (output_short_table, output_token_translations): Use it.
20389 (goto_actions): Use output_short_table.
20390
20391 2000-10-16 Akim Demaille <akim@epita.fr>
20392
20393 * src/symtab.c (bucket_new): New function.
20394 (getsym): Use it.
20395
20396 * src/output.c (output_short_table): New argument to display the
20397 comment associated with the table.
20398 Adjust dependencies.
20399 (output_gram): Use it.
20400 (output_rule_data): Nicer output layout for YYTNAME.
20401
20402 2000-10-16 Akim Demaille <akim@epita.fr>
20403
20404 * src/lex.c (read_typename): New function.
20405 (lex): Use it.
20406 * src/reader.c (copy_dollar): Likewise.
20407
20408 2000-10-16 Akim Demaille <akim@epita.fr>
20409
20410 * src/reader.c (copy_comment2): Expect the input stream to be on
20411 the `/' which is suspected to open a comment, instead of being
20412 called after `//' or `/*' was read.
20413 (copy_comment, copy_definition, parse_union_decl, copy_action)
20414 (copy_guard): Adjust.
20415
20416 2000-10-16 Akim Demaille <akim@epita.fr>
20417
20418 * src/reader.c (parse_expect_decl): Use `skip_white_space' and
20419 `read_signed_integer'.
20420
20421 2000-10-16 Akim Demaille <akim@epita.fr>
20422
20423 * src/reader.c (copy_dollar): New function.
20424 (copy_guard, copy_action): Use it.
20425
20426 2000-10-16 Akim Demaille <akim@epita.fr>
20427
20428 * lib/quote.h, lib/quote.c, lib/quotearg.h, lib/quotearg.c:
20429 * m4/prereq.m4, m4/c-bs-a.m4, m4/mbstate.m4:
20430 New files, from Fileutils 4.0.27.
20431 * src/main.c (printable_version): Remove.
20432 * src/lex.c, src/reader.c: Use `quote'.
20433
20434 2000-10-04 Akim Demaille <akim@epita.fr>
20435
20436 * lib/error.c, lib/error.h: New files, needed by xmalloc.c.
20437
20438 2000-10-04 Akim Demaille <akim@epita.fr>
20439
20440 * doc/bison.texinfo: Various typos spotted by Neil Booth.
20441
20442 2000-10-04 Akim Demaille <akim@epita.fr>
20443
20444 When a literal string is used to define two different tokens,
20445 `bison -v' segfaults.
20446 Reported by Piotr Gackiewicz, and fixed by Neil Booth.
20447
20448 * tests/regression.m4: New file.
20449 Include the core of the sample provided by Piotr Gackiewicz.
20450 * src/reader.c (parse_token_decl): Diagnose bad cases, and proceed
20451 properly.
20452
20453 2000-10-04 Akim Demaille <akim@epita.fr>
20454
20455 * src/reader.c (parse_expect_decl): Keep `count' within the size
20456 of `buffer'.
20457 From Neil Booth.
20458
20459 2000-10-02 Paul Eggert <eggert@twinsun.com>
20460
20461 * bison.s1 (yyparse): Assign the default value
20462 unconditionally, to avoid a GCC warning and make the parser a
20463 tad smaller.
20464
20465 2000-10-02 Akim Demaille <akim@epita.fr>
20466
20467 * src/getargs.c (getargs): Don't dump `--help' on unrecognized
20468 options.
20469
20470 2000-10-02 Akim Demaille <akim@epita.fr>
20471
20472 * src/derives.c, src/print.c, src/reduce.c: To ease the
20473 translation, move some `\n' out of the translated strings.
20474
20475 2000-10-02 Akim Demaille <akim@epita.fr>
20476
20477 The location tracking mechanism is precious for parse error
20478 messages. Nevertheless, it is enabled only when `@n' is used in
20479 the grammar, which is a different issue (you can use it in error
20480 message, but not in the grammar per se). Therefore, there should
20481 be another means to enable it.
20482
20483 * src/getargs.c (getargs): Support `--locations'.
20484 (usage): Report it.
20485 * src/getargs.h (locationsflag): Export it.
20486 * src/lex.c (percent_table): Support `%locations'.
20487 * src/reader.c (yylsp_needed): Remove this variable, now replaced
20488 with `locationsflag'.
20489 * doc/bison.texinfo: Document `--locations' and `%locations'.
20490 Sort the options.
20491 * tests/calc.m4: Test it.
20492
20493 For regularity of the names, replace each
20494 (nolineflag, toknumflag, rawtokenumflag, noparserflag): with...
20495 (no_lineflag, token_tableflag, rawflag, no_parserflag): this.
20496 In addition replace each `flag' with `_flag'.
20497
20498 2000-10-02 Akim Demaille <akim@epita.fr>
20499
20500 Also test parse error messages, including with YYERROR_VERBOSE.
20501
20502 * tests/calc.m4 (calc.y): Add support for `exp = exp' (non
20503 associative).
20504 Use it to check the computations.
20505 Use it to check `nonassoc' is honored.
20506 (AT_DATA_CALC_Y): Equip `calc.y' with YYERROR_VERBOSE when passed
20507 `--yyerror-verbose'.
20508 (_AT_CHECK_CALC): Adjust to this option.
20509 (_AT_CHECK_CALC_ERROR): New macro to check parse error messages.
20510
20511 2000-10-02 Akim Demaille <akim@epita.fr>
20512
20513 Test also `--verbose', `--defines' and `--name-prefix'. Testing
20514 the latter demonstrates a flaw in the handling of non debugging
20515 parsers introduced by myself on 2000-03-16: `#define yydebug 0'
20516 was used in order to simplify:
20517
20518 #if YYDEBUG
20519 if (yydebug)
20520 {
20521 ...
20522 }
20523 #endif
20524
20525 into
20526
20527 if (yydebug)
20528 {
20529 ...
20530 }
20531
20532 unfortunately this leads to a CPP conflict when
20533 `--name-prefix=foo' is used since it produces `#define yydebug
20534 foodebug'.
20535
20536 * src/bison.s1 [!YYDEBUG]: Do not define yydebug.
20537 (YYDPRINTF): New macro.
20538 Spread its use.
20539 * tests/calc.m4 (AT_CHECK_CALC): Do require a title, build it from
20540 the bison options.
20541 Also test `--verbose', `--defines' and `--name-prefix'.
20542
20543 2000-10-02 Akim Demaille <akim@epita.fr>
20544
20545 Improve the readability of the produced parsers.
20546
20547 * src/bison.s1: Formatting changes.
20548 Improve the comment related to the `$' mark.
20549 (yydefault): Don't fall through to `yyresume': `goto' there.
20550 * src/output.c (output_parser): When the `$' is met, skip the end
20551 of its line.
20552 New variable, `number_of_dollar_signs', to check there's exactly
20553 one `$' in the parser skeleton.
20554
20555 2000-10-02 Akim Demaille <akim@epita.fr>
20556
20557 * lib/xstrdup.c: New file, from the fileutils.
20558 * src/reader.c (parse_token_decl, get_type_name, parse_type_decl)
20559 (parse_assoc_decl, parse_thong_decl, get_type): Use `xstrdup'
20560 instead of strlen + xmalloc + strcpy.
20561 * src/symtab.c (copys): Remove, use xstrdup instead.
20562
20563 2000-10-02 Akim Demaille <akim@epita.fr>
20564
20565 * src/gram.h (associativity): New enum type which replaces the
20566 former CPP macros `RIGHT_ASSOC', `LEFT_ASSOC' and `NON_ASSOC' with
20567 `right_assoc', `left_assoc' and `non_assoc'.
20568 Adjust all dependencies.
20569 * src/reader.c: Formatting changes.
20570 (LTYPESTR): Don't define it, use it as a literal in
20571 `reader_output_yylsp'.
20572 * src/symtab.h (symbol_class): New enum type which replaces the
20573 former CPP macros `SUNKNOWN', `STOKEN and `SNTERM' with
20574 `sunknown', `stoken and `snterm'.
20575
20576 2000-10-02 Akim Demaille <akim@epita.fr>
20577
20578 * src/getargs.c (fixed_outfiles): Rename as...
20579 (yaccflag): for consistency and accuracy.
20580 Adjust dependencies.
20581
20582 2000-10-02 Akim Demaille <akim@epita.fr>
20583
20584 Use the more standard files `xalloc.h' and `xmalloc.c' instead of
20585 Bison's `allocate.c' and `alloc.h'. This patch was surprisingly
20586 difficult and introduced a lot of core dump. It turns out that
20587 Bison used an implementation of `xmalloc' based on `calloc', and
20588 at various places it does depend upon the initialization to 0. I
20589 have not tried to isolate the pertinent places, and all the former
20590 calls to Bison's `xmalloc' are now using `XCALLOC'. Someday,
20591 someone should address this issue.
20592
20593 * src/allocate.c, src/alloc.h, m4/bison-decl.m4: Remove.
20594 * lib/xmalloc.c, lib/xalloc.h, m4/malloc.m4, m4/realloc.m4: New
20595 files.
20596 Adjust dependencies.
20597 * src/warshall.h: New file.
20598 Propagate.
20599
20600 2000-10-02 Akim Demaille <akim@epita.fr>
20601
20602 Various anti-`extern in *.c' changes.
20603
20604 * src/system.h: Include `assert.h'.
20605
20606 2000-10-02 Akim Demaille <akim@epita.fr>
20607
20608 * src/state.h (nstates, final_state, first_state, first_shift)
20609 (first_reduction): Move their exportation from here...
20610 * src/LR0.h: to here.
20611 Adjust dependencies.
20612 * src/getargs.c (statisticsflag): New variable.
20613 Add support for `--statistics'.
20614 Adjust dependencies.
20615
20616 Remove a lot of now useless `extern' statements in most files.
20617
20618 2000-10-02 Akim Demaille <akim@epita.fr>
20619
20620 * src/LR0.h: New file.
20621 Propagate its use.
20622
20623 2000-10-02 Akim Demaille <akim@epita.fr>
20624
20625 * src/print.h: New file.
20626 Propagate its use.
20627 * src/print.c: Formatting and ordering changes.
20628 (verbose, terse): Replace with...
20629 (print_results): this new function.
20630 Adjust dependencies.
20631
20632 2000-10-02 Akim Demaille <akim@epita.fr>
20633
20634 * src/conflicts.c (conflict_report): New function.
20635 (conflict_log, verbose_conflict_log): Replace with...
20636 (print_conflicts): this function.
20637 Adjust dependencies.
20638 * src/conflicts.h: New file.
20639 Propagate its inclusion.
20640
20641 2000-10-02 Akim Demaille <akim@epita.fr>
20642
20643 * src/nullable.h: New file.
20644 Propagate its inclusion.
20645 * src/nullable.c: Formatting changes.
20646
20647 2000-10-02 Akim Demaille <akim@epita.fr>
20648
20649 * src/reduce.h: New file.
20650 Propagate its inclusion.
20651 * src/reduce.c: Topological sort and other formatting changes.
20652 (bool, TRUE, FALSE): Move their definition to...
20653 * src/system.h: here.
20654
20655 2000-10-02 Akim Demaille <akim@epita.fr>
20656
20657 * src/files.c: Formatting changes.
20658 (tryopen, tryclose, openfiles): Rename as...
20659 (xfopen, xfclose, open_files): this.
20660 (stringappend): static.
20661 * src/files.h: Complete the list of exported symbols.
20662 Propagate its use.
20663
20664 2000-10-02 Akim Demaille <akim@epita.fr>
20665
20666 * src/reader.h: New file.
20667 Propagate its use instead of tedious list of `extern' and
20668 prototypes.
20669 * src/reader.c: Formatting changes, topological sort,
20670 s/register//.
20671
20672 2000-10-02 Akim Demaille <akim@epita.fr>
20673
20674 * src/lex.h: Prototype `lex.c' exported functions.
20675 * src/reader.c: Adjust.
20676 * src/lex.c: Formatting changes.
20677 (safegetc): Rename as...
20678 (xgetc): this.
20679
20680 2000-10-02 Akim Demaille <akim@epita.fr>
20681
20682 * src/lalr.h: New file.
20683 Propagate its inclusion instead of prototypes and `extern'.
20684 * src/lalr.c: Formatting changes, topological sorting etc.
20685
20686 2000-10-02 Akim Demaille <akim@epita.fr>
20687
20688 * src/output.c (token_actions): Introduce a temporary array,
20689 YYDEFACT, that makes it possible for this function to use
20690 output_short_table.
20691
20692 2000-10-02 Akim Demaille <akim@epita.fr>
20693
20694 `user_toknums' is output as a `short[]' in `output.c', while it is
20695 defined as a `int[]' in `reader.c'. For consistency with the
20696 other output tables, `user_toknums' is now defined as a table of
20697 shorts.
20698
20699 * src/reader.c (user_toknums): Be a short table instead of an int
20700 table.
20701 Adjust dependencies.
20702
20703 Factor the short table outputs.
20704
20705 * src/output.c (output_short_table): New function.
20706 * src/output.c (output_gram, output_stos, output_rule_data)
20707 (output_base, output_table, output_check): Use it.
20708
20709 2000-10-02 Akim Demaille <akim@epita.fr>
20710
20711 * src/output.c (output): Topological sort of the functions, in
20712 order to get rid of the `static' prototypes.
20713 No longer use `register'.
20714 * src/output.h: New file.
20715 Propagate its inclusion in files explicitly prototyping functions
20716 from output.c.
20717
20718 2000-09-21 Akim Demaille <akim@epita.fr>
20719
20720 * src/atgeneral.m4: Update from Autoconf.
20721
20722 2000-09-21 Akim Demaille <akim@epita.fr>
20723
20724 * src/closure.h: New file.
20725 * src/closure.c: Formatting changes, topological sort over the
20726 functions, use of closure.h.
20727 (initialize_closure, finalize_closure): Rename as...
20728 (new_closure, free_closure): these. Adjust dependencies.
20729 * src/LR0.c: Formatting changes, topological sort, use of
20730 cloture.h.
20731 (initialize_states): Rename as...
20732 (new_states): this.
20733 * src/Makefile.am (noinst_HEADERS): Adjust.
20734
20735 2000-09-20 Akim Demaille <akim@epita.fr>
20736
20737 * src/acconfig.h: Don't protect config.h against multiple
20738 inclusion.
20739 Don't define PARAMS.
20740 * src/system.h: Define PARAMS.
20741 Remove some of the ad-hoc CPP magic for DOS, VMS etc.: this is the
20742 purpose of config.h. system.h must not try to fix wrong
20743 definitions in config.h.
20744
20745 2000-09-20 Akim Demaille <akim@epita.fr>
20746
20747 * src/derives.h: New file.
20748 * src/main.c, src/derives.h: Use it.
20749 Formatting changes.
20750 * src/Makefile.am (noinst_HEADERS): Adjust.
20751
20752 2000-09-20 Akim Demaille <akim@epita.fr>
20753
20754 * tests/atgeneral.m4: Update from Autoconf.
20755 * tests/calc.m4 (_AT_DATA_CALC_Y, AT_DATA_CALC_Y, _AT_CHECK_CALC)
20756 (AT_CHECK_CALC): New macros.
20757 Use these macros to test bison with options `', `--raw',
20758 `--debug', `--yacc', `--yacc --debug'.
20759
20760 2000-09-19 Akim Demaille <akim@epita.fr>
20761
20762 * src/output.c: Formatting changes.
20763 * src/machine.h: Remove, leaving its contents in...
20764 * src/system.h: here.
20765 Include stdio.h.
20766 Adjust all dependencies on stdio.h and machine.h.
20767 * src/getargs.h: New file.
20768 Let all `extern' declarations about getargs.c be replaced with
20769 inclusion of `getargs.h'.
20770 * src/Makefile.am (noinst_HEADERS): Adjust.
20771
20772 * tests/calc.m4 (yyin): Be initialized in main, not on the global
20773 scope.
20774 (yyerror): Returns void, not int.
20775 * doc/bison.texinfo: Formatting changes.
20776
20777 2000-09-19 Akim Demaille <akim@epita.fr>
20778
20779 * tests/calc.m4 (calc.y): Do not assign to stdin, as it's not
20780 portable.
20781
20782 2000-09-18 Akim Demaille <akim@epita.fr>
20783
20784 * configure.in: Append WARNING_CFLAGS to CFLAGS.
20785 * src/Makefile.am (INCLUDES): Don't.
20786 Be ready to fetch headers in lib/.
20787
20788 2000-09-18 Akim Demaille <akim@epita.fr>
20789
20790 * doc/bison.texinfo: Update the copyright.
20791 ANSIfy and GNUify the examples.
20792 Remove the old menu.
20793
20794 2000-09-18 Akim Demaille <akim@epita.fr>
20795
20796 First set of tests: use the `calc' example from the documentation.
20797
20798 * src/bison.s1 (yyparse): Condition the code using `yytname' which
20799 is defined only when YYDEBUG is.
20800 * m4/atconfig.m4 (AT_CONFIG): Adjust to Autoconf 2.13.
20801 * src/files.c (tryopen, tryclose): Formatting changes.
20802 Move to the top and be static.
20803 * src/reader.c (read_signed_integer): Likewise.
20804 * tests/calc.m4: New file.
20805 * Makefile.am, suite.m4: Adjust.
20806 * m4/atconfig.m4: Set BISON_SIMPLE and BISON_HAIRY.
20807
20808 2000-09-18 Akim Demaille <akim@epita.fr>
20809
20810 Add support for an Autotest test suite for Bison.
20811
20812 * m4/m4.m4, m4/atconfig.m4: New files.
20813 * m4/Makefile.am (EXTRA_DIST): Adjust.
20814 * tests/suite.m4, tests/Makefile.am, tests/atgeneral.m4: New
20815 files.
20816 * src/getargs.c: Display a more standard --version message.
20817 * src/reader.c (reader): Formatting changes.
20818 No longer depend upon VERSION_STRING.
20819 * configure.in: No longer use `dnl'.
20820 Set up the test suite and the new directory `tests/.
20821 (VERSION_STRING): Remove.
20822
20823 2000-04-14 Akim Demaille <akim@epita.fr>
20824
20825 * src/reader.c (copy_comment2): New function, same as former
20826 `copy_comment', but outputs into two FILE *.
20827 (copy_comment): Use it.
20828 (parse_union_decl): Use it.
20829 (get_type, parse_start_decl): Use the same `invalid' message.
20830 (parse_start_decl, parse_union_decl): Use the same `multiple'
20831 message.
20832 (parse_union_decl, copy_guard, copy_action): Use the same
20833 `unmatched' message.
20834 * m4/Makefile.am (EXTRA_DIST): Add `warning.m4'.
20835
20836 2000-03-31 Akim Demaille <akim@epita.fr>
20837
20838 * src/files.c (tryopen, tryclose): Move to the top.
20839 Be static.
20840
20841 2000-03-31 Akim Demaille <akim@epita.fr>
20842
20843 * src/main.c (main): Don't call `done', exit does it.
20844
20845 2000-03-31 Akim Demaille <akim@epita.fr>
20846
20847 * allocate.c: s/return (foo)/return foo/.
20848 * lalr.c: Likewise.
20849 * LR0.c: Likewise.
20850 * output.c: Likewise.
20851 * reader.c: Likewise.
20852 * symtab.c: Likewise.
20853 * vmsgetargs.c: Likewise.
20854
20855 2000-03-31 Akim Demaille <akim@epita.fr>
20856
20857 Clean up the error reporting functions.
20858
20859 * src/report.c: New file.
20860 * src/report.h: Likewise.
20861 * src/Makefile.am: Adjust.
20862 * m4/error.m4: New file.
20863 * m4/Makefile.am: Adjust.
20864 * configure.in (jm_PREREQ_ERROR): Call it.
20865 * src/main.c (int_to_string, banner, fatal_banner, warn_banner):
20866 Remove.
20867 (fatal, fatals): Remove. All callers use complain.c::fatal.
20868 (warn, warni, warns, warnss, warnss): Remove. All callers use
20869 complain.c::complain.
20870 (toomany): Remove, use fatal instead.
20871 * src/files.c (done): No argument, use complain_message_count.
20872 * src/main.c (main): Register `done' to `atexit'.
20873
20874 * src/getargs.c (usage): More `fputs', less `fprintf'.
20875
20876 2000-03-28 Akim Demaille <akim@epita.fr>
20877
20878 * lib/: New directory.
20879 * Makefile.am (SUBDIRS): Adjust.
20880 * configure.in: Adjust.
20881 (LIBOBJS): Although not used yet, AC_SUBST it, otherwise it's
20882 useless.
20883 * src/alloca.c: Moved to lib/.
20884 * src/getopt.c: Likewise.
20885 * src/getopt1.c: Likewise.
20886 * src/getopt.h: Likewise.
20887 * src/ansi2knr.c: Likewise.
20888 * src/ansi2knr.1: Likewise.
20889 * src/Makefile.am: Adjust.
20890 * lib/Makefile.am: New file.
20891
20892 2000-03-28 Akim Demaille <akim@epita.fr>
20893
20894 * src/getargs.c (usage): Refresh the help message.
20895
20896 2000-03-17 Akim Demaille <akim@epita.fr>
20897
20898 * src/getopt1.c: Updated from textutils 2.0e
20899 * src/getopt.c: Likewise.
20900 * src/getopt.h: Likewise.
20901
20902 2000-03-17 Akim Demaille <akim@epita.fr>
20903
20904 * src/Makefile.am (bison.simple): Fix the awk program: quote only
20905 the file name, not the whole `#line LINE FILE'.
20906
20907 2000-03-17 Akim Demaille <akim@epita.fr>
20908
20909 On syntax errors, report the token on which we choked.
20910
20911 * src/bison.s1 (yyparse): In the label yyerrlab, when
20912 YYERROR_VERBOSE, add yychar in msg.
20913
20914 2000-03-17 Akim Demaille <akim@epita.fr>
20915
20916 * src/reader.c (copy_at): New function.
20917 (copy_guard): Use it.
20918 (copy_action): Use it.
20919
20920 2000-03-17 Akim Demaille <akim@epita.fr>
20921
20922 Be kind to translators, save some useless translations.
20923
20924 * src/main.c (banner): New function.
20925 (fatal_banner): Use it.
20926 (warn_banner): Use it.
20927
20928 2000-03-17 Akim Demaille <akim@epita.fr>
20929
20930 * src/reader.c (copy_definition): Use copy_string and
20931 copy_comment. Removed now unused `match', `ended',
20932 `cplus_comment'.
20933 (copy_comment, copy_string): Moved, to be visible from
20934 copy_definition.
20935
20936 2000-03-17 Akim Demaille <akim@epita.fr>
20937
20938 * src/reader.c (copy_string): Declare `static inline'. No
20939 problems with inline, since it is checked by configure.
20940 (copy_comment): Likewise.
20941
20942 2000-03-17 Akim Demaille <akim@epita.fr>
20943
20944 * src/reader.c (packsymbols): Formatting changes.
20945
20946 2000-03-17 Akim Demaille <akim@epita.fr>
20947
20948 * src/reader.c (copy_comment): New function, factored out from:
20949 (copy_action): Use it. Removed now unused `match', `ended',
20950 `cplus_comment'.
20951 (copy_guard): Likewise.
20952
20953 2000-03-17 Akim Demaille <akim@epita.fr>
20954
20955 * src/reader.c (copy_string): New function, factored out from:
20956 (copy_action): Use it.
20957 (copy_guard): Likewise.
20958
20959 2000-03-17 Akim Demaille <akim@epita.fr>
20960
20961 Change the handling of @s so that they behave exactly like $s.
20962 There is now a pseudo variable @$ (readble and writable), location
20963 of the lhs of the rule (by default ranging from the location of
20964 the first symbol of the rhs, to the location of the last symbol,
20965 or, if the rhs is empty, YYLLOC).
20966
20967 * src/bison.s1 [YYLSP_NEEDED] (yyloc): New variable, twin of
20968 yyval.
20969 (yyparse): When providing a default semantic action, provide a
20970 default location action.
20971 (after the $): No longer change `*YYLSP', just stack YYLOC the
20972 same way you stack YYVAL.
20973 * src/reader.c (read_declarations): Use warns.
20974 (copy_guard, case '@'): Also recognize `@$', expanded as `YYLOC'.
20975 (copy_action, case '@'): Likewise.
20976 Use a standard error message, to save useless work from
20977 translators.
20978
20979 2000-03-17 Akim Demaille <akim@epita.fr>
20980
20981 * src/bison.s1: Formatting and cosmetics changes.
20982 * src/reader.c: Likewise.
20983 Update the Copyright notice.
20984
20985 2000-03-17 Akim Demaille <akim@epita.fr>
20986
20987 * src/bison.s1 (#line): All set to `#line' only, since the
20988 Makefile now handles them.
20989
20990 2000-03-16 Akim Demaille <akim@epita.fr>
20991
20992 * src/output.c (output_rule_data): Output the documentation of
20993 some of the tables.
20994 (Copyright notice): Update.
20995 Formatting changes.
20996
20997 2000-03-16 Akim Demaille <akim@epita.fr>
20998
20999 * src/bison.s1 [!YYDEBUG]: Define yydebug to 0. This allows to
21000 remove most `#if YYDEBUG != 0', since `if (yydebug)' is enough.
21001 One `#if YYDEBUG' remains, since it uses variables which are
21002 defined only if `YYDEBUG != 0'.
21003
21004 2000-03-16 Akim Demaille <akim@epita.fr>
21005
21006 * src/bison.s1 (yyparse): Reorganize the definitions of the stacks
21007 and related variables so that the similarities are highlighted.
21008
21009 2000-03-16 Akim Demaille <akim@epita.fr>
21010
21011 * src/bison.s1: Properly indent CPP directives.
21012
21013 2000-03-16 Akim Demaille <akim@epita.fr>
21014
21015 * src/bison.s1: Properly indent the `alloca' CPP section.
21016
21017 2000-03-16 Akim Demaille <akim@epita.fr>
21018
21019 Do not hard code values of directories in `configure.in'.
21020 Update the `configure' tool chain.
21021
21022 * configure.in (XPFILE, XPFILE1, LOCALEDIR): Remove, handled by
21023 src/makefile.am.
21024 (VERSION_STRING): Use the third arg of AC_DEFINE_UNQUOTED.
21025 (AC_OUTPUT): Add m4/Makefile.
21026 Bump to bison 1.28a, 1.29 has never been released.
21027 * acconfig.h (XPFILE, XPFILE1, LOCALEDIR): Remove, since they are
21028 handled via src/Makefile.am.
21029 (VERSION_STRING, PROTOTYPES, ENABLE_NLS, HAVE_CATGETS,
21030 HAVE_GETTEXT, HAVE_LC_MESSAGES, HAVE_STPCPY): Remove, handled by
21031 autoheader.
21032 * Makefile.am (SUBDIRS): Add m4.
21033 (ACLOCAL_AM_FLAGS): New variable.
21034 (AUTOMAKE_OPTIONS): Add check-news.
21035 * src/Makefile.am (bison.simple): Use awk to replace #line lines with
21036 the proper line number and file name.
21037 (DEFS): Propagate the location of bison library files and of the
21038 locale files.
21039 (INCLUDES): Added `-I ..' so that one can compile with srcdir !=
21040 builddir.
21041 * acinclude.m4: Remove, replaced by the directory m4.
21042 * m4/Makefile.am (EXTRA_DIST): New variable.
21043 * m4/gettext.m4: New file, from the fileutils.
21044 * m4/lcmessage.m4: Likewise
21045 * m4/progtest.m4: Likewise.
21046 * m4/bison-decl.m4: New file, extracted from former acinclude.m4.
21047
21048 2000-03-10 Akim Demaille <akim@epita.fr>
21049
21050 * src/closure.c:
21051 Formatting changes of various comments.
21052 Respect the GNU coding standards at various places.
21053 Don't use `_()' when no translation is needed.
21054
21055 1999-12-13 Jesse Thilo <jthilo@gnu.org>
21056
21057 * src/files.c:
21058 OS/2 honors TMPDIR environment variable.
21059
21060 1999-12-13 Jesse Thilo <jthilo@gnu.org>
21061
21062 * doc/bison.texinfo: Tweaked spelling and grammar.
21063 Updated ISBN.
21064 Removed reference to price of printed copy.
21065 Mention BISON_SIMPLE and BISON_HAIRY.
21066
21067 1999-12-13 Jesse Thilo <jthilo@gnu.org>
21068
21069 * configure.in, NEWS:
21070 Bison 1.29 released.
21071
21072 1999-10-27 Jesse Thilo <jthilo@gnu.org>
21073
21074 * doc/.cvsignore, doc/Makefile.am, doc/refcard.tex:
21075 Added reference card.
21076
21077 1999-07-26 Jesse Thilo <jthilo@gnu.org>
21078
21079 * po/ru.po: Added Russian translation.
21080
21081 1999-07-26 Jesse Thilo <jthilo@gnu.org>
21082
21083 * configure.in: Added Russian translation.
21084
21085 1999-07-06 Jesse Thilo <jthilo@gnu.org>
21086
21087 * configure.in, NEWS, README:
21088 Released version 1.28.
21089
21090 1999-06-14 Jesse Thilo <jthilo@gnu.org>
21091
21092 * src/system.h:
21093 Squashed redefinition warning on some systems.
21094
21095 * src/getargs.c, src/Makefile.am, src/reader.c, src/version.c:
21096 Have configure build version string instead of relying on ANSI string
21097 concatentation.
21098
21099 1999-06-14 Jesse Thilo <jthilo@gnu.org>
21100
21101 * po/POTFILES.in: Got rid of version.c.
21102
21103 1999-06-14 Jesse Thilo <jthilo@gnu.org>
21104
21105 * acconfig.h, configure.in:
21106 Have configure build version string instead of relying on ANSI string
21107 concatentation.
21108
21109 1999-06-08 Jesse Thilo <jthilo@gnu.org>
21110
21111 * doc/bison.1:
21112 Dropped mention of `+' for long-named options.
21113
21114 1999-05-30 Jesse Thilo <jthilo@gnu.org>
21115
21116 * src/files.c: Added <unistd.h> for unlink().
21117
21118 * src/Makefile.am, src/system.h:
21119 I18n fixes.
21120
21121 1999-05-30 Jesse Thilo <jthilo@gnu.org>
21122
21123 * README: Added a FAQ list.
21124
21125 * configure.in, acconfig.h:
21126 I18n fixes.
21127
21128 1999-05-30 Jesse Thilo <jthilo@gnu.org>
21129
21130 * doc/FAQ, doc/Makefile.am:
21131 Added a FAQ list.
21132
21133 1999-05-19 Jesse Thilo <jthilo@gnu.org>
21134
21135 * src/alloc.h, src/symtab.h, src/version.c:
21136 Protected inclusion of "config.h" with HAVE_CONFIG_H.
21137
21138 1999-04-18 Jesse Thilo <jthilo@gnu.org>
21139
21140 * src/.cvsignore, src/Makefile.am:
21141 Reorganized: sources in `src', documentation in `doc'.
21142
21143 * src/lex.c (literalchar):
21144 fixed the code for escaping double quotes (thanks
21145 Jonathan Czisny.)
21146
21147 1999-04-18 Jesse Thilo <jthilo@gnu.org>
21148
21149 * po/de.po, po/es.po, po/fr.po, po/nl.po, po/POTFILES.in:
21150 Adjusted paths to reflect directory reorganization.
21151
21152 1999-04-18 Jesse Thilo <jthilo@gnu.org>
21153
21154 * doc/.cvsignore, doc/Makefile.am:
21155 Reorganized: sources in `src', documentation in `doc'.
21156
21157 1999-04-18 Jesse Thilo <jthilo@gnu.org>
21158
21159 * configure.in:
21160 Updated AC_INIT file to reflect directory reorganization.
21161
21162 * configure.in, .cvsignore, Makefile.am, POTFILES.in:
21163 Reorganized: sources in `src', documentation in `doc'.
21164
21165 1999-04-13 Jesse Thilo <jthilo@gnu.org>
21166
21167 * src/allocate.c:
21168 Don't declare calloc() and realloc() if not necessary.
21169
21170 1999-04-13 Jesse Thilo <jthilo@gnu.org>
21171
21172 * configure.in, acconfig.h, acinclude.m4:
21173 Don't declare calloc() and realloc() if not necessary.
21174
21175 1999-03-23 Jesse Thilo <jthilo@gnu.org>
21176
21177 * po/.cvsignore: Added i18n support.
21178
21179 1999-03-23 Jesse Thilo <jthilo@gnu.org>
21180
21181 * acconfig.h, configure.in, Makefile.am:
21182 Added i18n support.
21183
21184 1999-03-22 Jesse Thilo <jthilo@gnu.org>
21185
21186 * src/bison.s1: Fixed #line numbers.
21187
21188 1999-03-15 Jesse Thilo <jthilo@gnu.org>
21189
21190 * po/es.po, po/fr.po, po/nl.po, po/de.po:
21191 Added PO files from Translation Project.
21192
21193 1999-03-03 Jesse Thilo <jthilo@gnu.org>
21194
21195 * Makefile.am:
21196 Added support for non-ANSI compilers (ansi2knr).
21197
21198 1999-02-16 Jesse Thilo <jthilo@gnu.org>
21199
21200 * configure.in: Bumped version number to 1.27.
21201
21202 * Makefile.am:
21203 Added `bison.simple' to list of files removed by `make distclean'.
21204
21205 1999-02-12 Jesse Thilo <jthilo@gnu.org>
21206
21207 * src/files.c, src/files.h:
21208 Defined locations of parser files in config.h instead of Makefile.
21209
21210 1999-02-12 Jesse Thilo <jthilo@gnu.org>
21211
21212 * acconfig.h, acinclude.m4, configure.in, Makefile.am:
21213 Defined locations of parser files in config.h instead of Makefile.
21214
21215 1999-02-09 Jesse Thilo <jthilo@gnu.org>
21216
21217 * Makefile.am:
21218 Removed inappropriate use of $< macro.
21219
21220 1999-02-05 Jesse Thilo <jthilo@gnu.org>
21221
21222 * po/Makefile.in.in, po/POTFILES.in:
21223 Add `po' directory skeleton.
21224
21225 1999-01-27 Jesse Thilo <jthilo@gnu.org>
21226
21227 * README: Document help-bison list.
21228
21229 * configure.in: Add check for mkstemp().
21230
21231 1999-01-20 Jesse Thilo <jthilo@gnu.org>
21232
21233 * src/conflicts.c, src/LR0.c, src/output.c, src/reader.c:
21234 Hush a few compiler warnings.
21235
21236 * src/files.c:
21237 Add tryclose(), which verifies that fclose was successful.
21238 Hush a couple of compiler warnings.
21239
21240 1999-01-20 Jesse Thilo <jthilo@gnu.org>
21241
21242 * Makefile.am, OChangeLog:
21243 ChangeLog is now automatically generated. Include the old version as
21244 OChangeLog.
21245
21246 1999-01-14 Jesse Thilo <jthilo@gnu.org>
21247
21248 * 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:
21249 Update FSF address.
21250
21251 1999-01-14 Jesse Thilo <jthilo@gnu.org>
21252
21253 * doc/bison.texinfo: Fix formatting glitch.
21254
21255 * doc/bison.texinfo: Update FSF address.
21256
21257 1999-01-14 Jesse Thilo <jthilo@gnu.org>
21258
21259 * acconfig.h: Update FSF address.
21260
21261 1999-01-08 Jesse Thilo <jthilo@gnu.org>
21262
21263 * src/system.h:
21264 Don't define PACKAGE here, since config.h defines it.
21265
21266 1998-12-30 Jesse Thilo <jthilo@gnu.org>
21267
21268 * src/reader.c: Update copyright date.
21269
21270 * src/main.c:
21271 Ditch sprintf to statically-sized buffers in fatal/warn functions in
21272 favor of output directly to stderr (avoids buffer overruns).
21273
21274 * src/reader.c: Some checks for premature EOF.
21275
21276 * 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:
21277 Use prototypes if the compiler understands them.
21278
21279 * src/files.c: Honor TMPDIR on Unix hosts.
21280 Use prototypes if the compiler understands them.
21281
21282 * src/reader.c:
21283 Fix a couple of buffer overrun bugs.
21284 Use prototypes if the compiler understands them.
21285
21286 * src/system.h: Include unistd.h and ctype.h.
21287 Use #ifdef instead of #if for NLS symbols.
21288
21289 1998-12-30 Jesse Thilo <jthilo@gnu.org>
21290
21291 * doc/bison.texinfo:
21292 Delete comment "consider using @set for edition number, etc..." since
21293 we now are doing so.
21294
21295 1998-12-30 Jesse Thilo <jthilo@gnu.org>
21296
21297 * configure.in:
21298 Use prototypes if the compiler understands them.
21299
21300 * NEWS: Document 1.26 highlights.
21301
21302 * Makefile.am: Require Automake 1.3 or later.
21303
21304 * acconfig.h:
21305 Use prototypes if the compiler understands them.
21306
21307 1998-12-29 Jesse Thilo <jthilo@gnu.org>
21308
21309 * src/version.c:
21310 Use VERSION symbol from automake for version number.
21311
21312 1998-12-29 Jesse Thilo <jthilo@gnu.org>
21313
21314 * acconfig.h, configure.in, version.cin:
21315 Use VERSION symbol from automake for version number.
21316
21317 1998-11-28 Jesse Thilo <jthilo@gnu.org>
21318
21319 * Makefile.am:
21320 Distribute original version of simple parser (bison.s1), not built
21321 version (bison.simple).
21322
21323 1998-11-28 Jesse Thilo <jthilo@gnu.org>
21324
21325 * doc/bison.texinfo: Add info dir entry.
21326
21327 * doc/bison.texinfo:
21328 Let automake put version number into documentation.
21329
21330 1998-11-26 Jesse Thilo <jthilo@gnu.org>
21331
21332 * src/bison.cld, src/build.com, src/vmshlp.mar:
21333 Add non-RCS files from /gd/gnu/bison.
21334
21335 1998-11-26 Jesse Thilo <jthilo@gnu.org>
21336
21337 * doc/bison.1:
21338 Document the BISON_HAIRY and BISON_SIMPLE variables.
21339
21340 1998-11-25 Jesse Thilo <jthilo@gnu.org>
21341
21342 * src/version.c: Build version.c automatically.
21343
21344 * src/reader.c:
21345 Fix token numbering (used to start at 258, not 257).
21346
21347 * src/system.h: Include config.h.
21348
21349 * src/getargs.c: Update bug report address.
21350
21351 * src/alloca.c, src/getopt1.c, src/getopt.c, src/getopt.h:
21352 Get latest copies of alloca.c, getopt.c, getopt.h, getopt1.c from gnu.org.
21353
21354 1998-11-25 Jesse Thilo <jthilo@gnu.org>
21355
21356 * Makefile.am:
21357 Rename bison.simple to bison.s1 (bison.simple is then built from bison.s1).
21358
21359 * configure.in, version.cin:
21360 Build version.c automatically.
21361
21362 * AUTHORS: Add AUTHORS file.
21363
21364 * README: Update bug report address.
21365
21366 * bison.simple:
21367 Rename bison.simple to bison.s1 (bison.simple is then built from bison.s1).
21368
21369 * configure.in, Makefile.am, Makefile.in, stamp-h.in:
21370 Add automake stuff.
21371
21372 1998-11-25 Jesse Thilo <jthilo@gnu.org>
21373
21374 * doc/bison.texinfo: Clean up some formatting.
21375
21376 1998-05-05 Richard Stallman <rms@gnu.org>
21377
21378 * doc/bison.texinfo:
21379 Explain better why to make a pure parser.
21380
21381 1998-01-05 Richard Stallman <rms@gnu.org>
21382
21383 * src/files.c (openfiles):
21384 [_WIN32 && !__CYGWIN32__] Use TEMP or Temp to
21385 find a temporary directory, if possible. Do not unlink files while
21386 they are open.
21387
21388 1997-08-25 Richard Stallman <rms@gnu.org>
21389
21390 * src/reader.c (stack_offset;):
21391 Change some warni to warns.
21392
21393 * src/lex.c (literalchar): Use warns, not warni.
21394
21395 1997-06-28 Richard Stallman <rms@gnu.org>
21396
21397 * src/bison.s1: Add a Bison version comment.
21398
21399 * src/main.c (fatal, warn, berror):
21400 Use program_name.
21401
21402 1997-06-28 Richard Stallman <rms@gnu.org>
21403
21404 * Makefile.in (bison_version): New variable.
21405 (dist): Use that variable.
21406 (bison.s1): Substitute the Bison version into bison.simple.
21407
21408 * bison.simple: Add a Bison version comment.
21409
21410 1997-06-18 Richard Stallman <rms@gnu.org>
21411
21412 * src/main.c (fatal, warn, berror):
21413 Make error messages standard.
21414 (toomany): Improve error message text.
21415
21416 * 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:
21417 new.h renamed to alloc.h.
21418
21419 1997-06-18 Richard Stallman <rms@gnu.org>
21420
21421 * Makefile.in: new.h renamed to alloc.h.
21422
21423 1997-05-24 Richard Stallman <rms@gnu.org>
21424
21425 * src/lex.c (literalchar):
21426 Fix the code for escaping \, " and '.
21427
21428 (lex): Avoid trouble when there are many chars
21429 to discard in a char literal with just several chars in it.
21430
21431 1997-05-17 Richard Stallman <rms@gnu.org>
21432
21433 * src/bison.s1:
21434 Use malloc, if using alloca is troublesome.
21435 (YYSTACK_USE_ALLOCA): New flag macro.
21436 Define it for some systems and compilers.
21437 (YYSTACK_ALLOC): New macro.
21438 (yyparse): Use YYSTACK_ALLOC to allocate stack.
21439 If it was malloc'd, free it.
21440
21441 1997-05-17 Richard Stallman <rms@gnu.org>
21442
21443 * bison.simple:
21444 Use malloc, if using alloca is troublesome.
21445 (YYSTACK_USE_ALLOCA): New flag macro.
21446 Define it for some systems and compilers.
21447 (YYSTACK_ALLOC): New macro.
21448 (yyparse): Use YYSTACK_ALLOC to allocate stack.
21449 If it was malloc'd, free it.
21450
21451 1997-04-23 Richard Stallman <rms@gnu.org>
21452
21453 * src/bison.s1:
21454 (alloca) [__hpux]: Always define as __builtin_alloca.
21455
21456 1997-04-23 Richard Stallman <rms@gnu.org>
21457
21458 * bison.simple:
21459 (alloca) [__hpux]: Always define as __builtin_alloca.
21460
21461 1997-04-22 Richard Stallman <rms@gnu.org>
21462
21463 * src/bison.s1:
21464 [__hpux]: Include alloca.h (right for HPUX 10)
21465 instead of declaring alloca (right for HPUX 9).
21466
21467 * src/bison.s1 (__yy_memcpy):
21468 Declare arg `count' as unsigned int.
21469 (yyparse): Cast third arg to __yy_memcpy to unsigned int.
21470
21471 1997-04-22 Richard Stallman <rms@gnu.org>
21472
21473 * bison.simple:
21474 [__hpux]: Include alloca.h (right for HPUX 10)
21475 instead of declaring alloca (right for HPUX 9).
21476
21477 * bison.simple (__yy_memcpy):
21478 Declare arg `count' as unsigned int.
21479 (yyparse): Cast third arg to __yy_memcpy to unsigned int.
21480
21481 1997-01-03 Richard Stallman <rms@gnu.org>
21482
21483 * src/allocate.c: [__STDC__ or _MSC_VER]:
21484 Declare calloc and realloc to return void *.
21485
21486 1997-01-02 Richard Stallman <rms@gnu.org>
21487
21488 * src/system.h:
21489 [_MSC_VER]: Include stdlib.h and process.h.
21490 [_MSC_VER] (getpid): Define as macro--translate it to _getpid.
21491
21492 * src/main.c (main): Return FAILURE as a value.
21493 (printable_version): Declare arg as int, not char.
21494
21495 1997-01-02 Richard Stallman <rms@gnu.org>
21496
21497 * Makefile.in (dist):
21498 Explicitly check for symlinks, and copy them.
21499
21500 1996-12-19 Richard Stallman <rms@gnu.org>
21501
21502 * src/files.c:
21503 [_MSC_VER] (XPFILE, XPFILE1): Define, if not already defined.
21504
21505 1996-12-18 Paul Eggert <eggert@gnu.org>
21506
21507 * src/bison.s1 (yyparse):
21508 If __GNUC__ and YYPARSE_PARAM are both defined,
21509 declare yyparse to have a void * argument.
21510
21511 1996-12-18 Paul Eggert <eggert@gnu.org>
21512
21513 * bison.simple (yyparse):
21514 If __GNUC__ and YYPARSE_PARAM are both defined,
21515 declare yyparse to have a void * argument.
21516
21517 1996-12-17 Richard Stallman <rms@gnu.org>
21518
21519 * src/reduce.c (nbits): Add some casts.
21520
21521 1996-08-12 Richard Stallman <rms@gnu.org>
21522
21523 * src/bison.s1: Test _MSDOS as well as _MSDOS_.
21524
21525 1996-08-12 Richard Stallman <rms@gnu.org>
21526
21527 * bison.simple: Test _MSDOS as well as _MSDOS_.
21528
21529 1996-07-31 Richard Stallman <rms@gnu.org>
21530
21531 * src/bison.s1:
21532 [__sun && __i386]: Include alloca.h.
21533
21534 1996-07-31 Richard Stallman <rms@gnu.org>
21535
21536 * bison.simple:
21537 [__sun && __i386]: Include alloca.h.
21538
21539 1996-07-30 Richard Stallman <rms@gnu.org>
21540
21541 * src/bison.s1: Comment change.
21542
21543 * src/bison.s1: Test _MSDOS_, not MSDOS.
21544
21545 1996-07-30 Richard Stallman <rms@gnu.org>
21546
21547 * bison.simple: Comment change.
21548
21549 * bison.simple: Test _MSDOS_, not MSDOS.
21550
21551 1996-06-01 Richard Stallman <rms@gnu.org>
21552
21553 * 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:
21554 Insert `_' macro around many string constants.
21555
21556 * src/main.c:
21557 Insert `_' macro around many string constants.
21558
21559 (main): Call setlocale, bindtextdomain and textdomain.
21560
21561 * src/system.h: [HAVE_LOCALE_H]: Include locale.h.
21562 [! HAVE_LOCALE_H] (setlocale): Define as no-op.
21563 [ENABLE_NLS]: Include libintl.h.
21564 [ENABLE_NLS] (gettext): Define.
21565 [! ENABLE_NLS] (bintextdomain, textdomain, _): Consolation definitions.
21566 (N_, PACKAGE, LOCALEDIR): New macros.
21567
21568 1996-06-01 Richard Stallman <rms@gnu.org>
21569
21570 * POTFILES.in: New file.
21571
21572 * Makefile.in (allocate.o):
21573 Define target explicitly.
21574
21575 * Makefile.in (CFLAGS): Set to @CFLAGS@.
21576 (LDFLAGS): Set to @LDFLAGS@.
21577 (configure): Run autoconf only if preceding `cd' succeeds.
21578 (bison.s1): Redirect output to temporary file then move the
21579 temporary to the target, rather than redirecting directly to bison.s1.
21580 (clean): Remove config.status and config.log.
21581 (distclean): Don't remove config.status here.
21582
21583 1996-05-12 Richard Stallman <rms@gnu.org>
21584
21585 * src/bison.s1:
21586 (__yy_memcpy) [__cplusplus]: Reorder declarations of variables f and t.
21587
21588 1996-05-12 Richard Stallman <rms@gnu.org>
21589
21590 * bison.simple:
21591 (__yy_memcpy) [__cplusplus]: Reorder declarations of variables f and t.
21592
21593 1996-05-11 Richard Stallman <rms@gnu.org>
21594
21595 * src/bison.s1 (__yy_memcpy):
21596 Really reorder the args, as was supposedly done on Feb 14 1995.
21597 (yyparse): Calls changed accordingly.
21598
21599 1996-05-11 Richard Stallman <rms@gnu.org>
21600
21601 * Makefile.in (dist): Don't use $(srcdir).
21602
21603 * bison.simple (__yy_memcpy):
21604 Really reorder the args, as was supposedly done on Feb 14 1995.
21605 (yyparse): Calls changed accordingly.
21606
21607 1996-01-27 Richard Stallman <rms@gnu.org>
21608
21609 * src/output.c (output_rule_data):
21610 Test YYERROR_VERBOSE in the conditional
21611 around the definition of ttyname.
21612
21613 1995-12-29 Richard Stallman <rms@gnu.org>
21614
21615 * src/bison.s1:
21616 Fix line numbers in #line commands.
21617
21618 1995-12-29 Richard Stallman <rms@gnu.org>
21619
21620 * bison.simple:
21621 Fix line numbers in #line commands.
21622
21623 1995-12-27 Richard Stallman <rms@gnu.org>
21624
21625 * src/bison.s1 (YYPARSE_PARAM_DECL):
21626 In C++, make it always null.
21627 (YYPARSE_PARAM_ARG): New macro.
21628 (yyparse): Use YYPARSE_PARAM_ARG.
21629
21630 1995-12-27 Richard Stallman <rms@gnu.org>
21631
21632 * bison.simple (YYPARSE_PARAM_DECL):
21633 In C++, make it always null.
21634 (YYPARSE_PARAM_ARG): New macro.
21635 (yyparse): Use YYPARSE_PARAM_ARG.
21636
21637 1995-11-29 Richard Stallman <rms@gnu.org>
21638
21639 * doc/bison.texinfo:
21640 Describe literal string tokens, %raw, %no_lines, %token_table.
21641
21642 1995-11-29 Daniel Hagerty <hag@gnu.org>
21643
21644 * doc/bison.texinfo: Fixed update date
21645
21646 1995-10-16 Richard Stallman <rms@gnu.org>
21647
21648 * src/version.c: Version 1.25.
21649
21650 1995-10-16 Richard Stallman <rms@gnu.org>
21651
21652 * NEWS: *** empty log message ***
21653
21654 1995-10-16 Richard Stallman <rms@gnu.org>
21655
21656 * doc/bison.1, doc/bison.rnh:
21657 Add new options.
21658
21659 1995-10-15 Richard Stallman <rms@gnu.org>
21660
21661 * src/vmsgetargs.c, src/getargs.c:
21662 Added -n, -k, and -raw switches.
21663 (noparserflag, toknumflag, rawtoknumflag): New variables.
21664
21665 * src/symtab.h (SALIAS):
21666 New #define for adding aliases to %token.
21667 (struct bucket): Added `alias' field.
21668
21669 * src/reduce.c (reduce_grammar):
21670 Revise error message.
21671 (print_notices): Remove final `.' from error message.
21672
21673 * src/reader.c (reader_output_yylsp):
21674 New function.
21675 (readgram): Use `#if 0' around code that accepted %command
21676 inside grammar rules: The documentation doesn't allow it,
21677 and it will fail since the %command processors scan for the next %.
21678 (parse_token_decl): Extended the %token
21679 declaration to allow a multi-character symbol as an alias.
21680 (parse_thong_decl): New function.
21681 (read_declarations): Added %thong declarations.
21682 (read_declarations): Handle NOOP to deal with allowing
21683 % declarations as another means to specify the flags.
21684 (readgram): Allow %prec prior to semantics embedded in a rule.
21685 (skip_to_char, read_declarations, copy_definition)
21686 (parse_token_decl, parse_start_decl, parse_type_decl)
21687 (parse_assoc_decl, parse_union_decl, parse_expect_decl)
21688 (get_type_name, copy_guard, copy_action, readgram)
21689 (get_type, packsymbols): Revised most error messages.
21690 Changed `fatal' to `warnxxx' to avoid aborting for error.
21691 Revised and use multiple warnxxx functions to avoid using VARARGS1.
21692 (read_declarations): Improve the error message for
21693 an invalid character. Do not abort.
21694 (read_declarations, copy_guard, copy_action): Use
21695 printable_version to avoid unprintable characters in printed output.
21696 (parse_expect_decl): Error if argument to %expect exceeds 10 digits.
21697 (parse_token_decl, parse_assoc_decl, parse_type_decl, get_type):
21698 Allow the type of a non-terminal can be given
21699 more than once, as long as all specifications give the same type.
21700
21701 * src/output.c:
21702 (output_headers, output_trailers, output, output_gram)
21703 (output_rule_data): Implement noparserflag variable.
21704 Implement toknumflag variable.
21705 (output): Call reader_output_yylsp to output LTYPESTR.
21706
21707 * src/main.c (main):
21708 If reader sees an error, don't process the grammar.
21709 (fatals): Updated to not use VARARGS1.
21710 (printable_version, int_to_string, warn, warni, warns, warnss)
21711 (warnsss): New error reporting functions. Avoid abort for error.
21712
21713 * src/lex.h:
21714 Added THONG and NOOP for alias processing.
21715 Added SETOPT for the new code that allows setting options with %flags.
21716
21717 * src/lex.c:
21718 Include getopt.h. Add some extern decls.
21719 (safegetc): New function to deal with EOF gracefully.
21720 (literalchar); new function to deal with reading \ escapes.
21721 (lex): Use literalchar.
21722 (lex): Implemented "..." tokens.
21723 (literalchar, lex, parse_percent_token): Made tokenbuffer
21724 always contain the token. This includes growing the token
21725 buffer while reading an integer.
21726 (parse_percent_token): Replaced if-else statement with percent_table.
21727 (parse_percent_token): Added % declarations as another
21728 way to specify the flags -n, -l, and -r. Also added hooks for
21729 -d, -k, -y, -v, -t, -p, -b, -o, but implementation requires
21730 major changes to files.c.
21731 (lex) Retain in the incoming stream a character following
21732 an incorrect '/'.
21733 (skip_white_space, lex): Revised most error messages
21734 and changed fatal to warn to avoid aborting.
21735 (percent_table): Added %thong declarations.
21736
21737 * src/gram.h: Comment changes.
21738
21739 * src/files.c (openfiles, open_extra_files, done):
21740 Add faction flag
21741 and actfile file. Handle noparserflag. Both for -n switch.
21742
21743 * src/conflicts.c (resolve_sr_conflict):
21744 Remove use of alloca.
21745
21746 1995-06-01 Jim Meyering <meyering@gnu.org>
21747
21748 * doc/bison.texinfo: *** empty log message ***
21749
21750 1995-05-06 Richard Stallman <rms@gnu.org>
21751
21752 * src/bison.s1: Comment change.
21753
21754 1995-05-06 Richard Stallman <rms@gnu.org>
21755
21756 * bison.simple: Comment change.
21757
21758 1995-05-03 Richard Stallman <rms@gnu.org>
21759
21760 * src/version.c: Version now 1.24.
21761
21762 * src/bison.s1: Change distribution terms.
21763
21764 * src/version.c: Version now 1.23.
21765
21766 1995-05-03 Richard Stallman <rms@gnu.org>
21767
21768 * doc/bison.texinfo:
21769 Rewrite "Conditions for Using Bison".
21770 Update version to 1.24.
21771
21772 1995-05-03 Richard Stallman <rms@gnu.org>
21773
21774 * bison.simple: Change distribution terms.
21775
21776 1995-02-23 Richard Stallman <rms@gnu.org>
21777
21778 * src/files.c: Test __VMS_POSIX as well as VMS.
21779
21780 1995-02-14 Jim Meyering <meyering@gnu.org>
21781
21782 * src/bison.s1 (__yy_memcpy):
21783 Renamed from __yy_bcopy to avoid
21784 confusion. Reverse FROM and TO arguments to be consistent with
21785 those of memcpy.
21786
21787 1995-02-14 Jim Meyering <meyering@gnu.org>
21788
21789 * bison.simple (__yy_memcpy):
21790 Renamed from __yy_bcopy to avoid
21791 confusion. Reverse FROM and TO arguments to be consistent with
21792 those of memcpy.
21793
21794 1994-11-10 David J. MacKenzie <djm@gnu.org>
21795
21796 * NEWS: reformat
21797
21798 * NEWS: New file.
21799
21800 * Makefile.in (DISTFILES): Include NEWS.
21801
21802 * Makefile.in (DISTFILES):
21803 Include install-sh, not install.sh.
21804
21805 * configure.in: Update to Autoconf v2 macro names.
21806
21807 1994-10-05 David J. MacKenzie <djm@gnu.org>
21808
21809 * Makefile.in: fix typo
21810
21811 * Makefile.in (prefix, exec_prefix):
21812 Let configure set them.
21813
21814 1994-09-28 David J. MacKenzie <djm@gnu.org>
21815
21816 * Makefile.in: Set datadir to $(prefix)/share.
21817
21818 1994-09-15 Richard Stallman <rms@gnu.org>
21819
21820 * src/bison.s1:
21821 Update copyright notice and GPL version.
21822
21823 1994-09-15 Richard Stallman <rms@gnu.org>
21824
21825 * bison.simple:
21826 Update copyright notice and GPL version.
21827
21828 1994-07-12 Richard Stallman <rms@gnu.org>
21829
21830 * src/reduce.c, src/reader.c:
21831 entered into RCS
21832
21833 1994-05-05 David J. MacKenzie <djm@gnu.org>
21834
21835 * Makefile.in: entered into RCS
21836
21837 1994-03-26 Richard Stallman <rms@gnu.org>
21838
21839 * src/bison.s1: entered into RCS
21840
21841 1994-03-26 Richard Stallman <rms@gnu.org>
21842
21843 * bison.simple: entered into RCS
21844
21845 1994-03-25 Richard Stallman <rms@gnu.org>
21846
21847 * src/main.c: entered into RCS
21848
21849 1994-03-24 Richard Stallman <rms@gnu.org>
21850
21851 * src/conflicts.c: entered into RCS
21852
21853 1994-01-02 Richard Stallman <rms@gnu.org>
21854
21855 * Makefile.in: *** empty log message ***
21856
21857 1993-11-21 Richard Stallman <rms@gnu.org>
21858
21859 * src/bison.s1: *** empty log message ***
21860
21861 1993-11-21 Richard Stallman <rms@gnu.org>
21862
21863 * doc/bison.texinfo: entered into RCS
21864
21865 * doc/bison.texinfo: *** empty log message ***
21866
21867 1993-11-21 Richard Stallman <rms@gnu.org>
21868
21869 * bison.simple: *** empty log message ***
21870
21871 1993-10-25 David J. MacKenzie <djm@gnu.org>
21872
21873 * doc/bison.texinfo: *** empty log message ***
21874
21875 1993-10-19 Richard Stallman <rms@gnu.org>
21876
21877 * src/bison.s1: *** empty log message ***
21878
21879 1993-10-19 Richard Stallman <rms@gnu.org>
21880
21881 * bison.simple: *** empty log message ***
21882
21883 1993-10-14 Richard Stallman <rms@gnu.org>
21884
21885 * src/bison.s1: *** empty log message ***
21886
21887 1993-10-14 Richard Stallman <rms@gnu.org>
21888
21889 * bison.simple: *** empty log message ***
21890
21891 1993-09-14 David J. MacKenzie <djm@gnu.org>
21892
21893 * doc/bison.texinfo: *** empty log message ***
21894
21895 1993-09-13 Noah Friedman <friedman@gnu.org>
21896
21897 * Makefile.in: *** empty log message ***
21898
21899 1993-09-10 Richard Stallman <rms@gnu.org>
21900
21901 * src/conflicts.c: *** empty log message ***
21902
21903 * src/system.h: entered into RCS
21904
21905 1993-09-10 Richard Stallman <rms@gnu.org>
21906
21907 * doc/bison.1: entered into RCS
21908
21909 1993-09-06 Noah Friedman <friedman@gnu.org>
21910
21911 * src/version.c: entered into RCS
21912
21913 1993-09-06 Noah Friedman <friedman@gnu.org>
21914
21915 * Makefile.in: *** empty log message ***
21916
21917 1993-07-30 David J. MacKenzie <djm@gnu.org>
21918
21919 * Makefile.in: *** empty log message ***
21920
21921 1993-07-24 Richard Stallman <rms@gnu.org>
21922
21923 * src/bison.s1: *** empty log message ***
21924
21925 1993-07-24 Richard Stallman <rms@gnu.org>
21926
21927 * bison.simple: *** empty log message ***
21928
21929 1993-07-08 David J. MacKenzie <djm@gnu.org>
21930
21931 * Makefile.in: *** empty log message ***
21932
21933 1993-07-04 Richard Stallman <rms@gnu.org>
21934
21935 * src/bison.s1: *** empty log message ***
21936
21937 1993-07-04 Richard Stallman <rms@gnu.org>
21938
21939 * bison.simple: *** empty log message ***
21940
21941 1993-06-26 David J. MacKenzie <djm@gnu.org>
21942
21943 * src/getargs.c: entered into RCS
21944
21945 1993-06-26 David J. MacKenzie <djm@gnu.org>
21946
21947 * doc/bison.texinfo: *** empty log message ***
21948
21949 * doc/bison.1: New file.
21950
21951 1993-06-25 Richard Stallman <rms@gnu.org>
21952
21953 * src/getargs.c: New file.
21954
21955 1993-06-16 Richard Stallman <rms@gnu.org>
21956
21957 * src/bison.s1: *** empty log message ***
21958
21959 1993-06-16 Richard Stallman <rms@gnu.org>
21960
21961 * bison.simple: *** empty log message ***
21962
21963 1993-06-03 Richard Stallman <rms@gnu.org>
21964
21965 * src/bison.s1: New file.
21966
21967 1993-06-03 Richard Stallman <rms@gnu.org>
21968
21969 * doc/bison.texinfo: *** empty log message ***
21970
21971 1993-06-03 Richard Stallman <rms@gnu.org>
21972
21973 * bison.simple: New file.
21974
21975 1993-05-19 Richard Stallman <rms@gnu.org>
21976
21977 * doc/bison.texinfo: New file.
21978
21979 1993-05-07 Noah Friedman <friedman@gnu.org>
21980
21981 * Makefile.in: *** empty log message ***
21982
21983 1993-04-28 Noah Friedman <friedman@gnu.org>
21984
21985 * src/reader.c: *** empty log message ***
21986
21987 1993-04-23 Noah Friedman <friedman@gnu.org>
21988
21989 * src/alloc.h: entered into RCS
21990
21991 1993-04-20 David J. MacKenzie <djm@gnu.org>
21992
21993 * src/version.c: *** empty log message ***
21994
21995 * src/files.c, src/allocate.c:
21996 entered into RCS
21997
21998 * src/reader.c: *** empty log message ***
21999
22000 * src/lex.c: entered into RCS
22001
22002 * src/conflicts.c: New file.
22003
22004 * src/symtab.c: entered into RCS
22005
22006 * src/alloc.h: New file.
22007
22008 * src/LR0.c: entered into RCS
22009
22010 1993-04-18 Noah Friedman <friedman@gnu.org>
22011
22012 * src/reader.c: New file.
22013
22014 * src/version.c: *** empty log message ***
22015
22016 1993-04-18 Noah Friedman <friedman@gnu.org>
22017
22018 * Makefile.in: *** empty log message ***
22019
22020 1993-04-17 Noah Friedman <friedman@gnu.org>
22021
22022 * Makefile.in: *** empty log message ***
22023
22024 1993-04-15 Richard Stallman <rms@gnu.org>
22025
22026 * src/main.c, src/files.c:
22027 New file.
22028
22029 1993-04-15 Noah Friedman <friedman@gnu.org>
22030
22031 * configure.in: entered into RCS
22032
22033 * configure.in: *** empty log message ***
22034
22035 * configure.in: New file.
22036
22037 1993-04-14 Richard Stallman <rms@gnu.org>
22038
22039 * Makefile.in: New file.
22040
22041 1993-04-13 Richard Stallman <rms@gnu.org>
22042
22043 * src/version.c: New file.
22044
22045 1993-03-25 Richard Stallman <rms@gnu.org>
22046
22047 * src/output.c: entered into RCS
22048
22049 1992-09-25 Richard Stallman <rms@gnu.org>
22050
22051 * configure.bat: entered into RCS
22052
22053 1992-06-22 Richard Stallman <rms@gnu.org>
22054
22055 * src/vmsgetargs.c: entered into RCS
22056
22057 1992-06-22 Richard Stallman <rms@gnu.org>
22058
22059 * doc/bison.rnh: entered into RCS
22060
22061 1992-04-20 David J. MacKenzie <djm@gnu.org>
22062
22063 * README: entered into RCS
22064
22065 1992-01-22 Richard Stallman <rms@gnu.org>
22066
22067 * src/machine.h: entered into RCS
22068
22069 1991-12-21 Richard Stallman <rms@gnu.org>
22070
22071 * src/lalr.c, src/closure.c:
22072 entered into RCS
22073
22074 1991-12-20 Richard Stallman <rms@gnu.org>
22075
22076 * src/state.h: entered into RCS
22077
22078 1991-12-18 Richard Stallman <rms@gnu.org>
22079
22080 * src/print.c, src/nullable.c, src/derives.c:
22081 entered into RCS
22082
22083 1991-11-03 David J. MacKenzie <djm@gnu.org>
22084
22085 * src/warshall.c, src/types.h, src/symtab.h, src/lex.h, src/gram.c, src/gram.h, src/files.h:
22086 entered into RCS
22087
22088 1988-09-09 Richard Stallman <rms@gnu.org>
22089
22090 * src/bison.hairy: entered into RCS
22091
22092 1987-12-16 Richard Stallman <rms@gnu.org>
22093
22094 * REFERENCES: entered into RCS
22095
22096
22097 -----
22098
22099 Copyright (C) 1987, 1988, 1991, 1992, 1993, 1994, 1995, 1996,
22100 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
22101 Free Software Foundation, Inc.
22102
22103 Copying and distribution of this file, with or without
22104 modification, are permitted provided the copyright notice and this
22105 notice are preserved.