1 2006-08-10 Joel E. Denny <jdenny@ces.clemson.edu>
3 Clean up scanners a bit.
4 * src/flex-scanner.h (FLEX_NO_OBSTACK): New macro that blocks obstack
5 definitions so gcc won't warn when obstack_for_string is unused.
6 * src/scan-code.l: config.h and system.h are already #include'd by
7 scan-code-c.c, so get rid of them here.
8 * src/scan-gram.l: Likewise.
9 * src/scan-skel.l: Likewise, and use flex-scanner.h without obstack
10 definitions rather than duplicating the rest of it.
11 * src/scan-gram-c.c, scan-skel-c.c: #include "system.h".
13 2006-08-09 Joel E. Denny <jdenny@ces.clemson.edu>
15 Suppress signed/unsigned comparison warnings for yycheck.
16 * data/c.m4 (b4_safest_int_type): New macro.
17 * data/glr.c, data/lalr1.cc: Wherever you compare yycheck[i] against
18 a signed int type, cast it to b4_safest_int_type first.
19 * data/yacc.c: Likewise.
20 (b4_safest_int_type): Overwrite the one from c.m4 since b4_int_type is
23 2006-08-09 Ralf Wildenhues <Ralf.Wildenhues@gmx.de> (tiny change)
25 * doc/bison.texinfo: Fix some typos.
27 2006-08-02 Paul Eggert <eggert@cs.ucla.edu>
29 * m4/.cvsignore: Add inttypes_h.m4,lib-ld.m4, lib-prefix.m4,
30 po.m4, stdint_h.m4, uintmax_t.m4, ulonglong.m4, warning.m4.
32 * bootstrap (gnulib_tool): Stop using --assume-autoconf;
33 the latest gnulib does this a different way.
34 (get_translations): Sharuzzaman Ahmat Raslan reported that the ms
35 translation was patched, so stop omitting it.
37 2006-07-29 Joel E. Denny <jdenny@ces.clemson.edu>
39 Enable declaration of default %printer/%destructor. Make the parser
40 use these for all user-declared grammar symbols for which the user does
41 not declare a specific %printer/%destructor. Thus, the parser uses it
42 for token 0 if the user declares it but not if Bison generates it as
43 $end. Discussed starting at
44 <http://lists.gnu.org/archive/html/bison-patches/2006-02/msg00064.html>,
45 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00091.html>,
47 <http://lists.gnu.org/archive/html/bison-patches/2006-07/msg00019.html>.
48 * NEWS (2.3+): Mention.
49 * doc/bison.texinfo (Actions in Mid-Rule): It's no longer impossible to
50 declare a %destructor for a mid-rule's semantic value. It's just
51 impossible to declare one specific to it.
52 (Freeing Discarded Symbols): Mention that @$ can be used in %destructor
53 code. Describe default %destructor form.
54 * src/parse-gram.y (grammar_declaration): Parse default
55 %printer/%destructor declarations.
56 * src/output.c (symbol_destructors_output): Use symbol_destructor_get
57 and symbol_destructor_location_get rather than accessing the destructor
58 and destructor_location members of struct symbol.
59 (symbol_printers_output): Likewise but for %printer's.
60 * src/reader.c (symbol_should_be_used): Likewise but for %destructor's
62 * src/symtab.c (default_destructor, default_destructor_location,
63 default_printer, default_printer_location): New static global
64 variables to record the default %destructor and %printer.
65 (symbol_destructor_get, symbol_destructor_location_get,
66 symbol_printer_get, symbol_printer_location_get): New functions to
67 compute the appropriate %destructor and %printer for a symbol.
68 (default_destructor_set, default_printer_set): New functions to set the
69 default %destructor and %printer.
70 * src/symtab.h: Prototype all those new functions.
71 * tests/actions.at (Default %printer and %destructor): New test to
72 check that the right %printer and %destructor are called, that they're
73 not called for $end, and that $$ and @$ work correctly.
74 (Default %printer and %destructor for user-declared end token): New
75 test to check that the default %printer and %destructor are called for
76 a user-declared end token.
77 * tests/input.at (Default %printer and %destructor redeclared, Unused
78 values with default %destructor): New tests to check related grammar
81 2006-07-29 Joel E. Denny <jdenny@ces.clemson.edu>
83 Clean up handling of %destructor for the end token (token 0).
85 <http://lists.gnu.org/archive/html/bison-patches/2006-07/msg00019.html>
87 <http://lists.gnu.org/archive/html/help-bison/2006-07/msg00013.html>.
89 Make the skeletons consistent in how they pop the end token and invoke
91 * data/glr.c (yyrecoverSyntaxError, yyparse): Don't pop the start
92 state, which has token number 0, since this would invoke the
93 %destructor for the end token.
94 * data/lalr1.cc (yy::parser::parse): Don't check for the final state
95 until after shifting the end token, or else it won't be popped.
96 * data/yacc.c (yyparse): Likewise.
98 * data/glr.c (yyparse): Clear the lookahead after shifting it even when
99 it's the end token. Upon termination, destroy an unshifted lookahead
100 even when it's the end token.
101 * data/lalr1.cc (yy::parser::parse): Likewise.
102 * data/yacc.c (yyparse): Likewise.
104 * src/reader.c (packgram): Don't check rule 0. This suppresses unused
105 value warnings for the end token when the user gives the end token a
108 * tests/actions.at (Printers and Destructors): Test all the above.
110 2006-07-24 Paul Eggert <eggert@cs.ucla.edu>
112 Update to latest gnulib and gettext versions.
113 * bootstrap (gnulib-modules): Remove hard-locale, stdio-safer.
115 (gnulib_files): Add m4/warning.m4. Don't worry about files
116 overwritten by autopoint.
117 Replace gt_INTL_SUBDIR_CORE with an empty body in m4/gettext_gl.m4.
118 Suppress "id", "ms", "tr" translations for now, since gettext 0.15
120 Don't use autoreconf; instead, invoke autopoint etc. by hand,
121 so that we can remove the intl files at a better time.
122 (intl_files_to_remove): Remove aclocal.m4, since it gets
123 rebuilt anyway. Remove m4/inttypes_h.m4, m4/inttypes.m4,
124 m4/isc-posix.m4, m4/lib-ld.m4, m4/lib-prefix.m4, m4/po.m4,
125 m4/stdint_h.m4, m4/uintmax_t.m4, m4/ulonglong.m4.
126 Add m4/inttypes-h.m4, m4/lock.m4, m4/visibility.m4.
127 Remove datarootdir hack; no longer needed.
128 * configure.ac: Use gl_WARNING_CFLAGS rather than BISON_WARNING.
129 (AM_GNU_GETTEXT_VERSION): Bump from 0.12 to 0.15.
130 * lib/.cvsignore: Remove hard-locale.c, hard-locale.h, strdup.c,
132 * m4/.cvsignore: Remove hard-locale.m4, strdup.m4.
133 * m4/warning.m4: Remove from CVS, since we now use gnulib's version.
135 2006-07-20 Paul Eggert <eggert@cs.ucla.edu>
137 * bootstrap: Adjust to today's change to gnulib-tool by invoking
138 it with --assume-autoconf='latest-stable'.
140 2006-07-13 Joel E. Denny <jdenny@ces.clemson.edu>
142 * src/parse-gram.y (grammar_declaration): Don't confuse Doxygen (at
143 least 1.4.7 and 1.4.4) by putting a #line between `typedef union
145 * src/muscle_tab.h (muscle_grow): Replace the header comments with
146 those from muscle_tab.c since the old ones are misleading.
148 2006-07-13 Akim Demaille <akim@epita.fr>
150 Support %define "KEY" {VALUE}.
151 * src/scan-code.h, src/scan-code.l (translate_action)
152 (translate_rule_action, translate_symbol_action, translate_code):
153 Return char *, not const char *.
154 * src/parse-gram.y (declaration): Rename as...
155 (prologue_declaration): this.
156 (string_content): Remove this nonterminal, use STRING.
157 (braceless, content, content.opt): New nonterminal.
159 (%define): Now accept content.opt, i.e., accept also BRACED_CODE
161 * src/scan-gram.l (getargs.h): Don't include it.
163 2006-07-12 Paul Eggert <eggert@cs.ucla.edu>
165 * data/lalr1.cc (YYCDEBUG): Use 'if (yydebug_) (*yycdebug_)'
166 rather than a for-loop that declares a local bool variable. This
167 should work around a compatibility problem with a Cray x1e C++
168 compiler reported by Hung Nguyen in
169 <http://lists.gnu.org/archive/html/help-bison/2006-07/msg00022.html>.
170 The for-loop was introduced in the 2004-11-17 change but I don't
171 know why it was needed.
173 2006-07-12 Akim Demaille <akim@epita.fr>
175 * data/c.m4: Comment changes.
177 2006-07-10 Akim Demaille <akim@lrde.epita.fr>
179 * src/complain.c (error_message, ERROR_MESSAGE): New.
181 (fatal_at, fatal, warn_at, warn, complain_at, complain): these.
182 * src/complain.h, src/complain.c (warning_issued): Remove, unused.
184 2006-07-09 Paul Eggert <eggert@cs.ucla.edu>
186 * NEWS: Instead of %union, you can define and use your own union type
187 YYSTYPE if your grammar contains at least one <type> tag.
188 Your YYSTYPE need not be a macro; it can be a typedef.
189 * doc/bison.texinfo (Value Type, Multiple Types, Location Type):
190 (Union Decl, Decl Summary): Document this.
191 * data/glr.c (YYSTYPE): Implement this.
192 * data/glr.cc (YYSTYPE): Likewise.
193 * data/lalr1.cc (YYSTYPE): Likewise.
194 * data/yacc.c (YYSTYPE): Likewise.
195 * src/output.c (prepare): Output tag_seen_flag.
196 * src/parse-gram.y (declaration, grammar_declaration):
197 Use 'union_seen' rather than 'typed' to determine whether
198 %union has been seen, since grammars can now be typed without
200 (symbol_declaration, type.opt, symbol_def):
201 Keep track of whether a tag has been seen.
202 * src/reader.c (union_seen, tag_seen): New vars.
204 * src/reader.h (union_seen, tag_seen, typed): Likewise.
205 * src/scan-code.l (untyped_var_seen): New variable.
206 (handle_action_dollar): Adjust to above changes.
207 (handle_action_dollar, handle_action_at):
208 Improve overflow checking for outlandish numbers.
209 * tests/input.at (AT_CHECK_UNUSED_VALUES): Redo test to
210 avoid new diagnostics generated by above changes.
211 * tests/regression.at (YYSTYPE typedef): Add test to check
212 for type tags without %union.
214 * src/symlist.c (symbol_list_length): Return int, not unsigned
215 int, since callers expect int. This may need to get revisited
216 once we have proper integer overflow checking.
218 * src/scan-gram.h (gram_scanner_cursor): Remove decl, since this
219 object is now static.
221 * src/getargs.c (flags_argmatch): Return void, not int,
222 to pacify ./configure --enable-gcc-warnings.
224 * src/flex-scanner.h (STRING_FREE): Don't use FLEX_PREFIX (last_string)
225 since last_string is already defined to FLEX_PREFIX (last_string).
227 2006-07-09 Akim Demaille <akim@lrde.epita.fr>
229 Implement --warnings/-W.
230 * src/getargs.c (report_argmatch, trace_argmatch): Remove,
232 (flags_argmatch, FLAGS_ARGMATCH): this new function and macro.
234 * src/getargs.h, src/getargs.c (warnings, warnings_flags)
235 (warnings_args, warnings_types): New.
236 (getargs, short_options, long_options): Accept -W/--warnings.
237 Sort the options by alphabetical order, upper case letter right
238 before its lower case.
240 2006-07-09 Joel E. Denny <jdenny@ces.clemson.edu>
242 Change %merge result type clash warnings to errors. Discussed at
243 <http://lists.gnu.org/archive/html/bison-patches/2006-07/msg00026.html>.
244 * src/reader.c (record_merge_function_type): Use complain_at.
245 * tests/glr-regression.at (Missed %merge type warnings when LHS type is
246 declared later): Update test case results.
248 2006-07-09 Akim Demaille <akim@lrde.epita.fr>
250 * src/getargs.h, src/getargs.c: Swap --report and --trace handling
251 to be in alphabetical order.
252 (trace_args): Spelling fixes.
254 2006-07-09 Paul Eggert <eggert@cs.ucla.edu>
256 * data/yacc.c (YYID, yy_stack_print): Prefix local vars with "yy"
257 so they don't collide with user-defined macros.
258 (yy_stack_print): Don't assume that yytype_int16 promotes to int;
259 this was never guaranteed, and now that we're using gnulib stdint,
260 which defines int_fast16_t to long int, the problem is exposed.
262 2006-07-08 Paul Eggert <eggert@cs.ucla.edu>
264 * data/c.m4 (b4_basename): Simplify a bit, since we don't
265 need the full POSIX semantics (and weren't implementing them
268 Adjust to Autoconf 2.60 and today's gnulib.
269 * bootstrap (gnulib_modules): Add stdint.
270 Remove special case for m4/onceonly_2_57.m4, since gnulib-tool
272 (intl_files_to_remove): Remove m4/longlong.m4 and m4/wchar_t.m4,
273 since stdint needs the former and wcwidth (which is now required
274 by mbswidth) needs the latter.
275 Append 'datarootdir = @datarootdir@' to po/Makefile.in.in, to
276 work around a compatibility glitch between gettext 0.14.6 and
278 * configure.ac (AC_PREREQ): Require Autoconf 2.60.
279 Do not check for uintptr_t, since new stdint module does the right
281 * lib/.cvsignore: Remove alloca.c, alloca.h, alloca_.h.
282 Add stdint.h, stdint_.h, wcwidth.h.
283 * m4/.cvsignore: Remove alloca.m4, onceonly.m4.
284 Add absolute-header.m4, double-slash-root.m4, longlong.m4,
285 stdint.m4, wchar_t.m4, wcwidth.m4.
286 * src/files.c: Include <dirname.h> and <stdio-safer.h> in the
287 usual order for ../lib/*.h files.
288 (file_name_split): Use last_component, not base_name, to adjust
290 * src/parse-gram.h: Include <strverscmp.h> in the usual order
291 for ../lib/*.h files.
292 (YYTYPE_INT16, YYTYPE_INT8, YYTYPE_UINT16, YYTYPE_UINT8):
293 Define unconditionally, since we now assume the stdint module.
294 * src/scan-skel.l: Include <dirname.h>.
295 (BASE_QPUTS): Use last_component, not base_name.
296 * src/system.h: Include <unlocked-io.h> in the usual order
297 for ../lib/*.h files. Include <stdint.h> unconditionally,
298 since we now use the stdint module.
299 (uintptr_t): Declare if UINTPTR_MAX is not defined, not
300 HAVE_UINTPTR_T, since we now use the stdint module.
301 (base_name): Remove decl, since files now include <dirname.h>
304 2006-07-08 Akim Demaille <akim@lrde.epita.fr>
306 * data/c.m4 (b4_location_initial_column, b4_location_initial_line):
308 * data/yacc.c, data/glr.c, data/location.cc: Use them.
309 * NEWS, doc/bison.texinfo: The initial column and line are 1 by
311 * tests/calc.at: Adjust.
313 2006-07-08 Akim Demaille <akim@lrde.epita.fr>
315 * data/c.m4 (b4_basename): New.
316 (b4_syncline): Also output the location of its invocation (from
318 (b4_user_action, b4_define_user_action, b4_user_actions)
319 (b4_user_initial_action, b4_user_post_prologue, b4_user_start_header)
320 (b4_user_stype): New.
321 * data/yacc.c, data/glr.c, data/lalr1.cc, data/glr.cc: Use them.
323 2006-07-07 Joel E. Denny <jdenny@ces.clemson.edu>
325 In the grammar file, the first column is 1 not 0 on the first line as
327 * src/parse-gram.y (%initial-action): Initialize @$ correctly.
328 * tests/input.at (Torturing the Scanner): Update output.
330 * src/scan-gram.l (scanner_cursor): Declare it static.
332 2006-07-07 Joel E. Denny <jdenny@ces.clemson.edu>
334 In warnings, say "previous declaration" rather than "first
336 * src/symtab.c (redeclaration): Do that here.
337 * src/reader.c (record_merge_function_type): In the case of a result
338 type clash, report the previous declaration rather than the very first
339 one in the grammar file.
340 * tests/glr-regression.at (Missed %merge type warnings when LHS type is
341 declared later): Add a third declaration to check this behavior.
342 * tests/input.at (Incompatible Aliases): Update output.
344 2006-06-27 Akim Demaille <akim@epita.fr>
346 * doc/Doxyfile.in: New.
347 * doc/Makefile.am: Use it.
348 * src/lalr.h, src/symtab.h: Initial doxygenation.
350 2006-06-26 Joel E. Denny <jdenny@ces.clemson.edu>
352 Don't miss %merge result type warnings just because the LHS types are
353 declared after the %merge. This continues the effort of the previous
355 * src/reader.c (get_merge_function): Don't set the merger type yet.
356 (record_merge_function_type): New function for setting the merger type
357 and checking for clashes.
358 (grammar_current_rule_merge_set): Set the location of the %merge for
360 (packgram): Invoke record_merge_function_type for each rule now that
361 all symbol type declarations have been parsed.
362 * src/reader.h (merger_list.type_declaration_location): New member
363 storing the location of the first %merge from which the type for this
364 merging function was derived.
365 * src/symlist.h (symbol_list.merger_declaration_location): New member
366 storing the location of a rule's %merge, if any.
367 * tests/glr-regression.at (Missed %merge type warnings when LHS type is
368 declared later): New test to catch the error fixed by the above patch.
370 2006-06-26 Joel E. Denny <jdenny@ces.clemson.edu>
372 Get action warnings (grammar_rule_check) right even when symbol
373 declarations appear after the rules. Discussed at
374 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00108.html>
376 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00151.html>.
377 Don't mistake the type of $$ in a midrule to be that of its parent
379 * src/reader.c (grammar_current_rule_end): Don't invoke
380 grammar_rule_check yet since not all symbol declarations may have been
382 (grammar_midrule_action): Likewise.
383 Don't record whether the midrule's $$ has been used yet since actions
384 haven't been translated yet.
385 Record the midrule's parent rule and its RHS index within the parent
387 (grammar_current_rule_action_append): Don't translate the action yet
388 since not all symbol declarations may have been parsed yet and, thus,
389 warnings about types for $$, $n, @$, and @n can't be reported yet.
390 (packgram): Translate the action and invoke grammar_rule_check now that
391 all symbol declarations have been parsed.
392 * src/scan-code.l (handle_action_dollar): Now that this is invoked
393 after parsing the entire grammar file, the symbol list here in the case
394 of a midrule is actually the midrule's empty RHS, so reference its
395 parent rule's RHS where necessary.
396 On the other hand, now that you can already know it's a midrule, you
397 aren't forced to think $$ has the same type as its parent rule's $$.
398 (handle_action_at): In the case of a midrule, reference the parent rule
400 * src/symlist.c (symbol_list_new): Initialize new midrule-related
402 (symbol_list_length): Now that this is invoked after all rules have
403 been parsed, a NULL symbol (rather than a NULL symbol list node)
404 terminates a rule. symbol_list_print already does this correctly.
405 * src/symlist.h (symbol_list.midrule_parent_rule,
406 symbol_list.midrule_parent_rhs_index): New members so that midrules can
407 remember their relationships with their parents.
408 * tests/input.at (Type Clashes): Extend to catch the midrule $$ error
409 fixed by the above patch.
410 (_AT_UNUSED_VALUES_DECLARATIONS, AT_CHECK_UNUSED_VALUES): New m4 macros
412 (Unused values): ... this old test case and...
413 (Unused values before symbol declarations): ... this new test case.
414 This one is the same as `Unused values' except that all symbol
415 declarations appear after the rules in order to catch the rest of the
416 errors fixed by the above patch.
418 2006-06-26 Joel E. Denny <jdenny@ces.clemson.edu>
421 * src/reader.c (current_rule): Declare it static since it's no longer
422 used outside this file.
423 (grammar_current_rule_action_append): Remove redundant arguments from
424 translate_rule_action invocation.
425 * src/reader.h (current_rule): Remove this unused extern.
426 * src/scan-code.h (translate_rule_action): Remove redundant arguments.
427 * src/scan-code.l (translate_rule_action): Likewise.
429 2006-06-25 Joel E. Denny <jdenny@ces.clemson.edu>
431 Clean up yesterday's patch.
432 * parse-gram.y (rhs): Move grammar_midrule_action invocation from here
434 * src/reader.c (grammar_current_rule_action_append): ... here for
435 consistency with grammar_current_rule_symbol_append.
436 * tests/regression.at (Braced code in declaration in rules section):
437 Make yyerror and yylex static as usual.
439 2006-06-24 Joel E. Denny <jdenny@ces.clemson.edu>
441 Fix bug that mistakes braced code in a declaration in the rules section
442 to be a rule action. Mentioned at
443 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00105.html>.
444 * src/scan-gram.l: Move midrule action detection from the start of the
445 scanning of any braced code to...
446 * src/parse-gram.y (rhs): ... the parsing of braced code as a rule
447 action. For readability, use $2 and @2 rather than the equivalent
449 * tests/regression.at (Braced code in declaration in rules section):
450 New test to catch the error fixed by the above patch.
452 Work on code readability some.
453 * src/scan-code.l (current_rule): Get rid of this misleading and
454 redundant declaration: it's actually extern'ed in reader.h.
455 (YY_DECL, code_lex, handle_action_dollar, handle_action_at,
456 translate_action): Add a rule argument and use it instead of the global
458 (translate_rule_action): This already receives current_rule through an
459 argument, so pass it on to translate_action instead of assigning
460 current_rule to current_rule.
461 (translate_symbol_action, translate_code): Pass rule = NULL to
464 2006-06-23 Joel E. Denny <jdenny@ces.clemson.edu>
466 Rename %before-definitions to %start-header and %after-definitions to
467 %end-header. Don't use these declarations to separate pre-prologue
468 blocks from post-prologue blocks. Add new order-independent
469 declarations %before-header and %after-header as alternatives to the
470 traditional Yacc pre-prologue and post-prologue blocks. Discussed at
471 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00110.html>.
472 * NEWS (2.3+): Update for these changes.
473 * data/glr.c (b4_before_definitions): Update to...
474 (b4_start_header): ... this.
475 (b4_after_definitions): Update to...
476 (b4_end_header): ... this.
477 * data/glr.cc: Likewise.
478 * data/lalr1.cc: Likewise.
479 * data/yacc.c: Likewise.
480 * doc/bison.texinfo (The prologue): Update names, and replace remaining
481 prologue blocks with %*-header declarations.
482 (Calc++ Parser): Likewise.
483 (Bison Declaration Summary): Update names.
484 (Bison Symbols): Update description.
485 * src/parse-gram.y (PERCENT_AFTER_DEFINITIONS): Update to...
486 (PERCENT_END_HEADER): ... this.
487 (PERCENT_BEFORE_DEFINITIONS): Update to...
488 (PERCENT_START_HEADER): ... this.
489 (PERCENT_AFTER_HEADER, PERCENT_BEFORE_HEADER): New tokens.
490 (declaration): Update token names and m4 macro names.
491 When parsing %end-header and %start-header, invoke translate_code
492 before muscle_code_grow, and no longer set global booleans to remember
493 whether these declarations have been seen.
494 Parse new %after-header and %before-header.
495 * src/reader.c (before_definitions, after_definitions): Remove.
496 (prologue_augment): Accept a new bool argument to specify whether to
497 augment the pre-prologue or post-prologue.
498 * src/reader.h (before_definitions, after_definitions): Remove these
500 (prologue_augment): Add new bool argument.
501 * src/scan-gram.l (PERCENT_AFTER_DEFINITIONS): Update to...
502 (PERCENT_END_HEADER): ... this.
503 (PERCENT_BEFORE_DEFINITIONS): Update to...
504 (PERCENT_START_HEADER): ... this.
505 (PERCENT_AFTER_HEADER, PERCENT_BEFORE_HEADER): New tokens.
506 * tests/actions.at (Printers and Destructors): Update names.
508 2006-06-22 Joel E. Denny <jdenny@ces.clemson.edu>
510 Add comparison operators for C++ location classes. Discussed at
511 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00092.html>.
512 * data/c++.m4 (b4_define_location_comparison): New boolean %define
513 declaration indicating whether filename_type has an operator==. If
514 filename_type is `std::string', it defaults to `1', `0' otherwise.
515 * data/location.cc: Iff b4_define_location_comparison is `1', add
516 operator== and operator!= for class position and for class location.
519 * src/scan-action.l: Remove unused file.
520 * src/symtab.c (symbol_printer_set): Use printer_location not
522 * src/symtab.h (struct symbol): Replace incorrect source comment for
524 * tests/input.at (Incompatible Aliases): Update output with correct
527 2006-06-20 Joel E. Denny <jdenny@ces.clemson.edu>
529 Don't put the pre-prologue in the header file. For the yacc.c code
530 file and the glr.c header and code files, move the pre-prologue before
531 the token definitions. Add new %before-definitions and
532 %after-definitions to declare code that will go in both the header file
533 and code file. Discussed at
534 <http://lists.gnu.org/archive/html/bison-patches/2005-12/msg00000.html>,
535 <http://lists.gnu.org/archive/html/bison-patches/2006-01/msg00016.html>,
537 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00055.html>.
538 * NEWS (2.3+): Describe these changes.
539 * data/glr.c (b4_pre_prologue): Move from within to before...
540 (b4_shared_declarations): ... this.
541 Add new b4_before_definitions before b4_token_enums.
542 Add new b4_after_definitions at the end.
543 * data/glr.cc (b4_pre_prologue): Replace with...
544 (b4_before_definitions): ... this in the header file.
545 (b4_after_definitions): New near the end of the header file.
546 * data/lalr1.cc (b4_pre_prologue): Move from the header file to the
547 code file right before including the header file.
548 (b4_before_definitions): New in the previous position of
549 b4_pre_prologue in the header file.
550 (b4_after_definitions): New near the end of the header file.
551 * data/yacc.c: Clean up some m4 quoting especially in the header file.
552 (b4_token_enums_defines): In the code file, move to right before
553 YYSTYPE for consistency with the header file.
554 (b4_before_definitions): New right before b4_token_enums_defines in
555 both the header and code file.
556 (b4_after_definitions): New right after YYLTYPE and yylloc in both the
557 header and code file.
558 * doc/bison.texinfo (Prologue): Show use of %before-definitions instead
559 of prologues for %union dependencies.
560 (Bison Declaration Summary): In %defines description, mention the
561 effect of %before-definitions and %after-definitions on the header
563 (Calc++ Parser): Forward declare driver in a %before-definitions rather
564 than in the pre-prologue so that make check succeeds.
565 (Bison Symbols): Add entries for %before-definitions and
567 * src/parse-gram.y (PERCENT_BEFORE_DEFINITIONS): New token for
569 (PERCENT_AFTER_DEFINITIONS): New token for %after-definitions.
570 (declaration): Parse those declarations and append to
571 b4_before_definitions and b4_after_definitions, respectively.
572 * src/reader.c (before_definitions, after_definitions): New bools to
573 track whether those declarations have been seen.
574 (prologue_augment): Add to the post-prologue if %union,
575 %before-definitions, or %after-definitions has been seen.
576 * src/reader.h (before_definitions, after_definitions): New extern's.
577 * src/scan-gram.l: Scan the new declarations.
578 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Place the second
579 prologue block in a %before-definitions or a %after-definitions based
580 on whether the %union is declared.
581 * tests/regression.at (Early token definitions with --yacc, Early token
582 definitions without --yacc): Move tests for token definitions into the
583 post-prologue since token names are no longer defined in the
586 2006-06-20 Akim Demaille <akim@epita.fr>
588 * src/symtab.h, src/symtab.c (symbol_from_uniqstr): New.
589 (symbol_get): Use it.
590 * src/parse-gram.y: Use it.
592 2006-06-19 Joel E. Denny <jdenny@ces.clemson.edu>
594 * src/scan-gram.l: Remove unused declaration of last_string_1 so the
595 build succeeds when configured with --enable-gcc-warnings.
597 2006-06-19 Paul Eggert <eggert@cs.ucla.edu>
599 * src/parse-gram.y (char_name): New function.
600 (CHAR, STRING, string_content): For %printer, properly escape.
601 (ID): Prefer fputs to fprintf.
602 (id): Reindent to be consistent with other rules.
605 The Translation Project changed its way of publishing translations
606 to maintainers. I haven't received any responses to my request
607 for supporting the old way, or for documenting the new way. I
608 have modified 'bootstrap' to use screen scraping
609 (in this case, HTML scraping). This is unreliable and inelegant,
610 but I don't see any better way. Yuck.
611 * bootstrap (TP_URL, WGET_COMMAND): New vars.
612 (get_translations): New function, which uses HTML scraping to
613 deduce locations of latest translations.
614 Use this function to grab both bison and bison-runtime .po files.
615 Don't bother priming the pump for the runtime-po domain any more,
616 as it's now translated better than bison is.
618 2006-06-19 Akim Demaille <akim@epita.fr>
620 * src/scan-gram.l: No longer "parse" things after `%union' until
621 `{'. Rather, return a single "%union" token.
622 No longer make symbols: return strings, and leave the conversion
623 to symbols to the parser.
624 (SC_PRE_CODE, token_type): Remove.
625 * src/parse-gram.y (%union): New field `character'.
628 (ID, ID_COLON): Now that the scanner no longer makes them
629 identifiers, adjust all uses to invoke symbol_get.
630 (id_colon): New, wraps the conversion from string to symbol.
631 (%union): Accept a possible union_name.
632 (symbol): Now can be a char.
633 * data/c.m4 (b4_union_name): Leave a default value.
634 * data/glr.c, data/yacc.c: Use it.
636 2006-06-11 Joel E. Denny <jdenny@ces.clemson.edu>
638 For associating token numbers with token names for "yacc.c", don't use
639 #define statements unless `--yacc' is specified; always use enum
640 yytokentype. Most important discussions start at:
641 <http://lists.gnu.org/archive/html/bison-patches/2005-09/msg00053.html>,
642 <http://lists.gnu.org/archive/html/bison-patches/2005-12/msg00052.html>,
644 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00043.html>.
645 * NEWS (2.3+): Mention.
646 * data/c.m4 (b4_yacc_if): New.
647 (b4_token_enums_defines): Use b4_yacc_if to decide whether to add the
649 * doc/bison.texinfo (Bison Options): Describe the effect of `--yacc'
650 on token name definitions.
651 * src/getargs.c (usage): Capitalize `Yacc' in English.
652 * src/output.c (prepare): Define b4_yacc_flag.
653 * tests/regression.at (Early token definitions): Test that tokens names
654 are defined before the pre-prologue not just before the post-prologue.
655 Remove this test case and copy to...
656 (Early token definitions with --yacc): ... this to test #define's.
657 (Early token definitions without --yacc): ... and this to test enums.
659 2006-06-11 Paul Eggert <eggert@cs.ucla.edu>
661 * NEWS: Reword the post-2.3 change to not be so optimistic about
662 removing the old "look-ahead" spelling.
663 Update previous look-ahead/lookahead change reports.
664 * REFERENCES: look-ahead -> lookahead (since that's
665 what he actually wrote).
666 * doc/refcard.tex: look ahead -> lookahead,
667 look-ahead -> lookahead
669 2006-06-09 Joel E. Denny <jdenny@ces.clemson.edu>
671 For consistency, use `lookahead' instead of `look-ahead' or
672 `look_ahead'. Discussed starting at
673 <http://lists.gnu.org/archive/html/bison-patches/2006-01/msg00049.html>
675 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00017.html>.
676 * NEWS: For the next release, note the change to `--report'.
677 * TODO, doc/bison.1: Update English.
678 * doc/bison.texinfo: Update English.
679 (Understanding Your Parser, Bison Options): Document as
680 `--report=lookahead' rather than `--report=look-ahead'.
681 * src/conflicts.c: Update English in comments.
682 (lookahead_set): Rename from look_ahead_set.
683 (flush_reduce): Rename argument look_ahead_tokens to lookahead_tokens.
684 (resolve_sr_conflict): Rename local look_ahead_tokens to
685 lookahead_tokens, and update other uses.
686 (flush_shift, set_conflicts, conflicts_solve, count_sr_conflicts,
687 count_rr_conflicts, conflicts_free): Update uses.
688 * src/getargs.c (report_args): Move "lookahead" before alternate
690 (report_types): Update uses.
691 (usage): For `--report' usage description, state `lookahead' spelling
692 rather than `look-ahead'.
693 * src/getargs.h (report.report_lookahead_tokens): Rename from
694 report_look_ahead_tokens.
695 * src/lalr.c: Update English in comments.
696 (compute_lookahead_tokens): Rename from compute_look_ahead_tokens.
697 (state_lookahead_tokens_count): Rename from
698 state_look_ahead_tokens_count.
699 Rename local n_look_ahead_tokens to n_lookahead_tokens.
700 (lookahead_tokens_print): Rename from look_ahead_tokens_print.
701 Rename local n_look_ahead_tokens to n_lookahead_tokens.
703 Update English in output.
704 (add_lookback_edge, initialize_LA, lalr, lalr_free): Update uses.
705 * src/print.c: Update English in comments.
706 (lookahead_set): Rename from look_ahead_set.
707 (print_reduction): Rename argument lookahead_token from
709 (print_core, state_default_rule, print_reductions, print_results):
711 * src/print_graph.c: Update English in comments.
712 (print_core): Update uses.
713 * src/state.c: Update English in comments.
714 (reductions_new): Update uses.
715 (state_rule_lookahead_tokens_print): Rename from
716 state_rule_look_ahead_tokens_print, and update other uses.
717 * src/state.h: Update English in comments.
718 (reductions.lookahead_tokens): Rename from look_ahead_tokens.
719 (state_rule_lookahead_tokens_print): Rename from
720 state_rule_look_ahead_tokens_print.
721 * src/tables.c: Update English in comments.
722 (conflict_row, action_row): Update uses.
723 * tests/glr-regression.at
724 (Incorrect lookahead during deterministic GLR,
725 Incorrect lookahead during nondeterministic GLR): Rename
726 print_look_ahead to print_lookahead.
727 * tests/torture.at: Update English in comments.
728 (AT_DATA_LOOKAHEAD_TOKENS_GRAMMAR): Rename from
729 AT_DATA_LOOK_AHEAD_TOKENS_GRAMMAR.
730 (Many lookahead tokens): Update uses.
731 * data/glr.c: Update English in comments.
732 * lalr1.cc: Likewise.
734 * src/conflicts.h: Likewise.
735 * src/lalr.h: Likewise.
736 * src/main.c: Likewise.
737 * src/output.c: Likewise.
738 * src/parse-gram.c: Likewise.
739 * src/tables.h: Likewise.
740 * tests/calc.at: Likewise.
742 2006-06-08 Joel E. Denny <jdenny@ces.clemson.edu>
744 * src/flex-scanner.h (yytext): Remove stray `*/' in #define.
746 2006-06-07 Paul Eggert <eggert@cs.ucla.edu>
748 * TODO: Add request from Nelson H. F. Beebe to be able to install
749 Bison without installing the yacc script.
751 2006-06-07 Joel E. Denny <jdenny@ces.clemson.edu>
753 * src/flex-scanner.h: For the sake of Flex 2.5.4, don't #define yyleng
754 and yytext if they're already #define'd.
755 * src/flex-scanner.h, src/location.h: Move #include "system.h" to...
756 * src/scan-code-c.c: ... here.
757 * src/scan-code.l, src/scan-gram.l: ... and here. Also #include
760 2006-06-07 Joel E. Denny <jdenny@ces.clemson.edu>
762 Get Bison to build again when configured with --enable-gcc-warnings.
763 * src/location.c, src/location.h, src/main.c, src/scan-code.l: Add some
765 * src/scan-code.l (handle_action_dollar, handle_action_at): Rename
766 loc argument as it shadows a global.
767 * src/scan-gram.l: Remove stray comma that prevents boundary_set
770 * src/.cvsignore: Add scan-code.c.
772 2006-06-07 Akim Demaille <akim@epita.fr>
774 * src/scan-gram.l: Move the "add a trailing ; to actions" code
776 * src/scan-code.l: here.
777 * tests/input.at (Torturing the Scanner): Fix another location
780 2006-06-07 Akim Demaille <akim@epita.fr>
782 * src/Makefile.am (BUILT_SOURCES): Fix the trailing backslash.
784 2006-06-06 Akim Demaille <akim@epita.fr>
786 Extract the parsing of user actions from the grammar scanner.
787 As a consequence, the relation between the grammar scanner and
788 parser is much simpler. We can also split "composite tokens" back
790 * src/gram.h (ITEM_NUMBER_MAX, RULE_NUMBER_MAX): New.
791 * src/scan-gram.l (add_column_width, adjust_location): Move to and
793 * src/location.h, src/location.c (add_column_width)
794 (location_compute): these.
795 Fix the column count: the initial column is 0.
796 (location_print): Be robust to ending column being 0.
797 * src/location.h (boundary_set): New.
798 * src/main.c: Adjust to scanner_free being renamed as
800 * src/output.c: Include scan-code.h.
801 * src/parse-gram.y: Include scan-gram.h and scan-code.h.
803 (PERCENT_DESTRUCTOR, PERCENT_PRINTER, PERCENT_INITIAL_ACTION)
804 (PERCENT_LEX_PARAM, PERCENT_PARSE_PARAM): Remove the {...} part,
805 which is now, again, a separate token.
806 Adjust all dependencies.
807 Whereever actions with $ and @ are used, use translate_code.
808 (action): Remove this nonterminal which is now useless.
809 * src/reader.c: Include assert.h, scan-gram.h and scan-code.h.
810 (grammar_current_rule_action_append): Use translate_code.
811 (packgram): Bound check ruleno, itemno, and rule_length.
812 * src/reader.h (gram_in, gram__flex_debug, scanner_cursor)
813 (last_string, last_braced_code_loc, max_left_semantic_context)
814 (scanner_initialize, scanner_free, scanner_last_string_free)
815 (gram_out, gram_lineno, YY_DECL_): Move to...
816 * src/scan-gram.h: this new file.
817 (YY_DECL): Rename as...
819 * src/scan-code.h, src/scan-code.l, src/scan-code-c.c: New.
820 * src/scan-gram.l (gram_get_lineno, gram_get_in, gram_get_out):
821 (gram_get_leng, gram_get_text, gram_set_lineno, gram_set_in):
822 (gram_set_out, gram_get_debug, gram_set_debug, gram_lex_destroy):
823 Move these declarations, and...
824 (obstack_for_string, STRING_GROW, STRING_FINISH, STRING_FREE):
826 * src/flex-scanner.h: this new file.
827 * src/scan-gram.l (rule_length, rule_length_overflow)
828 (increment_rule_length): Remove.
829 (last_braced_code_loc): Rename as...
830 (gram_last_braced_code_loc): this.
831 Adjust to the changes of the parser.
832 Move all the handling of $ and @ into...
833 * src/scan-code.l: here.
834 * src/scan-gram.l (handle_dollar, handle_at): Remove.
835 (handle_action_dollar, handle_action_at): Move to...
836 * src/scan-code.l: here.
837 * src/Makefile.am (bison_SOURCES): Add flex-scanner.h,
838 scan-code.h, scan-code-c.c, scan-gram.h.
839 (EXTRA_bison_SOURCES): Add scan-code.l.
840 (BUILT_SOURCES): Add scan-code.c.
841 (yacc): Be robust to white spaces.
843 * tests/conflicts.at, tests/input.at, tests/reduce.at,
844 * tests/regression.at: Adjust the column numbers.
845 * tests/regression.at: Adjust the error message.
847 2006-06-06 Joel E. Denny <jdenny@ces.clemson.edu>
849 * src/getargs.c (usage): Mention GLR not just LALR(1) in --help output.
850 Use Akim's wording from
851 <http://lists.gnu.org/archive/html/bison-patches/2006-05/msg00056.html>.
853 2006-06-06 Joel E. Denny <jdenny@ces.clemson.edu>
855 Between Bison releases, manually append `+' to the previous Bison
856 release number, and use that as a signal to automatically print the
857 ChangeLog's CVS Id keyword from --version. Discussed starting at
858 <http://lists.gnu.org/archive/html/bison-patches/2006-05/msg00028.html>.
859 * ChangeLog: Add Id header.
860 * configure.ac (AC_INIT): Append `+' to `2.3'.
861 * src/.cvsignore: Add revision.c.
862 * src/Makefile.am (bison_SOURCES): Add revision.c and revision.h.
863 (BUILT_SOURCES): Add revision.c.
864 (revision.c): New target rule. This file defines a new global variable
865 named revision. It initializes it with either the Id from ChangeLog
866 or, if VERSION doesn't contain `+', with the empty string.
867 * src/getargs.c (version): Print the value of revision.
868 * src/revision.h: Extern revision.
870 2006-06-05 Paul Eggert <eggert@cs.ucla.edu>
873 * configure.ac (AC_INIT): Likewise.
875 2006-05-30 Paul Eggert <eggert@cs.ucla.edu>
877 * data/glr.c (YYRECOVERING): Define to be a function-like macro
878 with no arguments, not as an object-like macro. This is for
879 compatibility with data/yacc.c. Problem reported by John P. Hartmann in
880 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00059.html>.
881 * doc/bison.texinfo (Action Features, Error Recovery, Table of Symbols):
884 2006-05-30 Joel E. Denny <jdenny@ces.clemson.edu>
886 * src/getargs.c (usage): Back out yesterday's modification of the
887 --help output so that we don't have to wait for translation before
890 2006-05-29 Paul Eggert <eggert@cs.ucla.edu>
892 * doc/bison.texinfo (Introduction): Don't say "GLR grammar".
893 Problem reported by Akim Demaille.
895 2006-05-29 Joel E. Denny <jdenny@ces.clemson.edu>
897 * src/getargs.c (usage): Mention GLR not just LALR(1) in --help output.
899 2006-05-26 Paul Eggert <eggert@cs.ucla.edu>
901 * data/yacc.c (yy_reduce_print): Omit trailing white space in
902 generated source code. Problem reported by Frans Englich in
903 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00049.html>.
905 2006-05-22 Paul Eggert <eggert@cs.ucla.edu>
907 * Makefile.maint (gzip_rsyncable, GZIP_ENV): Compute within the
908 shell, not within 'make', so that 'make' by an ordinary builder
909 (using GNU make) does not worry about configuring gzip. This also
910 works around a bug reported independently by Keith Thompson and by
911 Georg Schwarz, whereby gzip 1.2.4 --help would output usage on
912 stderr rather than stdout, messing up the build logs.
914 2006-05-21 Joel E. Denny <jdenny@ces.clemson.edu>
916 * data/yacc.c (yyparse): Wrap the final return from yyparse inside YYID
917 to make sure that YYID will never be unused. This fixes a 'make
918 maintainer-check' failure caused by the recent changes to the 'Trivial
919 grammars' test case, which caused g++ 4.1.0 to complain that YYID was
921 * data/glr.c (yyparse): Wrap yyparse's return inside YYID just in case.
923 2006-05-21 Joel E. Denny <jdenny@ces.clemson.edu>
925 * data/glr.c (yyresolveLocations): Remove bogus YYASSERT that the
926 state before an empty RHS is always resolved here. Only the location
927 of that state is guaranteed to be resolved, and that's enough. This
928 fixes the remaining bug reported by Derek M. Jones in
929 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00027.html>.
930 * tests/glr-regression.at (Uninitialized location when reporting
931 ambiguity): Test the above case.
932 Also, the embedded comments in this test case claim it checks the case
933 of an empty RHS that has inherited the initial location. However, the
934 corresponding LHS was already resolved, so yyresolveLocations didn't
935 actually have reason to modify it. Fix this by forcing
936 nondeterministic operation at the beginning of the parse.
938 2006-05-20 Paul Eggert <eggert@cs.ucla.edu>
940 * data/c.m4 (b4_yy_symbol_print_generate):
941 (b4_yy_symbol_print_generate): Use 'YYSTYPE const' rather than
942 'const YYSTYPE', and similarly for YYLTYPE. This fixes one
943 of the bugs reported today by Derek M Jones in
944 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00027.html>.
945 * doc/bison.texinfo (Value Type): Document that YYSTYPE must be
946 defined to be a type name without parens or brackets.
947 (Location Type): Similarly for YYLTYPE.
948 * tests/regression.at (Trivial grammars): Put in a test for this
949 bug that will be caught by 'make maintainer-check' (though not,
950 alas, by 'make check' unless your compiler is picky).
952 2006-05-19 Paul Eggert <eggert@cs.ucla.edu>
955 * configure.ac (AC_INIT): Likewise.
957 2006-05-17 Joel E. Denny <jdenny@ces.clemson.edu>
959 * data/glr.c (yyreportTree): Make room in yystates for the state
960 preceding the RHS. This fixes the segmentation fault reported by Derek
962 <http://lists.gnu.org/archive/html/help-bison/2006-05/msg00035.html>.
963 (yyreportTree, yypdumpstack): Subtract 1 from yyrule before printing
964 to the user. Reported for yyreportTree by Derek M. Jones later in the
966 * THANKS: Add Derek M. Jones.
967 Update my email address.
968 Fix typo in Steve Murphy's name.
970 2006-05-14 Paul Eggert <eggert@cs.ucla.edu>
972 * data/glr.c (yyreportSyntaxError): Fix off-by-one error in
973 checking against YYLAST that caused the parser to miss a potential
974 alternative in its diagnostic.
975 Problem reported by Maria Jose Moron Fernandez in
976 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00024.html>.
977 * data/lalr1.cc (yysyntax_error_): Likewise.
978 * data/yacc.c (yysyntax_error): Likewise.
979 * tests/regression.at (_AT_DATA_DANCER_Y): Use static array for
980 tokens, in case we run into an older C compiler.
981 (_AT_DATA_EXPECT2_Y, AT_CHECK_EXPECT2): New macros.
982 Use them to check for the off-by-one error fixed above.
984 * data/yacc.c (yytnamerr): Fix typo: local var should be of type
985 YYSIZE_T, not size_t.
986 * tests/regression.at (Trivial grammars): New test, to catch
987 the error fixed by the above patch.
989 2006-05-14 Akim Demaille <akim@lrde.epita.fr>
991 * doc/bison.texinfo (C++ Bison Interface): Clarify the naming
993 Reported by Steve Murphy.
995 2006-05-14 Akim Demaille <akim@lrde.epita.fr>
997 * data/glr.cc, data/lalr1.cc: Using %defines is mandatory.
998 * data/glr.cc: b4_location_flag is now b4_locations_flag.
1000 2006-05-14 Akim Demaille <akim@lrde.epita.fr>
1002 Implement --trace=m4.
1003 * src/getargs.c (trace_types, trace_args): Accept trace_m4.
1004 * src/output.c (output_skeleton): When set, pass -dV to m4.
1006 Factor the handling of flags in m4.
1007 * src/output.c (prepare): Rename the muscle names debug, defines,
1008 error_verbose to debug_flag, defines_flag, error_verbose_flag.
1009 * data/c.m4: Adjust.
1010 (_b4_define_flag_if, b4_define_flag_if, b4_defines_if): New.
1011 Use b4_define_flag_if to define other b4_FLAG_if macros.
1012 (b4_location_if): As a consequence, rename as...
1013 (b4_locations_if): this, for consistency.
1014 Adjust all the skeletons.
1016 2006-05-14 Akim Demaille <akim@lrde.epita.fr>
1018 * etc/bench.pm: Shorten bench names.
1020 2006-05-14 Akim Demaille <akim@lrde.epita.fr>
1022 * src/output.h, src/output.c (error_verbose): Move to...
1023 * src/getargs.h, src/getargs.c: here.
1025 Adjust dependencies.
1027 2006-05-13 Paul Eggert <eggert@cs.ucla.edu>
1029 * data/c.m4 (b4_copyright): Put the special exception for Bison
1030 skeletons here, so we don't have to put it in each skeleton. All
1031 uses changed. Suggested by Akim Demaille. Also, wrap the
1032 copyright notice, in case it is longer than 80 columns. Replace
1033 comma by newline after title.
1035 2006-05-11 Paul Eggert <eggert@cs.ucla.edu>
1037 * doc/bison.texinfo (Calc++ Scanner): The flex behavior is an
1038 incompatibility, not a bug. Mention that it wasn't fixed as of
1041 2006-05-11 Akim Demaille <akim@lrde.epita.fr>
1043 * examples/extexi: Enforce the precedence of concatenation over
1045 Reported by Tommy Nordgren.
1047 2006-05-11 Akim Demaille <akim@lrde.epita.fr>
1049 * data/lalr1.cc (yytranslate_): Rename token as t to avoid clashes
1050 with the member "token".
1051 Reported by Martin Nylin.
1053 2006-05-08 Paul Eggert <eggert@cs.ucla.edu>
1055 * data/glr.c: Switch to Bison 2.2 special-exception language in
1056 the copyright notice. Use more-regular format for titles and
1058 * data/glr.cc: Likewise.
1059 * data/location.cc: Likewise.
1060 * data/yacc.cc: Likewise.
1061 * doc/bison.texinfo (Conditions): Document this.
1062 * NEWS: likewise. Upgrade version to 2.2.
1064 2006-04-27 Akim Demaille <akim@lrde.epita.fr>
1066 * data/glr.cc: Remove dead code.
1068 2006-04-25 Paul Eggert <eggert@cs.ucla.edu>
1070 * bootstrap: Comment out the AM_CPPFLAGS line, since we don't use
1071 that variable and the line breaks the bootstrap. Problem reported
1072 by Juan M. Guerrero.
1074 2006-04-24 Akim Demaille <akim@lrde.epita.fr>
1076 * doc/bison.texinfo (Multiple start-symbols): New.
1078 2006-04-24 Akim Demaille <akim@lrde.epita.fr>
1080 * etc/README, etc/bench.pl: New.
1082 2006-04-03 Akim Demaille <akim@lrde.epita.fr>
1084 * src/scan-gram.l: Be robust to BRACED_CODE appearing before any
1086 Reported by Mickael Labau.
1087 * tests/input.at (Torturing the Scanner): Test it.
1089 2006-03-16 Paul Eggert <eggert@cs.ucla.edu>
1091 * doc/bison.texinfo (Decl Summary): Don't mention yylloc twice.
1092 Problem reported by Bob Rossi.
1094 2006-03-13 Paul Eggert <eggert@cs.ucla.edu>
1096 * doc/bison.texinfo: Remove @shorttitlepage stuff; it wasn't used
1097 and didn't really work.
1098 For the index, use @ifnotinfo, not @iftex.
1099 Minor cleanups of spacing and terminology.
1101 2006-03-12 Akim Demaille <akim@lrde.epita.fr>
1103 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Fix the definition
1104 of AT_NAME_PREFIX when %name-prefix is not used.
1106 2006-03-12 Akim Demaille <akim@lrde.epita.fr>
1108 Apply --prefix to C++ skeletons too: they change the namespace.
1109 The test suite already exercize these cases.
1110 * data/c++.m4 (b4_namespace): New.
1111 * data/lalr1.cc, data/glr.cc, data/location.cc: Use it instead of `yy'.
1112 * data/lalr1.cc (yytnameerr_): Move its definition into the namespace.
1113 * data/yacc.c, data/glr.c: Remove a useless `[]'.
1114 * doc/bison.texinfo: Document it.
1115 (Option Cross Key): Use @multitable in all formats. It looks
1116 nicer, even in TeX outputs.
1117 (Rules): Use the same code whatever the output type is.
1118 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS)
1119 (_AT_BISON_OPTION_POPDEFS): Support AT_NAME_PREFIX.
1120 * tests/calc.at: Use it, instead of hard coding `yy'.
1122 2006-03-10 Akim Demaille <akim@lrde.epita.fr>
1124 * TODO: Remove dead items.
1126 2006-03-10 Akim Demaille <akim@lrde.epita.fr>
1128 * doc/FAQ: Remove, merged into...
1129 * doc/bison.texinfo (FAQ): this.
1130 * doc/Makefile.am (EXTRA_DIST): Adjust.
1132 2006-03-10 Akim Demaille <akim@lrde.epita.fr>
1134 * data/c.m4 (b4_token_enum): Always define the enum of tokens,
1136 * data/lalrl1.cc, data/glr.cc (parser::token_type): New.
1137 * doc/bison.texinfo (Calc++ Scanner): Use it.
1139 2006-03-09 Paul Eggert <eggert@cs.ucla.edu>
1141 Fix two nits reported by twlevo, plus one more that I discovered.
1143 * src/assoc.h (assoc_to_string): Give a name to the arg, as
1144 this is the usual Bison style.
1145 * src/location.h (location_print): Likewise.
1147 * src/reader.h (token_name): Likewise.
1149 2006-03-08 Paul Eggert <eggert@cs.ucla.edu>
1151 Fix some nits reported by twlevo.
1152 * doc/FAQ: Remove ancient Y2K FAQ, replacing it with "secure"
1153 and "POSIX". Use more-modern syntax for URLs. Mention C++
1154 and ask for Java. Don't hardwire OS version numbers. Add
1156 * m4/.cvsignore: Add unistd_h.m4, for latest gnulib.
1157 * src/conflicts.c (solved_conflicts_obstack): Now static.
1159 2006-03-08 Joel E. Denny <jdenny@ces.clemson.edu>
1161 * doc/bison.texinfo (Introduction): Mention GLR and C++ as on the web
1162 page. Say "you can use it" not "you may use it" as on the web page;
1163 we're describing capabilities not granting permission.
1165 2006-03-06 Paul Eggert <eggert@cs.ucla.edu>
1167 * data/glr.c (yyresolveLocations): Rename local variables to avoid
1168 shadowing warnings. Use usual patter for iterating through RHS.
1169 * tests/glr-regression.at
1170 (Uninitialized location when reporting ambiguity):
1171 Modify yylex so that it uses its argument, rather than trying
1172 to rely on ARGSUSED (which doesn't work for gcc with warnings).
1173 const char -> char const.
1175 * tests/Makefile.am ($(srcdir)/package.m4, maintainer-check-valgrind):
1176 Don't use tabs inside commands; it messes up 'ps'.
1177 Problem reported by twlevo.
1179 2006-03-06 Joel E. Denny <jdenny@ces.clemson.edu>
1181 * tests/glr-regression.at (Uninitialized location when reporting
1182 ambiguity): New test case.
1183 * data/glr.c (yyresolveLocations): New function, which uses
1185 (yyresolveValue): Invoke yyresolveLocations before reporting an
1187 * doc/bison.texinfo (Default Action for Locations): Note
1188 YYLLOC_DEFAULT's usage for ambiguity locations.
1189 (GLR Semantic Actions): Cross-reference those notes.
1191 2006-03-04 Joel E. Denny <jdenny@ces.clemson.edu>
1193 * tests/glr-regression.at (Leaked semantic values when reporting
1194 ambiguity): Remove unnecessary union and type declarations.
1195 (Leaked lookahead after nondeterministic parse syntax error): New test
1197 * data/glr.c (yyparse): Check for zero stacks remaining before
1198 attempting to shift the lookahead so that you don't lose it.
1200 2006-03-02 Joel E. Denny <jdenny@ces.clemson.edu>
1202 Avoid memory leaks by not invoking longjmp in yyreportAmbiguity.
1203 * tests/glr-regression.at (Leaked semantic values when reporting
1204 ambiguity): New test case.
1205 * data/glr.c (yyreportAmbiguity): Invoke yyyerror directly and return
1206 yyabort rather than invoking yyFail, which invokes longjmp. Remove the
1207 now unnecessary yystackp parameter.
1208 (yyresolveValue): Return yyreportAmbiguity's result. Now the necessary
1209 destructors can be called.
1211 * tests/glr-regression.at: Don't invoke bison with `-t' unnecessarily
1212 in existing testcases.
1214 2006-03-02 Joel E. Denny <jdenny@ces.clemson.edu>
1216 Don't leak semantic values for parent RHS when a user action cuts the
1217 parser, and clean up related code a bit.
1218 * tests/glr-regression.at (Leaked merged semantic value if user action
1219 cuts parse): Rename to...
1220 (Leaked semantic values if user action cuts parse): ... this. Add check
1221 for leaked parent RHS values.
1222 * data/glr.c (yydestroyGLRState): In debugging output, distinguish
1223 between an unresolved state (non-empty chain of semantic options) and
1224 an incomplete one (signaled by an empty chain).
1225 (yyresolveStates): Document the interface. Move all manipulation of a
1226 successfully or unsuccessfully resolved yyGLRState to...
1227 (yyresolveValue): ... here so that yyresolveValue always leaves a
1228 yyGLRState with consistent data and thus is easier to understand.
1229 Remove the yyvalp and yylocp parameters since they are always just
1230 taken from the yys parameter. When reporting a discarded merged value
1231 in debugging output, note that it is incompletely merged. Document the
1233 (yyresolveAction): If resolving any of the RHS states fails, destroy
1234 them all rather than leaking them. Thus, as long as user actions are
1235 written to clean up the RHS correctly, yyresolveAction always cleans up
1236 the RHS of a semantic option. Document the interface.
1238 2006-02-27 Paul Eggert <eggert@cs.ucla.edu>
1240 * data/glr.c (yyexpandGLRStack): Catch an off-by-one error that
1241 led to a segmentation fault in GNU Pascal. Problem reported
1244 2006-02-21 Joel E. Denny <jdenny@ces.clemson.edu>
1246 * doc/bison.texinfo (Mid-Rule Actions): Explain how to bury a
1247 mid-rule action inside a nonterminal symbol in order to declare a
1248 destructor for its semantic value.
1250 2006-02-16 Paul Eggert <eggert@cs.ucla.edu>
1252 * data/yacc.c [(! defined yyoverflow || YYERROR_VERBOSE) && !
1253 YYSTACK_USE_ALLOCA && ! defined YYSTACK_ALLOC && defined
1254 __cplusplus && ! defined _STDLIB_H && !
1255 ((defined YYMALLOC || defined malloc) && (defined YYFREE ||
1256 defined free))]: Include <stdlib.h> rather than rolling our own
1257 declarations of malloc and free, to avoid problems with
1258 incompatible declarations (using 'throw') C++'s stdlib.h. This
1259 should fix Debian bug 340012
1260 <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=340012>,
1261 reported by Guillaume Melquiond.
1263 2006-02-13 Paul Eggert <eggert@cs.ucla.edu>
1265 * NEWS: Clarify symbols versus types in unused-value warnings.
1267 * configure.ac (AC_INIT): Bump version number.
1269 2006-02-13 Paul Eggert <eggert@cs.ucla.edu>
1271 * NEWS: Version 2.1a.
1272 * tests/headers.at (AT_TEST_CPP_GUARD_H): Declare yyerror and yylex,
1273 since C99 requires this.
1275 2006-02-11 Paul Eggert <eggert@cs.ucla.edu>
1277 * m4/c-working.m4: New file.
1278 * configure.ac (BISON_TEST_FOR_WORKING_C_COMPILER): Use it.
1280 2006-02-10 Paul Eggert <eggert@cs.ucla.edu>
1282 * Makefile.maint: Merge from coreutils.
1284 2006-02-09 Paul Eggert <eggert@cs.ucla.edu>
1286 More portability fixes for problems summarized by Nelson H. F. Beebe.
1288 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Catch a
1289 configuration screwup "./configure CC=/opt/SUNWspro/bin/c89
1290 CFLAGS="-xarch=generic64" CXX=/opt/SUNWspro/bin/CC
1291 LDFLAGS="-xarch=generic64" with Sun C 5.7 on Solaris 10; this
1292 messes up because C++ code is compiled in 32-bit mode but linked
1295 2006-02-08 Paul Eggert <eggert@cs.ucla.edu>
1297 More portability fixes for problems summarized by Nelson H. F. Beebe.
1299 * doc/bison.texinfo (Calc++ Scanner): Work around a bug in flex
1300 2.5.31. This resembles the 2005-10-10 patch to src/scan-skel.l.
1302 * examples/calc++/Makefile.am (check_PROGRAMS): Renamed from
1303 nodist_PROGRAMS, since we don't need to actually compile the
1304 example if we're just doing a plain 'make'. This avoids bothering
1305 the installer unnecessarily about problems due to weird C++
1308 2006-02-06 Paul Eggert <eggert@cs.ucla.edu>
1310 More portability fixes for problems summarized by Nelson H. F. Beebe.
1312 * tests/headers.at (AT_TEST_CPP_GUARD_H): Use #include <...> rather
1313 than #include "...", and compile with -I'.'. The old method was
1314 not portable, according to Posix and the C standard, and it does
1315 not work with Sun C 5.7, where previous #line directives affect
1316 the working directory used in later #include "..." directives.
1318 2006-02-06 Juan Manuel Guerrero <juan.guerrero@gmx.de>
1320 Various DJGGP specific issues in /djgpp
1322 2006-02-02 Paul Eggert <eggert@cs.ucla.edu>
1324 More portability fixes for problems summarized by Nelson H. F. Beebe.
1326 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check that
1327 '#include <map>' works and that you can apply ++ to iterators.
1329 2006-02-01 Paul Eggert <eggert@cs.ucla.edu>
1331 Work around portability problems summarized by Nelson H. F. Beebe in
1332 <http://lists.gnu.org/archive/html/bug-bison/2005-09/msg00021.html>.
1334 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check
1335 that '#include <string>' works.
1337 * data/lalr1.cc (yytranslate_): No longer inline, to work around a
1338 porting problem to g++ 3.4.3 on Darwin 7.9.0, where g++ complained
1339 "warning: sorry: semantics of inline function static data `const
1340 unsigned char translate_table[262]' are wrong (you'll wind up with
1343 * lib/bbitset.h (struct bitset_vtable): Rename members not, and,
1344 or, xor to not_, and_, or_, and xor_, respectively. This works
1345 around a bug in GCC 3.4.3 on Irix 6.5, which apparently has a
1346 random system header somewhere that includes the equivalent of
1349 * tests/headers.at (AT_TEST_CPP_GUARD_H): Don't assume that "$CC
1350 -E" works; it apparently doesn't work with PathScale EKO Compiler
1353 2006-01-30 Joel E. Denny <jdenny@ces.clemson.edu>
1355 During deterministic GLR operation, user actions should be able to
1356 influence the parse by changing yychar. To make this easier to fix and
1357 to make glr.c easier to evolve in general, don't maintain yytoken in
1358 parallel with yychar; just compute yytoken when needed.
1359 * tests/glr-regression.at (Incorrect lookahead during deterministic
1360 GLR): Check that setting yychar in a user action has the intended
1362 * data/glr.c (yyGLRStack): Remove yytokenp member.
1363 (yyclearin): Don't set *yytokenp.
1364 (yyprocessOneStack, yyreportSyntaxError, yyrecoverSyntaxError): Examine
1365 yychar rather than *yytokenp to determine the current lookahead.
1366 Compute yytoken locally when needed.
1367 (yyparse): Likewise. Remove the local yytoken that yytokenp used to
1370 * doc/bison.texinfo (Bison Options): Remove stray sentence fragment
1371 after `--report' documentation.
1373 2006-01-30 Paul Eggert <eggert@cs.ucla.edu>
1375 * src/parse-gram.y (grammar_declaration): Location of printer
1376 symbol is @1, not list->location. Bug reported by twlevo.
1377 * tests/input.at (Incompatible Aliases): Adjust to above change.
1379 2006-01-29 Paul Eggert <eggert@cs.ucla.edu>
1381 * tests/input.at (AT_CHECK_UNUSED_VALUES): Remove. Instead, do
1382 all the test at once. This makes the output easier to read in the
1385 Fix a longstanding bug uncovered by bro-0.9a9/src/parse.y, which I
1386 got from <http://bro-ids.org/download.html>. The bug is that
1387 when two actions appeared in succession, the second one was
1388 scanned before the first one was added to the grammar rule
1389 as a midrule action. Bison then output the incorrect warning
1390 "parse.y:905.17-906.36: warning: unused value: $3".
1391 * src/parse-gram.y (BRACED_CODE, action): These are no longer
1392 associated with a value.
1393 (rhs): Don't invoke grammar_current_rule_action_append.
1394 (action): Invoke it here instead.
1395 * src/reader.c (grammar_midrule_action): Now extern.
1396 (grammar_current_rule_action_append): Don't invoke
1397 grammar_midrule_action; that is now the scanner's job.
1398 * src/reader.h (last_string, last_braced_code_loc):
1399 (grammar_midrule_action): New decls.
1400 * src/scan-gram.l (last_string): Now extern, sigh.
1401 (last_braced_code_loc): New extern variable.
1402 (<INITIAL>"{"): Invoke grammar_midrule_action if the current
1403 rule already has an action.
1404 (<SC_BRACED_CODE>"}"): Set last_braced_code_loc before returning.
1405 * tests/input.at (AT_CHECK_UNUSED_VALUES):
1406 Add some tests to check that the above changes fixed the bug.
1408 2006-01-27 Paul Eggert <eggert@cs.ucla.edu>
1410 * src/reader.c (symbol_should_be_used): Renamed from symbol_typed_p.
1411 All used changed. Check whether the symbol has a destructor,
1412 not whether it is typed.
1413 * tests/input.at (AT_CHECK_UNUSED_VALUES): Add a destructor, so
1414 that the values are still reported as unused. All line numbers
1417 2006-01-23 Paul Eggert <eggert@cs.ucla.edu>
1419 Work around a bug in bro 0.8, which underparenthesizes its
1420 definition of YYLLOC_DEFAULT.
1421 * data/glr.c: Change all uses of YYLLOC_DEFAULT to parenthesize
1423 * data/lalr1.cc: Likewise.
1424 * data/yacc.cc: Likewise.
1426 2006-01-22 Paul Eggert <eggert@cs.ucla.edu>
1428 Work around a bug in Pike 7.0, and give the Pike folks a
1429 better way to override the usual int widths.
1430 * data/yacc.c (b4_int_type): Use yytype_uint8, etc., so that the
1431 user can override the types.
1432 (short): #undef, to work around a bug in Pike 7.0.
1433 (yytype_uint8, yytype_int8, yytype_uint16, yytype_int16): New types.
1434 (union yyalloc.yyss): Use yytype_int16 rather than short.
1436 (yysigned_char): Remove.
1437 * src/parse-gram.y (YYTYPE_UINT8, YYTYPE_INT8, YYTYPE_UINT16):
1438 (YYTYPE_INT16): New macros, to test the new facility in yacc.c.
1439 * tests/regression.at (Web2c Actions): Adjust to above changes.
1441 * src/reader.c (check_and_convert_grammar): New function.
1442 (reader): Close the input file even if something went wrong during
1443 parsing. Minor file descriptor leak reported by twlevo.
1445 * src/assoc.c (assoc_to_string): Use a default: abort (); case
1446 to pacify gcc -Wswitch-default.
1447 * src/scan-gram.l (adjust_location): Use a default: break; case
1448 to pacify gcc -Wswitch-default.
1449 * src/scan-skel.h (skel_get_lineno, skel_get_in, skel_get_out):
1450 (skel_get_leng, skel_get_text, skel_set_lineno, skel_set_in):
1451 (skel_set_out, skel_get_debug, skel_set_debug, skel_lex_destroy):
1452 Move these decls to scan-skel.l, since they don't need to be
1454 * src/scan-skel.l: Accept the above decls.
1455 (skel_lex): New decl, to pacify GCC when unpatched flex 2.5.31
1458 2006-01-21 Paul Eggert <eggert@cs.ucla.edu>
1460 * Makefile.cfg (local-checks-to-skip): Add changelog-check,
1461 since we don't want to insist on a version number at the start
1462 of the changelog every time.
1463 * Makefile.maint: Sync from coreutils a bit better.
1464 (sc_trailing_blank): Renamed from sc_trailing_space.
1466 (sc_no_if_have_config_h, sc_require_config_h):
1467 (sc_prohibit_assert_without_use): New rules.
1468 (sc_obsolete_symbols): Don't catch Makefile.maint itself.
1469 (sc_dd_max_sym_length): Fix leading spaces in rule.
1470 (sc_system_h_headers): Prefix with @.
1471 (sc_useless_cpp_parens, m4-check): Output line numbers.
1472 (changelog-check): Allow version only in head.
1473 * data/c.m4: Use "defined FOO" instead of "defined (FOO)", to
1474 satisfy new Makefile.maint rule.
1475 * data/glr.c: Likewise.
1476 * data/glr.cc: Likewise.
1477 * data/lalr1.cc: Likewise.
1478 * data/yacc.c: Likewise.
1479 * lib/ebitsetv.c: Likewise.
1480 * lib/lbitset.c: Likewise.
1481 * lib/subpipe.c: Likewise.
1482 * lib/timevar.c: Likewise.
1483 * src/system.h: Likewise.
1484 * data/yacc.c (YYSTYPE): Don't generate trailing spaces in output.
1485 * djgpp/Makefile.maint: Add copyright notice.
1486 * djgpp/README.in: Likewise.
1487 * djgpp/config.bat: Likewise.
1488 * djgpp/config.site: Likewise.
1489 * djgpp/config_h.sed: Likewise.
1490 * djgpp/djunpack.bat: Likewise.
1491 * djgpp/config.sed: Fix copyright notice to match standard format.
1492 * djgpp/subpipe.h: Likewise.
1493 * lib/bitsetv-print.c: Likewise.
1494 * lib/bitsetv.c: Likewise.
1495 * lib/subpipe.h: Likewise.
1496 * lib/timevar.c: Likewise.
1497 * lib/timevar.h: Likewise.
1498 * djgpp/subpipe.c: Use standard recipe for config.h.
1499 * lib/abitset.c: Likewise.
1500 * lib/bitset.c: Likewise.
1501 * lib/bitset_stats.c: Likewise.
1502 * lib/bitsetv-print.c: Likewise.
1503 * lib/bitsetv.c: Likewise.
1504 * lib/ebitsetv.c: Likewise.
1505 * lib/get-errno.c: Likewise.
1506 * lib/lbitset.c: Likewise.
1507 * lib/subpipe.c: Likewise.
1508 * lib/timevar.c: Likewise.
1509 * lib/vbitset.c: Likewise.
1510 * tests/local.at: Likewise.
1511 * src/scan-gram.l: Don't include verify.h, since system.h does
1513 * .x-sc_require_config_h: New file.
1514 * .x-sc_unmarked_diagnostics: New file.
1516 2006-01-20 Paul Eggert <eggert@cs.ucla.edu>
1518 Be a bit more systematic about using 'abort'.
1519 * lib/abitset.c (abitset_test): Remove ATTRIBUTE_UNUSED; not needed.
1520 * lib/bitset.c (bitset_bytes, bitset_init, bitset_op4_cmp):
1521 Put 'default: abort ();' before some other case, to satisfy older
1523 * lib/bitset_stats.c (bitset_stats_init): Likewise.
1524 * lib/ebitset.c (ebitset_elt_find, ebitset_op3_cmp): Likewise.
1525 * lib/lbitset.c (lbitset_elt_find, lbitset_op3_cmp): Likewise.
1526 * src/conflicts.c (resolve_sr_conflict): Likewise.
1527 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str):
1528 (get_decision_str, get_orientation_str, get_node_alignment_str):
1529 (get_arrow_mode_str, get_crossing_type_str, get_view_str):
1530 (get_linestyle_str, get_arrowstyle_str): Likewise.
1531 * src/conflicts.c (resolve_sr_conflict):
1532 Use a default case rather than one for the one remaining enum
1533 value, to catch invalid enum values as well.
1534 * src/lalr.c (set_goto_map, map_goto):
1535 Prefer "assert (FOO);" to "if (!FOO) abort ();".
1536 * src/nullable.c (nullable_compute, token_definitions_output):
1538 * src/reader.c (packgram, reader): Likewise.
1539 * src/state.c (transitions_to, state_new, state_reduction_find):
1541 * src/symtab.c (symbol_user_token_number_set, symbol_make_alias):
1542 (symbol_pack): Likewise.
1543 * src/tables.c (conflict_row, pack_vector): Likewise.
1544 * src/scan-skel.l (QPUTS): Remove unnecessary parens.
1545 (BASE_QPUTS, "@output ".*\n): Remove unnecessary asserts.
1546 * src/system.h: Don't include <assert.h>.
1547 (assert): New macro.
1549 * doc/bison.texinfo (Prologue, Rules, Actions, Union Decl, Action Decl):
1550 (Destructor Decl, Parser Function, Pure Calling):
1551 Describe rules for braces inside C code more carefully.
1553 2006-01-19 Paul Eggert <eggert@cs.ucla.edu>
1555 Fix some porting glitches found by Nelson H. F. Beebe.
1556 * lib/abitset.c (abitset_resize): Rewrite to avoid warnings from
1557 compilers that don't understand that abort () does not return.
1558 * src/state.c (transitions_to): Likewise.
1559 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check
1560 that '#include <cstdlib>' works.
1561 * src/system.h (INT8_MIN, INT16_MIN, INT32_MIN, INT8_MAX):
1562 (INT16_MAX, UINT8_MAX, INT32_MAX, UINT16_MAX, UINT32_MAX):
1563 #undef if ! defined __STDC_VERSION__ || __STDC_VERSION__ < 199901,
1564 for the benefit of some pre-C99 compilers.
1566 * bootstrap: Undo changes to gnulib files that autoreconf made.
1568 Minor fixups to get 'make maintainer-check' to work.
1569 * configure.ac: Don't use -Wnested-externs, as it's incompatible
1570 with the new verify.h implementation.
1571 * data/c.m4 (b4_yy_symbol_print_generate): YYUSE (yyoutput).
1572 * data/glr.c (YYUSE): Depend on __GNUC__ as well.
1573 * data/yacc.c (YYUSE): Likewise.
1574 * data/lalr1.cc (yysyntax_error_): YYUSE (yystate).
1575 * lib/subpipe.c (end_of_output_subpipe): The args are unused.
1576 * src/parse-gram.y (declaration): Don't pass a string constant
1577 to a function that expects char *, since GCC might complain
1578 about the constant value.
1579 * src/reader.c (symbol_typed_p): Add parens to pacify GCC.
1580 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): #undef yylloc and yylval
1581 before #defining them.
1582 * tests/glr-regression.at
1583 (Incorrectly initialized location for empty right-hand side in GLR):
1584 In yyerror, use the msg arg.
1585 (Corrupted semantic options if user action cuts parse):
1586 (Incorrect lookahead during deterministic GLR):
1587 (Incorrect lookahead during nondeterministic GLR):
1588 Don't name a local var 'index'; it shadows string.h's 'index'.
1590 2006-01-19 Akim Demaille <akim@epita.fr>
1592 * tests/calc.at (_AT_DATA_CALC_Y): Initialize the whole initial
1593 location, not just parts of it.
1595 2006-01-18 Paul Eggert <eggert@cs.ucla.edu>
1597 * NEWS: Document the fact that multiple %unions are now allowed.
1598 * doc/bison.texinfo (Union Decl): Likewise.
1599 * TODO: This feature is now implemented, so remove it from
1602 * Makefile.maint: Merge with coreutils Makefile.maint.
1603 (CVS_LIST): Use build-aux version if available.
1604 (VERSION_REGEXP): New macro.
1605 (syntax-check-rules): Add sc_no_if_have_config_h,
1606 sc_prohibit_assert_without_use, sc_require_config_h,
1607 sc_useless_cpp_parens.
1608 (sc_obsolete_symbols): Check for O_NDELAY.
1609 (sc_dd_max_sym_length): Track coreutils.
1610 (sc_unmarked_diagnostics): Look in all files, not just *.c.
1611 (sc_useless_cpp_parens): New rule.
1612 (news-date-check): Look for version or today's date.
1613 (changelog-check): Don't require version number near head.
1614 (copyright-check): Use current year instead of hardwiring 2005.
1615 (my-distcheck): Depend on $(release_archive_dir)/$(prev-tgz).
1616 (announcement): Add --gpg-key-ID.
1618 * djgpp/config.sed: Add copyright notice, and replace "filesystem"
1621 Avoid undefined behavior that addressed just before the start of an
1622 array. Problem reported by twlevo.
1623 * src/reader.c (packgram): Prepend a new sentinel before ritem.
1624 * src/lalr.c (build_relations): Rely on new sentinel.
1625 * src/gram.c (gram_free): Adjust to new sentinel.
1627 2006-01-12 Joel E. Denny <jdenny@ces.clemson.edu>
1629 * data/glr.c (yyGLRStateSet): Rename yylookaheadStatuses to
1630 yylookaheadNeeds. All uses updated.
1631 (yysplitStack): Rename local yynewLookaheadStatuses to
1632 yynewLookaheadNeeds.
1633 * data/glr-regression.at (Incorrect lookahead during nondeterministic
1634 GLR): In comments, change `lookahead status' to `lookahead need'.
1636 2006-01-11 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
1638 * data/glr.c (yysplitStack): A little stylistic rewrite.
1640 2006-01-11 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
1642 * data/glr.c (yyaddDeferredAction): Flesh out the comment.
1644 2006-01-11 Joel E. Denny <jdenny@ces.clemson.edu>
1646 * doc/bison.texinfo: Fix some typos.
1647 (GLR Semantic Actions): New subsection discussing special
1648 considerations because GLR semantic actions might be deferred.
1649 (Actions): Mention look-ahead usage of yylval.
1650 (Actions and Locations): Mention look-ahead usage of yylloc.
1651 (Special Features for Use in Actions): Add YYEOF entry and mention it
1652 in the yychar entry.
1653 In the yychar entry, remove mention of the local yychar case (pure
1654 parser) since this is irrelevant information when writing semantic
1655 actions and since it's already discussed in `Bison Symbols' where
1656 yychar is otherwise described as an external variable.
1657 In the yychar entry, don't call it the `current' look-ahead since it
1658 isn't when semantic actions are deferred.
1659 In the yychar and yyclearin entries, add note about deferred semantic
1661 Add yylloc and yylval entries discussing look-ahead usage.
1662 (Look-Ahead Tokens): When discussing yychar, don't call it the
1663 `current' look-ahead, and do mention yylval and yylloc.
1664 (Error Recovery): Cross-reference `Action Features' when mentioning
1666 (Bison Symbols): In the yychar entry, don't call it the `current'
1668 In the yylloc and yylval entries, mention look-ahead usage.
1670 2006-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
1672 * tests/glr-regression.at: Update copyright year to 2006.
1674 2006-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
1676 * data/glr.c (yyGLRStateSet): Add yybool* yylookaheadStatuses member to
1677 use during nondeterministic operation to track which stacks have
1678 actually needed the current lookahead.
1679 (yyinitStateSet, yyfreeStateSet, yyremoveDeletes, yysplitStack):
1680 Allocate, deallocate, resize, and otherwise shuffle space for
1681 yylookaheadStatuses in parallel with yystates member of yyGLRStateSet.
1682 (yysplitStack, yyprocessOneStack, yyparse): Set lookahead status
1683 appropriately during nondeterministic operation.
1684 (yySemanticOption): Add int yyrawchar, YYSTYPE yyval, and YYLTYPE yyloc
1685 members to store the current lookahead to be used by the deferred
1687 (yyaddDeferredAction): Add size_t yyk parameter specifying the stack
1688 from which the RHS is taken. Set the lookahead members of the new
1689 yySemanticOption according to the lookahead status for stack yyk.
1690 (yyglrShiftDefer, yyglrReduce): Pass yyk parameter on to
1691 yyaddDeferredAction.
1692 (yyresolveAction): Set yychar, yylval, and yylloc to the lookahead
1693 members of yySemanticOption before invoking yyuserAction, and then set
1694 them back to their current values afterward.
1695 (yyparse): Set yychar = YYEMPTY where yytoken = YYEMPTY.
1696 (yyreportAmbiguity): Add /*ARGSUSED*/ to pacify lint.
1697 * tests/glr-regression.at: Remove `.' from the ends of recent test case
1698 titles for consistency.
1699 (Leaked merged semantic value if user action cuts parse): In order to
1700 suppress lint warnings, use arguments in merge function, and assign
1701 char value < 128 in main.
1702 (Incorrect lookahead during deterministic GLR): New test case.
1703 (Incorrect lookahead during nondeterministic GLR): New test case.
1705 2006-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
1707 * data/c.m4 (b4_yy_symbol_print_generate): In yy_symbol_print, accept
1708 !yyvaluep as signal that no semantic value is available to print.
1709 * data/glr.c (yydestroyGLRState): If state is not resolved, don't try
1710 to print a semantic value.
1712 2006-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
1714 * tests/glr-regression.at: For consistency with my newer test cases,
1717 2006-01-05 Joel E. Denny <jdenny@ces.clemson.edu>
1719 * data/glr.c (yyresolveValue): When merging semantic options, if at
1720 least one user action succeeds but a later one cuts the parse, then
1721 destroy the semantic value before returning rather than leaking it.
1722 (yyresolveStates): If a user action cuts the parse and thus
1723 yyresolveValue fails, ignore the (unset) semantic value rather than
1724 corrupting the yyGLRState, and empty the semantic options list since
1725 the user actions should have called all necessary destructors.
1726 Simplify code with YYCHK.
1727 * tests/glr-regression.at (Corrupted semantic options if user action
1728 cuts parse): New test case.
1729 (Undesirable destructors if user action cuts parse): New test case.
1730 Before applying any of this patch, this test case never actually failed
1731 for me... but only because the corrupted semantic options usually
1733 (Leaked merged semantic value if user action cuts parse): New test
1736 2006-01-05 Akim Demaille <akim@epita.fr>
1738 * src/reader.c, src/symlist.h, src/symlist.c: s/mid_rule/midrule/.
1740 2006-01-04 Paul Eggert <eggert@cs.ucla.edu>
1742 * data/c.m4 (b4_c_modern): New macro, with a new provision for
1743 _MSC_VER. Problem reported by Cenzato Marco.
1744 (b4_c_function_def): Use it.
1745 * data/yacc.c (YYMODERN_C): Remove. All uses replaced by
1747 (yystrlen, yystpcpy, yyparse): Use b4_c_function... macros rather
1748 than rolling our own.
1750 2006-01-04 Akim Demaille <akim@epita.fr>
1752 Also warn about non-used mid-rule values.
1753 * src/symlist.h, src/symlist.c (symbol_list): Add a mid_rule
1755 (symbol_list_new): Adjust.
1756 * src/reader.c (symbol_typed_p): New.
1757 (grammar_rule_check): Use it.
1758 (grammar_midrule_action): Bind a mid-rule LHS to its rule.
1760 * tests/input.at (AT_CHECK_UNUSED_VALUES): New.
1762 * tests/actions.at (Exotic Dollars): Adjust.
1764 2006-01-04 Akim Demaille <akim@epita.fr>
1766 * src/reader.c (grammar_midrule_action): If $$ is set in a
1767 mid-rule, move the `used' bit to its lhs.
1768 * tests/input.at (Unused values): New.
1769 * tests/actions.at (Exotic Dollars): Adjust: exp is not typed.
1771 2006-01-03 Paul Eggert <eggert@cs.ucla.edu>
1773 * doc/bison.texinfo (Bison Options): Say more accurately what
1775 * src/parse-gram.y (rules_or_grammar_declaration): Don't complain
1776 about declarations in the grammar when in Yacc mode, as POSIX does
1777 not require a diagnostic when the grammar uses extensions.
1779 * src/reduce.c (reduce_grammar): Remove unnecessary cast to bool.
1781 Warn about dubious constructions like "%token T T".
1783 * src/symtab.h (struct symbol.declared): New member.
1784 * src/symtab.c (symbol_new): Initialize it to false.
1785 (symbol_class_set): New arg DECLARING, specifying whether
1786 this is a declaration that we want to warn about, if there
1787 is more than one of them. All uses changed.
1789 * data/glr.c, data/glr.cc, data/lalr1.cc, data/yacc.c:
1790 Allow multiple %union directives, whose contents concatenate.
1791 * src/parse-gram.y (grammar_declaration): Likewise.
1792 Use muscle_code_grow, so that we don't need stype_line any more.
1795 * src/muscle_tab.c (muscle_grow): Fix comment.
1797 * ChangeLog, data/c.m4, data/glr.c, data/glr.cc, data/location.cc:
1798 * data/yacc.c, src/getargs.c, src/output.c, tests/cxx-type.at:
1799 Update copyright year to 2006.
1801 2006-01-03 Akim Demaille <akim@epita.fr>
1803 Have glr.cc pass (some of) the calc.at tests.
1804 * data/glr.cc (b4_parse_param_orig): New.
1805 (b4_parse_param): Improve its definition, and bound it more
1806 clearly in the skeleton.
1807 (b4_epilogue): Append, instead of prepending, in order to keep
1809 Simplify the generation of auxiliary functions: locations and
1810 purity are mandated.
1811 (b4_global_tokens_and_yystype): Honor it.
1812 * data/location.cc (c++.m4): Don't include it.
1813 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Define AT_GLR_CC_IF
1815 * tests/calc.at (AT_CHECK_CALC): Rely on AT_SKEL_CC_IF instead of
1817 Be sure to initialize the first position's filename.
1818 (AT_CHECK_CALC_LALR1_CC): Add %location and %defines, they are
1820 (AT_CHECK_CALC_GLR_CC): New.
1821 Use it to exercise glr.cc as a lalr1.cc drop-in replacement.
1823 2006-01-02 Akim Demaille <akim@epita.fr>
1825 * src/output.c (output_skeleton): Don't hard wire the inclusion of
1827 * data/c++.m4, data/glr.c, data/yacc.c: Include c.m4.
1828 * data/glr.cc: Do not include stack.hh.
1830 2006-01-02 Joel E. Denny <jdenny@ces.clemson.edu>
1832 * data/glr.c: Reformat whitespace with tabs.
1833 (b4_lpure_formals): Remove this unused m4 macro.
1834 * tests/cxx-type.at: Reformat whitespace with tabs.
1835 (_AT_TEST_GLR_CXXTYPES): In union Node, rename node_info to nodeInfo
1836 since it's a member. Rename type to isNterm for clarity.
1838 2005-12-29 Akim <akim@sulaco.local>
1840 Let glr.cc catch up with symbol_value_print.
1841 * data/glr.cc (b4_yysymprint_generate): Replace by...
1842 (b4_yy_symbol_print_generate): this.
1843 (yy_symbol_print, yy_symbol_value_print): Declare them.
1845 2005-12-28 Paul Eggert <eggert@cs.ucla.edu>
1847 * src/location.h (boundary): Note that a line or column equal
1848 to INT_MAX indicates an overflow.
1849 * src/scan-gram.l: Include verify.h. Don't include get-errno.h.
1850 (rule_length_overflow, increment_rule_length, add_column_width):
1852 (<INITIAL>{id}, <SC_ESCAPED_STRING>"\"", <SC_ESCAPED_CHARACTER>"'"):
1853 (<SC_BRACED_CODE>"}"):
1854 Use increment_rule_length rather than incrementing it by hand.
1855 (adjust_location, handle_syncline): Diagnose overflow.
1856 (handle_action_dollar, handle_action_at):
1857 Fix bug with monstrosities like $-2147483648.
1858 Remove now-unnecessary checks.
1859 (scan_integer): Verify assumptions and remove now-unnecessary checks.
1860 (convert_ucn_to_byte): Verify assumptions.
1861 (handle_syncline): New arg LOC. All callers changed.
1862 Don't store through a value derived from char const * pointer.
1864 * src/reader.c (grammar_rule_check): Rewrite slightly to avoid
1867 2005-12-27 Paul Eggert <eggert@cs.ucla.edu>
1869 * src/reader.c (grammar_midrule_action, grammar_symbol_append):
1870 Remove unnecessary forward static decls.
1872 2005-12-27 Akim Demaille <akim@epita.fr>
1874 * src/reader.c (grammar_current_rule_check): Also check that $$
1876 Take the rule to check as argument, hence rename as...
1877 (grammar_rule_check): this.
1878 * src/reader.h, src/reader.c (grammar_rule_begin, grammar_rule_end):
1880 (grammar_rule_begin, grammar_rule_end): these, for consistency.
1881 (grammar_midrule_action, grammar_symbol_append): Now static.
1882 * tests/torture.at (input): Don't rely on the default action
1883 being always performed.
1884 * tests/calc.at: "Set" $$ even when the action is "cut" with
1886 * tests/actions.at (Exotic Dollars): Instead of using unused
1887 values, check that the warning is issued.
1889 2005-12-22 Paul Eggert <eggert@cs.ucla.edu>
1891 * NEWS: Improve wording for unused-value warnings.
1893 2005-12-22 Akim Demaille <akim@epita.fr>
1895 * data/lalr1.cc, data/yacc.c, data/glr.c, data/c.m4
1896 (b4_yysymprint_generate): Rename as...
1897 (b4_yy_symbol_print_generate): this.
1898 Generate yy_symbol_print instead of yysymprint.
1899 Generate also yy_symbol_value_print, and use it.
1901 2005-12-22 Akim Demaille <akim@epita.fr>
1903 * NEWS: Warn about unused values.
1904 * src/symlist.h, src/symlist.c (symbol_list, symbol_list_new): Add
1906 (symbol_list_n_get, symbol_list_n_used_set): New.
1907 (symbol_list_n_type_name_get): Use symbol_list_n_get.
1908 * src/scan-gram.l (handle_action_dollar): Flag used symbols.
1909 * src/reader.c (grammar_current_rule_check): Check that values are
1911 * src/symtab.c (symbol_print): Accept 0.
1912 * tests/existing.at: Remove the type information.
1914 Remove useless actions (beware of mid-rule actions: perl -000
1915 -pi -e 's/\s*\{\}(?=[\n\s]*[|;])//g').
1916 * tests/actions.at (Exotic Dollars): Use unused values.
1917 * tests/calc.at: Likewise.
1918 * tests/glr-regression.at (No users destructors if stack 0 deleted):
1921 * src/gram.c (rule_useful_p, rule_never_reduced_p): Use
1924 2005-12-21 Paul Eggert <eggert@cs.ucla.edu>
1926 Undo 2005-12-01 tentative license wording change. The wording is
1927 still being reviewed by the lawyers, and we don't want to wait for
1928 them before publishing a test release. For now, revert to the
1930 * NEWS: Undo 2005-12-01 change.
1931 * data/glr.c: Revert to previous license wording.
1932 * data/glr.cc: Likewise.
1933 * data/lalr1.cc: Likewise.
1934 * data/location.cc: Likewise.
1935 * data/yacc.c: Likewise.
1937 * NEWS: Reword %destructor vs YYABORT etc.
1938 * data/glr.c: Use American spacing, for consistency.
1939 * data/glr.cc: Likewise.
1940 * data/lalr1.cc: Likewise.
1941 * data/yacc.c: Likewise.
1942 * data/yacc.c: Reformat comments slightly.
1943 * doc/bison.texinfo: Replace "non-" with "non" when that makes sense,
1944 for consistency. Fix some spelling errors and reword recently-included
1946 * tests/cxx-type.at: Cast results of malloc, for C++.
1948 2005-12-21 Joel E. Denny <address@hidden>
1950 * tests/cxx-type.at: Construct a tree, count the parents of shared
1951 nodes, and free each node once and only once. Previously, the memory
1952 for semantic values was leaked instead.
1954 2005-12-21 Joel E. Denny <address@hidden>
1956 * data/glr.c (struct yyGLRStack): If pure, add yyval and yyloc members.
1957 (yylval, yylloc): If pure, #define to yystackp->yyval and
1958 yystackp->yyloc similar to yychar and yynerrs.
1959 (yyparse): If pure, remove local yylval and yylloc. Add local
1960 yystackp to accommodate pure definitions of yylval and yylloc.
1961 (b4_lex_param, b4_lyyerror_args, b4_lpure_args): If pure, change
1962 yylvalp and yyllocp to &yylval and &yylloc.
1963 (nerrs, char, lval, lloc): If pure, add #define's for b4_prefix[]
1964 namespace. Previously, nerrs and char were missing, but lval and lloc
1966 (yyprocessOneStack, yyreportSyntaxError, yyrecoverSyntaxError): Remove
1967 yylvalp and yyllocp parameters since, if pure, these are now always
1968 accessible through yystackp. If not pure, they are still accessible
1970 * data/glr.c, data/yacc.c (YYLLOC_DEFAULT): Change `if (N)' to
1971 `if (YYID (N))' to pacify lint.
1973 2005-12-21 Akim Demaille <akim@epita.fr>
1975 YYACCEPT, YYERROR, and YYABORT, as user actions, should not
1976 destroy the RHS symbols of a rule.
1977 * data/yacc.c (yylen): Initialize to 0.
1978 Keep its value to the number of items to possibly shift.
1979 In particular, a regular successful parse that ends on YYFINAL by
1980 a (internal) YYACCEPT must not have yylen != 0.
1981 (yyerrorlab, yyreturn): Pop the RHS.
1982 Reorder a bit to emphasize the `shifting' bits of code.
1983 (YYPOPSTACK): Now accept a number of items to pop.
1984 * data/lalr1.cc: Likewise.
1985 * data/glr.c: Formatting changes.
1986 Use goto instead of fall through.
1987 * doc/bison.texinfo (Destructor Decl): Complete.
1989 2005-12-20 Juan Manuel Guerrero <juan.guerrero@gmx.de>
1991 * Makefile.am: DJGPP specific files added to EXTRA_DIST.
1992 * djgpp/Makefile.maint: Fix PACKAGE variable computation.
1993 * djgpp/config.bat: Replace every occurence of the file name
1994 scan-gram-c.c with c-scan-gram.c. The same for scan-skel-c.c with
1995 c-scan-skel.c to conform with the 8.3 file name restriction on MSDOS.
1996 * djgpp/config.sed: Replace every occurence of the file name
1997 scan-gram-c.c with c-scan-gram.c. The same for scan-skel-c.c with
1998 c-scan-skel.c to conform with the 8.3 file name restriction on MSDOS.
1999 * djgpp/djunpack.bat: DJGPP specific file.
2000 * djgpp/fnchange.lst: DJGPP specific file.
2001 * djgpp/README.in: Add new information about how to unpack the bison
2002 source on MSDOS and other systems which have 8.3 file name restrictions
2003 using djunpack.bat and fnchange.lst.
2005 2005-12-12 Paul Eggert <eggert@cs.ucla.edu>
2007 * bootstrap (build_cvs_prefix): Remove; unused.
2008 (CVS_PREFIX): Adjust to yesterday's Savannah reorganization
2009 when getting gnulib.
2011 2005-12-12 "Joel E. Denny" <jdenny@ces.clemson.edu>
2013 * data/glr.c: Reorder typedef declarations for structs to match order
2014 of struct declarations.
2015 Rename yystack everywhere to yystackp except in yyparse where it's not
2017 (yyglrShift): Change parameter YYSTYPE yysval to YYSTYPE* yyvalp for
2019 (yyis_table_ninf): Change 0 to YYID (0) to pacify lint.
2020 (yyreportSyntaxError): Add /*ARGSUSED*/ to pacify lint.
2021 (yyparse): Change while (yytrue) to while ( YYID (yytrue)) to pacify
2024 2005-12-09 Paul Eggert <eggert@cs.ucla.edu>
2026 * tests/sets.at (Accept): Fix typos in regular expression used to
2027 sed out the final state number.
2029 Work around portability problem on Solaris 10: flex-generated
2030 files include <stdio.h> before <config.h>, which messes up
2031 because the latter defines __EXTENSIONS__. Address the problem
2032 by creating two new little files that include <config.h> first,
2033 then include the flex-generated files. Rewrite everyone else
2034 to include <config.h> first, as well.
2035 * lib/timevar.c: Always include "config.h".
2036 * src/Makefile.am (bison_SOURCES): Replace scan-gram.l with
2037 scan-gram-c.c, and scan-skel.l with scan-skel-c.c.
2038 (EXTRA_bison_SOURCES): New macro.
2039 * src/scan-gram-c.c, src/scan-skel-c.c: New files.
2040 * src/system.h: Don't include config.h.
2041 * src/LR0.c: Include <config.h> first.
2042 * src/assoc.c: Likewise.
2043 * src/closure.c: Likewise.
2044 * src/complain.c: Likewise.
2045 * src/conflicts.c: Likewise.
2046 * src/derives.c: Likewise.
2047 * src/files.c: Likewise.
2048 * src/getargs.c: Likewise.
2049 * src/gram.c: Likewise.
2050 * src/lalr.c: Likewise.
2051 * src/location.c: Likewise.
2052 * src/main.c: Likewise.
2053 * src/muscle_tab.c: Likewise.
2054 * src/nullable.c: Likewise.
2055 * src/output.c: Likewise.
2056 * src/parse-gram.y: Likewise.
2057 * src/print.c: Likewise.
2058 * src/print_graph.c: Likewise.
2059 * src/reader.c: Likewise.
2060 * src/reduce.c: Likewise.
2061 * src/relation.c: Likewise.
2062 * src/state.c: Likewise.
2063 * src/symlist.c: Likewise.
2064 * src/symtab.c: Likewise.
2065 * src/tables.c: Likewise.
2066 * src/uniqstr.c: Likewise.
2067 * src/vcg.c: Likewise.
2069 * src/parse-gram.y: Fix minor problems uncovered by lint.
2070 (current_lhs, current_lhs_location): Now static.
2071 (current_assoc): Remove unused variable.
2073 Cleanups so that Bison-generated parsers have less lint.
2074 * data/c.m4 (b4_yydestruct_generate, b4_yysymprint_generate):
2075 Prepend /*ARGSUSED*/, for lint's sake.
2076 * data/glr.c (YYUSE): Properly parenthesize, and use an alternate
2077 definition if 'lint' is defined.
2078 (YYID): New macro (or function, if lint).
2079 All uses of /*CONSTCOND*/0 replaced by YYID(0).
2080 * data/yacc.c: Likewise.
2081 * data/glr.c (yyuserAction, yyuserMerge, yy_reduce_print):
2082 (yyrecoverSyntaxError): Prepend /*ARGSUSED*/.
2083 * data/glr.cc (YYLLOC_DEFAULT): Omit /*CONSTCOND*/ since this code
2085 * data/lalr1.cc (YYUSE): Just use a cast, since this code is C++ only.
2086 * data/yacc.c (YYSTACK_FREE) [defined YYSTACK_ALLOC]:
2087 Use YYID(0) rather than 0, for lint.
2088 (yystrlen): Rewrite to avoid lint warning about ptrdiff_t overflow.
2089 (yysyntax_error): Rewrite to avoid lint warnings about parenthesization.
2091 2005-12-07 Paul Eggert <eggert@cs.ucla.edu>
2093 * tests/glr-regression.at
2094 (Improper handling of embedded actions and dollar(-N) in GLR parsers):
2095 Close memory leak reported by twlevo.
2097 2005-12-06 "Joel E. Denny" <jdenny@ces.clemson.edu>
2099 * data/glr.c (yyprocessOneStack, yyparse): Synchronize the shift for
2101 (yyparse): Iterate another stack in order to call user destructors.
2102 * tests/glr-regression.at (No users destructors if stack 0 deleted):
2104 (Duplicated user destructor for lookahead): This test now is expected
2107 2005-12-01 Paul Eggert <eggert@cs.ucla.edu>
2109 * NEWS: Document the following change.
2110 * data/yacc.c: Say "parser skeleton" rather than "file", since
2111 it's no longer just a file.
2112 * data/glr.c: Grant a special exception for C GLR parsers, that
2113 reads like the already-existing exception for C LALR(1) parsers.
2114 * data/glr.cc: Likewise.
2115 * data/lalr1.cc: Likewise.
2116 * data/location.cc: Likewise.
2117 * data/yacc.c: Reword the "written by" statement to clarify that
2118 it was the parser skeleton, not the entire output file.
2119 * data/glr.c: Written by Paul Hilfinger.
2120 * data/glr.cc: Written by Akim Demaille.
2121 * data/lalr1.cc: Likewise.
2123 2005-11-18 Paul Eggert <eggert@cs.ucla.edu>
2125 * data/yacc.c (yy_reduce_print, YY_REDUCE_PRINT):
2126 Fix typos in previous change that broke 'make check'.
2127 YY_REDUCE_PRINT cannot be a pseudo-varargs macro; that isn't
2129 * tests/calc.at (_AT_CHECK_CALC,_AT_CHECK_CALC_ERROR):
2130 Don't check NUM-STDERR-LINES, since the output format is fluctuating.
2131 We can revert this once things settle down.
2133 * src/conflicts.c (conflicts_print): Don't print file name twice
2134 when %expect fails because there were no conflicts.
2135 * doc/bison.texinfo (Expect Decl): Tighten up wording in previous
2137 * tests/conflicts.at (%expect not enough, %expect too much):
2138 (%expect with reduce conflicts): Adjust to new behavior.
2140 2005-11-18 Akim Demaille <akim@epita.fr>
2142 * src/conflicts.c (conflicts_print): Unsatisfied %expectation are
2144 * NEWS: Document this.
2145 * doc/bison.texinfo (Expect Decl): Likewise.
2147 2005-11-16 Akim Demaille <akim@epita.fr>
2149 Generalize the display of semantic values and locations in traces.
2150 * data/glr.c (yy_reduce_print): Fix indices (again).
2151 * data/c++.m4 (b4_rhs_value, b4_rhs_location): Don't expect
2153 * data/lalr1.cc (yyreduce_print): Rename as...
2154 (yy_reduce_print): this.
2155 Display values and locations.
2156 * data/yacc.c (yy_reduce_print): Likewise.
2157 (YY_REDUCE_PRINT): Adjust to pass the required arguments.
2158 (yysymprint): Move higher to be visible from yy_reduce_print).
2160 * tests/calc.at: Adjust the expected length of the traces.
2162 2005-11-14 Akim Demaille <akim@epita.fr>
2164 * data/glr.c (yy_reduce_print): The loop was quite wrong: type are
2165 from 1 to N, while values and location start at 0.
2166 (b4_rhs_location, b4_rhs_value): Add parens around $1 and $2.
2168 2005-11-14 Akim Demaille <akim@epita.fr>
2170 * data/glr.c (yy_reduce_print): Fix the $ number.
2172 2005-11-14 Akim Demaille <akim@epita.fr>
2174 "Use" parse parameters.
2175 * data/c.m4 (b4_parse_param_for, b4_parse_param_use): New.
2176 * data/glr.c, data/glr.cc: Use them.
2177 * data/glr.c (YYUSE): Have a C++ definition that supports
2180 2005-11-14 Akim Demaille <akim@epita.fr>
2182 * data/glr.c (yyexpandGLRStack): Declare only if defined.
2184 2005-11-14 Akim Demaille <akim@epita.fr>
2187 * data/m4sugar/m4sugar.m4 (m4_prepend): New.
2189 2005-11-12 Akim Demaille <akim@epita.fr>
2191 Let position and location be PODs.
2192 * data/location.cc (position::initialize, location::initialize): New.
2193 (position::position, location::location): Define only if
2194 b4_location_constructors is defined.
2195 * data/lalr1.cc (b4_location_constructors): Define it for backward
2197 * doc/bison.texinfo (Initial Action Decl): Use initialize.
2199 2005-11-12 Akim Demaille <akim@epita.fr>
2201 * data/lalr1.cc: Move the body of the ctor and dtor into the
2202 parser file (instead of the header).
2203 Wrap the implementations in a "namespace yy".
2205 2005-11-12 Akim Demaille <akim@epita.fr>
2207 Have glr.c include its header file when created.
2208 * data/glr.c (b4_shared_declarations): New.
2209 Output them verbatim in the parser if !%defines, otherwise
2210 output then in the header file, and include it instead.
2212 2005-11-11 Akim Demaille <akim@epita.fr>
2214 * data/glr.c: Comment changes.
2216 2005-11-11 Akim Demaille <akim@epita.fr>
2218 When yydebug, report semantic and location values for reductions.
2219 * data/glr.c (yy_reduce_print): Report the semantic values and the
2221 (YY_REDUCE_PRINT): Adjust.
2222 (yyglrReduce): Use them.
2223 (b4_rhs_value, b4_rhs_location): Remove m4_eval invocations.
2224 * data/c.m4 (b4_yysymprint_generate): Specify the const arguments.
2225 * tests/calc.at (_AT_CHECK_CALC_ERROR): Remove the reduction
2228 2005-11-10 Akim Demaille <akim@epita.fr>
2230 * data/glr.c (yynewGLRStackItem, YY_RESERVE_GLRSTACK): New.
2231 (yyaddDeferredAction, yyglrShift, yyglrShiftDefer): Use them.
2232 (yyexpandGLRStack, YYRELOC): Define only when YYSTACKEXPANDABLE.
2234 2005-11-09 Albert Chin-A-Young <china@thewrittenword.com>
2236 * m4/cxx.m4, examples/Makefile.am: Don't build
2237 examples/calc++ if no C++ compiler is available. (trivial change)
2239 2005-11-09 Akim Demaille <akim@epita.fr>
2241 * src/scan-skel.l: Use a couple of asserts.
2243 2005-11-03 Akim Demaille <akim@epita.fr>
2245 In some (weird) cases, the final state number is incorrect.
2246 Reported by Alexandre Duret-Lutz.
2247 * src/LR0.c (state_list_append): Remove the computation of
2249 (save_reductions): Do it here.
2250 (get_state): Alpha conversion.
2251 (generate_states): Use a for loop.
2252 * src/gram.h (item_number_is_rule_number)
2253 (item_number_is_symbol_number): New.
2254 * src/state.c: Use assert.
2255 * src/system.h: Include assert.h.
2256 * tests/sets.at (Accept): New.
2258 2005-10-30 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
2260 * data/glr.c (yyfill): Adjust comment.
2261 (yyresolveAction): Initialize default location properly
2262 for empty right-hand sides.
2263 (yydoAction): Ditto.
2264 Add comment explaining apparently dead code.
2265 * tests/glr-regression.at
2266 (Incorrectly initialized location for empty right-hand side in GLR):
2269 2005-10-30 Paul Eggert <eggert@cs.ucla.edu>
2271 * bootstrap (cleanup_gnulib): New function. Use it to clean up
2272 gnulib when interrupted. This fixes some race conditions and
2273 works around some portability problems (one noted by Paul
2276 2005-10-22 Akim <akim@epita.fr>
2278 * Makefile.cfg: Adjust to config -> build-aux.
2281 2005-10-21 Akim Demaille <akim@epita.fr>
2283 * data/c.m4 (b4_yydestruct_generate, b4_yysymprint_generate): Pass
2285 * data/glr.c (YY_SYMBOL_PRINT, yydestroyGLRState): Adjust.
2286 * data/yacc.c (b4_Pure_if): Rename as...
2287 (b4_yacc_pure_if): this.
2288 (YY_SYMBOL_PRINT, yyparse): Adjust.
2289 * doc/bison.texinfo: Formatting changes.
2291 2005-10-21 Akim Demaille <akim@epita.fr>
2293 Finish the transition config -> build-aux.
2294 * configure.ac, Makefile.am: Use build-aux.
2295 * config/prev-version, config/announce-gen, config/Makefile.am:
2297 * build-aux/prev-version, build-aux/announce-gen,
2298 * build-aux/Makefile.am: here.
2300 2005-10-14 Akim Demaille <akim@epita.fr>
2302 * examples/calc++/test: Use set -x only when VERBOSE.
2304 2005-10-13 Paul Eggert <eggert@cs.ucla.edu>
2306 * NEWS: Bison now warns if it finds a stray `$' or `@' in an action.
2307 * src/scan-gram.l (<SC_BRACED_CODE>[$@]): Implement this.
2309 2005-10-13 Akim Demaille <akim@epita.fr>
2311 * src/scan-skel.l: Output the base name parts of the parser and
2313 * tests/output.at (AT_CHECK_OUTPUT): Support subdirectories, and
2315 Use this to exercise C++ outputs in subdirs.
2316 Reported by Oleg Smolsky.
2318 2005-10-12 Paul Eggert <eggert@cs.ucla.edu>
2320 * data/c.m4 (b4_c_function_def): Look at __C99_FUNC__, not at
2321 __STDC_VERSION__, as IBM cc 7.0 doesn't define the latter either.
2322 Problem reported by John P. Hartmann.
2323 * data/yacc.c (YYMODERN_C): Likewise. Don't define if the user has
2326 2005-10-12 Akim Demaille <akim@epita.fr>
2328 * src/parse-gram.y (version_check): Exit 63 to please missing
2329 (stands for "version mismatch).
2330 * tests/input.at, doc/bison.texinfo: Adjust.
2332 2005-10-10 Paul Eggert <eggert@cs.ucla.edu>
2334 Work around portability problems with Visual Age C compiler
2335 (xlc and xlC_r) reported by John P. Hartmann.
2336 * data/location.cc (initial_column, initial_line): Remove.
2337 All uses replaced by 0 and 1.
2338 * src/scan-gram.l (gram_wrap): Redefine to avoid bug in flex 2.5.31
2339 that xlc complains about.
2340 * src/scan-skel.l (skel_wrap): Likewise.
2341 * data/c.m4 (b4_c_function_def): Look at __STDC_VERSION__ as well
2343 * data/yacc.c (YYMODERN_C): New macro, which also looks at
2344 __STDC_VERSION__. Use it everywhere instead of looking at
2345 __STDC__ and __cplusplus.
2347 2005-10-10 Akim Demaille <akim@epita.fr>
2349 * examples/calc++/test: Be quiet unless VERBOSE.
2351 2005-10-05 Paul Eggert <eggert@cs.ucla.edu>
2353 * data/c.m4 (yydestruct, yysymprint):
2354 Use YYUSE instead of casting to void.
2355 * data/glr.c (YYUSE): New macro.
2356 (yyuserMerge, yyreportAmbiguity, yyreportSyntaxError):
2357 Use it instead of rolling our own.
2358 (YYLLOC_DEFAULT, YYCHK, YYDPRINTF, YY_SYMBOL_PRINT, YY_REDUCE_PRINT):
2360 Use /*CONSTCOND*/ to suppress lint warnings.
2361 * data/lalr1.cc (YYLLOC_DEFAULT, YY_SYMBOL_PRINT, YY_REDUCE_PRINT):
2362 (YY_STACK_PRINT): Use 'false' not '0'.
2364 (yysymprint_, yydestruct_): Use it instead of rolling our own.
2365 * data/yacc.c (YYUSE): New macro.
2366 (YYCOPY, YYSTACK_RELOCATE, YYBACKUP, YYLLOC_DEFAULT):
2367 (YYDPRINTF, YY_SYMBOL_PRINT, YY_STACK_PRINT, YY_REDUCE_PRINT):
2368 (yyerrorlab): Use /*CONSTCOND*/ to suppress lint warnings.
2371 * data/m4sugar/m4sugar.m4 (_m4_map): New macro.
2372 (m4_map, m4_map_sep): Use it. Handle the empty list correctly.
2374 2005-10-04 Paul Eggert <eggert@cs.ucla.edu>
2376 Undo the parts of the unlocked-I/O change that substituted
2377 putc or puts for printf. This might hurt performance a bit,
2378 but some people prefer the printf style.
2379 * data/c.m4 (yysymprint): Prefer printf to puts and putc.
2380 * data/glr.c (YYFPUTC, YYFPUTS, YYDPUTS): Remove.
2381 All uses replaced by YYFPRINTF and YYDPRINTF.
2382 * data/yacc.c: Likewise.
2383 * lib/bitset.c (bitset_print): Likewise.
2384 * lib/bitsetv.c (bitsetv_dump, debug-bitsetv): Prefer printf to
2386 * lib/lbitset.c (debug_lbitset): Likewise.
2387 * src/closure.c (print_firsts, print_fderives): Likewise.
2388 * src/gram.c (grammar_dump): Likewise.
2389 * src/lalr.c (look_ahead_tokens_print): Likewise.
2390 * src/output.c (escaped_output): Likewise.
2391 (user_actions_output): Break apart two printfs.
2392 * src/parse-gram.y (%printer): Prefer printf to putc and puts.
2393 * src/reduce.c (reduce_print): Likewise.
2394 * src/state.c (state_rule_look_ahead_tokens_print): Likewise.
2395 * src/system.h: Include unlocked-io.h rathe than stdio.h.
2397 * data/glr.c (yyuserMerge, yyreportAmbiguity, yyreportSyntaxError):
2398 Use assignments rather than casts-to-void to suppress
2399 unused-variable warnings. This pacifies 'lint'.
2400 * data/lalr1.cc (yysymprint_, yydestruct_): Use a call to suppress
2401 unused-variable warnings.
2403 2005-10-03 Juan Manuel Guerrero <juan.guerrero@gmx.de>
2405 * Makefile.am: DJGPP specific files added to EXTRA_DIST.
2407 2005-10-02 Paul Eggert <eggert@cs.ucla.edu>
2409 Use unlocked I/O for a minor performance improvement on hosts like
2410 GNU/Linux and Solaris that support unlocked I/O. The basic idea
2411 is to use the gnlib unlocked-io module, and to prefer putc and
2412 puts to printf when either will work (since the latter doesn't
2413 come in an unlocked flavor).
2414 * bootstrap (gnulib_modules): Add unlocked-io.
2415 * data/c.m4 (yysymprint): Prefer puts and putc to printf.
2416 * data/glr.c (YYFPUTC, YYFPUTS, YYDPUTS): New macros.
2417 Prefer them to YYFPRINTF and YYDPRINTF if either will do,
2418 and similarly for puts and putc and printf.
2419 * data/yacc.c: Likewise.
2420 * lib/bitset.c (bitset_print): Likewise.
2421 * lib/bitset.h [USE_UNLOCKED_IO]: Include unlocked-io.h.
2422 * lib/bitsetv.c (bitsetv_dump, debug-bitsetv): Prefer putc and puts
2424 * lib/lbitset.c (debug_lbitset): Likewise.
2425 * src/closure.c (print_firsts, print_fderives): Likewise.
2426 * src/gram.c (grammar_dump): Likewise.
2427 * src/lalr.c (look_ahead_tokens_print): Likewise.
2428 * src/output.c (escaped_output): Likewise.
2429 (user_actions_output): Coalesce two printfs.
2430 * src/parse-gram.y (%printer): Prefer putc and puts to printf.
2431 * src/reduce.c (reduce_print): Likewise.
2432 * src/state.c (state_rule_look_ahead_tokens_print): Likewise.
2433 * src/system.h: Include unlocked-io.h rather than stdio.h.
2435 * data/lalr1.cc: Don't put an unmatched ' in a dnl comment, as
2436 this confuses xgettext.
2438 2005-10-02 Akim Demaille <akim@epita.fr>
2440 * bootstrap (gnulib_modules): Add strverscmp.
2441 * lib/.cvsignore: Add strverscmp.c, strverscmp.h.
2442 * m4/.cvsignore: Add strverscmp.m4.
2443 * src/parse-gram.y (%require): New token, new rule.
2444 (version_check): New.
2445 * src/scan-gram.l (%require): Adjust.
2446 * tests/input.at (AT_REQUIRE): New.
2448 * doc/bison.texinfo (Require Decl): New.
2449 (Calc++ Parser): Use %require.
2451 2005-10-02 Akim Demaille <akim@epita.fr>
2453 * data/location.cc: New.
2455 2005-10-02 Paul Eggert <eggert@cs.ucla.edu>,
2456 Akim Demaille <akim@epita.fr>
2458 Make sure -odir/foo.cc creates dir/location.hh etc.
2459 * src/files.h (spec_outfile, parser_file_name, spec_name_prefix)
2460 (spec_file_prefix, spec_verbose_file, spec_graph_file)
2461 (spec_defines_file): Now const.
2463 (short_base_name): Remove.
2464 * src/files.c: Adjust.
2465 (dirname.h): Include.
2466 (base_name): Don't prototype it.
2467 (finput): Remove, duplicates gram_in.
2468 (full_base_name, short_base_name): Replace by...
2469 (all_but_ext, all_but_tab_ext): these.
2470 (compute_base_names): Rename as...
2471 (compute_file_name_parts): this.
2472 Update to compute the new variables, including dir_prefix.
2473 Adjust dependencies.
2474 * src/output.c (prepare): Output them.
2475 * src/reader.c: Adjust to use gram_in, not finput.
2476 * src/scan-skel.l (@dir_prefix@): New.
2478 2005-10-02 Juan Manuel Guerrero <juan.guerrero@gmx.de>
2480 * lib/subpipe.c: New function end_of_output_subpipe() added
2481 to allow support for non-posix systems. This is a no-op function
2484 * lib/subpipe.h: New function end_of_output_subpipe() added
2485 to allow support for non-posix systems. This is a no-op function
2488 * src/output.c (output_skeleton): Use end_of_output_subpipe() to
2489 handle the lack of pipe/fork functionality on non-posix systems.
2491 * djgpp/Makefile.maint: DJGPP specific file.
2493 * djgpp/README.in: DJGPP specific file.
2495 * djgpp/config.bat: DJGPP specific configuration file.
2497 * djgpp/config.sed: DJGPP specific configuration file.
2499 * djgpp/config.site: DJGPP specific configuration file.
2501 * djgpp/config_h.sed: DJGPP specific configuration file.
2503 * djgpp/subpipe.c: DJGPP specific replacement file for lib/subpipe.c.
2505 * djgpp/subpipe.h: DJGPP specific replacement file for lib/subpipe.h.
2507 2005-10-02 Akim Demaille <akim@epita.fr>
2509 * data/location.cc: New, extract from...
2510 * data/lalr1.cc: here.
2511 (location.hh): Include it after the user prologue, in case the
2512 filename type is defined by the user.
2513 Forward declation location and position before the pre-prologue.
2514 (yyresult_): Rename as...
2515 (yyresult): this, it's a local variable, not an attribute.
2516 * data/Makefile.am (dist_pkgdata_DATA): Adjust.
2518 2005-10-01 Akim Demaille <akim@epita.fr>
2520 * examples/extexi: Restore the #line generation.
2522 2005-09-30 Akim Demaille <akim@epita.fr>,
2523 Alexandre Duret-Lutz <adl@gnu.org>
2525 Move the token type and YYSTYPE in the parser class.
2526 * data/lalr1.cc (stack.hh, location.hh): Include earlier.
2527 (parser::token): New, from the moved free definition of tokens.
2528 (parser::semantic_value): Now a full definition instead of an
2529 indirection to YYSTYPE.
2530 (b4_post_prologue): No longer included in the header file, but
2531 in the implementation file.
2532 * doc/bison.texi (C+ Language Interface): Update.
2533 * src/parse-gram.y: Support unary %define.
2534 * tests/actions.at: Define global_tokens_and_yystype for backward
2535 compatibility until we update the tests.
2536 * tests/calc.at: Idem.
2537 (first_line, first_column, last_line, last_column): Define for lalr1.cc
2538 to simplify the code.
2540 2005-09-29 Paul Eggert <eggert@cs.ucla.edu>
2542 Port to SunOS 4.1.4, which lacks strtoul and strerror.
2543 Ah, the good old days! Problem reported by Peter Klein.
2544 * bootstrap (gnulib_modules): Add strerror, strtoul.
2545 * lib/.cvsignore: Add strerror.c, strtol.c, strtoul.c
2546 * m4/.cvsignore: Add strerror.m4, strtol.m4, strtoul.m4.
2548 2005-09-29 Akim Demaille <akim@epita.fr>
2550 * data/c.m4 (b4_error_verbose_if): New.
2551 * data/lalr1.cc: Use it.
2552 (YYERROR_VERBOSE_IF): Remove.
2553 (yyn_, yylen_, yystate_, yynerrs_, yyerrstatus_): Remove as
2554 parser members, replaced by...
2555 (yyn, yylen, yystate, yynerss, yyerrstatus): these parser::parse
2557 (yysyntax_error_): Takes the state number as argument.
2558 (yyreduce_print_): Use the argument yyrule, not the former
2561 2005-09-26 Paul Eggert <eggert@cs.ucla.edu>
2563 * bootstrap (gnulib_modules): Add verify.
2564 * lib/.cvsignore: Add verify.h.
2565 * src/getargs.c: Use ARGMATCH_VERIFY rather than verify.
2566 * src/system.h (verify): Remove.
2567 Include verify.h instead.
2568 * src/tables.c (tables_generate): Use new API for 'verify'.
2570 2005-09-21 Paul Eggert <eggert@cs.ucla.edu>
2572 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Do not use
2573 local variables whose names begin with 'yy'.
2574 * tests/calc.at (_AT_DATA_CALC_Y): Likewise.
2575 Trivial changes from Joel E. Denny.
2577 * bootstrap (gnulib_modules): Remove alloca. Bison doesn't need
2579 * src/main.c (main) [C_ALLOCA]: Don't flush alloca'ed memory; we
2580 don't use alloca any more.
2582 * data/yacc.c [YYSTACK_USE_ALLOCA && !defined __GNUC__ && ! defined
2583 __BUILTIN_VA_ARG_INCR && ! defined _AIX && ! defined _MSC_VER &&
2584 defined _ALLOCA_H]: Don't include <stdlib.h>; not needed in this case.
2585 * tests/torture.at (Exploding the Stack Size with Alloca): Adjust
2586 to match yacc.c, to test more hosts.
2588 2005-09-20 Paul Eggert <eggert@cs.ucla.edu>
2590 * data/yacc.c (YYSIZE_T): Reindent to make it clearer. This
2591 doesn't affect behavior.
2592 (YYSTACK_ALLOC) [YYSTACK_USE_ALLOCA]: Improve support for
2594 (_STDLIB_H): Renamed from YYINCLUDED_STDLIB_H. All uses changed.
2595 This works a bit better with glibc, if user code has already included
2597 * doc/bison.texinfo (Bison Parser): Document that users can't
2598 arbitrarily use malloc and free for other purposes. Document
2599 that <alloca.h> and <malloc.h> might be included.
2600 (Table of Symbols): Under YYSTACK_USE_ALLOCA, Don't claim that the
2601 user must declare alloca.
2603 * HACKING (release): Forwarn the Translation Project about
2606 2005-09-20 Akim Demaille <akim@epita.fr>
2608 * data/glr.c: Use b4_token_enums, not b4_token_enums_defines.
2610 2005-09-19 Paul Eggert <eggert@cs.ucla.edu>
2612 * data/yacc.c (YYSIZE_MAXIMUM): New macro.
2613 (YYSTACK_ALLOC_MAXIMUM): Use it.
2614 (yysyntax_error): New function.
2615 (yyparse) [YYERROR_VERBOSE]: Don't leak memory indefinitely if
2616 multiple syntax errors are reported, and alloca is being used.
2617 Instead, reallocate buffers twice as big each time, so that
2618 we waste at most half the allocated memory. Start with a small
2619 (128-byte) buffer that will suffice in most cases anyway.
2620 Use yysyntax_error to do most of the work.
2622 * doc/bison.texinfo (Error Reporting, Table of Symbols):
2623 yynerrs is the number of errors reported, not the number of
2626 * tests/glr-regression.at (Duplicated user destructor for lookahead):
2627 Mark it as expected to fail.
2628 Cast result of malloc; problem reported by twlevo@xs4all.nl.
2629 * tests/actions.at, tests/calc.at, tests/glr-regression.at:
2630 Don't start user-code symbols with "yy", to avoid name space problems.
2632 2005-09-19 Akim Demaille <akim@epita.fr>
2634 Remove the traits, failed experiment.
2635 It never proved useful, and anyway because of the current
2636 definition, it was not possible to have several specialization of
2637 this traits, making it useless.
2638 * data/lalr1.cc (yy:traits): Remove.
2639 Inline its definitions in the parser class.
2641 2005-09-19 Akim Demaille <akim@epita.fr>
2643 * tests/atlocal.in (LIBS): Pass INTLLIBS to address failures on at
2644 least Mac OSX with a /usr/local install of gettext.
2646 2005-09-19 Akim Demaille <akim@epita.fr>
2648 * data/lalr1.cc (yyparse): Rename yylooka and yyilooka as yychar
2649 and yytoken for similarity with the other skeletons.
2651 2005-09-19 Akim Demaille <akim@epita.fr>
2653 * NEWS, configure.ac: update version number to 2.1a.
2655 2005-09-16 Paul Eggert <eggert@cs.ucla.edu>
2657 * NEWS: Version 2.1.
2659 * NEWS: Remove notice of yytname change, since it was never in an
2661 * data/glr.c (yydestroyGLRState): Rename local var to avoid shadowing
2663 * src/output.c (prepare): Likewise.
2664 * data/lalr1.cc (YYERROR_VERBOSE_IF): New macro.
2665 (yysyntax_error_): Use it to avoid GCC warning when YYERROR_VERBOSE
2666 is not defined. This is an awful hack, but it's enough for now.
2667 All callers changed.
2668 * tests/glr-regression-at (make_value): Args are const pointers now,
2669 to avoid GCC warning.
2670 (Duplicated user destructor for lookahead): New test. Currently
2671 skipped. It fails on my host but I'm not sure it'll always fail.
2673 2005-09-16 Akim Demaille <akim@epita.fr>
2675 * src/symtab.h (struct symbol): Declare the printer and destructor
2676 as const, to avoid accidental calls to free.
2677 (symbol_destructor_set, symbol_printer_set): Adjust.
2678 * src/symtab.c: Adjust.
2680 2005-09-16 Akim Demaille <akim@epita.fr>
2682 * data/c.m4 (b4_token_enums): New.
2683 (b4_token_defines): Rename as...
2684 (b4_token_enums_defines): this.
2685 (b4_token_defines): New, output only the #defines.
2686 * data/yacc.c, data/glr.c: Adjust.
2687 * data/lalr1.cc: Use b4_token_enums instead of b4_token_enums_defines.
2688 * data/c.m4 (b4_yydestruct_generate, b4_yysymprint_generate): Define
2691 2005-09-16 Akim Demaille <akim@epita.fr>
2693 * data/lalr1.cc (yylex_): Remove, inline its code.
2694 (yyreport_syntax_error_): Remove, replaced by...
2695 (yysyntax_error_): this which returns a string and leaves to the
2696 caller the call to the users' error function.
2697 (yylooka_, yyilooka_, yylval, yylloc, yyerror_range_, yyval, yyloc):
2698 Move from members of the parser object...
2699 (yylooka, yyilooka, yylval, yylloc, yyerror_range, yyval, yyloc):
2700 to local variables of the parse function.
2702 2005-09-16 Akim Demaille <akim@epita.fr>
2704 * doc/bison.texinfo (Calc++ Parser): Don't promote defining YYEOF
2705 since it's in Bison's name space.
2707 2005-09-15 Paul Eggert <eggert@cs.ucla.edu>
2709 * data/glr.c (yyresolveValue): Add default case to pacify
2710 gcc -Wswitch-default. Problem reported by twlevo@xs4all.nl.
2712 * NEWS: Document when yyparse started to return 2.
2713 * doc/bison.texinfo (Parser Function): Document when yyparse
2716 * data/lalr1.cc: Revert part of previous change, as it's incompatible.
2717 (b4_filename_type): Renamed back from b4_file_name_type. All uses
2719 (class position): file_name -> filename (reverting). All uses changed.
2721 2005-09-14 Paul Eggert <eggert@cs.ucla.edu>
2723 * examples/calc++/Makefile.am ($(calc_sources_generated)): Don't
2724 do anything if $@ exists. This reverts part of the 2005-07-07
2727 2005-09-11 Paul Eggert <eggert@cs.ucla.edu>
2729 * Makefile.am (EXTRA_DIST): Do not distribute REFERENCES; it
2730 contains obsolete information and isn't worth distributing as a
2731 separate file anyway.
2732 * data/glr.c [defined YYSETJMP]: Don't include <setjmp.h>.
2733 (YYJMP_BUF, YYSETJMP, YYLONGJMP) [!defined YYSETJMP]: New macros.
2734 All uses of jmp_buf, setjmp, longjmp changed to use these instead.
2735 (yyparse): Abort if user code uses longjmp to throw an unexpected
2738 2005-09-09 Paul Eggert <eggert@cs.ucla.edu>
2740 * data/c.m4 (b4_identification): Define YYBISON_VERSION.
2741 Suggested by twlevo@xs4all.nl.
2743 * data/glr.c (YYCHK1): Do not assume YYE is in range.
2744 This avoids a diagnostic from gcc -Wswitch-enum.
2745 Problem reported by twlevo@xs4all.nl.
2747 * doc/bison.texinfo: Don't use "filename", as per GNU coding
2748 standards. Use "file name" or "file" or "name", depending on
2750 (Invocation): The output of "bison hack/foo.y" goes to foo.tab.c,
2751 not to hack/foo.tab.c.
2752 (Calc++ Top Level): 2nd arg of main is not const.
2753 * data/glr.c: b4_filename -> b4_file_name.
2754 * data/lalr1.cc: Likewise. Also, b4_filename_type -> b4_file_name_type.
2756 (class position): filename -> file_name. All uses changed.
2757 * data/yacc.c: b4_filename -> b4_file_name.
2758 * lib/bitset.h: filename -> file_name in local vars.
2759 * lib/bitset_stats.c: Likewise.
2760 * src/files.c: Likewise.
2761 * src/scan-skel.l ("@output ".*\n): Likewise.
2762 * src/files.c (file_name_split): Renamed from filename_split.
2763 * src/muscle_tab.c (muscle_init): Output b4_file_name, not b4_filename.
2765 2005-09-08 Paul Eggert <eggert@cs.ucla.edu>
2767 * lib/.cvsignore: Add pipe-safer.c, stdio--.h, unistd--.h,
2768 to accommodate latest gnulib.
2770 * tests/glr-regression.at (Duplicate representation of merged trees):
2771 Add casts to pacify g++. Problem reported by twlevo@xs4all.nl.
2773 * bootstrap: Add comment as to why the AM_LANGINFO_CODESET hack is
2776 2005-08-26 Paul Eggert <eggert@cs.ucla.edu>
2778 * data/glr.c (yydestroyGLRState): Renamed from yydestroyStackItem.
2779 All uses changed. Invoke user destructor after an error during a
2780 split parse (trivial change from Joel E. Denny).
2782 * tests/glr-regression.at
2783 (User destructor after an error during a split parse): New test case.
2784 Problem reported by Joel E. Denny in:
2785 http://lists.gnu.org/archive/html/bison-patches/2005-08/msg00029.html
2787 2005-08-25 Paul Eggert <eggert@cs.ucla.edu>
2789 * README-cvs: Give URLs for recommended tools.
2790 Mention Gzip version problem, and bootstrapping issues.
2791 Remove troubleshooting section, as it's somewhat obsolete.
2793 * bootstrap (no_cache): New var, to accommodate different wget
2794 variants. Use it instead of '-C off'. Problem reported by
2797 * data/glr.c (yydestroyStackItem): New function.
2798 (yyrecoverSyntaxError, yyreturn): Use it to improve quality of
2799 debugging information. Problem reported by Joel E. Denny.
2801 2005-08-25 Akim Demaille <akim@epita.fr>
2803 * tests/local.at (AT_COMPILE_CXX): Pass $LINKS too.
2805 2005-08-24 Paul Eggert <eggert@cs.ucla.edu>
2807 * data/glr.c (yyrecoverSyntaxError, yyreturn):
2808 Don't invoke destructor on unresolved entries.
2809 * tests/glr-regression.at
2810 (User destructor for unresolved GLR semantic value): New test case.
2811 Problem reported by Joel E. Denny in:
2812 http://lists.gnu.org/archive/html/bison-patches/2005-08/msg00016.html
2814 2005-08-21 Paul Eggert <eggert@cs.ucla.edu>
2816 * lib/.cvsignore: Remove realloc.c, strncasecmp.c, xstrdup.c.
2818 * m4/.cvsignore: Remove codeset.m4, gettext.m4, lib-ld.m4,
2819 lib-prefix.m4, po.m4.
2821 * data/glr.c (yyreturn): Use "Cleanup:" rather than "Error:"
2822 in yydestruct diagnostic, since it might not be an error.
2823 Problem reported by Joel Denny near end of
2824 <http://lists.gnu.org/archive/html/help-bison/2005-07/msg00040.html>.
2825 * data/lalr1.cc (yyerturn): Likewise.
2826 * data/yacc.c (yyreturn): Likewise.
2827 * tests/calc.at (_AT_CHECK_CALC_ERROR): Adjust to the above change.
2829 * src/files.c: Remove obsolete FIXME comment.
2831 * data/glr.c (YY_SYMBOL_PRINT): Append a newline, for consistency
2832 with the other templates, and to fix bogus run-on messages such
2833 as the one reported at the end of
2834 <http://lists.gnu.org/archive/html/help-bison/2005-07/msg00040.html>.
2835 All callers changed to avoid the newline.
2836 (yyprocessOneStack): Output two lines rather than one, to accommodate
2837 the above change. This changes the debug output format slightly.
2839 * data/glr.c (yyresolveValue): Fix redundant parse tree problem
2840 reported by Joel E. Denny in
2841 <http://lists.gnu.org/archive/html/bison-patches/2005-08/msg00004.html>
2843 * tests/glr-regression.at (Duplicate representation of merged trees):
2844 New test, from Joel E. Denny in:
2845 <http://lists.gnu.org/archive/html/help-bison/2005-07/msg00013.html>.
2846 * THANKS: Add Joel E. Denny.
2848 * configure.ac (AC_INIT): Bump to 2.0c.
2850 2005-07-24 Paul Eggert <eggert@cs.ucla.edu>
2852 * NEWS: Version 2.0b.
2854 * Makefile.am (SUBDIRS): Put examples before tests, so that
2855 "make check" doesn't finish with "All 1 tests passed".
2857 * tests/regression.at (Token definitions): Don't rely on
2858 AT_PARSER_CHECK for data that contains backslashes. It currently
2859 uses 'echo', and 'echo' isn't portable if its argument contains
2860 backslashes. Problem found on OpenBSD 3.4. Also, do not assume
2861 that the byte '\0xff' is not printable in the C locale; it is,
2862 under OpenBSD 3.4 (!). Luckily, '\0x80' through '\0x9e' are
2863 not printable, so use '\0x81' to test.
2865 * data/glr.c (YYOPTIONAL_LOC): Define even if it's not a recent
2866 version of GCC, since the macro is used with non-GCC compilers.
2868 Fix core dump reported by Pablo De Napoli in
2869 <http://lists.gnu.org/archive/html/bug-bison/2005-07/msg00053.html>.
2870 * tests/regression.at (Invalid inputs with {}): New test.
2871 * src/parse-gram.y (token_name): Translate type before using
2874 * data/glr.c (ATTRIBUTE_UNUSED): Remove, since it infringes on
2875 the user's name space. All uses changed to __attribute__
2877 (yyFail, yyMemoryExhausted, yyreportAmbiguity):
2878 Add __attribute__ ((__noreturn__)).
2880 * etc/clcommit: Remove. We weren't using it, and it failed
2881 "make maintainer-distcheck".
2882 * Makefile.maint: Merge from coreutils.
2883 (CVS_LIST, CVS_LIST_EXCEPT): New macros.
2884 (syntax-check-rules): Change list of rules as described below.
2885 (sc_cast_of_alloca_return_value, sc_dd_max_sym_length):
2886 (sc_file_system, sc_obsolete_symbols, sc_prohibit_atoi_atof):
2887 (sc_prohibit_jm_in_m4, sc_root_tests, sc_tight_scope):
2888 (sc_trailing_space): New rules.
2889 (sc_xalloc_h_in_src): Remove.
2890 (sc_cast_of_argument_to_free, sc_cast_of_x_alloc_return_value):
2891 (sc_space_tab, sc_error_exit_success, sc_changelog):
2892 (sc_system_h_headers, sc_sun_os_names, sc_unmarked_diagnostics):
2893 (makefile-check, po-check, author_mark_check):
2894 (makefile_path_separator_check, copyright-check):
2895 Use grep -n, to make it easier to find violations.
2896 Use CVS_LIST and CVS_LIST_EXCEPT.
2897 (header_regexp, h_re): Remove.
2899 (sc_dd_max_sym_length, .re-list, news-date-check): New rules.
2900 (my-distcheck): Use more-modern GCC flags.
2901 (signatures, %.asc): Remove.
2902 (rel-files, announcement): Remove signatures.
2903 Restore old updating code, even though we don't use it, so
2904 that we're the same as coreutils.
2905 (alpha, beta, major): Depend on news-date-check.
2906 Make the upload commands.
2908 * data/c.m4, data/lalr1.cc, data/yacc.c: Normalize white space.
2909 * lib/abitset.h, lib/bbitset.h, lib/bitset.h: Likewise.
2910 * lib/bitset_stats.c, lib/ebitset.h, lib/lbitset.c: Likewise.
2911 * lib/libitset.h, lib/timevar.c, lib/vbitset.h: Likewise.
2912 * src/Makefile.am, src/gram.c, src/muscle_tab.h: Likewise.
2913 * src/parse-gram.y, src/system.h, src/tables.c, src/vcg.c: Likewise.
2914 * src/vcg_defaults.h, tests/cxx-type.at, tests/existing.at: Likewise.
2915 * tests/sets.at: Likewise.
2917 * data/m4sugar/m4sugar.m4: Sync from Autoconf, except that
2918 we comment out the Autoconf version number.
2919 * doc/bison.texinfo (Calc++ Scanner): Don't use atoi, as
2920 it's error-prone and "make maintainer-distcheck" rejects it.
2922 * lib/subpipe.c: Include <fcntl.h> without checking for HAVE_FCNTL_H.
2923 Indent calls to "error" to pacify "make maintainer-distcheck",
2924 when the calls are not intended to be translated.
2925 * m4/subpipe.m4 (BISON_PREREQ_SUBPIPE): Don't check for fcntl.h.
2927 * src/Makefile.am (DEFS): Use +=, to pacify
2928 "make maintainer-distcheck".
2929 (bison_SOURCES): Add scan-skel.h.
2930 (sc_tight_scope): New rule, from coreutils.
2932 * src/files.c (src_extension, header_extension):
2933 Now static, not extern.
2934 * src/getargs.c (short_options): Likewise.
2935 * src/muscle_tab.c (muscle_table): Likewise.
2936 * src/parse-gram.y (current_class, current_type, current_prec):
2938 * src/reader.c (grammar_end, previous_rule_end): Likewise.
2939 * src/getargs.h: Redo comments to pacify "make maintainer-distcheck".
2940 * src/main.c (main): Cast bindtextdomain and textdomain calls to
2941 void, to avoid warning when NLS is disabled.
2942 * src/output.c: Include scan-skel.h.
2943 (scan_skel): Remove decl, since scan-skel.h does this.
2945 Indent calls to "error" to pacify "make maintainer-distcheck".
2946 * src/print_graph.c: Don't include <obstack.h>, as system.h does this.
2947 * src/reader.h (gram_end, gram_lineno): New decls to pacify
2948 "make maintainer-distcheck".
2949 * src/scan-skel.l (skel_lex, skel_get_lineno, skel_get_in):
2950 (skel_get_out, skel_get_leng, skel_get_text, skel_set_lineno):
2951 (skel_set_in, skel_set_out, skel_get_debug, skel_set_debug):
2952 (skel_lex_destroy, scan_skel): Move these decls to...
2953 * src/scan-skel.h: New file.
2954 * src/uniqstr.c (uniqstr_assert):
2955 Indent calls to "error" to pacify "make maintainer-distcheck".
2957 * tests/Makefile.am ($(srcdir)/package.m4): Use $(VAR),
2960 * tests/torture.at: Revamp to avoid misuse of atoi that
2961 "make maintainer-distcheck" complained about.
2963 * examples/extexi (message): Don't print a message more than once,
2964 and omit line-number decoration that makes Emacs compile think
2965 that informative messages are worth worrying about.
2967 2005-07-22 Paul Eggert <eggert@cs.ucla.edu>
2969 * configure.ac: Update version number.
2971 * Makefile.am (SUBDIRS): Add examples; somehow this got removed
2973 * examples/calc++/calc++-parser.yy: Remove from CVS, as it's
2974 autogenerated by the maintainer.
2975 * examples/calc++/.cvsignore: Add *.yy.
2977 * lib/bitset.c (bitset_alloc): Don't cast xcalloc result.
2978 * lib/bitset_stats.c (bitset_stats_init): Likewise.
2979 * lib/bitsetv.c (bitsetv_alloc): Likewise.
2981 * po/POTFILES.in: Add lib/xalloc-die.c; remove lib/xmalloc.c.
2983 * src/relation.c (relation_transpose): Rewrite to avoid bogus complaint
2984 from maintainer-distcheck about casting the argument of 'free'.
2986 * NEWS: Mention recent yytname changes.
2987 * THANKS: Add Anthony Heading, twlevo@xs4all.nl.
2989 * bootstrap: For translations that have not yet been upgraded to
2990 the new runtime-po domain, prime the pump by extracting the
2991 relevant strings from the obsolete translations. This code can be
2992 removed once the bison-runtime domain has been translated by each
2995 * src/scan-gram.l (<SC_PRE_CODE>.): Don't double-quote token names,
2996 now that token names are already quoted.
2998 Fix problem reported by Anthony Heading.
2999 * data/glr.c (YYTOKEN_TABLE): New macro.
3000 (yytname): Define if YYTOKEN_TABLE.
3001 * data/yacc.c (YYTOKEN_TABLE, yytname): Likewise.
3002 * data/lalr1.cc (YYTOKEN_TABLE, yytname_): Likewise.
3003 (YYERROR_VERBOSE): Define the same way the other skeletons do.
3004 * src/output.c (prepare_symbols): Output token_table_flag.
3006 2005-07-21 Paul Eggert <eggert@cs.ucla.edu>
3008 * data/glr.c (yyinitGLRStack, yyreturn): Don't call malloc
3009 again if the first call fails.
3011 * data/glr.c (yytnamerr): New function.
3012 (yyreportSyntaxError): Use it to dequote most string literals.
3013 * data/lalr1.c (yytname_): Renamed from yyname_, for compatibility
3014 with other skeletons. All uses changed.
3015 (yytnameerr_): New function.
3016 (yyreport_syntax_error): Use it to dequote most string literals.
3017 * data/yacc.c (yytnamerr): New function.
3018 (yyerrlab): Use it to decode most string literals.
3019 * doc/bison.texinfo (Decl Summary, Calling Convention):
3020 Clarify quoting convention of yytname.
3021 * src/output.c (prepare_symbols): Quote all names. This undoes
3022 the 2005-04-17 change, which is now accomplished (mostly) via
3023 changes in the parsers as described above.
3024 * tests/regression.at (Token definitions, Web2c Actions):
3025 Undo most 2005-04-17 change here, too.
3027 2005-07-20 Paul Eggert <eggert@cs.ucla.edu>
3029 Fix more problems reported by twlevo@xs4all.nl.
3030 * tests/cxx-type.at: Don't pipe output of ./types through sed to
3031 remove trailing spaces. This loses the exit status of ./types,
3032 and isn't needed since ./types shouldn't be emitting trailing
3034 * data/glr.c (yyreturn): Don't pop stack if yyinitStateSet failed,
3035 as the stack isn't valid in that case.
3037 * src/scan-gram.l (gram_get_lineno, gram_get_in, gram_get_out):
3038 (gram_get_leng, gram_get_text, gram_set_lineno, gram_set_in):
3039 (gram_set_out, gram_get_debug, gram_set_debug, gram_lex_destroy):
3040 Add declarations to pacify "gcc -Wmissing-prototypes" when flex 2.5.31
3042 * src/scan-skel.l (skel_get_lineno, skel_get_in, skel_get_out):
3043 (skel_get_leng, skel_get_text, skel_set_lineno, skel_set_in):
3044 (skel_set_out, skel_get_debug, skel_set_debug, skel_lex_destroy):
3047 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Work even with
3048 overly-picky compilers that reject 'char *foo = "bar";'.
3050 * src/symtab.c (SYMBOL_ATTR_PRINT, symbol_print): Direct output
3051 to FILE * parameter, not to stderr. This fixes a typo introduced
3052 in the 2005-07-12 change.
3054 * lib/subpipe.c (create_subpipe): Rewrite slightly to avoid
3055 warnings from GCC 4.
3057 * data/glr.c (yyexpandGLRStack, yyaddDeferredAction, yyexpandGLRStack):
3058 (yyglrShiftDefer, yysplitStack):
3059 Remove unused parameters b4_pure_formals. All uses changed.
3060 (yyglrShift): Remove unused parameters b4_user_formals.
3062 (yyglrReduce): Removed unused parameter yylocp. All uses changed.
3064 2005-07-18 Paul Eggert <eggert@cs.ucla.edu>
3066 Destructor cleanups and regularization among the three skeletons.
3067 * NEWS: Document the behavior changes.
3068 * data/glr.c (yyrecoverSyntaxError): Don't bother to pop the
3069 stack before failing, as the cleanup code will do it for us now.
3070 * data/lalr1.cc (yyerrlab): Likewise.
3071 * data/glr.c (yyparse): Pop everything off the stack before
3072 freeing it, so that destructors get called properly.
3073 * data/lalr1.cc (yyreturn): Likewise.
3074 * data/yacc.c (yyreturn): Pop and destroy the start symbol, too.
3075 This is more consistent.
3076 * doc/bison.texinfo (Destructor Decl): Mention more reasons
3077 why destructors might be called. 1.875 -> 2.1.
3078 (Destructor Decl, Decl Summary, Table of Symbols):
3079 Some English-language cleanups for %destructor.
3080 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
3081 Add output line for destructor of start symbol.
3082 * tests/calc.at (AT_CHECK_CALC): Add one to line counts,
3083 because of that same extra output line.
3085 * NEWS: Document minor wording changes in diagnostics of
3086 Bison-generated parsers.
3087 * data/glr.c (yyMemoryExhausted): Renamed from yyStackOverflow.
3088 Remove unused formals. All uses changed.
3089 (yyreportAmbiguity): "ambiguity detected" -> "syntax is ambiguous".
3090 (yyparse): Rename yyoverflowlab to yyexhaustedlab.
3091 * data/yacc.c (yyparse): "parser stack overflow" -> "memory exhausted".
3092 Rename yyoverflowab to yyexhaustedlab.
3093 When memory exhaustion occurs during syntax-error reporting,
3094 report it separately rather than in a single diagnostic; this
3096 * doc/bison.texinfo (Memory Management): Renamed from Stack Overflow.
3097 (Memory Exhausted): Renamed from Parser Stack Overflow.
3098 Revamp wording slightly to prefer "memory exhaustion".
3099 * tests/actions.at: "parser stack overflow" -> "memory exhausted".
3101 * data/c.m4 (b4_yysymprint_generate): Use YYFPRINTF, not fprintf.
3103 Add i18n support to the GLR skeleton. Partially fix the C++
3104 skeleton; a C++ expert needs to finish this. Remove debugging
3105 msgids; there's little point to having them translated, since they
3106 can be understood only by someone who can read the
3107 (English-language) source code.
3109 Generate runtime-po/bison-runtime.pot automatically, so that we
3110 don't have to worry about garbage getting in that file. We'll
3111 make sure after the next official release that old msgids don't
3113 <http://lists.gnu.org/archive/html/bison-patches/2005-07/msg00119.html>.
3115 * runtime-po/Makefile.in.in, runtime-po/bison-runtime.pot: Remove.
3117 * PACKAGING: Don't claim that Gawk, GCC, Perl use this method yet.
3118 Fix typos in explanations of the runtime file.
3119 * bootstrap: Change gettext keyword from YYI18N to YY_.
3120 Use standard Makefile.in.in in runtime-po, since we'll arrange
3121 for backward-compatible bison-runtime.po files in a different way.
3122 * data/glr.c (YY_): New macro, from yacc.c.
3123 (yyuserAction, yyreportAmbiguity, yyreportSyntaxError, yyparse):
3124 Translate messages intended for users.
3125 (yyreportSyntaxError): Change "virtual memory" to "memory" to match
3126 the wording in the other skeletons. We don't know that the memory
3128 * data/lalr1.cc (YY_): Renamed from _. All uses changed.
3129 Use same method that yacc.c uses.
3130 Don't translate debugging messages.
3131 (yy::yyreport_syntax_error): Put in a FIXME for the i18n stuff;
3132 it doesn't work (yet), and requires C++ expertise to fix.
3133 * data/yacc.c (YY_): Renamed from YY18N. All uses changed.
3134 Move defn to a more logical place, to be consistent with other
3136 Don't translate debugging messages.
3137 Don't assume line numbers fit in unsigned int; use unsigned long fmts.
3138 * doc/bison.texinfo: Mention <libintl.h>. Change glibc cross reference
3139 to gettext cross reference. Add indexing terms. Mention YYENABLE_NLS.
3140 * runtime-po/POTFILES.in: Add data/glr.c, data/lalr1.cc.
3142 Fix yyerror / yylex test glitches noted by twlevo@xs4all.nl.
3143 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Have yyerror return
3145 * tests/glr-regression.at (Badly Collapsed GLR States):
3147 (Improper handling of embedded actions and dollar(-N) in GLR parsers):
3148 yylex should return 0 at EOF rather than aborting.
3150 Improve tests for stack overflow in GLR parser.
3151 Problem reported by twlevo@xs4all.nl.
3152 * data/glr.c (struct yyGLRStack): Remove yyerrflag member.
3154 (yyStackOverflow): Just longjmp, but with value 2 so that caller
3155 can handle the problem.
3156 (YYCHK1): Use goto (a la yacc.c) rather than setting a flag.
3157 (yyparse): New local variable yyresult to record the result.
3158 Use result of setjmp to set it, rather than storing itinto
3160 (yyDone): Remove label.
3161 (yyacceptlab, yyabortlab, yyoverflowlab, yyreturn): New labels,
3162 to mimic yacc.c. Do not discard lookahead if it's EOF (possible
3163 if YYABORT is used).
3164 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Exit with
3165 yyparse status; put status > 1 into diagnostic.
3166 Check that status==2 works.
3167 * tests/calc.at, tests/cxx-type.at, tests/glr-regression.at:
3168 Use exit status 3 for failure to open (which shouldn't happen).
3170 2005-07-17 Paul Eggert <eggert@cs.ucla.edu>
3172 * tests/conflicts.at (%nonassoc and eof): Don't exit with status
3173 1 on syntax error; just let yyparse do its thing.
3174 * tests/glr-regression.at (Badly Collapsed GLR States): Likewise.
3175 * tests/torture.at (AT_DATA_STACK_TORTURE): Likewise.
3176 (Exploding the Stack Size with Alloca):
3177 (Exploding the Stack Size with Malloc):
3178 Expect exit status 2, not 1, since the parser is supposed to blow
3179 its stack. Problem reported by twlevo@xs4all.nl.
3181 * data/glr.c (yyparse): Don't assume that the initial calls
3182 to YYMALLOC succeed; in that case, yyparse incorrectly returned 0.
3183 Print a stack-overflow message and fail instead.
3184 Initialize the line-number information before creating the stack,
3185 so that the stack-overflow message can report line zero safely.
3187 2005-07-14 Paul Eggert <eggert@cs.ucla.edu>
3189 Fix problems reported by twlevo@xs4all.nl.
3190 * data/glr.c (YYSTACKEXPANDABLE): Don't define if already defined.
3191 (yyuserMerge): Provide a default case if b4_mergers is empty.
3192 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Define YYSTACKEXPANDABLE.
3193 * tests/glr-regression.at
3194 (Improper handling of embedded actions and dollar(-N) in GLR parsers):
3195 Add casts to pacify C++ compilers.
3196 * tests/glr-regression.at (Improper merging of GLR delayed action
3197 sets): Declare yylex before using it.
3198 * tests/Makefile.am (maintainer-check-g++): Fix a stray
3199 $(GXX) that escaped the renaming of GXX to CXX. Remove bogus
3200 test for valgrind; valgrind is independent of g++.
3201 (maintainer-check-posix): Add _POSIX2_VERSION=200112, to check
3202 for compatibility with POSIX 1003.1-2001 (if running coreutils).
3203 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Port to stricter C++.
3204 Use a destructor, so that we can expand the stack. Change
3205 YYSTYPE to char * so that we can free it. Cast result of malloc.
3207 2005-07-13 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
3209 * data/glr.c (yyuserAction): Fix uninitialized variable that caused
3210 a valgrind failure. Problem reported by twlevo@xs4all.nl.
3212 2005-07-13 Paul Eggert <eggert@cs.ucla.edu>
3214 * PACKAGING: New file, suggested by Bruno Haible and taken from
3215 similar wording in gettext's PACKAGING file.
3216 * NEWS: Mention PACKAGING.
3217 * Makefile.am (EXTRA_DIST): Add PACKAGING.
3219 2005-07-12 Paul Eggert <eggert@cs.ucla.edu>
3221 * NEWS: Document recent i18n improvements.
3222 * bootstrap: Get runtime translations into runtime-po.
3223 Create runtime-po files automatically, if possible.
3224 * configure.ac: Invoke BISON_I18N, so that we eat our own dog food.
3225 * data/yacc.c: Rewrite inclusion of <libintl.h> so that ENABLE_NLS
3226 does not infringe on the user's name space.
3227 (YYENABLE_NLS): Renamed from ENABLE_BISON_NLS.
3228 * doc/bison.texinfo (Internationalization): Revamp the English
3229 and Texinfo syntax a bit, to try to make it clearer.
3230 (Bison Options, Option Cross Key): Mention --print-localedir.
3231 * m4/bison-i18n.m4 (BISON_I18N): Rename ENABLE_BISON_NLS to
3232 YYENABLE_NLS. Quote a bit more.
3233 * runtime-po/.cvsignore: New file.
3234 * runtime-po/Makefile.in.in (mostlyclean): Remove *.old.pot.
3235 * runtime-po/Rules-quot: Remove; now created by bootstrap.
3236 * runtime-po/quot.sed: Likewise.
3237 * runtime-po/boldquot.sed: Likewise.
3238 * runtime-po/en@quot.header: Likewise.
3239 * runtime-po/en@boldquot.header: Likewise.
3240 * runtime-po/insert-header.sin: Likewise.
3241 * runtime-po/remove-potcdate.sin: Likewise.
3242 * runtime-po/Makevars: Likewise.
3243 * runtime-po/LINGUAS: Likewise.
3244 * runtime-po/de.po: Likewise; we will rely on the translation project
3245 to maintain this, so "bootstrap" should get it.
3246 * src/getarg.c (PRINT_LOCALEDIR_OPTION): Let the C compiler determine
3248 * src/main.c (main): Bind the bison-runtime domain, too.
3250 2005-07-12 Bruno Haible <bruno@clisp.org>
3252 * data/yacc.c: Include <libintl.h> when NLS is enabled.
3253 (YYI18N): Renamed from _. Use dgettext when NLS is enabled.
3254 * po/POTFILES.in: Remove autogenerated file src/parse-gram.c.
3255 * runtime-po: New directory.
3256 * runtime-po/Makefile.in.in: New file, copied from po/, with modified
3257 $(DOMAIN).pot-update rule, so that old messages are never dropped.
3258 * runtime-po/Rules-quot: New file, copied from po/.
3259 * runtime-po/quot.sed: Likewise.
3260 * runtime-po/boldquot.sed: Likewise.
3261 * runtime-po/en@quot.header: Likewise.
3262 * runtime-po/en@boldquot.header: Likewise.
3263 * runtime-po/insert-header.sin: Likewise.
3264 * runtime-po/remove-potcdate.sin: Likewise.
3265 * runtime-po/Makevars: New file.
3266 * runtime-po/POTFILES.in: New file.
3267 * runtime-po/LINGUAS: New file.
3268 * runtime-po/bison-runtime.pot: New file.
3269 * runtime-po/de.po: New file.
3270 * m4/bison.m4: New file.
3271 * Makefile.am (SUBDIRS): Add runtime-po.
3272 (aclocaldir, aclocal_DATA): New variables.
3273 * configure.ac: Add AC_CONFIG_FILES of runtime-po/Makefile.in.
3275 * src/getargs.c (usage): Document --print-localedir option.
3276 (PRINT_LOCALEDIR_OPTION): New enum item.
3277 (long_options): Add --print-localedir option.
3278 (getargs): Handle --print-localedir option.
3279 * doc/bison.texinfo (Bison Parser): Remove paragraph about _().
3280 (Internationalization): New section.
3282 2005-07-12 Akim Demaille <akim@epita.fr>
3284 * src/symtab.h, src/symtab.c (symbol_print): Swap the arguments,
3285 for consistency with the rest of the code.
3286 * src/symlist.h, src/symlist.c (symbol_list_print): Ditto.
3289 2005-07-12 Akim Demaille <akim@epita.fr>
3291 * src/parse-gram.y: Use %printer instead of YYPRINT.
3293 2005-07-12 Akim Demaille <akim@epita.fr>
3295 * src/symtab.h, src/symtab.c (symbol_print): New.
3296 * src/symlist.h, src/symlist.c (symbol_list_print): New.
3297 * src/symlist.c (symbol_list_n_type_name_get): Report the culprit.
3299 2005-07-12 Akim Demaille <akim@epita.fr>
3301 * data/glr.c (b4_syncline): Fix (swap) the definitions of
3302 b4_at_dollar and b4_dollar_dollar.
3304 2005-07-11 Paul Eggert <eggert@cs.ucla.edu>
3306 * doc/bison.texinfo (Mystery Conflicts): Add reference to DeRemer
3307 and Pennello's paper.
3309 2005-07-09 Paul Eggert <eggert@cs.ucla.edu>
3311 * data/yacc.c (yyparse): Undo previous patch. Instead,
3312 set yylsp[0] and yyvsp[0] only if the initial action
3313 sets yylloc and yylval, respectively.
3315 * data/yacc.c (yyparse): In the initial action, set
3316 yylsp[0] and yyvsp[0] rather than yylloc and yylval.
3317 This avoids the use of undefined variables if the initial
3318 action does not set yylloc and/or yylval.
3320 2005-07-07 Paul Eggert <eggert@cs.ucla.edu>
3322 * examples/calc++/calc++-driver.cc, examples/calc++/calc++-driver.hh:
3323 * examples/calc++/calc++-scanner.ll, examples/calc++/calc++.cc:
3324 Remove from CVS. These files are automatically generated.
3325 * examples/extexi: Clarify that this file is now part of Bison,
3326 not GNU M4, and that it works with any POSIX-compatible Awk.
3327 * examples/calc++/Makefile.am (run_extexi): Remove; not used.
3328 ($(calc_extracted)): Renamed from $(calc_sources_extracted),
3329 so that we also get calc++-parser.yy. Geneate it.
3330 Use $(AWK), not gawk, since any conforming Awk will do.
3331 Put comment before action, since older 'make' can't handle comment
3333 $(BUILT_SOURCES): List all built sources, not just some of them.
3334 $(MAINTAINERCLEANFILES): Remove *.stamp, and all built sources.
3335 $($(srcdir)/calc++-parser.stamp): Work even if POSIXLY_CORRECT.
3336 $($(calc_sources_generated)): Remove unnecessary test for existence
3337 of target. (This had a shell syntax error anyway; a stray "x".)
3338 (calc_extracted): List $(srcdir)/calc++-parser.yy, not
3340 * examples/.cvsignore, examples/calc++/.cvsignore: New files.
3342 * bootstrap (gnulib_modules): Add gettext, now that it's no longer
3343 implied by the other modules.
3345 2005-07-06 Akim Demaille <akim@epita.fr>
3347 Bind examples/calc++ to the package.
3348 * examples/calc++/Makefile: Remove, replaced by...
3349 * examples/calc++/Makefile.am: ... this new file.
3350 * examples/calc++/test: Remove input.
3351 * examples/calc++/compile: Remove.
3352 * examples/Makefile.am: New.
3353 * configure.ac, Makefile.am: Adjust.
3354 * doc/Makefile.am (clean-local): New, for more recent texi2dvis.
3356 2005-07-05 Paul Eggert <eggert@cs.ucla.edu>
3358 * data/glr.c (yyFail): Drastically simplify; since the format argument
3359 never had any % directives, we can simply pass it to yyerror.
3360 (yyparse): Use "t a; a=b;" rather than "t a = b;" when a will
3361 be modified later, as that is the usual style in glr.c.
3362 Problems reported by Paul Hilfinger.
3364 Rewrite GLR parser to catch more buffer overrun, storage exhaustion,
3365 and size overflow errors.
3366 * data/glr.c: Include <stdio.h> etc. after user prolog, not before,
3367 in case the user prolog sets feature-test macros like _GNU_SOURCE.
3368 (YYSIZEMAX): New macro.
3369 (yystpcpy): New function, taken from yacc.c.
3370 (struct yyGLRStack.yyspaceLeft): Now size_t, not int.
3371 (yyinitGLRStack, yyfreeGLRstack): Remove unnecessary forward decls,
3372 so that we don't have to maintain their signatures.
3373 (yyFail): Check for buffer overflow, by using vsnprintf rather
3374 than vsprintf. Allocate a bigger buffer if possible.
3375 Report an error if buffer allocation fails.
3376 (yyStackOverflow): New function.
3377 (yyinitStateSet, yyinitGLRStack): Return a boolean indicating whether
3378 the initialization was successful. It might fail if storage was
3380 (yyexpandGLRStack): Add more checks for storage allocation failure.
3381 Use yyStackOverflow to report failures.
3382 (yymarkStackDeleted, yyglrShift, yyglrShiftDefer, yydoAction):
3383 (yysplitStack, yyprocessOneStack, yyparse, yypstack):
3384 Don't assume stack number fits in int.
3385 (yysplitStack): Check for storage allocation failure.
3386 (yysplitStack, yyprocessOneStack): Add pure_formals, so that we
3387 can print diagnostics on storage allocation failure. All callers
3389 (yyresolveValue): Use yybool for boolean.
3390 (yyreportSyntaxError): Check for size-calculation overflow.
3391 This code is taken from yacc.c.
3392 (yyparse): Check for storage allocation errors when allocating
3395 2005-07-05 Akim Demaille <akim@epita.fr>
3397 Extract calc++ from the documentation.
3398 * doc/bison.texinfo (Calc++): Add the extraction marks.
3399 * examples/extexi: New, from the aborted GNU Programming 2E.
3400 Separate the different paragraph of a file with empty lines.
3401 * examples/Makefile: Use it to extract the whole calc++ example.
3403 2005-06-24 Akim Demaille <akim@epita.fr>
3405 * doc/bison.texinfo (C++ Parser Interface): Use defcv to define
3408 2005-06-22 Akim Demaille <akim@epita.fr>
3410 * doc/bison.texinfo (C++ Language Interface): First stab.
3411 (C++ Parsers): Remove.
3413 2005-06-22 Akim Demaille <akim@epita.fr>
3415 * data/lalr1.cc (yylex_): Honor %lex-param.
3417 2005-06-22 Akim Demaille <akim@epita.fr>
3419 Start a set of simple examples.
3420 * examples/calc++/Makefile, examples/calc++/calc++-driver.cc,
3421 * examples/calc++/calc++-driver.hh,
3422 * examples/calc++/calc++-parser.yy,
3423 * examples/calc++/calc++-scanner.ll, examples/calc++/calc++.cc,
3424 * examples/calc++/compile, examples/calc++/test: New.
3426 2005-06-09 Paul Eggert <eggert@cs.ucla.edu>
3428 * data/yacc.c (malloc, free) [defined __cplusplus]: Wrap inside
3429 extern "C" {}. This fixes a problem reported by Paul Hilfinger,
3430 which stems from the 2005-05-27 patch.
3432 2005-06-06 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
3434 * data/glr.c: Modify treatment of unused parameters to permit use
3435 of g++ (which doesn't allow __attribute__ ((unused)) for parameters).
3437 2005-05-30 Paul Eggert <eggert@cs.ucla.edu>
3439 Fix infringement on user name space reported by Janos Zoltan Szabo.
3440 * data/yacc.c (yyparse): strlen -> yystrlen.
3442 2005-05-30 Akim Demaille <akim@epita.fr>
3444 * data/lalr1.cc (_): New.
3445 Translate the various messages.
3447 2005-05-27 Paul Eggert <eggert@cs.ucla.edu>
3449 Fix infringement on user name space reported by Bruno Haible.
3450 * data/yacc.c (YYSIZE_T): Define first, so that later decls can use it.
3451 Prefer GCC's __SIZE_TYPE__ if available, so that we don't infringe on
3452 the user's name space.
3453 (alloca): Include <stdlib.h> to get it, if it's not built in.
3454 (YYMALLOC, YYFREE): Define only if needed.
3455 (malloc, free): Declare, but only if needed, as this infringes on
3456 the user name space.
3458 2005-05-25 Paul Eggert <eggert@cs.ucla.edu>
3460 Fix BeOS, FreeBSD, MacOS porting problems reported by Bruno Haible.
3461 * lib/bitset.c (bitset_print): Don't assume size_t can be printed
3463 * lib/ebitset.c (min, max): Undef before defining.
3464 * lib/vbitset.c (min, max): Likewise.
3465 * lib/subpipe.c (create_subpipe): Save local variables in case
3466 vfork clobbers them.
3468 2005-05-24 Bruno Haible <bruno@clisp.org>
3470 * tests/synclines.at (AT_SYNCLINES_COMPILE): Add support for the
3471 error message syntax used by gcc-4.0.
3473 2005-05-23 Paul Eggert <eggert@cs.ucla.edu>
3475 * README: Mention m4 1.4.3. Remove obsolete advice about
3476 Sun Forte Developer 6 update 2, VMS, and MS-DOS.
3478 * bootstrap: Remove workaround for problem I encountered with
3479 gettext 0.14.1; it seems to be fixed now.
3481 2005-05-22 Paul Eggert <eggert@cs.ucla.edu>
3483 * NEWS: Version 2.0a.
3485 * src/files.c: Include "stdio-safer.h"; this fixes a typo in
3486 the previous change.
3488 Various maintainer cleanups.
3489 * .cvsignore: Add a.exe, a.out, b.out,, conf[0-9]*, confdefs*,
3490 conftest*, for benefit of CVS commands run at the same time as
3491 "configure". Add build-aux, since "bootstrap" now creates it and
3493 * Makefile.cfg (move_if_change): Remove.
3494 * Makefile.maint: Remove the update stuff; we now use "bootstrap".
3495 (ftp-gnu, www-gnu, move_if_change, local_updates, update):
3496 (po_repo, do-po-update, po-update, wget_files, get-targets):
3497 (config.guess-url_prefix, config.sub-url_prefix):
3498 (ansi2knr.c-url_prefix, texinfo.tex-url_prefix):
3499 (standards.texi-url_prefix, make-stds.texi-url_prefix, taget, url):
3500 ($(get-targets), cvs-files, automake_repo, wget-update, cvs-update):
3502 * configure.ac (AC_CONFIG_AUX_DIR): Change from config to build-aux;
3503 this is now the recommended name.
3504 * config/.cvsignore: Remove config.guess, config.rpath, config.sub,
3505 depcomp, install-sh, mdate-sh, missing, mkinstalldirs, texinfo.tex,
3506 ylwrap. These files now go into build-aux.
3507 * config/move-if-change: Remove.
3508 * config/prev-version.txt: Bump from 1.75 to 2.0.
3510 * bootstrap: Add stdio-safer, unistd-safer modules.
3511 Remove m4/glibc2.m4 (introduced by latest gnulib, but
3513 * lib/.cvsignore: Add dup-safer.c, fd-safer.c,
3514 fopen-safer.c, stdio-safer.h, unistd-safer.h.
3515 * lib/subpipe.c: Include "unistd-safer.h".
3516 (create_subpipe): Make sure all the newly-created
3517 file descriptors are > 2, so that diagnostics don't
3518 get sent down them (which might cause Bison to hang, in theory).
3519 * m4/.cvsignore: Add stdio-safer.m4, unistd-safer.m4.
3520 * src/files.c (xfopen): Use fopen_safer, not fopen.
3522 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Port
3523 yesterday's yacc.c fix.
3525 2005-05-21 Paul Eggert <eggert@cs.ucla.edu>
3527 * data/glr.c, data/lalr1.cc: Update copyright date.
3529 Fix a destructor bug reported by Wolfgang Spraul in
3530 <http://lists.gnu.org/archive/html/bug-bison/2005-05/msg00042.html>.
3531 * data/yacc.c (yyabortlab): Don't call destructor, and
3532 don't set yychar to EMPTY.
3533 (yyoverflowlab): Don't call destructor.
3534 (yyreturn): Call destructor, if yychar is neither YYEOF nor YYEMPTY.
3535 * tests/calc.at (AT_CHECK_CALC): Expect one fewer output lines,
3536 since we no longer output the message "discarding lookahead token
3539 2005-05-20 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
3541 * data/glr.c (YY_SYMBOL_PRINT): Don't print newline at end to
3542 fix a small glitch in debugging output.
3543 (yyprocessOneStack, yyrecoverSyntaxError, yyparse): Print newline
3544 after YY_SYMBOL_PRINT where needed.
3546 (struct yyGLRState): Add some comments.
3547 (struct yySemanticOption): Add some comments.
3548 (union yyGLRStackItem): Add comment.
3550 (yymergeOptionSets): Correct this to properly perform the union,
3551 avoiding infinite reported by Michael Rosien.
3554 * tests/glr-regression.at: Add test for GLR merging error reported
3557 2005-05-13 Paul Eggert <eggert@cs.ucla.edu>
3559 * COPYING, ChangeLog, GNUmakefile, HACKING, Makefile.am,
3560 Makefile.cfg, Makefile.maint, NEWS, README, README-alpha,
3561 README-cvs, TODO, bootstrap, configure.ac, data/Makefile.am,
3562 data/README, data/c.m4, data/glr.c, data/lalr1.cc, data/yacc.c,
3563 data/m4sugar/m4sugar.m4, doc/Makefile.am, doc/bison.texinfo,
3564 doc/fdl.texi, doc/gpl.texi, doc/refcard.tex, lib/Makefile.am,
3565 lib/abitset.c, lib/abitset.h, lib/bbitset.h, lib/bitset.c,
3566 lib/bitset.h, lib/bitset_stats.c, lib/bitset_stats.h,
3567 lib/bitsetv-print.c, lib/bitsetv-print.h, lib/bitsetv.c,
3568 lib/bitsetv.h, lib/ebitset.c, lib/ebitset.h, lib/get-errno.c,
3569 lib/get-errno.h, lib/lbitset.c, lib/lbitset.h, lib/libiberty.h,
3570 lib/main.c, lib/subpipe.c, lib/subpipe.h, lib/timevar.c,
3571 lib/timevar.def, lib/timevar.h, lib/vbitset.c, lib/vbitset.h,
3572 lib/yyerror.c, m4/cxx.m4, m4/m4.m4, m4/subpipe.m4, m4/timevar.m4,
3573 m4/warning.m4, src/LR0.c, src/LR0.h, src/Makefile.am, src/assoc.c,
3574 src/assoc.h, src/closure.c, src/closure.h, src/complain.c,
3575 src/complain.h, src/conflicts.c, src/conflicts.h, src/derives.c,
3576 src/derives.h, src/files.c, src/files.h, src/getargs.c,
3577 src/getargs.h, src/gram.c, src/gram.h, src/lalr.c, src/lalr.h,
3578 src/location.c, src/location.h, src/main.c, src/muscle_tab.c,
3579 src/muscle_tab.h, src/nullable.c, src/nullable.h, src/output.c,
3580 src/output.h, src/parse-gram.c, src/parse-gram.h,
3581 src/parse-gram.y, src/print.c, src/print.h, src/print_graph.c,
3582 src/print_graph.h, src/reader.c, src/reader.h, src/reduce.c,
3583 src/reduce.h, src/relation.c, src/relation.h, src/scan-gram.l,
3584 src/scan-skel.l, src/state.c, src/state.h, src/symlist.c,
3585 src/symlist.h, src/symtab.c, src/symtab.h, src/system.h,
3586 src/tables.c, src/tables.h, src/uniqstr.c, src/uniqstr.h,
3587 src/vcg.c, src/vcg.h, src/vcg_defaults.h, tests/Makefile.am,
3588 tests/actions.at, tests/c++.at, tests/calc.at, tests/conflicts.at,
3589 tests/cxx-type.at, tests/existing.at, tests/glr-regression.at,
3590 tests/headers.at, tests/input.at, tests/local.at, tests/output.at,
3591 tests/reduce.at, tests/regression.at, tests/sets.at,
3592 tests/synclines.at, tests/testsuite.at, tests/torture.at:
3593 Update FSF postal mail address.
3595 2005-05-11 Paul Eggert <eggert@cs.ucla.edu>
3597 * tests/local.at (AT_COMPILE_CXX): Treat LDFLAGS like AT_COMPILE does.
3598 Problem reported by Ralf Menzel.
3600 2005-05-01 Paul Eggert <eggert@cs.ucla.edu>
3602 * tests/actions.at: Test that stack overflow invokes destructors.
3603 From Marcus Holland-Moritz.
3604 * data/yacc.c (yyerrlab): Move the code that destroys the stack
3606 (yyreturn): to here. That way, destructors are called properly
3607 even if the stack overflows, or the user calls YYACCEPT or
3608 YYABORT. Stack-overflow problem reported by Marcus Holland-Moritz.
3609 (yyoverflowlab): Destroy the lookahead.
3611 2005-04-24 Paul Eggert <eggert@cs.ucla.edu>
3613 * data/yacc.c (YYSTACK_ALLOC_MAXIMUM): Add more-descriptive comment.
3615 2005-04-17 Paul Eggert <eggert@cs.ucla.edu>
3617 * NEWS: Bison-generated C parsers no longer quote literal strings
3618 associated with tokens.
3619 * src/output.c (prepare_symbols): Don't escape strings,
3620 since users don't want to see C escapes.
3621 * tests/calc.at (AT_CHECK_CALC): Adjust to lack of quotes
3623 * tests/input.at (Torturing the Scanner): Likewise.
3624 * tests/regression.at (Token definitions, Web2c Actions): Likewise.
3626 2005-04-16 Paul Eggert <eggert@cs.ucla.edu>
3628 * tests/torture.at (AT_INCREASE_DATA_SIZE): Skip the test if
3629 the data size is known to be too small and we can't increase it.
3630 This works around an HP-UX 11.00 glitch reported by Andrew Benham.
3632 2005-04-15 Paul Eggert <eggert@cs.ucla.edu>
3634 * src/parse-gram.y: Include quotearg.h.
3635 (string_as_id): Quote $1 before using it as a key, since the
3636 lexer no longer quotes it for us.
3637 (string_content): Don't strip quotes, since lexer no longer
3639 * src/scan-gram.l: Include quotearg.h.
3641 ("'"<SC_ESCAPED_CHARACTER>): Quote symbol before using it as
3642 a key, since the rest of the lexer doesn't quote it.
3643 * src/symtab.c (symbol_get): Don't quote symbol; caller does it now.
3644 * tests/regression.at (Token definitions): Check for backslashes
3647 * data/yacc.c (YYSTACK_ALLOC_MAXIMUM): New macro.
3648 (YYSIZE_T): Define to unsigned long int when using an older compiler.
3649 (yyparse): Revamp code to generate long syntax error message, to
3650 make it easier to translate, and to avoid problems with arithmetic
3651 overflow. Change "virtual memory" to "memory" in diagnostic, since
3652 we don't know whether the memory is virtual.
3654 2005-04-13 Paul Eggert <eggert@cs.ucla.edu>
3656 * NEWS: Bison-generated C parsers now use the _ macro to
3658 * data/yacc.c (_) [!defined _]: New macro.
3659 All English strings wrapped inside this macro.
3660 * doc/bison.texinfo (Bison Parser): Document _.
3661 * po/POTFILES.in: Include src/parse-gram.c, since it now
3662 includes translateable strings that parse-gram.y doesn't.
3664 2005-04-12 Paul Eggert <eggert@cs.ucla.edu>
3666 * src/symtab.c (symbol_make_alias): Call symbol_type_set,
3667 reverting the 2004-10-11 change to this function.
3668 (symbol_check_alias_consistency): Don't call symbol_type_set
3669 if the type name is already correct.
3670 * tests/input.at (Typed symbol aliases): New test, from Tim Van Holder.
3672 2005-03-25 Paul Eggert <eggert@cs.ucla.edu>
3674 * tests/regression.at (Token definitions): Don't use a token named
3675 c, as that generates a "#define c ..." that runs afoul of buggy
3676 stdlib.h that uses the identifier c as a member of struct
3677 drand48_data. Problem reported by Horst Wente.
3679 2005-03-21 Paul Eggert <eggert@cs.ucla.edu>
3681 * bootstrap: Change translation URL from
3682 http://www2.iro.umontreal.ca/~gnutra/po/maint/bison/ to
3683 http://www.iro.umontreal.ca/translation/maint/bison/ to avoid
3684 redirection glitches. Problem reported by twlevo@xs4all.nl.
3686 2005-03-20 Paul Eggert <eggert@cs.ucla.edu>
3688 * tests/local.at (AT_COMPILE, AT_COMPILE_CXX): Don't put options
3689 after operands; POSIX says this isn't portable for the c99 command.
3691 2005-03-18 Paul Eggert <eggert@cs.ucla.edu>
3693 * tests/glr-regression.at (glr-regr2a.y): Try to dump core
3694 immediately if a data overrun has occurred; this may help us track
3695 down what may be a spurious failure on MacOS.
3697 2005-03-17 Paul Eggert <eggert@cs.ucla.edu>
3699 Respond to problems reported by twlevo@xs4all.nl.
3701 * bootstrap: Use "trap - 0" rather than the unportable "trap 0".
3703 * src/vcg.h: Comment fix.
3704 * src/vcg_defaults.h: Parenthesize macro bodies to make them safe.
3705 (G_CMAX): Change to -1 instead of INT_MAX.
3707 * data/yacc.c (yyparse): Omit spaces before #line.
3709 2005-03-15 Paul Eggert <eggert@cs.ucla.edu>
3711 * src/tables.c (state_number_to_vector_number): Put it inside an
3712 "#if 0", since it's not currently used. Problem reported by
3715 2005-03-06 Paul Eggert <eggert@cs.ucla.edu>
3717 * src/output.c (escaped_output): Renamed from
3718 escaped_file_name_output, since we now use it for symbol tags as
3719 well. All uses changed.
3720 (symbol_destructors_output, symbol_printers_output):
3721 Escape symbol tags too.
3722 Problem reported by Matyas Forstner in
3723 <http://lists.gnu.org/archive/html/bug-bison/2005-03/msg00009.html>.
3725 * src/muscle_tab.c (muscle_code_grow): Don't quote numbers; it's
3727 * src/output.c (user_actions_output, token_definitions_output,
3728 symbol_destructors_output, symbol_printers_output): Likewise.
3729 * src/reader.c (prologue_augment): Likewise.
3730 * src/scan-gram.l (handle_action_dollar, handle_action_at): Likewise.
3732 * src/vcg.c (output_edge): Don't quote linestyle arg.
3733 Problem reported by twlevo@xs4all.nl.
3735 2005-02-28 Paul Eggert <eggert@cs.ucla.edu>
3737 * doc/bison.texinfo (Semantic Tokens): Fix scoping problem in
3738 example, reported by Derek M Jones. Also, make the example even
3739 more outrageous, to better illustrate how bad the problem is.
3741 2005-02-24 Paul Eggert <eggert@cs.ucla.edu>
3743 * doc/bison.texinfo (Mfcalc Symtab): Correct the prototype for
3744 putsym. Typo reported by Sebastian Piping.
3746 2005-02-23 Paul Eggert <eggert@cs.ucla.edu>
3748 * doc/bison.texinfo (Language and Grammar): some -> same
3749 (Epilogue): int he -> in the
3750 Typos reported by Sebastian Piping via Justin Pence.
3752 2005-02-07 Paul Eggert <eggert@cs.ucla.edu>
3754 * tests/glr-regression.at (Improper handling of embedded actions
3755 and dollar(-N) in GLR parsers): Renamed from "Improper handling of
3756 embedded actions and $-N in GLR parsers", work around an Autoconf bug
3757 with dollar signs in test names.
3758 * tests/input.at (Invalid dollar-n): Renamed from "Invalid \$n",
3759 for a similar reason.
3761 2005-01-28 Paul Eggert <eggert@cs.ucla.edu>
3763 * src/vcg.c (output_graph): G_VIEW -> normal_view in case someone
3764 wants to redefine G_VIEW.
3766 2005-01-27 Paul Eggert <eggert@cs.ucla.edu>
3768 * src/vcg.c (get_view_str): Remove case for normal_view.
3769 Problem reported by twlevo@xs4all.nl.
3771 2005-01-24 Paul Eggert <eggert@cs.ucla.edu>
3773 * configure.ac (O0CFLAGS, O0CXXFLAGS): Fix quoting bug.
3774 Problem reported by twlevo@xs4all.nl.
3776 * doc/bison.texinfo: Change @dircategory from "GNU programming
3777 tools" to "Software development". Requested by Richard Stallman
3780 2005-01-23 Paul Eggert <eggert@cs.ucla.edu>
3782 * tests/c++.at (AT_CHECK_DOXYGEN): Don't use options after operands.
3783 Problem reported by twlevo@xs4all.nl.
3785 2005-01-21 Paul Eggert <eggert@cs.ucla.edu>
3787 * data/yacc.c (YYCOPY, yystpcpy, yyparse): Remove "register"
3788 keyword; it's not needed with modern compilers, and it doesn't
3789 affect correctness with older compilers. Suggested by
3792 2005-01-17 Paul Eggert <eggert@cs.ucla.edu>
3794 * data/glr.c (yyuserAction): Add "default: break;" case to pacify
3795 gcc -Wswitch-default.
3796 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Likewise.
3797 * data/yacc.c (yyparse): Likewise.
3799 2005-01-12 Paul Eggert <eggert@cs.ucla.edu>
3801 * src/system.h (OUTPUT_EXT, TAB_EXT): Define only if not defined
3802 already. Let config.h define any nonstandard values.
3804 2005-01-10 Paul Eggert <eggert@cs.ucla.edu>
3806 * tests/calc.at (_AT_DATA_CALC_Y): Use alarm (100), not alarm (10),
3807 for the benefit of slower hosts. Problem reported by
3810 2005-01-07 Paul Eggert <eggert@cs.ucla.edu>
3812 * data/yacc.c (yyparse): Pacify non-GCC compilers about yyerrorlab
3813 being defined and not used.
3814 * data/lalr1.cc (yyparse): Likewise.
3815 Use "if (false)" rather than "if (0)".
3817 2005-01-05 Paul Eggert <eggert@cs.ucla.edu>
3819 * TODO: Mention that we should allow NUL bytes in tokens.
3821 2005-01-02 Paul Eggert <eggert@cs.ucla.edu>
3823 * src/scan-skel.l (<<EOF>>): Don't close standard output.
3824 Problem reported by Hans Aberg.
3826 2005-01-01 Paul Eggert <eggert@cs.ucla.edu>
3828 * src/getargs.c (version): Happy new year; update overall
3829 program copyright date from 2004 to 2005.
3831 * src/scan-skel.l ("@output ".*\n): Don't close standard output.
3832 Problem reported by Hans Aberg.
3833 * tests/output.at (AT_CHECK_OUTPUT): New arg SHELLIO.
3834 (Output file names.): Add a test for the case when standard output
3837 2004-12-26 Paul Eggert <eggert@cs.ucla.edu>
3839 * doc/bison.texinfo (@copying): Update FDL version number to 1.2,
3840 to fix an oversight in the Bison 2.0 manual.
3842 2004-12-25 Paul Eggert <eggert@cs.ucla.edu>
3844 * NEWS: Version 2.0. Reformat the existing news items since
3845 1.875, so that related items are grouped together.
3846 * configure.ac (AC_INIT): Bump version to 2.0.
3847 * src/parse-gram.c, src/parse-gram.h: Regenerate with 2.0.
3849 * tests/torture.at (Exploding the Stack Size with Alloca): Set
3850 YYSTACK_USE_ALLOCA to 1 if __GNUC__ or alloca are defined;
3851 otherwise, we're not testing alloca. Unfortunately there's no
3852 simple way to consult HAVE_ALLOCA here.
3854 * data/lalr1.cc (yydestruct_): Pacify unused variable warning
3857 * src/LR0.c (new_itemsets): Use memset rather than zeroing by
3858 hand. This avoids a warning about comparing int to size_t when
3859 GCC warnings are enabled.
3861 2004-12-22 Paul Eggert <eggert@cs.ucla.edu>
3863 * NEWS: Bison-generated parsers no longer default to using the
3864 alloca function (when available) to extend the parser stack, due
3865 to widespread problems in unchecked stack-overflow detection.
3866 * data/glr.c (YYMAXDEPTH): Remove undef when zero. It's the user's
3867 responsibility to set it to a positive value. This lets the user
3868 specify a value that is not a preprocessor constant.
3869 * data/yacc.c (YYMAXDEPTH): Likewise.
3870 (YYSTACK_ALLOC): Define only if YYSTACK_USE_ALLOCA is nonzero.
3871 * doc/bison.texinfo (Stack Overflow): YYMAXDEPTH no longer needs
3872 to be a compile-time constant. However, explain the constraints on it.
3873 Also, explain the constraints on YYINITDEPTH.
3874 (Table of Symbols): Explain that alloca is no longer the default.
3875 Explain the user's responsibility if they define YYSTACK_USE_ALLOCA
3878 * doc/bison.texinfo (Location Default Action): Mention that n must
3879 be zero when k is zero. Suggested by Frank Heckenbach.
3881 2004-12-22 Akim Demaille <akim@epita.fr>
3883 * data/lalr1.cc (parser::token_number_type, parser::rhs_number_type)
3884 (parser::state_type, parser::semantic_type, parser::location_type):
3885 Private, not public.
3886 (parser::parse): Return ints, not bool.
3887 Returning a bool introduces a problem: 0 corresponds to false, and
3888 it seems weird to return false on success. Returning true changes
3889 the conventions for yyparse.
3890 Alternatively we could return void and send an exception.
3891 There is no clear consensus (yet?).
3892 (state_stack, semantic_stack, location_stack): Rename as...
3893 (state_stack_type, semantic_stack_type, location_stack_type): these.
3894 Private, not public.
3895 * tests/c++.at: New.
3896 * tests/testsuite.at, tests/Makefile.am: Adjust.
3898 2004-12-21 Akim Demaille <akim@epita.fr>
3900 * data/lalr1.cc (parser::parse): Return a bool instead of an int.
3902 2004-12-21 Akim Demaille <akim@epita.fr>
3904 Don't impose std::string for filenames.
3906 * data/lalr1.cc (b4_filename_type): New.
3907 (position::filename): Use it.
3908 (parser.hh): Move the inclusion of stack.hh and location.hh below
3909 the user code, so that needed headers for the filename type can be
3911 Forward declare them before the user code.
3912 * tests/Makefile.am (check-local, installcheck-local): Pass
3913 TESTSUITEFLAGS to the TESTSUITE.
3915 2004-12-20 Akim Demaille <akim@epita.fr>
3917 Use more STL like names: my_class instead of MyClass.
3919 * data/lalr1.cc (LocationStack, LocationType, RhsNumberType)
3920 (SemanticStack, SemanticType, StateStack, StateType)
3921 (TokenNumberType, Stack, Slice, Traits, Parser::location)
3922 (Parser::value): Rename as...
3923 (location_stack, location_type, rhs_number_type, semantic_stack)
3924 (semantic_type, state_stack, state_type, token_number_type, stack)
3925 (slice, traits, parser::yylloc, parser::yylval): these.
3927 * tests/calc.at, tests/regression.at, tests/actions.at: Adjust.
3929 2004-12-19 Paul Eggert <eggert@cs.ucla.edu>
3931 * data/glr.c (YYLLOC_DEFAULT): Use GNU spacing conventions.
3932 * data/yacc.c (YYLLOC_DEFAULT): Likewise.
3934 2004-12-17 Paul Eggert <eggert@cs.ucla.edu>
3936 Remove uses of 'short int' and 'unsigned short int'. This raises
3937 some arbitrary limits. It uses more memory but nowadays that's
3938 not much of an issue.
3940 This change does not affect the generated parsers; that's a different
3941 task, as some users will want to conserve memory there.
3943 Ideally we should use size_t to represent all object counts, and
3944 something like ptrdiff_t to represent signed differences of object
3945 counts; but that will require more code-cleanup than I have the
3946 time to do right now.
3948 * src/LR0.c (allocate_itemsets, new_itemsets, save_reductions):
3949 Use size_t, not int or short int, to count objects.
3950 * src/closure.c (nritemset, closure): Likewise.
3951 * src/closure.h (nritemset, closure): Likewise.
3952 * src/nullable.c (nullable_compute): Likewise.
3953 * src/print.c (print_core): Likewise.
3954 * src/print_graph.c (print_core): Likewise.
3955 * src/state.c (state_compare, state_hash): Likewise.
3956 * src/state.h (struct state): Likewise.
3957 * src/tables.c (default_goto, goto_actions): Likewise.
3959 * src/gram.h (rule_number, rule): Use int, not short int.
3960 * src/output.c (prepare_rules): Likewise.
3961 * src/state.h (state_number, STATE_NUMBER_MAXIMUM, transitions,
3962 errs, reductions): Likewise.
3963 * src/symtab.h (symbol_number, SYMBOL_NUMBER_MAXIMUM, struct symbol):
3965 * src/tables.c (vector_number, tally, action_number,
3966 ACTION_NUMBER_MINIMUM): Likewise.
3967 * src/output.c (muscle_insert_short_int_table): Remove.
3969 2004-12-17 Akim Demaille <akim@epita.fr>
3971 * data/lalr1.cc: Extensive Doxygenation.
3972 (error_): Rename as...
3973 (error): this, since it is visible to the user.
3975 (Parser::message): Now an automatic variable from...
3976 (Parser::yyreport_syntax_error_): here.
3977 * tests/actions.at, tests/calc.at, tests/regression.at: Adjust to
3979 * tests/input.at: Escape $.
3981 2004-12-16 Paul Eggert <eggert@cs.ucla.edu>
3983 * data/glr.c (b4_lhs_value, b4_rhs_value, b4_rhs-location):
3984 Parenthesize rhs to avoid obscure problems with mistakes like
3985 "foo$$bar = foo$1bar;". Problem reported by twlevo at xs4all.
3986 * data/lalr1.cc (b4_lhs_value, b4_rhs_value, b4_lhs_location,
3987 b4_rhs_location): Likewise.
3988 * data/yacc.c (b4_lhs_value, b4_rhs_value, b4_lhs_location,
3989 b4_rhs_location): Likewise.
3991 2004-12-16 Akim Demaille <akim@epita.fr>
3993 * data/lalr1.cc (yyreport_syntax_error_): Catch up with glr.c and
3994 yacc.c: be sure to stay within yycheck_.
3995 * tests/actions.at: Re-enable C++ tests.
3997 2004-12-16 Akim Demaille <akim@epita.fr>
3999 * src/print_graph.c (print_graph): Remove layoutalgorithm uses for
4002 2004-12-16 Akim Demaille <akim@epita.fr>
4004 Use #define to handle the %name-prefix.
4006 * data/glr.c, data/yacc.c: Comment changes.
4007 * data/lalr1.cc (yylex): Use #define to select the name of yylex,
4008 so that one can refer to yylex in the parser file, and have it
4009 renamed, as is the case with other skeletons.
4011 2004-12-16 Akim Demaille <akim@epita.fr>
4013 Move lalr1.cc internals into yy*.
4015 * data/lalr1.cc (semantic_stack_, location_stack_, state_stack_)
4016 (semantic_stack_, location_stack_, pact_, pact_ninf_, defact_)
4017 (pgoto_, defgoto_, table_, table_ninf_, check_, stos_, r1_, r2_)
4018 (name_, rhs_, prhs_, rline_, token_number_, eof_, last_, nnts_)
4019 (empty_, final_, terror_, errcode_, ntokens_)
4020 (user_token_number_max_, undef_token_, n_, len_, state_, nerrs_)
4021 (looka_, ilooka_, error_range_, nerrs_):
4023 (yysemantic_stack_, yylocation_stack_, yystate_stack_)
4024 (yysemantic_stack_, yylocation_stack_, yypact_, yypact_ninf_)
4025 (yydefact_, yypgoto_, yydefgoto_, yytable_, yytable_ninf_)
4026 (yycheck_, yystos_, yyr1_, yyr2_, yyname_, yyrhs_, yyprhs_)
4027 (yyrline_, yytoken_number_, yyeof_, yylast_, yynnts_, yyempty_)
4028 (yyfinal_, yyterror_, yyerrcode_, yyntokens_)
4029 (yyuser_token_number_max_, yyundef_token_, yyn_, yylen_, yystate_)
4030 (yynerrs_, yylooka_, yyilooka_, yyerror_range_, yynerrs_):
4033 2004-12-15 Paul Eggert <eggert@cs.ucla.edu>
4035 Fix some problems reported by twlevo at xs4all.
4036 * src/symtab.c (symbol_new): Report an error if the input grammar
4037 contains too many symbols. This is better than calling abort() later.
4038 * src/vcg.h (enum layoutalgorithm): Remove. All uses removed.
4039 (struct node, struct graph):
4040 Rename member expand to stretch. All uses changed.
4041 (struct graph): Remove member layoutalgorithm. All uses removed.
4042 * src/vcg.c (get_layoutalgorithm_str): Remove. All uses removed.
4043 * src/vcg_defaults.h (G_STRETCH): Renamed from G_EXPAND.
4045 (N_STRETCH): Rename from N_EXPAND. All uses changed.
4047 2004-12-15 Akim Demaille <akim@epita.fr>
4049 * data/lalr1.cc: Normalize /** \brief ... */ to ///.
4050 Add more Doxygen comments.
4051 (symprint_, stack_print_, reduce_print_, destruct_, pop)
4052 (report_syntax_error_, translate_): Rename as...
4053 (yysymprint_, yystack_print_, yyreduce_print_, yydestruct_)
4054 (yypop_, yyreport_syntax_error_, yytranslate_): this.
4056 2004-12-15 Akim Demaille <akim@epita.fr>
4058 * data/lalr1.cc (lex_): Rename as...
4060 Move the trace here.
4061 Take the %name-prefix into account.
4062 Reported by Alexandre Duret-Lutz.
4064 2004-12-15 Akim Demaille <akim@epita.fr>
4066 Simplify the C++ parser constructor.
4068 * data/lalr1.cc (debug_): Rename as...
4069 (yydebug_): so that the parser's internals are always in the yy*
4072 (b4_parse_param_decl): Remove the leading comma as it is now only
4073 called as unique argument list.
4074 (Parser::Parser): Remove the constructor accepting a location and
4075 an initial debugging level.
4076 Remove from the other ctor the argument for the debugging level.
4077 (debug_level_type, debug_level, set_debug_level): New.
4079 * tests/actions.at, tests/calc.at, tests/regression.at: Adjust
4082 2004-12-15 Akim Demaille <akim@epita.fr>
4084 Remove b4_root related material: failure experiment
4085 (which goal was to allow to derive from a class).
4087 * data/lalr1.cc (b4_root, b4_param, b4_constructor): Remove
4088 definitions and uses.
4090 2004-12-14 Paul Eggert <eggert@cs.ucla.edu>
4092 * data/glr.c (struct yyGLRStack): yyerror_range now has 3 items,
4093 not 2, since it's not portable to subtract 1 from the start of an
4094 array. The new item 0 is never set or used. All uses changed.
4096 (yyrecoverSyntaxError): Use YYLLOC_DEFAULT instead of assuming
4097 the default definition of YYLLOC_DEFAULT. Problem reported
4098 by Frank Heckenbach.
4100 2004-12-12 Paul Eggert <eggert@cs.ucla.edu>
4102 * data/glr.c (YYRHSLOC): Don't have two definitions, one for
4103 the normal case and one for the error case. Just use the
4104 first one uniformly. Problem reported by Frank Heckenbach.
4105 (YYLLOC_DEFAULT): Use the conventions of yacc.c, so we can
4106 use exactly the same macro in both places.
4107 (yyerror_range): Now of type yyGLRStackItem, not YYLTYPE,
4108 so that the normal-case YYRHSLOC works for the error case too.
4110 * data/yacc.c (YYRHSLOC): New macro, taken from glr.c.
4111 (YYLLOC_DEFAULT): Use the same macro as glr.c.
4112 * doc/bison.texinfo (Location Default Action): Don't claim that
4113 we have an array of locations. Use the same macro for both glr
4114 and lalr parsers. Mention YYRHSLOC. Mention what happens when
4117 2004-12-10 Paul Eggert <eggert@cs.ucla.edu>
4119 * HACKING: Update email addresses to send announcements to.
4121 * configure.ac (AC_INIT): Bump version to 1.875f.
4123 2004-12-10 Paul Eggert <eggert@cs.ucla.edu>
4125 * NEWS: Version 1.875e.
4126 * src/parse-gram.c, src/parse-gram.h: Regenerate with 1.875e.
4128 * src/scan-skel.l: Include "complain.h", for "fatal".
4130 * src/relation.h (relation_print, relation_digraph):
4131 Relation sizes are of type relation_node, not size_t (this is
4132 merely a doc fix, since the two types are equivalent).
4133 (relation_transpose): Relation sizes are of type relation_node,
4135 * src/relation.c: Likewise.
4136 (top, infinity): Now of type relation_node, not int.
4137 (traverse, relation_transpose): Use relation_node, not int.
4139 * data/glr.c (yyuserAction, yyrecoverSyntaxError): Mark args
4140 with ATTRIBUTE_UNUSED if they're not used, to avoid GCC warning.
4141 (yyparse): Remove unused local introduced in 2004-10-25 patch.
4143 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): New arg
4144 specifying whether the test should be skipped. Use it tp
4145 specify that the [%defines %skeleton "lalr1.cc"] tests currently
4146 fail on some hosts, and should be skipped.
4148 2004-12-08 Paul Eggert <eggert@cs.ucla.edu>
4150 * src/system.h (CALLOC, MALLOC, REALLOC): Remove. All callers
4151 changed to use xcalloc, xnmalloc, xnrealloc, respectively,
4152 unless otherwise specified below.
4154 * src/LR0.c (allocate_itemsets): Use xnmalloc, not xcalloc,
4155 to allocate kernel_base, kernel_items, kernel_size, since
4156 they needn't be initialized to 0.
4157 (allocate_storgae): Likewise, for shiftset, redset, shift_symbol.
4158 * src/closure.c (new_closure): Likewise, for itemset.
4159 * src/derives.c (derives_compute): Likewise, for delts, derives, q.
4160 * src/lalr.c (set_goto_map): Likewise, for temp_map.
4161 (initialize_F): Likewise, for reads, edge, reads[i], includes[i].
4162 (build_relations): Likewise for edge, states1, includes.
4163 * src/nullable.c (nullable_compute): Likewise, for squeue, relts.
4164 * src/reader.c (packgram): Likewise, for ritem, rules.
4165 * src/reduce.c (nonterminals_reduce): Likewise for nontermmap.
4166 * src/relation.c (relation_digraph): Likewise for VERTICES.
4167 (relation_transpose): Likewise for new_R, end_R.
4168 * src/symtab.c (symbols_token_translations_init): Likewise for
4170 * src/tables.c (save_row): Likewise for froms, tos, conflict_tos.
4171 (token_actions): Likewise for yydefact, actrow, conflrow,
4173 (save_column): Likewise for froms[symno], tos[symno].
4174 (goto_actions): Likewise for state_count.
4175 (pack_table): Likewise for base, pos, check.
4176 (tables_generate): Likewise for width.
4178 * src/LR0.c (set_states): Don't reuse kernel_size and kernel_base
4179 for initial core. Just have a separate core, so we needn't worry
4180 about whether kernel_size and kernel_base are initialized.
4182 * src/LR0.c (shift_symbol, redset, shiftset, kernel_base,
4183 kernel_size, kernel_items): Remove unnecessary initialization.
4184 * src/conflicts.c (conflicts): Likewise.
4185 * src/derives.c (derives): Likewise.
4186 * src/muscle_tablc (muscle_insert): Likewise.
4187 * src/relation.c (relation_digraph): Likewise.
4188 * src/tables.c (froms, tos, conflict_tos, tally, width, actrow, order,
4189 conflrow, conflict_table, conflict_list, table, check):
4192 * src/closure.c (new_closure): Arg is of type unsigned int, not int.
4193 This is because all callers pass unsigned int.
4194 * src/closure.h (new_closure): Likewise.
4196 * src/lalr.c (initialize_F): Initialize reads[i] in all cases.
4197 (build_relations): Initialize includes[i] in all cases.
4198 * src/reader.c (packgram): Always initialize rules[ruleno].prec
4199 and rules[ruleno].precsym. Initialize members in order.
4200 * src/relation.c (relation_transpose): Always initialize new_R[i]
4202 * src/table.c (conflict_row): Initialize 0 at end of conflict_list.
4204 * src/output.c (prepare_actions): Pass 0 instead of conflict_list[0];
4205 conflict_list[0] was always 0, but now it isn't initialized.
4207 * src/table.c (table_grow): When conflict_table grew, the grown
4208 area wasn't cleared. Fix this.
4210 * lib/.cvsignore: Add strdup.c, strdup.h.
4211 * m4/.cvsignore: Add strdup.m4.
4213 2004-12-07 Paul Eggert <eggert@cs.ucla.edu>
4215 * src/lalr.h (GOTO_NUMBER_MAXIMUM): New macro.
4216 * src/lalr.c (set_goto_map): Don't allow ngotos to equal
4217 GOTO_NUMBER_MAXIMUM, since we occasionally compute
4218 ngotos + 1 without checking for overflow.
4219 (build_relations): Use END_NODE, not -1, to denote end of edges.
4220 * src/lalr.c (set_goto_map, map_goto, initialize_F, add_loopback_edge,
4221 build_relations): Use goto_number, not int, for goto numbers.
4222 * src/tables.c (save_column, default_goto): Likewise.
4224 2004-11-23 Akim Demaille <akim@epita.fr>
4226 * data/lalr1.cc (YYSTYPE): Define it as is done for C, instead
4227 of #defining from yystype.
4228 Don't typedef yystype, C++ does not need it.
4229 This lets it possible to forward declare it as union.
4231 2004-11-23 Paul Eggert <eggert@cs.ucla.edu>
4233 * bootstrap (gnulib_modules): Add extensions.
4234 Problem reported by Jim Meyering.
4236 2004-11-22 Paul Eggert <eggert@cs.ucla.edu>
4238 * src/LR0.c, src/closure.c, src/derives.c, src/gram.c,
4239 src/lalr.c, src/nullable.c, src/relation.c, src/scan-skel.l,
4240 src/system.h, src/tables.c: XFREE -> free, to accommodate
4241 recent change to gnulib xalloc.h.
4242 Problem reported by Jim Meyering.
4244 2004-11-17 Akim Demaille <akim@epita.fr>
4246 * data/lalr1.cc (symprint_): Use cdebug_ to avoid warnings.
4248 2004-11-17 Akim Demaille <akim@epita.fr>,
4249 Alexandre Duret-Lutz <adl@gnu.org>
4251 * data/lalr1.cc (Parser::yycdebug_): New, a pointer, to allow
4254 Use it instead of cdebug_.
4255 (Parser::debug_stream, Parser::set_debug_stream): New.
4256 (Parser::symprint_): Define cdebug_ for temporary backward
4258 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Use
4261 2004-11-17 Akim Demaille <akim@epita.fr>
4263 * data/lalr1.cc (Parser:print_): Remove, use %printer instead.
4264 * tests/regression.at (_AT_DATA_DANCER_Y): Adjust.
4265 * tests/calc.at (_AT_DATA_CALC_Y): Ditto.
4266 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise.
4268 2004-10-27 Paul Eggert <eggert@cs.ucla.edu>
4270 * data/glr.c (yyloc_default): Remove; not used.
4271 Problem reported by Frank Heckenbach.
4273 2004-10-25 Akim Demaille <akim@epita.fr>
4275 * data/glr.c (YYRHSLOC): Move its definition next to its uses.
4276 Introduce another definition to address simple location arrays.
4277 (yyGLRStack): New member: yyerror_range.
4278 (yyrecoverSyntaxError, yyparse): Update it.
4279 (yyrecoverSyntaxError): Use it when shifting the error token to
4280 have an accurate range, equivalent to the one computed by both
4281 yacc.c and lalr1.cc.
4282 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Change its yylex so
4283 that column numbers start at column 0, as per GNU Coding
4284 Standards, the others tests, and the doc.
4285 (_AT_RESOLVED_GLR_OUTPUT_WITH_LOC, _AT_AMBIG_GLR_OUTPUT_WITH_LOC):
4286 Adjust to the above change (first column is 0).
4287 And adjust the location of the "<error>", now covering the whole
4290 2004-10-22 Akim Demaille <akim@epita.fr>
4291 and Paul Eggert <eggert@cs.ucla.edu>
4293 Remove some arbitrary limits on goto numbers and relations.
4294 * src/lalr.c (goto_map, ngotos, from_state, to_state): Omit
4295 initial values, since they're never used.
4296 (set_goto_map): ngotos is now unsigned, so test for overflow
4297 by seeing whether it wraps around to zero.
4298 * src/lalr.h (goto_number): Now size_t, not short int.
4299 (GOTO_NUMBER_MAXIMUM): Remove.
4300 * src/relation.c (relation_print, traverse, relation_transpose):
4301 Check for END_NODE rather than looking at sign.
4302 * src/relation.h (END_NODE): New macro.
4303 (relation_node): Now size_t, not short int.
4305 2004-10-22 Paul Eggert <eggert@cs.ucla.edu>
4307 * doc/bison.texinfo (Language and Grammar): In example, "int" is a
4308 keyword, not an identifier. Problem reported by Baron Schwartz in
4309 <http://lists.gnu.org/archive/html/bug-bison/2004-10/msg00017.html>.
4311 2004-10-11 Akim Demaille <akim@epita.fr>
4313 * src/symtab.c (symbol_check_alias_consistency): Also check
4314 type names, destructors, and printers.
4315 Reported by Alexandre Duret-Lutz.
4316 Recode the handling of associativity and precedence in terms
4317 of symbol_precedence_set.
4318 Accept no redeclaration at all, not even equal to the previous
4320 (redeclaration): New.
4321 Use it to factor redeclaration complaints.
4322 (symbol_make_alias): Don't set the type of the alias, let
4323 symbol_check_alias_consistency do it as for other features.
4324 * src/symtab.h (symbol): Add new member prec_location, and
4326 * src/symtab.c (symbol_precedence_set, symbol_type_set): Set them.
4327 * tests/input.at (Incompatible Aliases): New.
4329 2004-10-09 Paul Eggert <eggert@cs.ucla.edu>
4331 .cvsignore fixes to accommodate gnulib changes,
4332 and the practice of naming build directories "_build".
4333 * .cvsignore: Add "_*". Sort.
4334 * lib/.cvsignore: Add getopt_.h, xalloc-die.c.
4335 * m4/.cvsignore: Add "*_gl.m4".
4337 2004-10-06 Akim Demaille <akim@epita.fr>
4339 * src/parse-gram.y (add_param): Fix the truncation of trailing
4342 2004-10-05 Akim Demaille <akim@epita.fr>
4344 In Bison 1.875's yacc.c, YYLLOC_DEFAULT was called regardless
4345 whether the reducion was empty or not. This leaves room to
4346 improve the use of YYLLOC_DEFAULT in such a case.
4347 lalr1.cc is still experimental, so changing this is acceptable.
4348 And finally, there are probably not many users who changed the
4349 handling of locations in GLR, so changing is admissible too.
4351 * data/glr.c, data/lalr1.cc, data/yacc.c (YYLLOC_DEFAULT): On an
4352 empty reduction, set @$ to an empty location ending the previously
4354 Adjust uses to make sure the code is triggered on empty
4356 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust the
4357 expected output: empty reductions have empty locations.
4359 2004-09-29 Akim Demaille <akim@epita.fr>
4361 * data/lalr1.cc: Move towards a more standard C++ coding style
4362 for templates: Class < T > -> Class<T>.
4364 2004-09-29 Akim Demaille <akim@epita.fr>
4366 * data/lalr1.cc: Reinstall the former ctor, for sake of
4367 compatibility, but warn it will be removed.
4368 Move towards a more standard C++ coding style (i.e., type *var ->
4371 2004-09-27 Paul Eggert <eggert@cs.ucla.edu>
4373 * src/parse-gram.y (add_param): Rewrite to avoid strchr,
4374 since it's less likely to work if NULs are involved in the future.
4376 2004-09-27 Akim Demaille <akim@epita.fr>
4378 * data/yacc.c (YY_LOCATION_PRINT): Fix its default declaration.
4380 2004-09-27 Akim Demaille <akim@epita.fr>
4382 * data/lalr1.cc (b4_parse_param_decl_1): New.
4383 (b4_parse_param_decl): Use it to have different names between attribute
4385 (b4_cc_constructor_call): Likewise.
4387 2004-09-24 Akim Demaille <akim@epita.fr>
4389 * src/parse-gram.y (add_param): Strip the leading and trailing
4390 blanks from a formal argument declaration.
4391 (YY_LOCATION_PRINT): New.
4393 2004-09-24 Akim Demaille <akim@epita.fr>
4395 * data/c.m4 (b4_yysymprint_generate): Move the YYINPUT invocation
4398 2004-09-24 Akim Demaille <akim@epita.fr>
4400 * doc/bison.texinfo (Table of Symbols): Sort.
4402 2004-09-21 Akim Demaille <akim@epita.fr>
4404 * data/yacc.c, data/glr.c (b4_at_dollar, b4_dollar_dollar): Remove
4405 the useless parentheses.
4406 Suggested by Paul Eggert.
4408 2004-09-20 Akim Demaille <akim@epita.fr>
4410 Let the initial-action act on the look-ahead, and use it for the
4411 "initial push" (corresponding to an hypothetical beginning-of-file).
4412 And let lalr1.cc honor %initial-action.
4414 * doc/bison.texinfo (Initial Action Decl): Clarify, and add an
4416 * data/lalr1.cc (Parser::initlocation_): Remove, bad experiment.
4417 (Parser::Parser): Remove the ctor that used to initialize it.
4418 (Parser::parse): Like in the other skeletons, issue the "starting
4419 parse" message before any action.
4420 Honor %initial-action.
4421 Initialize the stacks with the lookahead.
4422 * data/yacc.c: Let $$ and @$ in %initial-action designate the
4424 Push them in the stacks.
4425 * tests/actions.at, tests/calc.at: Adjust the C++ ctor invocations.
4427 2004-09-20 Akim Demaille <akim@epita.fr>
4429 * doc/bison.texinfo (Initial Action Decl): New.
4431 2004-09-20 Akim Demaille <akim@epita.fr>
4433 * data/yacc.c (YY_LOCATION_PRINT): Use YYLTYPE_IS_TRIVIAL as a
4434 clearer criterion to define it.
4435 (parse): Initialize the initial location when YYLTYPE_IS_TRIVIAL.
4436 When reducing on an empty RHS, use the latest stacked location as
4438 yylloc is not always available.
4439 * data/glr.c: Likewise.
4440 Also, honor initial-actions.
4442 2004-09-20 Akim Demaille <akim@epita.fr>
4444 * data/yacc.c (YY_LOCATION_PRINT): New.
4445 Define when we know YYLTYPE's structure, i.e., when the default
4446 YYLLOC_DEFAULT is used.
4447 * data/c.m4 (b4_yysymprint_generate): Use it.
4448 * data/lalr1.cc (YYLLOC_DEFAULT): Stop relying on the initial
4449 value of the result.
4450 (error_start_): Replace with...
4451 (error_range_): this location array.
4452 This allows to replace code relying on the implementation of
4453 locations by portable code.
4454 * data/yacc.c (yylerrsp): Replace with...
4455 (yyerror_range): this.
4456 Every time a token is popped, update yyerror_range[0], to have an
4457 accurate location for the error token.
4458 * data/glr.c (YY_LOCATION_PRINT): New.
4459 (yyprocessOneStack): Fix an invocation of YY_SYMBOL_PRINT:
4460 deference a pointer.
4461 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): No longer
4462 report the location in %printers.
4464 * src/scan-skel.l: Instead of abort, report error messages to ease
4465 understanding skeleton scanning failures.
4467 2004-09-16 Akim Demaille <akim@epita.fr>
4469 * data/lalr1.cc (Stack::Iterator, Stack::ConstIterator): Rename as...
4470 (iterator, const_iterator): these, to be more in the C++ spirit.
4471 Also, return reverse iterators so that when displaying the stack
4472 we display its bottom first.
4473 (Parser::stack_print_, Parser::reduce_print_): Match the messages
4475 We should probably use vector here though.
4477 2004-09-16 Akim Demaille <akim@epita.fr>
4479 Have more complete shift traces.
4481 * data/yacc.c, data/lalr1.c, data/glr.c: Use YY_SYMBOL_PRINT
4482 to report Shifts instead of ad hoc YYDPRINTF invocations,
4483 including for the error token.
4484 * data/lalr1.cc (symprint_): Output the location.
4485 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): In C++, don't
4486 output the location within the %printer.
4487 Activate GLR tests, at least to make sure they compile properly.
4488 They still don't pass though.
4489 * tests/calc.at: Adjust expect verbose output, since now "Entering
4490 state..." is on a different line than the "Shifting" message.
4492 2004-09-08 Akim Demaille <akim@epita.fr>
4494 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Move the
4495 Bison directive from the Bison file to the invocation of this
4496 macro, so that these directives are passed to
4497 AT_BISON_OPTION_PUSHDEFS to get correct help macros.
4498 Use these helping macros (e.g., AT_LOC, AT_VAL and so forth).
4499 Move the AT_SETUP/AT_CLEANUP outside, to report as test title
4500 the extra Bison directives instead of the whole series.
4501 Change the grammar so that there are recoverable errors, and
4502 unrecoverable errors. Now we can have the parser give up before
4503 consuming the whole input. As a result we now can observe that
4504 the lookahead is freed when needed.
4505 Change the parser source to parse argv[1] instead of a hard coded
4507 Simplify yylex, and give a value and location to EOF.
4508 Simplify some invocations of AT_CHECK_PRINTER_AND_DESTRUCTOR that
4509 passed directives already coded in the file.
4510 Add some tests to check the location of "error".
4511 For some tests, the C++ parser is correct, and not yacc.c.
4512 For other tests, they provide different, but unsatisfying, values,
4513 so keep the C++ value so that at least one parser is "correct"
4514 according to the test suite.
4515 (Actions after errors): Remove, this is subsumed by the
4516 AT_CHECK_PRINTER_AND_DESTRUCTOR series.
4518 2004-09-06 Akim Demaille <akim@epita.fr>
4520 * data/lalr1.cc: Adjust the indentation of the labels.
4524 2004-09-06 Akim Demaille <akim@epita.fr>
4526 * data/yacc.cc, data/glr.cc (yydestruct): Accept an additional
4527 argument, an informative message.
4528 Call YY_SYMBOL_PRINT.
4529 Adjust all callers: integrate the associated YY_SYMBOL_PRINT.
4530 * data/lalr1.cc (destruct_): Likewise.
4531 In addition, no longer depend on b4_yysymprint_generate and
4532 b4_yydestruct_generate to generate these functions, do it "by
4535 2004-09-03 Akim Demaille <akim@epita.fr>
4537 * data/glr.c, data/lalr1.cc, data/yacc.c: When YYABORT was
4538 invoked, yydestruct the lookahead.
4539 * tests/calc.at (Calculator $1): Update the expected lengths of
4540 traces: there is an added line for the discarded lookahead.
4541 * doc/bison.texinfo (Destructor Decl): Some rewording.
4542 Define "discarded" symbols.
4544 2004-09-02 Akim Demaille <akim@epita.fr>
4546 * data/lalr1.cc (translate_, destruct_): No reason to be static.
4548 2004-09-02 Akim Demaille <akim@epita.fr>
4550 * data/glr.c, yacc.c (YYDSYMPRINT): Remove, not used.
4551 (YYDSYMPRINTF): Rename as...
4552 (YY_SYMBOL_PRINT): this.
4553 * data/lalr1.cc (YY_SYMBOL_PRINT): New, modeled after the previous
4555 Use it instead of direct symprint_ calls.
4556 (yybackup): Tweak the "Now at end of input" case to match yacc.c's
4559 2004-09-02 Akim Demaille <akim@epita.fr>
4561 * data/lalr1.cc (b4_yysymprint_generate): New.
4562 (symprint_): New member function, defined when YYDEBUG.
4563 Use it consistently instead of token/nterm debugging output by
4565 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust
4566 %printer calls to use cdebug_ when using lalr1.cc.
4568 2004-08-30 Florian Krohm <florian@edamail.fishkill.ibm.com>
4570 * data/glr.c: Guard the declarations of yypstack and yypdumpstack
4571 with #ifdef YYDEBUG.
4573 2004-08-26 Akim Demaille <akim@epita.fr>
4575 * doc/bison.texinfo (Implementing Loops): Rename as...
4576 (Implementing Gotos/Loops): this.
4578 2004-08-13 Paul Eggert <eggert@cs.ucla.edu>
4580 Adjust to latest gnulib.
4581 * bootstrap (gnulib_modules): Add xalloc-die.
4582 Set LC_ALL=C so that file names sort consistently.
4583 Prefer the gnulib copies of gettext.m4, glibc21.m4,
4584 inttypes_h.m4, lib-ld.m4, lib-prefix.m4, po.m4, stdint_h.m4,
4585 uintmax_t.m4, ulonglong.m4.
4586 (intl_files_to_remove): Add gettext.m4, lib-ld.m4, lib-prefix.m4,
4587 po.m4 since we are now using _gl.m4 instead.
4589 2004-08-10 Florian Krohm <florian@edamail.fishkill.ibm.com>
4591 * src/scan-action.l: Remove. Scanning of semantic actions is
4592 handled in scan-gram.l.
4594 2004-08-07 Florian Krohm <florian@edamail.fishkill.ibm.com>
4596 * src/scan-gram.l (handle_syncline): Use uniqstr_new not xstrdup.
4598 * src/location.h (struct): The file member is a uniqstr.
4599 (equal_boundaries): Use UNIQSTR_EQ for comparison.
4601 2004-07-22 Paul Eggert <eggert@cs.ucla.edu>
4603 Fix bug with non-%union parsers that have printers or destructors,
4604 which led to a Bison core dump. Reported by Peter Fales in
4605 <http://lists.gnu.org/archive/html/bug-bison/2004-07/msg00014.html>.
4607 * data/c.m4 (b4_symbol_actions): Don't assume %union was used.
4608 * data/lalr1.cc (yystype) [defined YYSTYPE]: Define to YYSTYPE,
4609 not to our own type.
4610 * src/output.c (symbol_destructors_output, symbol_printers_output):
4611 Don't assume %union.
4612 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR,
4613 AT_CHECK_PRINTER_AND_DESTRUCTOR): New argument
4614 UNION-FLAG. All callers changed.
4615 (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Don't assume %union.
4616 Use type char, not unsigned int, when declaring an array of char;
4617 this lets us remove a cast.
4618 (Printers and Destructors): Add non-%union test cases.
4620 2004-06-21 Paul Eggert <eggert@cs.ucla.edu>
4622 * doc/bison.texinfo: Minor editorial changes, mostly to the new
4623 GLR writeups. E.g., avoid frenchspacing and the future tense,
4624 change "lookahead" to "look-ahead", and change "wrt" to "with
4627 2004-06-21 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
4629 * doc/bison.texinfo (Merging GLR Parses, Compiler Requirements):
4630 New sections, split off from the GLR Parsers section. Put the new
4631 Simple GLR Parser near the start of the GLR section, for clarity.
4632 Rewrite connective text.
4634 2004-06-21 Frank Heckenbach <frank@g-n-u.de>
4636 * doc/bison.texinfo (Simple GLR Parsers): New section.
4638 2004-06-21 Paul Eggert <eggert@cs.ucla.edu>
4640 * NEWS, TODO, doc/bison.texinfo:
4641 Use "look-ahead" instead of "lookahead", to be consistent.
4642 * REFERENCES: Fix incorrect reference to DeRemer and Pennello,
4643 while we're fixing "look-ahead".
4644 * src/conflicts.c (shift_set): Renamed from shiftset.
4645 (look_ahead_set): Renamed from lookaheadset.
4646 * src/print.c: Likewise.
4647 * src/getargs.c (report_args): Add "look-ahead" as the new canonical
4648 name for "lookahead".
4649 (report_types, usage): Likewise.
4650 * src/getargs.h (report_look_ahead_tokens): Renamed from
4652 * src/lalr.c (compute_look_ahead_tokens): Renamed from
4654 (state_look_ahead_tokens_count): Renamed from state_lookaheads_count.
4655 (look_ahead_tokens_print): Renamed from lookaheads_print.
4656 * src/state.c (state_rule_look_ahead_tokens_print): Renamed from
4657 state_rule_lookaheads_print.
4658 * src/state.h: Likewise.
4659 (reductions.look_ahead_tokens): Renamed from lookaheads.
4660 * tests/torture.at (AT_DATA_LOOK_AHEAD_TOKENS_GRAMMAR): Renamed from
4661 AT_DATA_LOOKAHEADS_GRAMMAR.
4663 2004-06-03 Paul Eggert <eggert@cs.ucla.edu>
4665 * README: Update location of patched M4 distribution.
4667 2004-05-30 Albert Chin-A-Young <china@thewrittenword.com>
4669 Don't assume the C++ compiler takes the same arguments as the C compiler
4671 * configure.ac (O0CXXFLAGS): New var.
4672 * tests/atlocal.in (CXXFLAGS): Use it.
4674 2004-05-29 Paul Eggert <eggert@cs.ucla.edu>
4676 Fix some "make check" problems with C++ reported by
4677 Albert Chin-A-Young for Tru64 C++ in this thread:
4678 http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00049.html
4680 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check for std::cerr.
4681 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
4682 Output to a .cc file for C++, not to a .c file.
4683 * tests/calc.at (AT_CHECK_CALC): Likewise.
4684 * tests/regression.at (AT_CHECK_DANCER): Likewise.
4685 * tests/local.at (AT_COMPILE_CXX): Default to OUTPUT.cc, not OUTPUT.c.
4687 2004-05-28 Albert Chin-A-Young <china@thewrittenword.com>
4689 * tests/calc.at, tests/actions.at: Workaround for SGI
4690 C++ compiler. (trivial change)
4692 2004-05-27 Paul Eggert <eggert@cs.ucla.edu>
4694 Spent a few hours checking out which prerequisite versions the
4695 current sources actually require. I went all the way back to
4696 Gettext 0.10.40, Automake 1.4, and Autoconf 2.57 and investigated
4697 a seemingly endless set of combinations of versions more recent
4698 than that. The bottom line is that the current sources require
4699 fairly recent versions of the build tools, and it'll be some work
4701 * configure.ac (AC_PREREQ): Increase from 2.58 to 2.59.
4702 (AM_INIT_AUTOMAKE): Increase from 1.7 to 1.8.
4703 (AM_GNU_GETTEXT_VERSION): Increase from 0.11.5 to 0.12.
4704 Add comments explaining why those particular versions are
4707 * src/parse-gram.y (lloc_default): Rewrite to avoid compiler bug
4708 in SGI MIPSpro 7.4.1m. Problem reported by Albert Chin-A-Young in
4709 <http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00037.html>.
4711 * configure.ac (AC_PREREQ): Bump to 2.58, since 2.57 doesn't work
4712 (it fails with a Autoconf-without-aclocal-m4 diagnostic).
4714 2004-05-26 Paul Eggert <eggert@cs.ucla.edu>
4716 * configure.ac (AM_GNU_GETTEXT_VERSION): Lower it from 0.14.1 to
4717 0.11.5. Suggested by Bruno Haible.
4718 * bootstrap: Remove gettext version checking.
4720 * doc/bison.texinfo (Decl Summary): Also mention that %union
4721 can depend on prerequisite types. Problem reported by Tim
4724 2004-05-25 Paul Eggert <eggert@cs.ucla.edu>
4726 * README: Mention GNU m4 1.4 bugs and Akim's patched version.
4727 * README-alpha: Don't tell people not to package this.
4729 * bootstrap: Don't assume $(...) works; use `...` instead.
4730 Problem reported by Paul Hilfinger. Also, diagnose non-GNU
4733 * doc/bison.texinfo (Decl Summary, Bison Options): Clarify what's
4734 put into the -d output file, and mention what to do if YYSTYPE is
4737 2004-05-24 Paul Eggert <eggert@cs.ucla.edu>
4739 Undo change made earlier today: it caused autopoint to not bring
4740 in ABOUT-NLS. Ouch. Instead, substitute our own diagnostic for
4743 * bootstrap: Check that gettext version matches what's in
4744 configure.ac. Warn users to ignore robots.txt ERROR 404.
4745 * bootstrap: Undo today's earlier change (logged below).
4746 * configure.ac (AM_GNU_GETTEXT_VERSION): Likewise.
4748 The gettext version checking is causing more trouble than it's
4749 curing; remove it. Problem reported by Paul Hilfinger.
4751 * bootstrap: Issue a warning that one can expect a message
4752 'AM_GNU_GETTEXT is used, but not AM_GNU_GETTEXT_VERSION'.
4753 * configure.ac (AM_GNU_GETTEXT_VERSION): Remove.
4755 2004-05-23 Paul Eggert <eggert@cs.ucla.edu>
4757 Ensure that the C++ compiler used for testing actually works on a
4758 simple test program; if not, skip the C++-related tests. Problem
4759 reported by Vin Shelton in:
4760 http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00026.html
4762 * m4/cxx.m4: New file.
4763 * configure.ac (BISON_TEST_FOR_WORKING_CXX_COMPILER): Add.
4764 * tests/atlocal.in (BISON_CXX_WORKS): Add.
4765 * tests/local.at (AT_COMPILE_CXX): Use it.
4767 2004-05-21 Paul Eggert <eggert@cs.ucla.edu>
4769 * data/glr.c (yylloc): Output this macro even if locations are not
4770 being generated, as the GLR parser needs it even in that case.
4771 Problem reported by Troy A. Johnson
4772 <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=195946>.
4774 * configure.ac (AC_INIT): Update to 1.875e.
4776 2004-05-21 Paul Eggert <eggert@cs.ucla.edu>
4778 * NEWS: Version 1.875d.
4779 * configure.ac (AC_INIT): Likewise.
4780 * src/parse-gram.c, src/parse-gram.h: Regenerate with 1.875d.
4782 * configure.ac (--enable-gcc-warnings): Do not enable -Wshadow,
4783 -Wmissing-prototypes, or -Wstrict-prototypes for C++. The current
4784 lalr1.cc runs afoul of the first, and the last two are no longer
4785 supported by GCC 3.4.0.
4786 * README: Mention GNU m4 1.4 or later; mention m4 patches.
4787 * HACKING: Use ./bootstrap, not "make update" to import foreign files.
4789 2004-05-06 Paul Eggert <eggert@cs.ucla.edu>
4791 * src/muscle_tab.c (hash_muscle): Accept and return size_t, not
4792 unsigned int, for compatibility with latest gnulib hash module.
4793 * src/state.c (state_hash, state_hasher): Likewise.
4794 * src/symtab.c (hash_symbol, hash_symbol_hasher): Likewise.
4795 * src/uniqstr.c (hash_uniqstr): Likewise.
4797 2004-05-03 Paul Eggert <eggert@cs.ucla.edu>
4799 * NEWS: Unescaped newlines are no longer allowed in char & strings.
4801 * src/scan-gram.l (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER,
4802 SC_CHARACTER,SC_STRING>): Reject unescaped newlines in
4803 character and string literals.
4804 (unexpected_end): New function.
4805 (unexpected_eof): Use it.
4806 (unexpected_newline): New function.
4807 (<INITIAL,SC_AFTER_IDENTIFIER,SC_PRE_CODE>): Coalesce duplicate
4810 * NEWS: Document %expect-rr.
4812 * bootstrap (--gnulib-srcdir=*, --cvs-user=*):
4813 Fix typo by replacing $1 with $option.
4814 Remove more 'intl'-related files.
4815 Don't DEFUN AM_INTL_SUBDIR twice.
4817 * lib/.cvsignore: Add strndup.h. Remove memchr.c, memcmp.c,
4818 memrchr.c, strcasecmp.c, strchr.c, strrchr.c, strspn.c, strtol.c,
4820 * m4/.cvsignore: Add exitfail.m4, extensions.m4, gnulib.m4,
4821 hard-locale.m4, mbstate_t.m4, strerror_r.m4, strndup.m4,
4822 xstrndup.m4. Remove glibc21.m4, intdiv0.m4, inttypes-pri.m4,
4823 inttypes.m4, inttypes_h.m4, isc-posix.m4, lcmessage.m4,
4824 stdint_h.m4, uintmax_t.m4, ulonglong.m4.
4825 * src/.cvsignore: Add *.output.
4827 * src/parse-gram.y: Put copyright notice inside %{ %} so it
4828 gets copied to the output file.
4830 2004-04-28 Paul Eggert <eggert@twinsun.com>
4832 Get files from the gnulib and po repositories, instead of relying
4833 on them being in our CVS. Upgrade to latest versions of gnulib
4836 * Makefile.am (SUBDIRS): Remove m4; Automake now does m4.
4837 * bootstrap: Bootstrap from gnulib and po repositories.
4838 Much of this code was stolen from GNU diff and GNU tar's bootstrap.
4839 * README-cvs: Document these changes. Remove version numbers from
4840 mentions of build tools, since they change so often. Mention Flex.
4842 * configure.ac (AC_CONFIG_MACRO_DIR): Add, with m4 as arg.
4843 (gl_USE_SYSTEM_EXTENSIONS): Add.
4844 (AC_GNU_SOURCE, AC_AIX, AC_MINIX):
4845 Remove; no longer needed, as gl_USE_SYSTEM_EXTENSIONS
4847 (AC_ISC_POSIX): Remove; we no longer support this
4848 ancient OS, as it gets in the way of latest Autoconf & gnulib.
4849 (AC_HEADER_STDC): Remove: we now assume C89 or better.
4850 (AC_CHECK_HEADERS_ONCE): Use instead of AC_CHECK_HEADERS.
4851 Do not check for C89 headers, except for locale.h which is used
4852 by the Yacc library and must port to K&R hosts.
4853 (AC_CHECK_FUNCS_ONCE): Use instead of AC_CHECK_FUNCS.
4854 Do not check for C89 functions, except for setlocale which is
4855 used by the Yacc library.
4856 (AC_CHECK_DECLS, AC_REPLACE_FUNCS): Remove; no longer needed.
4857 (gl_DIRNAME, gl_ERROR, gl_FUNC_ALLOCA, gl_FUNC_MEMCHR,
4858 gl_FUNC_MEMRCHR, gl_FUNC_STPCPY, gl_FUNC_STRNLEN, gl_FUNC_STRTOL,
4859 gl_GETOPT, gl_HASH, gl_MBSWIDTH, gl_OBSTACK, gl_QUOTE,
4860 gl_QUOTEARG, gl_XALLOC, jm_FUNC_GLIBC_UNLOCKED_IO, jm_FUNC_MALLOC,
4861 AM_GNU_GETTEXT): Remove; now done by:
4862 (GNULIB_AUTOCONF_SNIPPET): Add. "bootstrap" builds this for us.
4863 (AC_CONFIG_FILES): Remove m4/Makefile, as Automake now does this
4866 * lib/Makefile.am: Include gnulib.mk, built for us by "bootstrap".
4867 (BUILT_SOURCES, EXTRA_DIST, MOSTLYCLEANFILES):
4868 Define to empty, as gnulib.mk will do the rest for us.
4869 ($(libbison_a_OBJECTS), stdbool.h): Remove, as gnulib.mk does this
4871 (libbison_a_SOURCES): Define to $(lib_SOURCES) now.
4872 (lib_SOURCES): New symbol, containing only the non-gnulib libs.
4874 * src/files.c: Include gnulib's xstrndup.h.
4876 * src/system.h (MALLOC): Use xnmalloc, for better overflow checking.
4877 (REALLOC): Use xnrealloc, for likewise.
4878 (xstrndup, stpcpy): Remove decls, as gnulib does this for us now.
4879 (strnlen, memrchr): Remove decls; functions no longer used.
4882 * config/depcomp, config/install-sh, lib/alloca.c, lib/argmatch.c,
4883 lib/argmatch.h, lib/basename.c, lib/dirname.c, lib/dirname.h,
4884 lib/error.c, lib/error.h, lib/getopt.c, lib/getopt.h,
4885 lib/getopt1.c, lib/gettext.h, lib/hash.c, lib/hash.h,
4886 lib/malloc.c, lib/mbswidth.c, lib/mbswidth.h, lib/memchr.c,
4887 lib/memcmp.c, lib/memrchr.c, lib/obstack.c, lib/obstack.h,
4888 lib/quote.c, lib/quote.h, lib/quotearg.c, lib/quotearg.h,
4889 lib/realloc.c, lib/stdbool_.h, lib/stpcpy.c, lib/strcasecmp.c,
4890 lib/strchr.c, lib/strncasecmp.c, lib/strnlen.c, lib/strrchr.c,
4891 lib/strspn.c, lib/strtol.c, lib/strtoul.c, lib/unlocked-io.h,
4892 lib/xalloc.h, lib/xmalloc.c, lib/xstrdup.c, lib/xstrndup.c,
4893 m4/Makefile.am, m4/alloca.m4, m4/dirname.m4, m4/dos.m4,
4894 m4/error.m4, m4/getopt.m4, m4/hash.m4, m4/malloc.m4,
4895 m4/mbrtowc.m4, m4/mbswidth.m4, m4/memchr.m4, m4/memcmp.m4,
4896 m4/memrchr.m4, m4/obstack.m4, m4/onceonly.m4, m4/prereq.m4,
4897 m4/quote.m4, m4/quotearg.m4, m4/realloc.m4, m4/stdbool.m4,
4898 m4/stpcpy.m4, m4/strnlen.m4, m4/strtol.m4, m4/strtoul.m4,
4899 m4/unlocked-io.m4, m4/xalloc.m4, po/LINGUAS, po/Makefile.in.in,
4900 po/Makevars, po/da.po, po/de.po, po/es.po, po/et.po, po/fr.po,
4901 po/hr.po, po/id.po, po/it.po, po/ja.po, po/ms.po, po/nl.po,
4902 po/pt_BR.po, po/ro.po, po/ru.po, po/sv.po, po/tr.po:
4903 Remove, as these files are now generated automatically
4904 by bootstrap or automake.
4906 * po/ChangeLog: Remove: all but one entry was a duplicate
4907 of this file, and I moved that 2000-11-02 entry here.
4909 * config/.cvsignore: Add Makefile, depcomp, install-sh.
4910 * lib/.cvsignore: Add alloca.c, alloca.h, alloca_.h, argmatch.c,
4911 argmatch.h, basename.c, dirname.c, dirname.h, error.c, error.h,
4912 exit.h, exitfail.c, exitfail.h, getopt.c, getopt.h, getopt1.c,
4913 getopt_int.h, gettext.h, gnulib.mk, hard-locale.c, hard-locale.h,
4914 hash.c, hash.h, malloc.c, mbswidth.c, mbswidth.h, memchr.c,
4915 memcmp.c, memrchr.c, obstack.c, obstack.h, quote.c, quote.h,
4916 quotearg.c, quotearg.h, realloc.c, stdbool_.h, stpcpy.c, stpcpy.h,
4917 strcasecmp.c, strchr.c, stripslash.c, strncasecmp.c, strndup.c,
4918 strnlen.c, strrchr.c, strspn.c, strtol.c, strtoul.c,
4919 unlocked-io.h, xalloc.h, xmalloc.c, xstrdup.c, xstrndup.c,
4921 * m4/.cvsignore: Remove Makefile, Makefile.in. Add alloca.m4,
4922 dirname.m4, dos.m4, error.m4, getopt.m4, hash.m4, mbrtowc.m4,
4923 mbswidth.m4, obstack.m4, onceonly.m4, quote.m4, quotearg.m4,
4924 stdbool.m4, stpcpy.m4, strnlen.m4, unlocked-io.m4, xalloc.m4.
4925 * po/.cvsignore: Add *.po, LINGUAS, Makefile.in.in, Makevars.
4926 * src/.cvsignore: Remove *_.c.
4929 * Makefile.maint (GZIP_ENV): Don't use --rsyncable if gzip doesn't
4930 support it. (The latest stable gzip doesn't.)
4932 2004-04-27 Paul Eggert <eggert@twinsun.com>
4934 * data/lalr1.cc (Parser::stos_) [! YYDEBUG]: Define even in this
4935 case, as stos_ is now used by destructors due to the 2004-02-09
4938 Remove more K&R C support.
4939 * lib/libiberty.y (PARAMS): Remove. All uses removed.
4940 * lib/subpipe.c (errno): Remove decl.
4941 Include <stdlib.h> unconditionally.
4942 (EXIT_FAILURE): Remove macro.
4943 * src/complain.c (vfprintf, strerror): Remove.
4944 * src/system.h: Include limits.h, stdlib.h, string.h, locale.h
4946 (EXIT_FAILURE, EXIT_SUCCESS, setlocale): Remove defns.
4947 Use latest Autoconf recommendations for including inttypes.h, stdint.h.
4948 (strchr, strspn, memchr): Remove decls.
4949 * tests/calc.at (_AT_DATA_CALC_Y): Include stdlib.h, string.h
4950 unconditionally. Do not declare perror.
4951 * tests/conflicts.at (%nonassoc and eof): Include stdlib.h
4954 * src/complain.c (_): Remove useless defn, as system.h defines this.
4956 * lib/bitset.h (__INT_TO_PTR): Remove; workaround no longer needed
4957 with latest obstack.h.
4958 * lib/ebitset.c (ebitset_elt_alloc): Don't bother to cast args
4959 to procedure types, as obstack.h now does that for us.
4960 * lib/lbitset.c (lbitset_elt_alloc): Likewise.
4962 * lib/subpipe.h [HAVE_SYS_TYPES_H]: Include <sys/types.h>,
4963 so that this include file can stand alone.
4964 * lib/subpipe.c: Do not include <sys/types.h>, as subpipe.h
4965 does this now. Include subpipe.h first after config.h, to
4966 test whether it can stand alone.
4968 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Don't
4969 declare yyerror when using lalr.cc, as GCC 3.4.0 warns about the
4972 * tests/synclines.at (%union synch line): Put a dummy member in
4973 the union, because empty unions aren't allowed in C. Caught
4976 2004-04-13 Jim Meyering <jim@meyering.net>
4978 * src/conflicts.c (conflicts_print): Correct format string typo:
4979 use `%%' to produce literal `%'. (trivial change)
4981 2004-03-30 Paul Eggert <eggert@twinsun.com>
4983 * src/getargs.c (version): Update copyright year to 2004.
4985 * data/c.m4 (b4_int_type): Use 'short int' rather than
4986 'short', and similarly for 'long', 'unsigned', etc.
4987 * data/glr.c (YYTRANSLATE, yyconfl, yySymbol, yyItemNum,
4988 yygetLRActions, yyprocessOneStack, yyrecoverSyntaxError,
4989 yy_yypstack, yydumpstack): Likewise.
4990 * data/lalr1.cc (user_token_number_max_, user_token_number_max_,
4991 translate_, seq_, [], pop, Slice, range_, operator+, operator+=):
4993 * data/yacc.c (b4_int_type, yyss, YYSTACK_BYTES, yysigned_char,
4994 yy_stack_print, yyparse): Likewise.
4995 * doc/bison.texinfo (Prologue, Multiple Types): Likewise.
4996 * lib/bbitset.h (bitset_word, BITSET_WORD_BITS): Likewise.
4997 * lib/bitset.c (bitset_print): Likewise.
4998 * lib/bitset_stats.c (bitste_log_histogram_print): Likewise.
4999 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
5000 * lib/bitsetv.c (bitsetv_dump): Likewise.
5001 * lib/ebitset.c (EBITSET_ELT_BITS, ebitset_elt_alloc): Likewise.
5002 * lib/lbitset.c (LBITSET_ELT_BITS, lbitset_elt_alloc, debug_lbitset):
5004 * src/LR0.c (allocate_itemsets): Likewise.
5005 * src/gram.h (rule_number, rule): Likewise.
5006 * src/lalr.h (goto_number): Likewise.
5007 * src/nullable.c (nullable_compute): Likewise.
5008 * src/output.c (prepare_rules): Likewise.
5009 * src/relation.c (relation_print, relation_digraph): Likewise.
5010 * src/relation.h (relation_node): Likewise.
5011 * src/state.h (state_number, transitions, errs, reductions,
5012 struct state): Likewise.
5013 * src/symtab.h (symbol_number, struct symbol): Likewise.
5014 * src/tables.c (vector_number, tally, action_number,
5015 default_goto, goto_actions): Likewise.
5016 * tests/existing.at (GNU Cim Grammar): Likewise.
5017 * tests/regression.at (Web2c Actions): Likewise.
5019 * src/output.c (muscle_insert_short_int_table): Renamed from
5020 muscle_insert_short_table. All uses changed.
5022 2004-03-25 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
5024 * src/parse-gram.y: Define PERCENT_EXPECT_RR.
5025 (declaration): Replace expected_conflicts with expected_sr_conflicts.
5026 Add %expect-rr rule.
5028 * src/scan-gram.l: Recognize %expect-rr.
5030 * src/conflicts.h (expected_sr_conflicts): Rename from
5032 (expected_rr_conflicts): Declare.
5034 * src/conflicts.c (expected_sr_conflicts): Rename from
5036 (expected_rr_conflicts): Define.
5037 (conflicts_print): Check r/r conflicts against expected_rr_conflicts
5039 Use expected_sr_conflicts in place of expected_conflicts.
5040 Warn if expected_rr_conflicts used in non-GLR parser.
5042 * doc/bison.texinfo: Add documentation for %expect-rr.
5044 2004-03-08 Paul Eggert <eggert@gnu.org>
5046 Add support for hex token numbers. Suggested by Odd Arild Olsen in
5047 <http://lists.gnu.org/archive/html/bison-patches/2004-03/msg00000.html>.
5049 * NEWS: Document hexadecimal tokens, no NUL bytes, %destructor
5051 * doc/bison.texinfo (Token Decl): Add hexadecimal token numbers.
5052 * src/scan-gram.l (scan_integer): New function.
5054 (0[xX][0-9abcdefABCDEF]+): New pattern, to support hex numbers.
5055 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>, \\x[0-9abcdefABCDEF]+,
5056 handle_action_dollar, handle_action_at, convert_ucn_to_byte):
5057 Say "long int", not "long", for uniformity with GNU style.
5059 2004-02-25 Paul Eggert <eggert@twinsun.com>
5061 * tests/local.at (AT_COMPILE, AT_COMPILE_CXX): Ignore stdout from
5062 compilers. This fixes a problem with Intel's C++ compiler being
5063 chatty, reported by Guido Trentalancia in
5064 <http://lists.gnu.org/archive/html/bug-bison/2004-02/msg00030.html>.
5066 2004-02-09 Alexandre Duret-Lutz <adl@gnu.org>
5068 Support %destructor and merge error locations in lalr1.cc.
5070 * data/lalr1.cc (b4_cxx_destruct_def): New macro.
5071 (Parser::stos_): Define unconditionally.
5072 (Parser::destruct_): New method. Generate its body with
5073 b4_yydestruct_generate.
5074 (Parser::error_start_): New attribute.
5075 (Parser::parse) <yyerrlab, yyerrlab1>: Call destruct_ on erroneous
5076 token which are discarded.
5077 (Parser::parse) <yyerrlab, yyerrorlab, yyerrlab1>: Update
5078 error_start_ when erroneous token are discarded.
5079 (Parser::parse) <yyerrlab1>: Compute the location of the error
5080 token so that it covers all the discarded tokens.
5081 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust so
5082 it can be called with `%skeleton "lalr1.cc"', and do that.
5084 2004-02-02 Paul Eggert <eggert@twinsun.com>
5086 * src/Makefile.am (AM_CPPFLAGS): New macro. It mentions
5087 $(top_srcdir)/lib and ../lib. This fixes a bug reported
5088 by Paul Hilfinger; the old INCLUDES value didn't mention ../lib.
5089 There's no need to mention top_builddir since Automake does that
5091 (INCLUDES): Remove, as Automake says it's obsolescent.
5092 Contents migrated into AM_CPPFLAGS as described above.
5093 * lib/Makefile.am (INCLUDES): Remove; obsolescent.
5095 2004-01-14 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
5097 * data/glr.c (yytokenName): Bullet-proof against YYEMPTY token.
5098 (yyreportSyntaxError): Handle case where lookahead token is
5101 2004-01-13 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
5103 * data/glr.c: Put casts on uses of YYREALLOC and YYMALLOC so that
5104 resulting parsers are compilable with C++.
5106 2003-12-23 Paul Eggert <eggert@twinsun.com>
5108 * config/depcomp, config/install-sh: Sync with Automake 1.8.
5109 * src/output.c (output_skeleton): Rename local var.
5110 * tests/input.at (Torturing the Scanner): Don't use \x0 or \0 in
5111 Bison tokens, as this runs afoul of the 2003-10-07 change that
5112 disallowed NUL bytes in character constants or string literals.
5114 * tests/local.at: Require Autoconf 2.59's Autotest.
5115 * tests/testsuite.at: Don't include local.at, since we now assume
5116 Autoconf 2.59 or later. Autoconf 2.59 had some problems with
5118 * tests/Makefile.am ($(TESTSUITE)): Remove warning about ignoring
5119 multiple inclusion warnings.
5121 2003-12-02 Akim Demaille <akim@epita.fr>
5123 * doc/bison.texinfo (How Can I Reset the Parser): More about start
5127 2003-11-18 Alexandre Duret-Lutz <adl@gnu.org>
5129 * doc/bison.texinfo (Bison Options): Escape `@' in `$@'.
5131 2003-10-07 Paul Eggert <eggert@twinsun.com>
5133 * tests/Makefile.am (clean-local): Don't run 'testsuite --clean'
5134 if testsuite doesn't exist.
5136 * doc/bison.texinfo (Symbols): NUL bytes are not allowed in string
5137 literals, unfortunately.
5138 * src/scan-gram.l (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>):
5139 Complain about NUL bytes in character constants or string literals.
5141 2003-10-05 Paul Eggert <eggert@twinsun.com>
5143 * NEWS: Don't document %no-default-prec, as it's still
5145 * doc/bison.texinfo: Document %no-default-prec only if
5146 the defaultprec flag is set. Normally it's not.
5148 2003-10-04 Paul Eggert <eggert@twinsun.com>
5150 * data/glr.c (b4_rhs_value, b4_rhs_location): Yield a
5151 non-modifiable lvalue, instead of a modifiable one.
5152 * doc/bison.texinfo (Actions): Document that $$ can
5153 be assigned to. Do not claim that $$ and $N are
5154 array element references: user code should not rely on this.
5156 2003-10-01 Paul Eggert <eggert@twinsun.com>
5158 * src/parse-gram.h (PERCENT_NO_DEFAULT_PREC): New token.
5159 (grammar_declaration): Use it.
5160 * src/scan-gram.l: New token %no-default-prec.
5161 * tests/conflicts.at: Revamp tests to use %no-default-prec.
5162 * NEWS, doc/bison.texinfo: Document the above.
5164 2003-10-01 Akim Demaille <akim@epita.fr>
5166 VCG no longer supports long_straight_phase.
5168 * src/vcg.c, src/vcg.h: Remove the handling of long_straight_phase.
5169 * src/print_graph.c (print_graph): Adjust.
5171 2003-09-30 Frank Heckenbach <frank@g-n-u.de>
5172 and Paul Eggert <eggert@twinsun.com>
5174 * doc/bison.texinfo (Decl Summary, Contextual Precedence,
5175 Table of Symbols): Document %default-prec.
5176 * src/parse-gram.y (PERCENT_DEFAULT_PREC): New token.
5177 (grammar_declaration): Set default_prec on %default-prec.
5178 * src/scan-gram.l (%default-prec): New token.
5179 * src/reader.h (default_prec): New flag.
5180 * src/reader.c: Likewise.
5181 (packgram): Handle it.
5182 * tests/conflicts.at (%default-prec without %prec,
5183 %default-prec with %prec, %default-prec 1): New tests.
5185 2003-09-30 Paul Eggert <eggert@twinsun.com>
5187 * tests/testsuite.at: Include local.at, not input.at, fixing
5188 a typo in the 2003-08-25 patch.
5190 2003-08-27 Akim Demaille <akim@epita.fr>
5192 * data/lalr1.cc (yyparse) [__GNUC__]: "Use" yyerrorlab to pacify
5195 2003-08-26 Akim Demaille <akim@epita.fr>
5197 * config/announce-gen (print_changelog_deltas): Neutralize "<#" as
5198 "<\#" to avoid magic from Gnus when posting parts of this script.
5200 2003-08-26 Akim Demaille <akim@epita.fr>
5202 * data/lalr1.cc (Parser::report_syntax_error_): New, extracted from
5203 (Parser::parse): here.
5204 Adjust: nerrs and errstatus is now replaced by...
5205 (Parser::nerrs_, Parser::errstatus_): New.
5207 2003-08-25 Akim Demaille <akim@epita.fr>
5209 * config/announce-gen, Makefile.cfg: New.
5210 * Makefile.am: Adjust.
5211 * GNUmakefile, Makefile.maint: Update from CVS Autoconf, but
5212 keeping local WGET and WGETFLAGS modifications from Paul Eggert.
5214 2003-08-25 Akim Demaille <akim@epita.fr>
5216 When reducing initial empty rules, Bison parser read an initial
5217 location that is not defined. This results in garbage, and that
5218 affects Bison's own parser. Therefore we need (i) to extend Bison
5219 to support a means to initialize this location, and (ii) to use
5220 this CVS Bison to fix CVS Bison's parser.
5222 * src/reader.h, reader.c (epilogue_augment): Remove, replace
5224 * src/muscle_tab.h, src/muscle_tab.c (muscle_code_grow): this.
5225 * src/parse-gram.y: Adjust.
5226 (%initial-action): New.
5227 (%error-verbose): Since we require CVS Bison, there is no reason
5229 * src/scan-gram.l: Adjust.
5230 * src/Makefile.am (YACC): New, to make sure we use our own parser.
5231 * data/yacc.c (yyparse): Use b4_initial_action.
5233 2003-08-25 Akim Demaille <akim@epita.fr>
5235 * doc/bison.texinfo: Don't promote stdout for error messages.
5237 2003-08-25 Akim Demaille <akim@epita.fr>
5239 * data/lalr1.cc (Parser::reduce_print_): Remove unused yyi.
5240 From Alexandre Duret-Lutz.
5242 2003-08-25 Akim Demaille <akim@epita.fr>
5246 2003-08-25 Akim Demaille <akim@epita.fr>
5248 * data/lalr1.cc (Parser::stack_print_, YY_STACK_PRINT): New.
5251 2003-08-25 Akim Demaille <akim@epita.fr>
5253 * data/lalr1.cc (Parser::reduce_print_): New.
5256 2003-08-25 Akim Demaille <akim@epita.fr>
5258 Have lalr1.cc catch with Paul Eggert's patch to fix the infinite
5259 error recovery loops. This patch is based on
5260 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00000.html>.
5261 Also, augment the similarity between lalr1.cc and yacc.c.
5262 Note: the locations of error recovery rules are not correct yet.
5264 * data/lalr1.cc: Comment changes to augment the similarity between
5265 lalr1.cc and yacc.c.
5266 (YYERROR): Goto to yyerrorlab, not yyerrlab1.
5267 (yyerrlab1): Remove, but where it used to be (now the bottom part of
5268 yyerrlab), when hitting EOF, pop the whole stack here instead of
5269 merely falling thru the default error handling mechanism.
5270 (yyerrorlab): New label, with the old contents of YYERROR,
5271 plus the following change: pop the stack of rhs corresponding
5272 to the production that invoked YYERROR. That is how Yacc
5273 behaves (required by POSIX).
5274 * tests/calc.at (AT_CHECK_CALC_LALR1_CC): No longer expected to
5277 2003-08-25 Akim Demaille <akim@epita.fr>
5279 Tune local.at so that people can "autom4te -l autotest calc.at -o
5280 calc" for instance, to extract a sub test suite.
5282 * tests/testsuite.at: Move the initialization, Autotest version
5283 requirement, and AT_TESTED invocation into...
5284 * tests/local.at: here.
5285 * tests/testsuite.at: Include it for compatibility with Autoconf
5287 * tests/Makefile.am ($(TESTSUITE)): Report that the warning should
5290 2003-08-04 Paul Eggert <eggert@twinsun.com>
5292 Rework code slightly to avoid gcc -Wtraditional warnings.
5293 * data/glr.c (yyuserMerge): Return void, not YYSTYPE.
5294 The returned value is now stored in *YY0. All callers changed.
5295 * src/output.c (merge_output): Adjust to the above change.
5297 2003-07-26 Paul Eggert <eggert@twinsun.com>
5299 * data/glr.c (YYASSERT): New macro.
5300 (yyfillin, yydoAction, yyglrReduce, yysplitStack,
5301 yyresolveStates, yyprocessOneStack):
5302 Use `YYASSERT (FOO);' rather than `if (! (FOO)) abort ();'.
5303 Derived from a suggestion by Frank Heckenbach.
5305 2003-07-25 Paul Eggert <eggert@twinsun.com>
5307 * data/glr.c (yyglrReduce): Don't use C89 string concatenation,
5308 for portability to K&R C (after ansi2knr, presumably). See
5309 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00041.html>
5310 by Frank Heckenbach, though I have omitted the structure-initialization
5311 part of his glr-knr.diff patch since I recall that the Portable
5312 C Compiler didn't require that change.
5314 Let the user specify how to allocate and free memory.
5315 Derived from a suggestion by Frank Heckenbach in
5316 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00041.html>.
5317 * data/glr.c (YYFREE, YYMALLOC, YYREALLOC): New macros.
5318 All uses of free, malloc, realloc changed to use these macros,
5319 and unnecessary casts removed.
5320 * data/yacc.c (YYFREE, YYMALLOC): Likewise.
5322 2003-07-06 Matthias Mann <MatthiasMann@gmx.de>
5324 * data/lalr1.cc (operator<<(std::ostream&, const Position&)):
5325 use s.empty() rather than s == "" to test for empty string; see
5326 <http://lists.gnu.org/archive/html/bison-patches/2003-07/msg00003.html>
5329 2003-06-25 Akim Demaille <akim@epita.fr>
5331 * config/depcomp, config/install-sh: Update from masters.
5333 2003-06-20 Paul Eggert <eggert@twinsun.com>
5335 * data/glr.c (YYLLOC_DEFAULT): Parenthesize arguments as needed,
5336 and return properly parenthesized result.
5337 * data/lalar1.cc (YYLLOC_DEFAULT): Likewise.
5338 * data/yacc.c (YYLLOC_DEFAULT): Likewise.
5339 Remove unnecessary parentheses from uses.
5340 * doc/bison.texinfo (Location Default Action): Describe the
5341 conventions for parentheses.
5343 2003-06-19 Paul Eggert <eggert@twinsun.com>
5345 * data/glr.c (yyremoveDeletes, yy_reduce_print, yyglrReduce,
5346 yyreportTree): Do not assume that size_t is the same width as int,
5347 when printing sizes. Print sizes using an unsigned format.
5348 Problem reported by Frank Heckenbach in
5349 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00035.html>.
5351 Port to Forte Developer 7 C compiler.
5352 * data/glr.c (struct YYLTYPE): If locations are not being used,
5353 declare a single dummy member, as empty structs do not conform
5355 (YYERROR, YYBACKUP): Do not use "do { ...; return foo; } while (0)";
5356 the Forte Developer 7 C compiler complains that end-of-loop
5357 code is not reached.
5359 2003-06-17 Paul Eggert <eggert@twinsun.com>
5361 * lib/libiberty.h (PARAMS): Spell argument as Args, not as X, to
5362 avoid warnings from picky compilers about redefinition of PARAMS.
5364 2003-06-17 Paul Eggert <eggert@twinsun.com>
5368 * NEWS: Document 1.875b.
5370 * lib/bbitset.h: Do not include config.h; that's the includer's job.
5371 Do not include <sys/types.h>; shouldn't be needed on a C89 host.
5372 * lib/bitset.h (bitset_compatible_p): Indent as per GNU standard.
5373 Don't use 'index' in comments, as it's a builtin fn on some hosts.
5374 * lib/bitset_stats.c: Include gettext.h unconditionally, as
5375 per recent gettext manual's suggestion.
5376 * lib/ebitset.c (ebitset_resize, ebitset_unused_clear):
5377 Use prototypes, not old-style definitions.
5378 * lib/lbitset.c (lbitset_unused_clear): Likewise.
5379 * lib/vbitset.c (vbitset_resize, vbitset_ones, vbitset_zero,
5380 vbitset_empty_p, vbitset_copy1, vbitset_not, vbitset_equal_p,
5381 vbitset_subset_p, vbitset_disjoint_p, vbitset_and, vbitset_and_cmp,
5382 vbitset_andn, vbitset_andn_cmp, vbitset_or, vbitset_or_cmp,
5383 vbitset_xor, vbitset_xor_cmp, vbitset_and_or, vbitset_and_or_cmp,
5384 vbitset_andn_or, vbitset_andn_or_cmp, vbitset_or_and,
5385 vbitset_or_and_cmp, vbitset_copy): Likewise.
5387 * lib/libiberty.h: Do not include config.h; that's the includer's job.
5388 Do not include <stdlib.h>.
5389 (PARAMS): Define unconditionally for C89.
5390 (ATTRIBUTE_NORETURN): Remove.
5391 (ATTRIBUTE_UNUSED): Define unconditionally.
5393 Upgrade to 2003-06-08 libbitset, submitted by Michael Hayes in:
5394 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00005.html>
5395 * lib/Makefile.am (bitsets_sources): Add vbitset.c, vbitset.h.
5396 * lib/vbitset.c, lib/vbitset.h: New files.
5397 * lib/abitset.c, lib/bbitset.h, lib/bitset.c, lib/bitset.h,
5398 lib/bitset_stats.c, lib/ebitset.c, lib/lbitset.c: Import
5401 * doc/bison.texinfo (How Can I Reset the Parser): Renamed from
5402 `How Can I Reset @code{yyparse}', since texinfo does not allow
5403 arbitrary @ in node names.
5405 * m4/Makefile.am (EXTRA_DIST): Add the following files, which
5406 shouldn't be needed according to the gettext 0.12.1 documentation
5407 but which seem to be needed anyway: codeset.m4 glibc21.m4
5408 intdiv0.m4 inttypes-pri.m4 inttypes.m4 inttypes_h.m4 isc-posix.m4
5409 lcmessage.m4 nls.m4 po.m4 stdint_h.m4 uintmax_t.m4 ulonglong.m4.
5410 * po/Makefile.in.in: Upgrade to gettext 0.12.1 version.
5412 * lib/.cvsignore: Add stdbool.h.
5413 * m4/.cvsignore: Add nls.m4, po.m4.
5415 Upgrade to CVS gnulib.
5416 * stdbool_.h: File renamed from stdbool.h.in.
5417 * configure.ac (AM_STDBOOL_H): Invoke this instead of
5419 (AM_GNU_GETTEXT): Put brackets around args, as latest manual suggests.
5420 (AM_GNU_GETTEXT_VERSION): Update to 0.12.1.
5421 * lib/Makefile.am (EXTRA_DIST): Add stdbool_.h.
5422 (MOSTLYCLEANFILES): New var.
5423 ($(libbison_a_OBJECTS)): Depend on $(STDBOOL_H).
5424 (stdbool.h): New rule.
5425 * lib/dirname.c, lib/dirname.h, lib/hash.c, lib/hash.h,
5426 lib/malloc.c, lib/obstack.h, lib/quote.c, lib/realloc.c,
5427 lib/strcasecmp.c, lib/xalloc.h, m4/alloca.m4, m4/onceonly.m4,
5428 m4/quote.m4: Upgrade to today's gnulib.
5430 * tests/calc.at (AT_CHECK_CALC): New option EXPECTED-TO-FAIL.
5431 (AT_CHECK_CALC_LALR1_CC): Use it, since the C++ LALR parser fails
5432 the tests right now.
5433 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Ensure yylex and
5434 yyerror are declared before use; C99 requires this.
5436 2003-06-09 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
5438 * data/glr.c (YYERROR): Update definition to reset yyerrState to 0
5440 (yyrecoverSyntaxError): Correct the logic for setting and testing
5442 Correct comment on handling EOF.
5443 Allow states with only a default reduction, rather than failing
5444 (I can't quite reconstruct why these were not allowed before).
5446 Fixes to avoid problem that $-N rules in GLR parsers can cause
5447 buffer overruns, corrupting state.
5449 * src/output.c (prepare_rules): Output max_left_semantic_context
5451 * src/reader.h (max_left_semantic_context): New variable declaration.
5452 * src/scan-gram.l (max_left_semantic_context): Define.
5453 (handle_action_dollar): Update max_left_semantic_context.
5454 * data/glr.c (YYMAXLEFT): New definition.
5455 (yydoAction): Increase size of yyrhsVals by YYMAXLEFT.
5456 (yyresolveAction): Ditto.
5458 Fixes to problems with location handling in GLR parsers reported by
5459 Frank Heckenbach (2003/06/05).
5461 * data/glr.c (YYLTYPE): Make trivial if locations not used.
5462 (YYRHSLOC): Add parentheses, and define only if locations used.
5463 (YYLLOC_DEFAULT): Add parentheses, and give trivial definition if
5465 (yyuserAction): Use YYLLOC_DEFAULT to set *yylocp.
5466 (yydoAction): Remove redundant initialization of *yyvalp and *yylocp.
5468 * tests/cxx-type.at: Exercise location information; update tests
5469 to differentiate output with and without locations.
5470 Remove forward declarations of yylex and yyerror---caused errors
5471 because default YYLTYPE not yet defined.
5472 Change semantic actions to compute strings, rather than printing
5473 them directly (to test proper passing of semantics values). Change
5474 output to prefix notation and update test data and expected results.
5475 (yylex): Track locations.
5476 (stmtMerge): Return value rather than printing, and include arguments
5479 2003-06-03 Paul Eggert <eggert@twinsun.com>
5481 Avoid warnings generated by GCC 2.95.4 when Bison is
5482 configured with --enable-gcc-warnings.
5483 * data/lalr1.cc (yy::]b4_parser_class_name[::parse,
5484 yy::]b4_parser_class_name[::translate_,
5485 yy::Stack::operator[] (unsigned),
5486 yy::Stack::operator[] (unsigned) const,
5487 yy::Slice::operator[] (unsigned),
5488 yy::Slice::operator[] (unsigned) const):
5489 Rename local vars to avoid warnings.
5490 * tests/glr-regression.at (Improper handling of embedded actions
5491 and $-N in GLR parsers): Remove unused local variable from yylex.
5492 * tests/regression.at (_AT_DATA_DANCER_Y): Declare yylex to take
5493 (void) as arg when not pure, since we now assume C89 when building
5494 Bison. Pacify GCC by using parameter.
5496 2003-06-02 Paul Eggert <eggert@twinsun.com>
5498 * data/lalr1.cc (yy::Position::lines, yy::Position::columns,
5499 yy::Location::lines, yy::Location::columns): Rename arguments
5500 to avoid shadowing; this removes a warning generated by GCC 3.3.
5502 2003-06-01 Paul Eggert <eggert@twinsun.com>
5504 Don't pass C-only warning optins (e.g., -Wmissing-declarations)
5505 to g++, as GCC 3.3 complains if you do it.
5506 * configure.ac (WARNING_CXXFLAGS): New subst. Set it to
5507 everything that WARNING_CFLAGS has, except omit warnings
5508 not suitable for C++.
5509 (AC_PROG_CXX): Use this instead of AC_CHECK_PROGS([CXX], [g++]).
5510 * tests/atlocal.in (CXXFLAGS): New var.
5511 * tests/local.at (AT_COMPILE_CXX): Use it instead of CFLAGS.
5513 Fix a GLR parser bug I reported in February; see
5514 <http://lists.gnu.org/archive/html/bison-patches/2003-02/msg00008.html>.
5515 The problem was that GLR parsers did not conform to the C standard,
5516 because actions like { $1 = $2 + $3; } expanded to expressions
5517 that invoked YYFILL in separate subexpressions, and YYFILL assigned
5518 to a local variable. The C standard says that expressions
5519 like (var = f ()) + (var = f ()) have undefined behavior.
5520 Another problem was that GCC sometimes issues warnings that
5521 yyfill and its parameters are unused.
5523 * data/glr.c (yyfillin): Renamed from the old yyfill. Mark
5525 (yyfill): New function.
5527 (yyuserAction): Change type of yynormal to bool, so that it matches
5528 the new yyfill signature. Mark it as possibly unused.
5531 Follow up on a bug I reported in February, where a Bison-generated
5532 parser can loop. Provide a test case and a fix for yacc.c. I
5533 don't have a fix for lalr1.cc or for glr.c, unfortunately.
5534 The original bug report is in:
5535 <http://lists.gnu.org/archive/html/bison-patches/2003-02/msg00044.html>
5537 * data/yacc.c (YYERROR): Now just 'goto yyerrorlab', since the
5538 macro's size was becoming unwieldy.
5539 (yyerrlab): Do not discard an empty lookahead symbol, as this
5540 might destroy garbage.
5541 (yyerrorlab): New label, with the old contents of YYERROR,
5542 plus the following change: pop the stack of rhs corresponding
5543 to the production that invoked YYERROR. That is how Yacc
5544 behaves, and POSIX requires this behavior.
5545 (yyerrlab1): Use YYPOPSTACK instead of its definiens.
5546 * tests/calc.at (_AT_DATA_CALC_Y): Include unistd.h if available.
5547 Define 'alarm' to do nothing if unistd.h is not available.
5548 Add a new rule "exp: '-' error;" to test the above change to
5549 data/yacc.c. Use 'alarm' to abort any test taking longer than
5550 10 seconds, as it's probably looping.
5551 (AT_CHECK_CALC): Test recovery from error in new grammar rule.
5552 Also, the new yacc.c generates two fewer diagnostics for an
5555 2003-05-24 Paul Eggert <eggert@twinsun.com>
5557 * data/glr.c (YYSTACKEXPANDABLE): Do not evaluate
5558 YYSTYPE_IS_TRIVIAL or YYSTYPE_IS_TRIVIAL unless they are defined.
5559 This fixes a problem reported by John Bowman when the Compaq/HP
5560 Alpha cxx compiler happy (e.g. using cxx -D__USE_STD_IOSTREAM
5562 * data/yacc.c (union yyalloc): Likewise.
5563 (YYCOPY): Do not evaluate __GNUC__ unless it is defined.
5565 Switch from 'int' to 'bool' where that makes sense.
5567 * lib/abitset.c (abitset_test, abitset_empty_p, abitset_equal_p,
5568 abitset_subset_p, abitset_disjoint_p, abitset_and_cmp,
5569 abitset_andn_cmp, abitset_or_cmp, abitset_xor_cmp, abitset_and_or,
5570 abitset_and_or_cmp, abitset_andn_or_cmp, abitset_or_and_cmp):
5571 Return or accept bool, not int. All callers changed.
5572 * lib/bbitset.h: (bitset_toggle_, bitset_copy_, bitset_and_or_cmp_,
5573 bitset_andn_or_cmp_, bitset_or_and_cmp_): Likewise.
5574 * lib/bitset.c (bitset_only_set_p, bitset_print, bitset_toggle_,
5575 bitset_copy_, bitset_op4_cmp, bitset_and_or_cmp_, bitset_andn_or_cmp_,
5576 bitset_or_and_cmp_): Likewise.
5577 * lib/bitset.h (bitset_test, bitset_only_set_p): Likewise.
5578 * lib/bitset_stats.c (bitset_stats_print, bitset_stats_toggle,
5579 bitset_stats_test, bitset_stats_empty_p, bitset_stats_disjoint_p,
5580 bitset_stats_equal_p, bitset_stats_subset_p, bitset_stats_and_cmp,
5581 bitset_stats_andn_cmp, bitset_stats_or_cmp, bitset_stats_xor_cmp,
5582 bitset_stats_and_or_cmp, bitset_stats_andn_or_cmp,
5583 bitset_stats_or_and_cmp): Likewise.
5584 * lib/ebitset.c (ebitset_elt_zero_p, ebitset_equal_p, ebitset_copy_cmp,
5585 ebitset_test, ebitset_empty_p, ebitset_subset_p, ebitset_disjoint_p,
5586 ebitset_op3_cmp, ebitset_and_cmp, ebitset_andn_cmp, ebitset_or_cmp,
5587 ebitset_xor_cmp): Likewise.
5588 * lib/lbitset.c (lbitset_elt_zero_p, lbitset_equal_p, lbitset_copy_cmp,
5589 lbitset_test, lbitset_empty_p, lbitset_subset_p, lbitset_disjoint_p,
5590 lbitset_op3_cmp, lbitset_and_cmp, lbitset_andn_cmp, lbitset_or_cmp,
5591 lbitset_xor_cmp): Likewise.
5592 * lib/bbitset.h: Include <stdbool.h>.
5593 (struct bitset_vtable): The following members now return bool, not
5594 int: toggle, test, empty_p, disjoint_p, equal_p, subset_p,
5595 and_cmp, andn_cmp, or_cmp, xor_cmp, and_or_cmp, andn_or_cmp,
5597 * src/conflicts.c (count_rr_conflicts): Likewise.
5598 * lib/bitset_stats.h (bitset_stats_enabled): Now bool, not int.
5600 * lib/ebitset.c (ebitset_obstack_init): Likewise.
5601 * lib/lbitset.c (lbitset_obstack_init): Likewise.
5602 * src/getargs.c (debug_flag, defines_flag, locations_flag,
5603 no_lines_flag, no_parser_flag, token_table_flag, yacc_flag,
5604 graph_flag): Likewise.
5605 * src/getargs.h (debug_flag, defines_flag, locations_flag,
5606 no_lines_flag, no_parser_flag, token_table_flag, yacc_flag,
5607 graph_flag): Likewise.
5608 * src/output.c (error_verbose): Likewise.
5609 * src/output.h (error_verbose): Likewise.
5610 * src/reader.c (start_flag, typed): Likewise.
5611 * src/reader.h (typed): Likewise.
5612 * src/getargs.c (LOCATIONS_OPTION): New constant.
5613 (long_options, getargs): Use it.
5614 * src/lalr.c (build_relations): Use bool, not int.
5615 * src/nullable.c (nullable_compute): Likewise.
5616 * src/print.c (print_reductions): Likewise.
5617 * src/tables.c (action_row, pack_vector): Likewise.
5618 * src/muscle_tab.h (MUSCLE_INSERT_BOOL): New macro.
5619 * src/output.c (prepare): Use it.
5620 * src/output.c (token_definitions_output,
5621 symbol_destructors_output, symbol_destructors_output): Use string,
5622 not boolean integer, to keep track of whether to output separator.
5623 * src/print_graph.c (print_core): Likewise.
5624 * src/state.c (state_rule_lookaheads_print): Likewise.
5626 * config/install-sh: Sync from automake 1.7.5.
5628 2003-05-14 Paul Eggert <eggert@twinsun.com>
5630 * src/parse-gram.y (rules_or_grammar_declaration): Require a
5631 semicolon after a grammar declaration, in the interest of possible
5632 future changes to the Bison input language.
5633 Do not allow a stray semicolon at the start of the grammar.
5634 (rhses.1): Allow one or more semicolons after any rule, including
5635 just before "|" as required by POSIX.
5636 * tests/input.at (Torturing the Scanner): Add tests for ";|" in a
5639 2003-05-14 Alexandre Duret-Lutz <adl@gnu.org>
5641 %parse-param support for lalr1.cc.
5643 * data/lalr1.cc (b4_parse_param_decl, b4_parse_param_cons,
5644 b4_cc_constructor_calls, b4_cc_constructor_call,
5645 b4_parse_param_vars, b4_cc_var_decls, b4_cc_var_decl): New m4
5647 (yy::b4_parser_class_name::b4_parser_class_name): Take extra
5648 parse-param arguments.
5649 (yy::b4_parser_class_name): Declare instance variables to
5650 hold parse-param arguments.
5651 * tests/calc.at: s/value/semantic_value/ because value clashes
5652 with a member of yy::b4_parser_class_name. Adjust C++ code
5653 to handle %parse-param. Enable %parse-param test in C++.
5655 2003-05-12 Paul Eggert <eggert@twinsun.com>
5657 * doc/bison.texinfo (How Can I Reset @code{yyparse}): Reword the
5658 English a bit. Fix fclose typo. Change "const char" to "char
5659 const", and use ANSI C rather than K&R for "main". Suggest
5660 YY_FLUSH_BUFFER over yyrestart (as that is what Flex recommends)
5661 and suggest yy_switch_to_buffer.
5663 2003-05-05 Paul Eggert <eggert@twinsun.com>
5665 * lib/bitset.h (__INT_TO_PTR): Define to a value that presumes
5666 C89. This avoids a diagnostic on compilers that define __STDC__
5667 to 0, fixing a problem with Tru64 cc reported by Martin Mokrejs in
5668 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00041.html>.
5670 2003-05-03 Paul Eggert <eggert@twinsun.com>
5672 * lib/bitset.h (BITSET_FOR_EACH, BITSET_FOR_EACH_REVERSE):
5673 Do not overrun array bounds.
5674 This should fix a bug reported today by Olatunji Oluwabukunmi in
5675 <http://lists.gnu.org/archive/html/bug-bison/2003-05/msg00004.html>.
5677 2003-04-29 Akim Demaille <akim@epita.fr>
5679 * src/gram.h, src/gram.c (pure_parser, glr_parser): Move to...
5680 * src/getargs.c, src/getargs.h: here, as bool, not int.
5681 (nondeterministic_parser): New.
5682 * src/parse-gram.y, src/scan-gram.l: Support
5683 %nondeterministic-parser.
5684 * src/output.c (prepare): Use nondeterministic_parser instead
5685 of glr_parser where appropriate.
5686 * src/tables.c (conflict_row, action_row, save_row)
5687 (token_actions, token_actions, pack_vector): Ditto.
5689 2003-04-29 Akim Demaille <akim@epita.fr>
5691 * doc/bison.texinfo (C++ Parsers, Implementing Loops): New.
5693 2003-04-29 Akim Demaille <akim@epita.fr>
5695 * tests/calc.at: Also test yacc.c and glr.c (but not lalr1.cc yet)
5696 with %pure-parser and %locations to exercise the patch from Yakov
5699 2003-04-28 Tim Van Holder <tim.van.holder@pandora.be>
5701 * data/yacc.c: (b4_lex_param): Corrected for the case where
5702 %lex-param is provided and %pure-parser isn't.
5704 2003-04-27 Paul Eggert <eggert@twinsun.com>
5706 Avoid gcc -Wundef warnings reported by Gerald Pfeifer in
5707 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00044.html>.
5708 * data/yacc.c (YYSTACK_ALLOC): Don't evaluate YYSTACK_USE_ALLOCA
5709 if it is not defined.
5710 (YYMAXDEPTH): Don't evaluate YYMAXDEPTH if it is not defined.
5712 2003-04-26 Paul Eggert <eggert@twinsun.com>
5714 * data/lalr1.cc (yy::Parser::pact_ninf_, yy::Parser::table_ninf_):
5715 Declare to be of type suitable for the ninf value itself, not of
5716 type suitable for the corresponding table, since the latter might
5717 be unsigned but the ninf value might be negative. This fixes a
5718 bug reported by Alexandre Duret-Lutz in
5719 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00017.html>.
5721 * configure.ac (AC_FUNC_ERROR_AT_LINE): Remove, since gl_ERROR
5722 invokes it. We shouldn't invoke it twice because it will attempt
5723 to put error.o in the archive twice. This fixes a glitch reported
5724 by Martin Mokrejs in
5725 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00041.html>.
5727 2003-04-21 Paul Eggert <eggert@twinsun.com>
5729 * m4/error.m4: Update from Bruno Haible's 2003-04-14 patch
5732 2003-04-21 Yakov Markovitch <Markovitch@iso.ru>
5734 * data/glr.c (yyexpandGLRStack) [!YYSTACKEXPANDABLE]:
5735 Fix obvious typo that results in uncompilable GLR parsers
5736 when both %pure-parser and %locations are used. (trivial change)
5738 2003-04-17 Paul Eggert <eggert@twinsun.com>
5740 * src/scan-gram.l: Add %option nounput, since we no longer use unput.
5741 (unexpected_eof): Renamed from unexpected_end_of_file, for brevity.
5742 Do not insert the expected token via unput, as this runs afoul
5743 of a POSIX-compatibility bug in flex 2.5.31.
5744 All uses changed to BEGIN the parent state,
5745 since we no longer insert the expected token via unput.
5746 * tests/regression.at (Invalid inputs): Remove cascaded diagnostic
5747 that is no longer emitted after the above change.
5749 * src/conflicts.c (set_conflicts): Resolve all conflicts, not just
5750 the first one. This change is from Paul Hilfinger, and it fixes
5751 regression reported by Werner Lemberg in
5752 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00026.html>.
5754 (resolve_sr_conflict): Don't invoke state_errs_set
5755 unless one or more tokens have been explicitly made errors.
5756 Otherwise, the above change causes Bison to abort.
5758 * tests/existing.at (GNU pic Grammar): New test case, taken from
5761 2003-03-31 Akim Demaille <akim@epita.fr>
5763 * doc/Makefile.am (AM_MAKEINFOFLAGS): Don't split the info file.
5765 2003-03-31 Akim Demaille <akim@epita.fr>
5767 * src/output.c (prepare_symbols): Avoid trailing spaces in the
5770 2003-03-31 Akim Demaille <akim@epita.fr>
5772 * doc/bison.texinfo (Strings are Destroyed): s/losses/loses/.
5773 From Paul Hilfinger.
5775 2003-03-29 Akim Demaille <akim@epita.fr>
5777 * m4/error.m4: Do not put under dynamic conditions some code which
5778 expansion is under static control.
5780 2003-03-29 Akim Demaille <akim@epita.fr>
5782 * doc/bison.texinfo (How Can I Reset @code{yyparse}): New.
5784 2003-03-29 Akim Demaille <akim@epita.fr>
5786 * doc/bison.texinfo (Strings are Destroyed): New.
5788 2003-03-13 Paul Eggert <eggert@twinsun.com>
5790 * .cvsignore: Add configure.lineno.
5791 * src/.cvsignore: Add yacc.
5792 * tests/.cvsignore: Add testsuite.log.
5793 * doc/fdl.texi: Sync with latest FSF version.
5795 2003-03-12 Paul Eggert <eggert@twinsun.com>
5797 * scan-gram.l (YY_USER_INIT): Initialize code_start, too.
5798 (<INITIAL><<EOF>>, <SC_PRE_CODE><<EOF>>): Set *loc to the scanner
5799 cursor, instead of leaving it undefined. This fixes a bug
5800 reported by Tim Van Holder in
5801 <http://lists.gnu.org/archive/html/bug-bison/2003-03/msg00023.html>.
5802 * tests/input.at (Torturing the Scanner): Test the scanner on
5803 an empty input file, which was Tim Van Holder's test case.
5805 * m4/timevar.m4 (BISON_PREREQ_TIMEVAR): When checking whether
5806 <sys/resource.h> can be included, include sys/time.h and
5807 sys/times.h first, if available. This works around the SunOS
5808 4.1.4 porting bug reported by Bruce Becker in
5809 <http://lists.gnu.org/archive/html/bug-bison/2003-03/msg00018.html>.
5811 * m4/subpipe.m4 (BISON_PREREQ_SUBPIPE): Don't
5812 AC_CHECK_HEADERS([sys/wait.h]), as this interferes with
5815 Merge changes from gnulib. This was prompted because the CVS
5816 snapshot didn't build on Solaris 7 due to strnlen problems.
5818 These changes need to be merged back into gnulib:
5819 * lib/hash.c: Include <stdbool.h> unconditionally.
5820 * m4/onceonly.m4 (m4_quote): New macro.
5821 (AC_CHECK_HEADERS_ONCE, AC_CHECK_FUNCS_ONCE, AC_CHECK_DECLS_ONCE):
5822 Quote AC_FOREACH variable-expansions properly.
5823 The 2003-01-03 obstack.h change also needs merging.
5824 {end of changes requiring merging}
5826 * lib/stdbool.h.in, m4/alloca.m4, m4/dirname.m4, m4/dos.m4,
5827 m4/getopt.m4, m4/hash.m4, m4/malloc.m4, m4/memchr.m4,
5828 m4/memrchr.m4, m4/obstack.m4, m4/onceonly.m4, m4/quote.m4,
5829 m4/quotearg.m4, m4/realloc.m4, m4/stpcpy.m4, m4/strnlen.m4,
5830 m4/strtol.m4, m4/strtoul.m4, m4/unlocked-io.m4, m4/xalloc.m4:
5831 New files, imported from gnulib.
5832 * m4/Makefile.am (EXTRA_DIST): Add the new m4/*.m4 files mentioned
5835 * lib/mbswidth.c, m4/error.m4, m4/mbrtowc.m4, m4/mbswidth.m4,
5836 m4/memcmp.m4, m4/prereq.m4, m4/stdbool.m4: Update to current
5839 * configure.ac (gl_DIRNAME, gl_GETOPT, gl_HASH, gl_QUOTE, gl_XALLOC):
5841 (gl_ERROR): New, replacing jm_PREREQ_ERROR.
5842 (gl_FUNC_ALLOCA): New, replacing AC_FUNC_ALLOCA.
5843 (gl_FUNC_STPCPY): New, replacing AC_REPLACE_FUNCS(stpcpy).
5844 (gl_FUNC_STRNLEN): New, replacing AC_FUNC_STRNLEN.
5845 (gl_MBSWIDTH): New, replacing jm_PREREQ_MBSWIDTH.
5846 (gl_OBSTACK): New, replacing AC_FUNC_OBSTACK.
5847 (gl_QUOTEARG): New, replacing jm_PREREQ_QUOTEARG.
5848 (jm_FUNC_GLIBC_UNLOCKED_IO, gl_FUNC_STPCPY, gl_FUNC_STRTOL): New.
5849 (jm_FUNC_MALLOC): New, replacing AC_FUNC_MALLOC.
5850 (jm_FUNC_REALLOC): New, replacing AC_FUNC_REALLOC.
5851 (jm_PREREQ_ARGMATCH): Remove.
5852 (AC_REPLACE_FUNCS): Remove memchr, memrchr, stpcpy, strtol, strtoul.
5853 * lib/Makefile.am (libbison_a_SOURCES): Add argmatch.c, argmatch.h.
5855 * src/system.h: Include <stdbool.h> unconditionally.
5857 * lib/bbitset.h: Include <limits.h> unconditionally. We have been
5858 assuming at least C89 in the bitset code for some time now.
5860 2003-03-03 Akim Demaille <akim@epita.fr>
5864 2003-03-02 Akim Demaille <akim@epita.fr>
5866 * doc/bison.texinfo (Table of Symbols): Reactivate the
5867 documentation for %lex-param, and %parse-param.
5869 2003-03-02 Akim Demaille <akim@epita.fr>
5871 * data/yacc.c, data/glr.c, data/lal1.cc: Use similar code to
5872 generate verbose error messages.
5873 Use the number of tokens as an upper bound in yytname, as it
5874 cannot be a non terminal.
5876 2003-03-02 Akim Demaille <akim@epita.fr>
5878 * tests/regression.at (_AT_DATA_DANCER_Y): Fix the expected error
5881 2003-03-02 Akim Demaille <akim@epita.fr>
5883 * tests/regression.at (_AT_DATA_DANCER_Y, AT_CHECK_DANCER): New.
5884 Use them to exercise yycheck overrun.
5885 Based on Andrew Suffield's grammar.
5887 2003-03-02 Akim Demaille <akim@epita.fr>
5889 Create tests/local.at for Bison generic testing macros.
5891 * tests/calc.at (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): Move to...
5892 * tests/local.at (AT_BISON_OPTION_PUSHDEFS, AT_BISON_OPTION_POPDEFS):
5894 * tests/calc.at (AT_CHECK_CALC): Adjust.
5895 * tests/testsuite.at (AT_DATA_GRAMMAR_PROLOGUE, AT_DATA_GRAMMAR)
5896 (AT_COMPILE, AT_COMPILE_CXX, AT_PARSER_CHECK): Move to...
5897 * tests/local.at: here.
5898 (AT_COMPILE_CXX): Tags the tests using it as c++.
5899 Ignore the test if CXX is not functional.
5901 2003-03-01 Paul Eggert <eggert@twinsun.com>
5903 * src/scan-gram.l (code_start): Initialize it to scanner_cursor,
5904 not loc->end, since loc->end might contain garbage and this leads
5905 to undefined behavior on some platforms.
5906 (id_loc, token_start): Use (IF_LINTed) initial values that do not
5907 depend on *loc, so that the reader doesn't give the the false
5908 impression that *loc is initialized.
5909 (<INITIAL>"%%"): Do not bother setting code_start, since its value
5910 does not survive the return.
5912 2003-03-01 Akim Demaille <akim@epita.fr>
5914 * src/scan-gram.l (code_start): Always initialize it when entering
5915 into yylex, as SC_EPILOGUE is activated *before* the corresponding
5916 yylex invocation. An alternative would be making it static, but
5917 then it starts with the second %%'s beginning, instead of its end.
5919 2003-02-28 Paul Eggert <eggert@twinsun.com>
5921 * lib/mbswidth.c: Include <wchar.h> before "mbswidth.h", to work
5922 around a UnixWare 7.1.1 porting bug reported by John Hughes in
5923 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00030.html>.
5925 2003-02-26 Paul Eggert <eggert@twinsun.com>
5927 * README: Mention compiler bug in Sun Forte Developer 6 update 2.
5928 Remove Sequent/Pyramid discussion (nobody uses them any more).
5929 Merge VMS and MS-DOS discussion; these ports may well be dead
5930 but let's keep mentioning them for now. Put <> around email
5931 addresses. Add copyright notice.
5933 2003-02-24 Paul Eggert <eggert@twinsun.com>
5935 * data/glr.c (yy_reduce_print): yylineno -> yylno,
5936 to avoid collision with flex use of yylineno.
5937 Problem reported by Bruce Lilly in
5938 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00016.html>.
5939 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Likewise.
5940 * data/yacc.c (yy_reduce_print): Likewise.
5942 * config/depcomp: Sync with Automake 1.7.3.
5944 2003-02-21 Akim Demaille <akim@epita.fr>
5946 * data/lalr1.cc: Use temporary variables instead of casts to
5947 change integer types.
5948 Suggested by Paul Eggert.
5950 2003-02-21 Akim Demaille <akim@epita.fr>
5952 * doc/bison.texinfo: Use "location" consistently to refer to @n,
5953 to avoid confusions with lalr1.cc's notion of Position.
5954 Suggested by Paul Eggert.
5956 2003-02-20 Akim Demaille <akim@epita.fr>
5958 * data/lalr1.cc (position.hh): Make sure "columns" never pushes
5959 before initial_columns.
5960 (location.hh): Use consistent variable names when defining the
5962 Use "last" so that we subtract from Positions, not from unsigned.
5964 2003-02-20 Akim Demaille <akim@epita.fr>
5966 * data/lalr1.cc (position.hh): New subfile, including the extended
5967 and Doxygen'ed documentation of class Position.
5968 (location.hh): Use it.
5969 Document a` la Doxygen.
5970 With the help of Benoit Perrot.
5972 2003-02-20 Akim Demaille <akim@epita.fr>
5974 * tests/calc.at (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): Define
5976 Redefine AT_YYERROR_SEES_LOC_IF using it.
5977 (_AT_DATA_CALC_Y): Don't declare yyerror when lalr1.cc, as it is
5979 Don't use the location in yy::Parser::error_ and
5980 yy::Parser::print_ when not %locations.
5981 Activate more lalr1.cc tests.
5983 2003-02-19 Akim Demaille <akim@epita.fr>
5985 * data/lalr1.cc: When displaying a line number, be sure to make it
5988 2003-02-19 Akim Demaille <akim@epita.fr>
5990 * data/lalr1.cc (b4_stack_depth_init, yy::Parser::initdepth_):
5992 (YYABORT, YYACCEPT, YYERROR): New.
5993 * tests/calc.at: Renable the lalr1.cc test.
5995 2003-02-19 Akim Demaille <akim@epita.fr>
5997 * tests/calc.at (AT_CHECK_CALC): Check different scenarios of
5998 error recovery, mixing with/without pops and discarding of the
6001 Disable the lalr1.cc tests as currently it doesn't support YYERROR.
6003 2003-02-17 Paul Eggert <eggert@twinsun.com>
6005 * tests/atlocal.in (LDFLAGS, LIBS): New vars.
6006 * tests/testsuite.at (AT_COMPILE): Use them.
6007 This fixes the testsuite problem reported by Robert Lentz in
6008 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00011.html>.
6010 2003-02-12 Paul Eggert <eggert@twinsun.com>
6012 * data/yacc.c (yyerrlab) [YYERROR_VERBOSE]:
6013 Avoid subscript error in yycheck. Bug reported by Andrew Suffield in
6014 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00003.html>.
6015 * data/glr.c (yyreportSyntaxError) [YYERROR_VERBOSE]: Likewise.
6016 Check for malloc failure, for consistency with yacc.c.
6017 (yytname_size): Remove, for consistency with yacc.c.
6019 The bug still remains in data/lalr1.cc, as I didn't have time
6022 2003-02-06 Akim Demaille <akim@epita.fr>
6024 * configure.ac (GXX): Rename as...
6025 (CXX): this, to keep the original Autoconf semantics.
6027 * data/lalr1.cc: Fix b4_copyright invocations.
6028 If YYDEBUG is not defined, don't depend upon name_ being defined.
6029 (location.hh): Include string and iostream.
6030 (Position::filename): New member.
6031 (Position::Position ()): New.
6032 (operator<< (Position)): New.
6033 (operator- (Position, int)): New.
6034 (Location::first, Location::last): Rename as...
6035 (Location::begin, Location::end): these, to mock the conventional
6037 (operator<< (Location)): New.
6038 * tests/atlocal.in (CXX): New.
6039 * tests/testsuite.at (AT_COMPILE_CXX): New.
6040 * tests/calc.at (_AT_DATA_CALC_Y): Adjust yyerror to report the
6041 locations in a more synthetic way.
6042 (AT_CHECK_PUSHDEFS): AT_YYERROR_SEES_LOC_IF is positive if
6044 Adjust the C locations to match those from Emacs: first column is
6046 Change all the expected results.
6047 Conform to the GCS: simplify the locations when applicable.
6048 (LOC, VAL, YYLLOC_FORMAL, YYLLOC_ARG, USE_YYLLOC, LEX_FORMALS)
6049 (LEX_ARGS, USE_LEX_ARGS, LEX_PRE_FORMALS, LEX_PRE_ARGS): Replace
6050 these CPP macros with the m4 macros new defined by...
6051 (AT_CHECK_PUSHDEFS): this, i.e.:
6052 (AT_LALR1_CC_IF, AT_PURE_LEX_IF, AT_LOC, AT_VAL, AT_LEX_FORMALS)
6053 (AT_LEX_ARGS, AT_USE_LEX_ARGS, AT_LEX_PRE_FORMALS, AT_LEX_PRE_ARGS)
6055 (AT_CHECK_POPDEFS): Undefine them.
6056 (AT_CHECK_CALC_LALR1_CC): New.
6057 Use it for the first lalr1.cc test.
6059 2003-02-04 Akim Demaille <akim@epita.fr>
6061 * data/lalr1.cc (YYLLOC_DEFAULT): Fix its definition: be based on
6062 Location as is defined.
6064 2003-02-04 Akim Demaille <akim@epita.fr>
6066 * data/lalr1.cc: If YYDEBUG is not defined, don't depend upon
6067 name_ being defined.
6069 2003-02-03 Paul Eggert <eggert@twinsun.com>
6071 * src/gram.h (start_symbol): Remove unused decl.
6073 Use more-consistent naming conventions for local vars.
6075 * src/derives.c (derives_compute): Change type of local var from
6077 * src/gram.c (grammar_rules_partial_print): Likewise.
6078 * src/print.c (print_core): Likewise.
6079 * src/reduce.c (reduce_grammar_tables): Likewise.
6081 * src/gram.c (grammar_dump): Change name of item_number *
6082 local var from r to rp.
6083 * src/nullable.c (nullable_compute): Likewise.
6085 * src/gram.h (ISTOKEN, ISVAR): Use i, not s, for int var.
6087 * src/gram.h (symbol_number_as_item_number): Use sym, not s,
6088 for symbol or symbol_number var.
6089 * src/reader.c (grammar_start_symbol_set): Likewise.
6090 * src/reader.h (grammar_start_symbol_set, grammar_symbol_append):
6092 * src/state.c (transitions_to): Likewise.
6093 * src/state.h: Likewise.
6094 * src/tables.c (symbol_number_to_vector_number): Likewise.
6096 * src/muscle_tab.h (MUSCLE_OBSTACK_SGROW): Use p, not s, for
6099 * src/parse-gram.y (lloc_default): Use loc, not r, for YYLTYPE
6102 * src/scan-gram.l (no_cr_read): Use bytes_read, not s, for size
6105 * src/system.h (xstrndup, strchr, strspn, strnlen, memchr, memrchr):
6106 Use str, not s, for char * var. Use ch, not c, for character var.
6107 Use size for size var.
6109 * src/uniqstr.c (uniqstr_new, uniqstr_assert): Use str, not s, for
6111 (uniqstr_print, uniqst_print_processor): Use ustr, not s, for
6113 * src/uniqstr.h: Likewise.
6115 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str,
6116 get_layoutalgorithm_str, get_decision_str, get_orientation_str,
6117 get_node_alignment_str, get_arrow_mode_str, get_crossing_type_str,
6118 get_view_str, get_linestyle_str, get_arrowstyle_str): Rename
6119 param to have same name as that of enum, so that we don't use
6120 "s" to stand for a non-state.
6122 2003-02-02 Akim Demaille <akim@epita.fr>
6124 * src/scan-skel.l: Scan more than one inert character per yylex
6127 2003-02-01 Paul Eggert <eggert@twinsun.com>
6131 * po/LINGUAS: Add ms.
6133 2003-01-30 Akim Demaille <akim@epita.fr>
6135 * doc/Makefile.am (CLEANFILES): Add bison.fns for distcheck.
6137 2003-01-29 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
6139 * tests/cxx-type.at: Correct apparent typo in Bison input: $$ instead
6142 Changes in response to error report by S. Eken: GLR mode does not
6143 handle negative $ indices or $ indices in embedded rules correctly.
6144 See <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00076.html>.
6146 * data/glr.c (b4_rhs_value): Change to use YYFILL macro.
6147 (b4_rhs_location): Ditto.
6148 (yyfill): New function to copy from stack tree into array
6150 (yyuserAction): Modify to allow incremental move of semantic values
6151 to rhs array when in GLR mode.
6152 Define YYFILL to use in user-defined actions to fill semantic array
6154 Remove dummy use of yystack, as there is now a guaranteed use.
6155 (yydoAction): Modify to allow incremental move of semantic values
6156 to rhs array when in GLR mode.
6157 (yyresolveAction): Ditto.
6158 (yyglrShiftDefer): Update comment.
6159 (yyresolveStates): Use X == NULL for pointers, not !X.
6160 (yyglrReduce): Ditto.
6163 * tests/glr-regr1.at: Rename to ...
6164 * tests/glr-regression.at: Add new regression test for the problems
6165 described above (adapted from S. Eken).
6166 Update copyright notice.
6167 * tests/testsuite.at: Rename glr-regr1.at to glr-regression.at.
6168 * tests/Makefile.am: Ditto.
6170 2003-01-28 Paul Eggert <eggert@twinsun.com>
6172 * data/lalr1.cc: Do not use @output_header_name@ unless
6173 b4_defines_flag is set. This fixes two bugs reported by
6175 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00071.html>
6176 and <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00073.html>.
6178 2003-01-21 Paul Eggert <eggert@twinsun.com>
6180 * data/yacc.c (YYERROR): Move code from yyerrlab1 to here, so that
6181 we don't need to worry about yyerrlab1 being reported as an
6182 "unused label" by non-GCC C compilers. The downside is that if
6183 locations are used then a couple of statements are duplicated each
6184 time YYERROR is invoked, but the upside is that the warnings
6186 (yyerrlab1): Move code to YERROR.
6187 (yyerrlab2): Remove. Change uses back to yyerrlab1.
6188 This reverts some of the 2002-12-27 change.
6190 2003-01-17 Paul Eggert <eggert@twinsun.com>
6192 * src/output.c (symbol_printers_output): Fix typo that led
6193 to core dump. Problem reported by Antonio Rus in
6194 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00058.html>.
6196 2003-01-13 Akim Demaille <akim@epita.fr>,
6197 Quoc Peyrot <chojin@lrde.epita.fr>,
6198 Robert Anisko <anisko_r@lrde.epita.fr>
6200 * data/lalr1.cc (parse::yyerrlab1): When popping the stack, stop
6201 when the stacks contain one element, as the loop would otherwise
6202 free the last state, and then use the top state (the one we just
6203 popped). This means that the initial elements will not be freed
6204 explicitly, as is the case in yacc.c; it is not a problem, as
6205 these elements have fake values.
6207 2003-01-11 Paul Eggert <eggert@twinsun.com>
6209 * NEWS: %expect-violations are now just warnings, reverting
6210 to Bison 1.30 and 1.75 behavior. This fixes the GCC 3.2
6211 bootstrapping problem reported by Matthias Klose; see
6212 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00053.html>.
6213 * src/conflicts.c (conflicts_print): Likewise.
6214 * tests/conflicts.at (%expect not enough, %expect too much,
6215 %expect with reduce conflicts): Likewise.
6216 * doc/bison.texinfo (Expect Decl): Document this. Also mention
6217 that the warning is enabled if the number of conflicts changes
6218 (not necessarily increases).
6220 * src/getargs.c (version): Update copyright year.
6222 2003-01-09 Akim Demaille <akim@epita.fr>
6224 * src/Makefile.am, lib/Makefile.am: Use $(VAR) instead of @VAR@.
6226 2003-01-08 Paul Eggert <eggert@twinsun.com>
6228 * Makefile.maint (WGETFLAGS):
6229 New macro, containing "-C off" to disable proxy caches.
6230 All uses of $(WGET) changed to $(WGET) $(WGETFLAGS).
6231 (rel-check): Use $(WGET) instead of wget.
6233 2003-01-06 Paul Eggert <eggert@twinsun.com>
6235 * doc/bison.texinfo (Generalized LR Parsing): Add a reference to
6236 the GLR paper of Scott, Johnstone and Hussain.
6238 2003-01-04 Paul Eggert <eggert@twinsun.com>
6240 * configure.ac (AC_ARG_ENABLE): Add --disable-yacc.
6241 (YACC_SCRIPT, YACC_LIBRARY): New vars to AC_SUBST.
6242 * lib/Makefile.am (lib_LIBRARIES): liby.a -> @YACC_LIBRARY@.
6243 (EXTRA_LIBRARIES): New var, for liby.a.
6244 * src/Makefile.am (bin_SCRIPTS): yacc -> @YACC_SCRIPT@.
6245 (EXTRA_SCRIPTS): New var, for yacc.
6247 * data/yacc.c (yyerrlab1): Omit attribute if __cplusplus is defined,
6248 since GNU C++ (as of 3.2.1) does not allow attributes on labels.
6249 Problem reported by Nelson H. F. Beebe.
6251 2003-01-03 Paul Eggert <eggert@twinsun.com>
6253 * lib/obstack.h (__INT_TO_PTR) [__STDC__]: Cast result to
6254 (void *) to avoid diagnostic with native c89 on SGI IRIX 6.5
6255 when compiling Bison 1.875's `bitset bset = obstack_alloc
6256 (bobstack, bytes);'. Problem reported by Nelson H. F. Beebe.
6258 * src/scan-skel.l (QPUTS): Omit redundant `;' from macro definition.
6259 ([^@\n]): Renamed from [^@\n]+ so that the token buffer does not
6260 grow to a huge size with typical invocation.
6262 * lib/hash.c (_Bool, bool, false, true, __bool_true_false_are_defined):
6263 Use the pattern recommended by Autoconf 2.57, except also protect
6264 against double-definition.
6265 * src/system.h: Likewise.
6266 Portability issues reported by Nelson H. F. Beebe.
6268 * data/glr.c (yybool): Renamed from bool, to avoid collisions in C.
6269 All uses changed. Provide a definition in both C and C++.
6270 (yytrue, yyfalse): Define even if defined (__cplusplus).
6272 * lib/bitset_stats.c (bitset_stats_list): Remove unused var.
6273 Reported by Nelson H. F. Beebe.
6275 * src/scan-skel.l ("@oline@"): Output lineno+1, not lineno.
6277 2003-01-02 Paul Eggert <eggert@twinsun.com>
6279 * data/yacc.c (yyerrlab1): Append `;' after attribute, to
6280 pacify the buggy "smart preprocessor" in MacOS 10.2.3.
6281 Bug reported by Nelson H. F. Beebe.
6283 2003-01-01 Paul Eggert <eggert@twinsun.com>
6287 2002-12-30 Paul Eggert <eggert@twinsun.com>
6289 * src/scan-gram.l (<INITIAL,SC_AFTER_IDENTIFIER,SC_PRE_CODE>","):
6291 (<INITIAL>","): Here. This causes stray "," to be treated
6294 * src/scan-gram.l (<SC_BRACED_CODE>"}"): Output ";" before the
6295 last brace in braced code when not in Yacc mode, for compatibility
6296 with Bison 1.35. This resurrects the 2001-12-15 patch to
6299 * src/reader.h (YYDECL): Use YYSTYPE, not its deprecated alias
6300 yystype. This follows up the 2002-12-24 YYSTYPE bug fix.
6302 2002-12-28 Paul Eggert <eggert@twinsun.com>
6304 * src/symtab.c (symbol_make_alias): Set type of SYMVAL to be
6305 that of SYM's type. This fixes Debian bug 168069, reported by
6308 2002-12-28 Paul Eggert <eggert@twinsun.com>
6312 Switch back to the Yacc style of conflict reports, undoing some
6313 of the 2002-07-30 change.
6314 * doc/bison.texinfo (Understanding): Use Yacc style for
6315 conflict reports. Also, use new way of locating rules.
6316 * src/conflicts.c (conflict_report):
6317 Renamed from conflict_report_yacc, removing the old
6318 'conflict_report'. Translate the entire conflict report at once,
6319 so that we don't assume that "," has the same interpretation in
6321 (conflicts_output): Use Yacc-style conflict report for each state,
6322 instead of our more-complicated style.
6323 (conflicts_print): Use Yacc-style conflict report, except print
6324 the input file name when not emulating Yacc.
6325 * tests/conflicts.at (Unresolved SR Conflicts, Defaulted
6326 Conflicted Reduction, %expect not enough, %expect too much,
6327 %expect with reduce conflicts): Switch to Yacc-style conflict reports.
6328 * tests/existing.at (GNU Cim Grammar): Likewise.
6329 * tests/glr-regr1.at (Badly Collapsed GLR States): Likewise.
6331 * src/complain.c (warn_at, warn, complain_at, complain, fatal_at,
6332 fatal): Don't invoke fflush; it's not needed and it might even be
6333 harmful for stdout, as stdout might not be open.
6334 * src/reduce.c (reduce_print): Likewise.
6336 2002-12-27 Paul Eggert <eggert@twinsun.com>
6338 Fix a bug where error locations were not being recorded correctly.
6339 This problem was originally reported by Paul Hilfinger in
6340 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00086.html>.
6342 * data/yacc.c (yyparse): New local var yylerrsp, to record the
6343 top of the location stack's error locations.
6344 (yyerrlab): Set it. When discarding a token, push its location
6345 onto yylerrsp so that we don't lose track of the error's end.
6346 (yyerrlab1): Now is only the target of YYERROR, so that we can
6347 properly record the location of the action that failed. For GCC
6348 2.93 and later, insert an __attribute__ ((__unused__)) to avoid
6349 GCC warning about yyerrlab1 being unused if YYERROR is unused.
6350 (yyerrlab2): New label, which yyerrlab now falls through to.
6351 Compute the error's location by applying YYLLOC_DEFAULT to
6352 the locations of all the symbols that went into the error.
6353 * doc/bison.texinfo (Location Default Action): Mention that
6354 YYLLOC_DEFAULT is also invoked for syntax errors.
6355 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
6356 Error locations include the locations of all the tokens that were
6357 discarded, not just the last token.
6359 2002-12-26 Paul Eggert <eggert@twinsun.com>
6361 * src/files.c: Include quote.h.
6362 (compute_output_file_names): Warn if we detect conflicting
6363 outputs to the same file. This should catch the misunderstanding
6364 exemplified by Debian Bug 165349, reported by Bruce Stephens..
6366 * src/conflicts.c (conflicts_print): If the user specifies
6367 "%expect N", report an error if there are any reduce/reduce
6368 conflicts. This is what the manual says should happen.
6369 This fixes Debian bug 130890, reported by Anthony DeRobertis.
6370 * tests/conflicts.at (%expect with reduce conflicts): New test.
6372 Don't use m4_include on relative file names, as it doesn't work as
6373 desired if there happens to be a file with that name under ".".
6375 * m4sugar/version.m4: Remove; it was included but it wasn't used.
6376 * data/Makefile.am (dist_m4sugar_DATA): Remove m4sugar/version.m4.
6377 * data/m4sugar/m4sugar.m4: Don't include m4sugar/version.m4.
6378 * data/glr.c, data/lalr1.cc, data/yacc.c: Don't include c.m4.
6379 * src/output.c (output_skeleton): Use full path names when
6380 specifying a file to include; don't rely on include path, as
6381 it's unreliable when the working file contains a file with
6384 2002-12-25 Paul Eggert <eggert@twinsun.com>
6386 Remove obsolete references to bison.simple and bison.hairy.
6387 Problem mentioned by Aubin Mahe in
6388 <http://lists.gnu.org/archive/html/help-bison/2002-12/msg00010.html>.
6389 * data/glr.c: Comment fix.
6390 * doc/bison.1: Remove references. Also, mention "yacc".
6392 * src/getargs.c (getargs) [MSDOS]: Don't assume optarg != NULL
6395 * src/parse-gram.y (declaration): Use enum "report_states" rather
6396 than its numeric value 1.
6398 * src/scan-skel.l ("@output ".*\n): Close any old yyout before
6399 opening a new one. This fixes Debian bug 165349, reported by
6402 2002-12-24 Paul Eggert <eggert@twinsun.com>
6406 * Makefile.maint (cvs-update): Don't assume that the shell
6407 supports $(...), as Solaris sh doesn't.
6409 * src/parse-gram.y (lloc_default): Remove test for empty
6410 nonterminals at the end, since it didn't change the result.
6412 2002-12-24 Paul Eggert <eggert@twinsun.com>
6414 If the user does not define YYSTYPE as a macro, Bison now declares it
6415 using typedef instead of defining it as a macro. POSIX requires this.
6416 For consistency, YYLTYPE is also declared instead of defined.
6418 %union directives can now have a tag before the `{', e.g., the
6419 directive `%union foo {...}' now generates the C code
6420 `typedef union foo { ... } YYSTYPE;'; this is for Yacc compatibility.
6421 The default union tag is `YYSTYPE', for compatibility with Solaris 9
6422 Yacc. For consistency, YYLTYPE's struct tag is now `YYLTYPE'
6423 instead of `yyltype'.
6425 `yystype' and `yyltype' are now obsolescent macros instead of being
6426 typedefs or tags; they are no longer documented and will be
6427 withdrawn in a future release.
6429 * data/glr.c (b4_location_type): Remove.
6430 (YYSTYPE): Renamed from yystype.
6431 (YYSTYPE_IS_DECLARED): New macro, used to prevent double-typedef.
6432 (struct YYLTYPE): Renamed from struct yyltype.
6433 (YYLTYPE): Renamed from yyltype.
6434 (yyltype, yystype): New (and obsolescent) macros,
6435 for backward compatibility.
6436 * data/yacc.c: Likewise.
6438 * data/yacc.c (YYSTYPE): Declare as union YYSTYPE if the user
6439 does not specify a union tag. This is for compatibility with
6442 * src/parse-gram.y (add_param): 2nd arg is now char * not char
6443 const *, since it is now modified by stripping surrounding { }.
6444 (current_braced_code): Remove.
6445 (PERCENT_DESTRUCTOR, PERCENT_PRINTER, PERCENT_UNION,
6446 PERCENT_LEX_PARAM, PERCENT_PARSE_PARAM): Change names to include
6447 trailing " {...}". Now of type <chars>.
6448 (grammar_declaration): Adjust to bundled tokens.
6449 (code_content): Remove; stripping is now done by add_param.
6450 (print_token_value): Print contents of bundled tokens.
6451 (token_name): New function.
6453 * src/reader.h (braced_code, current_braced_code): Remove.
6454 (token_name): New decl.
6456 * src/scan-gram.l (handle_dollar, handle_at): Now takes int
6457 token_type, not braced_code code_kind. All uses changed.
6458 (SC_PRE_CODE): New state, for scanning after a keyword that
6459 has (or usually has) an immediately-following braced code.
6460 (token_type): New local var, to keep track of which token type
6461 to return when scanning braced code.
6462 (<INITIAL>"%destructor", <INITIAL>"%lex-param",
6463 <INITIAL>"%parse-param", <INITIAL>"%printer",
6464 <INITIAL>"%union"): Set token type and BEGIN SC_PRE_CODE
6465 instead of returning a token type immediately.
6466 (<INITIAL>"{"): Set token type.
6467 (<SC_BRACED_CODE>"}"): Use it.
6468 (handle_action_dollar, handle_action_at): Now returns bool
6469 indicating success. Fail if ! current_rule; this prevents a core dump.
6470 (handle_symbol_code_dollar, handle_symbol_code_at):
6471 Remove; merge body into caller.
6472 (handle_dollar, handle_at): Complain in invalid contexts.
6474 * NEWS, doc/bison.texinfo: Document the above.
6475 * NEWS: Fix years and program names in copyright notice.
6477 2002-12-17 Paul Eggert <eggert@twinsun.com>
6479 * NEWS, doc/bison.texinfo (Parser Function, Pure Calling, Error
6480 Reporting, Table of Symbols): Omit mentions of %lex-param and
6481 %parse-param from the documentation for now.
6483 2002-12-15 Paul Eggert <eggert@twinsun.com>
6485 Undo most of the 2002-11-12 yychar -> yytoken patch, as it broke
6486 GCC 3.2.1 (which depends on yychar == YYEMPTY when there is no
6487 lookahead symbol, and which sets yychar in parser actions) and it
6488 disagreed with the Bison documentation. Bug
6489 reported by Andrew Walrond.
6491 * data/yacc.c (YYTRANSLATE): Don't check for negative argument,
6492 as the caller now does that.
6493 (yyclearin, YYBACKUP, yyparse): Use yychar, not yytoken.
6494 (YYEMPTY): Parenthesize right hand side, since others use it.
6495 (yyparse): Don't assume that our generated code is the only code
6498 2002-12-13 Paul Eggert <eggert@twinsun.com>
6502 POSIX requires a "yacc" command.
6503 * src/Makefile.am (bin_SCRIPTS): New macro, for yacc.
6504 (MOSTLYCLEANFILES): Add yacc.
6506 * doc/bison.texinfo (Invocation, Bison Options): Mention yacc
6507 as an alias for bison y.
6509 * po/LINGUAS: Add da.
6511 * src/getargs.c (__GNU_LIBRARY__) [lint]: Define to work around
6512 problem with latest <getopt.h>.
6513 (HACK_FOR___GNU_LIBRARY___PROTOTYPE): New macro.
6515 * doc/fdl.texi: Upgrade to 1.2.
6516 * lib/alloca.c, lib/error.c, lib/getopt.c, lib/getopt.h
6517 lib/getopt1.c, lib/gettext.h, lib/memrchr.c, lib/obstack.c,
6518 lib/obstack.h, lib/strnlen.c, lib/unlocked-io.h: Sync with
6520 * config/install-sh: Sync with autotools.
6522 Fix a bad interaction with flex 2.5.23 reported by Bruce Lilly in
6523 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00114.html>.
6524 * data/yacc.c (YYLTYPE, struct yyltype): Do not define unless
6525 locations are requested.
6526 (union yyalloc): Do not depend on YYLTYPE_IS_TRIVIAL unless
6527 locations are requested.
6529 2002-12-12 Paul Eggert <eggert@twinsun.com>
6531 Remove unportable casts and storage allocation tricks.
6532 While we're at it, remove almost all casts, since they
6533 usually aren't needed and are a sign of trouble.
6535 * configure.ac (AC_CHECK_TYPES): Check for uintptr_t.
6537 * src/derives.c (derives_compute): Do not subtract NTOKENS from
6538 the pointer DSET returned by malloc; this isn't portable.
6539 Instead, always use DSET[i - NTOKENS] rather than DSET[i].
6540 Similarly for DERIVES.
6541 * src/lalr.c (set_goto_map): Likewise, for GOTO_MAP and TEMP_MAP.
6542 * src/nullable.c (nullable_compute): Likewise, for RSETS and NULLABLE.
6543 * src/reduce.c (reduce_grammar_tables): Likewise, for nontermmap
6545 * src/derives.c (derives_compute): Do not bother invoking
6546 int_of_rule_number, since rule numbers are integers.
6548 * src/files.c (concat2, tr, compute_base_name): Use xmalloc (N)
6549 rather than XMALLOC (char, N).
6551 * src/files.c (filename_split): Rewrite to avoid cast.
6553 * src/gram.h (symbol_number_as_item_number,
6554 item_number_as_symbol_number, rule_number_as_item_number,
6555 item_number_as_rule_number):
6556 Now inline functions rather than macros, to avoid casts.
6557 * src/state.h (state_number_as_int): Likewise.
6558 * src/tables.c (state_number_to_vector_number,
6559 symbol_number_to_vector_number): Likewise.
6561 * src/gram.h (int_of_rule_number): Remove; no longer used.
6563 * src/lalr.c (add_lookback_edge): Use malloc rather than calloc,
6564 since the resulting storage is always stored into.
6566 * src/main.c (alloca) [C_ALLOCA]: Add decl here, the only place
6569 * src/muscle_tab.c (muscle_m4_output):
6570 Now inline. Return bool, not int.
6571 * src/state.c (state_compare): Likewise.
6572 * src/symtab.c (symbol_check_defined,
6573 symbol_check_alias_consistency, symbol_pack, symbol_translation,
6574 hash_compare_symbol, hash_symbol):
6576 * src/uniqstr.c (uniqstr_print): Likewise.
6577 * src/muscle_tab.c (muscle_m4_output_processor):
6578 New function, to avoid casts.
6579 * src/state.c (state_comparator, stage_hasher): Likewise.
6580 * src/symtab.c (symbol_check_defined_processor,
6581 symbol_check_alias_consistency_processor, symbol_pack_processor,
6582 symbol_translation_processor, hash_symbol_comparator,
6583 hash_symbol_hasher): Likewise.
6584 * src/uniqstr.c (uniqstr_print_processor): Likewise.
6585 * src/muscle_tab.c (muscles_m4_output):
6586 Use new functions instead of casting old functions unportably.
6587 * src/state.c (state_hash_new): Likewise.
6588 * src/symtab.c (symbols_new, symbols_do, symbols_check_defined,
6589 symbols_token_translations_init):
6591 * src/uniqstr.c (uniqstrs_new, hash_initialize, uniqstrs_do): Likewise.
6593 * src/output.c (GENERATE_MUSCLE_INSERT_TABLE): Use long local
6594 var instead of casting to long, to avoid casts.
6595 (prepare_states): Use MALLOC rather than alloca, so that we don't
6596 have to worry about alloca.
6597 * src/state.c (state_hash_lookup): Likewise.
6599 * src/scan-gram.l (<SC_ESCAPED_CHARACTER>"'"): Use unsigned char
6600 local var instead of casting to unsigned char, to avoid casts.
6602 * src/state.c (TRANSITIONS_ALLOC, ERRS_ALLOC, REDUCTIONS_ALLOC,
6603 STATE_ALLOC): Remove.
6604 (transitions_new, errs_new, reductions_new, state_new): Use malloc
6605 rather than calloc, and use offsetof to avoid allocating slightly
6607 (state_new): Initialize all members.
6609 * src/state.c (state_hash): Use unsigned accumulator, not signed.
6611 * src/symtab.c (symbol_free): Remove; unused.
6612 (symbol_get): Remove cast in lhs of assignment.
6613 (symbols_do): Now static. Accept generic arguments, not
6614 hashing-related ones.
6616 * src/symtab.h: (NUMBER_UNDEFINED): Remove unnecessary cast.
6617 (symbol_processor): Remove.
6618 (symbols_do): Remove decl; now static.
6620 * src/system.h (alloca): Remove; decl no longer needed.
6621 (<stddef.h>): Include, for offsetof.
6622 (<inttypes.>, <stdint.h>): Include if available.
6623 (uintptr_t): New type, if system lacks it.
6624 (CALLOC, MALLOC, REALLOC): New macros.
6625 All uses of XCALLOC, XMALLOC, and XREALLOC changed to use these
6628 * src/tables.c (table_size): Now int, to pacify GCC.
6629 (table_grow, table_ninf_remap): Use signed table size.
6630 (save_row): Don't bother initializing locals when not needed.
6631 (default_goto, goto_actions, pack_vector): Remove unnecessary casts.
6632 * src/uniqstr.c (hash_compare_uniqstr): Likewise.
6634 * src/vcg.h: Correct misspellings.
6636 * src/vcg_defaults.h (G_CMAX): Now INT_MAX.
6639 * src/getargs.c (getargs): Don't assume EOF == -1.
6641 2002-12-09 Paul Eggert <eggert@twinsun.com>
6643 Change identifier spellings to avoid collisions with names
6644 that are reserved by POSIX.
6646 Don't use names ending in _t, since POSIX reserves them.
6647 For consistency, remove _e and _s endings -- they're weren't
6648 needed to remove ambiguity. All uses changed.
6649 * src/uniqstr.h (uniqstr): Renamed from uniqstr_t, which in
6650 turn was just renamed from struniq_t.
6651 * src/uniqstr.c (uniqstr_processor): Renamed from struniq_processor,
6652 which in turn was just renamed from struniq_processor_t.
6653 (hash_compare_uniqstr): Renamed from hash_compare_struniq, which
6654 in turn was renamed from hash_compare_struniq_t.
6655 * src/LR0.c (struct state_list): Renamed from struct state_list_s.
6656 (state_list): Renamed from state_list_t.
6657 * src/assoc.h (assoc): Renamed from assoc_t.
6658 * src/conflicts.c (enum conflict_resolution): Renamed from
6659 enum conflict_resolution_e.
6660 * src/derives.c (struct rule_list): Renamed from struct rule_list_s.
6661 (rule_list): Renamed from rule_list_t.
6662 * src/getargs.h (enum trace): Renamed from enum trace_e.
6663 (enum report): Renamed from enum report_e.
6664 * src/gram.h (item_number): Renamed from item_number_t.
6665 (rule_number): Renamed from rule_number_t.
6666 (struct rule_s): Remove the "rule_s" part; not used.
6667 (rule): Renamed from rule_t.
6668 (rule_filter): Renamed from rule_filter_t.
6669 * src/lalr.c (struct goto_list): Renamed from struct goto_list_s.
6670 (goto_list): Renamed from goto_list_t.
6671 * src/lalr.h (goto_number): Renamed from goto_number_t.
6672 * src/location.h (location): Renamed from location_t.
6673 * src/muscle_tab.c (muscle_entry): Renamed from muscle_entry_t,
6674 and moved here from:
6675 * src/muscle_tab.h (muscle_entry_t): here.
6676 * src/nullable.c (struct rule_list): Renamed from struct rule_list_s.
6677 (rule_list): Renamed from rule_list_t.
6678 * src/print_graph.c (static_graph): Renamed from graph.
6679 * src/reader.h (braced_code): Renamed from braced_code_t.
6680 Remove brace_code_e tag.
6681 * src/relation.h (relation_node): Renamed from relation_node_t.
6682 (relation_nodes): Renamed from relation_nodes_t.
6683 (relation): Renamed from relation_t.
6684 * src/state.h (state_number): Renamed from state_number_t.
6685 (struct state): Renamed from struct state_s.
6686 (state): Renamed from state_t.
6687 (transitions): Renamed from transitions_t. Unused (and
6688 misspelled) transtion_s tag removed.
6689 (errs): Renamed from errs_t. Unused errs_s tag removed.
6690 (reductions): Renamed from reductions_t. Unused tag
6691 reductions_s removed.
6692 * src/symlist.h (symbol_list): Renamed from symbol_list_t.
6693 (struct symbol_list): Renamed from struct symbol_list_s.
6694 * src/symtab.h (symbol_number): Renamed from symbol_number_t.
6695 (struct symbol): Renamed from struct symbol_s.
6696 (symbol): Renamed from symbol_t.
6697 * src/tables.c (vector_number): Renamed from vector_number_t.
6698 (action_number): Renamed from action_t.
6699 * src/tables.h (base_number): Renamed from base_t.
6700 * src/vcg.h (enum color): Renamed from enum color_e.
6701 (enum textmode): Renamed from enum textmode_e.
6702 (enum shape): Renamed from enum shape_e.
6703 (struct colorentry): Renamed from struct colorentry_s.
6704 (struct classname): Renamed from struct classname_s.
6705 (struct infoname): Renamed from struct infoname_s.
6706 (enum layoutalgorithm): Renamed from enum layoutalgorithm_e.
6707 (enum decision): Renamed from enum decision_e.
6708 (enum orientation): Renamed from enum orientation_e.
6709 (enum alignment): Renamed from enum alignment_e.
6710 (enum arrow_mode): Renamed from enum arrow_mode_e.
6711 (enum crossing_type): Renamed from enum crossing_type_e.
6712 (enum view): Renamed from enum view_e.
6713 (struct node): Renamed from struct node_s.
6714 (node): Renamed from node_t.
6715 (enum linestyle): Renamed from enum linestyle_e.
6716 (enum arrowstyle): Renamed from enum arrowstyle_e.
6717 (struct edge): Renamed from struct edge.
6718 (edge): Renamed from edge_t.
6719 (struct graph): Renamed from struct graph_s.
6720 (graph): Renamed from graph_t.
6721 * tests/calc.at (_AT_DATA_CALC_Y, Simple LALR Calculator):
6722 Rename value_t -> value.
6723 * tests/input.at (Torturing the Scanner): Rename value_t -> value,
6724 value_t_as_yystype -> value_as_yystype.
6726 Don't include <errno.h> in the mainstream code, since it
6727 reserves E[A-Z0-9]* and we want to use symbols like 'EQUALS'.
6728 * lib/get-errno.c, lib/get-errno.h: New files.
6729 * lib/Makefile.am (libbison_a_SOURCES): Add get-errno.h,
6731 * src/files.c (xfopen, xfclose): Use get_errno instead of errno.
6732 * src/output.c (output_skeleton): Likewise.
6733 * src/scan-gram.l (<INITIAL>{int}): Use set_errno and get_errno
6735 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>\\x[0-9abcdefABCDEF]+):
6737 (handle_action_dollar, handle_action_at): Likewise.
6738 * src/system.h: Do not include <errno.h>.
6739 (TAB_EXT): Renamed from EXT_TAB.
6740 (OUTPUT_EXT): Renamed from EXT_OUTPUT.
6742 Avoid str[a-z]*, since <string.h> reserves that name space.
6743 Change all instances of "struniq" in names to "uniqstr", and
6744 likewise for "STRUNIQ" and "UNIQSTR".
6745 * src/uniqstr.c: Renamed from src/struniq.c.
6746 * src/uniqstr.h: Renamed from src/struniq.h.
6747 * src/Makefile.am (bison_SOURCES): Adjust to these renamings.
6748 * src/files.c (strsuffix): Remove; unused.
6749 (concat2): Renamed from stringappend. Now static.
6750 * src/files.h (strsuffix, stringappend): Remove; unused.
6751 * src/parse-gram.y (<chars>): Renamed from <string>.
6752 (<uniqstr>): Renamed from <struniq>.
6753 * src/scan-gram.l (obstack_for_string): Renamed from string_obstack.
6754 * src/vcg.h (struct node_s.expand): Renamed from struct node_s.stretch.
6755 (struct graph_s.expand): Renamed from struct graph_s.stretch.
6756 * src/vcg_defaults.h (G_EXPAND): Renamed from G_STRETCH.
6757 (G_LONG_STRAIGHT_PHASE): Renamed from G_STRAIGHT_PHASE.
6758 (N_EXPAND): Renamed from N_STRETCH.
6760 Avoid *_MAX and *_MIN, since <limits.h> reserves that name space.
6761 * data/yacc.c (YYSTACK_GAP_MAXIMUM): Renamed from YYSTACK_GAP_MAX.
6762 * src/gram.h (ITEM_NUMBER_MAX, ITEM_NUMBER_MIN, RULE_NUMBER_MAX):
6764 * src/lalr.h (GOTO_NUMBER_MAXIMUM): Renamed from GOTO_NUMBER_MAX.
6765 * src/state.h (STATE_NUMBER_MAXIMUM): Renamed from STATE_NUMBER_MAX.
6766 * src/symtab.h (SYMBOL_NUMBER_MAXIMUM): Renamed from SYMBOL_NUMBER_MAX.
6767 * src/tables.c (VECTOR_NUMBER_MAX, VECTOR_NUMBER_MIN): Remove; unused.
6768 (BASE_MAXIMUM): Renamed from BASE_MAX.
6769 (BASE_MINIMUM): Renamed from BASE_MIN.
6770 (ACTION_MAX): Remove; unused.
6771 (ACTION_NUMBER_MINIMUM): Renamed from ACTION_MIN.
6772 Unnecessary casts removed from above defines.
6775 Fix misspelling in names.
6776 * src/vcg.h (enum_alignment_e): Renamed from enum_alignement_e.
6777 * src/vcg_defaults.h (G_NODE_ALIGNMENT): Renamed from
6781 * lib/timevar.c (timevar_report): Renamed from time_report,
6782 for consistency with other names.
6783 * lib/timevar.h (timevar_report): New decl.
6784 * src/system.h (time_report): Remove; decl is now in lib/timevar.h.
6787 Sort include-file uses.
6789 Reorder all include files under src to be in the order "system.h".
6790 then the ../lib include files in angle brackets (alphabetized),
6791 then the . include files in double-quotes (alphabetized). Fix
6792 dependency breakages encountered in this process, as follows:
6793 * src/closure.h, src/derives.h, src/state.h: Include "gram.h".
6794 * src/complain.c: Don't include stdlib.h, string.h _LIBC stuff.
6795 * src/state.h: Include "symtab.h".
6797 2002-12-08 Paul Eggert <eggert@twinsun.com>
6799 * data/glr.c, data/lalr1.cc, data/yacc.c: Do not use __file__,
6800 since this causes problems when __file__ contains character
6801 sequences like "@" that are treated specially by src/scan-skel.l.
6802 Instead, just use the file's basename. This fixes the bug
6803 reported by Martin Mokrejs in
6804 <http://lists.gnu.org/archive/html/bug-bison/2002-12/msg00007.html>.
6806 2002-12-06 Paul Eggert <eggert@twinsun.com>
6808 Add support for rules that do not have trailing semicolons, as
6809 POSIX requires. Improve the quality of locations in Bison
6812 * src/location.c: Include <quotearg.h>.
6813 (empty_location): Now const.
6814 (location_print): New function. Follow the recommendation of the
6815 GNU Coding Standards for locations that span file boundaries.
6816 * src/location.h: Do not include <quotearg.h>; no longer needed.
6817 (boundary): New type.
6818 (location_t): Use it. This allows locations to span file boundaries.
6819 All member uses changed: file -> start.file or end.file (as needed),
6820 first_line -> start.line, first_column -> start.column,
6821 last_line -> end.line, last_column -> end.column.
6822 (equal_boundaries): New function.
6823 (LOCATION_RESET, LOCATION_STEP): Remove.
6824 (LOCATION_PRINT): Remove. All callers changed to use location_print.
6825 (empty_location): Now const.
6826 (location_print): New decl.
6827 * src/parse-gram.y (lloc_default): New function, which handles
6828 empty locations more accurately.
6829 (YYLLOC_DEFAULT): Use it.
6830 (%token COLON): Remove.
6831 (%token ID_COLON): New token.
6833 (declarations, rules): Remove trailing semicolon.
6834 (declaration, rules_or_grammar_declaration):
6835 Allow empty (";") declaration.
6836 (symbol_def): Remove empty actions; no longer needed.
6837 (rules_or_grammar_declaration): Remove trailing semicolon.
6838 (semi_colon.opt): Remove.
6839 * src/reader.h: Include location.h.
6840 (scanner_cursor): New decl.
6841 * src/reduce.c (nonterminals_reduce): Use warn_at rather than
6843 * src/scan-gram.l (YY_USER_INIT): Initialize scanner_cursor instead
6845 (STEP): Remove. No longer needed, now that adjust_location does
6846 the work. All uses removed.
6847 (scanner_cursor): New var.
6848 (adjust_location): Renamed from extend_location. It now sets
6849 *loc and adjusts the scanner cursor. All uses changed.
6850 Don't bother testing for CR.
6851 (handle_syncline): Remove location arg; now updates scanner cursor.
6852 All callers changed.
6853 (unexpected_end_of_file): Now accepts start boundary of token or
6854 comment, not location. All callers changed. Update scanner cursor,
6856 (SC_AFTER_IDENTIFIER): New state.
6857 (context_state): Renamed from c_context. All uses changed.
6858 (id_loc, code_start, token_start): New local vars.
6859 (<INITIAL,SC_AFTER_IDENTIFIER>): New initial context. Move all
6860 processing of Yacc white space and equivalents here.
6861 (<INITIAL>{id}): Save id_loc. Begin state SC_AFTER_IDENTIFIER
6862 instead of returning ID immediately, since we need to search for
6864 (<INITIAL>"'", "\""): Save token_start.
6865 (<INITIAL>"%{", "{", "%%"): Save code_start.
6866 (<SC_AFTER_IDENTIFIER>): New state, looking for a colon.
6867 (<SC_YACC_COMMENT>, <SC_COMMENT>, <SC_LINE_COMMENT>):
6868 BEGIN context_state at end, not INITIAL.
6869 (<SC_ESCAPED_STRING>"\"", <SC_ESCAPED_CHARACTER>"'",
6870 <SC_BRACED_CODE>"}", <SC_PROLOGUE>"%}", <SC_EPILOGUE><<EOF>>):
6871 Return correct token start.
6872 (<SC_BRACED_CODE,SC_PROLOGUE,SC_EPILOGUE>): Save start boundary when
6873 the start of a character, string or multiline comment is found.
6874 * tests/conflicts.at (S/R in initial, Defaulted Conflicted
6875 Reduction): Adjust reported locations to match the more-precise
6876 results now expected.
6877 * tests/input.at (Invalid $n, Invalid @n, Type Clashes): Likewise.
6878 * tests/reduce.at (Useless Rules, Reduced Automaton,
6879 Underivable Rules): Likewise.
6880 * tests/regression.at (Invalid inputs): No longer `expecting ";"
6881 or "|"' now that so many other tokens are allowed by the new grammar.
6883 * src/complain.h (current_file): Remove duplicate decl;
6884 current_file is now owned by files.h.
6885 * src/complain.c, src/scan-gram.l: Include files.h.
6887 2002-12-06 Paul Eggert <eggert@twinsun.com>
6889 * data/glr.c (yy_reduce_print): Don't assume that yyrline[yyrule]
6890 promotes to int; it might be unsigned int.
6891 * data/yacc.c (yy_reduce_print): Likewise.
6893 * doc/bison.texinfo (Table of Symbols): YYERROR_VERBOSE should
6894 be #defined in the prologue, not in the Bison declarations.
6895 This fixes Debian Bug 102878, reported by Shaul Karl.
6897 2002-12-02 Paul Eggert <eggert@twinsun.com>
6899 * configure.ac (AC_REPLACE_FUNCS): Add strtoul.
6900 * lib/strtoul.c: New file, from gnulib.
6901 This fixes a porting bug reported by Peter Klein in
6902 <http://lists.gnu.org/archive/html/bug-bison/2002-12/msg00000.html>.
6904 2002-11-30 Paul Eggert <eggert@twinsun.com>
6906 * src/scan-gram.l (no_cr_read, extend_location): Move to epilogue,
6907 and put only a forward declaration in the prologue. This is for
6908 consistency with the other scanner helper functions.
6910 Type clashes now generate warnings, not errors, since it
6911 appears that POSIX may allow some grammars with type clashes.
6912 * src/reader.c (grammar_current_rule_check): Warn about
6913 type clashes instead of complaining.
6914 * tests/input.at (Type Clashes): Expect warnings, not complaints.
6916 Add Yacc library, since POSIX requires it.
6917 * doc/bison.texinfo (Yacc Library): New node. Regenerate top menu.
6918 * lib/Makefile.am (lib_LIBRARIES, liby_a_SOURCES): New macros.
6919 * lib/main.c, lib/yyerror.c: New files.
6921 gram_error can be static; it need not be extern.
6922 * src/reader.h (gram_error): Remove decl.
6923 * src/parse-gram.y (gram_error): Now static. Add static decl.
6924 (print_token_value): Omit parameter names from forward decl,
6927 2002-11-29 Paul Eggert <eggert@twinsun.com>
6929 * doc/bison.texinfo: Emphasize that yylex and yyerror must
6930 be declared before being used. E.g., one should typically
6931 declare them in the prologue. Use GNU coding style in examples.
6932 Put "const" consistently after the type it modifies. Mention
6933 that C99 supports "inline". Mention that yyerror traditionally
6936 %parse-param and %lex-param now take just one argument, the
6937 declaration; the argument name is deduced from the declaration.
6939 * doc/bison.texinfo (Parser Function, Pure Calling, Error
6940 Reporting, Table of Symbols): Document this.
6941 * src/parse-gram.y (add_param): New function.
6943 (declaration): Implement new rule for %parse-param and %lex-param.
6944 * src/scan-gram.l: "," now elicits a warning, rather than being
6945 a token; this is more compatible with byacc.
6946 * tests/calc.at (Simple LALR Calculator): Adopt new convention.
6948 2002-11-27 Paul Eggert <eggert@twinsun.com>
6950 Rename identifiers to avoid real and potential collisions.
6952 * data/c.m4 (b4_yysymprint_generate): yyout -> yyoutput,
6953 to avoid collision with lex macro described by Bruce Lilly in
6954 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00114.html>.
6955 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise.
6956 * doc/bison.texinfo (Prologue, Tracing): yyprint -> print_token_value.
6957 * src/parse-gram.y (print_token_value): Renamed from yyprint.
6959 (YYPARSE_PARAM, YYLEX_PARAM, yycontrol): Remove. All uses changed.
6960 The name "yycontrol" violates the name space rules, and this stuff
6961 wasn't being used anyway.
6962 (input): Remove action; this stuff wasn't being used.
6963 (gram_error): Rename local variable yylloc -> loc.
6964 * src/reader.h (struct gram_control_s, gram_control_t): Remove.
6965 (YY_DECL): Don't use "yy" at start of local variables.
6966 All uses changed, e.g., yylloc -> loc.
6967 * src/scan-gram.l (STEP): Renamed from YY_STEP. All uses changed.
6968 (STRING_GROW): Renamed from YY_OBS_GROW. All uses changed.
6969 (STRING_FINISH): Renamed from YY_OBS_FINISH. All uses changed.
6970 (STRING_FREE): Renamed from YY_OBS_FREE. All uses changed.
6972 * src/parse-gram.y (gram_error): loc is now const *.
6973 * src/reader.h (gram_error): Likewise.
6975 2002-11-24 Paul Eggert <eggert@twinsun.com>
6979 * tests/actions.at (Actions after errors): Use an output format
6980 more similar to that of the Printers and Destructors test.
6981 Test the position of the ';' token too.
6982 (Printers and Destructors): Likewise.
6983 (Printers and Destructors: %glr-parser): Remove for now, to avoid
6984 unnecessarily alarming people when the test fails.
6986 * data/yacc.c (yyerrlab1): Move this label down, so that the
6987 parser does not discard the lookahead token if the user code
6988 invokes YYERROR. This change is required for POSIX conformance.
6990 * lib/error.c: Sync with gnulib.
6992 2002-11-22 Paul Eggert <eggert@twinsun.com>
6994 * lib/quotearg.c, lib/quotearg.h: Sync with gnulib.
6995 * lib/mbswidth.c, lib/mbswidth.h: Likewise.
6996 * lib/xmalloc.c: Likewise.
6998 2002-11-20 Paul Eggert <eggert@twinsun.com>
7000 * lib/argmatch.c, lib/argmatch.h: Sync with gnulib.
7002 2002-11-20 Paul Eggert <eggert@twinsun.com>
7004 Avoid use of <assert.h>, as the GNU Coding Standards hint that one
7005 should use `if (! x) abort ();' rather than `assert (x);', and
7006 anyway it's one less thing to worry about configuring.
7008 * data/glr.c, lib/hash.c, src/system.h: Do not include <assert.h>.
7009 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise,
7010 and replace all instances of assert with abort.
7011 * tests/calc.at (_AT_DATA_CALC_Y): Likewise.
7012 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Likewise.
7014 * data/glr.c (yydoAction, yyglrReduce, yysplitStack, yyresolveStates,
7015 yyresolveAction, yyprocessOneStack): Use abort rather than assert.
7016 * lib/hash.c (hash_lookup, hash_get_first, hash_get_next,
7017 hash_find_entry, hash_rehash, hash_insert): Likewise.
7018 * src/conflicts.c (resolve_sr_conflict): Likewise.
7019 * src/lalr.c (set_goto_map, map_goto): Likewise.
7020 * src/nullable.c (nullable_compute): Likewise.
7021 * src/output.c (prepare_rules, token_definitions_output): Likewise.
7022 * src/reader.c (packgram, reader): Likewise.
7023 * src/state.c (state_new, state_free, state_transitions_set,
7024 state_reduction_find): Likewise.
7025 * src/symtab.c (symbol_user_token_number_set, symbol_make_alias,
7026 symbol_pack): Likewise.
7027 * src/tables.c (conflict_row, pack_vector): Likewise.
7028 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str,
7029 get_layoutalgorithm_str, get_decision_str, get_orientation_str,
7030 get_node_alignement_str, get_arrow_mode_str, get_crossing_type_str,
7031 get_view_str, get_linestyle_str, get_arrowstyle_str): Likewise.
7033 * lib/argmatch.h (ARRAY_CARDINALITY): Do not bother to #undef.
7034 (ARGMATCH_CONSTRAINT): New macro.
7035 (ARGMATCH_ASSERT): Use it.
7037 * src/system.h (verify): New macro.
7038 * src/getargs.c (trace_argmatch, report_argmatch): Use verify
7040 * src/tables.c (tables_generate): Likewise.
7042 * src/struniq.c (struniq_assert): Now returns void, and aborts
7043 if the assertion is false.
7044 (struniq_assert_p): Remove.
7045 * src/struniq.h: Likewise.
7047 2002-11-18 Paul Eggert <eggert@twinsun.com>
7049 * data/glr.c (yygetLRActions): Replace `yyindex' with
7050 `yytable[yyindex]' to fix typo introduced in my 2002-11-09 patch.
7051 This fixes the regression with Sun ONE Studio 7 cc that I reported in
7052 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00077.html>.
7054 2002-11-18 Akim Demaille <akim@epita.fr>
7056 * doc/bison.texinfo (Tracing): `yyprint' shouldn't prepend a
7058 From Tim Van Holder.
7060 2002-11-17 Paul Eggert <eggert@twinsun.com>
7062 Pacify Sun ONE Studio 7 lint. Also, rename "ParseError"
7063 to "SyntaxError" for consistency with my 2002-11-15 change.
7065 * data/glr.c (YYDPRINTF, YYDSYMPRINT, YYDSYMPRINTF) [!YYDEBUG]: Do
7066 not define to {}, since this breaks the common use of `YYDPRINTF
7067 ((...));' if a single statement is desired (e.g. before `else').
7068 Work around GCC warnings by surrounding corresponding calls with
7070 (yyhasResolvedValue): Remove unused function.
7071 (yymergeOptionSets, yyresolvStack): Use `continue;' for empty
7073 (yyreportSyntaxError): Renamed from yyreportParseError.
7074 (yyrecoverSyntaxError): Renamed from yyrecoverParseError.
7076 * tests/calc.at (_AT_DATA_CALC_Y): Make vars static instead of
7077 extern when possible. Remove unused initializations.
7079 2002-11-16 Akim Demaille <akim@epita.fr>
7081 Augment the similarity between GLR and LALR traces.
7083 * data/yacc.c (yy_stack_print, YY_STACK_PRINT, yy_reduce_print)
7084 (YY_REDUCE_PRINT): New.
7085 (yyparse): Use them.
7086 * data/glr.c (yy_reduce_print): Use YYFPRINTF, no need for
7088 (yyglrReduce, yyrecoverParseError, yyparse): Don't report the
7089 state reached after the reduction/recovery, since...
7090 (yyparse, yyprocessOneStack): Report the state we are entering in.
7092 2002-11-16 Akim Demaille <akim@epita.fr>
7094 * src/getargs.h, src/getargs.c (trace_e, trace_args, trace_types):
7095 Add support for --trace=skeleton.
7096 * src/scan-skel.l: %option debug.
7097 Scan strings of non-@ or \n instead of character by character.
7098 (scan_skel): Handle trace_skeleton.
7100 (@output_parser_name@, @output_header_name@): ``Restore'' their
7101 support (used to be M4 macros).
7102 * data/yacc.c: Quote larger chunks, a la glr.c.
7103 * data/lalr1.cc: Likewise.
7104 The header guards are no longer available, so use some other
7105 string than `YYLSP_NEEDED'.
7107 2002-11-16 Akim Demaille <akim@epita.fr>
7109 Make the ``Printers and Destructors'' test more verbose, taking
7110 `yacc.c''s behavior as (possibly wrong) reference.
7112 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Use printf
7113 instead of fprint on stdout.
7114 Set and report the last_line of the symbols.
7115 Consistently display values and locations.
7117 2002-11-16 Paul Eggert <eggert@twinsun.com>
7119 * data/yacc.c: Avoid over-quoting of __line__ and __file__.
7121 2002-11-15 Paul Eggert <eggert@twinsun.com>
7123 * tests/actions.at (Actions after errors): New test case.
7125 * data/glr.c, data/lalr1.cc, data/yacc.cc, doc/bison.texinfo,
7126 src/conflicts.c, src/parse-gram.y, src/tables.c, src/tables.h,
7127 tests/action.at, tests/calc.at, tests/conflicts.at,
7128 tests/cxx-type.at, tests/regression.at:
7129 "parse error" -> "syntax error" for POSIX compatibility.
7130 "parsing stack overflow..." -> "parser stack overflow" so
7131 that code matches Bison documentation.
7133 2002-11-15 Akim Demaille <akim@epita.fr>
7135 * src/parse-gram.y (declaration): Have %parse-param and %lex-param
7136 take two BRACED_CODE, not two string_content.
7137 Free the scanner's obstack when we are done.
7138 (code_content): New.
7139 * tests/calc.at: Adjust.
7140 * doc/bison.texinfo: Adjust.
7141 Also, make sure to include the `,' for these declarations.
7143 2002-11-15 Tim Van Holder <tim.van.holder@pandora.be>
7145 * m4/prereq.m4: Removed the commented jm_PREREQ_HASH
7146 definition; avoids potential autoreconf problems.
7148 2002-11-15 Akim Demaille <akim@epita.fr>
7150 Always check the value returned by yyparse.
7152 * tests/calc.at (_AT_DATA_CALC_Y): Have `main' exit with the value
7153 returned by yyparse.
7154 (_AT_CHECK_CALC_ERROR): Take the expected exit value as argument.
7156 * tests/glr-regr1.at (glr-regr1.y): Have `main' exit with the value
7157 returned by yyparse.
7159 2002-11-14 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
7161 * data/glr.c (yyFail): Always set yyerrflag. Corrects regression
7164 2002-11-14 Paul Eggert <eggert@twinsun.com>
7166 * src/output.c (output_skeleton): Call xfopen instead of
7167 duplicating xfopen's body.
7169 Fix bugs reported by Nelson H. F. Beebe in
7170 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00078.html>.
7172 * tests/headers.at (AT_TEST_CPP_GUARD_H): Don't assume that
7173 "$CC -E foo.h" is allowed, as this doesn't work with the Portland
7174 Group compiler. Instead, use "$CC -E bar.c". Include the .h
7175 file twice in the grammar, as an extra check.
7177 * tests/input.at (Torturing the Scanner): Surround the
7178 backslash-newline tests with "#if 0", to make it less likely that
7179 we'll run into compiler bugs. Bring back solitary \ inside
7180 comment, but add a closing comment to work around HP C bug. Don't
7181 test backslash-newline in C character constant.
7183 2002-11-14 Akim Demaille <akim@epita.fr>
7185 * tests/synclines.at (AT_SYNCLINES_COMPILE): Ignore the exit
7186 status of the compiler.
7187 Calling `exit 1' is no longer needed.
7188 Reported by Nelson H. F. Beebe.
7190 2002-11-14 Akim Demaille <akim@epita.fr>
7192 * tests/atlocal.in (CPPFLAGS): We have config.h.
7193 * tests/testsuite.at (AT_DATA_GRAMMAR_PROLOGUE, AT_DATA_GRAMMAR):
7195 * tests/actions.at, tests/calc.at, tests/conflicts.at,
7196 * tests/cxx-type.at, tests/glr-regr1.at, tests/headers.at,
7197 * tests/regression.at, tests/torture.at: Use them for all the
7198 grammars that are to be compiled.
7199 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Rename as...
7200 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): this.
7201 * doc/bison.texinfo (GLR Parsers): Document `inline'.
7203 2002-11-14 Akim Demaille <akim@epita.fr>
7205 * doc/bison.texinfo: Various formatting changes (alignments in
7206 samples, additional @group/@end group, GCS in samples.
7207 Use @deffn instead of simple @table to define the directives,
7208 macros, variables etc.
7210 2002-11-13 Paul Eggert <eggert@twinsun.com>
7212 Fix some bugs reported by Albert Chin-A-Young in
7213 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00066.html>.
7215 * tests/input.at (Torturing the Scanner): Don't invoke "cc a.c b.c
7216 -o c"; the HP C compiler chatters during compilation.
7217 Instead, invoke "cc -c a.c -o a.o; cc -c b.c -o b.o; cc a.o b.o -o c".
7218 * tests/headers.at (export YYLTYPE): Likewise.
7220 * tests/input.at (Torturing the Scanner): Remove lines containing
7221 solitary backslashes, as they tickle a bug in the HP C compiler.
7223 * tests/glr-regr1.at (Badly Collapsed GLR States): Avoid //
7224 comments, since they're not portable. Use GNU coding style.
7226 2002-11-13 Akim Demaille <akim@epita.fr>
7228 * data/yacc.c: Leave bigger chunks of quoted text.
7229 (YYDSYMPRINTF): New.
7230 Use it to report symbol activities.
7231 * data/glr.c (YYDSYMPRINTF): New.
7234 2002-11-12 Paul Eggert <eggert@twinsun.com>
7238 * data/glr.c (yydoAction): Return YYRESULTTAG, not int.
7239 (yyglrReduce): Return yyok, not 0.
7240 This should avoid the enumerated-type warnings reported
7241 by Nelson H. F. Beebe in
7242 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00057.html>.
7244 * lib/bbitset.h (BITSET_INLINE): Remove.
7245 * lib/bitset.h [! BITSET_INLINE]: Remove.
7246 (bitset_set, bitset_reset, bitset_test): Rename local vars
7247 to avoid shadowing warnings by GCC.
7249 * data/glr.c (inline): Remove #define. It's the user's
7250 responsibility to #define it away, just like 'const'.
7251 This fixes one of the bugs reported by Nelson H. F. Beebe in
7252 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00058.html>.
7254 * Makefile.maint (po-check): Scan .l and .y files instead of the
7255 .c and the .h files that they generate. This fixes the bug
7256 reported by Tim Van Holder in:
7257 <http://lists.gnu.org/archive/html/bison-patches/2002-11/msg00062.html>
7258 Look for N_ as well as for _. Try to avoid matching #define for
7260 * po/POTFILES.in: Remove src/parse-gram.c, src/scan-gram.c,
7261 src/system.h. Add src/parse-gram.y, src/scan-gram.l.
7262 * src/scan-gram.l: Revamp regular expressions so that " and '
7263 do not confuse xgettext.
7265 * src/struniq.h (struniq_new): Do not declare the return type
7266 to be 'const'; this violates the C standard.
7267 * src/struniq.c (struniq_new): Likewise.
7269 2002-11-12 Albert Chin-A-Young <china@thewrittenword.com>
7271 * src/Makefile.am (LDADD): Link $(LIBINTL) last to avoid the
7272 duplicate definition of optind on Tru64 UNIX 4.0D with the Compaq
7275 2002-11-12 Akim Demaille <akim@epita.fr>
7277 * Makefile.maint: Sync with Autoconf:
7278 (local_updates): New.
7280 2002-11-12 Akim Demaille <akim@epita.fr>
7282 * po/POTFILES.in (src/lalr.c, src/state.c): Remove
7284 2002-11-12 Akim Demaille <akim@epita.fr>
7286 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Display the
7289 2002-11-12 Akim Demaille <akim@epita.fr>
7291 * data/c.m4 (b4_yysymprint_generate): Pass *yyvaluep to YYPRINT,
7294 2002-11-12 Akim Demaille <akim@epita.fr>
7296 * tests/actions.at (AT_CHECK_PRINTER_AND_DESTRUCTOR): New.
7297 Use it to test the GLR parser.
7299 2002-11-12 Akim Demaille <akim@epita.fr>
7301 * tests/regression.at (input.y): s/YYEOF/MYEOF/, as the skeleton
7303 * data/glr.c (yystos): New.
7304 (b4_yysymprint_generate, b4_yydestruct_generate): Invoke.
7306 (yyval): Don't define it, it is handled via M4.
7307 (yyrecoverParseError): Free verbosely the discarded symbols.
7308 * data/yacc.c (yysymprint): Remove, rather...
7309 (b4_yysymprint_generate): invoke.
7310 * data/c.m4 (b4_yysymprint_generate): New.
7311 Accept pointers as arguments, as opposed to the version from
7313 (b4_yydestruct_generate): Likewise.
7314 * tests/cations.at (Printers and Destructors): Use Bison directives
7315 instead of CPP macros.
7316 Don't rely on internal details.
7318 2002-11-12 Akim Demaille <akim@epita.fr>
7320 * data/c.m4 (b4_yydestruct_generate, b4_symbol_actions): New.
7321 * data/yacc.c: Rename yychar1 as yytoken, as in glr.c.
7322 Don't work on yychar (i.e., do set it to YYEMPTY, don't match
7323 it against YYEMPTY and so forth), work on yytoken (i.e., set
7324 it to YYEMPTY etc.).
7325 (yydestruct): Replace with a b4_yydestruct_generate invocation.
7326 (b4_symbol_actions): Remove.
7327 * data/glr.c (YYTRANSLATE): As for yacc.c, if negative, it stands
7328 for 0, end-of-input.
7330 2002-11-12 Akim Demaille <akim@epita.fr>
7332 * doc/bison.texinfo (Destructor Decl): New.
7334 2002-11-12 Akim Demaille <akim@epita.fr>
7336 * src/tables.c (tables_generate): Use free for pointers that
7337 cannot be NULL, not XFREE.
7338 (pack_vector): Use assert, not fatal, for bound violations.
7339 * src/state.c (state_new): Likewise.
7340 * src/reader.c (reader): Likewise.
7341 * src/lalr.c (set_goto_map): Likewise.
7342 * src/location.h (LOCATION_PRINT): If first_line is 0, just issue
7345 2002-11-12 Akim Demaille <akim@epita.fr>
7347 * src/scan-gram.l, src/reader.h (scanner_last_string_free):
7349 * src/scan-gram.l (last_string): Is global to the file, not to
7351 * src/parse-gram.y (input): Don't append the epilogue here,
7352 (epilogue.opt): do it here, and free the scanner's obstack.
7353 * src/reader.c (epilogue_set): Rename as...
7354 (epilogue_augment): this.
7355 * data/c.m4 (b4_epilogue): Defaults to empty.
7357 2002-11-12 Akim Demaille <akim@epita.fr>
7359 * src/getargs.c (long_options): Remove duplicates.
7360 * src/vmsgetargs.c, src/build.com, src/bison.cld, src/vmshlp.mar:
7362 * doc/bison.rnh: Remove.
7363 * doc/bison.texinfo (VMS Invocation): Remove.
7365 2002-11-12 Akim Demaille <akim@epita.fr>
7367 * src/struniq.h, src/struniq.c (struniq_t): Is const.
7368 (STRUNIQ_EQ, struniq_assert, struniq_assert_p): New.
7370 Use struniq for symbols.
7372 * src/symtab.h (symbol_t): The tag member is a struniq.
7373 (symbol_type_set): Adjust.
7374 * src/symtab.c (symbol_new): Takes a struniq.
7375 (symbol_free): Don't free the tag member.
7376 (hash_compare_symbol_t, hash_symbol_t): Rename as...
7377 (hash_compare_symbol, hash_symbol): these.
7378 Use the fact that tags as struniqs.
7379 (symbol_get): Use struniq_new.
7380 * src/symlist.h, src/symlist.c (symbol_list_n_type_name_get):
7382 * src/reader.h (merger_list, grammar_currentmerge_set): The name
7383 and type members are struniqs.
7384 * src/reader.c (get_merge_function)
7385 (grammar_current_rule_merge_set): Adjust.
7386 (TYPE, current_type): Are struniq.
7388 Use struniq for file names.
7390 * src/files.h, src/files.c (infile): Split into...
7391 (grammar_file, current_file): these.
7392 * src/scan-gram.c (YY_USER_INIT, handle_syncline): Adjust.
7393 * src/reduce.c (reduce_print): Likewise.
7394 * src/getargs.c (getargs): Likewise.
7395 * src/complain.h, src/complain.c: Likewise.
7396 * src/main.c (main): Call struniqs_new early enough to use it for
7398 Don't free the input file name.
7400 2002-11-12 Akim Demaille <akim@epita.fr>
7402 * src/symtab.c (symbol_free): Remove dead deactivated code:
7403 type_name are properly removed.
7404 Don't use XFREE to free items that cannot be NULL.
7405 * src/struniq.h, src/struniq.c: New.
7406 * src/main.c (main): Initialize/free struniqs.
7407 * src/parse-gram.y (%union): Add astruniq member.
7409 * src/scan-gram.l (<{tag}>): Return a struniq.
7410 Free the obstack bit that used to store it.
7411 * src/symtab.h (symbol_t): The 'type_name' member is a struniq.
7413 2002-11-11 Paul Eggert <eggert@twinsun.com>
7415 Revamp to fix many (but not all) of the C- and M4-related quoting
7416 problems. Among other things, this fixes the Bison bug reported
7417 by Jan Hubicka when processing the Bash grammar; see:
7418 <http://lists.gnu.org/archive/html/bison-patches/2002-11/msg00039.html>
7420 Use new @ escapes consistently. Represent brackets with @{ and @}
7421 rather than @<:@ and @:>@, since this works a bit better with dumb
7422 editors like vi. Represent @ with @@, since @ is now consistently
7423 an escape. Use @oline@ and @ofile@ rather than __oline__ and
7424 __ofile__, to avoid unexpected expansions. Similarly, use @output
7425 rather than #output.
7427 * data/c.m4 (b4_copyright): Omit file name from comment, since
7428 the file name could contain "*/".
7429 (b4_synclines_flag): Don't quote the 2nd argument; it should already
7430 be quoted. All uses changed.
7432 * data/glr.c: Use new @ escapes consistently.
7433 (b4_input_suffix, b4_output_parser_suffix, b4_output_parser_name,
7434 b4_output_header_suffix, b4_output_header_name, b4_header_guard):
7435 Remove, since they couldn't handle arbitrary characters in file
7437 * data/lalr1.cc: Likewise.
7438 * data/yacc.c: Likewise.
7440 * src/files.c (output_infix): Remove; all uses removed.
7441 * src/files.h: Likewise.
7443 * data/glr.c: Remove use of "#ifdef b4_header_guard", since it
7444 mishandled funny characters in file names, and anyway it isn't
7446 * data/yacc.c: Likewise.
7447 * data/lalr1.cc: Use YYSLP_NEEDED instead of b4_header_guard.
7449 * data/glr.c (YYSTYPE_IS_TRIVIAL): Define when the .h file would.
7450 * data/yacc.c: Likewise.
7452 * src/muscle_tab.c: Include quotearg.h, since we need to quote C
7454 (muscle_init): Quote filename as a C string.
7455 * src/muscle_tab.h (MUSCLE_GROW_STRING_PAIR): Remove; unused.
7456 (MUSCLE_OBSTACK_SGROW, MUSCLE_INSERT_C_STRING): New macros.
7457 * src/output.c (escaped_file_name_output): New function.
7458 (prepare_symbols): Quote tokens for M4.
7459 (prepare): Don't insert output_infix, output_prefix,
7460 output_parser_name, output_header_name; this is now down by scan-skel.
7461 Insert skeleton as a C string.
7463 * src/output.c (user_actions_output, symbol_destructors_output,
7464 symbol_printers_output): Quote filenames for C and M4.
7465 * src/reader.c (prologue_augment, epilogue_set): Likewise.
7467 * src/scan-gram.l (<SC_CHARACTER>): Don't worry about any backslash
7468 escapes other than \\ and \'; this simplifies the code.
7469 (<SC_STRING>): Likewise, for \\ and \".
7470 (<SC_COMMENT,SC_LINE_COMMENT,SC_STRING,SC_CHARACTER,SC_BRACED_CODE,
7471 SC_PROLOGUE,SC_EPILOGUE>): Escape $ and @, too.
7472 Use new escapes @{ and @} for [ and ].
7474 * src/scan-skel.l (yylineno, yyoutname): Remove static vars, replacing
7475 them with auto vars.
7476 Switch to new escape scheme, where @ is the escape character uniformly.
7477 Abort if a stray escape character is found. Avoid unbounded input
7478 buffer when parsing non-escaped text.
7480 * tests/input.at (Torturing the Scanner): Add tests that @oline@,
7481 __oline__, #output, $@, and @{ do not have unintended meanings.
7483 2002-11-09 Paul Eggert <eggert@twinsun.com>
7485 Fix the test failure due to GCC warnings described in
7486 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00000.html>.
7487 * data/glr.c (yyis_pact_ninf, yyis_table_ninf): New macros, which
7488 evaluate to 0 if it's impossible for NINF to be in the respective
7490 (yygetLRActions, yyrecoverParseError): Use them.
7492 * src/scan-gram.l (unexpected_end_of_file): Fix bug: columns were
7493 counted in the token inserted at end of file. Now takes
7494 location_t *, not location_t, so that the location can be
7495 adjusted. All uses changed.
7497 * tests/regression.at (Invalid inputs): Adjust wording in
7498 diagnostic to match the new behavior.
7500 * tests/torture.at (AT_DATA_TRIANGULAR_GRAMMAR,
7501 AT_DATA_HORIZONTAL_GRAMMAR, AT_DATA_LOOKAHEADS_GRAMMAR,
7502 AT_DATA_STACK_TORTURE): Replace `assert (x);' with `if (! (x))
7503 abort ();'. This reduces the runtime of the "Many lookaheads"
7504 test from 27.6 to 2.7 minutes on a 440 MHz Ultrasparc III running
7507 2002-11-07 Paul Eggert <eggert@twinsun.com>
7509 * src/parse-gram.y (CHARACTER): Remove unused token.
7512 * src/scan-gram.l: Remove stack option. We no longer use the
7513 stack, since the stack was never deeper than 1; instead, use the
7514 new auto var c_context to record the stacked value.
7516 Remove nounput option. At an unexpected end of file, we now unput
7517 the minimal input necessary to end cleanly; this simplifies the
7520 Avoid unbounded token sizes where this is easy.
7522 (unexpected_end_of_file): New function.
7523 Use it to systematize the error message on unexpected EOF.
7524 (last-string): Now auto, not static.
7525 (YY_OBS_FREE): Remove unnecessary do while (0) wrapper.
7526 (scanner_last_string_free): Remove; not used.
7527 (percent_percent_count): Move decl to just before use.
7528 (SC_ESCAPED_CHARACTER): Return ID at unexpected end of file,
7529 not the (never otherwised-used) CHARACTER.
7531 2002-11-07 Akim Demaille <akim@epita.fr>
7533 Let yyerror always receive the msg as last argument, so that
7534 yyerror can be variadic.
7536 * data/yacc.c (b4_yyerror_args): New.
7537 Use it when calling yyerror.
7538 * data/glr.c (b4_yyerror_args, b4_lyyerror_args): New.
7539 Use it when calling yyerror.
7540 * doc/bison.texinfo (Error Reporting): Adjust.
7541 * tests/calc.at (_AT_DATA_CALC_Y): Adjust.
7542 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Adjust.
7544 2002-11-06 Akim Demaille <akim@epita.fr>
7546 #line should have quoted strings.
7547 Ideally, this should be done by m4_quotearg.
7549 * src/scan-skel.l: Include quotearg.h.
7551 * src/output.c (symbol_printers_output)
7552 (symbol_destructors_output): Quote the file name.
7554 2002-11-06 Akim Demaille <akim@epita.fr>
7556 * tests/regression.at (Invalid inputs): Adjust to the recent
7559 2002-11-06 Akim Demaille <akim@epita.fr>
7562 Reported by Jim Kent.
7564 * data/c.m4 (b4_syncline): New.
7565 * data/glr.c, data/yacc.c, data/lalr1.cc: Use it.
7566 * src/reader.c (prologue_augment, epilogue_set): Use b4_syncline.
7567 * src/output.c (user_actions_output): Likewise.
7568 (prepare): Define 'b4_synclines_flag'.
7569 * src/muscle_tab.c (muscle_init): Don't define b4_linef.
7571 2002-11-06 Akim Demaille <akim@epita.fr>
7573 * src/main.c (main): Free `infile'.
7574 * src/scan-gram.l (handle_syncline): New.
7576 * src/output.c (user_actions_output, symbol_destructors_output)
7577 (symbol_printers_output): Use the location's file name, not
7579 * src/reader.c (prologue_augment, epilogue_set): Likewise.
7581 2002-11-05 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
7583 * src/tables.c (matching_state): Don't allow states to match if
7584 either has GLR conflict entries.
7586 2002-11-05 Paul Eggert <eggert@twinsun.com>
7588 * src/scan-gram.l: Use more accurate diagnostics, e.g.
7589 "integer out of range" rather than "invalid value".
7590 * tests/input.at (Invalid $n, Invalid @n): Change expected wording
7593 Scan <% and %> digraphs in C code as POSIX 1003.1-2001 requires.
7594 Also, remove one static variable in the scanner.
7596 * src/scan-gram.l (braces_level): Now auto, not static.
7597 Initialize to zero if the compiler is being picky.
7598 (INITIAL): Clear braces_level instead of incrementing it.
7599 (SC_BRACED_CODE): Treat <% and %> as { and } when inside C code,
7600 as POSIX 1003.1-2001 requires.
7601 * src/system.h (IF_LINT): New macro, taken from coreutils.
7602 * configure.ac: Define "lint" if --enable-gcc-warnings.
7604 2002-11-05 Akim Demaille <akim@epita.fr>
7606 * src/scan-gram.l: When it starts with `%', complain about the
7607 whole directive, not just that `invalid character: %'.
7609 2002-11-04 Akim Demaille <akim@epita.fr>
7611 * Makefile.maint: Update from Autoconf.
7612 (update, cvs-update, po-update, do-po-update): New.
7614 2002-11-04 Akim Demaille <akim@epita.fr>
7616 * tests/glr-regr1.at (Badly Collapsed GLR States): Prototype yylex
7618 Have yyerror `use' its arguments.
7619 * tests/calc.at (AT_CHECK_PUSHDEFS): AT_YYERROR_SEES_LOC_IF
7620 returns true when location & yacc & pure & parse-param.
7621 (_AT_DATA_CALC_Y): Let yyerror ``use'' its arguments.
7623 2002-11-04 Akim Demaille <akim@epita.fr>
7625 * src/location.h (LOCATION_PRINT): Use quotearg slot 3 to avoid
7627 * src/scan-gram.l: Use [\'] instead of ['] to pacify
7630 Use quote, not quote_n since LOCATION_PRINT no longer uses the
7633 2002-11-03 Paul Eggert <eggert@twinsun.com>
7635 * src/reader.c (get_merge_function, grammar_current_rule_check):
7636 Use consistent diagnostics for reporting type name clashes.
7637 Quote the types with <>, for consistency with Yacc.
7638 * tests/input.at (Type Clashes): Adjust to diagnostic changes.
7640 2002-11-03 Akim Demaille <akim@epita.fr>
7642 * data/c.m4 (b4_identification, b4_user_args, b4_parse_param):
7644 * data/yacc.m4 (b4_pure_args, b4_Pure_args): New.
7645 (b4_parse_param): Remove.
7646 Use b4_identification.
7647 Propagate b4_pure_args where needed to pass them to yyerror.
7648 * data/glr.m4 (b4_parse_param): Remove.
7649 (b4_user_formals, b4_pure_args, b4_pure_formals, b4_lpure_args)
7650 (b4_lpure_formals): New.
7651 Use b4_identification.
7652 (YY_USER_FORMALS, YY_USER_ARGS): Remove, replaced by
7653 b4_user_formals and b4_user_args.
7654 (yyexpandGLRStack, yyFail, yyaddDeferredAction, yyglrShiftDefer)
7655 (yyreportAmbiguity): When using a pure parser, also need
7656 the location, and the parse-params.
7658 (yyuserAction, yyglrShift, yyreportParseError, yyrecoverParseError):
7659 When using a pure parser, also need the parse-params.
7661 * tests/calc.at: Test pure (%pure-parser) and absolutely pure
7662 (%pure-parser + %parse-param) LALR and GLR parsers.
7663 (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): New, define AT_PARAM_IF,
7664 AT_LOCATION_IF, AT_PURE_IF, AT_GLR_IF, AAT_PURE_AND_LOC_IF,
7665 AT_GLR_OR_PARAM_IF, AT_YYERROR_ARG_LOC_IF, AT_YYERROR_SEES_LOC_IF.
7666 (_AT_DATA_CALC_Y): Equip for purity of yyerror.
7667 (_AT_CHECK_CALC_ERROR): Use AT_YYERROR_SEES_LOC_IF.
7668 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Equip for yyerror purity.
7669 * doc/bison.texinfo: Untabify the whole file.
7670 (Parser Function): Document %parse-param, deprecate YYPARSE_PARAM.
7671 (Pure Calling): Document %lex-param, deprecate YYLEX_PARAM.
7672 (Error Reporting): Adjust to these new directives.
7673 Document %error-verbose, deprecate YYERROR_VERBOSE.
7675 2002-11-03 Akim Demaille <akim@epita.fr>
7677 * tests/calc.at: Change all the AT_CHECK_CALC_LALR and
7678 AT_CHECK_CALC_GLR invocations to use % directives, instead of
7679 command line options.
7680 * tests/cxx-type.at: Formatting changes.
7682 2002-11-03 Paul Eggert <eggert@twinsun.com>
7684 * src/scan-gram.l: Revamp to fix POSIX incompatibilities,
7685 to count columns correctly, and to check for invalid inputs.
7687 Use mbsnwidth to count columns correctly. Account for tabs, too.
7689 (YY_USER_ACTION): Invoke extend_location rather than LOCATION_COLUMNS.
7690 (extend_location): New function.
7693 Handle CRLF in C code rather than in Lex code.
7694 (YY_INPUT): New macro.
7695 (no_cr_read): New function.
7697 Scan UCNs, even though we don't fully handle them yet.
7698 (convert_ucn_to_byte): New function.
7700 Handle backslash-newline correctly in C code.
7701 (SC_LINE_COMMENT, SC_YACC_COMMENT): New states.
7702 (eols, blanks): Remove. YY_USER_ACTION now counts newlines etc.;
7704 (tag, splice): New EREs. Do not allow NUL or newline in tags.
7705 Use {splice} wherever C allows backslash-newline.
7706 YY_STEP after space, newline, vertical-tab.
7707 ("/*"): BEGIN SC_YACC_COMMENT, not yy_push_state (SC_COMMENT).
7709 (letter, id): Don't assume ASCII; e.g., spell out a-z.
7711 ({int}, handle_action_dollar, handle_action_at): Check for integer
7714 (YY_STEP): Omit trailing semicolon, so that it's more like C.
7716 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>): Allow \0 and \00
7717 as well as \000. Check for UCHAR_MAX, not 255.
7718 Allow \x with an arbitrary positive number of digits, as in C.
7719 Check for overflow here.
7720 Allow \? and UCNs, for compatibility with C.
7722 (handle_symbol_code_dollar): Use quote_n slot 1 to avoid collision
7723 with quote slot used by complain_at.
7725 * tests/input.at: Add tests for backslash-newline, m4 quotes
7726 in symbols, long literals, and funny escapes in strings.
7728 * configure.ac (jm_PREREQ_MBSWIDTH): Add.
7729 * lib/Makefile.am (libbison_a_SOURCES): Add mbswidth.h, mbswidth.c.
7730 * lib/mbswidth.h, lib/mbswidth.c: New files, from GNU gettext.
7731 * m4/Makefile.am (EXTRA_DIST): Add mbswidth.m4.
7732 * m4/mbswidth.m4: New file, from GNU coreutils.
7734 * doc/bison.texinfo (Grammar Outline): Document // comments.
7735 (Symbols): Document that trigraphs have no special meaning in Bison,
7736 nor is backslash-newline allowed.
7737 (Actions): Document that trigraphs have no special meaning.
7739 * src/location.h (LOCATION_COLUMNS, LOCATION_LINES): Remove;
7742 2002-11-02 Paul Eggert <eggert@twinsun.com>
7744 * src/reader.c: Don't include quote.h; not needed.
7745 (get_merge_function): Reword warning to be consistent with
7746 type clash diagnostic in grammar_current_rule_check.
7748 * lib/quotearg.c (quotearg_buffer_restyled): Fix off-by-two
7749 bug in trigraph handling.
7751 * src/output.c (prepare_symbols): When printing token names,
7752 escape "[" as "@<:@" and likewise for "]".
7754 * src/system.h (errno): Remove declaration, as we are now
7755 assuming C89 or better, and C89 guarantees errno.
7757 2002-10-30 Paul Eggert <eggert@twinsun.com>
7759 * lib/bitset_stats.c (bitset_stats_read, bitset_stats_write):
7760 Check for close failures.
7761 * src/files.h (xfclose): Return void, not int, since it always
7763 * src/files.c (xfclose): Likewise. Report I/O error if ferror
7765 * src/output.c (output_skeleton): Use xfclose rather than fclose
7766 and ferror. xfclose now checks ferror.
7768 * data/glr.c (YYLEFTMOST_STATE): Remove.
7769 (yyreportTree): Use a stack-based leftmost state. This avoids
7770 our continuing battles with bogus warnings about initializers.
7772 2002-10-30 Akim Demaille <akim@epita.fr>
7774 * src/system.h: Don't use #ifdef/#ifndef on HAVE_ values, only
7777 2002-10-29 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
7779 * tests/glr-regr1.at: New test for reported regressions.
7780 * tests/testsuite.at: Add glr-regr1.at test.
7781 * tests/Makefile.am: Add glr-regr1.at test.
7783 2002-10-24 Paul Eggert <eggert@twinsun.com>
7787 * tests/calc.at (_AT_DATA_CALC_Y): Remove unused strcat declaration.
7788 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Include stdlib.h, since
7789 we use malloc. Don't assume 'A' through 'Z' are contiguous.
7790 Don't assume strdup exists; POSIX says its an XSI extension.
7791 Check for buffer overflow on input.
7793 2002-10-24 Akim Demaille <akim@epita.fr>
7795 * src/output.c (output_skeleton): Don't disable M4sugar comments
7796 too soon: it results in comments being expanded.
7797 * data/yacc.c, data/glr.c, data/lalr1.cc: Do it right before the
7800 2002-10-24 Akim Demaille <akim@epita.fr>
7802 * data/yacc.c (m4_int_type): New.
7803 * data/c.m4 (m4_int_type): Don't use yysigned_char, but `signed
7804 char' as only yacc.c wants K&R portability.
7805 * data/glr.c (yysigned_char): Remove.
7806 * data/lalr1.cc: Rename the trailing b4_name as b4_parser_class_name.
7807 Reported by Quoc Peyrot.
7809 2002-10-23 Paul Eggert <eggert@twinsun.com>
7811 * src/main.c (main): With --trace=time, report times even if a
7812 non-fatal error occurs. Formerly, the times were reported in some
7813 such cases but not in others.
7814 * src/reader.c (reader): Just return if a complaint has been issued,
7815 instead of exiting, so that 'main' can report times.
7817 2002-10-22 Akim Demaille <akim@epita.fr>
7819 * src/system.h: Include sys/types.
7820 Reported by Bert Deknuydt.
7822 2002-10-23 Paul Eggert <eggert@twinsun.com>
7824 * configure.ac (AC_PROG_LEX): Use instead of AM_PROG_LEX.
7825 Suggested by Art Haas.
7827 2002-10-22 Paul Eggert <eggert@twinsun.com>
7829 * src/complain.c (exit) [! (STDC_HEADERS || _LIBC)]: Remove exit
7830 decl; not needed any more.
7831 * src/main.c (main): Use return to exit, undoing yesterday's change.
7832 The last OS that we could find where this wouldn't work is
7833 SunOS 3.5, and that's too old to worry about now.
7835 * data/glr.c (struct yyltype): Define members even when not
7836 doing locations. This is more consistent with yacc.c, and it
7837 works around the following bug reports:
7838 http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00106.html
7839 http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00111.html
7841 * doc/bison.texinfo: Minor spelling and typographical fixes. Use
7842 @acronym consistently. Standardize on "Yacc" instead of "YACC",
7843 "Algol" instead of "ALGOL". Give a bit more history about BNF.
7845 2002-10-22 Akim Demaille <akim@epita.fr>
7849 2002-10-21 Paul Eggert <eggert@twinsun.com>
7851 Be consistent about 'bool'; the old code used an enum in one
7852 module and an int in another, and this violates the C standard.
7853 * m4/stdbool.m4: New file, from coreutils 4.5.3.
7854 * configure.ac (AC_HEADER_STDBOOL): Add.
7855 * m4/Makefile.am (EXTRA_DIST): Add stdbool.m4.
7856 * src/muscle_tab.c (hash_compare_muscles): (a ? FALSE : TRUE) -> (! a)
7857 * src/symtab.c (hash_compare_symbol_t): Likewise.
7858 * src/system.h (bool, false, true): Use a definition consistent
7859 with ../lib/hash.c. All uses changed.
7861 * src/complain.c (warning_issued): Renamed from warn_message_count,
7862 so that we needn't worry about integer overflow (!).
7863 Now of type bool. All uses changed.
7864 (complaint_issued): Renamed from complain_message_count; likewise.
7866 * src/main.c (main): Use exit to exit with failure.
7868 * src/complain.c (fatal_at, fatal): Use EXIT_FAILURE and EXIT_SUCCESS
7869 rather than 1 and 0.
7870 * src/main.c (main): Likewise.
7871 * src/getargs.c (getargs): Likewise.
7872 * src/reader.c (reader): Likewise.
7874 * src/getarg.c (getargs): Remove duplicate code for
7875 "Try `bison --help'".
7877 * src/files.c (xfopen, xfclose): Use EXIT_FAILURE rather than 2.
7878 What was that "2" for?
7880 * src/complain.h (fatal, fatal_at): Add __attribute__((__noreturn__)).
7881 * src/getargs.c (usage): Likewise.
7883 * src/getargs.c (getargs): When there are too few operands, report
7884 the last one. When there are too many, report the first extra
7885 one. This is how diffutils does it.
7887 2002-10-20 Paul Eggert <eggert@twinsun.com>
7889 Remove K&R vestiges.
7890 * configure.ac (AC_C_CONST, AM_C_PROTOTYPES): Remove.
7891 * src/complain.c (VA_START): Remove. Assume prototypes.
7892 (vfprintf) [! (HAVE_VPRINTF || defined vfprintf)]: New macro.
7893 (private_strerror, warn_at, warn, complain_at, complain, fatal_at,
7894 fatal): Assume prototypes.
7895 * src/complain.h: Assume prototypes.
7896 * src/system.h (PARAMS): Remove.
7897 Include <limits.h> unconditionally, since it's guaranteeed even
7898 for a freestanding C89 compiler.
7899 (SHRT_MIN, SHRT_MAX): Remove, since C89 guarantees them.
7900 * src/vmsgetargs.c (getargs, cli_present, cli_get_value): Prototype.
7902 2002-10-20 Akim Demaille <akim@epita.fr>
7904 * src/muscle_tab.c (muscle_grow): Remove trailing debugging code.
7905 * data/glr.c (YY_USER_FORMALS, YY_USER_ARGS): New.
7906 (yyuserAction, yydoAction, yyglrReduce, yyresolveValue)
7907 (yyresolveStates, yyresolveAction, yyresolveStack)
7908 (yyprocessOneStack): Use them.
7909 (yy_reduce_print): New.
7910 * tests/calc.at (_AT_DATA_CALC_Y): Exercise %parse-param.
7912 2002-10-20 Akim Demaille <akim@epita.fr>
7914 * data/c.m4 (b4_c_ansi_args): Recognize functions with no
7915 arguments and output `void'.
7916 (b4_c_function): Rename as...
7917 (b4_c_function_def): this.
7918 (b4_c_function_decl, b4_c_ansi_function_def)
7919 (b4_c_ansi_function_decl): New.
7920 Change the interpretation of the arguments: before `int, foo', now
7922 * data/yacc.c (yyparse): Prototype and define thanks to these.
7923 Adjust b4_c_function_def uses.
7924 * data/glr.c (yyparse): Likewise, but ANSI only.
7926 2002-10-20 Akim Demaille <akim@epita.fr>
7928 * src/output.c (prepare): Move the definition of `tokens_number',
7929 `nterms_number', `undef_token_number', `user_token_number_max'
7931 (prepare_tokens): Here.
7932 (prepare_tokens): Rename as...
7933 (prepare_symbols): this.
7934 (prepare): Move the definition of `rules_number' to...
7935 (prepare_rules): here.
7936 (prepare): Move the definition of `last', `final_state_number',
7937 `states_number' to...
7938 (prepare_states): here.
7939 * data/yacc.c, data/lalr1.cc, data/glr.c: Normalize `>' into `<'.
7941 2002-10-20 Akim Demaille <akim@epita.fr>
7943 * src/tables.h, src/tables.c, src/output.c: Comment changes.
7945 2002-10-20 Akim Demaille <akim@epita.fr>
7947 * data/yacc.c, data/yacc.c (b4_location_if, b4_pure_if): Move to...
7950 2002-10-20 Akim Demaille <akim@epita.fr>
7952 * src/output.c (prepare): Use MUSCLE_INSERT_STRING.
7953 * src/muscle_tab.c (muscle_pair_list_grow): Rename `val as
7955 (muscle_init): Move the `b4_ltype', `b4_maxdepth', `b4_initdepth',
7957 * data/glr.c, data/lalr1.cc, data/yacc.c (b4_location_type)
7958 (b4_stack_depth_init, b4_stack_depth_max, b4_parser_class_name):
7961 2002-10-19 Paul Eggert <eggert@twinsun.com>
7963 Do not create a temporary file, as that involves security and
7964 cleanup headaches. Instead, use a pair of pipes.
7965 Derived from a suggestion by Florian Krohm.
7966 * lib/subpipe.c, lib/subpipe.h, m4/subpipe.m4: New files.
7967 * lib/mkstemp.c, lib/readpipe.c, lib/tempname.c, m4/mkstemp.m4: Remove.
7968 * configure.ac (UTILS_FUNC_MKSTEMP, jm_PREREQ_TEMPNAME): Remove.
7969 (BISON_PREREQ_SUBPIPE): Add.
7970 * lib/Makefile.am (libbison_a_SOURCES): Remove readpipe.c.
7971 Add subpipe.h, subpipe.c.
7972 * m4/Makefile.am (EXTRA_DIST): Remove mkstemp.m4. Add subpipe.m4.
7973 * po/POTFILES.in: Add lib/subpipe.c.
7974 * src/output.c: Include "subpipe.h".
7975 (m4_invoke): Remove decl.
7976 (scan_skel): New decl.
7977 (output_skeleton): Use pipe rather than temporary file for m4 input.
7978 Check that m4sugar.m4 is readable, to avoid deadlock.
7979 Check for pipe I/O error.
7980 * src/scan-skel.l (readpipe): Remove decl.
7981 (scan_skel): New function, to be used in place of m4_invoke.
7982 Read from stream rather than file.
7984 * lib/timevar.c (TICKS_TO_MSEC, CLOCKS_TO_MSEC): Do not cast to
7985 float, as this generates a warning on Solaris 8 + GCC 3.2 with
7986 --enable-gcc-warnings. Instead, divide into 1.0 rather than 1;
7987 this generates a more-accurate value anyway.
7989 * lib/timevar.c (timervar_accumulate): Rename locals to
7990 avoid confusion with similarly-named more-global.
7991 * src/muscle_tab.c (muscle_pair_list_grow): Likewise.
7993 * src/output.c (prepare): Use xstrdup to convert char const *
7994 to char *, to avoid GCC warning.
7996 2002-10-19 Akim Demaille <akim@epita.fr>
7998 * tests/calc.at (_AT_DATA_CALC_Y): Define VAL, LOC, LEX_FORMALS,
7999 LEX_PRE_FORMALS, LEX_ARGS, LEX_PRE_ARGS, USE_LEX_ARGS.
8000 Use them to have `calc.y' ready for %pure-parser.
8001 * data/yacc.c (YYLEX): Pass a yylex return type to
8004 2002-10-19 Akim Demaille <akim@epita.fr>
8006 Prototype support of %lex-param and %parse-param.
8008 * src/parse-gram.y: Add the definition of the %lex-param and
8009 %parse-param tokens, plus their rules.
8010 Drop the `_' version of %glr-parser.
8012 * src/scan-gram.l (INITIAL): Scan them.
8013 * src/muscle_tab.c: Comment changes.
8014 (muscle_insert, muscle_find): Rename `pair' as `probe'.
8015 * src/muscle_tab.h (MUSCLE_INSERT_PREFIX): Remove unused.
8016 (muscle_entry_s): The `value' member is no longer const.
8017 Adjust all dependencies.
8018 * src/muscle_tab.c (muscle_init): Adjust: use
8019 MUSCLE_INSERT_STRING.
8020 Initialize the obstack earlier.
8021 * src/muscle_tab.h, src/muscle_tab.c (muscle_grow)
8022 (muscle_pair_list_grow): New.
8023 * data/c.m4 (b4_c_function_call, b4_c_args): New.
8024 * data/yacc.c (YYLEX): Use b4_c_function_call to honor %lex-param.
8025 * tests/calc.at: Use %locations, not --locations.
8026 (AT_CHECK_CALC_GLR): Use %glr-parser, not %glr_parser.
8028 2002-10-19 Akim Demaille <akim@epita.fr>
8030 * src/getargs.c (usage): Take status as argument and exit
8032 Report the traditional `Try ... --help' message when status != 0.
8033 (usage, version): Don't take a FILE * as arg, it is pointless.
8034 (getargs): When there is an incorrect number of arguments, make it
8035 an error, and report it GNUlically thanks to `usage ()'.
8037 2002-10-18 Paul Eggert <eggert@twinsun.com>
8039 * data/glr.c (yyreportParseError): Don't assume that sprintf
8040 yields the length of the printed string, as this is not true
8041 on SunOS 4.1.4. Reported by Peter Klein.
8043 * tests/calc.at (_AT_DATA_CALC_Y): #undef memcmp and realloc.
8044 * tests/conflicts.at (%nonassoc and eof): Likewise.
8045 Fixes SunOS 4.1.4 test failure reported by Peter Klein.
8047 2002-10-17 Akim Demaille <akim@epita.fr>
8049 * src/getargs.h (trace_e): Add trace_scan, and trace_parse.
8050 * src/getargs.c (trace_types, trace_args): Adjust.
8051 * src/reader.c (grammar_current_rule_prec_set)
8052 (grammar_current_rule_dprec_set, grammar_current_rule_merge_set):
8053 Standardize error messages.
8055 (reader): Use trace_flag to enable scanner/parser debugging,
8056 instead of an adhoc scheme.
8057 * src/scan-gram.l: Remove trailing debugging code.
8059 2002-10-16 Paul Eggert <eggert@twinsun.com>
8061 * src/muscle_tab.h (MUSCLE_TAB_H_): Was misspelled as
8064 * NEWS: Officially drop support for building Bison with K&R C,
8065 since it didn't work anyway and it's not worth worrying about.
8066 * Makefile.maint (wget_files): Remove ansi2knr.c.
8067 (ansi2knr.c-url_prefix): Remove.
8068 * lib/.cvsignore: Remove ansi2knr, ansi2knr.*.
8069 * lib/Makefile.am (AUTOMAKE_OPTIONS): Remove.
8070 * src/Makefile.am (AUTOMAKE_OPTIONS): Remove.
8072 2002-10-15 Paul Eggert <eggert@twinsun.com>
8074 Stop using the "enum_" trick for K&R-style function definitions;
8075 it confused me, and I was the author! Instead, assume that people
8076 who want to use K&R C compilers (when using these modules in GCC,
8077 perhaps?) will run ansi2knr.
8079 * lib/bbitset.h: (enum_bitset_ops, enum_bitset_type): Remove.
8080 All uses of "enum_" changed to "enum ".
8081 * lib/ebitset.c (enum_ebitset_find_mode): Likewise.
8082 * lib/lbitset.c (enum_lbitset_find_mode): Likewise.
8084 * lib/abitset.c (abitset_and, abitset_and_cmp, abitset_and_or,
8085 abitset_and_or_cmp, abitset_andn, abitset_andn_cmp,
8086 abitset_andn_or, abitset_andn_or_cmp, abitset_bytes, abitset_copy,
8087 abitset_copy1, abitset_disjoint_p, abitset_empty_p,
8088 abitset_equal_p, abitset_init, abitset_list, abitset_list_reverse,
8089 abitset_not, abitset_ones, abitset_or, abitset_or_and,
8090 abitset_or_and_cmp, abitset_or_cmp, abitset_reset, abitset_set,
8091 abitset_size, abitset_small_list, abitset_subset_p, abitset_test,
8092 abitset_unused_clear, abitset_xor, abitset_xor_cmp, abitset_zero):
8093 Use function prototypes; this removes the need for declaring
8094 static functions simply to provide their prototypes.
8095 * lib/bitset.c (bitset_alloc, bitset_and_or_, bitset_and_or_cmp_,
8096 bitset_andn_or_, bitset_andn_or_cmp_, bitset_bytes, bitset_copy_,
8097 bitset_count_, bitset_create, bitset_dump, bitset_first,
8098 bitset_free, bitset_init, bitset_last, bitset_next,
8099 bitset_obstack_alloc, bitset_obstack_free, bitset_only_set_p,
8100 bitset_op4_cmp, bitset_or_and_, bitset_or_and_cmp_, bitset_prev,
8101 bitset_print, bitset_release_memory, bitset_toggle_,
8102 bitset_type_choose, bitset_type_get, bitset_type_name_get,
8103 debug_bitset): Likewise.
8104 * lib/bitset.h (bitset_set, bitset_reset, bitset_test): Likewise.
8105 * lib/bitset_stats.c (bitset_log_histogram_print,
8106 bitset_percent_histogram_print, bitset_stats_and,
8107 bitset_stats_and_cmp, bitset_stats_and_or,
8108 bitset_stats_and_or_cmp, bitset_stats_andn, bitset_stats_andn_cmp,
8109 bitset_stats_andn_or, bitset_stats_andn_or_cmp, bitset_stats_copy,
8110 bitset_stats_count, bitset_stats_disable, bitset_stats_disjoint_p,
8111 bitset_stats_dump, bitset_stats_empty_p, bitset_stats_enable,
8112 bitset_stats_equal_p, bitset_stats_free, bitset_stats_init,
8113 bitset_stats_list, bitset_stats_list_reverse, bitset_stats_not,
8114 bitset_stats_ones, bitset_stats_or, bitset_stats_or_and,
8115 bitset_stats_or_and_cmp, bitset_stats_or_cmp, bitset_stats_print,
8116 bitset_stats_print_1, bitset_stats_read, bitset_stats_reset,
8117 bitset_stats_set, bitset_stats_size, bitset_stats_subset_p,
8118 bitset_stats_test, bitset_stats_toggle, bitset_stats_type_get,
8119 bitset_stats_write, bitset_stats_xor, bitset_stats_xor_cmp,
8120 bitset_stats_zero): Likewise.
8121 * lib/bitsetv.c (bitsetv_alloc, bitsetv_create, bitsetv_free,
8122 bitsetv_zero, bitsetv_ones, bitsetv_transitive_closure,
8123 bitsetv_dump, debug_bitsetv): Likewise.
8124 * lib/ebitset.c (ebitset_and, ebitset_and_cmp, ebitset_andn,
8125 ebitset_andn_cmp, ebitset_bytes, ebitset_copy, ebitset_copy_,
8126 ebitset_copy_cmp, ebitset_disjoint_p, ebitset_elt_add,
8127 ebitset_elt_alloc, ebitset_elt_calloc, ebitset_elt_find,
8128 ebitset_elt_free, ebitset_elt_last, ebitset_elt_remove,
8129 ebitset_elt_zero_p, ebitset_elts_grow, ebitset_empty_p,
8130 ebitset_equal_p, ebitset_free, ebitset_init, ebitset_list,
8131 ebitset_list_reverse, ebitset_not, ebitset_ones, ebitset_op3_cmp,
8132 ebitset_or, ebitset_or_cmp, ebitset_release_memory, ebitset_reset,
8133 ebitset_set, ebitset_size, ebitset_subset_p, ebitset_test,
8134 ebitset_weed, ebitset_xor, ebitset_xor_cmp, ebitset_zero):
8136 * lib/lbitset.c (debug_lbitset, lbitset_and, lbitset_and_cmp,
8137 lbitset_andn, lbitset_andn_cmp, lbitset_bytes, lbitset_copy,
8138 lbitset_copy_cmp, lbitset_disjoint_p, lbitset_elt_alloc,
8139 lbitset_elt_calloc, lbitset_elt_find, lbitset_elt_free,
8140 lbitset_elt_link, lbitset_elt_unlink, lbitset_elt_zero_p,
8141 lbitset_empty_p, lbitset_equal_p, lbitset_free, lbitset_init,
8142 lbitset_list, lbitset_list_reverse, lbitset_not, lbitset_ones,
8143 lbitset_op3_cmp, lbitset_or, lbitset_or_cmp, lbitset_prune,
8144 lbitset_release_memory, lbitset_reset, lbitset_set, lbitset_size,
8145 lbitset_subset_p, lbitset_test, lbitset_weed, lbitset_xor,
8146 lbitset_xor_cmp, lbitset_zero): Likewise.
8148 2002-10-14 Akim Demaille <akim@epita.fr>
8152 2002-10-14 Akim Demaille <akim@epita.fr>
8154 * tests/Makefile.am (maintainer-check-posix): New.
8156 2002-10-14 Akim Demaille <akim@epita.fr>
8158 * data/glr.c [YYDEBUG] (YYLEFTMOST_STATE): Initialize the yyloc
8161 2002-10-14 Akim Demaille <akim@epita.fr>
8163 * src/tables.c (table_ninf_remap): base -> tab.
8164 Reported by Matt Rosing.
8166 2002-10-14 Paul Eggert <eggert@twinsun.com>
8168 * tests/action.at, tests/calc.at, tests/conflicts.at,
8169 tests/cxx-type.at, tests/headers.at, tests/input.at,
8170 tests/regression.at, tests/synclines.at, tests/torture.at:
8171 Say "bison -o foo.c foo.y", not "bison foo.y -o foo.c",
8172 so that the tests still work even if POSIXLY_CORRECT is set.
8173 * doc/bison.texinfo (Rpcalc Compile, Invocation): Likewise.
8175 * data/c.m4 (b4_int_type): Use yysigned_char instead of signed char,
8176 for portability to K&R hosts. Fix typo: signed char is guaranteed
8177 only to 127, not to 128.
8178 * data/glr.c (yysigned_char): New type.
8179 * data/yacc.c (yysigned_char): Likewise.
8180 * tests/regression.at (Web2c Actions): signed char -> yysigned_char.
8182 2002-10-13 Paul Eggert <eggert@twinsun.com>
8184 * data/yacc.c (yyparse): Rewrite to avoid "comparison is always
8185 true due to limited range of data type" warning from GCC.
8187 * data/c.m4 (b4_token_defines): Protect against double-inclusion
8188 by wrapping enum yytokentype's definition inside #ifndef
8189 YYTOKENTYPE. This undoes a bug I introduced on 2002-10-12.
8191 2002-10-13 Akim Demaille <akim@epita.fr>
8193 * data/glr.c (yyglrShiftDefer, yyaddDeferredAction, yydoAction):
8194 Un yy- yyrhs to avoid the name clash with the global YYRHS.
8196 2002-10-13 Akim Demaille <akim@epita.fr>
8198 * Makefile.maint: Update from Autoconf 2.54.
8199 * m4/strerror_r.m4 (AC_FUNC_STRERROR_R): Remove, shipped with 2.54.
8201 2002-10-13 Akim Demaille <akim@epita.fr>
8203 * src/print.c (print_state): Separate the list of solved conflicts
8204 from the other items.
8205 * tests/conflicts.at (Resolved SR Conflicts): Adjust.
8207 2002-10-13 Akim Demaille <akim@epita.fr>
8209 Let nondeterministic skeletons be usable with deterministic
8212 With the patch, GAWK compiled by GCC without -O2 passes its test
8213 suite using a GLR parser driven by LALR tables. It fails with -O2
8214 because `struct stat' gives two different answers on my machine:
8215 88 (definition of an auto var) and later 96 (memset on this var).
8216 Hence the stack is badly corrumpted. The headers inclusion is to
8217 blame: if I move the awk.h inclusion before GLR's system header
8218 inclusion, the two struct stat have the same size.
8220 * src/tables.c (pack_table): Always create conflict_table.
8221 (token_actions): Always create conflict_list.
8222 * data/glr.c (YYFLAG): Remove, unused.
8224 2002-10-13 Akim Demaille <akim@epita.fr>
8226 * configure.ac (AC_GNU_SOURCE): Use it instead of hand written code.
8228 (VALGRIND, GXX): New.
8229 * tests/atlocal.in (CFLAGS): Use O0FLAGS.
8230 * tests/bison.in: Run $PREBISON a pre-command.
8231 * tests/Makefile.am (maintainer-check, maintainer-check-valgrind)
8232 (maintainer-check-g++): New.
8233 * Makefile.am (maintainer-check): New.
8235 2002-10-13 Akim Demaille <akim@epita.fr>
8237 * data/glr.c: Formatting changes.
8238 Tweak some trace messages to match yacc.c's.
8240 2002-10-13 Akim Demaille <akim@epita.fr>
8242 GLR parsers sometimes raise parse errors instead of performing the
8244 Reported by Charles-Henry de Boysson.
8246 * tests/calc.at (_AT_CHECK_CALC, _AT_CHECK_CALC_ERROR): Don't
8247 check the length of the traces when %glr.
8248 (_AT_CHECK_CALC_ERROR): Also skip `^Stack' lines, coming from
8250 (AT_CHECK_CALC_LALR, AT_CHECK_CALC_GLR): New.
8252 * data/glr.c (YYLEFTMOST_STATE): Fix its value.
8253 (yyltype): Remove the yy prefix from the member names.
8254 (yytable): Complete its comment.
8255 (yygetLRActions): Map error action number from YYTABLE from
8257 (yyisErrorAction): No longer compare YYACTION to YYPACT_NINF
8258 (which was a bug: it should have been YYTABEL_NINF, and yet it was
8259 not satisfying as we could compare an YYACTION computed from
8260 YYDEFACT to YYTABLE_NINF although they are unrelated): 0 is the
8261 only value for error actions.
8262 (yyreportParseError): In verbose parse error messages, don't issue
8263 `error' in the list of expected tokens.
8264 * data/yacc.c (yyparse) <yybackup>: Rewrite the decoding of the
8265 next action to perform to match glr.c's decoding.
8266 (yytable): Complete its comment.
8268 2002-10-13 Paul Eggert <eggert@twinsun.com>
8270 Fix problem reported by Henrik Grubbstroem in
8271 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00098.html>:
8272 "nonterm: { $$ = 123; } { $$ = $1; };" was wrongly rejected,
8273 because the Bison parser reads the second action before reducing
8275 * src/scan-gram.l (rule_length): New static var.
8276 Use it to keep track of the rule length in the scanner, since
8277 we can't expect the parser to be in lock-step sync with the scanner.
8278 (handle_action_dollar, handle_action_at): Use this var.
8279 * tests/actions.at (Exotic Dollars): Test for the problem.
8281 2002-10-12 Paul Eggert <eggert@twinsun.com>
8283 * lib/timevar.c [! IN_GCC && HAVE_SYS_TIME_H]: Include <sys/time.h>.
8284 * m4/timevar.m4 (BISON_PREREQ_TIMEVAR): Check for <sys/time.h>.
8285 Include <sys/time.h> when checking for clock_t and struct tms.
8286 Use same include order as source.
8287 This is for the SunOS 4.1.4 porting bug reported by Peter Klein in
8288 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00016.html>.
8290 * lib/timevar.c: Update copyright date and clarify comments.
8291 (get_time) [IN_GCC]: Keep the GCC version for reference.
8293 * lib/timevar.c, lib/timevar.h, lib/timevar.def: Import
8294 GCC version as of today, then merge Bison's changes.
8295 Change "GCC" to "Bison" in copyright notice. timevar.def's
8296 author is Akim, so change that too.
8298 * src/reader.c (grammar_current_rule_check):
8299 Don't worry about the default action if $$ is untyped.
8300 Prevents bogus warnings reported by Jim Gifford in
8301 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00015.html>.
8303 * data/c.m4 (b4_token_enum): Do not define YYTOKENTYPE.
8304 * data/glr.c, data/lalr1.cc, data/yacc.c:
8305 Output token definitions before the first part of user declarations.
8306 Fixes compatibility problem reported by Jim Gifford for kbd in
8307 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00014.html>.
8309 2002-10-11 Paul Eggert <eggert@twinsun.com>
8311 * data/yacc.c (yyreport_parse_error): Remove, putting its body into...
8312 (yyparse): here. This undoes some of the 2002-07-25 change.
8313 Compatibility problem reported by Ralf S. Engelschall with
8314 OSSP cfg <http://www.ossp.org/pkg/lib/cfg/>.
8316 2002-10-11 Akim Demaille <akim@epita.fr>
8318 * tests/regression.at Characters Escapes): New.
8319 * src/scan-gram.l (SC_ESCAPED_CHARACTER): Accept \' in strings and
8321 Reported by Jan Nieuwenhuizen.
8323 2002-10-11 Akim Demaille <akim@epita.fr>
8327 2002-10-10 Paul Eggert <eggert@twinsun.com>
8329 Portability fixes for bitsets; this also avoids several GCC
8332 * lib/abitset.c: Include <stddef.h>, for offsetof.
8333 * lib/lbitset.c: Likewise.
8335 * lib/abitset.c (abitset_bytes): Return a size that is aligned
8336 properly for vectors of objects. Do not assume that adding a
8337 header size to a multiple of a word size yields a value that is
8338 properly aligned for the whole union.
8339 * lib/bitsetv.c (bitsetv_alloc): Likewise.
8341 * lib/bitset_stats.c (bitset_stats_bytes): Adjust to new,
8342 unique names for structures.
8343 * lib/ebitset.c (ebitset_bytes): Likewise.
8344 * lib/lbitset.c (lbitset_bytes): Likewise.
8346 * lib/abitset.c (abitset_ones, abitset_zero, abitset_empty_p,
8347 abitset_copy1, abitset_not, abitset_equal_p, abitset_subset_p,
8348 abitset_disjoint_p, abitset_and, abitset_and_cmp, abitset_andn,
8349 abitset_andn_cmp, abitset_or, abitset_or_cmp, abitset_xor,
8350 abitset_xor_cmp, abitset_and_or, abitset_and_or_cmp,
8351 abitset_andn_or, abitset_andn_or_cmp, abitset_or_and,
8352 abitset_or_and_cmp, abitset_copy): Supply prototype decls,
8353 to improve the type-checking that GCC can do.
8354 * lib/bitset.c (bitset_op4_cmp): Likewise.
8355 * lib/bitset_stats.c (bitset_stats_count,
8356 bitset_stats_empty_p, bitset_stats_ones, bitset_stats_zero,
8357 bitset_stats_copy, bitset_stats_disjoint_p,
8358 bitset_stats_equal_p, bitset_stats_not, bitset_stats_subset_p,
8359 bitset_stats_and, bitset_stats_and_cmp, bitset_stats_andn,
8360 bitset_stats_andn_cmp, bitset_stats_or, bitset_stats_or_cmp,
8361 bitset_stats_xor, bitset_stats_xor_cmp, bitset_stats_and_or,
8362 bitset_stats_and_or_cmp, bitset_stats_andn_or,
8363 bitset_stats_andn_or_cmp, bitset_stats_or_and,
8364 bitset_stats_or_and_cmp): Likewise.
8365 * lib/lbitset.c (lbitset_and, lbitset_and_cmp, lbitset_andn,
8366 lbitset_andn_cmp, lbitset_or, lbitset_or_cmp, lbitset_xor,
8367 lbitset_xor_cmp, lbitset_empty_p, lbitset_ones, lbitset_not,
8368 lbitset_subset_p, lbitset_disjoint_p, debug_lbitset): Likewise.
8370 * lib/abitset.h: Include bitset.h, not bbitset.h.
8371 * lib/ebitset.h: Likewise.
8372 * lib/lbitset.h: Likewise.
8374 * lib/bbitset.h: (enum_bitset_ops, enum_bitset_type): New types.
8375 All instances of parameters of type enum bitset_opts are now of
8376 type enum_bitset_opts, to conform to the C Standard, and similarly
8377 for enum_bitset_type.
8378 * lib/ebitset.c (enum_ebitset_find_mode): Likewise.
8379 * lib/lbitset.c (enum_lbitset_find_mode): Likewise.
8381 Do not use "struct bitset_struct" to mean different things in
8382 different modules. Not only is this confusing, it violates
8383 the C Standard, which requires that structure types in different
8384 modules must be compatible if one is to be passed to the other.
8385 * lib/bbitset.h (bitset): Now points to a union, not to a struct.
8386 All instances of "struct bitset_struct *" replaced with "bitset".
8387 * lib/bitset.h (struct bitset_struct): Remove, replacing with....
8388 (union bitset_union, struct abitset_struct, struct ebitset_struct,
8389 struct lbitset_struct, struct bitset_stats_struct): New types.
8390 All uses of struct bitset_struct changed to union bitset_union,
8392 * lib/abitset.c (struct abitset_struct, abitset,
8393 struct bitset_struct): Remove.
8394 * lib/bitset_stats.c (struct bitset_stats_struct, bitset_stats,
8395 struct bitset_struct): Remove.
8396 * lib/ebitset.c (struct ebitset_struct, ebitset, struct
8397 bitset_struct): Remove.
8398 * lib/lbitset.c (struct lbitset_struct, lbitset, bitset_struct):
8401 Do not call a function of type T using a call that assumes the
8402 function is of a different type U. Standard C requires that a
8403 function must be called with a type that is compatible with its
8405 * lib/bbitset.h (bitset_and_or_, bitset_andn_or_, bitset_or_and_):
8407 * lib/bitset.c (bitset_and_or_, bitset_andn_or_, bitset_or_and_):
8409 * lib/ebitset.c (PFV): Remove.
8410 * lib/lbitset.c (PFV): Likewise.
8411 * lib/ebitset.c (ebitset_and, ebitset_andn, ebitset_or,
8412 ebitset_xor, ebitset_copy, ebitset_ones, ebitset_empty_p): New
8414 (ebitset_and, ebitset_andn, ebitset_or, ebitset_xor): New functions.
8415 (ebitset_vtable): Use them.
8416 * lib/lbitset.c (lbitset_and, lbitset_andn, lbitset_or,
8417 lbitset_xor): New functions.
8418 (lbitset_vtable): Use them.
8420 * lib/bitset.h (bitset_next, bitset_prev, bitset_only_set_p):
8423 * lib/bitsetv.c (bitsetv_alloc): Add a cast to (void *) to avoid a
8425 * lib/lbitset.c (LBITSET_CURRENT1): Likewise.
8426 Use offsetof, for simplicity.
8428 2002-10-06 Paul Eggert <eggert@twinsun.com>
8430 * lib/bitset.h (bitset_reset): Do not assume that bitset_word is
8431 the same width as int. This reapplies a hunk of the 2002-08-12 patch
8432 <http://lists.gnu.org/archive/html/bison-patches/2002-08/msg00007.html>,
8433 which was inadvertently undone by the 2002-09-30 patch.
8434 * lib/lbitset.c (debug_lbitset): Do not assume that bitset_word is
8435 the same width as int.
8437 2002-10-04 Paul Eggert <eggert@twinsun.com>
8441 * configure.ac (AC_INIT), NEWS: Increment version number.
8443 * doc/bison.texinfo: Minor spelling, grammar, and white space
8445 (Symbols): Mention that any negative value returned from yylex
8446 signifies end-of-input. Warn about negative chars. Mention
8447 the portable Standard C character set.
8449 The GNU coding standard says CFLAGS and YFLAGS are reserved
8450 for the installer to set.
8451 * lib/Makefile.am (AM_CFLAGS): Renamed from CFLAGS.
8452 * src/Makefile.am (AM_CFLAGS): Likewise.
8453 (AM_YFLAGS): Renamed from YFLAGS.
8455 Fix some MAX and MIN problems.
8456 * src/gram.h (ITEM_NUMBER_MIN): MIN_MAX -> INT_MIN.
8457 * src/lalr.h (GOTO_NUMBER_MAX): INT_MAX -> SHRT_MAX.
8458 * src/symtab.h (SYMBOL_NUMBER_MAX): New macro.
8459 * src/reader.c (reader): Use it.
8461 * tests/regression.at (Braces parsing): Use grep, not fgrep, as
8462 POSIX 1003.1-2001 has removed fgrep.
8464 2002-10-04 Michael Hayes <m.hayes@elec.canterbury.ac.nz>
8466 * lib/bbitset.h (BITSET_WINDEX_MAX): Redefine so that it cannot be
8467 interpreted as signed.
8468 * lib/ebitset.c (ebitset_list): Fix bug.
8470 2002-10-01 Paul Eggert <eggert@twinsun.com>
8472 More fixes for 64-bit hosts and large bitsets.
8474 * lib/abitset.c (struct abitset_struct.n_bits, abitset_small_list,
8475 abitset_size, abitset_list, abitset_list_reverse, abitset_list):
8476 Use bitset_bindex, not int or unsigned int or size_t, to count bits.
8477 * lib/bbitset.h (struct bitset_vtable.size, struct bitset_vtable.count,
8478 struct bitset_vtable.list, struct bitset_vtable.list_reverse,
8479 bitset_count_, bitset_next, bitset_prev, bitset_first, bitset_last,
8480 bitset_count_): Likewise.
8481 * lib/bitset.h (bitset_iterator.num, bitset_iterator.i,
8482 bitset_first, bitset_last): Likewise.
8483 * lib/bitset_stats.c (bitset_stats_size, bitset_stats_list,
8484 bitset_stats_list_reverse, bitset_stats_size,
8485 bitset_stats_count, bitset_stats_list, bitset_stat_list_reverse):
8487 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
8488 * lib/bitsetv.c (bitsetv_alloc, bitsetv_create, bitsetv_free,
8489 bitsetv_zero, bitsetv_ones, bitsetv_transitive_closure,
8490 bitsetv_reflexive_transitive_closure): Likewise.
8491 * lib/bitsetv.h (bitsetv_alloc, bitsetv_create): Likewise.
8492 * lib/ebitset.c (ebitset_size, ebitset_list, ebitset_list_reverse):
8494 * lib/lbitset.c (lbitset_size, lbitset_list, lbitset_list_merge):
8497 * lib/abitset.c (abitset_ones, abitset_zero, abitset_bytes):
8498 Use size_t, not unsigned int, to count bytes.
8499 * lib/abitset.h (abitset_bytes): Likewise.
8500 * lib/bitset.c (bitset_bytes, bitset_alloc, bitset_obstack_alloc):
8502 * lib/bitset.h (bitset_bytes): Likewise.
8503 * lib/bitset_stats.c (bitset_stats_bytes, bitset_stats_init): Likewise.
8504 * lib/bitset_stats.h (bitset_stats_bytes): Likewise.
8505 * lib/bitsetv.c (bitsetv_alloc): Likewise.
8506 * lib/ebitset.c (ebitset_bytes): Likewise.
8507 * lib/ebitset.h (ebitset_bytes): Likewise.
8508 * lib/lbitset.c (lbitset_bytes): Likewise.
8509 * lib/lbitset.h (lbitset_bytes): Likewise.
8511 * lib/abitset.c (abitset_empty_p, abitset_not, abitset_equal_p,
8512 abitset_subset_p, abitset_disjoint_p, abitset_and,
8513 abitset_and_cmp, abitset_andn, abitset_andn_cmp, abitset_or,
8514 abitset_or_cmp, abitset_xor, abitset_xor_cmp, abitset_and_or,
8515 abitset_and_or_cmp, abitset_andn_or, abitset_andn_or_cmp,
8516 abitset_or_and, abitset_or_and_cmp):
8517 Use bitset_windex instead of unsigned int.
8518 * lib/bitsetv.c (bitsetv_dump, debug_bitsetv): Likewise.
8519 * lib/ebitset.c (struct ebitset_struct.size, ebitset_elts_grow,
8520 ebitset_elt_add, ebitset_elt_remove, ebitset_weed,
8521 ebitset_elt_find, ebitset_list_reverse, ebitset_list, ebitset_init):
8523 * lib/lbitset.c (lbitset_ones, lbitset_not): Likewise.
8525 * lib/bitset.c (bitset_print):
8526 Use proper printf formats for widths of integer types.
8527 * lib/bitset_stats.c (bitset_percent_histogram_print,
8528 bitset_log_histogram_print, bitset_stats_print_1): Likewise.
8529 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
8530 * lib/bitsetv.c (bitsetv_dump, debug_bitsetv): Likewise.
8531 * lib/lbitset.c (lbitset_bytes): Likewise.
8533 * lib/bbitset.h (BITSET_BINDEX_MAX, BITSET_WINDEX_MAX,
8534 BITSET_SIZE_MAX): New macros.
8535 (BITSET_INDEX_MAX): Remove. It wasn't right, since it assumed that
8536 sizeof (bitset_word) == sizeof (bitset_windex). All uses changed
8537 to BITSET_WINDEX_MAX.
8539 * lib/bitset.c (bitset_next, bitset_prev, bitset_first,
8540 bitset_last): Return BITSET_BINDEX_MAX (not -1) for no value,
8541 since we now return the bitset_bindex type (not int).
8543 * lib/bitsetv.c (bitsetv_alloc): Check for arithmetic overflow
8544 when computing sizes.
8545 * lib/ebitset.c (ebitset_elts_grow): Likewise.
8547 * lib/lbitset.c (lbitset_elt_find): Simplify windex calculation
8548 and avoid cast to unsigned.
8550 2002-09-30 Akim Demaille <akim@epita.fr>
8552 * lib/abitset.c, lib/bbitset.h, lib/bitset.c, lib/bitset.h,
8553 * lib/bitset_stats.c, lib/bitsetv.c, lib/ebitset.c, lib/lbitset.c:
8554 Updates from Michael Hayes.
8556 2002-09-30 Art Haas <ahaas@neosoft.com>
8558 * configure.ac: Update AC_OUTPUT and AM_CONFIG_HEADER
8560 * tests/cxx-type.at (declarator): Don't rely on NDEBUG being not
8563 2002-09-27 Akim Demaille <akim@epita.fr>
8567 2002-09-27 Akim Demaille <akim@epita.fr>
8569 * configure.ac (AM_INIT_AUTOMAKE): We _need_ 1.7.
8570 (Because of AC_LIBSOURCE).
8572 2002-09-27 Akim Demaille <akim@epita.fr>
8574 Playing with Autoscan.
8576 * configure.ac: Remove the old LIBOBJ tweaks.
8577 (AC_REPLACE_FUNCS): Add strrchr and strtol.
8578 * lib/strrchr.c: New.
8579 * lib/strtol.c: New, from the Coreutils 4.5.1.
8581 2002-09-27 Akim Demaille <akim@epita.fr>
8583 Playing with Autoscan.
8585 * m4/prereq.m4 (jm_PREREQ_ARGMATCH, jm_FUNC_ARGMATCH): New.
8586 * lib/Makefile.am (libbison_a_SOURCES): No longer include
8587 argmatch.c and argmatch.h, since they are AC_LIBSOURCE'd.
8588 * lib/strcasecmp.c, lib/strncasecmp.c, lib/memcmp.c: New, from the
8591 2002-09-24 Akim Demaille <akim@epita.fr>
8593 * doc/bison.texinfo (Stack Overflow): xref to Recursion.
8594 (Frequently Asked Questions, Parser Stack Overflow): New.
8596 2002-09-13 Akim Demaille <akim@epita.fr>
8598 Playing with autoscan.
8600 * src/reader.c (get_merge_function): Use xstrdup, not strdup.
8601 * src/files.c (skeleton_find): Remove, unused.
8602 * m4/memcmp.m4: New, from the Coreutils 4.5.1.
8603 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Run jm_FUNC_MEMCMP.
8605 2002-09-13 Akim Demaille <akim@epita.fr>
8607 * configure.ac (AM_INIT_AUTOMAKE): Require Automake 1.6.3.
8608 * Makefile.am (AUTOMAKE_OPTIONS): Don't.
8610 2002-09-13 Akim Demaille <akim@epita.fr>
8612 * configure.ac: Require 2.54.
8613 s/jm_FUNC_MALLOC/AC_FUNC_MALLOC/.
8614 s/jm_FUNC_REALLOC/AC_FUNC_REALLOC/.
8615 * m4/c-bs-a.m4, m4/malloc.m4, m4/mbstate_t.m4, m4/realloc.m4:
8616 Remove, provided by Autoconf macros.
8618 2002-09-12 Akim Demaille <akim@epita.fr>
8620 * m4/prereq.m4: Update, from Coreutils 4.5.1.
8622 2002-09-12 Akim Demaille <akim@epita.fr>
8624 * m4/prereq.m4: Update, from Fileutils 4.1.5.
8625 * configure.ac (jm_PREREQ_TEMPNAME): Invoke it.
8626 Reported by Martin Mokrejs.
8628 2002-09-10 Akim Demaille <akim@epita.fr>
8630 * src/parse-gram.y: Associate a human readable string to each
8632 * tests/regression.at (Invalid inputs): Adjust.
8634 2002-09-10 Gary V. Vaughan <gary@gnu.org>
8636 * tests/Makefile.am ($(srcdir)/package.m4): Bison now ships
8637 with an Autoconf-2.5x style configure.ac.
8639 2002-09-06 Paul Eggert <eggert@twinsun.com>
8641 * doc/bison.texinfo (Conditions): Make explicit that the GPL
8642 exception applies only to yacc.c. This is a modification of a
8643 patch originally suggested by Akim Demaille.
8645 2002-09-06 Akim Demaille <akim@epita.fr>
8647 * data/c.m4 (b4_copyright): Move the GPL exception comment from
8649 * data/yacc.c: here.
8651 * data/lalr1.cc (struct yyltype): Don't define it, since we use
8653 (b4_ltype): Default to yy::Location from location.hh.
8655 2002-09-04 Jim Meyering <jim@meyering.net>
8657 * data/yacc.c: Guard the declaration of yytoknum also with
8658 `#ifdef YYPRINT', so it is declared only when used.
8660 2002-09-04 Akim Demaille <akim@epita.fr>
8662 * configure.in: Rename as...
8663 * configure.ac: this.
8666 2002-09-04 Akim Demaille <akim@epita.fr>
8668 * src/assoc.c, src/closure.c, src/gram.c, src/injections.c,
8669 * src/lalr.c, src/LR0.c, src/relation.c, src/tables.c: Don't
8670 translate maintainer only messages.
8672 2002-08-12 Paul Eggert <eggert@twinsun.com>
8676 * Makefile.am (SUBDIRS): Remove intl.
8677 (DISTCLEANFILES): Remove.
8678 * NEWS: Mention that GNU M4 is now required. Clarify what is
8679 meant by "larger grammars". Mention the pt_BR translation.
8680 * configure.in (AC_CHECK_DECLS): Add getenv, getopt.
8681 (AM_GNU_GETTEXT_VERSION): New macro, replacing GETTEXT_VERSION var.
8682 Bump version from 0.11.2 to 0.11.5.
8683 (BISON_PREREQ_STAGE): Remove.
8684 (AM_GNU_GETTEXT): Use external gettext.
8685 (AC_OUTPUT): Remove intl/Makefile.
8687 * config/depcomp, config/install-sh: Sync with Automake 1.6.3.
8689 * data/glr.c: Include string.h, for strlen.
8690 (yyreportParseError): Use size_t for yysize.
8691 (yy_yypstack): No longer nested inside yypstates, as nested
8692 functions are not portable. Do not assume size_t is the
8694 (yypstates): Do not assume that ptrdiff_t is the same width
8695 as int, and similarly for yyposn and YYINDEX.
8697 * data/yacc.c: Fix comment about `$$ = $1': it can copy garbage.
8699 * lib/Makefile.am (INCLUDES): Do not include from the intl
8700 directory, which has been removed.
8701 * src/Makefile.am (INCLUDES): Likewise.
8703 * lib/Makefile.am (libbison_a_SOURCES): Add unlocked-io.h.
8704 (bitsets_sources, additional_bitsets_sources, timevars_sources):
8707 * lib/Makefile.am (libbison_a_SOURCES): Avoid +=, a GNU make extension.
8708 * tests/Makefile.am (EXTRA_DIST): Likewise.
8710 * lib/abitset.c (abitset_reverse_list, ebitset_reverse_list):
8711 Do not assume that bitset_windex is the same width as unsigned.
8713 * lib/abitset.c (abitset_unused_clear): Do not assume that
8714 bitset_word is the same width as int.
8715 * lib/bbitset.h (BITSET_INDEX_MAX, BITSET_MSB): Likewise.
8716 * lib/bitset.h (bitset_set, bitset_reset): Likewise.
8717 * lib/bitset_stats.c (bitset_stats_set, bitset_stats_reset): Likewise.
8718 * lib/ebitset.c (ebitset_set, ebitset_reset): Likewise.
8719 * lib/lbitset.c (lbitset_set, lbitset_reset): Likewise.
8721 * lib/abitset.c (abitset_op1): Use -1, not ~0, as memset arg (for
8722 portability to one's complement hosts!).
8723 * lib/ebitset.c (ebitset_op1): Likewise.
8724 * lib/lbitset.c (lbitset_op1): Likewise.
8726 * lib/argmatch.c, lib/quotearg.c, quotearg.h: Sync with GNU tar.
8727 * lib/argmatch.h, lib/basename.c, lib/dirname.c, lib/dirname.h,
8728 lib/hash.c, lib/hash.h, lib/strnlen.c, lib/xmalloc.c:
8729 Sync with fileutils.
8730 * lib/error.c, lib/getopt.c, lib/getopt.h, lib/getopt1.c,
8731 lib/gettext.h: Sync with diffutils.
8733 * lib/memrchr.c, lib/mkstemp.c, lib/strchr.c, lib/strnlen.c,
8734 lib/strspn.c, lib/tempname.c: Use GPL, not LGPL.
8736 * lib/obstack.c, lib/obstack.h: Sync with fileutils, except use
8737 PROTOTYPES to check for prototypes, and "defined __STDC__" to
8740 * lib/bbitset.h (BITSET_WORD_BITS): Now of type unsigned, not
8741 size_t; the old version tried to do this but casted improperly.
8742 (bitset_bindex, bitset_windex): Now size_t, not unsigned long.
8743 (bitset_test): Now returns int, not unsigned long.
8745 * lib/bitset_stats.c: Include "gettext.h".
8747 (bitset_stats_set, bitset_stats_reset, bitset_stats_test): Don't
8748 name locals "index", as it generates unnecessary warnings on some
8749 hosts that have an "index" function.
8751 * lib/bitset_stats.c (bitset_stats_print_1, bitset_stats_print,
8752 bitset_stats_read, bitset_stats_write): Wrap strings in _() if
8753 they need translation.
8754 * src/LR0.c (state_list_append, new_itemsets, get_state,
8755 append_states, generate_states): Likewise.
8756 * src/assoc.c (assoc_to_string): Likewise.
8757 * src/closure.c (print_closure, set_firsts, closure): Likewise.
8758 * src/gram.c (grammar_dump): Likewise.
8759 * src/injections.c (injections_compute): Likewise.
8760 * src/lalr.c (lookaheads_print): Likewise.
8761 * src/relation.c (relation_transpose): Likewise.
8762 * src/scan-gram.l: Likewise.
8763 * src/tables.c (table_grow, pack_vector): Likewise.
8765 * m4/Makefile.am (EXTRA_DIST): Remove codeset.m4,
8766 glibc21.m4, isc-posix.m4 lcmessage.m4, stage.m4.
8767 * m4/malloc.m4, m4/realloc.m4: Sync with diffutils.
8768 * m4/mbstate_t.m4: Sync with fileutils.
8769 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): AC_MBSTATE_T -> AC_TYPE_MBSTATE_T.
8771 * po/LINGUAS: Add pt_BR.
8772 * po/POTFILES.in: Add src/assoc.c, src/closure.c, src/gram.c,
8773 src/main.c, src/relation.c, src/state.c, lib/bitset_stats.c,
8775 Use src/parse-gram.y instead of src/parse-gram.c, as the gettext
8777 Similarly, use src/scan-gram.l instead of src/scan-gram.c.
8779 * src/complain.c (strerror_r): Remove decl; not needed.
8780 (strerror): Use same pattern as ../lib/error.c.
8782 * src/files.c, src/files.h (compute_header_macro): Remove; unused.
8784 * src/gram.c (grammar_dump): Do not assume ptrdiff_t fits in int.
8786 * src/main.c (main): Cast result of bindtextdomain and textdomain
8787 to void, to avoid a GCC warning when --disable-nls is in effect.
8789 * src/scan-gram.l: Use strings rather than escapes when possible,
8790 to minimize the number of warnings from xgettext.
8791 (handle_action_dollar, handle_action_at): Don't use isdigit,
8792 as it mishandles negative chars and it may not work as expected
8793 outside the C locale.
8795 * src/symtab.c (symbol_get): Don't cast LHS of an assignment;
8796 this is a GCC extension and is not portable to other compilers.
8798 * src/system.h (alloca): Use same pattern as ../lib/error.c.
8799 Do not include <ctype.h>; no longer needed.
8800 Do not include <malloc.h>; no longer needed (and generates
8801 warnings on OpenBSD 3.0).
8803 * tests/cxx-type.at (yylex): Do not pass signed char to isupper;
8806 * tests/regression.at: Do not use 'cc -c input.c -o input';
8807 Sun C rejects this. Instead, use 'cc -c input.c -o input.o'.
8809 * tests/synclines.at (AC_SYNCLINES_COMPILE): Accept any nonzero
8810 exit status as failure, not just exit status 1. Sun C exits
8811 with status 2 sometimes.
8813 * tests/torture.at (AT_INCREASE_DATA_SIZE): New macro.
8814 Use it for the two large tests.
8816 2002-08-02 Akim Demaille <akim@epita.fr>
8818 * src/conflicts.c (conflicts_output): Don't output rules never
8819 reduced here, since anyway that computation doesn't work.
8820 * src/gram.h, src/gram.h (rule_filter_t, rule_useful_p)
8821 (rule_useless_p, rule_never_reduced_p): New.
8822 (grammar_rules_partial_print): Use a filter instead of a range.
8823 Display the title only if needed.
8824 (grammar_rules_print): Adjust.
8825 (grammar_rules_never_reduced_report): New.
8826 * src/tables.c (action_row): Move the computation of rules never
8828 (token_actions): here.
8829 * src/main.c (main): Make the parser before making the report, so
8830 that rules never reduced are computed.
8831 Call grammar_rules_never_reduced_report.
8832 * src/print.c (print_results): Report rules never reduced.
8833 * tests/conflicts.at, tests/reduce.at: Adjust.
8835 2002-08-01 Akim Demaille <akim@epita.fr>
8837 Instead of attaching lookaheads and duplicating the rules being
8838 reduced by a state, attach the lookaheads to the reductions.
8840 * src/state.h (state_t): Remove the `lookaheads',
8841 `lookaheads_rule' member.
8842 (reductions_t): Add a `lookaheads' member.
8843 Use a regular array for the `rules'.
8844 * src/state.c (reductions_new): Initialize the lookaheads member
8846 (state_rule_lookaheads_print): Adjust.
8847 * src/state.h, src/state.c (state_reductions_find): New.
8848 * src/conflicts.c (resolve_sr_conflict, set_conflicts)
8849 (count_rr_conflicts): Adjust.
8850 * src/lalr.c (LArule): Remove.
8851 (add_lookback_edge): Adjust.
8852 (state_lookaheads_count): New.
8853 (states_lookaheads_initialize): Merge into...
8854 (initialize_LA): this.
8855 (lalr_free): Adjust.
8856 * src/main.c (main): Don't free nullable and derives too early: it
8857 is used by --verbose.
8858 * src/print.c, src/print_graph.c, src/tables.c: Adjust.
8860 2002-08-01 Akim Demaille <akim@epita.fr>
8862 * src/derives.h, src/derives.c (derives): A `rule_t***' instead of
8864 (set_derives, free_derives): Rename as...
8865 (derives_compute, derives_free): this.
8866 Adjust all dependencies.
8867 * src/nullable.c (set_nullable, free_nullable): Rename as...
8868 (nullable_compute, nullable_free): these.
8869 (rule_list_t): Store rule_t *, not rule_number_t.
8870 * src/state.c (state_rule_lookaheads_print): Directly compare rule
8871 pointers, instead of their numbers.
8872 * src/main.c (main): Call nullable_free, and derives_free earlier,
8873 as they were lo longer used.
8875 2002-08-01 Akim Demaille <akim@epita.fr>
8877 * lib/timevar.c (get_time): Include children time.
8878 * src/lalr.h (LA, LArule): Don't export them: used with the
8880 * src/lalr.c (LA, LArule): Static.
8881 * src/lalr.h, src/lalr.c (lalr_free): New.
8882 * src/main.c (main): Call it.
8883 * src/tables.c (pack_vector): Check whether loc is >= to the
8885 (pack_tables): Don't free froms, tos, conflict_tos, and pos...
8886 (tables_generate): do it, since that's also it which allocates
8888 Don't free LA and LArule, main does.
8890 2002-07-31 Akim Demaille <akim@epita.fr>
8892 Separate parser tables computation and output.
8894 * src/output.c (nvectors, base_t, base, base_ninf, conflict_table)
8895 (conflict_list, conflict_list_cnt, table, check, table_ninf)
8896 (yydefgoto, yydefact, high): Move to...
8897 * src/tables.h, src/tables.c: here.
8898 * src/output.c (vector_number_t, VECTOR_NUMBER_MAX)
8899 (VECTOR_NUMBER_MIN, state_number_to_vector_number)
8900 (symbol_number_to_vector_number, nvectors, BASE_MAX, BASE_MIN)
8901 (froms, tos, conflict_tos, tally, width, action_t, ACTION_MAX)
8902 (ACTION_MIN, actrow, order, nentries, pos, conflrow)
8903 (conflict_list_free, table_size, lowzero, table_grow, conflict_row)
8904 (action_row, save_row, token_actions, save_column, default_goto)
8905 (goto_actions, sort_actions, matching_state, pack_vector)
8906 (table_ninf_remap, pack_table, prepare_actions): Move to...
8907 * src/tables.c: here.
8908 * src/tables.h, src/tables.c(tables_generate, tables_free): New.
8909 * src/output.c (token_actions, output_base, output_conflicts)
8910 (output_check): Merge into...
8911 (prepare_actions): this.
8912 (actions_output): Rename as...
8913 (user_actions_output): this.
8914 * src/main.c (main): Call tables_generate and tables_free.
8916 2002-07-31 Akim Demaille <akim@epita.fr>
8918 Steal GCC's --time-report support.
8920 * lib/timevar.c, lib/timevar.h, lib/timevar.def: New,
8921 stolen/adjusted from GCC.
8922 * m4/stage.m4: Remove time related checks.
8923 * m4/timevar.m4: New.
8924 * configure.in: Adjust.
8925 * src/system.h: Adjust to using timevar.h.
8926 * src/getargs.h, src/getargs.c: Support trace_time for
8928 * src/main.c (stage): Remove.
8929 (main): Replace `stage' invocations with timevar calls.
8930 * src/output.c: Insert pertinent timevar calls.
8932 2002-07-31 Akim Demaille <akim@epita.fr>
8934 Let --trace have arguments.
8936 * src/getargs.h (enum trace_e): New.
8937 * src/getargs.c (trace_args, trace_types, trace_argmatch): New.
8938 (long_options, short_options): --trace/-T takes an optional
8940 Change all the uses of trace_flag to reflect the new flags.
8941 * tests/sets.at (Firsts, Nullable, Broken Closure): Use --trace=sets.
8943 Strengthen `stage' portability.
8945 * m4/stage.m4 (BISON_PREREQ_STAGE): New.
8946 * configure.in: Use it.
8947 Don't check for malloc.h and sys/times.h.
8948 * src/system.h: Include them when appropriate.
8949 * src/main.c (stage): Compile only when mallinfo, struct mallinfo,
8950 times and struct tms are available.
8952 2002-07-30 Akim Demaille <akim@epita.fr>
8954 In verbose parse error message, don't report `error' as an
8956 * tests/actions.at (Printers and Destructors): Adjust.
8957 * tests/calc.at (Calculator $1): Adjust.
8958 * data/yacc.c, data/glr.c, data/lalr1.c: When making the verbose
8959 error message, do not report the parser accepts the error token in
8962 2002-07-30 Akim Demaille <akim@epita.fr>
8964 Normalize conflict related messages.
8966 * src/complain.h, src/complain.c (warn, complain): New.
8967 * src/conflicts.c (conflicts_print): Use them.
8968 (conflict_report_yacc): New, extracted from...
8969 (conflicts_print): here.
8970 * tests/conflicts.at, tests/existing.at: Adjust.
8972 2002-07-30 Akim Demaille <akim@epita.fr>
8974 Report rules which are never reduced by the parser: those hidden
8977 * src/LR0.c (save_reductions): Don't make the final state too
8978 different: save its reduction (accept) instead of having a state
8979 without any action (no shift or goto, no reduce).
8980 Note: the final state is now a ``regular'' state, i.e., the
8981 parsers now contain `reduce 0' as default reduction.
8982 Nevertheless, since they decide to `accept' when yystate =
8983 final_state, they still will not reduce rule 0.
8984 * src/print.c (print_actions, print_reduction): Adjust.
8985 * src/output.c (action_row): Track reduced rules.
8986 (token_actions): Report rules never reduced.
8987 * tests/conflicts.at, tests/regression.at: Adjust.
8989 2002-07-30 Akim Demaille <akim@epita.fr>
8991 `stage' was accidently included in a previous patch.
8992 Initiate its autoconfiscation.
8994 * configure.in: Look for malloc.h and sys/times.h.
8995 * src/main.c (stage): Adjust.
8996 Report only when trace_flag.
8998 2002-07-29 Akim Demaille <akim@epita.fr>
9000 * src/state.h, src/state.c (transitions_t): Holds state_t*'s, not
9002 (errs_t): symbol_t*, not symbol_number_t.
9003 (reductions_t): rule_t*, not rule_number_t.
9004 (FOR_EACH_SHIFT): New.
9005 * src/LR0.c, src/conflicts.c, src/lalr.c, src/output.c
9006 * src/print.c, src/print_graph.c: Adjust.
9008 2002-07-29 Akim Demaille <akim@epita.fr>
9010 Use $accept and $end, as BYacc and BTYacc do, instead of $axiom and $.
9012 * src/symtab.h, src/symtab.c (eoftoken, axiom): Rename as...
9013 (endtoken, accept): these.
9014 * src/reader.c (reader): Set endtoken's default tag to "$end".
9015 Set undeftoken's tag to "$undefined" instead of "$undefined.".
9016 * doc/bison.texinfo (Table of Symbols): Mention $accept and $end.
9019 2002-07-29 Akim Demaille <akim@epita.fr>
9021 * src/reduce.c (reduce_grammar): When the language is empty,
9022 complain about the start symbol, not the axiom.
9024 * tests/reduce.at (Empty Language): New.
9026 2002-07-26 Akim Demaille <akim@epita.fr>
9028 * src/reader.h, src/reader.c (gram_error): ... can't get
9029 yycontrol without making too strong assumptions on the parser
9031 * src/output.c (prepare_tokens): Use the real 0th value of
9032 token_translations instead of `0'.
9033 * src/parse-gram.y (yyerror): Don't rely on yycontrol being
9035 * data/yacc.c (yyreport_parse_error): Rename yylocation as yylloc
9036 for the time being: %locations ought to provide it to yyerror.
9038 2002-07-25 Akim Demaille <akim@epita.fr>
9040 * src/output.c (prepare_tokens): Go up to ntokens, not ntokens + 1.
9041 * doc/bison.texinfo (Decl Summary): s/$illegal/$undefined./.
9042 * tests/regression.at (Web2c Actions): Adjust.
9044 2002-07-25 Akim Demaille <akim@epita.fr>
9046 Stop storing rules from 1 to nrules + 1.
9048 * src/LR0.c, src/closure.c, src/derives.c, src/gram.c, src/lalr.c
9049 * src/nullable.c, src/output.c, src/print.c, src/reader.c
9050 * src/reduce.c: Allocate and free from &rules[0], not &rules[1].
9051 Iterate from 0 to nrules.
9052 Use rule_number_as_item_number and item_number_as_rule_number.
9053 Adjust to `derive' now containing possibly 0.
9054 * src/gram.h (rule_number_as_item_number, item_number_as_rule_number):
9055 Handle the `- 1' part in rule numbers from/to item numbers.
9056 * src/conflicts.c (log_resolution): Fix the message which reversed
9058 * src/output.c (action_row): Initialize default_rule to -1.
9059 (token_actions): Adjust.
9060 * tests/sets.at (Nullable, Firsts): Fix the previously bogus
9062 * tests/conflicts.at (Resolved SR Conflicts): Likewise.
9064 2002-07-25 Akim Demaille <akim@epita.fr>
9066 * data/c.m4 (b4_c_function, b4_c_ansi_args, b4_c_ansi_arg)
9067 (b4_c_knr_arg_names, b4_c_knr_arg_name, b4_c_knr_arg_decls)
9068 (b4_c_knr_arg_decl): New.
9069 * data/yacc.c: Use it to define yysymprint, yydestruct, and
9070 yyreport_parse_error.
9072 2002-07-25 Akim Demaille <akim@epita.fr>
9074 * data/yacc.c (yyreport_parse_error): New, extracted from...
9076 (yydestruct, yysymprint): Move above yyparse.
9079 2002-07-25 Akim Demaille <akim@epita.fr>
9081 * data/c.m4 (b4_ints_in, b4_int_type, b4_int_type_for): New,
9083 (b4_sint_type, b4_uint_type): these.
9084 * data/yacc.c, data/glr.c, data/lalr1.cc: Use b4_int_type_for.
9085 * tests/regression.at (Web2c Actions): Adjust.
9087 2002-07-25 Akim Demaille <akim@epita.fr>
9089 * src/gram.h (TIEM_NUMBER_MAX): New.
9090 (item_number_of_rule_number, rule_number_of_item_number): Rename
9092 (rule_number_as_item_number, item_number_as_rule_number): these.
9093 Adjust dependencies.
9094 * src/output.c (vector_number_t, VECTOR_NUMBER_MAX)
9095 (VECTOR_NUMBER_MIN, state_number_to_vector_number)
9096 (symbol_number_to_vector_number): New.
9097 (order): Of vector_number_t* type.
9098 (base_t, BASE_MAX, BASE_MIN): New.
9099 (froms, tos, width, pos, check): Of base_t type.
9100 (action_number_t, ACTION_MIN, ACTION_MAX): New.
9101 (actrow): Of action_number_t type.
9102 (conflrow): Of unsigned int type.
9103 (table_ninf, base_ninf): New.
9104 (GENERATE_MUSCLE_INSERT_TABLE): Also output the `*_min' value.
9105 (muscle_insert_int_table, muscle_insert_base_table)
9106 (muscle_insert_rule_number_table): New.
9107 (prepare_tokens): Output `toknum' as int_table.
9108 (action_row): Returns a rule_number_t.
9109 Use ACTION_MIN, not SHRT_MIN.
9110 (token_actions): yydefact is rule_number_t*.
9111 (table_ninf_remap): New.
9112 (pack_table): Use it for `base' and `table'.
9113 * data/yacc.c, data/glr.c, data/lalr1.cc (YYFLAG): Remove,
9115 (YYPACT_NINF, YYTABLE_NINF): these.
9116 (yypact, yytable): Compute their types instead of hard-coded
9118 * tests/regression.at (Web2c Actions): Adjust.
9120 2002-07-19 Akim Demaille <akim@epita.fr>
9122 * src/scan-gram.l (id): Can start with an underscore.
9124 2002-07-16 Akim Demaille <akim@epita.fr>
9126 * src/assoc.c, src/asssoc.h (assoc_t, assoc_to_string): New.
9127 Adjust all former `associativity' dependencies.
9128 * src/symtab.c (symbol_new): Default associativity is `undef', not
9130 (symbol_check_alias_consistence): Adjust.
9132 2002-07-09 Akim Demaille <akim@epita.fr>
9134 * doc/bison.texinfo: Properly set the ``header'' part.
9135 Use @dircategory ``GNU programming tools'' as per Texinfo's
9139 2002-07-09 Akim Demaille <akim@epita.fr>
9141 * lib/quotearg.h: Protect against multiple inclusions.
9142 * src/location.h (location_t): Add a `file' member.
9143 (LOCATION_RESET, LOCATION_PRINT): Adjust.
9144 * src/complain.c (warn_at, complain_at, fatal_at): Drop
9145 `error_one_per_line' support.
9147 2002-07-09 Akim Demaille <akim@epita.fr>
9149 * src/complain.h, src/complain.c (warn, complain): Remove, unused.
9150 * src/reader.c (lineno): Remove.
9151 Adjust all dependencies.
9152 (get_merge_function): Take a location and use complain_at.
9153 * src/symtab.h, src/symtab.c (symbol_make_alias): Likewise.
9154 * tests/regression.at (Invalid inputs, Mixing %token styles):
9157 2002-07-09 Akim Demaille <akim@epita.fr>
9159 * src/parse-gram.y (rules_or_grammar_declaration): Add an error
9160 recovery rule, and forbid extensions when --yacc.
9161 (gram_error): Use complain_at.
9162 * src/reader.c (reader): Exit if there were parse errors.
9164 2002-07-09 Akim Demaille <akim@epita.fr>
9166 * tests/synclines.at (AT_SYNCLINES_COMPILE): New.
9167 (AT_TEST_SYNCLINE): Adjust to unusual GCC outputs.
9168 Reported by R Blake <blakers@mac.com>.
9170 2002-07-09 Akim Demaille <akim@epita.fr>
9172 * data/yacc.c: Output the copyright notive in the header.
9174 2002-07-03 Akim Demaille <akim@epita.fr>
9176 * src/output.c (froms, tos): Are state_number_t.
9177 (save_column): sp, sp1, and sp2 are state_number_t.
9178 (prepare): Rename `final' as `final_state_number', `nnts' as
9179 `nterms_number', `nrules' as `rules_number', `nstates' as
9180 `states_number', and `ntokens' as `tokens_number'. Remove `nsym',
9182 * data/yacc.c, data/glr.c, data/lalr1.cc: Adjust.
9183 * data/lalr1.cc (nsym_): Remove, unused.
9185 2002-07-03 Akim Demaille <akim@epita.fr>
9187 * src/lalr.h, src/lalr.c (goto_number_t): New.
9188 * src/lalr.c (goto_list_t): New.
9190 * src/nullable.c (rule_list_t): New.
9192 * src/types.h: Remove.
9194 2002-07-03 Akim Demaille <akim@epita.fr>
9196 * src/closure.c (print_fderives): Use rule_rhs_print.
9197 * src/derives.c (print_derives): Use rule_rhs_print.
9198 (rule_list_t): New, replaces `shorts'.
9199 (set_derives): Add comments.
9200 * tests/sets.at (Nullable, Firsts): Adjust.
9202 2002-07-03 Akim Demaille <akim@epita.fr>
9204 * src/output.c (prepare_actions): Free `tally' and `width'.
9205 (prepare_actions): Allocate and free `order'.
9206 * src/symtab.c (symbols_free): Free `symbols'.
9207 * src/scan-gram.l (scanner_free): Clear Flex's scanners memory.
9208 * src/output.c (m4_invoke): Move to...
9209 * src/scan-skel.l: here.
9210 (<<EOF>>): Close yyout, and free its name.
9212 2002-07-03 Akim Demaille <akim@epita.fr>
9214 Fix some memory leaks, and fix a bug: state 0 was examined twice.
9216 * src/LR0.c (new_state): Merge into...
9217 (state_list_append): this.
9218 (new_states): Merge into...
9219 (generate_states): here.
9220 (set_states): Don't ensure a proper `errs' state member here, do it...
9221 * src/conflicts.c (conflicts_solve): here.
9222 * src/state.h, src/state.c: Comment changes.
9223 (state_t): Rename member `shifts' as `transitions'.
9224 Adjust all dependencies.
9225 (errs_new): For consistency, also take the values as argument.
9227 (state_errs_set): New.
9228 (state_reductions_set, state_transitions_set): Assert that no
9229 previous value was assigned.
9231 (states_free): Use it.
9232 * src/conflicts.c (resolve_sr_conflict): Don't use an `errs_t' as
9233 temporary storage: use `errs' and `nerrs' as elsewhere.
9234 (set_conflicts): Allocate and free this `errs'.
9236 2002-07-02 Akim Demaille <akim@epita.fr>
9238 * lib/libiberty.h: New.
9239 * lib: Update the bitset implementation from upstream.
9240 * src/closure.c, src/lalr.c, src/output.c, src/print_graph.c,
9241 * src/state.c: Use BITSET_FOR_EACH, not BITSET_EXECUTE.
9242 * src/main.c: Adjust bitset stats calls.
9244 2002-07-01 Paul Eggert <eggert@twinsun.com>
9246 * src/scan-gram.l (<SC_ESCAPED_CHARACTER>): Convert to unsigned
9247 char, so that negative chars don't collide with $.
9249 2002-06-30 Akim Demaille <akim@epita.fr>
9251 Have the GLR tests be `warning' checked, and fix the warnings.
9253 * data/glr.c (YYFPRINTF): Always define it, not only when YYDEBUG
9254 (yyuserAction, yyreportAmbiguity): `Use' all the arguments.
9255 (yyremoveDeletes): `yyi' and `yyj' are size_t.
9256 Use YYFPRINTF when under if (YYDEBUG) to avoid empty `if' bodies.
9257 (yyaddDeferredAction): static.
9258 (yyglrReduce): yyi, yyk, amd yyposn are size_t.
9259 (yyreportParseError): yyprefix is const.
9260 yytokenp is used only when verbose.
9261 (yy__GNUC__): Replace with __GNUC__.
9262 (yypdumpstack): yyi is size_t.
9263 (yypreference): Un-yy local variables and arguments, to avoid
9264 clashes with `yyr1'. Anyway, we are not in the user name space.
9265 (yytname_size): be an int, as is compared with ints.
9266 * tests/testsuite.at (AT_COMPILE, AT_PARSER_CHECK): New.
9268 * tests/cxx-gram.at: Use quotation to protect $1.
9269 Use AT_COMPILE to enable warnings hunts.
9270 Prototype yylex and yyerror.
9272 Include `string.h', not `strings.h'.
9273 Produce and prototype stmtMerge only when used.
9274 yylex takes a location.
9276 2002-06-30 Akim Demaille <akim@epita.fr>
9278 We spend a lot of time in quotearg, in particular when --verbose.
9280 * src/symtab.c (symbol_get): Store a quoted version of the key.
9281 (symbol_tag_get, symbol_tag_get_n, symbol_tag_print): Remove.
9284 2002-06-30 Akim Demaille <akim@epita.fr>
9286 * src/state.h (reductions_t): Rename member `nreds' as num.
9287 (errs_t): Rename members `nerrs' and `errs' as `num' and `symbols'.
9288 * src/state.c (ERRS_ALLOC, REDUCTIONS_ALLOC): Use the correct types.
9290 2002-06-30 Akim Demaille <akim@epita.fr>
9292 * src/state.h, src/state.c (shift_t, SHIFT_SYMBOL, SHIFT_IS_SHIFT)
9293 (SHIFT_IS_GOTO, SHIFT_IS_ERROR, SHIFT_DISABLE, SHIFT_IS_DISABLED)
9294 (shifts_to): Rename as...
9295 (transition_t, TRANSITION_SYMBOL, TRANSITION_IS_TRANSITION)
9296 (TRANSITION_IS_GOTO, TRANSITION_IS_ERROR, TRANSITION_DISABLE)
9297 (TRANSITION_IS_DISABLED, transitions_to): these.
9299 2002-06-30 Akim Demaille <akim@epita.fr>
9301 * src/print.c (print_shifts, print_gotos): Merge into...
9302 (print_transitions): this.
9303 (print_transitions, print_errs, print_reductions): Align the
9305 (print_core, print_transitions, print_errs, print_state,
9306 print_grammar): Output empty lines separator before, not after.
9307 (state_default_rule_compute): Rename as...
9308 (state_default_rule): this.
9309 * tests/conflicts.at (Defaulted Conflicted Reduction),
9310 (Unresolved SR Conflicts, Resolved SR Conflicts): Adjust.
9311 * tests/regression.at (Rule Line Numbers, Web2c Report): Adjust.
9313 2002-06-30 Akim Demaille <akim@epita.fr>
9315 Display items as we display rules.
9317 * src/gram.h, src/gram.c (rule_lhs_print): New.
9318 * src/gram.c (grammar_rules_partial_print): Use it.
9319 * src/print.c (print_core): Likewise.
9320 * tests/conflicts.at (Defaulted Conflicted Reduction),
9321 (Unresolved SR Conflicts): Adjust.
9322 (Unresolved SR Conflicts): Adjust and rename as...
9323 (Resolved SR Conflicts): this, as was meant.
9324 * tests/regression.at (Web2c Report): Adjust.
9326 2002-06-30 Akim Demaille <akim@epita.fr>
9328 * src/print.c (state_default_rule_compute): New, extracted from...
9329 (print_reductions): here.
9330 Pessimize, but clarify the code.
9331 * tests/conflicts.at (Defaulted Conflicted Reduction): New.
9333 2002-06-30 Akim Demaille <akim@epita.fr>
9335 * src/output.c (action_row): Let default_rule be always a rule
9338 2002-06-30 Akim Demaille <akim@epita.fr>
9340 * src/closure.c (print_firsts, print_fderives, closure):
9342 * src/lalr.c (lookaheads_print): Likewise.
9343 * src/state.c (state_rule_lookaheads_print): Likewise.
9344 * src/print_graph.c (print_core): Likewise.
9345 * src/print.c (print_reductions): Likewise.
9346 * src/output.c (action_row): Likewise.
9347 Use SHIFT_IS_DISABLED, SHIFT_IS_SHIFT and SHIFT_SYMBOL.
9349 2002-06-30 Akim Demaille <akim@epita.fr>
9351 * src/print_graph.c: Use report_flag.
9353 2002-06-30 Akim Demaille <akim@epita.fr>
9355 * src/lalr.c (traverse, digraph, matrix_print, transpose): Move
9357 * src/relation.h, src/relation.c (traverse, relation_digraph)
9358 (relation_print, relation_transpose): New.
9360 2002-06-30 Akim Demaille <akim@epita.fr>
9362 * src/state.h, src/state.c (shifts_to): New.
9363 * src/lalr.c (build_relations): Use it.
9365 2002-06-30 Akim Demaille <akim@epita.fr>
9367 * src/gram.h (rule_number_t, RULE_NUMBER_MAX, int_of_rule_number)
9368 (item_number_of_rule_number, rule_number_of_item_number): New.
9369 * src/LR0.c, src/closure.c, src/derives.c, src/derives.h,
9370 * src/gram.c, src/lalr.c, src/nullable.c, src/output.c, src/print.c,
9371 * src/print_graph.c, src/reader.c, src/reduce.c, src/reduce.h:
9372 Propagate their use.
9373 Much remains to be done, in particular wrt `shorts' from types.h.
9375 2002-06-30 Akim Demaille <akim@epita.fr>
9377 * src/symtab.c (symbol_new): Initialize the `printer' member.
9379 2002-06-30 Akim Demaille <akim@epita.fr>
9381 * src/LR0.c (save_reductions): Remove, replaced by...
9382 * src/state.h, src/state.c (state_reductions_set): New.
9383 (reductions, errs): Rename as...
9384 (reductions_t, errs_t): these.
9385 Adjust all dependencies.
9387 2002-06-30 Akim Demaille <akim@epita.fr>
9389 * src/LR0.c (state_list_t, state_list_append): New.
9390 (first_state, last_state): Now symbol_list_t.
9391 (this_state): Remove.
9392 (new_itemsets, append_states, save_reductions): Take a state_t as
9394 (set_states, generate_states): Adjust.
9395 (save_shifts): Remove, replaced by...
9396 * src/state.h, src/state.c (state_shifts_set): New.
9397 (shifts): Rename as...
9399 Adjust all dependencies.
9400 * src/state.h (state_t): Remove the `next' member.
9402 2002-06-30 Akim Demaille <akim@epita.fr>
9404 * src/vcg.c (quote): Use slot 2, since we often pass symbol tag
9407 2002-06-30 Akim Demaille <akim@epita.fr>
9409 Use hash.h for the state hash table.
9411 * src/LR0.c (STATE_HASH_SIZE, state_hash): Remove.
9412 (allocate_storage): Use state_hash_new.
9413 (free_storage): Use state_hash_free.
9414 (new_state, get_state): Adjust.
9415 * src/lalr.h, src/lalr.c (states): Move to...
9416 * src/states.h (state_t): Remove the `link' member, no longer
9418 * src/states.h, src/states.c: here.
9419 (state_hash_new, state_hash_free, state_hash_lookup)
9420 (state_hash_insert, states_free): New.
9421 * src/states.c (state_table, state_compare, state_hash): New.
9422 * src/output.c (output_actions): Do not free states now, since we
9423 still need to know the final_state number in `prepare', called
9424 afterwards. Do it...
9425 * src/main.c (main): here: call states_free after `output'.
9427 2002-06-30 Akim Demaille <akim@epita.fr>
9429 * src/state.h, src/state.c (state_new): New, extracted from...
9430 * src/LR0.c (new_state): here.
9431 * src/state.h (STATE_ALLOC): Move to...
9432 * src/state.c: here.
9433 * src/LR0.h, src/LR0.c (nstates, final_state): Move to...
9434 * src/state.h, src/state.c: here.
9436 2002-06-30 Akim Demaille <akim@epita.fr>
9438 * src/reader.c (gensym): Rename as...
9439 * src/symtab.h, src/symtab.c (dummy_symbol_get): this.
9440 (getsym): Rename as...
9443 2002-06-30 Akim Demaille <akim@epita.fr>
9445 * src/state.h (state_number_t, STATE_NUMBER_MAX): New.
9446 * src/LR0.c, src/LR0.h, src/conflicts.c, src/lalr.c, src/lalr.h,
9447 * src/output.c, src/print.c, src/print_graph.c: Propagate.
9448 * src/LR0.h, src/LR0.h (final_state): Is a state_t*.
9450 2002-06-30 Akim Demaille <akim@epita.fr>
9452 Make the test suite pass with warnings checked.
9454 * tests/actions.at (Printers and Destructors): Improve.
9455 Avoid unsigned vs. signed issues.
9456 * tests/calc.at: Don't exercise the scanner here, do it...
9457 * tests/input.at (Torturing the Scanner): here.
9459 2002-06-28 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
9461 * data/glr.c: Correct typo in Emacs-mode directive. Slightly
9462 reorganize first lines parallel to yacc.c.
9464 2002-06-28 Akim Demaille <akim@epita.fr>
9466 * data/c.m4 (b4_copyright, b4_sint_type, b4_uint_type, b4_token_define)
9467 (b4_token_enum, b4_token_defines): New, factored from...
9468 * data/lalr1.cc, data/yacc.c, glr.c: here.
9470 2002-06-28 Akim Demaille <akim@epita.fr>
9472 * data/yacc.c (yydestruct, yysymprint): Pacify GCC warnings for
9474 * src/output.c (merger_output): static.
9476 2002-06-28 Akim Demaille <akim@epita.fr>
9478 * src/reader.h: s/grammer_current_rule_merge_set/grammar_.../.
9479 * src/conflicts.c (conflicts_total_count): `i' is unsigned, to
9481 * src/output.c (save_row): Initialize all the variables to pacify GCC.
9483 2002-06-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
9485 Accumulated changelog for new GLR parsing features.
9487 * src/conflicts.c (count_total_conflicts): Change name to
9488 conflicts_total_count.
9489 * src/conflicts.h: Ditto.
9490 * src/output.c (token_actions): Use the new name.
9491 (output_conflicts): Change conflp => conflict_list_heads, and
9492 confl => conflict_list for better readability.
9493 * data/glr.c: Use the new names.
9494 * NEWS: Add self to GLR announcement.
9496 * src/reader.c (free_merger_functions): Cleanup: XFREE->free.
9498 * doc/bison.texinfo (GLR Parsers): Make corrections suggested by
9501 * data/bison.glr: Change name to glr.c
9502 * data/glr.c: Renamed from bison.glr.
9503 * data/Makefile.am: Add glr.c
9507 * src/symlist.h: Add dprec and merger fields to symbol_list_s.
9508 * src/symlist.c (symbol_list_new): Initialize dprec and merger fields.
9510 Originally 2002-06-16 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
9512 * data/bison.glr: Be sure to restore the
9513 current #line when returning to the skeleton contents after having
9514 exposed the input file's #line.
9516 Originally 2002-06-13 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
9518 * data/bison.glr: Bring up to date with changes to bison.simple.
9520 Originally 2002-06-03 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
9522 * data/bison.glr: Correct definitions that use b4_prefix.
9523 Various reformatting.
9524 (GLRStack): Make yychar (in YYPURE case) and yytokenp as part of stack.
9525 (yyreportParseError, yyrecoverParseError, yyprocessOneStack): remove
9526 yytokenp argument; now part of stack.
9527 (yychar): Define to behave as documented.
9530 Originally 2002-05-14 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
9532 * src/reader.h: Add declaration for free_merger_functions.
9534 * src/reader.c (merge_functions): New variable.
9535 (get_merge_function): New function.
9536 (free_merger_functions): New function.
9537 (readgram): Check for %prec that is not followed by a symbol.
9538 Handle %dprec and %merge declarations.
9539 (packgram): Initialize dprec and merger fields in rules array.
9541 * src/output.c (conflict_tos, conflrow, conflict_table, conflict_list,
9542 conflict_list_cnt, conflict_list_free): New variables.
9543 (table_grow): Also grow conflict_table.
9544 (prepare_rules): Output dprec and merger tables.
9545 (conflict_row): New function.
9546 (action_row): Output conflict lists for GLR parser. Don't use
9547 default reduction in conflicted states for GLR parser so that there
9548 are spaces for the conflict lists.
9549 (save_row): Also save conflict information.
9550 (token_actions): Allocate conflict list.
9551 (merger_output): New function.
9552 (pack_vector): Pack conflict table, too.
9553 (output_conflicts): New function to output yyconflp and yyconfl.
9554 (output_check): Allocate conflict_tos.
9555 (output_actions): Output conflict tables, also.
9556 (output_skeleton): Output b4_mergers definition.
9557 (prepare): Output b4_max_rhs_length definition.
9558 Use 'bison.glr' as default skeleton for GLR parsers.
9560 * src/gram.c (glr_parser): New flag.
9561 (grammar_free): Call free_merger_functions.
9563 * src/conflicts.c (count_rr_conflicts): Augment to optionally count
9564 all pairs of conflicting reductions, rather than just all tokens
9565 causing conflicts. Needed to size conflict tables.
9566 (conflicts_output): Modify call to count_rr_conflicts for new
9568 (conflicts_print): Ditto.
9569 (count_total_conflicts): New function.
9571 * src/reader.h (merger_list): New type.
9572 (merge_functions): New variable.
9574 * src/lex.h (tok_dprec, tok_merge): New token types.
9576 * src/gram.h (rule_s): Add dprec and merger fields.
9577 (glr_parser): New flag.
9579 * src/conflicts.h (count_total_conflicts): New function.
9581 * src/options.c (option_table): Add %dprec, %merge, and %glr-parser.
9583 * doc/bison.texinfo (Generalized LR Parsing): New section.
9584 (GLR Parsers): New section.
9585 (Language and Grammar): Mention GLR parsing.
9586 (Table of Symbols): Add %dprec, %glr-parser, %merge, GLR
9587 Correct typo ("tge" -> "the").
9589 * data/bison.glr: New skeleton for GLR parsing.
9591 * tests/cxx-gram.at: New tests for GLR parsing.
9593 * tests/testsuite.at: Include cxx-gram.at.
9595 * tests/Makefile.am: Add cxx-gram.at.
9599 * src/scan-gram.l: Add %dprec, %glr-parser, %merge.
9601 * src/parse-gram.y: Grammar for %dprec, %merge, %glr-parser.
9603 2002-06-27 Akim Demaille <akim@epita.fr>
9605 * src/options.h, src/options.c: Remove.
9606 * src/getargs.c (short_options, long_options): New.
9608 2002-06-27 Akim Demaille <akim@epita.fr>
9610 * data/bison.simple, data/bison.c++: Rename as...
9611 * data/yacc.c, data/lalr1.cc: these.
9612 * doc/bison.texinfo (Environment Variables): Remove.
9614 2002-06-25 Raja R Harinath <harinath@cs.umn.edu>
9616 * src/getargs.c (report_argmatch): Initialize strtok().
9618 2002-06-20 Akim Demaille <akim@epita.fr>
9620 * data/bison.simple (b4_symbol_actions): New, replaces...
9621 (b4_symbol_destructor, b4_symbol_printer): these.
9622 (yysymprint): Be sure to call YYPRINT only for tokens, and using
9625 2002-06-20 Akim Demaille <akim@epita.fr>
9627 * data/bison.simple (yydestructor): Rename as...
9630 2002-06-20 Akim Demaille <akim@epita.fr>
9632 * src/symtab.h, src/symtab.c (symbol_type_set)
9633 (symbol_destructor_set, symbol_precedence_set): The location is
9637 2002-06-20 Akim Demaille <akim@epita.fr>
9639 * src/parse-gram.y (YYPRINT, yyprint): Don't mess with the parser
9641 * src/reader.h, src/reader.c (grammar_current_rule_prec_set):
9643 * src/symtab.h, src/symtab.c (symbol_class_set)
9644 (symbol_user_token_number_set): Likewise.
9646 Promote complain_at.
9647 * tests/input.at (Type Clashes): Adjust.
9649 2002-06-20 Akim Demaille <akim@epita.fr>
9651 * data/bison.simple (YYLEX): Fix the declaration when
9654 2002-06-20 Akim Demaille <akim@epita.fr>
9656 * data/bison.simple (yysymprint): Don't print the token number,
9658 * tests/actions.at (Destructors): Rename as...
9659 (Printers and Destructors): this.
9660 Also exercise %printer.
9662 2002-06-20 Akim Demaille <akim@epita.fr>
9664 * data/bison.simple (YYDSYMPRINT): New.
9665 Use it to remove many of the #if YYDEBUG/if (yydebug).
9667 2002-06-20 Akim Demaille <akim@epita.fr>
9669 * src/symtab.h, src/symtab.c (symbol_t): printer and
9670 printer_location are new members.
9671 (symbol_printer_set): New.
9672 * src/parse-gram.y (PERCENT_PRINTER): New token.
9673 Handle its associated rule.
9674 * src/scan-gram.l: Adjust.
9675 (handle_destructor_at, handle_destructor_dollar): Rename as...
9676 (handle_symbol_code_at, handle_symbol_code_dollar): these.
9677 * src/output.c (symbol_printers_output): New.
9678 (output_skeleton): Call it.
9679 * data/bison.simple (yysymprint): New. Cannot be named yyprint
9680 since there are already many grammar files with a user `yyprint'.
9681 Replace the calls to YYPRINT to calls to yysymprint.
9682 * tests/calc.at: Adjust.
9683 * tests/torture.at (AT_DATA_STACK_TORTURE): Remove YYPRINT: it was
9684 taking advantage of parser very internal details (stack size!).
9686 2002-06-20 Akim Demaille <akim@epita.fr>
9688 * src/scan-gram.l: Complete the scanner with the missing patterns
9690 Use `quote' and `symbol_tag_get' where appropriate.
9692 2002-06-19 Akim Demaille <akim@epita.fr>
9694 * tests/actions.at (Destructors): Augment to test locations.
9695 * data/bison.simple (yydestructor): Pass it the current location
9696 if locations are enabled.
9697 Prototype only when __STDC__ or C++.
9698 Change the argument names to move into the yy name space: there is
9701 2002-06-19 Akim Demaille <akim@epita.fr>
9703 * data/bison.simple (b4_pure_if): New.
9704 Use it instead of #ifdef YYPURE.
9706 2002-06-19 Akim Demaille <akim@epita.fr>
9708 * data/bison.simple (b4_location_if): New.
9709 Use it instead of #ifdef YYLSP_NEEDED.
9711 2002-06-19 Akim Demaille <akim@epita.fr>
9713 Prepare @$ in %destructor, but currently don't bind it in the
9714 skeleton, as %location use is not cleaned up yet.
9716 * src/scan-gram.l (handle_dollar, handle_destructor_at)
9717 (handle_action_at): New.
9718 (handle_at, handle_action_dollar, handle_destructor_dollar): Take
9719 a braced_code_t and a location as additional arguments.
9720 (handle_destructor_dollar): Instead of requiring `b4_eval', just
9721 unquote one when outputting `b4_dollar_dollar'.
9723 * data/bison.simple (b4_eval): Remove.
9724 (b4_symbol_destructor): Adjust.
9725 * tests/input.at (Invalid @n): Adjust.
9727 2002-06-19 Zack Weinberg <zack@codesourcery.com>
9729 * doc/bison.texinfo: Document ability to have multiple
9732 2002-06-18 Akim Demaille <akim@epita.fr>
9734 * src/files.c (compute_base_names): When computing the output file
9735 names from the input file name, strip the directory part.
9737 2002-06-18 Akim Demaille <akim@epita.fr>
9739 * data/bison.simple.new: Comment changes.
9740 Reported by Andreas Schwab.
9742 2002-06-18 Matt Kraai <kraai@alumni.cmu.edu>
9744 * data/bison.simple (yyoverflowlab): #ifndef yyoverflow, so that
9745 there are no `label `yyoverflowlab' defined but not used' warnings
9746 when yyoverflow is defined.
9748 2002-06-18 Akim Demaille <akim@epita.fr>
9750 * src/symtab.h, src/symtab.c (symbol_t): destructor_location is a
9752 (symbol_destructor_set): Adjust.
9753 * src/output.c (symbol_destructors_output): Output the destructor
9755 Output the symbol name.
9756 * data/bison.simple (b4_symbol_destructor): Adjust.
9758 2002-06-18 Cris Bailiff <c.bailiff@awayweb.com>
9759 and Akim Demaille <akim@epita.fr>
9761 * data/bison.simple.new (yyerrlab1): Be sure to pop and destroy
9762 what's left on the stack when the error recovery hits EOF.
9763 * tests/actions.at (Destructors): Complete to exercise this case.
9765 2002-06-17 Akim Demaille <akim@epita.fr>
9767 * data/m4sugar/m4sugar.m4 (m4_map): Recognize when the list of
9768 arguments is really empty, not only equal to `[]'.
9769 * src/symtab.h, src/symtab.c (symbol_t): `destructor' is a new
9771 (symbol_destructor_set): New.
9772 * src/output.c (symbol_destructors_output): New.
9773 * src/reader.h (brace_code_t, current_braced_code): New.
9774 * src/scan-gram.l (BRACED_CODE): Use it to branch on...
9775 (handle_dollar): Rename as...
9776 (handle_action_dollar): this.
9777 (handle_destructor_dollar): New.
9778 * src/parse-gram.y (PERCENT_DESTRUCTOR): New.
9779 (grammar_declaration): Use it.
9780 * data/bison.simple (yystos): Is always defined.
9781 (yydestructor): New.
9782 * tests/actions.at (Destructors): New.
9783 * tests/calc.at (_AT_CHECK_CALC_ERROR): Don't rely on egrep.
9785 2002-06-17 Akim Demaille <akim@epita.fr>
9787 * src/symlist.h, src/symlist.c (symbol_list_length): New.
9788 * src/scan-gram.l (handle_dollar, handle_at): Compute the
9789 rule_length only when needed.
9790 * src/output.c (actions_output, token_definitions_output): Output
9792 * src/symtab.c: Don't access directly to the symbol tag, use
9794 * src/parse-gram.y: Use symbol_list_free.
9796 2002-06-17 Akim Demaille <akim@epita.fr>
9798 * src/reader.h, src/reader.c (symbol_list, symbol_list_new)
9799 (symbol_list_prepend, get_type_name): Move to...
9800 * src/symlist.h, src/symlist.c (symbol_list_t, symbol_list_new)
9801 (symbol_list_prepend, symbol_list_n_type_name_get): here.
9803 (symbol_list_free): New.
9804 * src/scan-gram.l (handle_dollar): Takes a location.
9805 * tests/input.at (Invalid $n): Adjust.
9807 2002-06-17 Akim Demaille <akim@epita.fr>
9809 * src/reader.h, src/reader.c (symbol_list_new): Export it.
9810 (symbol_list_prepend): New.
9811 * src/parse-gram.y (%union): `list' is a new member.
9812 (symbols.1): New, replaces...
9813 (terms_to_prec.1, nterms_to_type.1): these.
9814 * src/symtab.h, src/symtab.c (symbol_type_set, symbol_precedence_set)
9815 Take a location as additional argument.
9818 2002-06-15 Akim Demaille <akim@epita.fr>
9820 * src/parse-gram.y: Move %token in the declaration section so that
9821 we don't depend upon CVS Bison.
9823 2002-06-15 Akim Demaille <akim@epita.fr>
9825 * src/state.h, src/state.c (state_rule_lookaheads_print): New.
9826 * src/print.c (print_core): Use it.
9828 2002-06-15 Akim Demaille <akim@epita.fr>
9830 * src/conflicts.c (log_resolution): Accept the rule involved in
9831 the sr conflicts instead of the lookahead number that points to
9833 (flush_reduce): Accept the current lookahead vector as argument,
9834 instead of the index in LA.
9835 (resolve_sr_conflict): Accept the current number of lookahead
9836 bitset to consider for the STATE, instead of the index in LA.
9837 (set_conflicts): Adjust.
9838 * src/lalr.c, src/lalr.h, src/state.h: Comment changes.
9840 2002-06-15 Akim Demaille <akim@epita.fr>
9842 * src/state.h (state_t): Replace the `lookaheadsp' member, a
9843 short, with `lookaheads' (bitsetv), `lookaheads_rule' (rule_t**).
9844 Adjust all dependencies.
9845 * src/lalr.c (initialize_lookaheads): Split into...
9846 (states_lookaheads_count, states_lookaheads_initialize): these.
9849 2002-06-15 Akim Demaille <akim@epita.fr>
9851 * src/gram.h, src/gram.c (grammar_rules_partial_print): New, eved
9853 (grammar_rules_print): here.
9854 * src/reduce.c (reduce_output): Use it.
9855 * tests/reduce.at (Useless Rules, Reduced Automaton)
9856 (Underivable Rules): Adjust.
9858 2002-06-15 Akim Demaille <akim@epita.fr>
9860 Copy BYacc's nice way to report the grammar.
9862 * src/gram.h, src/gram.c (grammar_rhs_print, grammar_rules_print):
9864 Don't print the rules' location, it is confusing and useless.
9865 (rule_print): Use grammar_rhs_print.
9866 * src/print.c (print_grammar): Use grammar_rules_print.
9868 2002-06-15 Akim Demaille <akim@epita.fr>
9870 Complete and rationalize `useless thing' warnings.
9872 * src/symtab.h, src/symtab.c (symbol_tag_get, symbol_tag_get_n)
9873 (symbol_tag_print): New.
9874 Use them everywhere in place of accessing directly the tag member.
9875 * src/gram.h, src/gram.c (rule_print): New.
9876 Use it where a rule used to be printed `by hand'.
9877 * src/reduce.c (nonterminals_reduce): Report the use nonterminals.
9878 (reduce_grammar_tables): Report the useless rules.
9879 (reduce_print): Useless things are a warning, not an error.
9881 * tests/reduce.at (Useless Nonterminals, Useless Rules):
9882 (Reduced Automaton, Underivable Rules): Adjust.
9883 * tests/regression.at (Web2c Report, Web2c Report): Adjust.
9884 * tests/conflicts.at (Unresolved SR Conflicts)
9885 (Solved SR Conflicts): Adjust.
9887 2002-06-15 Akim Demaille <akim@epita.fr>
9889 Let symbols have a location.
9891 * src/symtab.h, src/symtab.c (symbol_t): Location is a new member.
9894 * src/complain.h, src/complain.c (complain_at, fatal_at, warn_at):
9895 Use location_t, not int.
9896 * src/symtab.c (symbol_check_defined): Take advantage of the
9898 * tests/regression.at (Invalid inputs): Adjust.
9900 2002-06-15 Akim Demaille <akim@epita.fr>
9902 * src/parse-gram.y (YYLLOC_DEFAULT, current_lhs_location): New.
9903 (input): Don't try to initialize yylloc here, do it in the
9905 * src/scan-gram.l (YY_USER_INIT): Initialize yylloc.
9906 * src/gram.h (rule_t): Change line and action_line into location
9907 and action_location, of location_t type.
9908 Adjust all dependencies.
9909 * src/location.h, src/location.c (empty_location): New.
9910 * src/reader.h, src/reader.c (grammar_start_symbol_set)
9911 (grammar_symbol_append, grammar_rule_begin, grammar_rule_end)
9912 (grammar_current_rule_symbol_append)
9913 (grammar_current_rule_action_append): Expect a location as argument.
9914 * src/reader.c (grammar_midrule_action): Adjust to attach an
9915 action's location as dummy symbol location.
9916 * src/symtab.h, src/symtab.c (startsymbol_location): New.
9917 * tests/regression.at (Web2c Report, Rule Line Numbers): Adjust
9920 2002-06-14 Akim Demaille <akim@epita.fr>
9922 Grammar declarations may be found in the grammar section.
9924 * src/parse-gram.y (rules_or_grammar_declaration): New.
9925 (declarations): Each declaration may end with a semicolon, not
9927 (grammar_declaration): `"%union"'.
9928 (grammar): Branch to rules_or_grammar_declaration.
9930 2002-06-14 Akim Demaille <akim@epita.fr>
9932 * src/main.c (main): Invoke scanner_free.
9934 2002-06-14 Akim Demaille <akim@epita.fr>
9936 * src/output.c (m4_invoke): Extracted from...
9937 (output_skeleton): here.
9940 2002-06-14 Akim Demaille <akim@epita.fr>
9942 * src/parse-gram.y (directives, directive, gram)
9943 (grammar_directives, precedence_directives, precedence_directive):
9945 (declarations, declaration, grammar, grammar_declaration)
9946 (precedence_declaration, precedence_declarator): these.
9947 (symbol_declaration): New.
9949 2002-06-14 Akim Demaille <akim@epita.fr>
9951 * src/files.c (action_obstack): Remove, unused.
9952 (output_obstack): Remove it, and all its dependencies, as it is no
9954 * src/reader.c (epilogue_set): Build the epilogue in the
9956 * src/output.h, src/output.c (muscle_obstack): Move to...
9957 * src/muscle_tab.h, src/muscle_tab.h: here.
9958 (muscle_init): Initialize muscle_obstack.
9960 * src/main.c (main): Call it.
9962 2002-06-14 Akim Demaille <akim@epita.fr>
9964 * src/location.h: New, extracted from...
9965 * src/reader.h: here.
9966 * src/Makefile.am (noinst_HEADERS): Merge into
9967 (bison_SOURCES): this.
9969 * src/parse-gram.y: Use location_t instead of Bison's.
9970 * src/reader.h, src/reader.c (prologue_augment, epilogue_set):
9971 Use location_t instead of ints.
9973 2002-06-14 Akim Demaille <akim@epita.fr>
9975 * data/bison.simple, data/bison.c++: Be sure to restore the
9976 current #line when returning to the skeleton contents after having
9977 exposed the input file's #line.
9979 2002-06-12 Akim Demaille <akim@epita.fr>
9981 * src/scan-gram.l (SC_BRACED_CODE): Don't use `<.*>', it is too
9983 * tests/actions.at (Exotic Dollars): New.
9985 2002-06-12 Akim Demaille <akim@epita.fr>
9987 * src/scan-gram.l (SC_PROLOGUE): Don't eat characters amongst
9989 * tests/input.at (Torturing the Scanner): New.
9991 2002-06-11 Akim Demaille <akim@epita.fr>
9993 * src/scan-gram.l (YY_OBS_INIT): Remove, replace with...
9994 [SC_COMMENT,SC_STRING,SC_CHARACTER,SC_BRACED_CODE,SC_PROLOGUE]
9995 [SC_EPILOGUE]: Output the quadrigraphs only when not in a comment.
9996 * src/reader.h, src/scan-gram.l (scanner_initialize): this.
9997 * src/reader.c (reader): Use it.
9999 2002-06-11 Akim Demaille <akim@epita.fr>
10001 * src/scan-gram.l (YY_OBS_FINISH): Don't set yylval.
10002 Adjust all callers.
10003 (scanner_last_string_free): New.
10005 2002-06-11 Akim Demaille <akim@epita.fr>
10007 * src/scan-gram.l (YY_INIT, YY_GROW, YY_FINISH): Rename as...
10008 (YY_OBS_INIT, YY_OBS_GROW, YY_OBS_FINISH): these.
10009 (last_string, YY_OBS_FREE): New.
10010 Use them when returning an ID.
10012 2002-06-11 Akim Demaille <akim@epita.fr>
10014 Have Bison grammars parsed by a Bison grammar.
10016 * src/reader.c, src/reader.h (prologue_augment): New.
10017 * src/reader.c (copy_definition): Remove.
10019 * src/reader.h, src/reader.c (gram_start_symbol_set, prologue_augment)
10020 (grammar_symbol_append, grammar_rule_begin, grammar_midrule_action)
10021 (grammar_current_rule_prec_set, grammar_current_rule_check)
10022 (grammar_current_rule_symbol_append)
10023 (grammar_current_rule_action_append): Export.
10024 * src/parse-gram.y (symbol_list_new, symbol_list_symbol_append_
10025 (symbol_list_action_append): Remove.
10026 Hook the routines from reader.
10027 * src/scan-gram.l: In INITIAL, characters and strings are tokens.
10028 * src/system.h (ATTRIBUTE_NORETURN, ATTRIBUTE_UNUSED): Now.
10030 * src/reader.c (read_declarations): Remove, unused.
10032 * src/parse-gram.y: Handle the epilogue.
10033 * src/reader.h, src/reader.c (gram_start_symbol_set): Rename as...
10034 (grammar_start_symbol_set): this.
10035 * src/scan-gram.l: Be sure to ``use'' yycontrol to keep GCC quiet.
10036 * src/reader.c (readgram): Remove, unused.
10037 (reader): Adjust to insert eoftoken and axiom where appropriate.
10039 * src/reader.c (copy_dollar): Replace with...
10040 * src/scan-gram.h (handle_dollar): this.
10041 * src/parse-gram.y: Remove `%thong'.
10043 * src/reader.c (copy_at): Replace with...
10044 * src/scan-gram.h (handle_at): this.
10046 * src/complain.h, src/complain.c (warn_at, complain_at, fatal_at):
10049 * src/scan-gram.l (YY_LINES): Keep lineno synchronized for the
10052 * src/reader.h, src/reader.c (grammar_rule_end): New.
10054 * src/parse.y (current_type, current_class): New.
10055 Implement `%nterm', `%token' support.
10056 Merge `%term' into `%token'.
10057 (string_as_id): New.
10058 * src/symtab.h, src/symtab.c (symbol_make_alias): Don't pass the
10061 * src/parse-gram.y: Be sure to handle properly the beginning of
10064 * src/parse-gram.y: Handle %type.
10065 * src/reader.c (grammar_rule_end): Call grammar_current_rule_check.
10067 * src/parse-gram.y: More directives support.
10068 * src/options.c: No longer handle source directives.
10070 * src/parse-gram.y: Fix %output.
10072 * src/parse-gram.y: Handle %union.
10073 Use the prologue locations.
10074 * src/reader.c (parse_union_decl): Remove.
10076 * src/reader.h, src/reader.c (epilogue_set): New.
10077 * src/parse-gram.y: Use it.
10079 * data/bison.simple, data/bison.c++: b4_stype is now either not
10080 defined, then default to int, or to the contents of %union,
10081 without `union' itself.
10083 * src/muscle_tab.c (muscle_init): Don't predefine `stype'.
10085 * src/output.c (actions_output): Don't output braces, as they are
10086 already handled by the scanner.
10088 * src/scan-gram.l (SC_CHARACTER): Set the user_token_number of
10089 characters to themselves.
10091 * tests/reduce.at (Reduced Automaton): End the grammars with %% so
10092 that the epilogue has a proper #line.
10094 * src/parse-gram.y: Handle precedence/associativity.
10096 * src/symtab.c (symbol_precedence_set): Requires the symbol to be
10098 * src/scan-gram.l (SC_BRACED_CODE): Catch strings and characters.
10099 * tests/calc.at: Do not use `%token "foo"' as it makes not sense
10100 at all to define terminals that cannot be emitted.
10102 * src/scan-gram.l: Escape M4 characters.
10104 * src/scan-gram.l: Working properly with escapes in user
10105 strings/characters.
10107 * tests/torture.at (AT_DATA_TRIANGULAR_GRAMMAR)
10108 (AT_DATA_HORIZONTAL_GRAMMAR): Respect the `%token ID NUM STRING'
10110 Use more modest sizes, as for the time being the parser does not
10111 release memory, and therefore the process swallows a huge amount
10114 * tests/torture.at (AT_DATA_LOOKAHEADS_GRAMMAR): Adjust to the
10115 stricter %token grammar.
10117 * src/symtab.h (associativity): Add `undef_assoc'.
10118 (symbol_precedence_set): Do nothing when passed an undef_assoc.
10119 * src/symtab.c (symbol_check_alias_consistence): Adjust.
10121 * tests/regression.at (Invalid %directive): Remove, as it is now
10123 (Invalid inputs): Adjust to the new error messages.
10124 (Token definitions): The new grammar doesn't allow too many
10127 * src/lex.h, src/lex.c: Remove.
10128 * src/reader.c (lastprec, skip_to_char, read_signed_integer)
10129 (copy_character, copy_string2, copy_string, copy_identifier)
10130 (copy_comment, parse_token_decl, parse_type_decl, parse_assoc_decl)
10131 (parse_muscle_decl, parse_dquoted_param, parse_skel_decl)
10132 (parse_action): Remove.
10133 * po/POTFILES.in: Adjust.
10135 2002-06-11 Akim Demaille <akim@epita.fr>
10137 * src/reader.c (parse_action): Don't store directly into the
10138 rule's action member: return the action as a string.
10139 Don't require `rule_length' as an argument: compute it.
10140 (grammar_current_rule_symbol_append)
10141 (grammar_current_rule_action_append): New, eved out from
10143 Remove `action_flag', `rulelength', unused now.
10145 2002-06-11 Akim Demaille <akim@epita.fr>
10147 * src/reader.c (grammar_current_rule_prec_set).
10148 (grammar_current_rule_check): New, eved out from...
10150 Remove `xaction', `first_rhs': useless.
10151 * tests/input.at (Type clashes): New.
10152 * tests/existing.at (GNU Cim Grammar): Adjust.
10154 2002-06-11 Akim Demaille <akim@epita.fr>
10156 * src/reader.c (grammar_midrule_action): New, Eved out from
10159 2002-06-11 Akim Demaille <akim@epita.fr>
10161 * src/reader.c (grammar_rule_begin, previous_rule, current_rule):
10163 (readgram): Use them as replacement of inlined code, crule and
10166 2002-06-11 Akim Demaille <akim@epita.fr>
10168 * src/reader.c (grammar_end, grammar_symbol_append): New.
10169 (readgram): Use them.
10170 Make the use of `p' as local as possible.
10172 2002-06-10 Akim Demaille <akim@epita.fr>
10174 GCJ's parser requires the tokens to be defined before the prologue.
10176 * data/bison.simple: Output the token definition before the user's
10178 * tests/regression.at (Braces parsing, Duplicate string)
10179 (Mixing %token styles): Check the output from bison.
10180 (Early token definitions): New.
10182 2002-06-10 Akim Demaille <akim@epita.fr>
10184 * src/symtab.c (symbol_user_token_number_set): Don't complain when
10185 assigning twice the same user number to a token, so that we can
10187 * src/lex.c (lex): here.
10188 Also use `symbol_class_set' instead of hand written code.
10189 * src/reader.c (parse_assoc_decl): Likewise.
10191 2002-06-10 Akim Demaille <akim@epita.fr>
10193 * src/symtab.c, src/symtab.c (symbol_class_set)
10194 (symbol_user_token_number_set): New.
10195 * src/reader.c (parse_token_decl): Use them.
10196 Use a switch instead of ifs.
10197 Use a single argument.
10199 2002-06-10 Akim Demaille <akim@epita.fr>
10201 Remove `%thong' support as it is undocumented, unused, duplicates
10202 `%token's job, and creates useless e-mail traffic with people who
10203 want to know what it is, why it is undocumented, unused, and
10204 duplicates `%token's job.
10206 * src/reader.c (parse_thong_decl): Remove.
10207 * src/options.c (option_table): Remove "thong".
10208 * src/lex.h (tok_thong): Remove.
10210 2002-06-10 Akim Demaille <akim@epita.fr>
10212 * src/symtab.c, src/symtab.c (symbol_type_set)
10213 (symbol_precedence_set): New.
10214 * src/reader.c (parse_type_decl, parse_assoc_decl): Use them.
10215 (value_components_used): Remove, unused.
10217 2002-06-09 Akim Demaille <akim@epita.fr>
10219 Move symbols handling code out of the reader.
10221 * src/reader.h, src/reader.c (errtoken, undeftoken, eoftoken)
10222 (axiom): Move to...
10223 * src/symtab.h, src/symtab.c: here.
10225 * src/gram.c (start_symbol): Remove: use startsymbol->number.
10226 * src/reader.c (startval): Rename as...
10227 * src/symtab.h, src/symtab.c (startsymbol): this.
10228 * src/reader.c: Adjust.
10230 * src/reader.c (symbol_check_defined, symbol_make_alias)
10231 (symbol_check_alias_consistence, symbol_pack, symbol_translation)
10232 (token_translations_init)
10234 * src/symtab.c: here.
10235 * src/reader.c (packsymbols): Move to...
10236 * src/symtab.h, src/symtab.c (symbols_pack): here.
10237 * src/symtab.h, src/symtab.c (symbol_make_alias): Takes SYMVAL as
10240 2002-06-03 Akim Demaille <akim@epita.fr>
10242 * src/muscle_tab.c (muscle_insert, muscle_find): Declarations,
10245 2002-06-03 Akim Demaille <akim@epita.fr>
10247 * src/muscle_tab.c (muscle_find, muscle_insert): Don't initialize
10248 structs with non literals.
10249 * src/scan-skel.l: never-interactive.
10250 * src/conflicts.c (enum conflict_resolution_e): No trailing
10252 * src/getargs.c (usage): Split long literal strings.
10253 Reported by Hans Aberg.
10255 2002-05-28 Akim Demaille <akim@epita.fr>
10257 * data/bison.c++: Use C++ ostreams.
10258 (cdebug_): New member.
10260 2002-05-28 Akim Demaille <akim@epita.fr>
10262 * src/output.c (output_skeleton): Be sure to allocate enough room
10263 for `/' _and_ for `\0' in full_skeleton.
10265 2002-05-28 Akim Demaille <akim@epita.fr>
10267 * data/bison.c++: Catch up with bison.simple:
10268 2002-05-24 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
10269 and Paul Eggert <eggert@twinsun.com>: `error' handing.
10270 2002-05-26 Akim Demaille <akim@epita.fr>: stos_, token_number_,
10271 and popping traces.
10273 2002-05-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
10275 * src/output.c (output_skeleton): Put an explicit path in front of
10276 the skeleton file name, rather than relying on the -I directory,
10277 to partially alleviate effects of having a skeleton file lying around
10278 in the current directory.
10280 2002-05-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
10282 * src/conflicts.c (log_resolution): Correct typo:
10283 obstack_printf should be obstack_fgrow1.
10285 2002-05-26 Akim Demaille <akim@epita.fr>
10287 * src/state.h (state_t): `solved_conflicts' is a new member.
10288 * src/LR0.c (new_state): Set it to 0.
10289 * src/conflicts.h, src/conflicts.c (print_conflicts)
10290 (free_conflicts, solve_conflicts): Rename as...
10291 (conflicts_print, conflicts_free, conflicts_solve): these.
10293 * src/conflicts.c (enum conflict_resolution_e)
10294 (solved_conflicts_obstack): New, used by...
10295 (log_resolution): this.
10296 Adjust to attach the conflict resolution to each state.
10297 Complete the description with the precedence/associativity
10299 (resolve_sr_conflict): Adjust.
10300 * src/print.c (print_state): Output its solved_conflicts.
10301 * tests/conflicts.at (Unresolved SR Conflicts)
10302 (Solved SR Conflicts): Exercise --report=all.
10304 2002-05-26 Akim Demaille <akim@epita.fr>
10306 * src/LR0.c, src/derives.c, src/gram.c, src/gram.h, src/lalr.c,
10307 * src/nullable.c, src/output.c, src/print.c, src/print_graph.c,
10308 * src/reader.c, src/reduce.c, src/state.h, src/symtab.h
10309 (token_number_t, item_number_as_token_number)
10310 (token_number_as_item_number, muscle_insert_token_number_table):
10312 (symbol_number_t, item_number_as_symbol_number)
10313 (symbol_number_as_item_number, muscle_insert_symbol_number_table):
10314 these, since it is more appropriate.
10316 2002-05-26 Akim Demaille <akim@epita.fr>
10318 * tests/calc.at (AT_CHECK_CALC): Adjust: there are now additional
10320 * data/bison.simple (yystos) [YYDEBUG]: New.
10321 (yyparse) [YYDEBUG]: Display the symbols which are popped during
10323 * tests/regression.at (Web2c Actions): Adjust: yystos is output now.
10325 2002-05-25 Akim Demaille <akim@epita.fr>
10327 * doc/bison.texinfo (Debugging): Split into...
10328 (Tracing): this new section, its former contents, and...
10329 (Understanding): this new section.
10330 * src/getargs.h, src/getargs.c (verbose_flag): Remove, replaced
10332 (report_flag): this.
10333 Adjust all dependencies.
10334 (report_args, report_types, report_argmatch): New.
10335 (usage, getargs): Report/support -r, --report.
10337 (struct option_table_struct): Rename as..,
10338 (struct option_table_s): this.
10339 Rename the `set_flag' member to `flag' to match with getopt_long's
10341 * src/options.c (option_table): Split verbose into an entry for
10342 %verbose, and another for --verbose.
10343 Support --report/-r, so remove -r from the obsolete --raw.
10344 * src/print.c: Attach full item sets and lookaheads reports to
10345 report_flag instead of trace_flag.
10346 * lib/argmatch.h, lib/argmatch.c: New, from Fileutils 4.1.
10348 2002-05-24 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
10349 and Paul Eggert <eggert@twinsun.com>
10351 * data/bison.simple (yyparse): Correct error handling to conform to
10352 POSIX and yacc. Specifically, after syntax error is discovered,
10353 do not reduce further before shifting the error token.
10354 Clean up the code a bit by removing the labels yyerrdefault,
10355 yyerrhandle, yyerrpop.
10356 * NEWS: Document the above.
10358 2002-05-20 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
10360 * data/bison.simple (yyr1): Don't use yy_token_number_type as element
10361 type; it isn't always big enough, since it doesn't necessarily
10362 include non-terminals.
10363 (yytranslate): Expand definition of yy_token_number_type, so that
10364 the latter can be removed.
10365 (yy_token_number_type): Remove, only one use.
10366 * data/bison.c++ (r1_): Parallel change to yyr1 in bison.simple---
10367 don't use TokenNumberType as element type.
10369 * tests/regression.at: Modify expected output to agree with change
10370 to yyr1 and yytranslate.
10372 2002-05-13 Florian Krohm <florian@edamail.fishkill.ibm.com>
10374 * src/reader.c (parse_action): Use copy_character instead of
10377 2002-05-13 Akim Demaille <akim@epita.fr>
10379 * tests/regression.at (Token definitions): Prototype yylex and
10382 2002-05-12 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
10384 * src/scan-skel.l: Correct off-by-one error in handling of __oline__.
10385 * data/bison.simple (b4_sint_type, b4_uint_type): Correct to reflect
10387 * data/bison.c++ (b4_sint_type, b4_uint_type): Ditto.
10389 2002-05-07 Akim Demaille <akim@epita.fr>
10391 * tests/synclines.at: Be sure to prototype yylex and yyerror to
10392 avoid GCC warnings.
10394 2002-05-07 Akim Demaille <akim@epita.fr>
10398 * src/reduce.c (nonterminals_reduce): Don't loop over RITEM: loop
10399 over the RHS of each rule.
10400 * src/gram.h, src/gram.c (nritems): Is `unsigned int', not int.
10401 * src/state.h (state_t): Member `nitems' is unsigned short.
10402 * src/LR0.c (get_state): Adjust.
10403 * src/reader.c (packgram): Likewise.
10404 * src/output.c (GENERATE_MUSCLE_INSERT_TABLE): `max' is of type
10406 (muscle_insert_int_table): Remove, unused.
10407 (prepare_rules): Remove `max'.
10409 2002-05-06 Akim Demaille <akim@epita.fr>
10411 * src/closure.c (print_firsts): Display of the symbol tags.
10412 (bitmatrix_print): Move to...
10413 * lib/bitsetv-print.h, lib/bitsetv-print.c (bitsetv_matrix_dump):
10415 * tests/sets.at (Nullable, Broken Closure, Firsts): Adjust.
10417 2002-05-06 Akim Demaille <akim@epita.fr>
10419 * src/muscle_tab.c (muscle_m4_output): Must return TRUE for
10422 2002-05-06 Akim Demaille <akim@epita.fr>
10424 * src/LR0.c (new_state, get_state): Instead of using the global
10425 `kernel_size' and `kernel_base', have two new arguments:
10426 `core_size' and `core'.
10429 2002-05-06 Akim Demaille <akim@epita.fr>
10431 * src/reader.c (packgram): No longer end `ritem' with a 0
10432 sentinel: it is not used.
10434 2002-05-05 Akim Demaille <akim@epita.fr>
10436 New experimental feature: display the lookaheads in the report and
10439 * src/print (print_core): When --trace-flag, display the rules
10441 * src/print_graph.c (print_core): Likewise.
10442 Swap the arguments.
10445 2002-05-05 Akim Demaille <akim@epita.fr>
10447 * tests/torture.at (Many lookaheads): New test.
10449 2002-05-05 Akim Demaille <akim@epita.fr>
10451 * src/output.c (GENERATE_OUTPUT_TABLE): Replace with...
10452 (GENERATE_MUSCLE_INSERT_TABLE): this.
10453 (output_int_table, output_unsigned_int_table, output_short_table)
10454 (output_token_number_table, output_item_number_table): Replace with...
10455 (muscle_insert_int_table, muscle_insert_unsigned_int_table)
10456 (muscle_insert_short_table, muscle_insert_token_number_table)
10457 (muscle_insert_item_number_table): these.
10458 Adjust all callers.
10459 (prepare_tokens): Don't free `translations', since...
10460 * src/reader.h, src/reader.c (grammar_free): do it.
10462 * src/gram.h, src/gram.c (grammar_free): here.
10463 * data/bison.simple, data/bison.c++: b4_token_number_max is now
10466 2002-05-05 Akim Demaille <akim@epita.fr>
10468 * src/output.c (output_unsigned_int_table): New.
10469 (prepare_rules): `i' is unsigned.
10470 `prhs', `rline', `r2' are unsigned int.
10471 Rename muscle `rhs_number_max' as `rhs_max'.
10472 Output muscles `prhs_max', `rline_max', and `r2_max'.
10474 * data/bison.simple, data/bison.c++: Adjust to use these muscles
10475 to compute types instead of constant types.
10476 * tests/regression.at (Web2c Actions): Adjust.
10478 2002-05-04 Akim Demaille <akim@epita.fr>
10480 * src/symtab.h (SALIAS, SUNDEF): Rename as...
10481 (USER_NUMBER_ALIAS, USER_NUMBER_UNDEFINED): these.
10482 Adjust dependencies.
10483 * src/output.c (token_definitions_output): Be sure not to output a
10484 `#define 'a'' when fed with `%token 'a' "a"'.
10485 * tests/regression.at (Token definitions): New.
10487 2002-05-03 Paul Eggert <eggert@twinsun.com>
10489 * data/bison.simple (b4_token_defines): Also define YYTOKENTYPE
10492 2002-05-03 gettextize <bug-gnu-gettext@gnu.org>
10494 * Makefile.am (SUBDIRS): Remove intl.
10495 (EXTRA_DIST): Add config/config.rpath.
10497 2002-05-03 Akim Demaille <akim@epita.fr>
10499 * data/bison.simple (m4_if): Don't output empty enums.
10500 And actually, output valid enum definitions :(.
10502 2002-05-03 Akim Demaille <akim@epita.fr>
10504 * configure.bat: Remove, completely obsolete.
10505 * Makefile.am (EXTRA_DIST): Adjust.
10506 Don't distribute config.rpath...
10507 * config/Makefile.am (EXTRA_DIST): Do it.
10509 2002-05-03 Akim Demaille <akim@epita.fr>
10511 * configure.in (GETTEXT_VERSION): New.
10512 Suggested by Bruno Haible for the forthcoming Gettext 0.10.3.
10514 2002-05-03 Akim Demaille <akim@epita.fr>
10516 * data/bison.simple (b4_token_enum): New.
10517 (b4_token_defines): Use it to output tokens both as #define and
10519 Suggested by Paul Eggert.
10520 * src/output.c (token_definitions_output): Don't output spurious
10523 2002-05-03 Akim Demaille <akim@epita.fr>
10525 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
10527 2002-05-02 Robert Anisko <robert@lrde.epita.fr>
10529 * data/bison.c++: Adapt expansion of $s and @s to the C++ parser.
10530 Update the stack class, give a try to deque as the default container.
10532 2002-05-02 Akim Demaille <akim@epita.fr>
10534 * data/bison.simple (yyparse): Do not implement @$ = @1.
10535 (YYLLOC_DEFAULT): Adjust to do it.
10536 * doc/bison.texinfo (Location Default Action): Fix.
10538 2002-05-02 Akim Demaille <akim@epita.fr>
10540 * src/reader.c (parse_braces): Merge into...
10541 (parse_action): this.
10543 2002-05-02 Akim Demaille <akim@epita.fr>
10545 * configure.in (ALL_LINGUAS): Remove.
10546 * po/LINGUAS, hr.po: New.
10548 2002-05-02 Akim Demaille <akim@epita.fr>
10550 Remove the so called hairy (semantic) parsers.
10552 * src/system.h (EXT_GUARD_C, EXT_STYPE_H): Remove.
10553 * src/gram.h, src/gram.c (semantic_parser): Remove.
10554 (rule_t): Remove the guard and guard_line members.
10555 * src/lex.h (token_t): remove tok_guard.
10556 * src/options.c (option_table): Remove %guard and %semantic_parser
10558 * src/output.c, src/output.h (guards_output): Remove.
10560 (token_definitions_output): Don't output the `T'
10562 (output_skeleton): Don't output the guards.
10563 * src/files.c, src/files.c (attrsfile): Remove.
10564 * src/reader.c (symbol_list): Remove the guard and guard_line
10566 Adjust dependencies.
10567 (parse_guard): Remove.
10568 * data/bison.hairy: Remove.
10569 * doc/bison.texinfo (Environment Variables): Remove occurrences of
10572 2002-05-02 Akim Demaille <akim@epita.fr>
10574 * src/reader.c (copy_at, copy_dollarm parse_braces, parse_action)
10575 (parse_guard): Rename the formal argument `stack_offset' as
10576 `rule_length', which is more readable.
10578 (copy_at, copy_dollar): Instead of outputting the hard coded
10579 values of $$, $n and so forth, output invocation to b4_lhs_value,
10580 b4_lhs_location, b4_rhs_value, and b4_rhs_location.
10581 Note: this patch partially drops `semantic-parser' support: it
10582 always does `rule_length - n', where semantic parsers ought to
10584 * data/bison.simple, data/bison.c++ (b4_lhs_value)
10585 (b4_lhs_location, b4_rhs_value, and b4_rhs_location: New.
10587 2002-05-02 Akim Demaille <akim@epita.fr>
10589 * configure.in (AC_INIT): Bump to 1.49b.
10590 (AM_INIT_AUTOMAKE): Short invocation.
10592 2002-05-02 Akim Demaille <akim@epita.fr>
10596 2002-05-01 Akim Demaille <akim@epita.fr>
10598 * src/skeleton.h: Remove.
10600 2002-05-01 Akim Demaille <akim@epita.fr>
10602 * src/skeleton.h: Fix the #endif.
10603 Reported by Magnus Fromreide.
10605 2002-04-26 Paul Eggert <eggert@twinsun.com>
10607 * data/bison.simple (YYSTYPE_IS_TRIVIAL, YYLTYPE_IS_TRIVIAL):
10608 Define if we define YYSTYPE and YYLTYPE, respectively.
10609 (YYCOPY): Fix [] quoting problem in the non-GCC case.
10611 2002-04-25 Robert Anisko <robert@lrde.epita.fr>
10613 * src/scan-skel.l: Postprocess quadrigraphs.
10615 * src/reader.c (copy_character): New function, used to output
10616 single characters while replacing `[' and `]' with quadrigraphs, to
10617 avoid troubles with M4 quotes.
10618 (copy_comment): Output characters with copy_character.
10619 (read_additionnal_code): Likewise.
10620 (copy_string2): Likewise.
10621 (copy_definition): Likewise.
10623 * tests/calc.at: Exercise M4 quoting.
10625 2002-04-25 Akim Demaille <akim@epita.fr>
10627 * tests/sets.at (AT_EXTRACT_SETS): Sed portability issue: no space
10628 between `!' and the command.
10629 Reported by Paul Eggert.
10631 2002-04-24 Robert Anisko <robert@lrde.epita.fr>
10633 * tests/calc.at: Exercise prologue splitting.
10635 * data/bison.simple, data/bison.c++: Use `b4_pre_prologue' and
10636 `b4_post_prologue' instead of `b4_prologue'.
10638 * src/output.c (prepare): Add the `pre_prologue' and `post_prologue'
10640 (output): Free pre_prologue_obstack and post_prologue_obstack.
10641 * src/files.h, src/files.c (attrs_obstack): Remove.
10642 (pre_prologue_obstack, post_prologue_obstack): New.
10643 * src/reader.c (copy_definition): Add a parameter to specify the
10644 obstack to fill, instead of using attrs_obstack unconditionally.
10645 (read_declarations): Pass pre_prologue_obstack to copy_definition if
10646 `%union' has not yet been seen, pass post_prologue_obstack otherwise.
10648 2002-04-23 Paul Eggert <eggert@twinsun.com>
10650 * data/bison.simple: Remove unnecessary commentary and white
10651 space differences from 1_29-branch.
10652 Depend on YYERROR_VERBOSE, not defined (YYERROR_VERBOSE).
10654 (union yyalloc, YYSTACK_GAP_MAX, YYSTACK_BYTES, YYCOPY,
10655 YYSTACK_RELOCATE): Do not define if yyoverflow is defined, or
10656 if this is a C++ parser and YYSTYPE or YYLTYPE has nontrivial
10657 constructors or destructors.
10659 (yyparse) [! defined YYSTACK_RELOCATE]: Do not relocate the stack.
10661 2002-04-23 Akim Demaille <akim@epita.fr>
10663 * tests/sets.at (AT_EXTRACT_SETS): Don't use 8 char long sed labels.
10664 * tests/synclines.at (AT_TEST_SYNCLINE): Be robust to GCC's
10665 location with columns.
10666 * tests/conflicts.at (%nonassoc and eof): Don't use `error.h'.
10667 All reported by Paul Eggert.
10669 2002-04-22 Akim Demaille <akim@epita.fr>
10671 * src/reduce.c (dump_grammar): Move to...
10672 * src/gram.h, src/gram.c (grammar_dump): here.
10673 Be sure to separate long item numbers.
10674 Don't read the members of a rule's prec if its nil.
10676 2002-04-22 Akim Demaille <akim@epita.fr>
10678 * src/output.c (table_size, table_grow): New.
10679 (MAXTABLE): Remove, replace uses with table_size.
10680 (pack_vector): Instead of dying when the table is too big, grow it.
10682 2002-04-22 Akim Demaille <akim@epita.fr>
10684 * data/bison.simple (yyr1): Its type is that of a token number.
10685 * data/bison.c++ (r1_): Likewise.
10686 * tests/regression.at (Web2c Actions): Adjust.
10688 2002-04-22 Akim Demaille <akim@epita.fr>
10690 * src/reader.c (token_translations_init): 256 is now the default
10691 value for the error token, i.e., it will be assigned another
10692 number if the user assigned 256 to one of her tokens.
10693 (reader): Don't force 256 to error.
10694 * doc/bison.texinfo (Symbols): Adjust.
10695 * tests/torture.at (AT_DATA_HORIZONTAL_GRAMMAR)
10696 (AT_DATA_TRIANGULAR_GRAMMAR): Number the tokens as 1, 2, 3
10697 etc. instead of 10, 20, 30 (which was used to `jump' over error
10698 (256) and undefined (2)).
10700 2002-04-22 Akim Demaille <akim@epita.fr>
10702 Propagate more token_number_t.
10704 * src/gram.h (token_number_as_item_number)
10705 (item_number_as_token_number): New.
10706 * src/output.c (GENERATE_OUTPUT_TABLE): New.
10707 Use it to create output_item_number_table and
10708 output_token_number_table.
10709 * src/LR0.c, src/derives.c, src/gram.c, src/gram.h, src/lalr.c,
10710 * src/lex.c, src/nullable.c, src/output.c, src/print.c,
10711 * src/print_graph.c, src/reader.c, src/reduce.c, src/state.h,
10712 * src/symtab.c, src/symtab.h: Use token_number_t instead of shorts.
10714 2002-04-22 Akim Demaille <akim@epita.fr>
10716 * src/output.h, src/output.c (get_lines_number): Remove.
10718 2002-04-19 Akim Demaille <akim@epita.fr>
10720 * doc/bison.texinfo (Actions): Make clear that `|' is not the same
10722 (Debugging): More details about enabling the debugging features.
10723 (Table of Symbols): Describe $$, $n, @$, and @n.
10724 Suggested by Tim Josling.
10726 2002-04-19 Akim Demaille <akim@epita.fr>
10728 * doc/bison.texinfo: Remove the uses of the obsolete @refill.
10730 2002-04-10 Akim Demaille <akim@epita.fr>
10732 * src/system.h: Rely on HAVE_LIMITS_H.
10733 Suggested by Paul Eggert.
10735 2002-04-09 Akim Demaille <akim@epita.fr>
10737 * tests/calc.at (_AT_CHECK_CALC_ERROR): Receive as argument the
10738 full stderr, and strip it according to the bison options, instead
10739 of composing the error message from different bits.
10740 This makes it easier to check for several error messages.
10741 Adjust all the invocations.
10742 Add an invocation exercising the error token.
10743 Add an invocation demonstrating a stupid error message.
10744 (_AT_DATA_CALC_Y): Follow the GCS: initial column is 1, not 0.
10746 Error message are for stderr, not stdout.
10748 2002-04-09 Akim Demaille <akim@epita.fr>
10750 * src/gram.h, src/gram.c (error_token_number): Remove, use
10752 * src/reader.c (reader): Don't specify the user token number (2)
10753 for $undefined, as it uselessly prevents using it.
10754 * src/gram.h (token_number_t): Move to...
10755 * src/symtab.h: here.
10756 (state_t.number): Is a token_number_t.
10757 * src/print.c, src/reader.c: Use undeftoken->number instead of
10759 (Even though this 2 is not the same as above: the number of the
10760 undeftoken remains being 2, it is its user token number which
10762 * src/output.c (prepare_tokens): Rename the `maxtok' muscle with
10763 `user_token_number_max'.
10764 Output `undef_token_number'.
10765 * data/bison.simple, data/bison.c++: Use them.
10766 Be sure to map invalid yylex return values to
10767 `undef_token_number'. This saves us from gratuitous SEGV.
10769 * tests/conflicts.at (Solved SR Conflicts)
10770 (Unresolved SR Conflicts): Adjust.
10771 * tests/regression.at (Web2c Actions): Adjust.
10773 2002-04-08 Akim Demaille <akim@epita.fr>
10775 * data/bison.c++: s/b4_item_number_max/b4_rhs_number_max/.
10777 Remove the duplicate `typedefs'.
10778 (RhsNumberType): Fix the declaration and various other typos.
10780 * data/bison.simple: Use __ofile__.
10781 * src/scan-skel.l: Handle __ofile__.
10783 2002-04-08 Akim Demaille <akim@epita.fr>
10785 * src/gram.h (item_number_t): New, the type of item numbers in
10786 RITEM. Note that it must be able to code symbol numbers as
10787 positive number, and the negation of rule numbers as negative
10789 Adjust all dependencies (pretty many).
10790 * src/reduce.c (rule): Remove this `short *' pointer: use
10792 * src/system.h (MINSHORT, MAXSHORT): Remove.
10793 Include `limits.h'.
10794 Adjust dependencies to using SHRT_MAX and SHRT_MIN.
10795 (shortcpy): Remove.
10796 (MAXTABLE): Move to...
10797 * src/output.c (MAXTABLE): here.
10798 (prepare_rules): Use output_int_table to output rhs.
10799 * data/bison.simple, data/bison.c++: Adjust.
10800 * tests/torture.at (Big triangle): Move the limit from 254 to
10802 * tests/regression.at (Web2c Actions): Ajust.
10804 Trying with bigger grammars shows various phenomena: at 3000 (28Mb
10805 of grammar file) bison is killed by my system, at 2000 (12Mb) bison
10806 passes, but produces negative #line number, once fixed, GCC is
10807 killed while compiling 14Mb, at 1500 (6.7 Mb of grammar, 8.2Mb of
10809 * src/state.h (state_h): Code input lines on ints, not shorts.
10811 2002-04-08 Akim Demaille <akim@epita.fr>
10813 * src/reduce.c (reduce_grammar): First reduce the nonterminals,
10814 and then the grammar.
10816 2002-04-08 Akim Demaille <akim@epita.fr>
10818 * src/system.h: No longer using strndup.
10820 2002-04-07 Akim Demaille <akim@epita.fr>
10822 * src/muscle_tab.h (MUSCLE_INSERT_LONG_INT): New.
10823 * src/output.c (output_table_data): Return the longest number.
10824 (prepare_tokens): Output `token_number_max').
10825 * data/bison.simple, data/bison.c++ (b4_sint_type, b4_uint_type):
10827 Use them to define yy_token_number_type/TokenNumberType.
10828 Use this type for yytranslate.
10829 * tests/torture.at (Big triangle): Push the limit from 124 to
10831 * tests/regression.at (Web2c Actions): Adjust.
10833 2002-04-07 Akim Demaille <akim@epita.fr>
10835 * tests/torture.at (Big triangle): New.
10836 (GNU AWK Grammar, GNU Cim Grammar): Move to...
10837 * tests/existing.at: here.
10839 2002-04-07 Akim Demaille <akim@epita.fr>
10841 * src/gram.h, src/gram.c (nitems): Remove, it is an alias of
10843 Adjust dependencies.
10845 2002-04-07 Akim Demaille <akim@epita.fr>
10847 * src/reader.c: Normalize increments to prefix form.
10849 2002-04-07 Akim Demaille <akim@epita.fr>
10851 * src/reader.c, symtab.c: Remove debugging code.
10853 2002-04-07 Akim Demaille <akim@epita.fr>
10855 Rename all the `bucket's as `symbol_t'.
10857 * src/gram.c, src/gram.h, src/lex.c, src/lex.h, src/output.c,
10858 * src/reader.c, src/reader.h, src/reduce.c, src/state.h,
10859 * src/symtab.c, src/symtab.h (bucket): Rename as...
10861 (symbol_list_new, bucket_check_defined, bucket_make_alias)
10862 (bucket_check_alias_consistence, bucket_pack, bucket_translation)
10863 (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
10864 (buckets_new, buckets_free, buckets_do): Rename as...
10865 (symbol_list_new, symbol_check_defined, symbol_make_alias)
10866 (symbol_check_alias_consistence, symbol_pack, symbol_translation)
10867 (symbol_new, symbol_free, hash_compare_symbol_t, hash_symbol_t)
10868 (symbols_new, symbols_free, symbols_do): these.
10870 2002-04-07 Akim Demaille <akim@epita.fr>
10872 Use lib/hash for the symbol table.
10874 * src/gram.c (ntokens): Initialize to 1, to reserve a slot for
10876 * src/lex.c (lex): Set the `number' member of new terminals.
10877 * src/reader.c (bucket_check_defined, bucket_make_alias)
10878 (bucket_check_alias_consistence, bucket_translation): New.
10879 (reader, grammar_free, readgram, token_translations_init)
10880 (packsymbols): Adjust.
10881 (reader): Number the predefined tokens.
10882 * src/reduce.c (inaccessable_symbols): Just use hard coded numbers
10883 for predefined tokens.
10884 * src/symtab.h (bucket): Remove all the hash table related
10886 * src/symtab.c (symtab): Replace by...
10887 (bucket_table): this.
10888 (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
10889 (buckets_new, buckets_do): New.
10891 2002-04-07 Akim Demaille <akim@epita.fr>
10893 * src/gram.c (nitems, nrules, nsyms, ntokens, nvars, nritems)
10894 (start_symbol, max_user_token_number, semantic_parser)
10895 (error_token_number): Initialize.
10896 * src/reader.c (grammar, start_flag, startval, typed, lastprec):
10899 (errtoken, eoftoken, undeftoken, axiom): Extern.
10901 2002-04-07 Akim Demaille <akim@epita.fr>
10903 * src/gram.h (rule_s): prec and precsym are now pointers
10904 to the bucket giving the priority/associativity.
10905 Member `associativity' removed: useless.
10906 * src/reduce.c, src/conflicts.c: Adjust.
10908 2002-04-07 Akim Demaille <akim@epita.fr>
10910 * src/lalr.c, src/LR0.c, src/closure.c, src/gram.c, src/reduce.c:
10911 Properly escape the symbols' TAG when outputting them.
10913 2002-04-07 Akim Demaille <akim@epita.fr>
10915 * src/lalr.h (LA): Is a bitsetv, not bitset*.
10917 2002-04-07 Akim Demaille <akim@epita.fr>
10919 * src/lalr.h, src/lalr.c (LAruleno): Replace with...
10920 (LArule): this, which is an array to rule_t*.
10921 * src/print.c, src/conflicts.c: Adjust.
10923 2002-04-07 Akim Demaille <akim@epita.fr>
10925 * src/gram.h (rule_t): Rename `number' as `user_number'.
10926 `number' is a new member.
10927 Adjust dependencies.
10928 * src/reduce.c (reduce_grammar_tables): Renumber rule_t.number.
10930 2002-04-07 Akim Demaille <akim@epita.fr>
10932 As a result of the previous patch, it is no longer needed
10933 to reorder ritem itself.
10935 * src/reduce.c (reduce_grammar_tables): Don't sort RITEM.
10937 2002-04-07 Akim Demaille <akim@epita.fr>
10939 Be sure never to walk through RITEMS, but use only data related to
10940 the rules themselves. RITEMS should be banished.
10942 * src/output.c (output_token_translations): Rename as...
10943 (prepare_tokens): this.
10944 In addition to `translate', prepare the muscles `tname' and
10945 `toknum', which were handled by...
10946 (output_rule_data): this.
10947 Remove, and move the remainder of its outputs into...
10948 (prepare_rules): this new routines, which also merges content from
10949 (output_gram): this.
10950 (prepare_rules): Be sure never to walk through RITEMS.
10951 (output_stos): Rename as...
10952 (prepare_stos): this.
10953 (output): Always invoke prepare_states, after all, just don't use it
10954 in the output if you don't need it.
10956 2002-04-07 Akim Demaille <akim@epita.fr>
10958 * src/LR0.c (new_state): Display `nstates' as the name of the
10959 newly created state.
10960 Adjust to initialize first_state and last_state if needed.
10961 Be sure to distinguish the initial from the final state.
10962 (new_states): Create the itemset of the initial state, and use
10964 * src/closure.c (closure): Now that the initial state has its
10965 items properly set, there is no need for a special case when
10966 creating `ruleset'.
10968 As a result, now the rule 0, reducing to $axiom, is visible in the
10969 outputs. Adjust the test suite.
10971 * tests/conflicts.at (Solved SR Conflicts)
10972 (Unresolved SR Conflicts): Adjust.
10973 * tests/regression.at (Web2c Report, Rule Line Numbers): Idem.
10974 * tests/conflicts.at (S/R in initial): New.
10976 2002-04-07 Akim Demaille <akim@epita.fr>
10978 * src/LR0.c (allocate_itemsets): Don't loop over ritem: loop over
10979 the RHS of the rules.
10980 * src/output.c (output_gram): Likewise.
10982 2002-04-07 Akim Demaille <akim@epita.fr>
10984 * src/gram.h (rule_t): `lhs' is now a pointer to the symbol's
10986 Adjust all dependencies.
10987 * src/reduce.c (nonterminals_reduce): Don't forget to renumber the
10988 `number' of the buckets too.
10989 * src/gram.h: Include `symtab.h'.
10990 (associativity): Move to...
10991 * src/symtab.h: here.
10992 No longer include `gram.h'.
10994 2002-04-07 Akim Demaille <akim@epita.fr>
10996 * src/gram.h, src/gram.c (rules_rhs_length): New.
10997 (ritem_longest_rhs): Use it.
10998 * src/gram.h (rule_t): `number' is a new member.
10999 * src/reader.c (packgram): Set it.
11000 * src/reduce.c (reduce_grammar_tables): Move the useless rules at
11001 the end of `rules', and count them out of `nrules'.
11002 (reduce_output, dump_grammar): Adjust.
11003 * src/print.c (print_grammar): It is no longer needed to check for
11004 the usefulness of a rule, as useless rules are beyond `nrules + 1'.
11005 * tests/reduce.at (Reduced Automaton): New test.
11007 2002-04-07 Akim Demaille <akim@epita.fr>
11009 * src/reduce.c (inaccessable_symbols): Fix a buglet: because of a
11010 lacking `+ 1' to nrules, Bison reported as useless a token if it
11011 was used solely to set the precedence of the last rule...
11013 2002-04-07 Akim Demaille <akim@epita.fr>
11015 * data/bison.c++, data/bison.simple: Don't output the current file
11016 name in #line, to avoid useless diffs between two identical
11017 outputs under different names.
11019 2002-04-07 Akim Demaille <akim@epita.fr>
11021 * src/closure.c, src/print.c, src/reader.c, src/reduce.c:
11022 Normalize loops to using `< nrules + 1', not `<= nrules'.
11024 2002-04-07 Akim Demaille <akim@epita.fr>
11028 2002-04-07 Akim Demaille <akim@epita.fr>
11030 * src/output.c, src/reader.c, src/symtab.c, src/symtab.h: Rename
11031 bucket.value as bucket.number.
11033 2002-04-07 Akim Demaille <akim@epita.fr>
11035 * src/closure.c, src/derives.c, src/gram.h, src/lalr.c,
11036 * src/nullable.c, src/output.c, src/print.c, src/print_graph.c,
11037 * src/reader.c, src/reduce.c: Let rule_t.rhs point directly to the
11038 RHS, instead of being an index in RITEMS.
11040 2002-04-04 Paul Eggert <eggert@twinsun.com>
11042 * doc/bison.texinfo: Update copyright date.
11043 (Rpcalc Lexer, Symbols, Token Decl): Don't assume ASCII.
11044 (Symbols): Warn about running Bison in one character set,
11045 but compiling and/or running in an incompatible one.
11046 Warn about character code 256, too.
11048 2002-04-03 Paul Eggert <eggert@twinsun.com>
11050 * src/bison.data (YYSTACK_ALLOC): Depend on whether
11051 YYERROR_VERBOSE is nonzero, not whether it is defined.
11053 Merge changes from bison-1_29-branch.
11055 2002-03-20 Paul Eggert <eggert@twinsun.com>
11057 Merge fixes from Debian bison_1.34-1.diff.
11059 * configure.in (AC_PREREQ): 2.53.
11061 2002-03-20 Akim Demaille <akim@epita.fr>
11063 * src/conflicts.c (log_resolution): Argument `resolution' is const.
11065 2002-03-19 Paul Eggert <eggert@twinsun.com>
11067 * src/bison.simple (YYCOPY): New macro.
11068 (YYSTACK_RELOCATE): Use it.
11069 Remove Type arg; no longer needed. All callers changed.
11070 (yymemcpy): Remove; no longer needed.
11072 * Makefile.am (AUTOMAKE_OPTIONS): 1.6.
11073 * doc/Makefile.am (AUTOMAKE_OPTIONS): Remove.
11075 2002-03-19 Akim Demaille <akim@epita.fr>
11077 Test and fix the #line outputs.
11079 * tests/atlocal.at (GCC): New.
11080 * tests/synclines.at (AT_TEST_SYNCLINE): New macro.
11081 (Prologue synch line, %union synch line, Postprologue synch line)
11082 (Action synch line, Epilogue synch line): New tests.
11083 * src/reader.c (parse_union_decl): Define the muscle stype_line.
11084 * data/bison.simple, data/bison.c++: Use it.
11086 2002-03-19 Akim Demaille <akim@epita.fr>
11088 * tests/regression.at (%nonassoc and eof, Unresolved SR Conflicts)
11089 (Solved SR Conflicts, %expect not enough, %expect right)
11090 (%expect too much): Move to...
11091 * tests/conflicts.at: this new file.
11093 2002-03-19 Akim Demaille <akim@epita.fr>
11095 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
11096 * data/bison.simple, data/bison.c++: Handle the `#define' part, so
11097 that we can move to enums for instance.
11098 * src/output.c (token_definitions_output): Output a list of
11099 `token-name, token-number' instead of the #define.
11100 (output_skeleton): Name this list `b4_tokens', not `b4_tokendefs'.
11102 2002-03-14 Akim Demaille <akim@epita.fr>
11104 Use Gettext 0.11.1.
11106 2002-03-09 Robert Anisko <robert@lrde.epita.fr>
11108 * data/bison.c++: Make the user able to add members to the generated
11109 parser by subclassing.
11111 2002-03-05 Robert Anisko <robert@lrde.epita.fr>
11113 * src/reader.c (read_additionnal_code): `c' should be an integer, not
11115 Reported by Nicolas Tisserand and Nicolas Burrus.
11117 2002-03-04 Robert Anisko <robert@lrde.epita.fr>
11119 * src/reader.c: Warn about lacking semi-colons, do not complain.
11121 2002-03-04 Robert Anisko <robert@lrde.epita.fr>
11123 * data/bison.c++: Remove a debug line.
11125 2002-03-04 Robert Anisko <robert@lrde.epita.fr>
11127 * data/bison.c++: Unmerge value as yylval and value as yyval. Unmerge
11128 location as yylloc and location as yyloc. Use YYLLOC_DEFAULT, and
11129 provide a default implementation.
11131 2002-03-04 Akim Demaille <akim@epita.fr>
11133 * tests/input.at (Invalid $n, Invalid @n): Add the ending `;'.
11134 * tests/output.at (AT_CHECK_OUTPUT): Likewise.
11135 * tests/headers.at (AT_TEST_CPP_GUARD_H): Ditto.
11136 * tests/semantic.at (Parsing Guards): Similarly.
11137 * src/reader.at (readgram): Complain if the last rule is not ended
11140 2002-03-04 Akim Demaille <akim@epita.fr>
11142 * src/warshall.h, src/warshall.c (bitmatrix_print): Move to...
11143 * src/closure.c: here.
11144 (set_firsts): Use bitsetv_reflexive_transitive_closure instead of
11146 * src/warshall.h, src/warshall.c: Remove.
11147 * tests/sets.at (Broken Closure): Adjust.
11149 2002-03-04 Akim Demaille <akim@epita.fr>
11151 * src/output.c (output_skeleton): tempdir is const.
11152 bytes_read is unused.
11154 2002-03-04 Akim Demaille <akim@epita.fr>
11156 * lib/bbitset.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
11157 * lib/bitsetv.h, lib/ebitset.c, lib/lbitset.c, lib/sbitset.c:
11159 From Michael Hayes.
11161 2002-03-04 Akim Demaille <akim@epita.fr>
11163 * src/closure.c (closure): `r' is unused.
11165 2002-03-04 Akim Demaille <akim@epita.fr>
11167 * tests/sets.at (Broken Closure): Add the ending `;'.
11168 * src/reader.at (readgram): Complain if a rule is not ended with a
11171 2002-03-04 Akim Demaille <akim@epita.fr>
11173 * src/conflicts.c (set_conflicts): Use bitset_disjoint_p.
11174 (count_sr_conflicts): Use bitset_count.
11175 * src/reduce.c (inaccessable_symbols): Ditto.
11176 (bits_size): Remove.
11177 * src/warshall.h, src/warshall.c: Convert to bitsetv.
11179 2002-03-04 Akim Demaille <akim@epita.fr>
11181 * src/closure.c, src/conflicts.c, src/lalr.c, src/print.c,
11182 * src/reduce.c: Remove the `bitset_zero's following the
11183 `bitset_create's, as now it is performed by the latter.
11185 2002-03-04 Akim Demaille <akim@epita.fr>
11187 * lib/bitset.c, lib/bitset.h, lib/bitsetv.c, lib/bitsetv.h,
11188 * lib/ebitset.c, lib/ebitset.h, lib/lbitset.c, lib/lbitset.h,
11189 * lib/sbitset.c, lib/sbitset.h, lib/bbitset.h: Update from the
11190 latest sources from Michael.
11192 2002-03-04 Akim Demaille <akim@epita.fr>
11194 * src/output.c (output): Don't free the grammar.
11195 * src/reader.c (grammar_free): New.
11196 * src/main.c (main): Call it and don't free symtab here.
11198 2002-03-04 Akim Demaille <akim@epita.fr>
11200 * src/lex.c (parse_percent_token): Be sure to 0-end token_buffer
11202 Reported by Benoit Perrot.
11204 2002-03-04 Akim Demaille <akim@epita.fr>
11206 Use bitset operations when possible, not loops over bits.
11208 * src/conflicts.c (set_conflicts, count_sr_conflicts): Use
11210 * src/print.c (print_reductions): Use bitset_and, bitset_andn.
11211 * src/reduce.c (useless_nonterminals): Formatting changes.
11212 * src/warshall.c (TC): Use bitset_or.
11214 2002-03-04 Akim Demaille <akim@epita.fr>
11216 * src/lalr.h, src/lalr.c (tokensetsize): Remove, unused.
11217 * src/system.h (BITS_PER_WORD, WORDSIZE, SETBIT, RESETBIT, BITISSET):
11220 2002-03-04 Akim Demaille <akim@epita.fr>
11222 * src/lalr.c (F): Now a bitset*.
11223 Adjust all dependencies.
11225 2002-03-04 Akim Demaille <akim@epita.fr>
11227 * src/conflicts.c (shiftset, lookaheadset): Now bitset.
11228 Adjust all dependencies.
11230 2002-03-04 Akim Demaille <akim@epita.fr>
11232 * src/L0.c, src/LR0.h (nstates): Be size_t.
11233 Adjust comparisons (signed vs unsigned).
11234 * src/conflics.c, src/lalr.c, src/lalr.h, src/output.c (LA): Now a
11236 Adjust all dependencies.
11238 2002-03-04 Akim Demaille <akim@epita.fr>
11240 * src/closure.c (firsts): Now, also a bitset.
11241 Adjust all dependencies.
11242 (varsetsize): Remove, now unused.
11243 * src/warshall.h, src/warshall.c: Now work on arrays of bitsets.
11245 2002-03-04 Akim Demaille <akim@epita.fr>
11247 * src/print.c: Convert to use bitset.h, not hand coded iterations
11250 2002-03-04 Akim Demaille <akim@epita.fr>
11252 * src/reduce.c: Convert to use bitset.h, not hand coded BSet.
11254 2002-03-04 Akim Demaille <akim@epita.fr>
11256 * src/closure.c (ruleset): Be a bitset.
11257 (rulesetsize): Remove.
11259 2002-03-04 Akim Demaille <akim@epita.fr>
11261 * lib/bitset-int.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
11262 * lib/bitsetv.h, lib/ebitset.c, lib/ebitset.h, lib/lbitset.c,
11263 * lib/lbitset.h, lib/sbitset.c, lib/sbitset.h: New.
11264 * src/closure.c (fderives): Be an array of bitsets.
11266 2002-02-28 Robert Anisko <robert@lrde.epita.fr>
11268 * data/bison.c++: Merge the two generated headers. Insert a copyright
11269 notice in each output file.
11271 2002-02-28 Akim Demaille <akim@epita.fr>
11273 * data/bison.c++: Copy the prologue of bison.simple to fetch
11274 useful M4 definitions, such as b4_header_guard.
11276 2002-02-25 Akim Demaille <akim@epita.fr>
11278 * src/getargs.c (version): Give the name of the authors, and use a
11279 translator friendly scheme for the bgr
11282 2002-02-25 Akim Demaille <akim@epita.fr>
11284 * src/output.c (header_output): Remove, now handled completely via
11287 2002-02-25 Akim Demaille <akim@epita.fr>
11289 * m4/m4.m4: New, from CVS Autoconf.
11290 * configure.in: Invoke it.
11291 * src/output.c (output_skeleton): Use its result instead of the
11294 2002-02-25 Akim Demaille <akim@epita.fr>
11296 * lib/tempname.c, lib/mkstemp.c, m4/mkstemp.m4: New, stolen from
11298 * configure.in: Invoke UTILS_FUNC_MKSTEMP.
11299 * src/output.c (output_skeleton): Use mkstemp to create a real
11301 Move the filling of `skeleton' and its muscle to...
11303 (output): Move the definition of the prologue muscle to...
11305 * src/system.h (DEFAULT_TMPDIR): New.
11307 2002-02-14 Paul Eggert <eggert@twinsun.com>
11309 Remove the support for C++ namespace cleanliness; it was
11310 causing more problems than it was curing, since it didn't work
11311 properly on some nonstandard C++ compilers. This can wait
11312 for a proper C++ parser.
11314 * NEWS: Document this.
11315 * doc/bison.texinfo (Bison Parser, Debugging): Remove special mention
11316 of C++, as it's treated like C now.
11317 * src/bison.simple (YYSTD): Remove.
11318 (YYSIZE_T, YYFPRINTF, YYPARSE_PARAM_ARG, YYPARSE_PARAM_DECL):
11319 Treat C++ just like Standard C instead of trying to support
11320 namespace cleanliness.
11322 2002-02-14 Akim Demaille <akim@epita.fr>
11324 * tests/regression.at (else): Adjust to Andreas' change.
11326 2002-02-14 Akim Demaille <akim@epita.fr>
11328 * lib/Makefile.am (EXTRA_DIST): Ship strnlen.c.
11330 2002-02-13 Andreas Schwab <schwab@suse.de>
11332 * src/output.c (output_rule_data): Don't output NULL, it might
11333 not be defined yet.
11335 2002-02-11 Robert Anisko <robert@lrde.epita.fr>
11337 * data/bison.c++ (YYDEBUG, YYERROR_VERBOSE): After the prologue.
11338 (Copyright notice): Update.
11340 2002-02-11 Akim Demaille <akim@epita.fr>
11342 * tests/regression.at (%nonassoc and eof): Don't include
11343 nonportable headers.
11345 2002-02-08 Robert Anisko <robert@lrde.epita.fr>
11347 * data/bison.c++: Correct error recovery. Make the user able to
11348 initialize the starting location.
11350 2002-02-07 Akim Demaille <akim@epita.fr>
11352 * tests/input.at: New.
11354 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
11356 * data/bison.c++: Replace some direct m4 expansions by constants. Be
11357 more consistent when naming methods and variables. Put preprocessor
11358 directives around tables only needed for debugging.
11360 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
11362 * data/bison.c++ (yy::b4_name::print_): New method, replaces yyprint in
11364 (yy::b4_name::parse): Use print_.
11366 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
11368 * data/bison.c++ (yy::b4_name::parse): Error recovery is back.
11370 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
11372 * data/bison.c++ (yy::b4_name::error_): New method, replaces yyerror in
11374 (yy::b4_name::parse): Build verbose error messages, and use error_.
11376 2002-02-06 Robert Anisko <robert@lrde.epita.fr>
11378 * data/bison.c++: Fix m4 quoting in comments.
11380 2002-02-06 Robert Anisko <robert@lrde.epita.fr>
11382 * data/bison.c++: Adjust the parser code. Fix some muscles that were
11383 not expanded by m4.
11385 2002-02-05 Akim Demaille <akim@epita.fr>
11387 * data/bison.c++: Adjust to the M4 back end.
11388 More is certainly needed.
11390 2002-02-05 Akim Demaille <akim@epita.fr>
11392 Give a try to M4 as a back end.
11394 * lib/readpipe.c: New, from wdiff.
11395 * src/Makefile.am (DEFS): Define PKGDATADIR, not BISON_SIMPLE and
11397 * src/system.h (BISON_HAIRY, BISON_SIMPLE): Remove the DOS and VMS
11398 specific values. Now it is m4 that performs the lookup.
11399 * src/parse-skel.y: Remove.
11400 * src/muscle_tab.c, src/muscle_tab.h (muscles_m4_output): New.
11401 * src/output.c (actions_output, guards_output)
11402 (token_definitions_output): No longer keeps track of the output
11403 line number, hence remove the second argument.
11404 (guards_output): Check against the guard member of a rule, not the
11407 (output_skeleton): Don't look for the skeleton location, let m4 do
11409 Create `/tmp/muscles.m4'. This is temporary, a proper temporary
11411 Invoke `m4' on m4sugar.m4, muscles.m4, and the skeleton.
11412 (prepare): Given that for the time being changesyntax is not
11413 usable in M4, rename the muscles using `-' to `_'.
11414 Define `defines_flag', `output_parser_name' and `output_header_name'.
11415 * src/output.h (actions_output, guards_output)
11416 (token_definitions_output): Adjust prototypes.
11417 * src/scan-skel.l: Instead of scanning the skeletons, it now
11418 processes the output of m4: `__oline__' and `#output'.
11419 * data/bison.simple: Adjust to be used by M4(sugar).
11420 * tests/Makefile.am: Use check_SCRIPTS to make sure `bison' is up
11422 * tests/bison.in: Use the secrete envvar `BISON_PKGDATADIR'
11423 instead of the dead `BISON_SIMPLE' and `BISON_HAIRY'.
11424 * data/m4sugar/m4sugar.m4, data/m4sugar/version.m4: New,
11425 shamelessly stolen from CVS Autoconf.
11427 2002-02-05 Akim Demaille <akim@epita.fr>
11429 * lib/hash.c, lib/hash.h: Replace with Fileutils 4.1's version.
11430 * configure.in: Check for the declarations of free and malloc.
11431 * src/muscle_tab.c: Adjust.
11433 2002-02-05 Akim Demaille <akim@epita.fr>
11435 * src/muscle_tab.c (muscle_init): Don't default to NULL muscle
11436 which have no values.
11438 2002-02-05 Akim Demaille <akim@epita.fr>
11440 * src/bison.simple, src/bison.hairy, src/bison.c++: Move to...
11443 2002-01-29 Paul Eggert <eggert@twinsun.com>
11445 * src/bison.simple (YYSIZE_T): Do not define merely because
11446 YYSTACK_USE_ALLOCA is nonzero or alloca or _ALLOCA_H are defined.
11447 On some platforms, <alloca.h> does not declare YYSTD (size_t).
11449 2002-01-27 Akim Demaille <akim@epita.fr>
11451 Fix `%nonassoc and eof'.
11453 * src/state.c (errs_dup): Aaaah! The failure was due to bytes
11454 which were not properly copied! Replace
11455 memcpy (res->errs, src->errs, src->nerrs);
11457 memcpy (res->errs, src->errs, src->nerrs * sizeof (src->errs[0]));
11459 * tests/regression.at (%nonassoc and eof): Adjust to newest
11460 Autotest: `.' is not in the PATH.
11462 2002-01-27 Akim Demaille <akim@epita.fr>
11464 * tests/sets.at (AT_EXTRACT_SETS): New.
11465 (Nullable): Use it.
11468 2002-01-26 Akim Demaille <akim@epita.fr>
11470 * tests/actions.at, tests/calc.at, tests/headers.at,
11471 * tests/torture.at: Adjust to the newest Autotest which no longer
11472 forces `.' in the PATH.
11474 2002-01-25 Akim Demaille <akim@epita.fr>
11476 * tests/regression.at (%nonassoc and eof): New.
11477 Suggested by Robert Anisko.
11479 2002-01-24 Akim Demaille <akim@epita.fr>
11481 Bison dumps core when trying to complain about broken input files.
11482 Reported by Cris van Pelt.
11484 * src/lex.c (parse_percent_token): Be sure to set token_buffer.
11485 * tests/regression.at (Invalid input: 1, Invalid input: 2): Merge
11487 (Invalid inputs): Strengthen: exercise parse_percent_token.
11489 2002-01-24 Robert Anisko <robert.anisko@epita.fr>
11491 * src/Makefile.am: Add bison.c++.
11492 * src/bison.c++: New skeleton.
11494 2002-01-21 Paolo Bonzini <bonzini@gnu.org>
11498 2002-01-21 Kees Zeelenberg <kzlg@users.sourceforge.net>
11500 * src/files.c (skeleton_find) [MSDOS]: Fix cp definition.
11502 2002-01-20 Marc Autret <marc@gnu.org>
11504 * src/files.c (compute_output_file_names): Fix
11506 2002-01-20 Marc Autret <marc@gnu.org>
11508 * tests/output.at: New test.
11509 * src/files.c (compute_base_names): Don't map extensions when
11510 the YACC flag is set, use defaults.
11511 Reported by Evgeny Stambulchik.
11513 2002-01-20 Marc Autret <marc@gnu.org>
11515 * src/system.h: Need to define __attribute__ away for non-GCC
11516 compilers as well (i.e., the vendor C compiler).
11517 Suggested by Albert Chin-A-Young.
11519 2002-01-11 Tim Van Holder <tim.van.holder@pandora.be>
11521 * lib/hash.h, lib/hash.c: Renamed __P to PARAMS and used the
11522 canonical definition.
11523 * src/system.h: Use the canonical definition for PARAMS (avoids
11524 a conflict with the macro from lib/hash.h).
11526 2002-01-11 Akim Demaille <akim@epita.fr>
11528 * configure.in: Use AC_FUNC_STRNLEN.
11529 Fixes the failures observed on AIX 4.3 by H.Merijn Brand.
11531 2002-01-09 Akim Demaille <akim@epita.fr>
11533 * src/files.c, src/files.h (output_infix): New.
11534 (tab_extension): Remove.
11535 (compute_base_names): Compute the former, drop the latter.
11536 * src/output.c (prepare): Insert the muscles `output-infix', and
11538 * src/parse-skel.y (string, string.1): New.
11539 (section.header): Use it.
11540 (section.yacc): Remove.
11541 (prefix): Remove too.
11542 * src/scan-skel.l: Adjust.
11543 * src/bison.simple, src/bison.hairy: Adjust.
11545 2002-01-09 Akim Demaille <akim@epita.fr>
11547 * configure.in (WERROR_CFLAGS): Compute it.
11548 * src/Makefile.am (CFLAGS): Pass it.
11549 * tests/atlocal.in (CFLAGS): Idem.
11550 * src/files.c: Fix a few warnings.
11551 (get_extension_index): Remove, unused.
11553 2002-01-08 Akim Demaille <akim@epita.fr>
11555 * src/getargs.c (AS_FILE_NAME): New.
11556 (getargs): Use it to convert DOSish file names.
11557 * src/files.c (base_name): Rename as full_base_name to avoid
11558 clashes with `base_name ()'.
11559 (filename_split): New.
11560 (compute_base_names): N-th rewrite, using filename_split.
11562 2002-01-08 Akim Demaille <akim@epita.fr>
11564 * lib/basename.c, lib/dirname.h, lib/dirname.c, lib/memrchr.c:
11565 New, stolen from the Fileutils 4.1.
11566 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
11567 * configure.in: Check for the presence of memrchr, and of its
11570 2002-01-07 Tim Van Holder <tim.van.holder@pandora.be>
11572 * lib/hash.h (__P): Added definition for this macro.
11573 * src/Makefile.am: Add parse-skel.c and scan-skel.c to
11574 BUILT_SOURCES, to ensure they are generated first.
11575 * src/parse-skel.y: Use YYERROR_VERBOSE instead of
11576 %error-verbose to allow bootstrapping with bison 1.30x.
11578 2002-01-06 Akim Demaille <akim@epita.fr>
11580 * src/reader.c (parse_braces): Don't fetch the next char, the
11581 convention is to fetch on entry.
11582 * tests/torture.at (GNU Cim Grammar): Reintroduce their weird
11583 'switch' without a following semicolon.
11584 * tests/regression.at (braces parsing): New.
11586 2002-01-06 Akim Demaille <akim@epita.fr>
11588 Bison is dead wrong in its RR conflict reports.
11590 * tests/torture.at (GNU Cim Grammar): New.
11591 * src/conflicts.c (count_rr_conflicts): Fix.
11593 2002-01-06 Akim Demaille <akim@epita.fr>
11595 Creating package.m4 from configure.ac causes too many problems.
11597 * tests/Makefile.am (package.m4): Create it by hand,
11598 AC_CONFIG_TESTDIR no longer does in the most recent CVS Autoconf.
11600 2002-01-06 Akim Demaille <akim@epita.fr>
11602 * src/Makefile.am (bison_SOURCES): Add parse-skel.h and
11605 2002-01-04 Paul Eggert <eggert@twinsun.com>
11607 * doc/bison.texinfo (Debugging):
11608 Remove YYSTDERR; it's no longer defined or used.
11609 Also, s/cstdio.h/cstdio/.
11611 2002-01-03 Akim Demaille <akim@epita.fr>
11613 * tests/bison.in, tests/atlocal.in: Adjust to CVS Autoconf.
11615 2002-01-03 Akim Demaille <akim@epita.fr>
11617 * src/parse-skel.y (process_skeleton): Don't bind the parser's
11618 tracing code to --trace, wait for a better --trace option, with
11621 2002-01-03 Akim Demaille <akim@epita.fr>
11623 * src/bison.simple (YYSTDERR): Remove, replace `stderr'.
11624 The ISO C++ standard is extremely clear about it: stderr is
11625 considered a macro, not a regular symbol (see table 94 `Header
11626 <cstdio> synopsis', [lib.c.files] 27.8.2 C Library files).
11627 Therefore std:: does not apply to it. It still does with fprintf.
11628 Also, s/cstdio.h/cstdio/.
11630 2002-01-03 Akim Demaille <akim@epita.fr>
11632 * lib/quotearg.c: Use `#include "..."' instead of `#include <...>'
11633 for non system headers.
11635 2002-01-02 Akim Demaille <akim@epita.fr>
11637 Equip the skeleton chain with location tracking, runtime trace,
11638 pure parser and scanner.
11640 * src/parse-skel.y: Request a pure parser, locations, and prefix
11642 (%union): Having several members with the same type does not help
11643 type mismatches, simplify.
11644 (YYPRINT, yyprint): New.
11645 (yyerror): ``Rename'' (there is a #define yyerror skel_error) as...
11646 (skel_error): this.
11648 * src/scan-skel.l: Adjust to these changes.
11649 * src/skeleton.h (LOCATION_RESET, LOCATION_LINES, LOCATION_STEP)
11650 (LOCATION_PRINT, skel_control_t): New.
11652 2001-12-30 Akim Demaille <akim@epita.fr>
11654 * src/parse-skel.y: Get rid of the shift/reduce conflict:
11655 replace `gb' with BLANKS.
11656 * src/scan-skel.l: Adjust.
11658 2001-12-30 Akim Demaille <akim@epita.fr>
11660 * src/system.h: We don't need nor want bcopy.
11661 Throw away MS-DOS crap: we don't need getpid.
11662 * configure.in: We don't need strndup. It was even causing
11663 problems: because Flex includes the headers *before* us,
11664 _GNU_SOURCE is not defined by config.h, and therefore strndup was
11666 * lib/xstrndup.c: New.
11667 * src/scan-skel.l: Use it.
11668 Be sure to initialize yylval.muscle member when scanning a MUSCLE.
11669 * src/parse-skel.y: Use %directives instead of #defines.
11671 2001-12-30 Akim Demaille <akim@epita.fr>
11673 * src/skeleton.h: New.
11674 * src/output.c (output_parser, output_master_parser): Remove, dead
11676 * src/output.h (get_lines_number, actions_output, guards_output)
11677 (token_definitions_output): Prototype them.
11678 * src/parse-skel.y: Add the license notice.
11679 Include output.h and skeleton.h.
11680 (process_skeleton): Returns void, and takes a single parameter.
11681 * src/scan-skel.l: Add the license notice.
11682 Include skeleton.h.
11683 Don't use %option yylineno: it seems that then Flex imagines
11684 REJECT has been used, and therefore it won't reallocate its
11685 buffers (which makes no other sense to me than a bug). It results
11686 in warnings for `unused: yy_flex_realloc'.
11688 2001-12-30 Robert Anisko <robert.anisko@epita.fr>
11690 * src/muscle_tab.h (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
11691 (MUSCLE_INSERT_PREFIX): ...to there.
11692 * src/output.c (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
11693 (MUSCLE_INSERT_PREFIX): Move from here...
11695 * src/bison.hairy: Add a section directive. Put braces around muscle
11696 names. This parser skeleton is still broken, but Bison should not
11697 choke on a bad muscle 'syntax'.
11698 * src/bison.simple: Add a section directive. Put braces around muscle
11701 * src/files.h (strsuffix, stringappend): Add declarations.
11702 (tab_extension): Add declaration.
11703 (short_base_name): Add declaration.
11705 * src/files.c (strsuffix, stringappend): No longer static. These
11706 functions are used in the skeleton parser.
11707 (tab_extension): New.
11708 (compute_base_names): Use the computations done in this function
11709 to guess if the generated parsers should have '.tab' in their
11711 (short_base_name): No longer static.
11713 * src/output.c (output_skeleton): New.
11714 (output): Disable call to output_master_parser, and give a try to
11715 a new skeleton handling system.
11716 (guards_output, actions_output): No longer static.
11717 (token_definitions_output, get_lines_number): No longer static.
11719 * configure.in: Use AM_PROG_LEX and AC_PROG_YACC.
11721 * src/Makefile.am (bison_SOURCES): Add scan-skel.l and
11724 * src/parse-skel.y: New file.
11725 * src/scan-skel.l: New file.
11727 2001-12-29 Akim Demaille <akim@epita.fr>
11729 %name-prefix is broken.
11731 * src/files.c (spec_name_prefix): Initialize to NULL, not to "yy".
11732 Adjust all dependencies.
11733 * tests/headers.at (export YYLTYPE): Strengthen this test: use
11736 Renaming yylval but not yylloc is not consistent. Now we do.
11738 * src/bison.simple: Prefix yylloc if used.
11739 * doc/bison.texinfo (Decl Summary): Document that.
11741 2001-12-29 Akim Demaille <akim@epita.fr>
11743 * doc/bison.texinfo: Promote `%long-directive' over
11745 Remove all references to fixed-output-files, yacc is enough.
11747 2001-12-29 Akim Demaille <akim@epita.fr>
11749 * src/bison.simple: Define YYDEBUG and YYERROR_VERBOSE *after* the
11750 user prologue. These are defaults.
11751 * tests/actions.at (Mid-rule actions): Make sure the user can
11752 define YYDEBUG and YYERROR_VERBOSE.
11754 2001-12-29 Akim Demaille <akim@epita.fr>
11756 * src/output.c (header_output): Don't forget to export YYLTYPE and
11758 * tests/headers.at (export YYLTYPE): New, make sure it does.
11759 * tests/regression.at (%union and --defines, Invalid CPP headers):
11761 * tests/headers.at: here.
11763 2001-12-29 Akim Demaille <akim@epita.fr>
11765 * src/gram.h (rule_s): Member `assoc' is of type `associativity'.
11767 2001-12-29 Akim Demaille <akim@epita.fr>
11769 * tests/actions.at (Mid-rule actions): Output on a single line
11770 instead of several.
11772 2001-12-29 Akim Demaille <akim@epita.fr>
11774 * doc/bison.texinfo: Formatting changes.
11776 2001-12-29 Akim Demaille <akim@epita.fr>
11778 Don't store the token defs in a muscle, just be ready to output it
11779 on command. Now possible via `symbols'. Fixes a memory leak.
11781 * src/output.c (token_definitions_output): New.
11782 (output_parser, header_output): Use it.
11783 * src/reader.c (symbols_save): Remove.
11785 2001-12-29 Akim Demaille <akim@epita.fr>
11787 * src/bison.simple: Do not provide a default for YYSTYPE and
11788 YYLTYPE before the user's prologue. Otherwise it's hardly... a
11791 2001-12-29 Akim Demaille <akim@epita.fr>
11793 Mid-rule actions are simply... ignored!
11795 * src/reader.c (readgram): Be sure to attach mid-rule actions to
11796 the empty-rule associated to the dummy symbol, not to the host
11798 * tests/actions.at (Mid-rule actions): New.
11800 2001-12-29 Akim Demaille <akim@epita.fr>
11804 * src/reader.c (reader): Free grammar.
11806 2001-12-29 Akim Demaille <akim@epita.fr>
11810 * src/LR0.c (new_itemsets): Don't allocate `shift_symbol' here,
11811 since it allocates it for each state, although only one is needed.
11812 (allocate_storage): Do it here.
11814 2001-12-29 Akim Demaille <akim@epita.fr>
11816 * src/options.h, src/options.c (create_long_option_table): Rename
11818 (long_option_table_new): this, with a clearer prototype.
11819 (percent_table): Remove, unused,
11820 * src/getargs.c (getargs): Adjust.
11822 2001-12-29 Akim Demaille <akim@epita.fr>
11824 * src/LR0.c, src/conflicts.c, src/lalr.c, src/lalr.h, src/output.c
11825 * src/print.c, src/print_graph.c, src/state.h: Rename state_table
11828 2001-12-29 Akim Demaille <akim@epita.fr>
11830 * src/lalr.c (build_relations): Rename `states' as `states1'.
11831 Sorry, I don't understand exactly what it is, no better name...
11833 2001-12-29 Akim Demaille <akim@epita.fr>
11835 * src/closure.c, src/conflicts.c, src/derives.c, src/gram.c
11836 * src/gram.h, src/lalr.c, src/nullable.c, src/output.c, src/print.c
11837 * src/print_graph.c, src/reader.c, src/reduce.c: Rename rule_table
11840 2001-12-29 Akim Demaille <akim@epita.fr>
11842 * src/gram.c (rprec, rprecsym, rassoc): Remove, unused since long
11845 2001-12-29 Akim Demaille <akim@epita.fr>
11847 * src/reader.c, src/reader.h (user_toknums): Remove.
11848 Adjust all users to use symbols[i]->user_token_number.
11850 2001-12-29 Akim Demaille <akim@epita.fr>
11852 * src/gram.c, src/gram.h (sprec, sassoc): Remove.
11853 Adjust all users to use symbols[i]->prec or ->assoc.
11855 2001-12-29 Akim Demaille <akim@epita.fr>
11857 * src/reader.c, src/reader.h (tags): Remove.
11858 Adjust all users to use symbols[i]->tag.
11860 2001-12-29 Akim Demaille <akim@epita.fr>
11862 * src/gram.h, src/gram.c (symbols): New, similar to state_table
11864 * src/reader.c (packsymbols): Fill this table.
11866 * src/conflicts.c (resolve_sr_conflict): Adjust.
11867 * src/reduce.c (reduce_grammar): Adjust: just sort symbols, a
11869 Use symbols[i]->tag instead of tags[i].
11871 2001-12-29 Akim Demaille <akim@epita.fr>
11873 * tests/calc.at (_AT_DATA_CALC_Y): Also use %union.
11874 In addition, put a comment in there, to replace...
11875 * tests/regression.at (%union and C comments): Remove.
11877 2001-12-29 Akim Demaille <akim@epita.fr>
11879 * tests/regression.at (Web2c Actions): Blindly move the actual
11880 output as expected output. The contents *seem* right to me, but I
11881 can't pretend reading perfectly parser tables... Nonetheless, all
11882 the other tests pass correctly, the table look OK, even though the
11883 presence of `$axiom' is to be noted: AFAICS it is useless (but
11886 2001-12-29 Akim Demaille <akim@epita.fr>
11888 * src/reader.c (readgram): Don't add the rule 0 if there were no
11889 rules read. In other words, add it _after_ having performed
11890 grammar sanity checks.
11891 Fixes the `tests/regression.at (Invalid input: 1)' Failure.
11893 2001-12-29 Akim Demaille <akim@epita.fr>
11895 * tests/regression.at (Web2c Report): Catch up: the rule 0 is now
11896 visible, and some states have now a different number.
11898 2001-12-29 Akim Demaille <akim@epita.fr>
11900 * src/reader.c (readgram): Bind the initial rule's lineno to that
11902 * tests/regression.at (Rule Line Numbers, Unresolved SR Conflicts):
11903 (Solved SR Conflicts): Adjust rule 0's line number.
11905 2001-12-29 Akim Demaille <akim@epita.fr>
11907 Fix the `GAWK Grammar' failure.
11909 * src/LR0.c (final_state): Initialize to -1 so that we do compute
11910 the reductions of the first state which was mistakenly confused
11911 with the final state because precisely final_state was initialized
11913 * tests/sets.at (Nullable): Adjust: state 0 does have lookaheads,
11914 now noticed by Bison.
11915 * tests/regression.at (Rule Line Numbers): Adjust: state 0 does
11916 have a reduction on $default.
11918 2001-12-29 Akim Demaille <akim@epita.fr>
11920 * src/gram.c (ritem_print): Be sure to subtract 1 when displaying
11922 * src/closure.c (print_closure): Likewise.
11923 * src/derives.c (print_derives): Likewise.
11924 * tests/sets.at (Nullable): Adjust: the rule numbers are correct
11927 2001-12-29 Akim Demaille <akim@epita.fr>
11929 * src/lalr.c (lookaheads_print): New.
11930 (lalr): Call it when --trace-flag.
11931 * tests/sets.at (Nullable): Adjust: when tracing, the lookaheads
11934 2001-12-29 Akim Demaille <akim@epita.fr>
11936 * src/derives.c (print_derives): Be sure to use `>= 0', not `> 0',
11937 when walking through ritem, even via rule->rhs.
11938 * src/reduce.c (dump_grammar, useful_production, reduce_output)
11939 (useful_production, useless_nonterminals): Likewise.
11940 (reduce_grammar_tables): Likewise, plus update nritems.
11941 * src/nullable.c (set_nullable): Likewise.
11942 * src/lalr.c (build_relations): Likewise.
11943 * tests/sets.at (Nullable): Adjust.
11944 Fortunately, now, the $axiom is no longer nullable.
11946 2001-12-29 Akim Demaille <akim@epita.fr>
11948 * src/LR0.c (generate_states): Use nritems, not nitems, nor using
11950 * src/gram.c (ritem_longest_rhs): Likewise.
11951 * src/reduce.c (nonterminals_reduce): Likewise.
11952 * src/print_graph.c (print_graph): Likewise.
11953 * src/output.c (output_rule_data): Likewise.
11954 * src/nullable.c (set_nullable): Likewise.
11956 2001-12-29 Akim Demaille <akim@epita.fr>
11958 * src/output.c: Comment changes.
11960 2001-12-27 Paul Eggert <eggert@twinsun.com>
11962 * src/bison.simple (YYSTACK_ALLOC, YYSIZE_T): Remove special
11963 cases for non-GNU systems like AIX, HP-UX, SGI, Sun, and
11964 Sparc, as they were causing more porting problems than the
11965 (minor) performance improvement was worth.
11967 Also, catch up with 1.31's YYSTD.
11969 2001-12-27 Akim Demaille <akim@epita.fr>
11971 * src/output.c (output_gram): Rely on nritems, not the
11972 0-sentinel. See below.
11973 Use -1 as separator, not 0.
11974 * src/bison.simple (yyparse): Subtract 1 to the rule numbers.
11975 Rely on -1 as separator in yyrhs, instead of 0.
11976 * tests/calc.at (AT_CHECK_CALC): Now, the parsers no longer issue
11977 twice `Now at end of input', therefore there are two lines less to
11980 2001-12-27 Akim Demaille <akim@epita.fr>
11982 * tests/regression.at (Unresolved SR Conflicts):
11983 (Solved SR Conflicts, Rule Line Numbers): Adjust to the changes
11986 2001-12-27 Akim Demaille <akim@epita.fr>
11988 * src/LR0.c (new_state): Recognize the final state by the fact it
11989 is reached by eoftoken.
11990 (insert_start_shifting_state, insert_eof_shifting_state)
11991 (insert_accepting_state, augment_automaton): Remove, since now
11992 these states are automatically computed from the initial state.
11993 (generate_states): Adjust.
11994 * src/print.c: When reporting a rule number to the user, substract
11995 1, so that the axiom rule is rule 0, and the first user rule is 1.
11996 * src/reduce.c: Likewise.
11997 * src/print_graph.c (print_core): For the time being, just as for
11998 the report, depend upon --trace-flags to dump the full set of
12000 * src/reader.c (readgram): Once the grammar read, insert the rule
12001 0: `$axiom: START-SYMBOL $'.
12002 * tests/set.at: Adjust: rule 0 is now displayed, and since the
12003 number of the states has changed (the final state is no longer
12004 necessarily the last), catch up.
12006 2001-12-27 Akim Demaille <akim@epita.fr>
12008 Try to make the use of the eoftoken valid. Given that its value
12009 is 0 which was also used as a sentinel in ritem, (i) make sure >= 0
12010 is used instead of > 0 where appropriate, (ii), depend upon nritems
12011 instead of the 0-sentinel.
12013 * src/gram.h, src/gram.c (nritems): New.
12014 Expected to be duplication of nitems, but for the time being...
12015 * src/reader.c (packgram): Assert nritems and nitems are equal.
12016 * src/LR0.c (allocate_itemsets, new_itemsets): Adjust.
12017 * src/closure.c (print_closure, print_fderives): Likewise.
12018 * src/gram.c (ritem_print): Likewise.
12019 * src/print.c (print_core, print_grammar): Likewise.
12020 * src/print_graph.c: Likewise.
12022 2001-12-27 Akim Demaille <akim@epita.fr>
12024 * src/main.c (main): If there are complains after grammar
12025 reductions, then output the report anyway if requested, then die.
12026 * src/symtab.c (bucket_new): Initialize `value' to -1, not 0.
12027 * src/reader.c (eoftoken): New.
12028 (parse_token_decl): If the token being defined has value `0', it
12030 (packsymbols): No longer hack `tags' to insert `$' by hand.
12031 Be sure to preserve the value of the eoftoken.
12032 (reader): Make sure eoftoken is defined.
12033 Initialize nsyms to 0: now eoftoken is created just like the others.
12034 * src/print.c (print_grammar): Don't special case the eof token.
12035 * src/regression.at: Adjust: `$' has value 0, not -1, which was a
12036 lie anyway, albeit pleasant.
12037 * tests/calc.at: Exercise error messages with eoftoken.
12038 Change the grammar so that empty input is invalid.
12039 Adjust expectations.
12040 When yyungeting, be sure to use a valid yylloc: use last_yylloc.
12042 2001-12-27 Akim Demaille <akim@epita.fr>
12044 * configure.in: Check the protos of strchr ans strspn.
12045 Replace strchr if needed.
12046 * src/system.h: Provide the protos of strchr, strspn and memchr if
12048 * lib/strchr.c: New.
12049 * src/reader.c (symbols_save): Use strchr.
12051 2001-12-27 Akim Demaille <akim@epita.fr>
12053 * src/print.c, src/print_graph.c (escape): New.
12054 Use it to quote the TAGS outputs.
12055 * src/print_graph.c (print_state): Now errors are in red, and
12056 reductions in green.
12057 Prefer high to wide: output the state number on a line of its own.
12059 2001-12-27 Akim Demaille <akim@epita.fr>
12061 * src/state.h, src/state.c (reductions_new): New.
12062 * src/LR0.c (set_state_table): Let all the states have a
12063 `reductions', even if reduced to 0.
12064 (save_reductions): Adjust.
12065 * src/lalr.c (initialize_LA, initialize_lookaheads): Adjust.
12066 * src/print.c (print_reductions, print_actions): Adjust.
12067 * src/output.c (action_row): Adjust.
12069 2001-12-27 Akim Demaille <akim@epita.fr>
12071 * src/state.h, src/state.c (errs_new, errs_dup): New.
12072 * src/LR0.c (set_state_table): Let all the states have an errs,
12073 even if reduced to 0.
12074 * src/print.c (print_errs, print_reductions): Adjust.
12075 * src/output.c (output_actions, action_row): Adjust.
12076 * src/conflicts.c (resolve_sr_conflict): Adjust.
12078 2001-12-27 Akim Demaille <akim@epita.fr>
12080 * src/lalr.c (set_goto_map, initialize_F): Use SHIFT_SYMBOL.
12082 2001-12-27 Akim Demaille <akim@epita.fr>
12084 * src/conflicts.c, src/conflicts.h (print_reductions): Move to...
12085 * src/print.c: here.
12086 (lookaheadset, shiftset): New, used as additional storage by
12088 (print_results): Adjust.
12089 (print_shifts, print_gotos, print_errs): New, extracted from...
12090 (print_actions): here.
12091 * src/print_graph.c (print_actions): Remove dead code.
12093 2001-12-27 Akim Demaille <akim@epita.fr>
12095 * src/reader.c (copy_dollar, copy_at): Better checking of `n' in
12098 2001-12-27 Akim Demaille <akim@epita.fr>
12100 * src/lalr.c (add_lookback_edge): Use state_t instead of ints.
12101 (build_relations): Adjust.
12103 2001-12-27 Akim Demaille <akim@epita.fr>
12105 * src/lalr.c (set_goto_map): Remove a wrong but benign loop
12108 2001-12-27 Akim Demaille <akim@epita.fr>
12110 * src/reader.c (packgram): Catch nitems overflows.
12112 2001-12-27 Akim Demaille <akim@epita.fr>
12114 * src/files.c, src/files.h (guard_obstack): Remove.
12115 * src/output.c (output): Adjust.
12116 * src/reader.c (parse_braces): New, factoring...
12117 (copy_action, copy_guard): these two which are renamed as...
12118 (parse_action, parse_guard): these.
12119 As a voluntary consequence, using braces around guards is now
12122 2001-12-27 Akim Demaille <akim@epita.fr>
12124 * src/gram.h (rule_t): `guard' and `guard_line' are new members.
12125 * src/reader.c (symbol_list): `guard' and `guard_line' are new
12127 (symbol_list_new): Adjust.
12128 (copy_action): action_line is the first line, not the last.
12129 (copy_guard): Just as for actions, store the `action' only, not
12130 the switch/case/break flesh.
12131 Don't parse the user action that might follow the guard, let...
12132 (readgram): do it, i.e., now, there can be an action after a
12134 In other words the guard is just explicitly optional.
12135 (packgram): Adjust.
12136 * src/output.c (guards_output): New.
12137 (output_parser): Call it when needed.
12138 (output): Also free the guard and attrs obstacks.
12139 * src/files.c, src/files.h (obstack_save): Remove.
12140 (output_files): Remove.
12141 As a result, if one needs the former `.act' file, using an
12142 appropriate skeleton which requires actions and guards is now
12144 * src/main.c (main): Adjust.
12145 * tests/semantic.at: New.
12146 * tests/regression.at: Use `input.y' as input file name.
12147 Avoid 8+3 problems by requiring input.c when the test needs the
12150 2001-12-27 Akim Demaille <akim@epita.fr>
12152 * src/reader.c (symbol_list_new): Be sure to initialize all the
12155 2001-12-27 Akim Demaille <akim@epita.fr>
12157 All the hacks using a final pseudo state are now useless.
12159 * src/LR0.c (set_state_table): state_table holds exactly nstates.
12160 * src/lalr.c (nLA): New.
12161 (initialize_LA, compute_lookaheads, initialize_lookaheads): Use it
12162 instead of lookaheadsp from the pseudo state (nstate + 1).
12164 2001-12-27 Akim Demaille <akim@epita.fr>
12166 * src/output.c (action_row, token_actions): Use a state_t instead
12167 of a integer, and nlookaheads instead of the following state's
12170 2001-12-27 Akim Demaille <akim@epita.fr>
12172 * src/conflicts.c (log_resolution, flush_shift)
12173 (resolve_sr_conflict, set_conflicts, solve_conflicts)
12174 (count_sr_conflicts, count_rr_conflicts, conflicts_output)
12175 (conflicts_print, print_reductions): Use a state_t instead of an
12176 integer when referring to a state.
12177 As much as possible, depend upon nlookaheads, instead of the
12178 `lookaheadsp' member of the following state (since lookaheads of
12179 successive states are successive, the difference between state n + 1
12180 and n served as the number of lookaheads for state n).
12181 * src/lalr.c (add_lookback_edge): Likewise.
12182 * src/print.c (print_core, print_actions, print_state)
12183 (print_results): Likewise.
12184 * src/print_graph.c (print_core, print_actions, print_state)
12185 (print_graph): Likewise.
12186 * src/conflicts.h: Adjust.
12188 2001-12-27 Akim Demaille <akim@epita.fr>
12190 * src/bison.hairy: Formatting/comment changes.
12192 Remove `register' indications.
12193 Add plenty of `static'.
12195 2001-12-27 Akim Demaille <akim@epita.fr>
12197 * src/output.c (prepare): Drop the muscle `ntbase' which
12198 duplicates ntokens.
12199 * src/bison.simple: Formatting/comment changes.
12200 Use YYNTOKENS only, which is documented, but not YYNTBASE, which
12201 is an undocumented synonym.
12203 2001-12-22 Akim Demaille <akim@epita.fr>
12205 * src/output.c (output_table_data): Change the prototype to use
12206 `int' for array ranges: some invocations do pass an int, not a
12208 Reported by Wayne Green.
12210 2001-12-22 Akim Demaille <akim@epita.fr>
12212 Some actions of web2c.y are improperly triggered.
12213 Reported by Mike Castle.
12215 * src/lalr.c (traverse): s/F (i)[k] = F (j)[k]/F (j)[k] = F (i)[k]/.
12216 * tests/regression.at (Web2c): Rename as...
12217 (Web2c Report): this.
12218 (Web2c Actions): New.
12220 2001-12-22 Akim Demaille <akim@epita.fr>
12222 Reductions in web2c.y are improperly reported.
12223 Reported by Mike Castle.
12225 * src/conflicts.c (print_reductions): Fix.
12226 * tests/regression.at (Web2c): New.
12228 2001-12-18 Akim Demaille <akim@epita.fr>
12230 Some host fail on `assert (!"foo")', which expands to
12231 ((!"foo") ? (void)0 : __assert("!"foo."", __FILE__, __LINE__))
12232 Reported by Nelson Beebee.
12234 * src/output.c, src/vcg.c: Replace `assert (!"it succeeded")' with
12235 `#define it_succeeded 0' and `assert (it_succeeded)'.
12237 2001-12-17 Marc Autret <autret_m@epita.fr>
12239 * src/bison.simple: Don't hard code the skeleton line and filename.
12240 * src/output.c (output_parser): Rename 'line' as 'output_line'.
12241 New line counter 'skeleton_line' (skeleton-line muscle).
12243 2001-12-17 Paul Eggert <eggert@twinsun.com>
12245 * NEWS, doc/bison.texinfo, doc/bison.1, doc/bison.rnh: Document that
12246 YYDEBUG must be defined to a nonzero value.
12248 * src/bison.simple (yytname): Do not assume that the user defines
12249 YYDEBUG to a properly parenthesized expression.
12251 2001-12-17 Akim Demaille <akim@epita.fr>
12253 * src/state.h (state_t): Rename lookaheads as lookaheadsp.
12254 nlookaheads is a new member.
12256 * src/lalr.h (nlookaheads): Remove this orphan declaration.
12257 * src/lalr.c (initialize_lookaheads): Set nlookaheads for each
12260 2001-12-17 Akim Demaille <akim@epita.fr>
12262 * src/files.h, src/files.c (open_files, close_files): Remove.
12263 * src/main.c (main): Don't open/close files, nor invoke lex_free,
12265 * src/reader.c (reader): Do it.
12267 2001-12-17 Akim Demaille <akim@epita.fr>
12269 * src/conflicts.c (print_reductions): Formatting changes.
12271 2001-12-17 Akim Demaille <akim@epita.fr>
12273 * src/conflicts.c (flush_shift): Also adjust lookaheadset.
12274 (flush_reduce): New.
12275 (resolve_sr_conflict): Adjust.
12277 2001-12-17 Akim Demaille <akim@epita.fr>
12279 * src/output.c (output_obstack): Be static and rename as...
12280 (format_obstack): this, to avoid any confusion with files.c's
12282 * src/reader.h (muscle_obstack): Move to...
12283 * src/output.h: here, since it's defined in output.c.
12285 2001-12-17 Akim Demaille <akim@epita.fr>
12287 * src/output.c (action_row, save_column, default_goto)
12288 (sort_actions, matching_state, pack_vector): Better variable
12291 2001-12-17 Akim Demaille <akim@epita.fr>
12293 * src/output.c: Various formatting changes.
12295 2001-12-17 Akim Demaille <akim@epita.fr>
12297 * src/files.c (output_files): Free the output_obstack.
12298 * src/main.c (main): Call print and print_graph conditionally.
12299 * src/print.c (print): Work unconditionally.
12300 * src/print_graph.c (print_graph): Work unconditionally.
12301 * src/conflicts.c (log_resolution): Output only if verbose_flag.
12303 2001-12-16 Marc Autret <autret_m@epita.fr>
12305 * src/output.c (actions_output): Fix. When we use %no-lines,
12306 there is one less line per action.
12308 2001-12-16 Marc Autret <autret_m@epita.fr>
12310 * src/bison.simple: Remove a useless #line directive.
12311 s/#line %%line %%skeleton/#line %%line "%%parser-file-name"/'.
12312 * src/output.c (get_lines_number): New.
12313 (output_parser): Adjust, now takes care about the lines of a
12315 Fix line numbering.
12316 (actions_output): Computes the number of lines taken by actions.
12317 (output_master_parser): Insert new skeleton which is the name of
12318 the output parser file name.
12320 2001-12-15 Marc Autret <autret_m@epita.fr>
12322 * src/bison.simple [YYERROR_VERBOSE]: Restore backward compatibility.
12324 2001-12-15 Marc Autret <autret_m@epita.fr>
12326 * src/output.c (output_gram): Keep track of the hairy one.
12328 2001-12-15 Akim Demaille <akim@epita.fr>
12330 Make `make distcheck' work.
12332 * lib/Makefile.am (INCLUDES): Add top_srcdir/intl, since hash uses
12333 system.h which uses libgettext.h.
12335 2001-12-15 Akim Demaille <akim@epita.fr>
12337 * src/nullable.c (set_nullable): Useless rules must be skipped,
12338 otherwise, since we range over their symbols, we might look at a
12339 nonterminal which no longer ``exists'', i.e., it is not counted in
12340 `nvars', hence we overflow our arrays.
12342 2001-12-15 Akim Demaille <akim@epita.fr>
12344 The header can also be produced directly, without any obstack!
12347 * src/files.c, src/files.h (defines_obstack): Remove.
12348 (compute_header_macro): Global.
12349 (defines_obstack_save): Remove.
12350 * src/reader.c (parse_union_decl): No longer output to
12351 defines_obstack: its content can be found in the `stype' muscle
12353 (output_token_translations): Merge into...
12354 (symbols_output): this.
12356 (symbols_save): this.
12358 * src/output.c (header_output): New.
12361 2001-12-15 Akim Demaille <akim@epita.fr>
12363 * src/reader.c (parse_union_decl): Instead of handling two obstack
12364 simultaneously, use one to define the `stype' muscle, and use the
12365 value of the latter to fill defines_obstack.
12366 (copy_comment): Remove.
12367 (copy_comment2): Work for a single obstack.
12369 (copy_comment): this.
12371 2001-12-15 Akim Demaille <akim@epita.fr>
12373 * src/lex.c, src/lex.h (xgetc): No longer static.
12374 * src/reader.c (parse_union_decl): Revamp.
12376 2001-12-15 Akim Demaille <akim@epita.fr>
12378 Still making progress in separating Bison into (i) input, (ii)
12379 process, (iii) output: now we can directly output the parser file
12380 without using table_obstack at all.
12382 * src/files.c, src/files.h (table_obstack): Bye bye.
12383 (parser_file_name): New.
12384 * src/files.c (compute_output_file_names): Compute it.
12385 * src/output.c (actions_output, output_parser)
12386 (output_master_parser): To a file instead of an obstack.
12388 2001-12-15 Akim Demaille <akim@epita.fr>
12390 Attach actions to rules, instead of pre-outputting them to
12393 * src/gram.h (rule_t): action and action_line are new members.
12394 * src/reader.c (symbol_list): Likewise.
12395 (copy_action): Save the actions within the rule.
12396 (packgram): Save them in rule_table.
12397 * src/output.c (actions_output): New.
12398 (output_parser): Use it on `%%actions'.
12399 (output_rule_data): Don't free rule_table.
12401 (prepare): Don't save the `action' muscle.
12402 * src/bison.simple: s/%%action/%%actions/.
12404 2001-12-15 Akim Demaille <akim@epita.fr>
12406 * src/reader.c (copy_action): When --yacc, don't append a `;'
12407 to the user action: let it fail if lacking.
12408 Suggested by Arnold Robbins and Tom Tromey.
12410 2001-12-14 Akim Demaille <akim@epita.fr>
12412 * src/lex.c (literalchar): Simply return the char you decoded, non
12413 longer mess around with obstacks and int pointers.
12414 Adjust all callers.
12416 2001-12-14 Akim Demaille <akim@epita.fr>
12418 * src/lex.c (literalchar): Don't escape the special characters,
12419 just decode them, and keep them as char (before, eol was output as
12420 the 2 char string `\n' etc.).
12421 * src/output.c (output_rule_data): Use quotearg to output the
12424 2001-12-13 Paul Eggert <eggert@twinsun.com>
12426 * src/bison.simple (YYSIZE_T, YYSTACK_ALLOC, YYSTACK_FREE):
12427 Do not infringe on the global user namespace when using C++.
12428 (YYFPRINTF, YYSTDERR): New macros, needed for the above.
12429 All uses of `fprintf' and `stderr' changed.
12431 * doc/bison.texinfo: Document YYFPRINTF, YYSTDERR.
12433 2001-12-13 Akim Demaille <akim@epita.fr>
12435 The computation of nullable is broken: it doesn't handle empty
12438 * tests/torture.at (GNU AWK Grammar): New.
12439 * tests/sets.at (Nullable): New.
12440 * src/nullable.c (set_nullable): Instead of blindly looping over
12441 `ritems', loop over the rules, and then over their rhs's.
12443 Work around Autotest bugs.
12445 * src/warshall.c (bitmatrix_print): Don't use `+--+' as table
12446 frame, because Autotest understand lines starting with a `+' as
12447 traces from the shell. Then, they are not processed properly.
12448 Admittedly an Autotest bug, but we don't have time to wait for
12449 Autotest to catch up.
12450 * tests/regression.at (Broken Closure): Adjust to the new table
12453 * tests/sets.at: here.
12455 2001-12-13 Akim Demaille <akim@epita.fr>
12457 * src/closure.c (closure): Use nrules instead of playing tricks
12458 with BITS_PER_WORD.
12460 2001-12-13 Akim Demaille <akim@epita.fr>
12462 * src/print.c (print_actions): Output the handling of `$' as the
12463 traces do: shifting the token EOF. Before EOF was treated as a
12465 * tests/regression.at: Adjust some tests.
12466 * src/print_graph.c (print_core): Complete the set of items via
12467 closure. The next-to-final and final states are still unsatisfying,
12468 but that's to be addressed elsewhere.
12469 No longer output the rule numbers, but do output the state number.
12470 A single loop for the shifts + gotos is enough, but picked a
12471 distinct color for each.
12472 (print_graph): Initialize and finalize closure.
12474 2001-12-13 Akim Demaille <akim@epita.fr>
12476 * src/reader.c (readgram): Remove dead code, an strip useless
12478 (get_type): Remove, unused.
12480 2001-12-12 Akim Demaille <akim@epita.fr>
12482 * src/complain.h, src/complain.c: Remove error_one_per_line, rely
12483 on that of lib/error.c.
12485 2001-12-12 Akim Demaille <akim@epita.fr>
12487 Some hosts don't like `/' in includes.
12489 * src/system.h: Include libgettext.h without qualifying the path.
12490 * src/Makefile.am (INCLUDES): Add $(top_srcdir)/intl, remove
12493 2001-12-11 Marc Autret <autret_m@epita.fr>
12495 * src/output.c (output_parser): Remove useless muscle.
12497 2001-12-11 Marc Autret <autret_m@epita.fr>
12499 * src/bison.simple: Remove #line just before %%epilogue. It
12500 is now handled in ...
12501 * src/reader.c (read_additionnal_code): Add the output of a
12502 #line for the epilogue.
12504 2001-12-10 Marc Autret <autret_m@epita.fr>
12506 * src/reader.c (copy_definition): Re-use CPP-outed code which
12507 replace precedent remove.
12508 * src/bison.simple: Remove #line before %%prologue because
12509 %%input-line is wrong at this time.
12511 2001-12-10 Marc Autret <autret_m@epita.fr>
12513 * src/reader.c (symbols_output): Clean up.
12514 * src/output.c (output_gram, output): Clean up.
12516 2001-12-10 Akim Demaille <akim@epita.fr>
12518 * src/lalr.c (initialize_lookaheads): New. Extracted from...
12519 * src/LR0.c (set_state_table): here.
12520 * src/lalr.c (lalr): Call it.
12522 2001-12-10 Akim Demaille <akim@epita.fr>
12524 * src/state.h (shifts): Remove the `number' member: shifts are
12525 attached to state, hence no longer need to be labelled with a
12528 2001-12-10 Akim Demaille <akim@epita.fr>
12530 Now that states have a complete set of members, the linked list of
12531 shifts is useless: just fill directly the state's shifts member.
12533 * src/state.h (shifts): Remove the `next' member.
12534 * src/LR0.c (first_state, last_state): Remove.
12535 Adjust the callers.
12536 (augment_automaton): Don't look for the shifts that must be added
12537 a shift on EOF: it is those of the state we looked for! But now,
12538 since shifts are attached, it is no longer needed to looking
12539 merely by its id: its number.
12541 2001-12-10 Akim Demaille <akim@epita.fr>
12543 * src/LR0.c (augment_automaton): Better variable locality.
12544 Remove an impossible branch: if there is a state corresponding to
12545 the start symbol being shifted, then there is shift for the start
12546 symbol from the initial state.
12548 2001-12-10 Akim Demaille <akim@epita.fr>
12550 * src/LR0.c (augment_automaton): Call `insert_eof_shifting_state'
12551 only when appropriate: when insert_start_shifting_state' is not
12553 * tests/regression.at (Rule Line Numbers): Adjust.
12555 2001-12-10 Akim Demaille <akim@epita.fr>
12557 * src/LR0.c (augment_automaton): Now that all states have shifts,
12558 merge the two cases addition shifts to the initial state.
12560 2001-12-10 Akim Demaille <akim@epita.fr>
12562 * src/lalr.c (set_state_table): Move to...
12564 * src/lalr.c (lalr): Don't call it...
12565 * src/LR0.c (generate_states): do it.
12566 * src/LR0.h (first_state): Remove, only the table is used.
12568 2001-12-10 Akim Demaille <akim@epita.fr>
12570 * src/LR0.h (first_shift, first_reduction): Remove.
12571 * src/lalr.c: Don't use first_shift: find shifts through the
12574 2001-12-10 Akim Demaille <akim@epita.fr>
12576 * src/LR0.c: Attach shifts to states as soon as they are
12578 * src/lalr.c (set_state_table): Instead of assigning shifts to
12579 state, just assert that the mapping was properly done.
12581 2001-12-10 Akim Demaille <akim@epita.fr>
12583 * src/LR0.c (insert_start_shift): Rename as...
12584 (insert_start_shifting_state): this.
12585 (insert_eof_shifting_state, insert_accepting_state): New.
12586 (augment_automaton): Adjust.
12587 Better locality of the variables.
12588 When looking if the start_symbol is shifted from the initial
12589 state, using `while (... symbol != start_symbol ...)' sounds
12590 better than `while (... symbol < start_symbol ...)': If fail
12591 to see how the order between symbols could be relevant!
12593 2001-12-10 Akim Demaille <akim@epita.fr>
12595 * src/getargs.h: Don't declare `spec_name_prefix' and
12596 `spec_file_prefix', declared by src/files.h.
12597 * src/files.c, src/files.h: Default for spec_name_prefix is "yy".
12598 * src/muscle_tab.c (muscle_init): Default prefix to NULL.
12599 * src/output.c (prepare): Adjust.
12600 * src/reader.c (symbols_output): Likewise.
12601 * src/vmsgetargs.c: Vaguely adjust, but who cares?
12603 2001-12-10 Akim Demaille <akim@epita.fr>
12605 * src/muscle_tab.c (muscle_init): NULL is a better default than
12608 2001-12-10 Akim Demaille <akim@epita.fr>
12610 * src/reader.c (reader): Calling symbols_output once is enough.
12612 2001-12-10 Akim Demaille <akim@epita.fr>
12614 Now that states have a complete set of members, the linked list of
12615 reductions is useless: just fill directly the state's reductions
12618 * src/state.h (struct reductions): Remove member `number' and
12620 * src/LR0.c (first_reduction, last_reduction): Remove.
12621 (save_reductions): Don't link the new reductions, store them in
12623 * src/lalr.c (set_state_table): No need to attach reductions to
12624 states, it's already done.
12625 * src/output.c (output_actions): No longer free the shifts, then
12626 the reductions, then the states: free all the states and their
12629 2001-12-10 Akim Demaille <akim@epita.fr>
12631 * src/options.c (OPTN, DRTV, BOTH): New.
12632 (option_table): Use them.
12634 * src/muscle_tab.c: Don't include xalloc.h and string.h: that's
12635 the job of system.h.
12636 * src/options.c: Don't include stdio.h and xalloc.h for the same
12639 2001-12-10 Akim Demaille <akim@epita.fr>
12641 * src/output.c (output, prepare): Make sure the values of the
12642 muscles `action' and `prologue' are 0-terminated.
12644 2001-12-10 Akim Demaille <akim@epita.fr>
12646 Clean up GCC warnings.
12648 * src/reader.c (copy_action): `buf' is not used.
12649 (parse_skel_decl): Be static.
12650 * src/muscle_tab.c (mhash1, mhash2, muscle_insert): Preserve `const'.
12651 * src/options.h (create_long_option_table): Have a real prototype.
12652 * lib/hash.c, lib/hash.h (hash_insert, hash_insert_at, hash_delete)
12653 (hash_delete_at): Return const void *.
12654 Adjust casts to preserve the const.
12656 2001-12-10 Akim Demaille <akim@epita.fr>
12658 * configure.in: Require 2.52g.
12659 M4 is not needed, but AUTOM4TE is.
12660 * m4/m4.m4: Remove.
12661 * tests/Makefile.am: Adjust.
12663 2001-12-10 Akim Demaille <akim@epita.fr>
12665 One structure for states is enough, even though theoretically
12666 there are LR(0) states and LALR(1) states.
12668 * src/lalr.h (state_t): Remove.
12669 (state_table): Be state_t **, not state_t *.
12670 * src/state.h (core, CORE_ALLOC): Rename as...
12671 (state_t, STATE_ALLOC): this.
12672 Add the LALR(1) members: shifts, reductions, errs.
12673 * src/LR0.c (state_table): Rename as...
12674 (state_hash): this, to avoid name clashes with the global
12676 * src/print_graph.c, src/LR0.c, src/LR0.h, src/conflicts.c
12677 * src/lalr.c, src/lalr.h, src/output.c, src/print.c: Adjust.
12679 2001-12-10 Akim Demaille <akim@epita.fr>
12681 Bison dumps core on bash.y.
12682 Reported by Pascal Bart.
12684 * src/warshall.c (bitmatrix_print): New.
12686 When performing a transitive closure R(i, j) && R(j, k) => R(i, k),
12687 j must be the outer loop.
12688 * tests/regression.at (Broken Closure): New.
12690 2001-12-05 Akim Demaille <akim@epita.fr>
12692 * tests/atlocal.in (CPPFLAGS): Do not leave a space between -I and
12694 Reported by Peter Hamorsky.
12696 2001-12-05 Akim Demaille <akim@epita.fr>
12698 * src/conflicts.c (err_table): Remove.
12699 (resolve_sr_conflict): Adjust.
12700 * src/lalr.h (state_t.reduction_table, state_t.shift_table):
12702 (state_t.reductions, state_t.shifts): this.
12704 2001-12-05 Akim Demaille <akim@epita.fr>
12706 * src/reduce.c (reduce_grammar_tables): No longer disable the
12707 removal of useless rules via CPP but via `if (0)', so that the
12708 compiler still check the code is valid.
12709 For instance, it should have noticed `rline' no longer exists: use
12710 the `line' member of rule_t.
12711 * src/gram.c (dummy, rline): Remove, unused.
12713 2001-12-05 Akim Demaille <akim@epita.fr>
12715 * src/output.c (pack_vector): Use assert, not berror.
12716 * src/main.c (berror): Remove, unused.
12718 2001-12-05 Akim Demaille <akim@epita.fr>
12720 New experimental feature: if --verbose --trace output all the
12721 items of a state, not only its kernel.
12723 * src/print.c (print_core): If `trace_flag', then invoke closure
12724 before outputting the items of the state (print_core is no longer
12725 a correct name them).
12726 (print_results): Invoke new_closure/free_closure if needed.
12728 2001-12-05 Akim Demaille <akim@epita.fr>
12730 * src/LR0.c (new_itemsets): Use nshifts only, not shiftcount.
12731 * src/closure.c, src/closure.h (itemsetsize): Rename as...
12732 (nitemset): for consistency with the rest of the project.
12734 2001-12-05 Akim Demaille <akim@epita.fr>
12736 * src/closure.c (print_closure): Improve.
12737 (closure): Use it for printing input and output.
12739 2001-12-05 Akim Demaille <akim@epita.fr>
12741 * src/closure.c (FIRSTS, FDERIVES): Adjust to reality: they are
12742 indexed by nonterminals.
12744 2001-12-05 Akim Demaille <akim@epita.fr>
12746 * src/warshall.c (TC, RTC): De-obsfucate (source reduced to 22% of
12748 * src/warshall.h: Remove accidental duplication of the content.
12750 2001-12-05 Akim Demaille <akim@epita.fr>
12752 * src/closure.c (set_fderives): De-obfuscate.
12754 2001-12-05 Akim Demaille <akim@epita.fr>
12756 * src/closure.c (print_firsts, print_fderives): De-obfuscate.
12758 2001-12-05 Akim Demaille <akim@epita.fr>
12760 * src/closure.c (set_firsts): De-obfuscate.
12762 2001-12-05 Akim Demaille <akim@epita.fr>
12764 * src/output.c (action_row): De-obfuscate
12765 using the good o' techniques: arrays not pointers, variable
12766 locality, BITISSET, RESETBIT etc.
12768 2001-12-05 Akim Demaille <akim@epita.fr>
12770 Pessimize the code to simplify it: from now on, all the states
12771 have a valid SHIFTS, which NSHIFTS is possibly 0.
12773 * src/LR0.c (shifts_new): Be global and move to..
12774 * src/state.c, src/state.h: here.
12775 * src/conflicts, src/lalr.c, src/output.c, src/print.c,
12776 * src/print_graph: Adjust.
12778 2001-12-05 Akim Demaille <akim@epita.fr>
12780 * src/state.h (SHIFT_DISABLE, SHIFT_IS_DISABLED): New.
12781 * src/conflicts.c: Use it.
12782 Restore a few missing `if (!SHIFT_IS_DISABLED)' which were
12783 incorrectly ``simplified''.
12785 2001-12-05 Akim Demaille <akim@epita.fr>
12787 * src/conflicts.c (flush_shift, resolve_sr_conflict): De-obfuscate
12788 using the good o' techniques: arrays not pointers, variable
12789 locality, BITISSET, RESETBIT etc.
12791 2001-12-05 Akim Demaille <akim@epita.fr>
12793 * src/state.h (SHIFT_SYMBOL): New.
12794 * src/conflicts.c: Use it to deobfuscate.
12796 2001-12-05 Akim Demaille <akim@epita.fr>
12798 * src/conflicts.c (count_sr_conflicts, count_rr_conflicts)
12799 (print_reductions): De-obfuscate using the good o' techniques:
12800 arrays not pointers, variable locality, BITISSET.
12802 2001-12-05 Akim Demaille <akim@epita.fr>
12804 * src/conflicts.c (print_reductions): Arrays, not pointers.
12807 2001-12-05 Akim Demaille <akim@epita.fr>
12809 * src/conflicts.c (print_reductions): Pessimize, but clarify.
12811 2001-12-05 Akim Demaille <akim@epita.fr>
12813 * src/conflicts.c (print_reductions): Improve variable locality.
12815 2001-12-05 Akim Demaille <akim@epita.fr>
12817 * src/conflicts.c (print_reductions): Pessimize, but clarify.
12819 2001-12-05 Akim Demaille <akim@epita.fr>
12821 * src/conflicts.c (print_reductions): Improve variable locality.
12823 2001-12-05 Akim Demaille <akim@epita.fr>
12825 * src/state.h (SHIFT_IS_ERROR, SHIFT_IS_GOTO, SHIFT_IS_SHIFT): New.
12826 * src/lalr.c: Use them.
12828 2001-12-05 Akim Demaille <akim@epita.fr>
12830 * src/LR0.c (augment_automaton): Formatting changes.
12831 Better variable locality.
12833 2001-12-05 Akim Demaille <akim@epita.fr>
12835 * src/lalr.c (matrix_print): New.
12836 (transpose): Use it.
12837 Use arrays instead of pointers.
12839 2001-12-05 Akim Demaille <akim@epita.fr>
12841 * src/lalr.c (maxrhs): Move to...
12842 * src/gram.c, src/gram.h (ritem_longest_rhs): here.
12843 * src/lalr.c (build_relations): Adjust.
12845 2001-12-05 Akim Demaille <akim@epita.fr>
12847 * src/lalr.c (transpose): Free the memory allocated to the
12848 argument, as it is replaced by the results by the unique caller.
12849 (build_relations): Merely invoke transpose: it handles the memory
12851 Improve variable locality.
12852 Avoid variables used as mere abbreviations.
12853 (compute_lookaheads): Use arrays instead of pointers.
12855 2001-12-05 Akim Demaille <akim@epita.fr>
12857 * src/lalr.c (initialize_F): Improve variable locality.
12858 Avoid variables used as mere abbreviations.
12860 2001-12-05 Akim Demaille <akim@epita.fr>
12862 * src/derives.c (print_derives): Display the ruleno.
12863 * src/lalr.c (initialize_F, transpose): Better variable locality
12864 to improve readability.
12865 Avoid variables used as mere abbreviations.
12867 2001-12-05 Akim Demaille <akim@epita.fr>
12869 * src/lalr.c (traverse): Use arrays instead of pointers.
12871 2001-12-05 Akim Demaille <akim@epita.fr>
12873 * src/nullable.c (set_nullable): Use a for loop to de-obfuscate
12874 the handling of squeue.
12875 `symbol >= 0' is wrong now, use `rule_table[ruleno].useful'.
12877 2001-12-05 Akim Demaille <akim@epita.fr>
12879 Because useless nonterminals are now kept alive (instead of being
12880 `destroyed'), we now sometimes examine them, and store information
12881 related to them. Hence we need to know their number, and adjust
12882 memory allocations.
12884 * src/reduce.c, src/reduce.h (nuseless_nonterminals): No longer
12886 * src/LR0.c (allocate_itemsets): The memory allocated to
12887 `symbol_count' was used for two different purpose: once to count
12888 the number of occurrences of each symbol, and later reassigned to
12889 `shift_symbol', containing the symbol that can be shifted from a
12891 Deobfuscate, i.e., allocate, use and free `symbol_count' here
12893 (new_itemsets): Allocate `shift_symbol' here.
12894 (allocate_itemsets): symbol_count includes useless nonterminals.
12895 Make room for them.
12896 (free_storage): Use `free', not `XFREE', for pointers that cannot
12899 2001-12-05 Akim Demaille <akim@epita.fr>
12901 * src/nullable.c (set_nullable): Deobfuscate the handling of
12903 `symbol >= 0' is wrong now, use `rule_table[ruleno].useful'.
12905 2001-12-05 Akim Demaille <akim@epita.fr>
12907 * src/gram.c, src/gram.h (ritem_print): New.
12908 * src/gram.c (dummy): Remove, now there is actual code in gram.c.
12909 (This useless function was defined only to work around VMS linkers
12910 that can't handle compilation units with variables only).
12911 * src/reduce.c (dump_grammar): Use it to trace the construction of
12914 2001-12-04 Paul Eggert <eggert@twinsun.com>
12916 * src/bison.simple (union yyalloc): Change member names
12917 to be the same as the stack names.
12918 (yyparse): yyptr is now union yyalloc *, not char *.
12919 (YYSTACK_RELOCATE): Likewise. This avoids a GCC warning,
12920 and may generate better code on some machines.
12921 (yystpcpy): Use prototype if __STDC__ is defined, not just
12922 if __cplusplus is defined.
12924 2001-11-30 Akim Demaille <akim@epita.fr>
12926 * configure.in (WARNING_CFLAGS): Add -Werror when possible.
12927 (CFLAGS): Do not include the WARNING_CFLAGS here, since GNU
12928 Gettext doesn't compile cleanly, and dies with -Werror.
12929 * src/Makefile.am, lib/Makefile.am, tests/atlocal.in (CFLAGS):
12930 Include WARNING_CFLAGS here.
12931 * lib/xstrdup.c: Include xalloc.h, so that xstrdup be declared
12932 before being defined.
12934 2001-11-27 Paul Eggert <eggert@twinsun.com>
12936 * lib/quotearg.h (quotearg_n, quotearg_n_style):
12937 First arg is int, not unsigned.
12938 * lib/quotearg.c (quotearg_n, quotearg_n_style): Likewise.
12939 (SIZE_MAX, UINT_MAX): New macros.
12940 (quotearg_n_options): Abort if N is negative.
12941 Avoid overflow check on hosts where size_t is 64 bits and int
12942 is 32 bits, as overflow is impossible there.
12943 Fix off-by-one typo that caused unnecessary reallocation.
12945 2001-11-29 Paul Eggert <eggert@twinsun.com>
12947 Name space cleanup in generated parser.
12949 * doc/bison.texinfo (Bison Parser): Discuss system headers
12950 and their effect on the user name space.
12952 * src/bison.simple:
12953 (YYSTACK_ALLOC, YYSTACK_FREE, union yyalloc, YYSTACK_GAP_MAX,
12954 YYSTACK_BYTES, YYSTACK_RELOCATE): Do not define unless necessary,
12955 i.e. unless ! defined (yyoverflow) || defined (YYERROR_VERBOSE).
12957 (YYSIZE_T): New macro. Use it instead of size_t, to avoid infringing
12958 on user names when possible.
12960 (YYSTACK_USE_ALLOCA): Do not define; just use any existing defn.
12961 Simplify test for whather <alloca.h> exists.
12963 (<stdlib.h>): Include if we will use malloc, and if standard C or C++.
12965 (<stdio.h>): Include if YYDEBUG.
12967 (yymemcpy): Renamed from __yy_memcpy. Do not define unless
12968 ! defined (yyoverflow) && ! defined (yymemcpy).
12970 (yymemcpy, yyparse): Rename local variables as needed so that
12971 they all begin with 'yy'.
12973 (yystrlen, yystpcpy): New functions.
12975 (YY_DECL_NON_LSP_VARIABLES): Renamed from _YY_DECL_VARIABLES.
12978 (yyparse): size_t -> YYSIZE_T. Use yystrlen and yystpcpy
12979 instead of relying on string.h functions. Use YYSTACK_ALLOC
12980 and YYSTACK_FREE instead of malloc and free.
12982 2001-11-30 Akim Demaille <akim@epita.fr>
12984 * src/bison.simple (YYSTYPE, YYLTYPE): Move their definitions
12985 before their first uses.
12986 (YYBISON, YYPURE): Move to the top of the output.
12988 2001-11-30 Akim Demaille <akim@epita.fr>
12990 * tests/reduce.at (Useless Nonterminals): Fix.
12992 2001-11-30 Akim Demaille <akim@epita.fr>
12994 * src/bison.simple (YYSTACK_FREE): Use `do {;} while (0)' as empty
12995 if body instead of `;' to pacify GCC's warnings.
12997 2001-11-30 Akim Demaille <akim@epita.fr>
12999 Instead of mapping the LHS of unused rules to -1, keep the LHS
13000 valid, but flag the rules as invalid.
13002 * src/gram.h (rule_t): `useful' is a new member.
13003 * src/print.c (print_grammar): Adjust.
13004 * src/derives.c (set_derives): Likewise.
13005 * src/reader.c (packgram, reduce_output): Likewise.
13006 * src/reduce.c (reduce_grammar_tables): Likewise.
13007 * tests/reduce.at (Underivable Rules, Useless Rules): New.
13009 2001-11-30 Akim Demaille <akim@epita.fr>
13011 * src/reduce.c (reduce_output): Formatting changes.
13012 * src/print.c (print_results, print_grammar): Likewise.
13013 * tests/regression.at (Rule Line Numbers)
13014 (Solved SR Conflicts, Unresolved SR Conflicts): Adjust.
13016 2001-11-30 Akim Demaille <akim@epita.fr>
13018 * src/reduce.c (nonterminals_reduce): Instead of throwing away
13019 useless nonterminals, move them at the end of the symbol arrays.
13020 (reduce_output): Adjust.
13021 * tests/reduce.at (Useless Nonterminals): Adjust.
13023 2001-11-30 Akim Demaille <akim@epita.fr>
13025 * src/reduce.c: Various comment/formatting changes.
13026 (nonterminals_reduce): New, extracted from...
13027 (reduce_grammar_tables): here.
13028 (reduce_grammar): Call nonterminals_reduce.
13030 2001-11-29 Paul Eggert <eggert@twinsun.com>
13032 * src/bison.simple (YYSTACK_REALLOC): Remove.
13033 (YYSTACK_ALLOC): Resurrect this macro, with its old meaning.
13034 (YYSTACK_FREE, YYSTACK_GAP_MAX, YYSTACK_BYTES, YYSTACK_RELOCATE):
13036 (union yyalloc): New type.
13037 (__yy_memcpy): Last arg is size_t, not unsigned int, to remove
13038 an arbitrary restriction on hosts where size_t is wider than int.
13040 (yyparse): Don't dump core if alloca or malloc fails; instead, report
13041 a parser stack overflow. Allocate just one block of memory for all
13042 three stacks, instead of allocating three blocks; this typically is
13043 faster and reduces fragmentation.
13045 Do not limit the number of items in the stack to a value that fits
13046 in 'int', as this is an arbitrary limit on hosts with 64-bit
13047 size_t and 32-bit int.
13049 2001-11-29 Marc Autret <autret_m@epita.fr>
13051 * tests/calc.at [AT_DATA_CALC_Y]: Use %error-verbose instead
13052 of defining YYERROR_VERBOSE.
13053 [AT_DATA]: $4 is now out of C declarations in the prologue.
13055 2001-11-28 Marc Autret <autret_m@epita.fr>
13057 * src/reader.c (parse_dquoted_param): New.
13058 (parse_skel_decl): Use it.
13059 * src/lex.h: Add its prototype.
13060 * src/lex.c (literalchar): Become not static.
13062 2001-11-28 Marc Autret <autret_m@epita.fr>
13064 * src/output.h: And put its extern declaration here.
13065 * src/output.c (error_verbose): Define here.
13066 (prepare): Echo name modification.
13067 * src/getargs.h: Clean its extern declaration.
13068 * src/getargs.c (error_verbose_flag): Remove.
13069 (getargs): Remove case 'e'.
13070 * src/options.c (option_table): 'error-verbose' is now seen as simple
13074 * src/reader.c (read_declarations): Remove case tok_include.
13075 (parse_include_decl): Remove.
13076 * src/lex.h (token_t): Remove tok_include.
13077 * src/options.c (option_table): 'include' is now a simple command line
13080 2001-11-28 Marc Autret <autret_m@epita.fr>
13082 * src/bison.simple: Adjust muscle names.
13083 * src/muscle_tab.c (muscle_init): Also rename the muscles.
13084 * src/output.c (prepare): s/_/-/ for the muscles names.
13085 (output_parser): When scanning for a muscle, allow '-' instead of '_'.
13087 2001-11-28 Marc Autret <autret_m@epita.fr>
13089 * src/bison.simple: Fix debug.
13090 [YYERROR_VERBOSE]: Re-integrate as an internal macro.
13092 2001-11-28 Akim Demaille <akim@epita.fr>
13094 * src/LR0.c (shifts_new): New.
13095 (save_shifts, insert_start_shift, augment_automaton): Use it.
13097 2001-11-28 Akim Demaille <akim@epita.fr>
13099 * src/closure.c (closure): `b' and `ruleno' denote the same value:
13102 2001-11-28 Akim Demaille <akim@epita.fr>
13104 * src/closure.c (closure): Instead of looping over word in array
13105 then bits in words, loop over bits in array.
13107 2001-11-28 Akim Demaille <akim@epita.fr>
13109 * src/closure.c (closure): No longer optimize the special case
13110 where all the bits of `ruleset[r]' are set to 0, to make the code
13113 2001-11-28 Akim Demaille <akim@epita.fr>
13115 * src/closure.c (closure): `r' and `c' are new variables, used to
13116 de-obfuscate accesses to RULESET and CORE.
13118 2001-11-28 Akim Demaille <akim@epita.fr>
13120 * src/reduce.c (reduce_print): Use ngettext.
13121 (dump_grammar): Improve the trace accuracy.
13123 2001-11-28 Akim Demaille <akim@epita.fr>
13125 * src/reduce.c (dump_grammar): Don't translate trace messages.
13127 2001-11-28 Akim Demaille <akim@epita.fr>
13129 * tests/reduce.at (Useless Terminals, Useless Nonterminals): New.
13130 * src/reduce.c (reduce_grammar_tables): Do not free useless tags,
13131 as all tags are free'ed afterwards.
13132 From Enrico Scholz.
13134 2001-11-27 Paul Eggert <eggert@twinsun.com>
13136 * src/bison.simple (YYSTACK_REALLOC): Fix typo that caused us to
13137 use alloca when we didn't want to, and vice versa.
13139 2001-11-27 Marc Autret <autret_m@epita.fr>
13141 * src/muscle_tab.c (muscle_init): Remove 'verbose' muscle
13143 * src/output.c (prepare): Remove its update.
13145 2001-11-27 Marc Autret <autret_m@epita.fr>
13147 * tests/torture.at [AT_DATA]: Remove YYERROR_VERBOSE definition.
13148 Use %error-verbose.
13150 2001-11-27 Marc Autret <autret_m@epita.fr>
13152 * src/bison.simple: Remove YYERROR_VERBOSE using.
13153 Use %%error_verbose.
13154 (yyparse): Likewise.
13155 * src/output.c (prepare): Give its final value.
13156 * src/muscle_tab.c (muscle_init): Init new muscle 'error_verbose'.
13157 * src/getargs.h: Add its extern declaration.
13158 * src/getargs.c (error_verbose_flag): New int.
13159 (getargs): Update to catch new case.
13160 * src/options.c (option_table): 'error-verbose' is a new option.
13161 (shortopts): Update.
13163 2001-11-27 Akim Demaille <akim@epita.fr>
13165 * src/system.h: Use intl/libgettext.h.
13166 * src/Makefile.am (INCLUDES): Add -I $(top_srcdir).
13168 2001-11-27 Akim Demaille <akim@epita.fr>
13170 * tests/torture.at (Exploding the Stack Size with Malloc):
13171 s/YYSTACK_USE_ALLOCA_ALLOCA/YYSTACK_USE_ALLOCA/.
13173 2001-11-27 Akim Demaille <akim@epita.fr>
13175 * src/files.c: Include error.h.
13176 Reported by Hans Aberg.
13178 2001-11-26 Marc Autret <autret_m@epita.fr>
13180 * src/reader.c (parse_include_decl): New, not yet implemented.
13181 (read_declarations): Add case tok_include.
13182 * src/getargs.h (include): Add its extern definition.
13183 * src/getargs.c (include): New const char *.
13184 (getargs): Add case '-I'.
13185 * src/options.c (option_table): Add include as command line and
13187 * src/lex.h (token_t): Add tok_include.
13189 2001-11-26 Akim Demaille <akim@epita.fr>
13191 * src/reader.c (readgram): Make sure rules for mid-rule actions
13192 have a lineno equal to that of their host rule.
13193 Reported by Hans Aberg.
13194 * tests/regression.at (Rule Line Numbers): New.
13196 2001-11-26 Akim Demaille <akim@epita.fr>
13198 * src/LR0.c (allocate_itemsets): kernel_size contains ints, not
13201 2001-11-26 Akim Demaille <akim@epita.fr>
13203 * src/complain.c, src/complain.h (error): Remove, provided by
13206 2001-11-26 Akim Demaille <akim@epita.fr>
13208 * src/reader.c (read_declarations): Don't abort on tok_illegal,
13209 issue an error message.
13210 * tests/regression.at (Invalid %directive): New.
13211 Reported by Hans Aberg.
13213 2001-11-26 Akim Demaille <akim@epita.fr>
13215 * configure.in: Invoke AC_FUNC_OBSTACK and AC_FUNC_ERROR_AT_LINE.
13216 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
13218 2001-11-26 Akim Demaille <akim@epita.fr>
13220 * src/conflicts.c (conflicts_print): Don't complain at all when
13221 there are no reduce/reduce conflicts, and as many shift/reduce
13222 conflicts as expected.
13223 * tests/regression.at (%expect right): Adjust.
13225 2001-11-23 Akim Demaille <akim@epita.fr>
13227 * lib/alloca.c: Update, from fileutils.
13229 2001-11-23 Akim Demaille <akim@epita.fr>
13231 * lib/Makefile.am (libbison_a_LIBADD): Add @ALLOCA@.
13233 2001-11-23 Akim Demaille <akim@epita.fr>
13235 * src/system.h: Include alloca.h.
13236 * src/main.c (main) [C_ALLOCA]: Call alloca (0).
13238 2001-11-23 Akim Demaille <akim@epita.fr>
13240 * src/print_graph.c (print_actions): Remove `rule', unused.
13241 * src/LR0.c (kernel_size): Contain `int' instead of `size_t' to
13242 pacify GCC's signed < unsigned warnings.
13243 * src/closure.c (itemsetsize): Likewise.
13244 * src/reader.c (symbol_list_new): Static.
13246 2001-11-23 Akim Demaille <akim@epita.fr>
13248 Attaching lineno to buckets is stupid, since only one copy of each
13249 symbol is kept, only the line of the first occurrence is kept too.
13251 * src/symtab.h, src/symtab.c (bucket): Remove the line member.
13252 * src/reader.c (rline_allocated): Remove, unused.
13253 (symbol_list): Have a `line' member.
13254 (symbol_list_new): New.
13255 (readgram): Use it.
13256 * src/print.c (print_grammar): Output the rule line numbers.
13257 * tests/regression.at (Solved SR Conflicts)
13258 (Unresolved SR Conflicts): Adjust.
13259 Reported by Hans Aberg.
13261 2001-11-22 Marc Autret <autret_m@epita.fr>
13263 * src/bison.simple [YYERROR_VERBOSE]: Force its value to be 1 or 0.
13265 2001-11-22 Marc Autret <autret_m@epita.fr>
13267 * src/muscle_tab.c (muscle_init): Remove initialization of
13269 * src/output.c (output_master_parser): Do it here.
13271 2001-11-20 Akim Demaille <akim@epita.fr>
13274 * configure.in (ALL_LINGUAS): Adjust.
13275 * po/POTFILE.in: Remove `nullable.c' and `derives.c' which no
13276 longer contains strings to translate.
13278 2001-11-19 Akim Demaille <akim@epita.fr>
13280 * src/conflicts.c (conflicts_print): Add a missing \n.
13282 2001-11-19 Akim Demaille <akim@epita.fr>
13284 * src/nullable.c (nullable_print): New.
13285 (set_nullable): Call it when tracing.
13286 Better locality of variables.
13288 2001-11-19 Akim Demaille <akim@epita.fr>
13290 * src/print.c (print_actions): Better locality of variables.
13292 2001-11-19 Akim Demaille <akim@epita.fr>
13294 * src/derives.c (print_derives): Fix and enrich.
13295 * src/closure.c (print_fderives): Likewise.
13297 2001-11-19 Akim Demaille <akim@epita.fr>
13299 * src/closure.c (itemsetend): Remove, replaced with...
13300 (itemsetsize): new.
13302 2001-11-19 Akim Demaille <akim@epita.fr>
13304 * src/LR0.c (kernel_end): Remove, replaced with...
13305 (kernel_size): new.
13307 2001-11-19 Akim Demaille <akim@epita.fr>
13309 * src/conflicts.c (set_conflicts): Use arrays instead of pointers
13312 2001-11-19 Akim Demaille <akim@epita.fr>
13314 * src/closure.c (closure): Use arrays instead of pointers to clarify.
13316 2001-11-19 Akim Demaille <akim@epita.fr>
13318 * src/closure.c, src/derives.c, src/nullable.c: Adjust various
13320 * src/LR0.c: Likewise.
13321 (allocate_itemsets): Use arrays instead of pointers to clarify.
13323 2001-11-19 Akim Demaille <akim@epita.fr>
13325 * src/getargs.c (statistics_flag): Replace with...
13327 (longopts): Accept --trace instead of --statistics.
13328 * src/getargs.h, src/options.c: Adjust.
13329 * src/LR0.c, src/closure.c, src/derives.c, src/nullable.c,
13330 * src/reduce.c: Use trace_flags instead of the CPP conditional TRACE.
13332 2001-11-19 Akim Demaille <akim@epita.fr>
13334 * src/LR0.c (new_itemsets, get_state): Use more arrays and fewer
13335 pointers to clarify the code.
13336 (save_reductions, save_shifts): Factor common parts of alternatives.
13338 2001-11-19 Akim Demaille <akim@epita.fr>
13340 * src/LR0.c (new_state, get_state): Complete TRACE code.
13341 * src/closure.c: Include `reader.h' to get `tags', needed by the
13343 Rename the conditional DEBUG as TRACE.
13344 Output consistently TRACEs to stderr, not stdout.
13345 * src/derives.c: Likewise.
13346 * src/reduce.c: (inaccessable_symbols): Using if is better style
13348 Use `#if TRACE' instead of `#if 0' for tracing code.
13350 2001-11-19 Akim Demaille <akim@epita.fr>
13352 * src/system.h (LIST_FREE, shortcpy): New.
13353 * src/LR0.c: Use them.
13354 * src/output.c (free_itemsets, free_reductions, free_shifts):
13355 Remove, replaced by LIST_FREE.
13357 2001-11-19 Akim Demaille <akim@epita.fr>
13359 * src/state.h (CORE_ALLOC, SHIFTS_ALLOC, ERRS_ALLOC)
13360 (REDUCTIONS_ALLOC): New.
13361 * src/LR0.c, src/conflicts.c: Use them to de-obfuscate memory
13364 2001-11-19 Akim Demaille <akim@epita.fr>
13366 * src/LR0.c (new_state): Complete trace code.
13367 * src/nullable.c (set_nullable): Don't translate traces.
13369 2001-11-19 Akim Demaille <akim@epita.fr>
13371 * src/print_graph.c (print_core): Better locality of variables.
13372 * src/print.c (print_core): Likewise.
13374 2001-11-19 Akim Demaille <akim@epita.fr>
13376 * src/vcg.c: You do the output, so you are responsible of the
13377 handling of VCG syntax, in particular: use quotearg.
13378 * src/print_graph.c: Don't.
13379 (print_actions): Don't output the actions as part of the nodes,
13380 since that's the job of the edges.
13381 (print_state): Don't output by hand: fill the node description,
13382 and ask for its output.
13384 2001-11-19 Akim Demaille <akim@epita.fr>
13386 * src/bison.simple (yyparse): When verbosely reporting an error,
13387 no longer put additional quotes around token names.
13388 * tests/calc.at: Adjust.
13390 2001-11-19 Akim Demaille <akim@epita.fr>
13392 * src/symtab.h, src/symtab.c: `line' is a new member of `bucket'.
13393 * src/reader.c (record_rule_lines, rline, rline_allocated): Remove.
13394 * src/output.c: Adjust.
13396 2001-11-19 Akim Demaille <akim@epita.fr>
13398 * src/gram.h (rprec, rprecsym, rassoc): Remove, now part of...
13400 * src/conflicts.c, src/reader.c, src/reduce.c: Adjust.
13402 2001-11-19 Akim Demaille <akim@epita.fr>
13404 * src/gram.h (rule_t): New.
13406 (rrhs, rlhs): Remove, part of state_t.
13407 * src/print_graph.c, src/closure.c, src/conflicts.c, src/derives.c,
13408 * src/lalr.c, src/nullable.c, src/output.c, src/print.c,
13409 * src/reader.c, src/reduce.c: Adjust.
13411 2001-11-19 Akim Demaille <akim@epita.fr>
13413 * src/reader.c (symbols_output): New, extracted from...
13414 (packsymbols): Here.
13417 2001-11-19 Akim Demaille <akim@epita.fr>
13419 * src/lalr.c (set_maxrhs, maxrhs): Remove, replaced with...
13420 (maxrhs): this new function.
13422 2001-11-19 Akim Demaille <akim@epita.fr>
13424 * src/lalr.c (F): New macro to access the variable F.
13427 2001-11-19 Akim Demaille <akim@epita.fr>
13429 * src/lalr.h (LA): New macro to access the variable LA.
13430 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
13431 * src/lalr.c: Adjust.
13433 2001-11-19 Akim Demaille <akim@epita.fr>
13435 * src/lalr.c (initialize_LA): Only initialize LA. Let...
13436 (set_state_table): handle the `lookaheads' members.
13438 2001-11-19 Akim Demaille <akim@epita.fr>
13440 * src/lalr.h (lookaheads): Removed array, whose contents is now
13442 (state_t): this structure.
13443 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
13446 2001-11-19 Akim Demaille <akim@epita.fr>
13448 * src/lalr.h (consistent): Removed array, whose contents is now
13450 (state_t): this structure.
13451 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
13454 2001-11-19 Akim Demaille <akim@epita.fr>
13456 * src/lalr.h (reduction_table, shift_table): Removed arrays, whose
13457 contents are now members of...
13458 (state_t): this structure.
13459 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
13462 2001-11-19 Akim Demaille <akim@epita.fr>
13464 * src/lalr.h (state_t): New.
13465 (state_table): Be a state_t * instead of a core **.
13466 (accessing_symbol): Remove, part of state_t.
13467 * src/lalr.c: Adjust.
13468 (set_accessing_symbol): Merge into...
13469 (set_state_table): this.
13470 * src/print_graph.c, src/conflicts.c: Adjust.
13472 2001-11-14 Akim Demaille <akim@epita.fr>
13474 * tests/calc.at, tests/output.at, tests/regression.at,
13475 * tests/testsuite.at, tests/torture.at: Rely on Autotest 2.52g:
13476 now the tests are run in private dirs, therefore AC_CLEANUP and
13477 family can be simplified to 0-ary.
13478 * tests/atlocal.in: Now that we run `elsewhere' than in tests/,
13479 use abs. path to find config.h.
13480 * tests/calc.at (AT_CHECK_CALC): Don't try to check the compiler's
13481 stderr, there can be way too much random noise.
13482 Instead pass -Werror to GCC and rely on the exit status.
13483 Reported by Wolfram Wagner.
13485 2001-11-14 Akim Demaille <akim@epita.fr>
13487 * src/bison.simple (yyparse): Let yyls1, yyss1 and yyvs1 be
13488 defined only if yyoverflow is defined, to avoid `warning: unused
13490 Reported by The Test Suite.
13492 2001-11-14 Akim Demaille <akim@epita.fr>
13494 * src/print.c: Include reduce.h.
13495 Reported by Hans Aberg.
13497 2001-11-14 Akim Demaille <akim@epita.fr>
13499 * src/lex.c, src/lex.h (token_buffer, unlexed_token_buffer):
13500 Revert a previous patch: these are really const.
13501 * src/conflicts.c (conflict_report): Additional useless pair of
13502 braces to pacify GCC's warnings for `if () if () {} else {}'.
13503 * src/lex.c (parse_percent_token): Replace equal_offset with
13506 Be sure to strdup `arg' when used, since there is no reason for
13507 token_buffer not to change.
13509 2001-11-14 Akim Demaille <akim@epita.fr>
13511 * src/system.h (EXIT_SUCCESS, EXIT_FAILURE): Ensure a proper
13513 * src/main.c (main): Use them.
13514 Suggested by Hans Aberg.
13516 2001-11-12 Akim Demaille <akim@epita.fr>
13518 * src/system.h (ngettext): Now that we use ngettext, be sure to
13519 provide a default definition when NLS are not used.
13521 2001-11-12 Akim Demaille <akim@epita.fr>
13523 * doc/bison.texinfo: Use `$' as shell prompt, not `%'.
13524 Use @kbd to denote user input.
13525 (Language and Grammar): ANSIfy the example.
13526 Adjust its layout for info/notinfo.
13527 (Location Tracking Calc): Output error messages to stderr.
13528 Output locations in a more GNUtically correct way.
13529 Fix a couple of Englishos.
13530 Adjust @group/@end group pairs.
13532 2001-11-12 Akim Demaille <akim@epita.fr>
13534 %expect was not functioning at all.
13536 * src/conflicts.c (expected_conflicts): Set to -1.
13537 (conflict_report): Use ngettext.
13538 (conflicts_print): Check %expect and make its violation an error.
13539 * doc/bison.texinfo (Expect Decl): Adjust.
13540 * configure.in (AM_GNU_GETTEXT): Ask for ngettext.
13541 * tests/regression.at (%expect not enough, %expect right)
13542 (%expect too much): New.
13544 2001-11-12 Akim Demaille <akim@epita.fr>
13546 * tests/regression.at (Conflicts): Rename as...
13547 (Unresolved SR Conflicts): this.
13548 (Solved SR Conflicts): New.
13550 2001-11-12 Akim Demaille <akim@epita.fr>
13552 * src/reduce.c (print_results): Rename as...
13553 (reduce_output): This.
13554 Output to OUT, passed as argument, instead of output_obstack.
13555 (dump_grammar): Likewise.
13556 (reduce_free): New.
13558 (reduce_grammar): No longer call reduce_output, since...
13559 * src/print.c (print_results): do it.
13560 * src/main.c (main): Call reduce_free;
13562 2001-11-12 Akim Demaille <akim@epita.fr>
13564 * src/conflicts.c (print_reductions): Accept OUT as argument.
13565 Output to it, not to output_obstack.
13566 * src/print.c (print_actions): Adjust.
13568 2001-11-12 Akim Demaille <akim@epita.fr>
13570 * src/conflicts.c (count_sr_conflicts, count_rr_conflicts): Return
13571 the result instead of using...
13572 (src_total, rrc_total, src_count, rrc_count): Remove.
13573 (any_conflicts): Remove.
13574 (print_conflicts): Split into...
13575 (conflicts_print, conflicts_output): New.
13576 * src/conflicts.h: Adjust.
13577 * src/main.c (main): Invoke both conflicts_output and conflicts_print.
13578 * src/print.c (print_grammar): Issue `\n' between two rules.
13579 * tests/regression.at (Conflicts): New.
13580 Reported by Tom Lane.
13582 2001-11-12 Akim Demaille <akim@epita.fr>
13584 * tests/regression.at (Invalid input): Remove, duplicate with
13585 ``Invalid input: 1''.
13587 2001-11-12 Akim Demaille <akim@epita.fr>
13589 * tests/torture.at (AT_DATA_STACK_TORTURE)
13590 (Exploding the Stack Size with Alloca)
13591 (Exploding the Stack Size with Malloc): New.
13593 2001-11-12 Akim Demaille <akim@epita.fr>
13595 * src/bison.simple (YYSTACK_REALLOC): New.
13596 (yyparse) [!yyoverflow]: Use it and free the old stack.
13597 Reported by Per Allansson.
13599 2001-11-12 Pascal Bart <pascal.bart@epita.fr>
13601 * src/bison.simple: Define type yystype instead of YYSTYPE, and
13602 define CPP macro, which substitute YYSTYPE by yystype.
13603 * src/reader.c (parse_union_decl): Output yystype/YYSTYPE as we do
13604 with yyltype/YYLTYPE. This allows inclusion of the generated
13605 header within the parser if the compiler, such as GGC, accepts
13606 multiple equivalent #defines.
13609 2001-11-05 Akim Demaille <akim@epita.fr>
13611 * src/reader.c (symbols_output): New, extracted from...
13612 (packsymbols): here.
13615 2001-11-05 Akim Demaille <akim@epita.fr>
13617 * src/lex.c (parse_percent_token): s/quotearg/quote/.
13619 2001-11-05 Akim Demaille <akim@epita.fr>
13621 * tests/regression.at (AT_TEST_CPP_GUARD_H): Adjust the clean up
13624 2001-11-05 Akim Demaille <akim@epita.fr>
13626 * src/options.h (struct option_table_struct): set_flags is void*.
13627 * src/options.c (longopts): Support `--output' and `%output'.
13629 * src/lex.h (tok_setopt): Remove, replaced with...
13630 (tok_intopt, tok_stropt): these new guys.
13631 * src/lex.c (getopt.h): Not needed.
13632 (token_buffer, unlexed_token_buffer): Not const.
13633 (percent_table): Promote `-' over `_' in directive names.
13634 Active `%name-prefix', `file-prefix', and `output'.
13635 (parse_percent_token): Accept possible arguments to directives.
13636 Promote `-' over `_' in directive names.
13638 2001-11-04 Akim Demaille <akim@epita.fr>
13640 * doc/bison.texinfo (Decl Summary): Split the list into
13641 `directives for grammars' and `directives for bison'.
13643 Add description of `%name-prefix', `file-prefix', and `output'.
13644 Promote `-' over `_' in directive names.
13645 (Bison Options): s/%locactions/%locations/. Nice Freudian slip.
13646 Simplify the description of `--name-prefix'.
13647 Promote `-' over `_' in directive names.
13648 Promote `--output' over `--output-file'.
13649 Fix the description of `--defines'.
13650 * tests/output.at: Exercise %file-prefix and %output.
13652 2001-11-02 Akim Demaille <akim@epita.fr>
13654 * doc/refcard.tex: Update.
13656 2001-11-02 Akim Demaille <akim@epita.fr>
13658 * src/symtab.h (SUNDEF): New.
13659 * src/symtab.c (bucket_new): Init user_token_number to SUNDEF to
13660 stand for `uninitialized', instead of 0.
13661 * src/reader.c (packsymbols, parse_thong_decl): Adjust.
13662 * src/lex.c (lex): Adjust.
13664 * tests/calc.at (_AT_DATA_CALC_Y): Declare a token for EOF.
13666 Let yylex return it instead of a plain 0.
13667 Reported by Dick Streefland.
13669 2001-11-02 Akim Demaille <akim@epita.fr>
13671 * tests/regression.at (Mixing %token styles): New test.
13673 2001-11-02 Akim Demaille <akim@epita.fr>
13675 * src/reader.c (parse_thong_decl): Formatting changes.
13676 (token_translations_init): New, extracted from...
13677 (packsymbols): Here.
13680 2001-11-01 Akim Demaille <akim@epita.fr>
13682 * tests/regression.at (AT_TEST_CPP_GUARD_H): New.
13683 Check that `9foo.y' produces correct cpp guards.
13684 * src/files.c (compute_header_macro): Prepend `BISON_' to CPP
13688 2001-11-01 Akim Demaille <akim@epita.fr>
13690 * tests/regression.at (Invalid input: 2): New.
13691 * src/lex.c (unlexed_token_buffer): New.
13692 (lex, unlex): Adjust: when unlexing, be sure to save token_buffer
13696 2001-11-01 Akim Demaille <akim@epita.fr>
13698 * tests/calc.at: Catch up with 1.30.
13699 * configure.in: Bump to 1.49a.
13700 Adjust to newer Autotest.
13702 2001-10-19 Pascal Bart <pascal.bart@epita.fr>
13704 * src/conflicts.c: Move global variables rrc_total and src_total ...
13705 (print_conflicts): here.
13706 * src/output.c (output): Free global variable user_toknums.
13707 * src/lex.c (token_obstack): Become static.
13709 2001-10-18 Akim Demaille <akim@epita.fr>
13711 * tests/atlocal.in (GCC): Add.
13712 * tests/calc.at: s/m4_match/m4_bmatch/.
13713 s/m4_patsubst/m4_bpatsubst/.
13714 (AT_CHECK_CALC): Check the compiler's stderr only if it's GCC.
13715 * configure.in: AC_SUBST(GCC).
13717 2001-10-14 Marc Autret <autret_m@epita.fr>
13719 * src/options.c (create_long_option_table): Fix.
13721 2001-10-10 Akim Demaille <akim@epita.fr>
13723 * src/bison.simple: Be sure to set YYSTACK_USE_ALLOCA.
13725 2001-10-04 Akim Demaille <akim@epita.fr>
13727 * src/reader.c (parse_union_decl): Push the caracters in
13728 union_obstack, not attrs_obstack.
13730 2001-10-04 Akim Demaille <akim@epita.fr>
13732 Merge in the branch 1.29.
13734 * src/reader.c (packsymbols): Use a temporary obstack for
13735 `%%tokendef', since output_stack is already used elsewhere.
13737 2001-10-02 Akim Demaille <akim@epita.fr>
13741 2001-10-02 Akim Demaille <akim@epita.fr>
13745 2001-10-02 Akim Demaille <akim@epita.fr>
13747 * tests/regression.at (Invalid CPP headers): New.
13748 From Alexander Belopolsky.
13749 * src/files.c (compute_header_macro): Map non alnum chars to `_'.
13751 2001-10-02 Akim Demaille <akim@epita.fr>
13753 * tests/regression.at (Invalid input): New.
13754 * src/lex.c (lex): Be sure to set `token_buffer' in any case.
13757 2001-10-02 Akim Demaille <akim@epita.fr>
13759 * tests/calc.at: Now that --debug works, the tests must be adjusted.
13761 2001-10-02 Akim Demaille <akim@epita.fr>
13763 * src/output.c (output_parser): Assert `skeleton'.
13764 * src/files.c (skeleton_find): Look harder for skeletons on DOSish
13768 2001-10-01 Marc Autret <autret_m@epita.fr>
13770 * src/lex.h: Echo modifications.
13771 * src/lex.c (unlex): Parameter is now token_t.
13774 2001-10-01 Marc Autret <autret_m@epita.fr>
13776 * src/main.c: Include lex.h.
13779 2001-09-29 Akim Demaille <akim@epita.fr>
13781 * src/getargs.c (longopts): `--debug' is `-t', not `-d'.
13783 2001-09-28 Akim Demaille <akim@epita.fr>
13785 * tests/testsuite.at: Update to newer Autotest.
13786 * tests/Makefile.am (EXTRA_DIST): bison is not to be shipped.
13788 2001-09-27 Akim Demaille <akim@epita.fr>
13790 Position independent wrapper.
13792 * tests/bison: Remove.
13793 * tests/bison.in: New.
13794 * configure.in: Adjust.
13796 2001-09-27 Paul Eggert <eggert@twinsun.com>
13798 Port quotearg fixes from tar 1.13.24.
13800 * lib/quotearg.c: BSD/OS 4.1 wchar.h requires FILE and struct
13802 (HAVE_MBSINIT): Undef if !HAVE_MBRTOWC.
13803 (mbsinit): Define to 1 if !defined mbsinit && !HAVE_MBSINIT.
13805 * m4/Makefile.am (EXTRA_DIST): Add mbrtowc.m4.
13806 * m4/mbrtowc.m4: New file.
13807 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Check for mbsinit and stddef.h.
13808 Use jm_FUNC_MBRTOWC instead of AC_CHECK_FUNCS(mbrtowc).
13810 2001-09-27 Akim Demaille <akim@epita.fr>
13814 2001-09-27 Akim Demaille <akim@epita.fr>
13818 2001-09-25 Akim Demaille <akim@epita.fr>
13820 * src/system.h: Include `xalloc.h'.
13821 Remove it from the C files.
13822 * src/files.c (output_files): Free the obstacks.
13823 * src/lex.c (init_lex): Rename as...
13826 * src/main.c (main): Use it.
13828 2001-09-24 Marc Autret <autret_m@epita.fr>
13830 * src/vcg.c (open_edge, close_edge, open_node, close_node): Change
13831 to output informations in fout (FILE*).
13832 (open_graph, close_graph): Likewise.
13833 (output_graph, output_edge, output_node): Likewise.
13834 * src/vcg.h: Update function prototypes.
13835 * src/print_graph.c (print_graph): Open output graph file.
13836 (print_actions): Adjust.
13837 * src/files.h: Remove extern declaration.
13838 * src/files.c: Remove graph_obstack declaration.
13839 (open_files): Remove graph_obstack initialization.
13840 (output_files): Remove graph_obstack saving.
13842 2001-09-24 Marc Autret <autret_m@epita.fr>
13844 * src/files.c (compute_output_file_names): Fix.
13846 2001-09-24 Marc Autret <autret_m@epita.fr>,
13847 Akim Demaille <akim@epita.fr>
13849 * src/reader.c (reader): Remove call to free_symtab ().
13850 * src/main.c (main): Call it here.
13852 * src/conflicts.c (initialize_conflicts): Rename as...
13853 (solve_conflicts): this.
13854 * src/print.c (print_core, print_actions, print_state)
13855 (print_grammar): Dump to a file instead a `output_obstack'.
13856 (print_results): Dump `output_obstack', and then proceed with the
13858 * src/files.c (compute_output_file_names, close_files): New.
13859 (output_files): Adjust.
13860 * src/main.c (main): Adjust.
13862 2001-09-23 Marc Autret <autret_m@epita.fr>
13864 * src/files.c (compute_header_macro): Computes header macro name
13865 from spec_defines_file when given.
13867 2001-09-23 Marc Autret <autret_m@epita.fr>
13869 * src/files.c (output_files): Add default extensions.
13871 2001-09-22 Akim Demaille <akim@epita.fr>
13873 * src/conflicts.c (finalize_conflicts): Rename as...
13874 (free_conflicts): this.
13876 2001-09-22 Akim Demaille <akim@epita.fr>
13878 * src/gram.c (gram_free): Rename back as...
13880 (output_token_translations): Free `token_translations'.
13881 * src/symtab.c (free_symtab): Free the tag field.
13883 2001-09-22 Akim Demaille <akim@epita.fr>
13885 Remove `translations' as it is always set to true.
13887 * src/gram.h: Adjust.
13888 * src/reader.c (packsymbols, parse_token_decl): Adjust
13889 * src/print.c (print_grammar): Adjust.
13890 * src/output.c (output_token_translations): Adjust.
13891 * src/lex.c (lex): Adjust.
13892 * src/gram.c: Be sure the set pointers to NULL.
13893 (dummy): Rename as...
13896 2001-09-22 Akim Demaille <akim@epita.fr>
13898 * configure.in: Invoke AM_LIB_DMALLOC.
13899 * src/system.h: Use dmalloc.
13900 * src/LR0.c: Be sure to have pointers initialized to NULL.
13901 (allocate_itemsets): Allocate kernel_items only if needed.
13903 2001-09-22 Akim Demaille <akim@epita.fr>
13905 * configure.in: Bump to 1.29b.
13906 * tests/Makefile.am (DISTCLEANFILES): Add package.m4.
13907 * tests/calc.at (_AT_DATA_CALC_Y): #undef malloc so that we don't
13908 need xmalloc.c in calc.y.
13911 2001-09-21 Akim Demaille <akim@epita.fr>
13914 * Makefile.maint, config/config.guess, config/config.sub,
13915 * config/missing: Update from masters.
13916 * tests/Makefile.am ($(srcdir)/$(TESTSUITE)): No longer depend
13918 * configure.in (ALL_LINGUAS): Add `tr'.
13920 2001-09-21 Akim Demaille <akim@epita.fr>
13922 * tests/Makefile.am (package.m4): Move to...
13923 ($(srcdir)/$(TESTSUITE)): here.
13925 2001-09-20 Akim Demaille <akim@epita.fr>
13927 * src/complain.c: No longer try to be standalone: use system.h.
13928 Don't assume __STDC__ is defined to 1. Just test if it is defined.
13929 * src/complain.h: Likewise.
13930 * src/reduce.c (useless_nonterminals, inaccessable_symbols):
13931 Remove the unused variable `n'.
13932 From Albert Chin-A-Young.
13934 2001-09-18 Marc Autret <autret_m@epita.fr>
13936 * doc/bison.1: Update.
13937 * doc/bison.texinfo (Bison Options): Update --defines and --graph
13939 (Option Cross Key): Update.
13942 2001-09-18 Marc Autret <autret_m@epita.fr>
13944 * tests/regression.at: New test (comment in %union).
13946 2001-09-18 Marc Autret <autret_m@epita.fr>
13948 * src/reader.c (parse_union_decl): Do not output '/'. Let copy_comment
13950 Reported by Keith Browne.
13952 2001-09-18 Marc Autret <autret_m@epita.fr>
13954 * tests/output.at: Add tests for --defines and --graph.
13956 2001-09-18 Marc Autret <autret_m@epita.fr>
13958 * tests/output.at: Removes tests of %{header,src}_extension features.
13960 2001-09-18 Akim Demaille <akim@epita.fr>
13962 * tests/Makefile.am (package.m4): New.
13963 * tests/calc.at (_AT_CHECK_CALC): Just run `calc input'.
13964 (_AT_CHECK_CALC_ERROR): Likewise.
13965 Factor the `, ' part of verbose error messages.
13967 2001-09-18 Marc Autret <autret_m@epita.fr>
13969 * src/getargs.c (longopts): Declare --defines and --graph as options
13970 with optional arguments.
13971 * src/files.h: Add extern declarations.
13972 * src/files.c (spec_graph_file, spec_defines_file): New.
13973 (output_files): Update.
13974 Remove CPP-outed code.
13976 2001-09-18 Marc Autret <autret_m@epita.fr>
13978 Turn off %{source,header}_extension feature.
13980 * src/files.c (compute_exts_from_gf): Update.
13981 (compute_exts_from_src): Update.
13982 (output_files): CPP-out useless code.
13983 * src/files.h: Remove {header,source}_extension extern declarations.
13984 * src/reader.c (parse_dquoted_param): CPP-out.
13985 (parse_header_extension_decl): Remove.
13986 (parse_source_extension_decl): Remove.
13987 (read_declarations): Remove cases tok_{hdrext,srcext}.
13988 * src/lex.c (percent_table): Remove {header,source}_extension entries.
13989 * src/lex.h (token_t): Remove tok_hdrext and tok_srcext.
13991 2001-09-10 Akim Demaille <akim@epita.fr>
13993 * tests/output.at (AT_CHECK_BISON_FLAGS, AT_CHECK_BISON_PERCENT):
13994 (AT_CHECK_BISON_PERCENT_FLAGS): Merge into...
13995 (AT_CHECK_OUTPUT): this.
13996 Merely check ls' exit status, its output is useless.
13998 2001-09-10 Akim Demaille <akim@epita.fr>
14000 * tests/calc.at: Use m4_match.
14001 (_AT_DATA_CALC_Y): Check `yyin != NULL', not `stdin != NULL'.
14003 2001-09-10 Marc Autret <autret_m@epita.fr>,
14004 Akim Demaille <akim@epita.fr>
14006 * src/vcg.h (graph_s): color, textcolor, bordercolor are now
14008 * src/print_graph.c (print_graph): Initalize graph.layoutalgorithm
14010 * src/reader.c (parse_token_decl): Initialize token with tok_eof.
14011 * src/lex.h: Adjust prototype.
14012 (token_t): Add `tok_undef'.
14013 * src/lex.c (struct percent_table_struct): Retval is now a token_t.
14014 (parse_percent_token): Now returns token_t.
14015 Add default statement in switch.
14016 (lex): Separate `c' as an input variable, from the token_t result
14018 (unlexed): Is a token_t.
14020 2001-09-10 Akim Demaille <akim@epita.fr>
14022 * configure.in: Bump to 1.29a.
14024 2001-09-07 Akim Demaille <akim@epita.fr>
14028 2001-08-30 Akim Demaille <akim@epita.fr>
14030 * tests/atgeneral.m4, tests/atconfig.in, tests/suite.at: Remove.
14031 * m4/atconfig.m4: Remove.
14032 * tests/testsuite.at, tests/atlocal.in, tests/output.at,
14033 * tests/bison: New.
14034 * tests/regression.at, tests/calc.at: Use m4_define, AT_BANNER,
14035 m4_if, m4_patsubst, and m4_regexp.
14036 * tests/calc.at (_AT_CHECK_CALC, _AT_CHECK_CALC_ERROR): Use an
14037 `input' file instead of echo.
14039 2001-08-29 Akim Demaille <akim@epita.fr>
14043 2001-08-29 Akim Demaille <akim@epita.fr>
14047 2001-08-29 Paul Eggert <eggert@twinsun.com>
14049 * src/bison.simple (yyparse): Don't take the address of an
14050 item before the start of an array, as that doesn't conform to
14053 2001-08-29 Robert Anisko <anisko_r@epita.fr>
14055 * doc/bison.texinfo (Location Tracking Calc): New node.
14057 2001-08-29 Paul Eggert <eggert@twinsun.com>
14059 * src/output.c (output): Do not define const, as this now
14060 causes more problems than it cures.
14062 2001-08-29 Akim Demaille <akim@epita.fr>
14064 * doc/bison.texinfo: Modernize `@node' and `@top' use: just name
14066 Be sure to tag the `detailmenu'.
14068 2001-08-29 Akim Demaille <akim@epita.fr>
14070 * Makefile.maint (do-po-update): Wget refuses to overwrite files:
14071 download in a tmp dir.
14073 2001-08-28 Marc Autret <autret_m@epita.fr>
14075 * config/depcomp: New file.
14077 2001-08-28 Marc Autret <autret_m@epita.fr>
14079 * doc/bison.1 (mandoc): Adjust.
14080 From Juan Manuel Guerrero.
14082 2001-08-28 Marc Autret <autret_m@epita.fr>
14084 * src/print_graph.c (print_state): Fix.
14086 2001-08-27 Marc Autret <autret_m@epita.fr>
14088 * src/vcg.h (classname_s, infoname_s, node_s): Constify the
14090 Echo modifications to the functions prototypes.
14091 * src/vcg.c (add_classname, add_infoname): Adjust arguments.
14093 2001-08-27 Marc Autret <autret_m@epita.fr>
14095 * src/vcg.c: Include `xalloc.h'.
14096 (add_colorentry): New.
14097 (add_classname): New.
14098 (add_infoname): New.
14099 * src/vcg.h: Add new prototypes.
14101 2001-08-27 Akim Demaille <akim@epita.fr>
14103 * Makefile.maint: Sync. again with CVS Autoconf.
14105 2001-08-27 Akim Demaille <akim@epita.fr>
14107 * Makefile.maint: Formatting changes.
14108 (po-update, cvs-update, update): New targets.
14111 2001-08-27 Akim Demaille <akim@epita.fr>
14113 * Makefile.am (AUTOMAKE_OPTIONS): 1.5.
14114 * Makefile.maint: Sync. with CVS Autoconf.
14116 2001-08-27 Marc Autret <autret_m@epita.fr>
14118 * src/vcg.h (struct infoname_s): New.
14119 (struct colorentry_s): New.
14120 (graph_s): New fields {vertical,horizontal}_order in structure.
14121 Add `infoname' field.
14122 Add `colorentry' field;
14123 * src/vcg_defaults.h (G_VERTICAL_ORDER): New.
14124 (G_HORIZONTAL_ORDER): New.
14126 (G_COLORENTRY): New.
14127 * src/vcg.c (output_graph): Add output of {vertical,horizontal}_order.
14128 Add output of `infoname'.
14129 Add output of `colorentry'.
14131 2001-08-27 Marc Autret <autret_m@epita.fr>
14133 * src/reader.c (parse_dquoted_param): Rename variable `index' to `i'.
14134 This one shadowed a global parameter.
14136 2001-08-24 Marc Autret <autret_m@epita.fr>
14138 * src/print_graph.c (node_output_size): Declared POSIX `size_t' type,
14139 instead of `unsigned'.
14140 (print_state): Do not call obstack_object_size () in obstack_grow ()
14141 to avoid macro variables shadowing.
14143 2001-08-23 Marc Autret <autret_m@epita.fr>
14145 * src/lex.c (percent_table): Typo: s/naem/name/.
14147 Normalize new options declarations.
14149 2001-08-20 Pascal Bart <pascal.bart@epita.fr>
14151 * tests/suite.at: Exercise %header_extension and %source_extension.
14153 2001-08-16 Marc Autret <autret_m@epita.fr>
14155 * src/reader.c (parse_dquoted_param): New.
14156 (parse_header_extension_decl): Use it.
14157 (parse_source_extension_decl): Likewise.
14159 2001-08-16 Marc Autret <autret_m@epita.fr>
14161 * src/vcg.c: Remove includes of `complain.h' and `xalloc.h'.
14162 (get_xxxx_str): Use assert () instead of complain ().
14163 Remove return invokations in default cases.
14164 (get_decision_str): Modify default behaviour. Remove second argument.
14165 Echo modifications on calls.
14166 (output_graph): Fix.
14168 2001-08-16 Marc Autret <autret_m@epita.fr>
14170 * src/getargs.c (usage): Update with ``-g, --graph''.
14172 2001-08-16 Marc Autret <autret_m@epita.fr>
14174 * doc/bison.texinfo (Bison Options): Add items `-g', `--graph'.
14175 (Option Cross Key): Likewise.
14176 * doc/bison.1: Update.
14178 2001-09-25 Pascal Bart <pascal.bart@epita.fr>
14180 * src/output.c (output_master_parser): Don't finish action_obstack.
14181 (output_parser): Don't care about the muscle action, here.
14182 (prepare): Copy the action_obstack in the action muscle.
14183 (output): Free action_obstack.
14185 2001-09-23 Pascal Bart <pascal.bart@epita.fr>
14187 * src/reader.c (parse_union_decl): Add new obstack union_obstack. Which
14188 will contain `%union' declaration.
14189 (parse_union_decl): Delete #line directive output.
14190 (parse_union_decl): Substitute /attrs_obstack/union_obstack for all
14191 informations about %union.
14192 (parse_union_decl): Copy the union_obstack in the muscle stype.
14193 * src/bison.simple: Add new #line directive.
14194 Add typdef %%stype YYSTYPE.
14196 2001-09-23 Pascal Bart <pascal.bart@epita.fr>
14198 * src/bison.simple: Add new `#line' directive.
14200 2001-09-22 Pascal Bart <pascal.bart@epita.fr>
14202 * src/bison.simple: New `#line' directive.
14203 * src/output.c (output_parser): Support new dynamic muscle input_line.
14205 2001-09-22 Marc Autret <autret_m@epita.fr>
14207 * src/output.c (output_master_parser): New.
14208 (output_parser): Be more re-entrant.
14210 2001-09-21 Marc Autret <autret_m@epita.fr>
14212 * src/reader.c (copy_definition, parse_union_decl): Update and use
14214 (copy_action): Likewise.
14215 Use obstack_1grow ().
14216 * src/muscle_tab.c (muscle_init): Add muscle `linef'.
14218 2001-09-21 Marc Autret <autret_m@epita.fr>
14220 * src/options.c (option_table): Adjust.
14221 * src/lex.c (parse_percent_token): Fix.
14223 2001-09-20 Pascal Bart <pascal.bart@epita.fr>
14225 * src/options.c (symtab.h): Include it, need by lex.h.
14227 2001-09-20 Pascal Bart <pascal.bart@epita.fr>
14229 * src/lex.c (parse_percent_token): Change type of variable `tx', which
14230 is now an option_table_struct*.
14231 (option_strcmp): New function option_strcmp.
14232 (parse_percent_token): Call option_strcmp.
14233 * src/getargs.c (xalloc.h, options.h): Include it.
14234 (getargs): Call create_long_option_table.
14235 (getargs): Free longopts at the end of the function.
14236 (shortopts): Move in options.c.
14237 * src/options.c (create_long_option_table): New function. Convert
14238 information from option_table to option structure.
14239 * src/reader.c (options.h): Include it.
14241 * src/Makefile.am: Adjust.
14242 * src/options.c (option_table): Create from longopts and percent_table.
14243 * src/getargs.c (longopts): Delete.
14244 * src/lex.c (struct percent_table_struct): Delete.
14245 (percent_table): Delete.
14246 (options.h): Include it.
14247 * src/options.c: Create.
14248 * src/options.h: Create.
14249 Declare enum opt_access_e.
14250 Define struct option_table_struct.
14252 2001-09-20 Marc Autret <autret_m@epita.fr>
14254 * doc/bison.texinfo: Adjust terminologies about prologue and epilogue
14257 2001-09-19 Pascal Bart <pascal.bart@epita.fr>
14259 * src/bison.simple: s/%%filename/%%skeleton.
14260 * src/muscle_tab.c (getargs.h): Include it.
14261 (muscle_init): Insert new muscle skeleton.
14263 2001-09-18 Pascal Bart <pascal.bart@epita.fr>
14265 * src/output.c (output_parser): Delete unused variable actions_dumped.
14267 2001-09-07 Pascal Bart <pascal.bart@epita.fr>
14269 * src/output.c (output): Delete call to reader_output_yylsp.
14270 * src/reader.c (reader): Likewise.
14271 * src/reader.h: Delete declaration of reader_output_yylsp.
14273 2001-09-02 Marc Autret <autret_m@epita.fr>
14275 * src/reader.c: Include muscle_tab.h.
14276 (parse_union_decl): Update.
14277 (parse_macro_decl): Rename parse_muscle_decl.
14278 Update to use renamed functions and variable.
14279 (read_declarations, copy_action, read_additionnal_code, : Updated
14280 with correct variables and functions names.
14281 (packsymbols, reader): Likewise.
14283 * src/reader.h (muscle_obstack): Extern declaration update.
14285 * src/output.c: Include muscle_tab.h
14286 In all functions using macro_insert, change by using muscle_insert ().
14287 (macro_obstack): Rename muscle_obstack.
14288 Echo modifications in the whole file.
14289 (MACRO_INSERT_INT): Rename MUSCLE_INSERT_INT.
14290 (MACRO_INSERT_STRING): Rename MUSCLE_INSERT_STRING.
14291 (MACRO_INSERT_PREFIX): Rename MUSCLE_INSERT_PREFIX.
14293 * src/muscle_tab.h: Update double inclusion macros.
14294 (macro_entry_s): Rename muscle_entry_s.
14297 * src/muscle_tab.c: Include muscle_tab.h.
14298 Rename macro_tabble to muscle_table.
14299 (mhash1, mhash2, mcmp): Use muscle_entry.
14300 (macro_init): Rename muscle_init. Update.
14301 (macro_insert): Rename muscle_insert. Update.
14302 (macro_find): Rename muscle_find. Update.
14304 * src/main.c: Include muscle_tab.h.
14305 (main): Call muscle_init ().
14306 * src/Makefile.am (bison_SOURCES): Echo modifications.
14308 2001-09-02 Marc Autret <autret_m@epita.fr>
14310 Now the files macro_tab.[ch] are named muscle_tab.[ch].
14312 * src/muscle_tab.c, src/muscle_tab.h: Add files.
14314 2001-09-02 Marc Autret <autret_m@epita.fr>
14316 * src/macrotab.c, src/macrotab.h: Remove.
14318 2001-09-01 Pascal Bart <pascal.bart@epita.fr>
14320 * src/reader.c (copy_guard): Use muscle to specify the `#line'
14323 2001-09-01 Marc Autret <autret_m@epita.fr>
14325 * tests/calc.at (exp): Now, YYERROR_VERBOSE need to be set
14326 to an explicit value to activate the feature. We do it here.
14328 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
14330 * src/output.c (prepare): Delete the `filename' muscule insertion.
14331 * src/reader.c (copy_action): Use `filename' muscule with `#line'.
14332 (parse_union_decl): Likewise.
14333 * src/macrotab.c (macro_init): Initialize filename by infile.
14335 2001-08-31 Marc Autret <autret_m@epita.fr>
14337 * src/bison.simple (YYLSP_NEEDED): New definition.
14338 * src/output.c (prepare): Add macro insertion of `locations_flag'
14340 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
14342 * src/output.c (prepare): Delete insertion of previous muscles,
14343 and insert the `prefix' muscles.
14344 * src/macrotab.c (macro_init): Likewise.
14345 (macro_init): Initialization prefix directive by `yy'.
14346 * src/bison.simple: Substitute all %%yylex, %%yychar, %%yylval,
14347 %%yydebug, %%yyerror, %%yynerrs and %%yyparse by yylex, yychar,
14348 yylval, yydebug, yyerror, yynerrs and yyparse.
14349 New directive `#define' to substitute yydebug, ... with option
14352 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
14354 * src/main.c (main): Standardize.
14355 * src/output.c (output_table_data, output_parser): Likewise.
14356 * src/macrotab.h, src/macrotab.c, src/bison.simple: Likewise.
14358 2001-08-31 Pascal Bart <pascal.bart@epita.fr>, Marc Autret <autret_m@epita.fr>
14360 * src/reader.c (read_additionnal_code): Rename %%user_code to
14362 * src/output.c (output): Rename %%declarations to %%prologue.
14363 * src/bison.simple: Echo modifications.
14365 2001-08-31 Marc Autret <autret_m@epita.fr>
14367 * src/reader.c (readgram): CleanUp.
14368 (output_token_defines): Likewise.
14369 (packsymbols): Likewise.
14370 (reader): Likewise.
14371 * src/output.c (output): CPP-out useless code.
14373 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
14375 * src/reader.c (reader): Delete obsolete call to function
14376 output_trailers and output_headers.
14377 * src/output.h: Remove obsolete functions prototypes of output_headers
14378 and output_trailers.
14380 2001-08-30 Pascal Bart <pascal.bart@epita.fr>
14382 * src/main.c: Include macrotab.h.
14383 * src/macrotab.h (macro_entry_s): Constify fields.
14384 Adjust functions prototypes.
14385 * src/macrotab.c (macro_insert): Constify key and value.
14386 (macro_find): Constify key.
14387 (macro_insert): Include 'xalloc.h'
14388 (macro_insert): Use XMALLOC.
14389 (macro_find): Constify return value.
14390 * src/output.c (output_table_data): Rename table to table_data.
14391 (output_parser): Constify macro_key, macro_value.
14393 2001-08-30 Marc Autret <autret_m@epita.fr>
14395 * src/reader.c (parse_skel_decl): New.
14396 (read_declarations): Add case `tok_skel', call parse_skel_decl ().
14397 * src/lex.h (token_t): New token `tok_skel'.
14398 * src/lex.c (percent_table): Add skeleton option entry.
14401 2001-08-29 Marc Autret <autret_m@epita.fr>
14403 * src/bison.simple: Add %%user_code directive at the end.
14404 * src/reader.c (read_additionnal_code): New.
14406 * src/output.c (output_program): Remove.
14409 2001-08-28 Marc Autret <autret_m@epita.fr>
14411 * src/output.c (output_actions): Clean up.
14412 (output_gram): CPP-out useless code.
14413 * src/reader.c (reader): Clean up, CPP-out useless code.
14415 2001-08-28 Pascal Bart <pascal.bart@epita.fr>
14417 * src/output.c (output): Copy attrs_obstack in the '%%definitions'
14419 * src/bison.simple: Add `%%definitions'.
14421 2001-08-28 Marc Autret <autret_m@epita.fr>
14423 * config/depcomp: New file.
14425 2001-08-27 Paul Eggert <eggert@twinsun.com>
14427 * src/bison.simple (yyparse): Don't take the address of an
14428 item before the start of an array, as that doesn't conform to
14431 2001-08-27 Robert Anisko <robert.anisko@epita.fr>
14433 * src/output.c (output): Remove the initialization of the macro
14434 obstack. It was done too late here.
14436 * src/reader.c (parse_macro_decl): Fix. Use of the macro obstack was
14438 (reader): Initialize the macro obstack here, since we need it to grow
14439 '%define' directives.
14441 * src/reader.h: Declare the macro obstack as extern.
14443 2001-08-27 Robert Anisko <robert.anisko@epita.fr>
14445 * src/output.c (output_parser): Fix. Store single '%' characters in
14446 the output obstack instead of throwing them away.
14448 2001-08-27 Akim Demaille <akim@epita.fr>
14450 * Makefile.am (AUTOMAKE_OPTIONS): 1.5.
14452 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
14454 * lib/Makefile.am: Adjust.
14456 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
14458 * src/bison.simple: Update and add '%%' directives.
14460 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
14462 * src/reader.c (reader): Remove calls to 'output_headers' and
14463 'output_trailers'. Remove some C output.
14464 (readgram): Disable a piece of code that was writing a default
14465 definition for 'YYSTYPE'.
14466 (reader_output_yylsp): Remove.
14467 (packsymbols): Output token defintions to a macro.
14468 (copy_definition): Disable C output.
14470 * src/reader.c (parse_macro_decl): New function used to parse macro
14472 (copy_string2): Put the body of copy_string into this new function.
14473 Add a parameter to let the caller choose whether he wants to copy the
14474 string delimiters or not.
14475 (copy_string): Be a simple call to copy_string2 with the last argument
14477 (read_declarations): Add case for macro definition.
14478 (copy_identifier): New.
14479 (parse_macro_decl): Read macro identifiers using copy_identifier
14482 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
14484 * src/output.c (prepare): Add prefixed names.
14485 (output_parser): Output semantic actions.
14486 (output_parser): Fix bug on '%%line' directives.
14488 * src/output.c (output_headers): Remove. The C code printed by this
14489 function should now be in the skeletons.
14490 (output_trailers): Remove.
14491 (output): Disable call to 'reader_output_yylsp'.
14492 (output_rule_data): Do not output tables to the table obstack.
14494 * src/output.c: Remove some C dedicated output.
14495 Improve the use of macro and output obstacks.
14496 (output_defines): Remove.
14498 * src/output.c (output_token_translations): Associate 'translate'
14499 table with a macro. No output to the table obstack.
14500 (output_gram): Same for 'rhs' and 'prhs'.
14501 (output_stos): Same for 'stos'.
14502 (output_rule_data): Same for 'r1' and 'r2'.
14503 (token_actions): Same for 'defact'.
14504 (goto_actions): Same for 'defgoto'.
14505 (output_base): Same for 'pact' and 'pgoto'.
14506 (output_table): Same for 'table'.
14507 (output_check): Same for 'check'.
14509 * src/output.c (output_table_data): New function.
14510 (output_short_table): Remove.
14511 (output_short_or_char_table): Remove.
14513 * src/output.c (output_parser): Replace most of the skeleton copy code
14514 with something new. Skeletons are now processed character by character
14515 rather than line by line, and Bison looks for '%%' macros. This is the
14516 first step in making Bison's output process (a lot) more flexible.
14517 (output_parser): Use the macro table.
14519 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
14521 * src/main.c (main): Initialize the macro table.
14523 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
14525 * src/lex.c (percent_table): Add tok_define.
14526 * src/lex.h: Add tok_define.
14528 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
14530 * src/macrotab.c: New file.
14531 * src/macrotab.h: New file.
14532 * src/Makefile.am: Update.
14534 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
14536 * lib/hash.c: New file.
14537 * lib/hash.h: New file.
14538 * lib/Makefile.am: Update.
14540 2001-08-15 Akim Demaille <akim@epita.fr>
14544 2001-08-15 Marc Autret <autret_m@epita.fr>
14546 * src/reader.c (readgram): Indent output macro YYSTYPE.
14547 (packsymbols): Likewise.
14548 (output_token_defines): Likewise.
14549 * src/files.c: Standardize.
14550 (compute_header_macro): New.
14551 (defines_obstack_save): New. Use compute_header_macro.
14552 (output_files): Update. Use defines_obstack_save.
14554 2001-08-15 Akim Demaille <akim@epita.fr>
14556 * doc/bison.texinfo (Table of Symbols): Document
14557 YYSTACK_USE_ALLOCA.
14559 2001-08-15 Akim Demaille <akim@epita.fr>
14561 * missing: Update from CVS Automake.
14562 * config/config.guess, config/config.sub, config/texinfo.tex:
14563 Update from gnu.org.
14565 2001-08-15 Akim Demaille <akim@epita.fr>
14567 * Makefile.maint: Sync with CVS Autoconf.
14569 2001-08-14 Pascal Bart <pascal.bart@epita.fr>
14571 * doc/bison.texinfo: Include GNU Free Documentation License from
14573 * doc/fdl.texi: Add to package.
14575 2001-08-14 Marc Autret <autret_m@epita.fr>
14577 Turn on %{source,header}_extension features.
14579 * src/lex.c (percent_table): Un-CPP out header_extension and
14581 * src/files.c (compute_exts_from_gf): Compare pointers with NULL.
14582 (compute_exts_from_src): Remove conditions. It restores priorities
14585 2001-08-14 Marc Autret <autret_m@epita.fr>
14587 * src/files.c (compute_base_names): Add extensions computing when
14588 `--file-prefix' used.
14589 Standardize function calls.
14591 2001-08-13 Marc Autret <autret_m@epita.fr>
14593 * src/bison.simple (YYSTACK_USE_ALLOCA): Changed to allow users
14594 defining it (defined but null disables alloca).
14596 2001-08-13 Marc Autret <autret_m@epita.fr>
14598 * src/bison.simple (_yy_memcpy): CPP reformat.
14600 2001-08-13 Pascal Bart <pascal.bart@epita.fr>
14602 * tests/atconfig.in (CPPFLAGS): Fix.
14604 2001-08-10 Pascal Bart <pascal.bart@epita.fr>
14606 * doc/bison.texinfo: Include GNU General Public License from
14608 * doc/gpl.texi: Add to package.
14610 2001-08-10 Marc Autret <autret_m@epita.fr>
14612 * src/print_graph.h: Fix.
14613 * src/reader.c (read_declarations): Use parse_header_extension_decl ().
14615 2001-08-10 Akim Demaille <akim@epita.fr>
14617 * src/system.h: Provide default declarations for stpcpy, strndup,
14620 2001-08-10 Robert Anisko <anisko_r@epita.fr>
14622 * doc/bison.texinfo (Locations): Update @$ stuff.
14624 2001-08-09 Robert Anisko <anisko_r@epita.fr>
14626 * src/bison.simple (YYLLOC_DEFAULT): Update.
14629 2001-08-08 Marc Autret <autret_m@epita.fr>
14631 * doc/bison.texinfo: Change @samp{$<@dots{}>} to
14632 @samp{$<@dots{}>@var{n}} in Section Actions in Mid-Rule.
14633 Reported by Fabrice Bauzac.
14635 2001-08-08 Marc Autret <autret_m@epita.fr>
14637 * src/vcg_default.h: Use NULL instead of 0 to initialize pointers.
14638 * src/vcg.c (output_node): Fix.
14639 * src/vcg.h: Cleanup.
14640 * src/print_graph.c: Add comments.
14641 (node_output_size): New global variable. Simplify the formatting of
14642 the VCG graph output.
14643 (print_actions): Unused code is now used. It notifies the final state
14644 and no action states in the VCG graph. It also give the reduce actions.
14645 The `shift and goto' edges are red and the `go to state' edges are
14647 Get the current node name and node_obstack by argument.
14648 (node_obstack): New variable.
14649 (print_state): Manage node_obstack.
14650 (print_core): Use node_obstack given by argument.
14651 A node is not only computed here but in print_actions also.
14652 (print_graph): CPP out useless code instead of commenting it.
14654 2001-08-07 Pascal Bart <pascal.bart@epita.fr>
14656 * tests/atconfig.in (CPPFLAGS): Fix.
14658 2001-08-07 Akim Demaille <akim@epita.fr>
14660 * src/print_graph.c (quote): New.
14661 (print_core): Use it.
14663 2001-08-06 Akim Demaille <akim@epita.fr>, Marc Autret <autret_m@epita.fr>
14665 * src/vcg.c (complain.h): Include it.
14666 Unepitaize `return' invocations.
14667 [NDEBUG] (main): Remove.
14668 * src/vcg.h (node_t, edge_t, graph_t): Constify the char * members.
14669 * src/files.c (open_files): Initialize graph_obstack.
14670 * src/print_graph.c (print_actions): CPP out useless code.
14671 (print_core): Don't output the last `\n' in labels.
14673 * src/files.c (output_files): Output the VCG file.
14674 * src/main.c (main): Invoke print_graph ();
14676 2001-08-06 Marc Autret <autret_m@epita.fr>
14678 Automaton VCG graph output.
14679 Using option ``-g'' or long option ``--graph'', you can generate
14680 a gram_filename.vcg file containing a VCG description of the LALR (1)
14681 automaton of your grammar.
14683 * src/main.c: Call to print_graph() function.
14684 * src/getargs.h: Update.
14685 * src/getargs.c (options): Update to catch `-g' and `--graph' options.
14686 (graph_flag): New flag.
14687 (longopts): Update.
14688 (getargs): Add case `g'.
14689 * src/files.c (graph_obstack): New obstack struct.
14690 (open_files): Initialize new obstack.
14691 (output_files): Saves graph_obstack if required.
14692 * src/files.h (graph_obstack): New extern declaration.
14693 * src/Makefile.am: Add new source files.
14695 2001-08-06 Marc Autret <autret_m@epita.fr>
14697 * src/print_graph.c, src/print_graph.h (graph): New.
14698 * src/vcg.h: New file.
14699 * src/vcg.c: New file, VCG graph handling.
14701 2001-08-06 Marc Autret <autret_m@epita.fr>
14703 Add of %source_extension and %header_extension which specify
14704 the source or/and the header output file extension.
14706 * src/files.c (compute_base_names): Remove initialisation of
14707 src_extension and header_extension.
14708 (compute_exts_from_gf): Update.
14709 (compute_exts_from_src): Update.
14710 (output_files): Update.
14711 * src/reader.c (parse_header_extension_decl): New.
14712 (parse_source_extension_decl): New.
14713 (read_declarations): New case statements for the new tokens.
14714 * src/lex.c (percent_table): Add entries for %source_extension
14715 and %header_extension.
14716 * src/lex.h (token_e): New tokens tok_hdrext and tok_srcext.
14718 2001-08-06 Marc Autret <autret_m@epita.fr>
14720 * configure.in: Bump to 1.28c.
14721 * doc/bison.texinfo: Texinfo thingies.
14723 2001-08-04 Pascal Bart <pascal.bart@epita.fr>
14725 * tests/atconfig.in (CPPFLAGS): Add.
14726 * tests/calc.at (AT_CHECK): Use CPPFLAGS.
14728 2001-08-03 Akim Demaille <akim@epita.fr>
14732 2001-08-03 Akim Demaille <akim@epita.fr>
14734 * tests/Makefile.am (check-local): Ship testsuite.
14735 * tests/calc.at (_AT_DATA_CALC_Y): Prototype all the functions.
14736 Include `string.h'.
14738 2001-08-03 Akim Demaille <akim@epita.fr>
14740 * configure.in: Try using -Wformat when compiling.
14742 2001-08-03 Akim Demaille <akim@epita.fr>
14744 * configure.in: Bump to 1.28b.
14746 2001-08-03 Akim Demaille <akim@epita.fr>
14748 * src/complain.c: Adjust strerror_r portability issues.
14750 2001-08-03 Akim Demaille <akim@epita.fr>
14754 2001-08-03 Akim Demaille <akim@epita.fr>
14756 * src/getargs.c, src/getarg.h (skeleton)): Constify.
14757 * src/lex.c (literalchar): Avoid name clashes on `buf'.
14758 * src/getargs.c: Include complain.h.
14759 * src/files.c, src/files.h (skeleton_find): Avoid name clashes.
14760 * lib/quotearg.c, lib/quotearg.h: Update from fileutils 4.1.
14762 2001-08-03 Akim Demaille <akim@epita.fr>
14764 * src/reader.c (readgram): Display hidden chars in error messages.
14766 2001-08-03 Akim Demaille <akim@epita.fr>
14768 Update to gettext 0.10.39.
14770 2001-08-03 Akim Demaille <akim@epita.fr>
14772 * lib/strspn.c: New.
14774 2001-08-01 Marc Autret <autret_m@epita.fr>
14776 * doc/bison.texinfo: Update.
14777 * doc/bison.1 (mandoc): Update.
14778 * src/system.h (EXT_GUARD_C, EXT_STYPE_H): Remove .c and .h.
14779 * src/files.c: Support output files extensions computing.
14780 (src_extension): New static variable.
14781 (header_extension): New static variable.
14782 (tr): New function.
14783 (get_extension_index): New function, gets the index of an extension
14784 filename in a string.
14785 (compute_exts_from_gf): New function, computes extensions from the
14786 grammar file extension.
14787 (compute_exts_from_src): New functions, computes extensions from the
14788 C source file extension, file given by ``-o'' option.
14789 (compute_base_names): Update.
14790 (output_files): Update.
14792 2001-08-01 Robert Anisko <anisko_r@epita.fr>
14794 * doc/bison.texi: Document @$.
14795 (Locations): New section.
14797 2001-07-18 Akim Demaille <akim@epita.fr>
14799 * Makefile.maint, GNUmakefile: New, from Autoconf 2.52.
14800 * config/prev-version.txt, config/move-if-change: New.
14801 * Makefile.am: Adjust.
14803 2001-07-08 Pascal Bart <pascal.bart@epita.fr>
14805 * src/bison.simple (yyparse): Suppress warning `comparaison
14806 between signed and unsigned'.
14808 2001-07-05 Pascal Bart <pascal.bart@epita.fr>
14810 * src/getargs.h (raw_flag): Remove.
14811 * src/getargs.c: Die on `-r'/`--raw'.
14812 * src/lex.c (parse_percent_token): Die on `%raw'.
14813 * src/reader.c (output_token_defines): Suppress call to `raw_flag'.
14814 * tests/calc.at: Suppress test with option `--raw'.
14816 2001-07-14 Akim Demaille <akim@epita.fr>
14819 * configure.in: Require Autoconf 2.50.
14820 Update to gettext 0.10.38.
14822 2001-03-16 Akim Demaille <akim@epita.fr>
14824 * doc/bison.texinfo: ANSIfy the examples.
14826 2001-03-16 Akim Demaille <akim@epita.fr>
14828 * getargs.c (skeleton): New variable.
14829 (longopts): --skeleton is a new option.
14830 (shortopts, getargs): -S is a new option.
14831 * getargs.h: Declare skeleton.
14832 * output.c (output_parser): Use it.
14834 2001-03-16 Akim Demaille <akim@epita.fr>
14836 * m4/strerror_r.m4: New.
14837 * m4/error.m4: Run AC_FUNC_STRERROR_R.
14838 * lib/error.h, lib/error.c: Update.
14840 2001-03-16 Akim Demaille <akim@epita.fr>
14842 * src/getargs.c (longopts): Clean up.
14844 2001-02-21 Akim Demaille <akim@epita.fr>
14846 * src/reader.c (gensym): `gensym_count' is your own.
14847 Use a static buf to create the symbol name, as token_buffer is no
14850 2001-02-08 Akim Demaille <akim@epita.fr>
14852 * src/conflicts.c (conflict_report): Be sure not to append to res
14853 between two calls, which could happen if both first sprintf were
14854 skipped, but not the first cp += strlen.
14856 2001-02-08 Akim Demaille <akim@epita.fr>
14858 * lib/memchr.c, lib/stpcpy.c, lib/strndup.c, lib/strnlen.c:
14859 New, from fileutils 4.0.37.
14860 * configure.in: Require Autoconf 2.49c. I took some time before
14861 making this decision. This is the only way out for portability
14862 issues in Bison, it would mean way too much duplicate effort to
14863 import in Bison features implemented in 2.49c since 2.13.
14864 AC_REPLACE_FUNCS and AC_CHECK_DECLS the functions above.
14866 2001-02-02 Akim Demaille <akim@epita.fr>
14868 * lib/malloc.c, lib/realloc.c: New, from the fileutils 4.0.37.
14869 * lib/xalloc.h, lib/xmalloc.c: Update.
14871 2001-01-19 Akim Demaille <akim@epita.fr>
14873 Get rid of the ad hoc handling of token_buffer in the scanner: use
14876 * src/lex.c (token_obstack): New.
14877 (init_lex): Initialize it. No longer call...
14878 (grow_token_buffer): this. Remove it.
14879 Adjust all the places which used it to use the obstack.
14881 2001-01-19 Akim Demaille <akim@epita.fr>
14883 * src/lex.h: Rename all the tokens:
14884 s/\bENDFILE\b/tok_eof/g;
14885 s/\bIDENTIFIER\b/tok_identifier/g;
14887 Let them be enums, not #define, to ease debugging.
14888 Adjust all the code.
14890 2001-01-18 Akim Demaille <akim@epita.fr>
14892 * src/lex.h (MAXTOKEN, maxtoken, grow_token_buffer): Remove, private.
14893 * src/lex.c (maxtoken, grow_token_buffer): Static.
14895 2001-01-18 Akim Demaille <akim@epita.fr>
14897 Since we now use obstacks, more % directives can be enabled.
14899 * src/lex.c (percent_table): Also accept `%yacc',
14900 `%fixed_output_files', `%defines', `%no_parser', `%verbose', and
14902 Handle the actions for `%semantic_parser' and `%pure_parser' here,
14903 instead of returning a token.
14904 * src/lex.h (SEMANTIC_PARSER, PURE_PARSER): Remove, unused.
14905 * src/reader.c (read_declarations): Adjust.
14906 * src/files.c (open_files): Don't call `compute_base_names', don't
14907 compute `attrsfile' since they depend upon data which might be
14908 *in* the input file now.
14909 (output_files): Do it here.
14910 * src/output.c (output_headers): Document the fact that this patch
14911 introduces a guaranteed SEGV for semantic parsers.
14912 * doc/bison.texinfo: Document them.
14913 * tests/suite.at: Exercise these %options.
14915 2000-12-20 Akim Demaille <akim@epita.fr>
14917 Also handle the output file (--verbose) with obstacks.
14919 * files.c (foutput): Remove.
14920 (output_obstack): New.
14921 Adjust all dependencies.
14922 * src/conflicts.c: Return a string.
14923 * src/system.h (obstack_grow_string): Rename as...
14924 (obstack_sgrow): this. Be ready to work with non literals.
14925 (obstack_fgrow4): New.
14927 2000-12-20 Akim Demaille <akim@epita.fr>
14929 * src/files.c (open_files): Fix the computation of short_base_name
14930 in the case of `-o foo.tab.c'.
14932 2000-12-20 Akim Demaille <akim@epita.fr>
14934 * src/reader.c (copy_string, copy_comment, copy_comment2, copy_at)
14935 (copy_dollar): Now that everything uses obstacks, get rid of the
14938 2000-12-20 Akim Demaille <akim@epita.fr>
14940 * src/files.c (open_files): Actually the `.output' file is based
14941 on the short_base_name, not base_name.
14942 * tests/suite.at (Checking output file names): Adjust.
14944 2000-12-20 Akim Demaille <akim@epita.fr>
14946 * src/bison.s1: Remove, we now use directly...
14947 * src/bison.simple: this.
14948 * src/Makefile.am: Use pkgdata instead of data.
14950 2000-12-20 Akim Demaille <akim@epita.fr>
14952 * src/files.c (guard_obstack): New.
14953 (open_files): Initialize it.
14954 (output_files): Dump it...
14955 * src/files.h: Export it.
14956 * src/reader.c (copy_guard): Use it.
14958 2000-12-19 Akim Demaille <akim@epita.fr>
14960 * src/files.c (outfile, defsfile, actfile): Removed as global
14962 (open_files): Don't compute them.
14963 (output_files): Adjust.
14964 (base_name, short_base_name): Be global.
14965 Adjust dependencies.
14967 2000-12-19 Akim Demaille <akim@epita.fr>
14969 * src/files.c (strsuffix): New.
14970 (stringappend): Be just like strcat but allocate.
14971 (base_names): Eve out from open_files.
14972 Try to simplify the rather hairy computation of base_name and
14974 (open_files): Use it.
14975 * tests/suite.at (Checking output file names): New test.
14977 2000-12-19 Akim Demaille <akim@epita.fr>
14979 * src/system.h (obstack_grow_literal_string): Rename as...
14980 (obstack_grow_string): this.
14981 * src/output.c (output_parser): Recognize `%% actions' instead of
14983 * src/bison.s1: s/$/%% actions/.
14984 * src/bison.hairy: Likewise.
14986 2000-12-19 Akim Demaille <akim@epita.fr>
14988 * src/output.c (output_parser): Compute the `#line' lines when
14990 * src/Makefile.am (bison.simple): Be a simple copy of bison.s1.
14991 Suggested by Hans Aberg.
14993 2000-12-19 Akim Demaille <akim@epita.fr>
14995 Let the handling of the skeleton files be local to the procedures
14998 * src/files.c (xfopen, xfclose, skeleton_find, guardfile): No
15000 (fparser, open_extra_files): Remove.
15001 (open_files, output_files): Don't take care of fparser.
15002 * src/files.h: Adjust.
15003 * src/output.c (output_parser): Open and close the file to the
15005 * src/reader.c (read_declarations): When %semantic_parser, open
15008 2000-12-19 Akim Demaille <akim@epita.fr>
15010 * src/file.h (BISON_SIMPLE, BISON_HAIRY): Move from here...
15011 * src/system.h (BISON_SIMPLE, BISON_HAIRY): ... to here.
15013 2000-12-19 Akim Demaille <akim@epita.fr>
15015 * src/files.c (open_files): Yipee! We no longer need all the code
15016 looking for `/tmp' since we have no tmp file.
15018 2000-12-19 Akim Demaille <akim@epita.fr>
15020 * src/system.h (EXT_TAB, EXT_OUTPUT, EXT_STYPE_H, EXT_GUARD_C):
15022 * src/files.c (open_files): Less dependency on MSDOS etc.
15024 2000-12-14 Akim Demaille <akim@epita.fr>
15026 * src/bison.s1 (YYLLOC_DEFAULT): New macro.
15027 Provide a default definition.
15028 Use it when executing the default @ action.
15029 * src/reader.c (reader_output_yylsp): No longer include
15030 `timestamp' and `text' in the default YYLTYPE.
15032 2000-12-12 Akim Demaille <akim@epita.fr>
15034 * src/reader.c (copy_definition, parse_union_decl, copy_action)
15035 (copy_guard): Quote the file names.
15036 Reported by Laurent Mascherpa.
15038 2000-12-12 Akim Demaille <akim@epita.fr>
15040 * src/output.c (output_headers, output_program, output): Be sure
15041 to escape special characters when outputting filenames.
15042 (ACTSTR_PROLOGUE, ACTSTR_EPILOGUE): Remove.
15043 (output_headers): Don't depend on them, Use ACTSTR.
15045 2000-11-17 Akim Demaille <akim@epita.fr>
15047 * lib/obstack.h: Formatting changes.
15048 (obstack_grow, obstack_grow0): Don't cast WHERE at all: it
15049 prevents type checking.
15050 (obstack_ptr_grow, obstack_ptr_grow_fast): When assigning, don't
15051 cast the value to (void *): assigning a `foo *' to a `void *'
15053 (obstack_int_grow, obstack_int_grow_fast): Don't cast AINT to int.
15054 * src/reader.c (parse_union_decl): Typo: use obstack_1grow to
15057 2000-11-17 Akim Demaille <akim@epita.fr>
15059 * tests/Makefile.am (suite.m4, regression.m4, calc.m4): Rename
15061 (suite.m4, regression.m4, calc.m4): these.
15062 * tests/atgeneral.m4: Update from CVS Autoconf.
15064 2000-11-17 Akim Demaille <akim@epita.fr>
15066 * tests/regression.m4 (%union and --defines): New test,
15067 demonstrating a current bug in the obstack implementation.
15069 2000-11-17 Akim Demaille <akim@epita.fr>
15071 * src/bison.s1 (_YY_DECL_VARIABLES, YY_DECL_VARIABLES): New
15073 Use them to declare the variables which are global or local to
15076 2000-11-17 Akim Demaille <akim@epita.fr>
15078 * acconfig.h: Remove, no longer used.
15080 2000-11-07 Akim Demaille <akim@epita.fr>
15082 * src: s/Copyright (C)/Copyright/g.
15084 2000-11-07 Akim Demaille <akim@epita.fr>
15086 * src/reader.c (reader): #define YYLSP_NEEDED to 1 instead of just
15088 * src/bison.s1: s/#ifdef YYLSP_NEEDED/#if YYLSP_NEEDED/.
15090 2000-11-07 Akim Demaille <akim@epita.fr>
15092 * src/bison.s1 (YYLEX): Use #if instead of #ifdef.
15093 Merge in a single CPP if/else.
15095 2000-11-07 Akim Demaille <akim@epita.fr>
15097 * src/output.c (output): Remove useless variables.
15098 * lib/obstack.c (obstack_grow, obstack_grow0): Rename the second
15099 argument `data' for consistency with the prototypes.
15100 Qualify it `const'.
15101 (obstack_copy, obstack_copy0): Rename the second argument as
15102 `address' for consistency. Qualify it `const'.
15103 * lib/obstack.h (obstack_copy, obstack_copy0, obstack_grow)
15104 (obstack_grow0, obstack_ptr_grow, obstack_ptr_grow_fast): Qualify
15105 `const' their input argument (`data' or `address').
15106 Adjust the corresponding macros to include `const' in casts.
15108 2000-11-03 Akim Demaille <akim@epita.fr>
15110 * src/Makefile.am (INCLUDES): s/PFILE/BISON_SIMPLE/.
15111 s/PFILE1/BISON_HAIRY/.
15112 Adjust dependencies.
15114 2000-11-03 Akim Demaille <akim@epita.fr>
15116 For some reason, this was not applied.
15118 * src/files.c [VMS]: No longer include `ssdef.h', no longer define
15119 `unlink': it's no longer used.
15121 2000-11-03 Akim Demaille <akim@epita.fr>
15123 * src/files.c (skeleton_find): New function, eved out of...
15124 (open_files, open_extra_files): here.
15126 2000-11-03 Akim Demaille <akim@epita.fr>
15128 Don't use `atexit'.
15130 * src/files.c (obstack_save): New function.
15131 (done): Rename as...
15132 (output_files): this.
15133 Use `obstack_save'.
15134 * src/main.c (main): Don't use `atexit' to register `done', since
15135 it no longer has to remove tmp files, just call `output_files'
15136 when there are no errors.
15138 2000-11-02 Akim Demaille <akim@epita.fr>
15140 * src/files.c [VMS]: No longer include `ssdef.h', no longer define
15141 `unlink': it's no longer used.
15142 * src/files.h: Formatting changes.
15144 2000-11-02 Akim Demaille <akim@epita.fr>
15146 Remove the last uses of mktemp and unlink/delete.
15148 * src/files.c (fdefines, ftable): Removed.
15149 (defines_ostack, table_obstack): New.
15150 Adjust dependencies of the former into uses of the latter.
15151 * src/output.c (output_short_or_char_table, output_short_table):
15152 Convert to using obstacks.
15153 * src/reader.c (copy_comment2): Accept one FILE * and two
15155 (output_token_defines, reader_output_yylsp): Use obstacks.
15156 * src/system.h (obstack_fgrow3): New.
15157 * po/POTFILES.in: Adjust.
15159 2000-11-01 Akim Demaille <akim@epita.fr>
15161 Change each use of `fattrs' into a use of `attrs_obstack'.
15163 * src/reader.c (copy_at): Typo: s/yylloc/yyloc/.
15164 * src/files.c (fattrs): Remove.
15165 (attrs_obstack): New.
15166 Adjust all dependencies.
15167 (done): If SEMANTIC_PARSER, dump attrs_obstack into attrsfile.
15169 2000-11-01 Akim Demaille <akim@epita.fr>
15171 Introduce obstacks.
15172 Change each use of `faction' into a use of `action_obstack'.
15174 * lib/obstack.h, lib/obstack.c: New files.
15175 * src/files.c (faction): Remove.
15176 (action_obstack): New.
15177 Adjust all dependencies.
15179 2000-10-20 Akim Demaille <akim@epita.fr>
15181 * lib/quote.h (PARAMS): New macro. Use it.
15183 2000-10-16 Akim Demaille <akim@epita.fr>
15185 * src/output.c (output_short_or_char_table): New function.
15186 (output_short_table, output_token_translations): Use it.
15187 (goto_actions): Use output_short_table.
15189 2000-10-16 Akim Demaille <akim@epita.fr>
15191 * src/symtab.c (bucket_new): New function.
15194 * src/output.c (output_short_table): New argument to display the
15195 comment associated with the table.
15196 Adjust dependencies.
15197 (output_gram): Use it.
15198 (output_rule_data): Nicer output layout for YYTNAME.
15200 2000-10-16 Akim Demaille <akim@epita.fr>
15202 * src/lex.c (read_typename): New function.
15204 * src/reader.c (copy_dollar): Likewise.
15206 2000-10-16 Akim Demaille <akim@epita.fr>
15208 * src/reader.c (copy_comment2): Expect the input stream to be on
15209 the `/' which is suspected to open a comment, instead of being
15210 called after `//' or `/*' was read.
15211 (copy_comment, copy_definition, parse_union_decl, copy_action)
15212 (copy_guard): Adjust.
15214 2000-10-16 Akim Demaille <akim@epita.fr>
15216 * src/reader.c (parse_expect_decl): Use `skip_white_space' and
15217 `read_signed_integer'.
15219 2000-10-16 Akim Demaille <akim@epita.fr>
15221 * src/reader.c (copy_dollar): New function.
15222 (copy_guard, copy_action): Use it.
15224 2000-10-16 Akim Demaille <akim@epita.fr>
15226 * lib/quote.h, lib/quote.c, lib/quotearg.h, lib/quotearg.c:
15227 * m4/prereq.m4, m4/c-bs-a.m4, m4/mbstate.m4:
15228 New files, from Fileutils 4.0.27.
15229 * src/main.c (printable_version): Remove.
15230 * src/lex.c, src/reader.c: Use `quote'.
15232 2000-10-04 Akim Demaille <akim@epita.fr>
15234 * lib/error.c, lib/error.h: New files, needed by xmalloc.c.
15236 2000-10-04 Akim Demaille <akim@epita.fr>
15238 * doc/bison.texinfo: Various typos spotted by Neil Booth.
15240 2000-10-04 Akim Demaille <akim@epita.fr>
15242 When a literal string is used to define two different tokens,
15243 `bison -v' segfaults.
15244 Reported by Piotr Gackiewicz, and fixed by Neil Booth.
15246 * tests/regression.m4: New file.
15247 Include the core of the sample provided by Piotr Gackiewicz.
15248 * src/reader.c (parse_token_decl): Diagnose bad cases, and proceed
15251 2000-10-04 Akim Demaille <akim@epita.fr>
15253 * src/reader.c (parse_expect_decl): Keep `count' within the size
15257 2000-10-02 Paul Eggert <eggert@twinsun.com>
15259 * bison.s1 (yyparse): Assign the default value
15260 unconditionally, to avoid a GCC warning and make the parser a
15263 2000-10-02 Akim Demaille <akim@epita.fr>
15265 * src/getargs.c (getargs): Don't dump `--help' on unrecognized
15268 2000-10-02 Akim Demaille <akim@epita.fr>
15270 * src/derives.c, src/print.c, src/reduce.c: To ease the
15271 translation, move some `\n' out of the translated strings.
15273 2000-10-02 Akim Demaille <akim@epita.fr>
15275 The location tracking mechanism is precious for parse error
15276 messages. Nevertheless, it is enabled only when `@n' is used in
15277 the grammar, which is a different issue (you can use it in error
15278 message, but not in the grammar per se). Therefore, there should
15279 be another means to enable it.
15281 * src/getargs.c (getargs): Support `--locations'.
15282 (usage): Report it.
15283 * src/getargs.h (locationsflag): Export it.
15284 * src/lex.c (percent_table): Support `%locations'.
15285 * src/reader.c (yylsp_needed): Remove this variable, now replaced
15286 with `locationsflag'.
15287 * doc/bison.texinfo: Document `--locations' and `%locations'.
15289 * tests/calc.m4: Test it.
15291 For regularity of the names, replace each
15292 (nolineflag, toknumflag, rawtokenumflag, noparserflag): with...
15293 (no_lineflag, token_tableflag, rawflag, no_parserflag): this.
15294 In addition replace each `flag' with `_flag'.
15296 2000-10-02 Akim Demaille <akim@epita.fr>
15298 Also test parse error messages, including with YYERROR_VERBOSE.
15300 * tests/calc.m4 (calc.y): Add support for `exp = exp' (non
15302 Use it to check the computations.
15303 Use it to check `nonassoc' is honored.
15304 (AT_DATA_CALC_Y): Equip `calc.y' with YYERROR_VERBOSE when passed
15305 `--yyerror-verbose'.
15306 (_AT_CHECK_CALC): Adjust to this option.
15307 (_AT_CHECK_CALC_ERROR): New macro to check parse error messages.
15309 2000-10-02 Akim Demaille <akim@epita.fr>
15311 Test also `--verbose', `--defines' and `--name-prefix'. Testing
15312 the latter demonstrates a flaw in the handling of non debugging
15313 parsers introduced by myself on 2000-03-16: `#define yydebug 0'
15314 was used in order to simplify:
15330 unfortunately this leads to a CPP conflict when
15331 `--name-prefix=foo' is used since it produces `#define yydebug
15334 * src/bison.s1 [!YYDEBUG]: Do not define yydebug.
15335 (YYDPRINTF): New macro.
15337 * tests/calc.m4 (AT_CHECK_CALC): Do require a title, build it from
15339 Also test `--verbose', `--defines' and `--name-prefix'.
15341 2000-10-02 Akim Demaille <akim@epita.fr>
15343 Improve the readability of the produced parsers.
15345 * src/bison.s1: Formatting changes.
15346 Improve the comment related to the `$' mark.
15347 (yydefault): Don't fall through to `yyresume': `goto' there.
15348 * src/output.c (output_parser): When the `$' is met, skip the end
15350 New variable, `number_of_dollar_signs', to check there's exactly
15351 one `$' in the parser skeleton.
15353 2000-10-02 Akim Demaille <akim@epita.fr>
15355 * lib/xstrdup.c: New file, from the fileutils.
15356 * src/reader.c (parse_token_decl, get_type_name, parse_type_decl)
15357 (parse_assoc_decl, parse_thong_decl, get_type): Use `xstrdup'
15358 instead of strlen + xmalloc + strcpy.
15359 * src/symtab.c (copys): Remove, use xstrdup instead.
15361 2000-10-02 Akim Demaille <akim@epita.fr>
15363 * src/gram.h (associativity): New enum type which replaces the
15364 former CPP macros `RIGHT_ASSOC', `LEFT_ASSOC' and `NON_ASSOC' with
15365 `right_assoc', `left_assoc' and `non_assoc'.
15366 Adjust all dependencies.
15367 * src/reader.c: Formatting changes.
15368 (LTYPESTR): Don't define it, use it as a literal in
15369 `reader_output_yylsp'.
15370 * src/symtab.h (symbol_class): New enum type which replaces the
15371 former CPP macros `SUNKNOWN', `STOKEN and `SNTERM' with
15372 `sunknown', `stoken and `snterm'.
15374 2000-10-02 Akim Demaille <akim@epita.fr>
15376 * src/getargs.c (fixed_outfiles): Rename as...
15377 (yaccflag): for consistency and accuracy.
15378 Adjust dependencies.
15380 2000-10-02 Akim Demaille <akim@epita.fr>
15382 Use the more standard files `xalloc.h' and `xmalloc.c' instead of
15383 Bison's `allocate.c' and `alloc.h'. This patch was surprisingly
15384 difficult and introduced a lot of core dump. It turns out that
15385 Bison used an implementation of `xmalloc' based on `calloc', and
15386 at various places it does depend upon the initialization to 0. I
15387 have not tried to isolate the pertinent places, and all the former
15388 calls to Bison's `xmalloc' are now using `XCALLOC'. Someday,
15389 someone should address this issue.
15391 * src/allocate.c, src/alloc.h, m4/bison-decl.m4: Remove.
15392 * lib/xmalloc.c, lib/xalloc.h, m4/malloc.m4, m4/realloc.m4: New
15394 Adjust dependencies.
15395 * src/warshall.h: New file.
15398 2000-10-02 Akim Demaille <akim@epita.fr>
15400 Various anti-`extern in *.c' changes.
15402 * src/system.h: Include `assert.h'.
15404 2000-10-02 Akim Demaille <akim@epita.fr>
15406 * src/state.h (nstates, final_state, first_state, first_shift)
15407 (first_reduction): Move their exportation from here...
15408 * src/LR0.h: to here.
15409 Adjust dependencies.
15410 * src/getargs.c (statisticsflag): New variable.
15411 Add support for `--statistics'.
15412 Adjust dependencies.
15414 Remove a lot of now useless `extern' statements in most files.
15416 2000-10-02 Akim Demaille <akim@epita.fr>
15418 * src/LR0.h: New file.
15421 2000-10-02 Akim Demaille <akim@epita.fr>
15423 * src/print.h: New file.
15425 * src/print.c: Formatting and ordering changes.
15426 (verbose, terse): Replace with...
15427 (print_results): this new function.
15428 Adjust dependencies.
15430 2000-10-02 Akim Demaille <akim@epita.fr>
15432 * src/conflicts.c (conflict_report): New function.
15433 (conflict_log, verbose_conflict_log): Replace with...
15434 (print_conflicts): this function.
15435 Adjust dependencies.
15436 * src/conflicts.h: New file.
15437 Propagate its inclusion.
15439 2000-10-02 Akim Demaille <akim@epita.fr>
15441 * src/nullable.h: New file.
15442 Propagate its inclusion.
15443 * src/nullable.c: Formatting changes.
15445 2000-10-02 Akim Demaille <akim@epita.fr>
15447 * src/reduce.h: New file.
15448 Propagate its inclusion.
15449 * src/reduce.c: Topological sort and other formatting changes.
15450 (bool, TRUE, FALSE): Move their definition to...
15451 * src/system.h: here.
15453 2000-10-02 Akim Demaille <akim@epita.fr>
15455 * src/files.c: Formatting changes.
15456 (tryopen, tryclose, openfiles): Rename as...
15457 (xfopen, xfclose, open_files): this.
15458 (stringappend): static.
15459 * src/files.h: Complete the list of exported symbols.
15462 2000-10-02 Akim Demaille <akim@epita.fr>
15464 * src/reader.h: New file.
15465 Propagate its use instead of tedious list of `extern' and
15467 * src/reader.c: Formatting changes, topological sort,
15470 2000-10-02 Akim Demaille <akim@epita.fr>
15472 * src/lex.h: Prototype `lex.c' exported functions.
15473 * src/reader.c: Adjust.
15474 * src/lex.c: Formatting changes.
15475 (safegetc): Rename as...
15478 2000-10-02 Akim Demaille <akim@epita.fr>
15480 * src/lalr.h: New file.
15481 Propagate its inclusion instead of prototypes and `extern'.
15482 * src/lalr.c: Formatting changes, topological sorting etc.
15484 2000-10-02 Akim Demaille <akim@epita.fr>
15486 * src/output.c (token_actions): Introduce a temporary array,
15487 YYDEFACT, that makes it possible for this function to use
15488 output_short_table.
15490 2000-10-02 Akim Demaille <akim@epita.fr>
15492 `user_toknums' is output as a `short[]' in `output.c', while it is
15493 defined as a `int[]' in `reader.c'. For consistency with the
15494 other output tables, `user_toknums' is now defined as a table of
15497 * src/reader.c (user_toknums): Be a short table instead of an int
15499 Adjust dependencies.
15501 Factor the short table outputs.
15503 * src/output.c (output_short_table): New function.
15504 * src/output.c (output_gram, output_stos, output_rule_data)
15505 (output_base, output_table, output_check): Use it.
15507 2000-10-02 Akim Demaille <akim@epita.fr>
15509 * src/output.c (output): Topological sort of the functions, in
15510 order to get rid of the `static' prototypes.
15511 No longer use `register'.
15512 * src/output.h: New file.
15513 Propagate its inclusion in files explicitly prototyping functions
15516 2000-09-21 Akim Demaille <akim@epita.fr>
15518 * src/atgeneral.m4: Update from Autoconf.
15520 2000-09-21 Akim Demaille <akim@epita.fr>
15522 * src/closure.h: New file.
15523 * src/closure.c: Formatting changes, topological sort over the
15524 functions, use of closure.h.
15525 (initialize_closure, finalize_closure): Rename as...
15526 (new_closure, free_closure): these. Adjust dependencies.
15527 * src/LR0.c: Formatting changes, topological sort, use of
15529 (initialize_states): Rename as...
15530 (new_states): this.
15531 * src/Makefile.am (noinst_HEADERS): Adjust.
15533 2000-09-20 Akim Demaille <akim@epita.fr>
15535 * src/acconfig.h: Don't protect config.h against multiple
15537 Don't define PARAMS.
15538 * src/system.h: Define PARAMS.
15539 Remove some of the ad-hoc CPP magic for DOS, VMS etc.: this is the
15540 purpose of config.h. system.h must not try to fix wrong
15541 definitions in config.h.
15543 2000-09-20 Akim Demaille <akim@epita.fr>
15545 * src/derives.h: New file.
15546 * src/main.c, src/derives.h: Use it.
15547 Formatting changes.
15548 * src/Makefile.am (noinst_HEADERS): Adjust.
15550 2000-09-20 Akim Demaille <akim@epita.fr>
15552 * tests/atgeneral.m4: Update from Autoconf.
15553 * tests/calc.m4 (_AT_DATA_CALC_Y, AT_DATA_CALC_Y, _AT_CHECK_CALC)
15554 (AT_CHECK_CALC): New macros.
15555 Use these macros to test bison with options `', `--raw',
15556 `--debug', `--yacc', `--yacc --debug'.
15558 2000-09-19 Akim Demaille <akim@epita.fr>
15560 * src/output.c: Formatting changes.
15561 * src/machine.h: Remove, leaving its contents in...
15562 * src/system.h: here.
15564 Adjust all dependencies on stdio.h and machine.h.
15565 * src/getargs.h: New file.
15566 Let all `extern' declarations about getargs.c be replaced with
15567 inclusion of `getargs.h'.
15568 * src/Makefile.am (noinst_HEADERS): Adjust.
15570 * tests/calc.m4 (yyin): Be initialized in main, not on the global
15572 (yyerror): Returns void, not int.
15573 * doc/bison.texinfo: Formatting changes.
15575 2000-09-19 Akim Demaille <akim@epita.fr>
15577 * tests/calc.m4 (calc.y): Do not assign to stdin, as it's not
15580 2000-09-18 Akim Demaille <akim@epita.fr>
15582 * configure.in: Append WARNING_CFLAGS to CFLAGS.
15583 * src/Makefile.am (INCLUDES): Don't.
15584 Be ready to fetch headers in lib/.
15586 2000-09-18 Akim Demaille <akim@epita.fr>
15588 * doc/bison.texinfo: Update the copyright.
15589 ANSIfy and GNUify the examples.
15590 Remove the old menu.
15592 2000-09-18 Akim Demaille <akim@epita.fr>
15594 First set of tests: use the `calc' example from the documentation.
15596 * src/bison.s1 (yyparse): Condition the code using `yytname' which
15597 is defined only when YYDEBUG is.
15598 * m4/atconfig.m4 (AT_CONFIG): Adjust to Autoconf 2.13.
15599 * src/files.c (tryopen, tryclose): Formatting changes.
15600 Move to the top and be static.
15601 * src/reader.c (read_signed_integer): Likewise.
15602 * tests/calc.m4: New file.
15603 * Makefile.am, suite.m4: Adjust.
15604 * m4/atconfig.m4: Set BISON_SIMPLE and BISON_HAIRY.
15606 2000-09-18 Akim Demaille <akim@epita.fr>
15608 Add support for an Autotest test suite for Bison.
15610 * m4/m4.m4, m4/atconfig.m4: New files.
15611 * m4/Makefile.am (EXTRA_DIST): Adjust.
15612 * tests/suite.m4, tests/Makefile.am, tests/atgeneral.m4: New
15614 * src/getargs.c: Display a more standard --version message.
15615 * src/reader.c (reader): Formatting changes.
15616 No longer depend upon VERSION_STRING.
15617 * configure.in: No longer use `dnl'.
15618 Set up the test suite and the new directory `tests/.
15619 (VERSION_STRING): Remove.
15621 2000-04-14 Akim Demaille <akim@epita.fr>
15623 * src/reader.c (copy_comment2): New function, same as former
15624 `copy_comment', but outputs into two FILE *.
15625 (copy_comment): Use it.
15626 (parse_union_decl): Use it.
15627 (get_type, parse_start_decl): Use the same `invalid' message.
15628 (parse_start_decl, parse_union_decl): Use the same `multiple'
15630 (parse_union_decl, copy_guard, copy_action): Use the same
15631 `unmatched' message.
15632 * m4/Makefile.am (EXTRA_DIST): Add `warning.m4'.
15634 2000-03-31 Akim Demaille <akim@epita.fr>
15636 * src/files.c (tryopen, tryclose): Move to the top.
15639 2000-03-31 Akim Demaille <akim@epita.fr>
15641 * src/main.c (main): Don't call `done', exit does it.
15643 2000-03-31 Akim Demaille <akim@epita.fr>
15645 * allocate.c: s/return (foo)/return foo/.
15646 * lalr.c: Likewise.
15648 * output.c: Likewise.
15649 * reader.c: Likewise.
15650 * symtab.c: Likewise.
15651 * vmsgetargs.c: Likewise.
15653 2000-03-31 Akim Demaille <akim@epita.fr>
15655 Clean up the error reporting functions.
15657 * src/report.c: New file.
15658 * src/report.h: Likewise.
15659 * src/Makefile.am: Adjust.
15660 * m4/error.m4: New file.
15661 * m4/Makefile.am: Adjust.
15662 * configure.in (jm_PREREQ_ERROR): Call it.
15663 * src/main.c (int_to_string, banner, fatal_banner, warn_banner):
15665 (fatal, fatals): Remove. All callers use complain.c::fatal.
15666 (warn, warni, warns, warnss, warnss): Remove. All callers use
15667 complain.c::complain.
15668 (toomany): Remove, use fatal instead.
15669 * src/files.c (done): No argument, use complain_message_count.
15670 * src/main.c (main): Register `done' to `atexit'.
15672 * src/getargs.c (usage): More `fputs', less `fprintf'.
15674 2000-03-28 Akim Demaille <akim@epita.fr>
15676 * lib/: New directory.
15677 * Makefile.am (SUBDIRS): Adjust.
15678 * configure.in: Adjust.
15679 (LIBOBJS): Although not used yet, AC_SUBST it, otherwise it's
15681 * src/alloca.c: Moved to lib/.
15682 * src/getopt.c: Likewise.
15683 * src/getopt1.c: Likewise.
15684 * src/getopt.h: Likewise.
15685 * src/ansi2knr.c: Likewise.
15686 * src/ansi2knr.1: Likewise.
15687 * src/Makefile.am: Adjust.
15688 * lib/Makefile.am: New file.
15690 2000-03-28 Akim Demaille <akim@epita.fr>
15692 * src/getargs.c (usage): Refresh the help message.
15694 2000-03-17 Akim Demaille <akim@epita.fr>
15696 * src/getopt1.c: Updated from textutils 2.0e
15697 * src/getopt.c: Likewise.
15698 * src/getopt.h: Likewise.
15700 2000-03-17 Akim Demaille <akim@epita.fr>
15702 * src/Makefile.am (bison.simple): Fix the awk program: quote only
15703 the file name, not the whole `#line LINE FILE'.
15705 2000-03-17 Akim Demaille <akim@epita.fr>
15707 On syntax errors, report the token on which we choked.
15709 * src/bison.s1 (yyparse): In the label yyerrlab, when
15710 YYERROR_VERBOSE, add yychar in msg.
15712 2000-03-17 Akim Demaille <akim@epita.fr>
15714 * src/reader.c (copy_at): New function.
15715 (copy_guard): Use it.
15716 (copy_action): Use it.
15718 2000-03-17 Akim Demaille <akim@epita.fr>
15720 Be kind to translators, save some useless translations.
15722 * src/main.c (banner): New function.
15723 (fatal_banner): Use it.
15724 (warn_banner): Use it.
15726 2000-03-17 Akim Demaille <akim@epita.fr>
15728 * src/reader.c (copy_definition): Use copy_string and
15729 copy_comment. Removed now unused `match', `ended',
15731 (copy_comment, copy_string): Moved, to be visible from
15734 2000-03-17 Akim Demaille <akim@epita.fr>
15736 * src/reader.c (copy_string): Declare `static inline'. No
15737 problems with inline, since it is checked by configure.
15738 (copy_comment): Likewise.
15740 2000-03-17 Akim Demaille <akim@epita.fr>
15742 * src/reader.c (packsymbols): Formatting changes.
15744 2000-03-17 Akim Demaille <akim@epita.fr>
15746 * src/reader.c (copy_comment): New function, factored out from:
15747 (copy_action): Use it. Removed now unused `match', `ended',
15749 (copy_guard): Likewise.
15751 2000-03-17 Akim Demaille <akim@epita.fr>
15753 * src/reader.c (copy_string): New function, factored out from:
15754 (copy_action): Use it.
15755 (copy_guard): Likewise.
15757 2000-03-17 Akim Demaille <akim@epita.fr>
15759 Change the handling of @s so that they behave exactly like $s.
15760 There is now a pseudo variable @$ (readble and writable), location
15761 of the lhs of the rule (by default ranging from the location of
15762 the first symbol of the rhs, to the location of the last symbol,
15763 or, if the rhs is empty, YYLLOC).
15765 * src/bison.s1 [YYLSP_NEEDED] (yyloc): New variable, twin of
15767 (yyparse): When providing a default semantic action, provide a
15768 default location action.
15769 (after the $): No longer change `*YYLSP', just stack YYLOC the
15770 same way you stack YYVAL.
15771 * src/reader.c (read_declarations): Use warns.
15772 (copy_guard, case '@'): Also recognize `@$', expanded as `YYLOC'.
15773 (copy_action, case '@'): Likewise.
15774 Use a standard error message, to save useless work from
15777 2000-03-17 Akim Demaille <akim@epita.fr>
15779 * src/bison.s1: Formatting and cosmetics changes.
15780 * src/reader.c: Likewise.
15781 Update the Copyright notice.
15783 2000-03-17 Akim Demaille <akim@epita.fr>
15785 * src/bison.s1 (#line): All set to `#line' only, since the
15786 Makefile now handles them.
15788 2000-03-16 Akim Demaille <akim@epita.fr>
15790 * src/output.c (output_rule_data): Output the documentation of
15791 some of the tables.
15792 (Copyright notice): Update.
15793 Formatting changes.
15795 2000-03-16 Akim Demaille <akim@epita.fr>
15797 * src/bison.s1 [!YYDEBUG]: Define yydebug to 0. This allows to
15798 remove most `#if YYDEBUG != 0', since `if (yydebug)' is enough.
15799 One `#if YYDEBUG' remains, since it uses variables which are
15800 defined only if `YYDEBUG != 0'.
15802 2000-03-16 Akim Demaille <akim@epita.fr>
15804 * src/bison.s1 (yyparse): Reorganize the definitions of the stacks
15805 and related variables so that the similarities are highlighted.
15807 2000-03-16 Akim Demaille <akim@epita.fr>
15809 * src/bison.s1: Properly indent CPP directives.
15811 2000-03-16 Akim Demaille <akim@epita.fr>
15813 * src/bison.s1: Properly indent the `alloca' CPP section.
15815 2000-03-16 Akim Demaille <akim@epita.fr>
15817 Do not hard code values of directories in `configure.in'.
15818 Update the `configure' tool chain.
15820 * configure.in (XPFILE, XPFILE1, LOCALEDIR): Remove, handled by
15822 (VERSION_STRING): Use the third arg of AC_DEFINE_UNQUOTED.
15823 (AC_OUTPUT): Add m4/Makefile.
15824 Bump to bison 1.28a, 1.29 has never been released.
15825 * acconfig.h (XPFILE, XPFILE1, LOCALEDIR): Remove, since they are
15826 handled via src/Makefile.am.
15827 (VERSION_STRING, PROTOTYPES, ENABLE_NLS, HAVE_CATGETS,
15828 HAVE_GETTEXT, HAVE_LC_MESSAGES, HAVE_STPCPY): Remove, handled by
15830 * Makefile.am (SUBDIRS): Add m4.
15831 (ACLOCAL_AM_FLAGS): New variable.
15832 (AUTOMAKE_OPTIONS): Add check-news.
15833 * src/Makefile.am (bison.simple): Use awk to replace #line lines with
15834 the proper line number and file name.
15835 (DEFS): Propagate the location of bison library files and of the
15837 (INCLUDES): Added `-I ..' so that one can compile with srcdir !=
15839 * acinclude.m4: Remove, replaced by the directory m4.
15840 * m4/Makefile.am (EXTRA_DIST): New variable.
15841 * m4/gettext.m4: New file, from the fileutils.
15842 * m4/lcmessage.m4: Likewise
15843 * m4/progtest.m4: Likewise.
15844 * m4/bison-decl.m4: New file, extracted from former acinclude.m4.
15846 2000-03-10 Akim Demaille <akim@epita.fr>
15849 Formatting changes of various comments.
15850 Respect the GNU coding standards at various places.
15851 Don't use `_()' when no translation is needed.
15853 1999-12-13 Jesse Thilo <jthilo@gnu.org>
15856 OS/2 honors TMPDIR environment variable.
15858 1999-12-13 Jesse Thilo <jthilo@gnu.org>
15860 * doc/bison.texinfo: Tweaked spelling and grammar.
15862 Removed reference to price of printed copy.
15863 Mention BISON_SIMPLE and BISON_HAIRY.
15865 1999-12-13 Jesse Thilo <jthilo@gnu.org>
15867 * configure.in, NEWS:
15868 Bison 1.29 released.
15870 1999-10-27 Jesse Thilo <jthilo@gnu.org>
15872 * doc/.cvsignore, doc/Makefile.am, doc/refcard.tex:
15873 Added reference card.
15875 1999-07-26 Jesse Thilo <jthilo@gnu.org>
15877 * po/ru.po: Added Russian translation.
15879 1999-07-26 Jesse Thilo <jthilo@gnu.org>
15881 * configure.in: Added Russian translation.
15883 1999-07-06 Jesse Thilo <jthilo@gnu.org>
15885 * configure.in, NEWS, README:
15886 Released version 1.28.
15888 1999-06-14 Jesse Thilo <jthilo@gnu.org>
15891 Squashed redefinition warning on some systems.
15893 * src/getargs.c, src/Makefile.am, src/reader.c, src/version.c:
15894 Have configure build version string instead of relying on ANSI string
15897 1999-06-14 Jesse Thilo <jthilo@gnu.org>
15899 * po/POTFILES.in: Got rid of version.c.
15901 1999-06-14 Jesse Thilo <jthilo@gnu.org>
15903 * acconfig.h, configure.in:
15904 Have configure build version string instead of relying on ANSI string
15907 1999-06-08 Jesse Thilo <jthilo@gnu.org>
15910 Dropped mention of `+' for long-named options.
15912 1999-05-30 Jesse Thilo <jthilo@gnu.org>
15914 * src/files.c: Added <unistd.h> for unlink().
15916 * src/Makefile.am, src/system.h:
15919 1999-05-30 Jesse Thilo <jthilo@gnu.org>
15921 * README: Added a FAQ list.
15923 * configure.in, acconfig.h:
15926 1999-05-30 Jesse Thilo <jthilo@gnu.org>
15928 * doc/FAQ, doc/Makefile.am:
15931 1999-05-19 Jesse Thilo <jthilo@gnu.org>
15933 * src/alloc.h, src/symtab.h, src/version.c:
15934 Protected inclusion of "config.h" with HAVE_CONFIG_H.
15936 1999-04-18 Jesse Thilo <jthilo@gnu.org>
15938 * src/.cvsignore, src/Makefile.am:
15939 Reorganized: sources in `src', documentation in `doc'.
15941 * src/lex.c (literalchar):
15942 fixed the code for escaping double quotes (thanks
15945 1999-04-18 Jesse Thilo <jthilo@gnu.org>
15947 * po/de.po, po/es.po, po/fr.po, po/nl.po, po/POTFILES.in:
15948 Adjusted paths to reflect directory reorganization.
15950 1999-04-18 Jesse Thilo <jthilo@gnu.org>
15952 * doc/.cvsignore, doc/Makefile.am:
15953 Reorganized: sources in `src', documentation in `doc'.
15955 1999-04-18 Jesse Thilo <jthilo@gnu.org>
15958 Updated AC_INIT file to reflect directory reorganization.
15960 * configure.in, .cvsignore, Makefile.am, POTFILES.in:
15961 Reorganized: sources in `src', documentation in `doc'.
15963 1999-04-13 Jesse Thilo <jthilo@gnu.org>
15966 Don't declare calloc() and realloc() if not necessary.
15968 1999-04-13 Jesse Thilo <jthilo@gnu.org>
15970 * configure.in, acconfig.h, acinclude.m4:
15971 Don't declare calloc() and realloc() if not necessary.
15973 1999-03-23 Jesse Thilo <jthilo@gnu.org>
15975 * po/.cvsignore: Added i18n support.
15977 1999-03-23 Jesse Thilo <jthilo@gnu.org>
15979 * acconfig.h, configure.in, Makefile.am:
15980 Added i18n support.
15982 1999-03-22 Jesse Thilo <jthilo@gnu.org>
15984 * src/bison.s1: Fixed #line numbers.
15986 1999-03-15 Jesse Thilo <jthilo@gnu.org>
15988 * po/es.po, po/fr.po, po/nl.po, po/de.po:
15989 Added PO files from Translation Project.
15991 1999-03-03 Jesse Thilo <jthilo@gnu.org>
15994 Added support for non-ANSI compilers (ansi2knr).
15996 1999-02-16 Jesse Thilo <jthilo@gnu.org>
15998 * configure.in: Bumped version number to 1.27.
16001 Added `bison.simple' to list of files removed by `make distclean'.
16003 1999-02-12 Jesse Thilo <jthilo@gnu.org>
16005 * src/files.c, src/files.h:
16006 Defined locations of parser files in config.h instead of Makefile.
16008 1999-02-12 Jesse Thilo <jthilo@gnu.org>
16010 * acconfig.h, acinclude.m4, configure.in, Makefile.am:
16011 Defined locations of parser files in config.h instead of Makefile.
16013 1999-02-09 Jesse Thilo <jthilo@gnu.org>
16016 Removed inappropriate use of $< macro.
16018 1999-02-05 Jesse Thilo <jthilo@gnu.org>
16020 * po/Makefile.in.in, po/POTFILES.in:
16021 Add `po' directory skeleton.
16023 1999-01-27 Jesse Thilo <jthilo@gnu.org>
16025 * README: Document help-bison list.
16027 * configure.in: Add check for mkstemp().
16029 1999-01-20 Jesse Thilo <jthilo@gnu.org>
16031 * src/conflicts.c, src/LR0.c, src/output.c, src/reader.c:
16032 Hush a few compiler warnings.
16035 Add tryclose(), which verifies that fclose was successful.
16036 Hush a couple of compiler warnings.
16038 1999-01-20 Jesse Thilo <jthilo@gnu.org>
16040 * Makefile.am, OChangeLog:
16041 ChangeLog is now automatically generated. Include the old version as
16044 1999-01-14 Jesse Thilo <jthilo@gnu.org>
16046 * 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:
16047 Update FSF address.
16049 1999-01-14 Jesse Thilo <jthilo@gnu.org>
16051 * doc/bison.texinfo: Fix formatting glitch.
16053 * doc/bison.texinfo: Update FSF address.
16055 1999-01-14 Jesse Thilo <jthilo@gnu.org>
16057 * acconfig.h: Update FSF address.
16059 1999-01-08 Jesse Thilo <jthilo@gnu.org>
16062 Don't define PACKAGE here, since config.h defines it.
16064 1998-12-30 Jesse Thilo <jthilo@gnu.org>
16066 * src/reader.c: Update copyright date.
16069 Ditch sprintf to statically-sized buffers in fatal/warn functions in
16070 favor of output directly to stderr (avoids buffer overruns).
16072 * src/reader.c: Some checks for premature EOF.
16074 * 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:
16075 Use prototypes if the compiler understands them.
16077 * src/files.c: Honor TMPDIR on Unix hosts.
16078 Use prototypes if the compiler understands them.
16081 Fix a couple of buffer overrun bugs.
16082 Use prototypes if the compiler understands them.
16084 * src/system.h: Include unistd.h and ctype.h.
16085 Use #ifdef instead of #if for NLS symbols.
16087 1998-12-30 Jesse Thilo <jthilo@gnu.org>
16089 * doc/bison.texinfo:
16090 Delete comment "consider using @set for edition number, etc..." since
16091 we now are doing so.
16093 1998-12-30 Jesse Thilo <jthilo@gnu.org>
16096 Use prototypes if the compiler understands them.
16098 * NEWS: Document 1.26 highlights.
16100 * Makefile.am: Require Automake 1.3 or later.
16103 Use prototypes if the compiler understands them.
16105 1998-12-29 Jesse Thilo <jthilo@gnu.org>
16108 Use VERSION symbol from automake for version number.
16110 1998-12-29 Jesse Thilo <jthilo@gnu.org>
16112 * acconfig.h, configure.in, version.cin:
16113 Use VERSION symbol from automake for version number.
16115 1998-11-28 Jesse Thilo <jthilo@gnu.org>
16118 Distribute original version of simple parser (bison.s1), not built
16119 version (bison.simple).
16121 1998-11-28 Jesse Thilo <jthilo@gnu.org>
16123 * doc/bison.texinfo: Add info dir entry.
16125 * doc/bison.texinfo:
16126 Let automake put version number into documentation.
16128 1998-11-26 Jesse Thilo <jthilo@gnu.org>
16130 * src/bison.cld, src/build.com, src/vmshlp.mar:
16131 Add non-RCS files from /gd/gnu/bison.
16133 1998-11-26 Jesse Thilo <jthilo@gnu.org>
16136 Document the BISON_HAIRY and BISON_SIMPLE variables.
16138 1998-11-25 Jesse Thilo <jthilo@gnu.org>
16140 * src/version.c: Build version.c automatically.
16143 Fix token numbering (used to start at 258, not 257).
16145 * src/system.h: Include config.h.
16147 * src/getargs.c: Update bug report address.
16149 * src/alloca.c, src/getopt1.c, src/getopt.c, src/getopt.h:
16150 Get latest copies of alloca.c, getopt.c, getopt.h, getopt1.c from gnu.org.
16152 1998-11-25 Jesse Thilo <jthilo@gnu.org>
16155 Rename bison.simple to bison.s1 (bison.simple is then built from bison.s1).
16157 * configure.in, version.cin:
16158 Build version.c automatically.
16160 * AUTHORS: Add AUTHORS file.
16162 * README: Update bug report address.
16165 Rename bison.simple to bison.s1 (bison.simple is then built from bison.s1).
16167 * configure.in, Makefile.am, Makefile.in, stamp-h.in:
16168 Add automake stuff.
16170 1998-11-25 Jesse Thilo <jthilo@gnu.org>
16172 * doc/bison.texinfo: Clean up some formatting.
16174 1998-05-05 Richard Stallman <rms@gnu.org>
16176 * doc/bison.texinfo:
16177 Explain better why to make a pure parser.
16179 1998-01-05 Richard Stallman <rms@gnu.org>
16181 * src/files.c (openfiles):
16182 [_WIN32 && !__CYGWIN32__] Use TEMP or Temp to
16183 find a temporary directory, if possible. Do not unlink files while
16186 1997-08-25 Richard Stallman <rms@gnu.org>
16188 * src/reader.c (stack_offset;):
16189 Change some warni to warns.
16191 * src/lex.c (literalchar): Use warns, not warni.
16193 1997-06-28 Richard Stallman <rms@gnu.org>
16195 * src/bison.s1: Add a Bison version comment.
16197 * src/main.c (fatal, warn, berror):
16200 1997-06-28 Richard Stallman <rms@gnu.org>
16202 * Makefile.in (bison_version): New variable.
16203 (dist): Use that variable.
16204 (bison.s1): Substitute the Bison version into bison.simple.
16206 * bison.simple: Add a Bison version comment.
16208 1997-06-18 Richard Stallman <rms@gnu.org>
16210 * src/main.c (fatal, warn, berror):
16211 Make error messages standard.
16212 (toomany): Improve error message text.
16214 * 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:
16215 new.h renamed to alloc.h.
16217 1997-06-18 Richard Stallman <rms@gnu.org>
16219 * Makefile.in: new.h renamed to alloc.h.
16221 1997-05-24 Richard Stallman <rms@gnu.org>
16223 * src/lex.c (literalchar):
16224 Fix the code for escaping \, " and '.
16226 (lex): Avoid trouble when there are many chars
16227 to discard in a char literal with just several chars in it.
16229 1997-05-17 Richard Stallman <rms@gnu.org>
16232 Use malloc, if using alloca is troublesome.
16233 (YYSTACK_USE_ALLOCA): New flag macro.
16234 Define it for some systems and compilers.
16235 (YYSTACK_ALLOC): New macro.
16236 (yyparse): Use YYSTACK_ALLOC to allocate stack.
16237 If it was malloc'd, free it.
16239 1997-05-17 Richard Stallman <rms@gnu.org>
16242 Use malloc, if using alloca is troublesome.
16243 (YYSTACK_USE_ALLOCA): New flag macro.
16244 Define it for some systems and compilers.
16245 (YYSTACK_ALLOC): New macro.
16246 (yyparse): Use YYSTACK_ALLOC to allocate stack.
16247 If it was malloc'd, free it.
16249 1997-04-23 Richard Stallman <rms@gnu.org>
16252 (alloca) [__hpux]: Always define as __builtin_alloca.
16254 1997-04-23 Richard Stallman <rms@gnu.org>
16257 (alloca) [__hpux]: Always define as __builtin_alloca.
16259 1997-04-22 Richard Stallman <rms@gnu.org>
16262 [__hpux]: Include alloca.h (right for HPUX 10)
16263 instead of declaring alloca (right for HPUX 9).
16265 * src/bison.s1 (__yy_memcpy):
16266 Declare arg `count' as unsigned int.
16267 (yyparse): Cast third arg to __yy_memcpy to unsigned int.
16269 1997-04-22 Richard Stallman <rms@gnu.org>
16272 [__hpux]: Include alloca.h (right for HPUX 10)
16273 instead of declaring alloca (right for HPUX 9).
16275 * bison.simple (__yy_memcpy):
16276 Declare arg `count' as unsigned int.
16277 (yyparse): Cast third arg to __yy_memcpy to unsigned int.
16279 1997-01-03 Richard Stallman <rms@gnu.org>
16281 * src/allocate.c: [__STDC__ or _MSC_VER]:
16282 Declare calloc and realloc to return void *.
16284 1997-01-02 Richard Stallman <rms@gnu.org>
16287 [_MSC_VER]: Include stdlib.h and process.h.
16288 [_MSC_VER] (getpid): Define as macro--translate it to _getpid.
16290 * src/main.c (main): Return FAILURE as a value.
16291 (printable_version): Declare arg as int, not char.
16293 1997-01-02 Richard Stallman <rms@gnu.org>
16295 * Makefile.in (dist):
16296 Explicitly check for symlinks, and copy them.
16298 1996-12-19 Richard Stallman <rms@gnu.org>
16301 [_MSC_VER] (XPFILE, XPFILE1): Define, if not already defined.
16303 1996-12-18 Paul Eggert <eggert@gnu.org>
16305 * src/bison.s1 (yyparse):
16306 If __GNUC__ and YYPARSE_PARAM are both defined,
16307 declare yyparse to have a void * argument.
16309 1996-12-18 Paul Eggert <eggert@gnu.org>
16311 * bison.simple (yyparse):
16312 If __GNUC__ and YYPARSE_PARAM are both defined,
16313 declare yyparse to have a void * argument.
16315 1996-12-17 Richard Stallman <rms@gnu.org>
16317 * src/reduce.c (nbits): Add some casts.
16319 1996-08-12 Richard Stallman <rms@gnu.org>
16321 * src/bison.s1: Test _MSDOS as well as _MSDOS_.
16323 1996-08-12 Richard Stallman <rms@gnu.org>
16325 * bison.simple: Test _MSDOS as well as _MSDOS_.
16327 1996-07-31 Richard Stallman <rms@gnu.org>
16330 [__sun && __i386]: Include alloca.h.
16332 1996-07-31 Richard Stallman <rms@gnu.org>
16335 [__sun && __i386]: Include alloca.h.
16337 1996-07-30 Richard Stallman <rms@gnu.org>
16339 * src/bison.s1: Comment change.
16341 * src/bison.s1: Test _MSDOS_, not MSDOS.
16343 1996-07-30 Richard Stallman <rms@gnu.org>
16345 * bison.simple: Comment change.
16347 * bison.simple: Test _MSDOS_, not MSDOS.
16349 1996-06-01 Richard Stallman <rms@gnu.org>
16351 * 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:
16352 Insert `_' macro around many string constants.
16355 Insert `_' macro around many string constants.
16357 (main): Call setlocale, bindtextdomain and textdomain.
16359 * src/system.h: [HAVE_LOCALE_H]: Include locale.h.
16360 [! HAVE_LOCALE_H] (setlocale): Define as no-op.
16361 [ENABLE_NLS]: Include libintl.h.
16362 [ENABLE_NLS] (gettext): Define.
16363 [! ENABLE_NLS] (bintextdomain, textdomain, _): Consolation definitions.
16364 (N_, PACKAGE, LOCALEDIR): New macros.
16366 1996-06-01 Richard Stallman <rms@gnu.org>
16368 * POTFILES.in: New file.
16370 * Makefile.in (allocate.o):
16371 Define target explicitly.
16373 * Makefile.in (CFLAGS): Set to @CFLAGS@.
16374 (LDFLAGS): Set to @LDFLAGS@.
16375 (configure): Run autoconf only if preceding `cd' succeeds.
16376 (bison.s1): Redirect output to temporary file then move the
16377 temporary to the target, rather than redirecting directly to bison.s1.
16378 (clean): Remove config.status and config.log.
16379 (distclean): Don't remove config.status here.
16381 1996-05-12 Richard Stallman <rms@gnu.org>
16384 (__yy_memcpy) [__cplusplus]: Reorder declarations of variables f and t.
16386 1996-05-12 Richard Stallman <rms@gnu.org>
16389 (__yy_memcpy) [__cplusplus]: Reorder declarations of variables f and t.
16391 1996-05-11 Richard Stallman <rms@gnu.org>
16393 * src/bison.s1 (__yy_memcpy):
16394 Really reorder the args, as was supposedly done on Feb 14 1995.
16395 (yyparse): Calls changed accordingly.
16397 1996-05-11 Richard Stallman <rms@gnu.org>
16399 * Makefile.in (dist): Don't use $(srcdir).
16401 * bison.simple (__yy_memcpy):
16402 Really reorder the args, as was supposedly done on Feb 14 1995.
16403 (yyparse): Calls changed accordingly.
16405 1996-01-27 Richard Stallman <rms@gnu.org>
16407 * src/output.c (output_rule_data):
16408 Test YYERROR_VERBOSE in the conditional
16409 around the definition of ttyname.
16411 1995-12-29 Richard Stallman <rms@gnu.org>
16414 Fix line numbers in #line commands.
16416 1995-12-29 Richard Stallman <rms@gnu.org>
16419 Fix line numbers in #line commands.
16421 1995-12-27 Richard Stallman <rms@gnu.org>
16423 * src/bison.s1 (YYPARSE_PARAM_DECL):
16424 In C++, make it always null.
16425 (YYPARSE_PARAM_ARG): New macro.
16426 (yyparse): Use YYPARSE_PARAM_ARG.
16428 1995-12-27 Richard Stallman <rms@gnu.org>
16430 * bison.simple (YYPARSE_PARAM_DECL):
16431 In C++, make it always null.
16432 (YYPARSE_PARAM_ARG): New macro.
16433 (yyparse): Use YYPARSE_PARAM_ARG.
16435 1995-11-29 Richard Stallman <rms@gnu.org>
16437 * doc/bison.texinfo:
16438 Describe literal string tokens, %raw, %no_lines, %token_table.
16440 1995-11-29 Daniel Hagerty <hag@gnu.org>
16442 * doc/bison.texinfo: Fixed update date
16444 1995-10-16 Richard Stallman <rms@gnu.org>
16446 * src/version.c: Version 1.25.
16448 1995-10-16 Richard Stallman <rms@gnu.org>
16450 * NEWS: *** empty log message ***
16452 1995-10-16 Richard Stallman <rms@gnu.org>
16454 * doc/bison.1, doc/bison.rnh:
16457 1995-10-15 Richard Stallman <rms@gnu.org>
16459 * src/vmsgetargs.c, src/getargs.c:
16460 Added -n, -k, and -raw switches.
16461 (noparserflag, toknumflag, rawtoknumflag): New variables.
16463 * src/symtab.h (SALIAS):
16464 New #define for adding aliases to %token.
16465 (struct bucket): Added `alias' field.
16467 * src/reduce.c (reduce_grammar):
16468 Revise error message.
16469 (print_notices): Remove final `.' from error message.
16471 * src/reader.c (reader_output_yylsp):
16473 (readgram): Use `#if 0' around code that accepted %command
16474 inside grammar rules: The documentation doesn't allow it,
16475 and it will fail since the %command processors scan for the next %.
16476 (parse_token_decl): Extended the %token
16477 declaration to allow a multi-character symbol as an alias.
16478 (parse_thong_decl): New function.
16479 (read_declarations): Added %thong declarations.
16480 (read_declarations): Handle NOOP to deal with allowing
16481 % declarations as another means to specify the flags.
16482 (readgram): Allow %prec prior to semantics embedded in a rule.
16483 (skip_to_char, read_declarations, copy_definition)
16484 (parse_token_decl, parse_start_decl, parse_type_decl)
16485 (parse_assoc_decl, parse_union_decl, parse_expect_decl)
16486 (get_type_name, copy_guard, copy_action, readgram)
16487 (get_type, packsymbols): Revised most error messages.
16488 Changed `fatal' to `warnxxx' to avoid aborting for error.
16489 Revised and use multiple warnxxx functions to avoid using VARARGS1.
16490 (read_declarations): Improve the error message for
16491 an invalid character. Do not abort.
16492 (read_declarations, copy_guard, copy_action): Use
16493 printable_version to avoid unprintable characters in printed output.
16494 (parse_expect_decl): Error if argument to %expect exceeds 10 digits.
16495 (parse_token_decl, parse_assoc_decl, parse_type_decl, get_type):
16496 Allow the type of a non-terminal can be given
16497 more than once, as long as all specifications give the same type.
16500 (output_headers, output_trailers, output, output_gram)
16501 (output_rule_data): Implement noparserflag variable.
16502 Implement toknumflag variable.
16503 (output): Call reader_output_yylsp to output LTYPESTR.
16505 * src/main.c (main):
16506 If reader sees an error, don't process the grammar.
16507 (fatals): Updated to not use VARARGS1.
16508 (printable_version, int_to_string, warn, warni, warns, warnss)
16509 (warnsss): New error reporting functions. Avoid abort for error.
16512 Added THONG and NOOP for alias processing.
16513 Added SETOPT for the new code that allows setting options with %flags.
16516 Include getopt.h. Add some extern decls.
16517 (safegetc): New function to deal with EOF gracefully.
16518 (literalchar); new function to deal with reading \ escapes.
16519 (lex): Use literalchar.
16520 (lex): Implemented "..." tokens.
16521 (literalchar, lex, parse_percent_token): Made tokenbuffer
16522 always contain the token. This includes growing the token
16523 buffer while reading an integer.
16524 (parse_percent_token): Replaced if-else statement with percent_table.
16525 (parse_percent_token): Added % declarations as another
16526 way to specify the flags -n, -l, and -r. Also added hooks for
16527 -d, -k, -y, -v, -t, -p, -b, -o, but implementation requires
16528 major changes to files.c.
16529 (lex) Retain in the incoming stream a character following
16531 (skip_white_space, lex): Revised most error messages
16532 and changed fatal to warn to avoid aborting.
16533 (percent_table): Added %thong declarations.
16535 * src/gram.h: Comment changes.
16537 * src/files.c (openfiles, open_extra_files, done):
16539 and actfile file. Handle noparserflag. Both for -n switch.
16541 * src/conflicts.c (resolve_sr_conflict):
16542 Remove use of alloca.
16544 1995-06-01 Jim Meyering <meyering@gnu.org>
16546 * doc/bison.texinfo: *** empty log message ***
16548 1995-05-06 Richard Stallman <rms@gnu.org>
16550 * src/bison.s1: Comment change.
16552 1995-05-06 Richard Stallman <rms@gnu.org>
16554 * bison.simple: Comment change.
16556 1995-05-03 Richard Stallman <rms@gnu.org>
16558 * src/version.c: Version now 1.24.
16560 * src/bison.s1: Change distribution terms.
16562 * src/version.c: Version now 1.23.
16564 1995-05-03 Richard Stallman <rms@gnu.org>
16566 * doc/bison.texinfo:
16567 Rewrite "Conditions for Using Bison".
16568 Update version to 1.24.
16570 1995-05-03 Richard Stallman <rms@gnu.org>
16572 * bison.simple: Change distribution terms.
16574 1995-02-23 Richard Stallman <rms@gnu.org>
16576 * src/files.c: Test __VMS_POSIX as well as VMS.
16578 1995-02-14 Jim Meyering <meyering@gnu.org>
16580 * src/bison.s1 (__yy_memcpy):
16581 Renamed from __yy_bcopy to avoid
16582 confusion. Reverse FROM and TO arguments to be consistent with
16585 1995-02-14 Jim Meyering <meyering@gnu.org>
16587 * bison.simple (__yy_memcpy):
16588 Renamed from __yy_bcopy to avoid
16589 confusion. Reverse FROM and TO arguments to be consistent with
16592 1994-11-10 David J. MacKenzie <djm@gnu.org>
16598 * Makefile.in (DISTFILES): Include NEWS.
16600 * Makefile.in (DISTFILES):
16601 Include install-sh, not install.sh.
16603 * configure.in: Update to Autoconf v2 macro names.
16605 1994-10-05 David J. MacKenzie <djm@gnu.org>
16607 * Makefile.in: fix typo
16609 * Makefile.in (prefix, exec_prefix):
16610 Let configure set them.
16612 1994-09-28 David J. MacKenzie <djm@gnu.org>
16614 * Makefile.in: Set datadir to $(prefix)/share.
16616 1994-09-15 Richard Stallman <rms@gnu.org>
16619 Update copyright notice and GPL version.
16621 1994-09-15 Richard Stallman <rms@gnu.org>
16624 Update copyright notice and GPL version.
16626 1994-07-12 Richard Stallman <rms@gnu.org>
16628 * src/reduce.c, src/reader.c:
16631 1994-05-05 David J. MacKenzie <djm@gnu.org>
16633 * Makefile.in: entered into RCS
16635 1994-03-26 Richard Stallman <rms@gnu.org>
16637 * src/bison.s1: entered into RCS
16639 1994-03-26 Richard Stallman <rms@gnu.org>
16641 * bison.simple: entered into RCS
16643 1994-03-25 Richard Stallman <rms@gnu.org>
16645 * src/main.c: entered into RCS
16647 1994-03-24 Richard Stallman <rms@gnu.org>
16649 * src/conflicts.c: entered into RCS
16651 1994-01-02 Richard Stallman <rms@gnu.org>
16653 * Makefile.in: *** empty log message ***
16655 1993-11-21 Richard Stallman <rms@gnu.org>
16657 * src/bison.s1: *** empty log message ***
16659 1993-11-21 Richard Stallman <rms@gnu.org>
16661 * doc/bison.texinfo: entered into RCS
16663 * doc/bison.texinfo: *** empty log message ***
16665 1993-11-21 Richard Stallman <rms@gnu.org>
16667 * bison.simple: *** empty log message ***
16669 1993-10-25 David J. MacKenzie <djm@gnu.org>
16671 * doc/bison.texinfo: *** empty log message ***
16673 1993-10-19 Richard Stallman <rms@gnu.org>
16675 * src/bison.s1: *** empty log message ***
16677 1993-10-19 Richard Stallman <rms@gnu.org>
16679 * bison.simple: *** empty log message ***
16681 1993-10-14 Richard Stallman <rms@gnu.org>
16683 * src/bison.s1: *** empty log message ***
16685 1993-10-14 Richard Stallman <rms@gnu.org>
16687 * bison.simple: *** empty log message ***
16689 1993-09-14 David J. MacKenzie <djm@gnu.org>
16691 * doc/bison.texinfo: *** empty log message ***
16693 1993-09-13 Noah Friedman <friedman@gnu.org>
16695 * Makefile.in: *** empty log message ***
16697 1993-09-10 Richard Stallman <rms@gnu.org>
16699 * src/conflicts.c: *** empty log message ***
16701 * src/system.h: entered into RCS
16703 1993-09-10 Richard Stallman <rms@gnu.org>
16705 * doc/bison.1: entered into RCS
16707 1993-09-06 Noah Friedman <friedman@gnu.org>
16709 * src/version.c: entered into RCS
16711 1993-09-06 Noah Friedman <friedman@gnu.org>
16713 * Makefile.in: *** empty log message ***
16715 1993-07-30 David J. MacKenzie <djm@gnu.org>
16717 * Makefile.in: *** empty log message ***
16719 1993-07-24 Richard Stallman <rms@gnu.org>
16721 * src/bison.s1: *** empty log message ***
16723 1993-07-24 Richard Stallman <rms@gnu.org>
16725 * bison.simple: *** empty log message ***
16727 1993-07-08 David J. MacKenzie <djm@gnu.org>
16729 * Makefile.in: *** empty log message ***
16731 1993-07-04 Richard Stallman <rms@gnu.org>
16733 * src/bison.s1: *** empty log message ***
16735 1993-07-04 Richard Stallman <rms@gnu.org>
16737 * bison.simple: *** empty log message ***
16739 1993-06-26 David J. MacKenzie <djm@gnu.org>
16741 * src/getargs.c: entered into RCS
16743 1993-06-26 David J. MacKenzie <djm@gnu.org>
16745 * doc/bison.texinfo: *** empty log message ***
16747 * doc/bison.1: New file.
16749 1993-06-25 Richard Stallman <rms@gnu.org>
16751 * src/getargs.c: New file.
16753 1993-06-16 Richard Stallman <rms@gnu.org>
16755 * src/bison.s1: *** empty log message ***
16757 1993-06-16 Richard Stallman <rms@gnu.org>
16759 * bison.simple: *** empty log message ***
16761 1993-06-03 Richard Stallman <rms@gnu.org>
16763 * src/bison.s1: New file.
16765 1993-06-03 Richard Stallman <rms@gnu.org>
16767 * doc/bison.texinfo: *** empty log message ***
16769 1993-06-03 Richard Stallman <rms@gnu.org>
16771 * bison.simple: New file.
16773 1993-05-19 Richard Stallman <rms@gnu.org>
16775 * doc/bison.texinfo: New file.
16777 1993-05-07 Noah Friedman <friedman@gnu.org>
16779 * Makefile.in: *** empty log message ***
16781 1993-04-28 Noah Friedman <friedman@gnu.org>
16783 * src/reader.c: *** empty log message ***
16785 1993-04-23 Noah Friedman <friedman@gnu.org>
16787 * src/alloc.h: entered into RCS
16789 1993-04-20 David J. MacKenzie <djm@gnu.org>
16791 * src/version.c: *** empty log message ***
16793 * src/files.c, src/allocate.c:
16796 * src/reader.c: *** empty log message ***
16798 * src/lex.c: entered into RCS
16800 * src/conflicts.c: New file.
16802 * src/symtab.c: entered into RCS
16804 * src/alloc.h: New file.
16806 * src/LR0.c: entered into RCS
16808 1993-04-18 Noah Friedman <friedman@gnu.org>
16810 * src/reader.c: New file.
16812 * src/version.c: *** empty log message ***
16814 1993-04-18 Noah Friedman <friedman@gnu.org>
16816 * Makefile.in: *** empty log message ***
16818 1993-04-17 Noah Friedman <friedman@gnu.org>
16820 * Makefile.in: *** empty log message ***
16822 1993-04-15 Richard Stallman <rms@gnu.org>
16824 * src/main.c, src/files.c:
16827 1993-04-15 Noah Friedman <friedman@gnu.org>
16829 * configure.in: entered into RCS
16831 * configure.in: *** empty log message ***
16833 * configure.in: New file.
16835 1993-04-14 Richard Stallman <rms@gnu.org>
16837 * Makefile.in: New file.
16839 1993-04-13 Richard Stallman <rms@gnu.org>
16841 * src/version.c: New file.
16843 1993-03-25 Richard Stallman <rms@gnu.org>
16845 * src/output.c: entered into RCS
16847 1992-09-25 Richard Stallman <rms@gnu.org>
16849 * configure.bat: entered into RCS
16851 1992-06-22 Richard Stallman <rms@gnu.org>
16853 * src/vmsgetargs.c: entered into RCS
16855 1992-06-22 Richard Stallman <rms@gnu.org>
16857 * doc/bison.rnh: entered into RCS
16859 1992-04-20 David J. MacKenzie <djm@gnu.org>
16861 * README: entered into RCS
16863 1992-01-22 Richard Stallman <rms@gnu.org>
16865 * src/machine.h: entered into RCS
16867 1991-12-21 Richard Stallman <rms@gnu.org>
16869 * src/lalr.c, src/closure.c:
16872 1991-12-20 Richard Stallman <rms@gnu.org>
16874 * src/state.h: entered into RCS
16876 1991-12-18 Richard Stallman <rms@gnu.org>
16878 * src/print.c, src/nullable.c, src/derives.c:
16881 1991-11-03 David J. MacKenzie <djm@gnu.org>
16883 * src/warshall.c, src/types.h, src/symtab.h, src/lex.h, src/gram.c, src/gram.h, src/files.h:
16886 1988-09-09 Richard Stallman <rms@gnu.org>
16888 * src/bison.hairy: entered into RCS
16890 1987-12-16 Richard Stallman <rms@gnu.org>
16892 * REFERENCES: entered into RCS
16897 Copyright (C) 1987, 1988, 1991, 1992, 1993, 1994, 1995, 1996,
16898 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free
16899 Software Foundation, Inc.
16901 Copying and distribution of this file, with or without
16902 modification, are permitted provided the copyright notice and this
16903 notice are preserved.