]> git.saurik.com Git - bison.git/blob - ChangeLog
851983d7aa62a4da947f1f6146a9f3990d4e5784
[bison.git] / ChangeLog
1 2006-09-13 Paul Eggert <eggert@cs.ucla.edu>
2
3 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Remove
4 "#define YYSTYPE int" that caused "make maintainer-check" to fail
5 due to header ordering dependencies. I don't know why the #define
6 was there.
7
8 Fix glr.cc and lalr1.cc's use of YYDEBUG so that there's zero
9 runtime cost when YYDEBUG is not defined, and so that some tests
10 that used to fail now work. Problem and initial suggestion by
11 Paolo Bonzini.
12 * data/c++.m4 (b4_parse_param_cons): Omit leading ','.
13 * data/glr.cc (b4_parser_class_name):
14 Initialize yycdebug_ only if YYDEBUG. Also, initialize yydebug_.
15 (debug_level, set_debug_level): Affect yydebug_, not ::yydebug.
16 (yydebug_) [YYDEBUG]: New member.
17 (yycdebug_): Now defined only if YYDEBUG.
18 * data/lalr1.cc (yydebug_, yycdebug_): Now defined only if YYDEBUG.
19 (YYCDEBUG) [!YYDEBUG]: Don't use yydebug_ and yycdebug_.
20 (b4_parser_class_name): Initialize yydebug_ and yycdebug_ only
21 if YYYDEBUG.
22 (debug_stream, set_debug_stream, debug_level, set_debug_level):
23 Define only if YYDEBUG.
24 * tests/calc.at (_AT_DATA_CALC_Y) [!YYDEBUG]: Omit call to
25 set_debug_level.
26 * tests/regression.at (_AT_DATA_DANCER_Y) [!YYDEBUG]: Likewise.
27 * tests/calc.at (AT_CHECK_CALC_GLR_CC): Uncomment calls to
28 AT_CHECK_CALC_GLR_CC that are working now.
29
30 2006-09-12 Paul Eggert <eggert@cs.ucla.edu>
31
32 * data/glr.cc (YYERROR_VERBOSE, YYTOKEN_TABLE): Remove.
33 We don't need them in glr.cc, and glr.c defines them.
34 Defining YYERROR_VERBOSE to 0 here breaks glr.c, since glr.c
35 assumes that defining it to anything is the same as defining
36 it to 1. Problem reported by Paolo Bonzini.
37
38 2006-09-12 Paolo Bonzini <bonzini@gnu.org> (tiny change)
39
40 * data/c.m4 (b4_null, b4_case): Define.
41 * src/output.c (prepare_symbols): Use b4_null.
42 (user_actions_output): Use b4_case.
43
44 2006-09-11 Paul Eggert <eggert@cs.ucla.edu>
45
46 * data/glr.c (b4_shared_declarations): Put start-header first,
47 before any #includes that we generate, so that feature-test
48 macros work. Problem reported by Michael Deutschmann in
49 <http://lists.gnu.org/archive/html/bug-bison/2006-09/msg00004.html>.
50 * data/lalr1.cc: Likewise.
51 * doc/bison.texinfo (Prologue): Document that feature-test macros
52 should be defined before any Bison declarations.
53 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Put defns
54 that depend on location.hh after, not before, Bison decls, since
55 we now include location.hh after the first user prologue.
56
57 * doc/bison.texinfo (Calc++ Parser): Fix memory leak reported by
58 Sander Brandenburg in
59 <http://lists.gnu.org/archive/html/bug-bison/2006-09/msg00002.html>.
60 Also, fix minor white space and comment issues.
61 (Prologue): Mention that it's better to define feature-test macros
62 before Bison declarations. Problem reported by Michael Deutschmann.
63
64 * README-cvs: Fix typo: "&" should be "&&". Problem reported
65 by Jim Meyering.
66 * m4/.cvsignore: Add argmatch.m4. Remove obstack.m4, strerror_r.m4.
67 This adjusts to recent gnulib changes.
68
69 2006-09-04 Joel E. Denny <jdenny@ces.clemson.edu>
70
71 Finish implementation of per-type %destructor/%printer. Discussed
72 starting at
73 <http://lists.gnu.org/archive/html/bison-patches/2006-02/msg00064.html>
74 and
75 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00091.html>.
76 * NEWS (2.3+): Add a description of this feature to the default
77 %destructor/%printer description.
78 * doc/bison.texinfo (Freeing Discarded Symbols): Likewise.
79 * src/symlist.c (symbol_list_destructor_set, symbol_list_printer_set):
80 Invoke semantic_type_destructor_set or semantic_type_printer_set when a
81 list node contains a semantic type.
82 * src/symtab.c, src/symtab.h: Extend with a table that associates
83 semantic types with their %destructor's and %printer's.
84 (semantic_type_from_uniqstr, semantic_type_get,
85 semantic_type_destructor_set, semantic_type_printer_set): New functions
86 composing the public interface of that table.
87 (symbol_destructor_get, symbol_destructor_location_get,
88 symbol_printer_get, symbol_printer_location_get): If there's no
89 per-symbol %destructor/%printer, look up the per-type before trying
90 the default.
91 * tests/actions.at (Per-type %printer and %destructor): New test case.
92 * tests/input.at (Default %printer and %destructor redeclared):
93 Extend to check that multiple occurrences of %symbol-default in a
94 single %destructor/%printer declaration is an error.
95 (Per-type %printer and %destructor redeclared, Unused values with
96 per-type %destructor): New test cases.
97
98 2006-09-04 Joel E. Denny <jdenny@ces.clemson.edu>
99
100 Require default %destructor/%printer to be declared using
101 %symbol-default instead of an empty symbol list, and start working on
102 new per-type %destructor/%printer. Discussed at
103 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00007.html>.
104 * NEWS (2.3+): Add %symbol-default to example.
105 * bison.texinfo (Freeing Discarded Symbols): Likewise.
106 (Bison Symbols): Add entry for %symbol-default.
107 * src/parse-gram.y (PERCENT_SYMBOL_DEFAULT): New token.
108 (generic_symlist, generic_symlist_item): New nonterminals for creating
109 a list in which each item is a symbol, semantic type, or
110 %symbol-default.
111 (grammar_declaration): Use generic_symlist in %destructor and %printer
112 declarations instead of symbols.1 or an empty list.
113 (symbol_declaration, precedence_declaration, symbols.1): Update actions
114 for changes to symbol_list.
115 * src/reader.c: Update for changes to symbol_list.
116 * src/scan-code.l: Likewise.
117 * src/scan-gram.l: Scan new PERCENT_SYMBOL_DEFAULT token.
118 * src/symlist.c, src/symlist.h: Extend such that a list node may
119 represent a semantic type or a %symbol-default in addition to just an
120 ordinary symbol. Add switched functions for setting %destructor's and
121 %printer's.
122 * tests/actions.at, tests/input.at: Add %symbol-default to all default
123 %destructor/%printer declarations.
124
125 2006-08-23 Joel E. Denny <jdenny@ces.clemson.edu>
126
127 Whether the default %destructor/%printer applies to a particular symbol
128 isn't a question of whether the user *declares* that symbol (in %token,
129 for example). It's a question of whether the user by any means
130 *defines* the symbol at all (by simply using a char token, for
131 example). $end is defined by Bison whereas any other token with token
132 number 0 is defined by the user. The error token is always defined by
133 Bison regardless of whether the user declares it with %token, but we
134 may one day let the user define error as a nonterminal instead.
135 * NEWS (2.3+): Say "user-defined" instead of "user-declared".
136 * doc/bison.texinfo (Freeing Discarded Symbols): Likewise, and document
137 the meaning of "user-defined".
138 * tests/actions.at (Default %printer and %destructor for user-declared
139 end token): Rename to...
140 (Default %printer and %destructor for user-defined end token): ...
141 this.
142
143 * src/symtab.c (symbol_destructor_get, symbol_printer_get): In the
144 computation of whether to apply the default, don't maintain a list of
145 every Bison-defined symbol. Instead, just check for a first character
146 of '$', which a user symbol cannot have, and check for the error token.
147
148 2006-08-21 Joel E. Denny <jdenny@ces.clemson.edu>
149
150 Don't apply the default %destructor or %printer to the error token,
151 $undefined, or $accept. This change fits the general rule that the
152 default %destructor and %printer are only for user-declared symbols,
153 and it solves several difficulties that are described in the new test
154 cases listed below.
155 * src/symtab.c (symbol_destructor_get, symbol_printer_get): Implement.
156 * tests/actions.at (Default %printer and %destructor are not for error
157 or $undefined, Default %printer and %destructor are not for $accept):
158 New test cases.
159
160 2006-08-19 Joel E. Denny <jdenny@ces.clemson.edu>
161
162 Allow %start after the first rule.
163 * src/reader.c (grammar_current_rule_begin): Don't set the start symbol
164 when parsing the first rule.
165 (check_and_convert_grammar): Search for it here after all grammar
166 declarations have been parsed. Skip midrules, which have dummy LHS
167 nonterminals.
168 * src/symtab.c (symbol_is_dummy): New function.
169 * src/symtab.h (symbol_is_dummy): Declare it.
170 * tests/input.at (%start after first rule): New test.
171
172 2006-08-18 Joel E. Denny <jdenny@ces.clemson.edu>
173
174 Redo some of the previous commit: add back the ability to use
175 non-aliased/undeclared string literals since it might be useful to
176 those declaring %token-table.
177 * src/reader.c (check_and_convert_grammar): Undo changes in previous
178 commit: don't worry about complaints from symbols_pack.
179 * src/symtab.c (symbol_new, symbol_class_set,
180 symbol_check_alias_consistency): Undo changes in previous commit: count
181 each string literal as a new symbol and token, assign it a symbol
182 number, and don't complain about non-aliased string literals.
183 (symbols_pack): Since symbol_make_alias still does not decrement symbol
184 and token counts but does still set aliased tokens to the same number,
185 symbol_pack_processor now leaves empty slots in the symbols array.
186 Remove those slots.
187 * tests/regression.at (Undeclared string literal): Remove test case
188 added in previous commit since non-aliased string literals are allowed
189 again.
190 (Characters Escapes, Web2c Actions): Undo changes in previous commit:
191 remove unnecessary string literal declarations.
192 * tests/sets.at (Firsts): Likewise.
193
194 2006-08-18 Joel E. Denny <jdenny@ces.clemson.edu>
195
196 Don't allow an undeclared string literal, but allow a string literal to
197 be used before its declaration.
198 * src/reader.c (check_and_convert_grammar): Don't invoke packgram if
199 symbols_pack complained.
200 * src/symtab.c (symbol_new): Don't count a string literal as a new
201 symbol.
202 (symbol_class_set): Don't count a string literal as a new token, and
203 don't assign it a symbol number since symbol_make_alias does that.
204 (symbol_make_alias): It's not necessary to decrement the symbol and
205 token counts anymore. Don't assume that an alias declaration occurs
206 before any uses of the identifier or string, and thus don't assert that
207 one of them has the highest symbol number so far.
208 (symbol_check_alias_consistency): Complain if there's a string literal
209 that wasn't declared as an alias.
210 (symbols_pack): Bail if symbol_check_alias_consistency failed since
211 symbol_pack asserts that every token has been assigned a symbol number
212 although undeclared string literals have not.
213 * tests/regression.at (String alias declared after use, Undeclared
214 string literal): New test cases.
215 (Characters Escapes, Web2c Actions): Declare string literals as
216 aliases.
217 * tests/sets.at (Firsts): Likewise.
218
219 2006-08-14 Joel E. Denny <jdenny@ces.clemson.edu>
220
221 In the grammar scanner, STRING_FINISH unclosed constructs and return
222 them to the parser in order to improve error messages.
223 * src/scan-gram.l (SC_ESCAPED_STRING, SC_ESCAPED_CHARACTER,
224 SC_BRACED_CODE, SC_PROLOGUE): Implement.
225 * tests/input.at (Unclosed constructs): New test case.
226 * tests/regression.at (Invalid inputs): Update now that unclosed %{ is
227 seen.
228
229 * src/scan-gram.h, src/scan-gram.l (gram_last_braced_code_loc): Remove
230 unused global.
231
232 2006-08-13 Joel E. Denny <jdenny@ces.clemson.edu>
233
234 Handle string aliases for character tokens correctly.
235 * src/symtab.c (symbol_user_token_number_set): If the token has an
236 alias, check and set its alias's user token number instead of its own,
237 which is set to indicate the alias. Previously, every occurrence of
238 the character token in the grammar overwrote that alias indicator with
239 the character code.
240 * tests/input.at (String aliases for character tokens): New test.
241
242 2006-08-12 Joel E. Denny <jdenny@ces.clemson.edu>
243
244 * src/parse-gram.y: Add `%expect 0' so we don't overlook conflicts.
245
246 2006-08-11 Paul Eggert <eggert@cs.ucla.edu>
247
248 * bootstrap: Put in need-ngettext argument to AM_GNU_GETTEXT,
249 to prevent failures when building on older platforms.
250 Check for autopoint failure.
251 Set XGETTEXT_OPTIONS to values that check for C format strings,
252 so that translators are warned about them (this also helps
253 prevent core dumps).
254
255 * lib/subpipe.c (create_subpipe): Use new gnulib pipe_safer
256 function, since it simplifies our code a bit.
257
258 * configure.ac (AC_ARG_ENABLE): Use -Wextra -Wno-sign-compare
259 rather than -W, so we don't get bogus warnings about sign comparisons.
260 Add -Wpointer-arith, since that warning is useful (it reports code
261 that does not conform to C89 and that some compilers reject).
262 * data/c.m4, data/glr.c, data/lalr1.cc, data/yacc.c: Undo latest change,
263 since it's no longer needed.
264
265 2006-08-10 Joel E. Denny <jdenny@ces.clemson.edu>
266
267 Clean up scanners a bit.
268 * src/flex-scanner.h (FLEX_NO_OBSTACK): New macro that blocks obstack
269 definitions so gcc won't warn when obstack_for_string is unused.
270 * src/scan-code.l: config.h and system.h are already #include'd by
271 scan-code-c.c, so get rid of them here.
272 * src/scan-gram.l: Likewise.
273 * src/scan-skel.l: Likewise, and use flex-scanner.h without obstack
274 definitions rather than duplicating the rest of it.
275 * src/scan-gram-c.c, scan-skel-c.c: #include "system.h".
276
277 2006-08-09 Joel E. Denny <jdenny@ces.clemson.edu>
278
279 Suppress signed/unsigned comparison warnings for yycheck.
280 * data/c.m4 (b4_safest_int_type): New macro.
281 * data/glr.c, data/lalr1.cc: Wherever you compare yycheck[i] against
282 a signed int type, cast it to b4_safest_int_type first.
283 * data/yacc.c: Likewise.
284 (b4_safest_int_type): Overwrite the one from c.m4 since b4_int_type is
285 also overwritten.
286
287 2006-08-09 Ralf Wildenhues <Ralf.Wildenhues@gmx.de> (tiny change)
288
289 * doc/bison.texinfo: Fix some typos.
290
291 2006-08-02 Paul Eggert <eggert@cs.ucla.edu>
292
293 * m4/.cvsignore: Add inttypes_h.m4,lib-ld.m4, lib-prefix.m4,
294 po.m4, stdint_h.m4, uintmax_t.m4, ulonglong.m4, warning.m4.
295
296 * bootstrap (gnulib_tool): Stop using --assume-autoconf;
297 the latest gnulib does this a different way.
298 (get_translations): Sharuzzaman Ahmat Raslan reported that the ms
299 translation was patched, so stop omitting it.
300
301 2006-07-29 Joel E. Denny <jdenny@ces.clemson.edu>
302
303 Enable declaration of default %printer/%destructor. Make the parser
304 use these for all user-declared grammar symbols for which the user does
305 not declare a specific %printer/%destructor. Thus, the parser uses it
306 for token 0 if the user declares it but not if Bison generates it as
307 $end. Discussed starting at
308 <http://lists.gnu.org/archive/html/bison-patches/2006-02/msg00064.html>,
309 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00091.html>,
310 and
311 <http://lists.gnu.org/archive/html/bison-patches/2006-07/msg00019.html>.
312 * NEWS (2.3+): Mention.
313 * doc/bison.texinfo (Actions in Mid-Rule): It's no longer impossible to
314 declare a %destructor for a mid-rule's semantic value. It's just
315 impossible to declare one specific to it.
316 (Freeing Discarded Symbols): Mention that @$ can be used in %destructor
317 code. Describe default %destructor form.
318 * src/parse-gram.y (grammar_declaration): Parse default
319 %printer/%destructor declarations.
320 * src/output.c (symbol_destructors_output): Use symbol_destructor_get
321 and symbol_destructor_location_get rather than accessing the destructor
322 and destructor_location members of struct symbol.
323 (symbol_printers_output): Likewise but for %printer's.
324 * src/reader.c (symbol_should_be_used): Likewise but for %destructor's
325 again.
326 * src/symtab.c (default_destructor, default_destructor_location,
327 default_printer, default_printer_location): New static global
328 variables to record the default %destructor and %printer.
329 (symbol_destructor_get, symbol_destructor_location_get,
330 symbol_printer_get, symbol_printer_location_get): New functions to
331 compute the appropriate %destructor and %printer for a symbol.
332 (default_destructor_set, default_printer_set): New functions to set the
333 default %destructor and %printer.
334 * src/symtab.h: Prototype all those new functions.
335 * tests/actions.at (Default %printer and %destructor): New test to
336 check that the right %printer and %destructor are called, that they're
337 not called for $end, and that $$ and @$ work correctly.
338 (Default %printer and %destructor for user-declared end token): New
339 test to check that the default %printer and %destructor are called for
340 a user-declared end token.
341 * tests/input.at (Default %printer and %destructor redeclared, Unused
342 values with default %destructor): New tests to check related grammar
343 warnings and errors.
344
345 2006-07-29 Joel E. Denny <jdenny@ces.clemson.edu>
346
347 Clean up handling of %destructor for the end token (token 0).
348 Discussed starting at
349 <http://lists.gnu.org/archive/html/bison-patches/2006-07/msg00019.html>
350 and
351 <http://lists.gnu.org/archive/html/help-bison/2006-07/msg00013.html>.
352
353 Make the skeletons consistent in how they pop the end token and invoke
354 its %destructor.
355 * data/glr.c (yyrecoverSyntaxError, yyparse): Don't pop the start
356 state, which has token number 0, since this would invoke the
357 %destructor for the end token.
358 * data/lalr1.cc (yy::parser::parse): Don't check for the final state
359 until after shifting the end token, or else it won't be popped.
360 * data/yacc.c (yyparse): Likewise.
361
362 * data/glr.c (yyparse): Clear the lookahead after shifting it even when
363 it's the end token. Upon termination, destroy an unshifted lookahead
364 even when it's the end token.
365 * data/lalr1.cc (yy::parser::parse): Likewise.
366 * data/yacc.c (yyparse): Likewise.
367
368 * src/reader.c (packgram): Don't check rule 0. This suppresses unused
369 value warnings for the end token when the user gives the end token a
370 %destructor.
371
372 * tests/actions.at (Printers and Destructors): Test all the above.
373
374 2006-07-24 Paul Eggert <eggert@cs.ucla.edu>
375
376 Update to latest gnulib and gettext versions.
377 * bootstrap (gnulib-modules): Remove hard-locale, stdio-safer.
378 Add fopen-safer.
379 (gnulib_files): Add m4/warning.m4. Don't worry about files
380 overwritten by autopoint.
381 Replace gt_INTL_SUBDIR_CORE with an empty body in m4/gettext_gl.m4.
382 Suppress "id", "ms", "tr" translations for now, since gettext 0.15
383 rejects them.
384 Don't use autoreconf; instead, invoke autopoint etc. by hand,
385 so that we can remove the intl files at a better time.
386 (intl_files_to_remove): Remove aclocal.m4, since it gets
387 rebuilt anyway. Remove m4/inttypes_h.m4, m4/inttypes.m4,
388 m4/isc-posix.m4, m4/lib-ld.m4, m4/lib-prefix.m4, m4/po.m4,
389 m4/stdint_h.m4, m4/uintmax_t.m4, m4/ulonglong.m4.
390 Add m4/inttypes-h.m4, m4/lock.m4, m4/visibility.m4.
391 Remove datarootdir hack; no longer needed.
392 * configure.ac: Use gl_WARNING_CFLAGS rather than BISON_WARNING.
393 (AM_GNU_GETTEXT_VERSION): Bump from 0.12 to 0.15.
394 * lib/.cvsignore: Remove hard-locale.c, hard-locale.h, strdup.c,
395 strdup.h.
396 * m4/.cvsignore: Remove hard-locale.m4, strdup.m4.
397 * m4/warning.m4: Remove from CVS, since we now use gnulib's version.
398
399 2006-07-20 Paul Eggert <eggert@cs.ucla.edu>
400
401 * bootstrap: Adjust to today's change to gnulib-tool by invoking
402 it with --assume-autoconf='latest-stable'.
403
404 2006-07-13 Joel E. Denny <jdenny@ces.clemson.edu>
405
406 * src/parse-gram.y (grammar_declaration): Don't confuse Doxygen (at
407 least 1.4.7 and 1.4.4) by putting a #line between `typedef union
408 YYSTYPE' and `{'.
409 * src/muscle_tab.h (muscle_grow): Replace the header comments with
410 those from muscle_tab.c since the old ones are misleading.
411
412 2006-07-13 Akim Demaille <akim@epita.fr>
413
414 Support %define "KEY" {VALUE}.
415 * src/scan-code.h, src/scan-code.l (translate_action)
416 (translate_rule_action, translate_symbol_action, translate_code):
417 Return char *, not const char *.
418 * src/parse-gram.y (declaration): Rename as...
419 (prologue_declaration): this.
420 (string_content): Remove this nonterminal, use STRING.
421 (braceless, content, content.opt): New nonterminal.
422 Use them.
423 (%define): Now accept content.opt, i.e., accept also BRACED_CODE
424 as value.
425 * src/scan-gram.l (getargs.h): Don't include it.
426
427 2006-07-12 Paul Eggert <eggert@cs.ucla.edu>
428
429 * data/lalr1.cc (YYCDEBUG): Use 'if (yydebug_) (*yycdebug_)'
430 rather than a for-loop that declares a local bool variable. This
431 should work around a compatibility problem with a Cray x1e C++
432 compiler reported by Hung Nguyen in
433 <http://lists.gnu.org/archive/html/help-bison/2006-07/msg00022.html>.
434 The for-loop was introduced in the 2004-11-17 change but I don't
435 know why it was needed.
436
437 2006-07-12 Akim Demaille <akim@epita.fr>
438
439 * data/c.m4: Comment changes.
440
441 2006-07-10 Akim Demaille <akim@lrde.epita.fr>
442
443 * src/complain.c (error_message, ERROR_MESSAGE): New.
444 To factor...
445 (fatal_at, fatal, warn_at, warn, complain_at, complain): these.
446 * src/complain.h, src/complain.c (warning_issued): Remove, unused.
447
448 2006-07-09 Paul Eggert <eggert@cs.ucla.edu>
449
450 * NEWS: Instead of %union, you can define and use your own union type
451 YYSTYPE if your grammar contains at least one <type> tag.
452 Your YYSTYPE need not be a macro; it can be a typedef.
453 * doc/bison.texinfo (Value Type, Multiple Types, Location Type):
454 (Union Decl, Decl Summary): Document this.
455 * data/glr.c (YYSTYPE): Implement this.
456 * data/glr.cc (YYSTYPE): Likewise.
457 * data/lalr1.cc (YYSTYPE): Likewise.
458 * data/yacc.c (YYSTYPE): Likewise.
459 * src/output.c (prepare): Output tag_seen_flag.
460 * src/parse-gram.y (declaration, grammar_declaration):
461 Use 'union_seen' rather than 'typed' to determine whether
462 %union has been seen, since grammars can now be typed without
463 %union.
464 (symbol_declaration, type.opt, symbol_def):
465 Keep track of whether a tag has been seen.
466 * src/reader.c (union_seen, tag_seen): New vars.
467 (typed): remove.
468 * src/reader.h (union_seen, tag_seen, typed): Likewise.
469 * src/scan-code.l (untyped_var_seen): New variable.
470 (handle_action_dollar): Adjust to above changes.
471 (handle_action_dollar, handle_action_at):
472 Improve overflow checking for outlandish numbers.
473 * tests/input.at (AT_CHECK_UNUSED_VALUES): Redo test to
474 avoid new diagnostics generated by above changes.
475 * tests/regression.at (YYSTYPE typedef): Add test to check
476 for type tags without %union.
477
478 * src/symlist.c (symbol_list_length): Return int, not unsigned
479 int, since callers expect int. This may need to get revisited
480 once we have proper integer overflow checking.
481
482 * src/scan-gram.h (gram_scanner_cursor): Remove decl, since this
483 object is now static.
484
485 * src/getargs.c (flags_argmatch): Return void, not int,
486 to pacify ./configure --enable-gcc-warnings.
487
488 * src/flex-scanner.h (STRING_FREE): Don't use FLEX_PREFIX (last_string)
489 since last_string is already defined to FLEX_PREFIX (last_string).
490
491 2006-07-09 Akim Demaille <akim@lrde.epita.fr>
492
493 Implement --warnings/-W.
494 * src/getargs.c (report_argmatch, trace_argmatch): Remove,
495 replaced by...
496 (flags_argmatch, FLAGS_ARGMATCH): this new function and macro.
497 Adjust callers.
498 * src/getargs.h, src/getargs.c (warnings, warnings_flags)
499 (warnings_args, warnings_types): New.
500 (getargs, short_options, long_options): Accept -W/--warnings.
501 Sort the options by alphabetical order, upper case letter right
502 before its lower case.
503
504 2006-07-09 Joel E. Denny <jdenny@ces.clemson.edu>
505
506 Change %merge result type clash warnings to errors. Discussed at
507 <http://lists.gnu.org/archive/html/bison-patches/2006-07/msg00026.html>.
508 * src/reader.c (record_merge_function_type): Use complain_at.
509 * tests/glr-regression.at (Missed %merge type warnings when LHS type is
510 declared later): Update test case results.
511
512 2006-07-09 Akim Demaille <akim@lrde.epita.fr>
513
514 * src/getargs.h, src/getargs.c: Swap --report and --trace handling
515 to be in alphabetical order.
516 (trace_args): Spelling fixes.
517
518 2006-07-09 Paul Eggert <eggert@cs.ucla.edu>
519
520 * data/yacc.c (YYID, yy_stack_print): Prefix local vars with "yy"
521 so they don't collide with user-defined macros.
522 (yy_stack_print): Don't assume that yytype_int16 promotes to int;
523 this was never guaranteed, and now that we're using gnulib stdint,
524 which defines int_fast16_t to long int, the problem is exposed.
525
526 2006-07-08 Paul Eggert <eggert@cs.ucla.edu>
527
528 * data/c.m4 (b4_basename): Simplify a bit, since we don't
529 need the full POSIX semantics (and weren't implementing them
530 anyway).
531
532 Adjust to Autoconf 2.60 and today's gnulib.
533 * bootstrap (gnulib_modules): Add stdint.
534 Remove special case for m4/onceonly_2_57.m4, since gnulib-tool
535 no longer copies it.
536 (intl_files_to_remove): Remove m4/longlong.m4 and m4/wchar_t.m4,
537 since stdint needs the former and wcwidth (which is now required
538 by mbswidth) needs the latter.
539 Append 'datarootdir = @datarootdir@' to po/Makefile.in.in, to
540 work around a compatibility glitch between gettext 0.14.6 and
541 Autoconf 2.60.
542 * configure.ac (AC_PREREQ): Require Autoconf 2.60.
543 Do not check for uintptr_t, since new stdint module does the right
544 thing.
545 * lib/.cvsignore: Remove alloca.c, alloca.h, alloca_.h.
546 Add stdint.h, stdint_.h, wcwidth.h.
547 * m4/.cvsignore: Remove alloca.m4, onceonly.m4.
548 Add absolute-header.m4, double-slash-root.m4, longlong.m4,
549 stdint.m4, wchar_t.m4, wcwidth.m4.
550 * src/files.c: Include <dirname.h> and <stdio-safer.h> in the
551 usual order for ../lib/*.h files.
552 (file_name_split): Use last_component, not base_name, to adjust
553 to gnulib changes.
554 * src/parse-gram.h: Include <strverscmp.h> in the usual order
555 for ../lib/*.h files.
556 (YYTYPE_INT16, YYTYPE_INT8, YYTYPE_UINT16, YYTYPE_UINT8):
557 Define unconditionally, since we now assume the stdint module.
558 * src/scan-skel.l: Include <dirname.h>.
559 (BASE_QPUTS): Use last_component, not base_name.
560 * src/system.h: Include <unlocked-io.h> in the usual order
561 for ../lib/*.h files. Include <stdint.h> unconditionally,
562 since we now use the stdint module.
563 (uintptr_t): Declare if UINTPTR_MAX is not defined, not
564 HAVE_UINTPTR_T, since we now use the stdint module.
565 (base_name): Remove decl, since files now include <dirname.h>
566 to get the decl.
567
568 2006-07-08 Akim Demaille <akim@lrde.epita.fr>
569
570 * data/c.m4 (b4_location_initial_column, b4_location_initial_line):
571 New, default to 1.
572 * data/yacc.c, data/glr.c, data/location.cc: Use them.
573 * NEWS, doc/bison.texinfo: The initial column and line are 1 by
574 default.
575 * tests/calc.at: Adjust.
576
577 2006-07-08 Akim Demaille <akim@lrde.epita.fr>
578
579 * data/c.m4 (b4_basename): New.
580 (b4_syncline): Also output the location of its invocation (from
581 the skeleton).
582 (b4_user_action, b4_define_user_action, b4_user_actions)
583 (b4_user_initial_action, b4_user_post_prologue, b4_user_start_header)
584 (b4_user_stype): New.
585 * data/yacc.c, data/glr.c, data/lalr1.cc, data/glr.cc: Use them.
586
587 2006-07-07 Joel E. Denny <jdenny@ces.clemson.edu>
588
589 In the grammar file, the first column is 1 not 0 on the first line as
590 on every other line.
591 * src/parse-gram.y (%initial-action): Initialize @$ correctly.
592 * tests/input.at (Torturing the Scanner): Update output.
593
594 * src/scan-gram.l (scanner_cursor): Declare it static.
595
596 2006-07-07 Joel E. Denny <jdenny@ces.clemson.edu>
597
598 In warnings, say "previous declaration" rather than "first
599 declaration".
600 * src/symtab.c (redeclaration): Do that here.
601 * src/reader.c (record_merge_function_type): In the case of a result
602 type clash, report the previous declaration rather than the very first
603 one in the grammar file.
604 * tests/glr-regression.at (Missed %merge type warnings when LHS type is
605 declared later): Add a third declaration to check this behavior.
606 * tests/input.at (Incompatible Aliases): Update output.
607
608 2006-06-27 Akim Demaille <akim@epita.fr>
609
610 * doc/Doxyfile.in: New.
611 * doc/Makefile.am: Use it.
612 * src/lalr.h, src/symtab.h: Initial doxygenation.
613
614 2006-06-26 Joel E. Denny <jdenny@ces.clemson.edu>
615
616 Don't miss %merge result type warnings just because the LHS types are
617 declared after the %merge. This continues the effort of the previous
618 patch.
619 * src/reader.c (get_merge_function): Don't set the merger type yet.
620 (record_merge_function_type): New function for setting the merger type
621 and checking for clashes.
622 (grammar_current_rule_merge_set): Set the location of the %merge for
623 the current rule.
624 (packgram): Invoke record_merge_function_type for each rule now that
625 all symbol type declarations have been parsed.
626 * src/reader.h (merger_list.type_declaration_location): New member
627 storing the location of the first %merge from which the type for this
628 merging function was derived.
629 * src/symlist.h (symbol_list.merger_declaration_location): New member
630 storing the location of a rule's %merge, if any.
631 * tests/glr-regression.at (Missed %merge type warnings when LHS type is
632 declared later): New test to catch the error fixed by the above patch.
633
634 2006-06-26 Joel E. Denny <jdenny@ces.clemson.edu>
635
636 Get action warnings (grammar_rule_check) right even when symbol
637 declarations appear after the rules. Discussed at
638 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00108.html>
639 and
640 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00151.html>.
641 Don't mistake the type of $$ in a midrule to be that of its parent
642 rule's $$.
643 * src/reader.c (grammar_current_rule_end): Don't invoke
644 grammar_rule_check yet since not all symbol declarations may have been
645 parsed yet.
646 (grammar_midrule_action): Likewise.
647 Don't record whether the midrule's $$ has been used yet since actions
648 haven't been translated yet.
649 Record the midrule's parent rule and its RHS index within the parent
650 rule.
651 (grammar_current_rule_action_append): Don't translate the action yet
652 since not all symbol declarations may have been parsed yet and, thus,
653 warnings about types for $$, $n, @$, and @n can't be reported yet.
654 (packgram): Translate the action and invoke grammar_rule_check now that
655 all symbol declarations have been parsed.
656 * src/scan-code.l (handle_action_dollar): Now that this is invoked
657 after parsing the entire grammar file, the symbol list here in the case
658 of a midrule is actually the midrule's empty RHS, so reference its
659 parent rule's RHS where necessary.
660 On the other hand, now that you can already know it's a midrule, you
661 aren't forced to think $$ has the same type as its parent rule's $$.
662 (handle_action_at): In the case of a midrule, reference the parent rule
663 where necessary.
664 * src/symlist.c (symbol_list_new): Initialize new midrule-related
665 members.
666 (symbol_list_length): Now that this is invoked after all rules have
667 been parsed, a NULL symbol (rather than a NULL symbol list node)
668 terminates a rule. symbol_list_print already does this correctly.
669 * src/symlist.h (symbol_list.midrule_parent_rule,
670 symbol_list.midrule_parent_rhs_index): New members so that midrules can
671 remember their relationships with their parents.
672 * tests/input.at (Type Clashes): Extend to catch the midrule $$ error
673 fixed by the above patch.
674 (_AT_UNUSED_VALUES_DECLARATIONS, AT_CHECK_UNUSED_VALUES): New m4 macros
675 implementing...
676 (Unused values): ... this old test case and...
677 (Unused values before symbol declarations): ... this new test case.
678 This one is the same as `Unused values' except that all symbol
679 declarations appear after the rules in order to catch the rest of the
680 errors fixed by the above patch.
681
682 2006-06-26 Joel E. Denny <jdenny@ces.clemson.edu>
683
684 More cleanup.
685 * src/reader.c (current_rule): Declare it static since it's no longer
686 used outside this file.
687 (grammar_current_rule_action_append): Remove redundant arguments from
688 translate_rule_action invocation.
689 * src/reader.h (current_rule): Remove this unused extern.
690 * src/scan-code.h (translate_rule_action): Remove redundant arguments.
691 * src/scan-code.l (translate_rule_action): Likewise.
692
693 2006-06-25 Joel E. Denny <jdenny@ces.clemson.edu>
694
695 Clean up yesterday's patch.
696 * parse-gram.y (rhs): Move grammar_midrule_action invocation from here
697 to...
698 * src/reader.c (grammar_current_rule_action_append): ... here for
699 consistency with grammar_current_rule_symbol_append.
700 * tests/regression.at (Braced code in declaration in rules section):
701 Make yyerror and yylex static as usual.
702
703 2006-06-24 Joel E. Denny <jdenny@ces.clemson.edu>
704
705 Fix bug that mistakes braced code in a declaration in the rules section
706 to be a rule action. Mentioned at
707 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00105.html>.
708 * src/scan-gram.l: Move midrule action detection from the start of the
709 scanning of any braced code to...
710 * src/parse-gram.y (rhs): ... the parsing of braced code as a rule
711 action. For readability, use $2 and @2 rather than the equivalent
712 global variables.
713 * tests/regression.at (Braced code in declaration in rules section):
714 New test to catch the error fixed by the above patch.
715
716 Work on code readability some.
717 * src/scan-code.l (current_rule): Get rid of this misleading and
718 redundant declaration: it's actually extern'ed in reader.h.
719 (YY_DECL, code_lex, handle_action_dollar, handle_action_at,
720 translate_action): Add a rule argument and use it instead of the global
721 current_rule.
722 (translate_rule_action): This already receives current_rule through an
723 argument, so pass it on to translate_action instead of assigning
724 current_rule to current_rule.
725 (translate_symbol_action, translate_code): Pass rule = NULL to
726 translate_action.
727
728 2006-06-23 Joel E. Denny <jdenny@ces.clemson.edu>
729
730 Rename %before-definitions to %start-header and %after-definitions to
731 %end-header. Don't use these declarations to separate pre-prologue
732 blocks from post-prologue blocks. Add new order-independent
733 declarations %before-header and %after-header as alternatives to the
734 traditional Yacc pre-prologue and post-prologue blocks. Discussed at
735 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00110.html>.
736 * NEWS (2.3+): Update for these changes.
737 * data/glr.c (b4_before_definitions): Update to...
738 (b4_start_header): ... this.
739 (b4_after_definitions): Update to...
740 (b4_end_header): ... this.
741 * data/glr.cc: Likewise.
742 * data/lalr1.cc: Likewise.
743 * data/yacc.c: Likewise.
744 * doc/bison.texinfo (The prologue): Update names, and replace remaining
745 prologue blocks with %*-header declarations.
746 (Calc++ Parser): Likewise.
747 (Bison Declaration Summary): Update names.
748 (Bison Symbols): Update description.
749 * src/parse-gram.y (PERCENT_AFTER_DEFINITIONS): Update to...
750 (PERCENT_END_HEADER): ... this.
751 (PERCENT_BEFORE_DEFINITIONS): Update to...
752 (PERCENT_START_HEADER): ... this.
753 (PERCENT_AFTER_HEADER, PERCENT_BEFORE_HEADER): New tokens.
754 (declaration): Update token names and m4 macro names.
755 When parsing %end-header and %start-header, invoke translate_code
756 before muscle_code_grow, and no longer set global booleans to remember
757 whether these declarations have been seen.
758 Parse new %after-header and %before-header.
759 * src/reader.c (before_definitions, after_definitions): Remove.
760 (prologue_augment): Accept a new bool argument to specify whether to
761 augment the pre-prologue or post-prologue.
762 * src/reader.h (before_definitions, after_definitions): Remove these
763 extern's.
764 (prologue_augment): Add new bool argument.
765 * src/scan-gram.l (PERCENT_AFTER_DEFINITIONS): Update to...
766 (PERCENT_END_HEADER): ... this.
767 (PERCENT_BEFORE_DEFINITIONS): Update to...
768 (PERCENT_START_HEADER): ... this.
769 (PERCENT_AFTER_HEADER, PERCENT_BEFORE_HEADER): New tokens.
770 * tests/actions.at (Printers and Destructors): Update names.
771
772 2006-06-22 Joel E. Denny <jdenny@ces.clemson.edu>
773
774 Add comparison operators for C++ location classes. Discussed at
775 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00092.html>.
776 * data/c++.m4 (b4_define_location_comparison): New boolean %define
777 declaration indicating whether filename_type has an operator==. If
778 filename_type is `std::string', it defaults to `1', `0' otherwise.
779 * data/location.cc: Iff b4_define_location_comparison is `1', add
780 operator== and operator!= for class position and for class location.
781
782 Some minor fixes.
783 * src/scan-action.l: Remove unused file.
784 * src/symtab.c (symbol_printer_set): Use printer_location not
785 destructor_location.
786 * src/symtab.h (struct symbol): Replace incorrect source comment for
787 printer members.
788 * tests/input.at (Incompatible Aliases): Update output with correct
789 printer location.
790
791 2006-06-20 Joel E. Denny <jdenny@ces.clemson.edu>
792
793 Don't put the pre-prologue in the header file. For the yacc.c code
794 file and the glr.c header and code files, move the pre-prologue before
795 the token definitions. Add new %before-definitions and
796 %after-definitions to declare code that will go in both the header file
797 and code file. Discussed at
798 <http://lists.gnu.org/archive/html/bison-patches/2005-12/msg00000.html>,
799 <http://lists.gnu.org/archive/html/bison-patches/2006-01/msg00016.html>,
800 and
801 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00055.html>.
802 * NEWS (2.3+): Describe these changes.
803 * data/glr.c (b4_pre_prologue): Move from within to before...
804 (b4_shared_declarations): ... this.
805 Add new b4_before_definitions before b4_token_enums.
806 Add new b4_after_definitions at the end.
807 * data/glr.cc (b4_pre_prologue): Replace with...
808 (b4_before_definitions): ... this in the header file.
809 (b4_after_definitions): New near the end of the header file.
810 * data/lalr1.cc (b4_pre_prologue): Move from the header file to the
811 code file right before including the header file.
812 (b4_before_definitions): New in the previous position of
813 b4_pre_prologue in the header file.
814 (b4_after_definitions): New near the end of the header file.
815 * data/yacc.c: Clean up some m4 quoting especially in the header file.
816 (b4_token_enums_defines): In the code file, move to right before
817 YYSTYPE for consistency with the header file.
818 (b4_before_definitions): New right before b4_token_enums_defines in
819 both the header and code file.
820 (b4_after_definitions): New right after YYLTYPE and yylloc in both the
821 header and code file.
822 * doc/bison.texinfo (Prologue): Show use of %before-definitions instead
823 of prologues for %union dependencies.
824 (Bison Declaration Summary): In %defines description, mention the
825 effect of %before-definitions and %after-definitions on the header
826 file.
827 (Calc++ Parser): Forward declare driver in a %before-definitions rather
828 than in the pre-prologue so that make check succeeds.
829 (Bison Symbols): Add entries for %before-definitions and
830 %after-definitions.
831 * src/parse-gram.y (PERCENT_BEFORE_DEFINITIONS): New token for
832 %before-definitions.
833 (PERCENT_AFTER_DEFINITIONS): New token for %after-definitions.
834 (declaration): Parse those declarations and append to
835 b4_before_definitions and b4_after_definitions, respectively.
836 * src/reader.c (before_definitions, after_definitions): New bools to
837 track whether those declarations have been seen.
838 (prologue_augment): Add to the post-prologue if %union,
839 %before-definitions, or %after-definitions has been seen.
840 * src/reader.h (before_definitions, after_definitions): New extern's.
841 * src/scan-gram.l: Scan the new declarations.
842 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Place the second
843 prologue block in a %before-definitions or a %after-definitions based
844 on whether the %union is declared.
845 * tests/regression.at (Early token definitions with --yacc, Early token
846 definitions without --yacc): Move tests for token definitions into the
847 post-prologue since token names are no longer defined in the
848 pre-prologue.
849
850 2006-06-20 Akim Demaille <akim@epita.fr>
851
852 * src/symtab.h, src/symtab.c (symbol_from_uniqstr): New.
853 (symbol_get): Use it.
854 * src/parse-gram.y: Use it.
855
856 2006-06-19 Joel E. Denny <jdenny@ces.clemson.edu>
857
858 * src/scan-gram.l: Remove unused declaration of last_string_1 so the
859 build succeeds when configured with --enable-gcc-warnings.
860
861 2006-06-19 Paul Eggert <eggert@cs.ucla.edu>
862
863 * src/parse-gram.y (char_name): New function.
864 (CHAR, STRING, string_content): For %printer, properly escape.
865 (ID): Prefer fputs to fprintf.
866 (id): Reindent to be consistent with other rules.
867 Properly quote char.
868
869 The Translation Project changed its way of publishing translations
870 to maintainers. I haven't received any responses to my request
871 for supporting the old way, or for documenting the new way. I
872 have modified 'bootstrap' to use screen scraping
873 (in this case, HTML scraping). This is unreliable and inelegant,
874 but I don't see any better way. Yuck.
875 * bootstrap (TP_URL, WGET_COMMAND): New vars.
876 (get_translations): New function, which uses HTML scraping to
877 deduce locations of latest translations.
878 Use this function to grab both bison and bison-runtime .po files.
879 Don't bother priming the pump for the runtime-po domain any more,
880 as it's now translated better than bison is.
881
882 2006-06-19 Akim Demaille <akim@epita.fr>
883
884 * src/scan-gram.l: No longer "parse" things after `%union' until
885 `{'. Rather, return a single "%union" token.
886 No longer make symbols: return strings, and leave the conversion
887 to symbols to the parser.
888 (SC_PRE_CODE, token_type): Remove.
889 * src/parse-gram.y (%union): New field `character'.
890 Sort tokens.
891 (CHAR): New token.
892 (ID, ID_COLON): Now that the scanner no longer makes them
893 identifiers, adjust all uses to invoke symbol_get.
894 (id_colon): New, wraps the conversion from string to symbol.
895 (%union): Accept a possible union_name.
896 (symbol): Now can be a char.
897 * data/c.m4 (b4_union_name): Leave a default value.
898 * data/glr.c, data/yacc.c: Use it.
899
900 2006-06-11 Joel E. Denny <jdenny@ces.clemson.edu>
901
902 For associating token numbers with token names for "yacc.c", don't use
903 #define statements unless `--yacc' is specified; always use enum
904 yytokentype. Most important discussions start at:
905 <http://lists.gnu.org/archive/html/bison-patches/2005-09/msg00053.html>,
906 <http://lists.gnu.org/archive/html/bison-patches/2005-12/msg00052.html>,
907 and
908 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00043.html>.
909 * NEWS (2.3+): Mention.
910 * data/c.m4 (b4_yacc_if): New.
911 (b4_token_enums_defines): Use b4_yacc_if to decide whether to add the
912 token #define's.
913 * doc/bison.texinfo (Bison Options): Describe the effect of `--yacc'
914 on token name definitions.
915 * src/getargs.c (usage): Capitalize `Yacc' in English.
916 * src/output.c (prepare): Define b4_yacc_flag.
917 * tests/regression.at (Early token definitions): Test that tokens names
918 are defined before the pre-prologue not just before the post-prologue.
919 Remove this test case and copy to...
920 (Early token definitions with --yacc): ... this to test #define's.
921 (Early token definitions without --yacc): ... and this to test enums.
922
923 2006-06-11 Paul Eggert <eggert@cs.ucla.edu>
924
925 * NEWS: Reword the post-2.3 change to not be so optimistic about
926 removing the old "look-ahead" spelling.
927 Update previous look-ahead/lookahead change reports.
928 * REFERENCES: look-ahead -> lookahead (since that's
929 what he actually wrote).
930 * doc/refcard.tex: look ahead -> lookahead,
931 look-ahead -> lookahead
932
933 2006-06-09 Joel E. Denny <jdenny@ces.clemson.edu>
934
935 For consistency, use `lookahead' instead of `look-ahead' or
936 `look_ahead'. Discussed starting at
937 <http://lists.gnu.org/archive/html/bison-patches/2006-01/msg00049.html>
938 and then at
939 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00017.html>.
940 * NEWS: For the next release, note the change to `--report'.
941 * TODO, doc/bison.1: Update English.
942 * doc/bison.texinfo: Update English.
943 (Understanding Your Parser, Bison Options): Document as
944 `--report=lookahead' rather than `--report=look-ahead'.
945 * src/conflicts.c: Update English in comments.
946 (lookahead_set): Rename from look_ahead_set.
947 (flush_reduce): Rename argument look_ahead_tokens to lookahead_tokens.
948 (resolve_sr_conflict): Rename local look_ahead_tokens to
949 lookahead_tokens, and update other uses.
950 (flush_shift, set_conflicts, conflicts_solve, count_sr_conflicts,
951 count_rr_conflicts, conflicts_free): Update uses.
952 * src/getargs.c (report_args): Move "lookahead" before alternate
953 spellings.
954 (report_types): Update uses.
955 (usage): For `--report' usage description, state `lookahead' spelling
956 rather than `look-ahead'.
957 * src/getargs.h (report.report_lookahead_tokens): Rename from
958 report_look_ahead_tokens.
959 * src/lalr.c: Update English in comments.
960 (compute_lookahead_tokens): Rename from compute_look_ahead_tokens.
961 (state_lookahead_tokens_count): Rename from
962 state_look_ahead_tokens_count.
963 Rename local n_look_ahead_tokens to n_lookahead_tokens.
964 (lookahead_tokens_print): Rename from look_ahead_tokens_print.
965 Rename local n_look_ahead_tokens to n_lookahead_tokens.
966 Update other uses.
967 Update English in output.
968 (add_lookback_edge, initialize_LA, lalr, lalr_free): Update uses.
969 * src/print.c: Update English in comments.
970 (lookahead_set): Rename from look_ahead_set.
971 (print_reduction): Rename argument lookahead_token from
972 look_ahead_token.
973 (print_core, state_default_rule, print_reductions, print_results):
974 Update uses.
975 * src/print_graph.c: Update English in comments.
976 (print_core): Update uses.
977 * src/state.c: Update English in comments.
978 (reductions_new): Update uses.
979 (state_rule_lookahead_tokens_print): Rename from
980 state_rule_look_ahead_tokens_print, and update other uses.
981 * src/state.h: Update English in comments.
982 (reductions.lookahead_tokens): Rename from look_ahead_tokens.
983 (state_rule_lookahead_tokens_print): Rename from
984 state_rule_look_ahead_tokens_print.
985 * src/tables.c: Update English in comments.
986 (conflict_row, action_row): Update uses.
987 * tests/glr-regression.at
988 (Incorrect lookahead during deterministic GLR,
989 Incorrect lookahead during nondeterministic GLR): Rename
990 print_look_ahead to print_lookahead.
991 * tests/torture.at: Update English in comments.
992 (AT_DATA_LOOKAHEAD_TOKENS_GRAMMAR): Rename from
993 AT_DATA_LOOK_AHEAD_TOKENS_GRAMMAR.
994 (Many lookahead tokens): Update uses.
995 * data/glr.c: Update English in comments.
996 * lalr1.cc: Likewise.
997 * yacc.c: Likewise.
998 * src/conflicts.h: Likewise.
999 * src/lalr.h: Likewise.
1000 * src/main.c: Likewise.
1001 * src/output.c: Likewise.
1002 * src/parse-gram.c: Likewise.
1003 * src/tables.h: Likewise.
1004 * tests/calc.at: Likewise.
1005
1006 2006-06-08 Joel E. Denny <jdenny@ces.clemson.edu>
1007
1008 * src/flex-scanner.h (yytext): Remove stray `*/' in #define.
1009
1010 2006-06-07 Paul Eggert <eggert@cs.ucla.edu>
1011
1012 * TODO: Add request from Nelson H. F. Beebe to be able to install
1013 Bison without installing the yacc script.
1014
1015 2006-06-07 Joel E. Denny <jdenny@ces.clemson.edu>
1016
1017 * src/flex-scanner.h: For the sake of Flex 2.5.4, don't #define yyleng
1018 and yytext if they're already #define'd.
1019 * src/flex-scanner.h, src/location.h: Move #include "system.h" to...
1020 * src/scan-code-c.c: ... here.
1021 * src/scan-code.l, src/scan-gram.l: ... and here. Also #include
1022 <config.h>.
1023
1024 2006-06-07 Joel E. Denny <jdenny@ces.clemson.edu>
1025
1026 Get Bison to build again when configured with --enable-gcc-warnings.
1027 * src/location.c, src/location.h, src/main.c, src/scan-code.l: Add some
1028 missing #include's.
1029 * src/scan-code.l (handle_action_dollar, handle_action_at): Rename
1030 loc argument as it shadows a global.
1031 * src/scan-gram.l: Remove stray comma that prevents boundary_set
1032 invocation.
1033
1034 * src/.cvsignore: Add scan-code.c.
1035
1036 2006-06-07 Akim Demaille <akim@epita.fr>
1037
1038 * src/scan-gram.l: Move the "add a trailing ; to actions" code
1039 to...
1040 * src/scan-code.l: here.
1041 * tests/input.at (Torturing the Scanner): Fix another location
1042 error.
1043
1044 2006-06-07 Akim Demaille <akim@epita.fr>
1045
1046 * src/Makefile.am (BUILT_SOURCES): Fix the trailing backslash.
1047
1048 2006-06-06 Akim Demaille <akim@epita.fr>
1049
1050 Extract the parsing of user actions from the grammar scanner.
1051 As a consequence, the relation between the grammar scanner and
1052 parser is much simpler. We can also split "composite tokens" back
1053 into simple tokens.
1054 * src/gram.h (ITEM_NUMBER_MAX, RULE_NUMBER_MAX): New.
1055 * src/scan-gram.l (add_column_width, adjust_location): Move to and
1056 rename as...
1057 * src/location.h, src/location.c (add_column_width)
1058 (location_compute): these.
1059 Fix the column count: the initial column is 0.
1060 (location_print): Be robust to ending column being 0.
1061 * src/location.h (boundary_set): New.
1062 * src/main.c: Adjust to scanner_free being renamed as
1063 gram_scanner_free.
1064 * src/output.c: Include scan-code.h.
1065 * src/parse-gram.y: Include scan-gram.h and scan-code.h.
1066 Use boundary_set.
1067 (PERCENT_DESTRUCTOR, PERCENT_PRINTER, PERCENT_INITIAL_ACTION)
1068 (PERCENT_LEX_PARAM, PERCENT_PARSE_PARAM): Remove the {...} part,
1069 which is now, again, a separate token.
1070 Adjust all dependencies.
1071 Whereever actions with $ and @ are used, use translate_code.
1072 (action): Remove this nonterminal which is now useless.
1073 * src/reader.c: Include assert.h, scan-gram.h and scan-code.h.
1074 (grammar_current_rule_action_append): Use translate_code.
1075 (packgram): Bound check ruleno, itemno, and rule_length.
1076 * src/reader.h (gram_in, gram__flex_debug, scanner_cursor)
1077 (last_string, last_braced_code_loc, max_left_semantic_context)
1078 (scanner_initialize, scanner_free, scanner_last_string_free)
1079 (gram_out, gram_lineno, YY_DECL_): Move to...
1080 * src/scan-gram.h: this new file.
1081 (YY_DECL): Rename as...
1082 (GRAM_DECL): this.
1083 * src/scan-code.h, src/scan-code.l, src/scan-code-c.c: New.
1084 * src/scan-gram.l (gram_get_lineno, gram_get_in, gram_get_out):
1085 (gram_get_leng, gram_get_text, gram_set_lineno, gram_set_in):
1086 (gram_set_out, gram_get_debug, gram_set_debug, gram_lex_destroy):
1087 Move these declarations, and...
1088 (obstack_for_string, STRING_GROW, STRING_FINISH, STRING_FREE):
1089 these to...
1090 * src/flex-scanner.h: this new file.
1091 * src/scan-gram.l (rule_length, rule_length_overflow)
1092 (increment_rule_length): Remove.
1093 (last_braced_code_loc): Rename as...
1094 (gram_last_braced_code_loc): this.
1095 Adjust to the changes of the parser.
1096 Move all the handling of $ and @ into...
1097 * src/scan-code.l: here.
1098 * src/scan-gram.l (handle_dollar, handle_at): Remove.
1099 (handle_action_dollar, handle_action_at): Move to...
1100 * src/scan-code.l: here.
1101 * src/Makefile.am (bison_SOURCES): Add flex-scanner.h,
1102 scan-code.h, scan-code-c.c, scan-gram.h.
1103 (EXTRA_bison_SOURCES): Add scan-code.l.
1104 (BUILT_SOURCES): Add scan-code.c.
1105 (yacc): Be robust to white spaces.
1106
1107 * tests/conflicts.at, tests/input.at, tests/reduce.at,
1108 * tests/regression.at: Adjust the column numbers.
1109 * tests/regression.at: Adjust the error message.
1110
1111 2006-06-06 Joel E. Denny <jdenny@ces.clemson.edu>
1112
1113 * src/getargs.c (usage): Mention GLR not just LALR(1) in --help output.
1114 Use Akim's wording from
1115 <http://lists.gnu.org/archive/html/bison-patches/2006-05/msg00056.html>.
1116
1117 2006-06-06 Joel E. Denny <jdenny@ces.clemson.edu>
1118
1119 Between Bison releases, manually append `+' to the previous Bison
1120 release number, and use that as a signal to automatically print the
1121 ChangeLog's CVS Id keyword from --version. Discussed starting at
1122 <http://lists.gnu.org/archive/html/bison-patches/2006-05/msg00028.html>.
1123 * ChangeLog: Add Id header.
1124 * configure.ac (AC_INIT): Append `+' to `2.3'.
1125 * src/.cvsignore: Add revision.c.
1126 * src/Makefile.am (bison_SOURCES): Add revision.c and revision.h.
1127 (BUILT_SOURCES): Add revision.c.
1128 (revision.c): New target rule. This file defines a new global variable
1129 named revision. It initializes it with either the Id from ChangeLog
1130 or, if VERSION doesn't contain `+', with the empty string.
1131 * src/getargs.c (version): Print the value of revision.
1132 * src/revision.h: Extern revision.
1133
1134 2006-06-05 Paul Eggert <eggert@cs.ucla.edu>
1135
1136 * NEWS: Version 2.3.
1137 * configure.ac (AC_INIT): Likewise.
1138
1139 2006-05-30 Paul Eggert <eggert@cs.ucla.edu>
1140
1141 * data/glr.c (YYRECOVERING): Define to be a function-like macro
1142 with no arguments, not as an object-like macro. This is for
1143 compatibility with data/yacc.c. Problem reported by John P. Hartmann in
1144 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00059.html>.
1145 * doc/bison.texinfo (Action Features, Error Recovery, Table of Symbols):
1146 Document this.
1147
1148 2006-05-30 Joel E. Denny <jdenny@ces.clemson.edu>
1149
1150 * src/getargs.c (usage): Back out yesterday's modification of the
1151 --help output so that we don't have to wait for translation before
1152 releasing 2.3.
1153
1154 2006-05-29 Paul Eggert <eggert@cs.ucla.edu>
1155
1156 * doc/bison.texinfo (Introduction): Don't say "GLR grammar".
1157 Problem reported by Akim Demaille.
1158
1159 2006-05-29 Joel E. Denny <jdenny@ces.clemson.edu>
1160
1161 * src/getargs.c (usage): Mention GLR not just LALR(1) in --help output.
1162
1163 2006-05-26 Paul Eggert <eggert@cs.ucla.edu>
1164
1165 * data/yacc.c (yy_reduce_print): Omit trailing white space in
1166 generated source code. Problem reported by Frans Englich in
1167 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00049.html>.
1168
1169 2006-05-22 Paul Eggert <eggert@cs.ucla.edu>
1170
1171 * Makefile.maint (gzip_rsyncable, GZIP_ENV): Compute within the
1172 shell, not within 'make', so that 'make' by an ordinary builder
1173 (using GNU make) does not worry about configuring gzip. This also
1174 works around a bug reported independently by Keith Thompson and by
1175 Georg Schwarz, whereby gzip 1.2.4 --help would output usage on
1176 stderr rather than stdout, messing up the build logs.
1177
1178 2006-05-21 Joel E. Denny <jdenny@ces.clemson.edu>
1179
1180 * data/yacc.c (yyparse): Wrap the final return from yyparse inside YYID
1181 to make sure that YYID will never be unused. This fixes a 'make
1182 maintainer-check' failure caused by the recent changes to the 'Trivial
1183 grammars' test case, which caused g++ 4.1.0 to complain that YYID was
1184 not used.
1185 * data/glr.c (yyparse): Wrap yyparse's return inside YYID just in case.
1186
1187 2006-05-21 Joel E. Denny <jdenny@ces.clemson.edu>
1188
1189 * data/glr.c (yyresolveLocations): Remove bogus YYASSERT that the
1190 state before an empty RHS is always resolved here. Only the location
1191 of that state is guaranteed to be resolved, and that's enough. This
1192 fixes the remaining bug reported by Derek M. Jones in
1193 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00027.html>.
1194 * tests/glr-regression.at (Uninitialized location when reporting
1195 ambiguity): Test the above case.
1196 Also, the embedded comments in this test case claim it checks the case
1197 of an empty RHS that has inherited the initial location. However, the
1198 corresponding LHS was already resolved, so yyresolveLocations didn't
1199 actually have reason to modify it. Fix this by forcing
1200 nondeterministic operation at the beginning of the parse.
1201
1202 2006-05-20 Paul Eggert <eggert@cs.ucla.edu>
1203
1204 * data/c.m4 (b4_yy_symbol_print_generate):
1205 (b4_yy_symbol_print_generate): Use 'YYSTYPE const' rather than
1206 'const YYSTYPE', and similarly for YYLTYPE. This fixes one
1207 of the bugs reported today by Derek M Jones in
1208 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00027.html>.
1209 * doc/bison.texinfo (Value Type): Document that YYSTYPE must be
1210 defined to be a type name without parens or brackets.
1211 (Location Type): Similarly for YYLTYPE.
1212 * tests/regression.at (Trivial grammars): Put in a test for this
1213 bug that will be caught by 'make maintainer-check' (though not,
1214 alas, by 'make check' unless your compiler is picky).
1215
1216 2006-05-19 Paul Eggert <eggert@cs.ucla.edu>
1217
1218 * NEWS: Version 2.2.
1219 * configure.ac (AC_INIT): Likewise.
1220
1221 2006-05-17 Joel E. Denny <jdenny@ces.clemson.edu>
1222
1223 * data/glr.c (yyreportTree): Make room in yystates for the state
1224 preceding the RHS. This fixes the segmentation fault reported by Derek
1225 M. Jones in
1226 <http://lists.gnu.org/archive/html/help-bison/2006-05/msg00035.html>.
1227 (yyreportTree, yypdumpstack): Subtract 1 from yyrule before printing
1228 to the user. Reported for yyreportTree by Derek M. Jones later in the
1229 same thread.
1230 * THANKS: Add Derek M. Jones.
1231 Update my email address.
1232 Fix typo in Steve Murphy's name.
1233
1234 2006-05-14 Paul Eggert <eggert@cs.ucla.edu>
1235
1236 * data/glr.c (yyreportSyntaxError): Fix off-by-one error in
1237 checking against YYLAST that caused the parser to miss a potential
1238 alternative in its diagnostic.
1239 Problem reported by Maria Jose Moron Fernandez in
1240 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00024.html>.
1241 * data/lalr1.cc (yysyntax_error_): Likewise.
1242 * data/yacc.c (yysyntax_error): Likewise.
1243 * tests/regression.at (_AT_DATA_DANCER_Y): Use static array for
1244 tokens, in case we run into an older C compiler.
1245 (_AT_DATA_EXPECT2_Y, AT_CHECK_EXPECT2): New macros.
1246 Use them to check for the off-by-one error fixed above.
1247
1248 * data/yacc.c (yytnamerr): Fix typo: local var should be of type
1249 YYSIZE_T, not size_t.
1250 * tests/regression.at (Trivial grammars): New test, to catch
1251 the error fixed by the above patch.
1252
1253 2006-05-14 Akim Demaille <akim@lrde.epita.fr>
1254
1255 * doc/bison.texinfo (C++ Bison Interface): Clarify the naming
1256 scheme.
1257 Reported by Steve Murphy.
1258
1259 2006-05-14 Akim Demaille <akim@lrde.epita.fr>
1260
1261 * data/glr.cc, data/lalr1.cc: Using %defines is mandatory.
1262 * data/glr.cc: b4_location_flag is now b4_locations_flag.
1263
1264 2006-05-14 Akim Demaille <akim@lrde.epita.fr>
1265
1266 Implement --trace=m4.
1267 * src/getargs.c (trace_types, trace_args): Accept trace_m4.
1268 * src/output.c (output_skeleton): When set, pass -dV to m4.
1269
1270 Factor the handling of flags in m4.
1271 * src/output.c (prepare): Rename the muscle names debug, defines,
1272 error_verbose to debug_flag, defines_flag, error_verbose_flag.
1273 * data/c.m4: Adjust.
1274 (_b4_define_flag_if, b4_define_flag_if, b4_defines_if): New.
1275 Use b4_define_flag_if to define other b4_FLAG_if macros.
1276 (b4_location_if): As a consequence, rename as...
1277 (b4_locations_if): this, for consistency.
1278 Adjust all the skeletons.
1279
1280 2006-05-14 Akim Demaille <akim@lrde.epita.fr>
1281
1282 * etc/bench.pm: Shorten bench names.
1283
1284 2006-05-14 Akim Demaille <akim@lrde.epita.fr>
1285
1286 * src/output.h, src/output.c (error_verbose): Move to...
1287 * src/getargs.h, src/getargs.c: here.
1288 Sort the flags.
1289 Adjust dependencies.
1290
1291 2006-05-13 Paul Eggert <eggert@cs.ucla.edu>
1292
1293 * data/c.m4 (b4_copyright): Put the special exception for Bison
1294 skeletons here, so we don't have to put it in each skeleton. All
1295 uses changed. Suggested by Akim Demaille. Also, wrap the
1296 copyright notice, in case it is longer than 80 columns. Replace
1297 comma by newline after title.
1298
1299 2006-05-11 Paul Eggert <eggert@cs.ucla.edu>
1300
1301 * doc/bison.texinfo (Calc++ Scanner): The flex behavior is an
1302 incompatibility, not a bug. Mention that it wasn't fixed as of
1303 flex 2.5.33.
1304
1305 2006-05-11 Akim Demaille <akim@lrde.epita.fr>
1306
1307 * examples/extexi: Enforce the precedence of concatenation over
1308 >>.
1309 Reported by Tommy Nordgren.
1310
1311 2006-05-11 Akim Demaille <akim@lrde.epita.fr>
1312
1313 * data/lalr1.cc (yytranslate_): Rename token as t to avoid clashes
1314 with the member "token".
1315 Reported by Martin Nylin.
1316
1317 2006-05-08 Paul Eggert <eggert@cs.ucla.edu>
1318
1319 * data/glr.c: Switch to Bison 2.2 special-exception language in
1320 the copyright notice. Use more-regular format for titles and
1321 copyright notices.
1322 * data/glr.cc: Likewise.
1323 * data/location.cc: Likewise.
1324 * data/yacc.cc: Likewise.
1325 * doc/bison.texinfo (Conditions): Document this.
1326 * NEWS: likewise. Upgrade version to 2.2.
1327
1328 2006-04-27 Akim Demaille <akim@lrde.epita.fr>
1329
1330 * data/glr.cc: Remove dead code.
1331
1332 2006-04-25 Paul Eggert <eggert@cs.ucla.edu>
1333
1334 * bootstrap: Comment out the AM_CPPFLAGS line, since we don't use
1335 that variable and the line breaks the bootstrap. Problem reported
1336 by Juan M. Guerrero.
1337
1338 2006-04-24 Akim Demaille <akim@lrde.epita.fr>
1339
1340 * doc/bison.texinfo (Multiple start-symbols): New.
1341
1342 2006-04-24 Akim Demaille <akim@lrde.epita.fr>
1343
1344 * etc/README, etc/bench.pl: New.
1345
1346 2006-04-03 Akim Demaille <akim@lrde.epita.fr>
1347
1348 * src/scan-gram.l: Be robust to BRACED_CODE appearing before any
1349 rule.
1350 Reported by Mickael Labau.
1351 * tests/input.at (Torturing the Scanner): Test it.
1352
1353 2006-03-16 Paul Eggert <eggert@cs.ucla.edu>
1354
1355 * doc/bison.texinfo (Decl Summary): Don't mention yylloc twice.
1356 Problem reported by Bob Rossi.
1357
1358 2006-03-13 Paul Eggert <eggert@cs.ucla.edu>
1359
1360 * doc/bison.texinfo: Remove @shorttitlepage stuff; it wasn't used
1361 and didn't really work.
1362 For the index, use @ifnotinfo, not @iftex.
1363 Minor cleanups of spacing and terminology.
1364
1365 2006-03-12 Akim Demaille <akim@lrde.epita.fr>
1366
1367 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Fix the definition
1368 of AT_NAME_PREFIX when %name-prefix is not used.
1369
1370 2006-03-12 Akim Demaille <akim@lrde.epita.fr>
1371
1372 Apply --prefix to C++ skeletons too: they change the namespace.
1373 The test suite already exercize these cases.
1374 * data/c++.m4 (b4_namespace): New.
1375 * data/lalr1.cc, data/glr.cc, data/location.cc: Use it instead of `yy'.
1376 * data/lalr1.cc (yytnameerr_): Move its definition into the namespace.
1377 * data/yacc.c, data/glr.c: Remove a useless `[]'.
1378 * doc/bison.texinfo: Document it.
1379 (Option Cross Key): Use @multitable in all formats. It looks
1380 nicer, even in TeX outputs.
1381 (Rules): Use the same code whatever the output type is.
1382 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS)
1383 (_AT_BISON_OPTION_POPDEFS): Support AT_NAME_PREFIX.
1384 * tests/calc.at: Use it, instead of hard coding `yy'.
1385
1386 2006-03-10 Akim Demaille <akim@lrde.epita.fr>
1387
1388 * TODO: Remove dead items.
1389
1390 2006-03-10 Akim Demaille <akim@lrde.epita.fr>
1391
1392 * doc/FAQ: Remove, merged into...
1393 * doc/bison.texinfo (FAQ): this.
1394 * doc/Makefile.am (EXTRA_DIST): Adjust.
1395
1396 2006-03-10 Akim Demaille <akim@lrde.epita.fr>
1397
1398 * data/c.m4 (b4_token_enum): Always define the enum of tokens,
1399 even if empty.
1400 * data/lalrl1.cc, data/glr.cc (parser::token_type): New.
1401 * doc/bison.texinfo (Calc++ Scanner): Use it.
1402
1403 2006-03-09 Paul Eggert <eggert@cs.ucla.edu>
1404
1405 Fix two nits reported by twlevo, plus one more that I discovered.
1406
1407 * src/assoc.h (assoc_to_string): Give a name to the arg, as
1408 this is the usual Bison style.
1409 * src/location.h (location_print): Likewise.
1410
1411 * src/reader.h (token_name): Likewise.
1412
1413 2006-03-08 Paul Eggert <eggert@cs.ucla.edu>
1414
1415 Fix some nits reported by twlevo.
1416 * doc/FAQ: Remove ancient Y2K FAQ, replacing it with "secure"
1417 and "POSIX". Use more-modern syntax for URLs. Mention C++
1418 and ask for Java. Don't hardwire OS version numbers. Add
1419 copyright notice.
1420 * m4/.cvsignore: Add unistd_h.m4, for latest gnulib.
1421 * src/conflicts.c (solved_conflicts_obstack): Now static.
1422
1423 2006-03-08 Joel E. Denny <jdenny@ces.clemson.edu>
1424
1425 * doc/bison.texinfo (Introduction): Mention GLR and C++ as on the web
1426 page. Say "you can use it" not "you may use it" as on the web page;
1427 we're describing capabilities not granting permission.
1428
1429 2006-03-06 Paul Eggert <eggert@cs.ucla.edu>
1430
1431 * data/glr.c (yyresolveLocations): Rename local variables to avoid
1432 shadowing warnings. Use usual patter for iterating through RHS.
1433 * tests/glr-regression.at
1434 (Uninitialized location when reporting ambiguity):
1435 Modify yylex so that it uses its argument, rather than trying
1436 to rely on ARGSUSED (which doesn't work for gcc with warnings).
1437 const char -> char const.
1438
1439 * tests/Makefile.am ($(srcdir)/package.m4, maintainer-check-valgrind):
1440 Don't use tabs inside commands; it messes up 'ps'.
1441 Problem reported by twlevo.
1442
1443 2006-03-06 Joel E. Denny <jdenny@ces.clemson.edu>
1444
1445 * tests/glr-regression.at (Uninitialized location when reporting
1446 ambiguity): New test case.
1447 * data/glr.c (yyresolveLocations): New function, which uses
1448 YYLLOC_DEFAULT.
1449 (yyresolveValue): Invoke yyresolveLocations before reporting an
1450 ambiguity.
1451 * doc/bison.texinfo (Default Action for Locations): Note
1452 YYLLOC_DEFAULT's usage for ambiguity locations.
1453 (GLR Semantic Actions): Cross-reference those notes.
1454
1455 2006-03-04 Joel E. Denny <jdenny@ces.clemson.edu>
1456
1457 * tests/glr-regression.at (Leaked semantic values when reporting
1458 ambiguity): Remove unnecessary union and type declarations.
1459 (Leaked lookahead after nondeterministic parse syntax error): New test
1460 case.
1461 * data/glr.c (yyparse): Check for zero stacks remaining before
1462 attempting to shift the lookahead so that you don't lose it.
1463
1464 2006-03-02 Joel E. Denny <jdenny@ces.clemson.edu>
1465
1466 Avoid memory leaks by not invoking longjmp in yyreportAmbiguity.
1467 * tests/glr-regression.at (Leaked semantic values when reporting
1468 ambiguity): New test case.
1469 * data/glr.c (yyreportAmbiguity): Invoke yyyerror directly and return
1470 yyabort rather than invoking yyFail, which invokes longjmp. Remove the
1471 now unnecessary yystackp parameter.
1472 (yyresolveValue): Return yyreportAmbiguity's result. Now the necessary
1473 destructors can be called.
1474
1475 * tests/glr-regression.at: Don't invoke bison with `-t' unnecessarily
1476 in existing testcases.
1477
1478 2006-03-02 Joel E. Denny <jdenny@ces.clemson.edu>
1479
1480 Don't leak semantic values for parent RHS when a user action cuts the
1481 parser, and clean up related code a bit.
1482 * tests/glr-regression.at (Leaked merged semantic value if user action
1483 cuts parse): Rename to...
1484 (Leaked semantic values if user action cuts parse): ... this. Add check
1485 for leaked parent RHS values.
1486 * data/glr.c (yydestroyGLRState): In debugging output, distinguish
1487 between an unresolved state (non-empty chain of semantic options) and
1488 an incomplete one (signaled by an empty chain).
1489 (yyresolveStates): Document the interface. Move all manipulation of a
1490 successfully or unsuccessfully resolved yyGLRState to...
1491 (yyresolveValue): ... here so that yyresolveValue always leaves a
1492 yyGLRState with consistent data and thus is easier to understand.
1493 Remove the yyvalp and yylocp parameters since they are always just
1494 taken from the yys parameter. When reporting a discarded merged value
1495 in debugging output, note that it is incompletely merged. Document the
1496 interface.
1497 (yyresolveAction): If resolving any of the RHS states fails, destroy
1498 them all rather than leaking them. Thus, as long as user actions are
1499 written to clean up the RHS correctly, yyresolveAction always cleans up
1500 the RHS of a semantic option. Document the interface.
1501
1502 2006-02-27 Paul Eggert <eggert@cs.ucla.edu>
1503
1504 * data/glr.c (yyexpandGLRStack): Catch an off-by-one error that
1505 led to a segmentation fault in GNU Pascal. Problem reported
1506 by Waldek Hebisch.
1507
1508 2006-02-21 Joel E. Denny <jdenny@ces.clemson.edu>
1509
1510 * doc/bison.texinfo (Mid-Rule Actions): Explain how to bury a
1511 mid-rule action inside a nonterminal symbol in order to declare a
1512 destructor for its semantic value.
1513
1514 2006-02-16 Paul Eggert <eggert@cs.ucla.edu>
1515
1516 * data/yacc.c [(! defined yyoverflow || YYERROR_VERBOSE) && !
1517 YYSTACK_USE_ALLOCA && ! defined YYSTACK_ALLOC && defined
1518 __cplusplus && ! defined _STDLIB_H && !
1519 ((defined YYMALLOC || defined malloc) && (defined YYFREE ||
1520 defined free))]: Include <stdlib.h> rather than rolling our own
1521 declarations of malloc and free, to avoid problems with
1522 incompatible declarations (using 'throw') C++'s stdlib.h. This
1523 should fix Debian bug 340012
1524 <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=340012>,
1525 reported by Guillaume Melquiond.
1526
1527 2006-02-13 Paul Eggert <eggert@cs.ucla.edu>
1528
1529 * NEWS: Clarify symbols versus types in unused-value warnings.
1530
1531 * configure.ac (AC_INIT): Bump version number.
1532
1533 2006-02-13 Paul Eggert <eggert@cs.ucla.edu>
1534
1535 * NEWS: Version 2.1a.
1536 * tests/headers.at (AT_TEST_CPP_GUARD_H): Declare yyerror and yylex,
1537 since C99 requires this.
1538
1539 2006-02-11 Paul Eggert <eggert@cs.ucla.edu>
1540
1541 * m4/c-working.m4: New file.
1542 * configure.ac (BISON_TEST_FOR_WORKING_C_COMPILER): Use it.
1543
1544 2006-02-10 Paul Eggert <eggert@cs.ucla.edu>
1545
1546 * Makefile.maint: Merge from coreutils.
1547
1548 2006-02-09 Paul Eggert <eggert@cs.ucla.edu>
1549
1550 More portability fixes for problems summarized by Nelson H. F. Beebe.
1551
1552 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Catch a
1553 configuration screwup "./configure CC=/opt/SUNWspro/bin/c89
1554 CFLAGS="-xarch=generic64" CXX=/opt/SUNWspro/bin/CC
1555 LDFLAGS="-xarch=generic64" with Sun C 5.7 on Solaris 10; this
1556 messes up because C++ code is compiled in 32-bit mode but linked
1557 in 64-bit mode.
1558
1559 2006-02-08 Paul Eggert <eggert@cs.ucla.edu>
1560
1561 More portability fixes for problems summarized by Nelson H. F. Beebe.
1562
1563 * doc/bison.texinfo (Calc++ Scanner): Work around a bug in flex
1564 2.5.31. This resembles the 2005-10-10 patch to src/scan-skel.l.
1565
1566 * examples/calc++/Makefile.am (check_PROGRAMS): Renamed from
1567 nodist_PROGRAMS, since we don't need to actually compile the
1568 example if we're just doing a plain 'make'. This avoids bothering
1569 the installer unnecessarily about problems due to weird C++
1570 compilers.
1571
1572 2006-02-06 Paul Eggert <eggert@cs.ucla.edu>
1573
1574 More portability fixes for problems summarized by Nelson H. F. Beebe.
1575
1576 * tests/headers.at (AT_TEST_CPP_GUARD_H): Use #include <...> rather
1577 than #include "...", and compile with -I'.'. The old method was
1578 not portable, according to Posix and the C standard, and it does
1579 not work with Sun C 5.7, where previous #line directives affect
1580 the working directory used in later #include "..." directives.
1581
1582 2006-02-06 Juan Manuel Guerrero <juan.guerrero@gmx.de>
1583
1584 Various DJGGP specific issues in /djgpp
1585
1586 2006-02-02 Paul Eggert <eggert@cs.ucla.edu>
1587
1588 More portability fixes for problems summarized by Nelson H. F. Beebe.
1589
1590 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check that
1591 '#include <map>' works and that you can apply ++ to iterators.
1592
1593 2006-02-01 Paul Eggert <eggert@cs.ucla.edu>
1594
1595 Work around portability problems summarized by Nelson H. F. Beebe in
1596 <http://lists.gnu.org/archive/html/bug-bison/2005-09/msg00021.html>.
1597
1598 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check
1599 that '#include <string>' works.
1600
1601 * data/lalr1.cc (yytranslate_): No longer inline, to work around a
1602 porting problem to g++ 3.4.3 on Darwin 7.9.0, where g++ complained
1603 "warning: sorry: semantics of inline function static data `const
1604 unsigned char translate_table[262]' are wrong (you'll wind up with
1605 multiple copies)".
1606
1607 * lib/bbitset.h (struct bitset_vtable): Rename members not, and,
1608 or, xor to not_, and_, or_, and xor_, respectively. This works
1609 around a bug in GCC 3.4.3 on Irix 6.5, which apparently has a
1610 random system header somewhere that includes the equivalent of
1611 <iso646.h>.
1612
1613 * tests/headers.at (AT_TEST_CPP_GUARD_H): Don't assume that "$CC
1614 -E" works; it apparently doesn't work with PathScale EKO Compiler
1615 Suite Version 2.0.
1616
1617 2006-01-30 Joel E. Denny <jdenny@ces.clemson.edu>
1618
1619 During deterministic GLR operation, user actions should be able to
1620 influence the parse by changing yychar. To make this easier to fix and
1621 to make glr.c easier to evolve in general, don't maintain yytoken in
1622 parallel with yychar; just compute yytoken when needed.
1623 * tests/glr-regression.at (Incorrect lookahead during deterministic
1624 GLR): Check that setting yychar in a user action has the intended
1625 effect.
1626 * data/glr.c (yyGLRStack): Remove yytokenp member.
1627 (yyclearin): Don't set *yytokenp.
1628 (yyprocessOneStack, yyreportSyntaxError, yyrecoverSyntaxError): Examine
1629 yychar rather than *yytokenp to determine the current lookahead.
1630 Compute yytoken locally when needed.
1631 (yyparse): Likewise. Remove the local yytoken that yytokenp used to
1632 point to.
1633
1634 * doc/bison.texinfo (Bison Options): Remove stray sentence fragment
1635 after `--report' documentation.
1636
1637 2006-01-30 Paul Eggert <eggert@cs.ucla.edu>
1638
1639 * src/parse-gram.y (grammar_declaration): Location of printer
1640 symbol is @1, not list->location. Bug reported by twlevo.
1641 * tests/input.at (Incompatible Aliases): Adjust to above change.
1642
1643 2006-01-29 Paul Eggert <eggert@cs.ucla.edu>
1644
1645 * tests/input.at (AT_CHECK_UNUSED_VALUES): Remove. Instead, do
1646 all the test at once. This makes the output easier to read in the
1647 normal case.
1648
1649 Fix a longstanding bug uncovered by bro-0.9a9/src/parse.y, which I
1650 got from <http://bro-ids.org/download.html>. The bug is that
1651 when two actions appeared in succession, the second one was
1652 scanned before the first one was added to the grammar rule
1653 as a midrule action. Bison then output the incorrect warning
1654 "parse.y:905.17-906.36: warning: unused value: $3".
1655 * src/parse-gram.y (BRACED_CODE, action): These are no longer
1656 associated with a value.
1657 (rhs): Don't invoke grammar_current_rule_action_append.
1658 (action): Invoke it here instead.
1659 * src/reader.c (grammar_midrule_action): Now extern.
1660 (grammar_current_rule_action_append): Don't invoke
1661 grammar_midrule_action; that is now the scanner's job.
1662 * src/reader.h (last_string, last_braced_code_loc):
1663 (grammar_midrule_action): New decls.
1664 * src/scan-gram.l (last_string): Now extern, sigh.
1665 (last_braced_code_loc): New extern variable.
1666 (<INITIAL>"{"): Invoke grammar_midrule_action if the current
1667 rule already has an action.
1668 (<SC_BRACED_CODE>"}"): Set last_braced_code_loc before returning.
1669 * tests/input.at (AT_CHECK_UNUSED_VALUES):
1670 Add some tests to check that the above changes fixed the bug.
1671
1672 2006-01-27 Paul Eggert <eggert@cs.ucla.edu>
1673
1674 * src/reader.c (symbol_should_be_used): Renamed from symbol_typed_p.
1675 All used changed. Check whether the symbol has a destructor,
1676 not whether it is typed.
1677 * tests/input.at (AT_CHECK_UNUSED_VALUES): Add a destructor, so
1678 that the values are still reported as unused. All line numbers
1679 adjusted.
1680
1681 2006-01-23 Paul Eggert <eggert@cs.ucla.edu>
1682
1683 Work around a bug in bro 0.8, which underparenthesizes its
1684 definition of YYLLOC_DEFAULT.
1685 * data/glr.c: Change all uses of YYLLOC_DEFAULT to parenthesize
1686 their arguments.
1687 * data/lalr1.cc: Likewise.
1688 * data/yacc.cc: Likewise.
1689
1690 2006-01-22 Paul Eggert <eggert@cs.ucla.edu>
1691
1692 Work around a bug in Pike 7.0, and give the Pike folks a
1693 better way to override the usual int widths.
1694 * data/yacc.c (b4_int_type): Use yytype_uint8, etc., so that the
1695 user can override the types.
1696 (short): #undef, to work around a bug in Pike 7.0.
1697 (yytype_uint8, yytype_int8, yytype_uint16, yytype_int16): New types.
1698 (union yyalloc.yyss): Use yytype_int16 rather than short.
1699 All uses changed.
1700 (yysigned_char): Remove.
1701 * src/parse-gram.y (YYTYPE_UINT8, YYTYPE_INT8, YYTYPE_UINT16):
1702 (YYTYPE_INT16): New macros, to test the new facility in yacc.c.
1703 * tests/regression.at (Web2c Actions): Adjust to above changes.
1704
1705 * src/reader.c (check_and_convert_grammar): New function.
1706 (reader): Close the input file even if something went wrong during
1707 parsing. Minor file descriptor leak reported by twlevo.
1708
1709 * src/assoc.c (assoc_to_string): Use a default: abort (); case
1710 to pacify gcc -Wswitch-default.
1711 * src/scan-gram.l (adjust_location): Use a default: break; case
1712 to pacify gcc -Wswitch-default.
1713 * src/scan-skel.h (skel_get_lineno, skel_get_in, skel_get_out):
1714 (skel_get_leng, skel_get_text, skel_set_lineno, skel_set_in):
1715 (skel_set_out, skel_get_debug, skel_set_debug, skel_lex_destroy):
1716 Move these decls to scan-skel.l, since they don't need to be
1717 visible elsewhere.
1718 * src/scan-skel.l: Accept the above decls.
1719 (skel_lex): New decl, to pacify GCC when unpatched flex 2.5.31
1720 is used.
1721
1722 2006-01-21 Paul Eggert <eggert@cs.ucla.edu>
1723
1724 * Makefile.cfg (local-checks-to-skip): Add changelog-check,
1725 since we don't want to insist on a version number at the start
1726 of the changelog every time.
1727 * Makefile.maint: Sync from coreutils a bit better.
1728 (sc_trailing_blank): Renamed from sc_trailing_space.
1729 All uses changed.
1730 (sc_no_if_have_config_h, sc_require_config_h):
1731 (sc_prohibit_assert_without_use): New rules.
1732 (sc_obsolete_symbols): Don't catch Makefile.maint itself.
1733 (sc_dd_max_sym_length): Fix leading spaces in rule.
1734 (sc_system_h_headers): Prefix with @.
1735 (sc_useless_cpp_parens, m4-check): Output line numbers.
1736 (changelog-check): Allow version only in head.
1737 * data/c.m4: Use "defined FOO" instead of "defined (FOO)", to
1738 satisfy new Makefile.maint rule.
1739 * data/glr.c: Likewise.
1740 * data/glr.cc: Likewise.
1741 * data/lalr1.cc: Likewise.
1742 * data/yacc.c: Likewise.
1743 * lib/ebitsetv.c: Likewise.
1744 * lib/lbitset.c: Likewise.
1745 * lib/subpipe.c: Likewise.
1746 * lib/timevar.c: Likewise.
1747 * src/system.h: Likewise.
1748 * data/yacc.c (YYSTYPE): Don't generate trailing spaces in output.
1749 * djgpp/Makefile.maint: Add copyright notice.
1750 * djgpp/README.in: Likewise.
1751 * djgpp/config.bat: Likewise.
1752 * djgpp/config.site: Likewise.
1753 * djgpp/config_h.sed: Likewise.
1754 * djgpp/djunpack.bat: Likewise.
1755 * djgpp/config.sed: Fix copyright notice to match standard format.
1756 * djgpp/subpipe.h: Likewise.
1757 * lib/bitsetv-print.c: Likewise.
1758 * lib/bitsetv.c: Likewise.
1759 * lib/subpipe.h: Likewise.
1760 * lib/timevar.c: Likewise.
1761 * lib/timevar.h: Likewise.
1762 * djgpp/subpipe.c: Use standard recipe for config.h.
1763 * lib/abitset.c: Likewise.
1764 * lib/bitset.c: Likewise.
1765 * lib/bitset_stats.c: Likewise.
1766 * lib/bitsetv-print.c: Likewise.
1767 * lib/bitsetv.c: Likewise.
1768 * lib/ebitsetv.c: Likewise.
1769 * lib/get-errno.c: Likewise.
1770 * lib/lbitset.c: Likewise.
1771 * lib/subpipe.c: Likewise.
1772 * lib/timevar.c: Likewise.
1773 * lib/vbitset.c: Likewise.
1774 * tests/local.at: Likewise.
1775 * src/scan-gram.l: Don't include verify.h, since system.h does
1776 that for us.
1777 * .x-sc_require_config_h: New file.
1778 * .x-sc_unmarked_diagnostics: New file.
1779
1780 2006-01-20 Paul Eggert <eggert@cs.ucla.edu>
1781
1782 Be a bit more systematic about using 'abort'.
1783 * lib/abitset.c (abitset_test): Remove ATTRIBUTE_UNUSED; not needed.
1784 * lib/bitset.c (bitset_bytes, bitset_init, bitset_op4_cmp):
1785 Put 'default: abort ();' before some other case, to satisfy older
1786 pedantic compilers.
1787 * lib/bitset_stats.c (bitset_stats_init): Likewise.
1788 * lib/ebitset.c (ebitset_elt_find, ebitset_op3_cmp): Likewise.
1789 * lib/lbitset.c (lbitset_elt_find, lbitset_op3_cmp): Likewise.
1790 * src/conflicts.c (resolve_sr_conflict): Likewise.
1791 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str):
1792 (get_decision_str, get_orientation_str, get_node_alignment_str):
1793 (get_arrow_mode_str, get_crossing_type_str, get_view_str):
1794 (get_linestyle_str, get_arrowstyle_str): Likewise.
1795 * src/conflicts.c (resolve_sr_conflict):
1796 Use a default case rather than one for the one remaining enum
1797 value, to catch invalid enum values as well.
1798 * src/lalr.c (set_goto_map, map_goto):
1799 Prefer "assert (FOO);" to "if (!FOO) abort ();".
1800 * src/nullable.c (nullable_compute, token_definitions_output):
1801 Likewise.
1802 * src/reader.c (packgram, reader): Likewise.
1803 * src/state.c (transitions_to, state_new, state_reduction_find):
1804 Likewise.
1805 * src/symtab.c (symbol_user_token_number_set, symbol_make_alias):
1806 (symbol_pack): Likewise.
1807 * src/tables.c (conflict_row, pack_vector): Likewise.
1808 * src/scan-skel.l (QPUTS): Remove unnecessary parens.
1809 (BASE_QPUTS, "@output ".*\n): Remove unnecessary asserts.
1810 * src/system.h: Don't include <assert.h>.
1811 (assert): New macro.
1812
1813 * doc/bison.texinfo (Prologue, Rules, Actions, Union Decl, Action Decl):
1814 (Destructor Decl, Parser Function, Pure Calling):
1815 Describe rules for braces inside C code more carefully.
1816
1817 2006-01-19 Paul Eggert <eggert@cs.ucla.edu>
1818
1819 Fix some porting glitches found by Nelson H. F. Beebe.
1820 * lib/abitset.c (abitset_resize): Rewrite to avoid warnings from
1821 compilers that don't understand that abort () does not return.
1822 * src/state.c (transitions_to): Likewise.
1823 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check
1824 that '#include <cstdlib>' works.
1825 * src/system.h (INT8_MIN, INT16_MIN, INT32_MIN, INT8_MAX):
1826 (INT16_MAX, UINT8_MAX, INT32_MAX, UINT16_MAX, UINT32_MAX):
1827 #undef if ! defined __STDC_VERSION__ || __STDC_VERSION__ < 199901,
1828 for the benefit of some pre-C99 compilers.
1829
1830 * bootstrap: Undo changes to gnulib files that autoreconf made.
1831
1832 Minor fixups to get 'make maintainer-check' to work.
1833 * configure.ac: Don't use -Wnested-externs, as it's incompatible
1834 with the new verify.h implementation.
1835 * data/c.m4 (b4_yy_symbol_print_generate): YYUSE (yyoutput).
1836 * data/glr.c (YYUSE): Depend on __GNUC__ as well.
1837 * data/yacc.c (YYUSE): Likewise.
1838 * data/lalr1.cc (yysyntax_error_): YYUSE (yystate).
1839 * lib/subpipe.c (end_of_output_subpipe): The args are unused.
1840 * src/parse-gram.y (declaration): Don't pass a string constant
1841 to a function that expects char *, since GCC might complain
1842 about the constant value.
1843 * src/reader.c (symbol_typed_p): Add parens to pacify GCC.
1844 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): #undef yylloc and yylval
1845 before #defining them.
1846 * tests/glr-regression.at
1847 (Incorrectly initialized location for empty right-hand side in GLR):
1848 In yyerror, use the msg arg.
1849 (Corrupted semantic options if user action cuts parse):
1850 (Incorrect lookahead during deterministic GLR):
1851 (Incorrect lookahead during nondeterministic GLR):
1852 Don't name a local var 'index'; it shadows string.h's 'index'.
1853
1854 2006-01-19 Akim Demaille <akim@epita.fr>
1855
1856 * tests/calc.at (_AT_DATA_CALC_Y): Initialize the whole initial
1857 location, not just parts of it.
1858
1859 2006-01-18 Paul Eggert <eggert@cs.ucla.edu>
1860
1861 * NEWS: Document the fact that multiple %unions are now allowed.
1862 * doc/bison.texinfo (Union Decl): Likewise.
1863 * TODO: This feature is now implemented, so remove it from
1864 the wishlist.
1865
1866 * Makefile.maint: Merge with coreutils Makefile.maint.
1867 (CVS_LIST): Use build-aux version if available.
1868 (VERSION_REGEXP): New macro.
1869 (syntax-check-rules): Add sc_no_if_have_config_h,
1870 sc_prohibit_assert_without_use, sc_require_config_h,
1871 sc_useless_cpp_parens.
1872 (sc_obsolete_symbols): Check for O_NDELAY.
1873 (sc_dd_max_sym_length): Track coreutils.
1874 (sc_unmarked_diagnostics): Look in all files, not just *.c.
1875 (sc_useless_cpp_parens): New rule.
1876 (news-date-check): Look for version or today's date.
1877 (changelog-check): Don't require version number near head.
1878 (copyright-check): Use current year instead of hardwiring 2005.
1879 (my-distcheck): Depend on $(release_archive_dir)/$(prev-tgz).
1880 (announcement): Add --gpg-key-ID.
1881
1882 * djgpp/config.sed: Add copyright notice, and replace "filesystem"
1883 with "file system".
1884
1885 Avoid undefined behavior that addressed just before the start of an
1886 array. Problem reported by twlevo.
1887 * src/reader.c (packgram): Prepend a new sentinel before ritem.
1888 * src/lalr.c (build_relations): Rely on new sentinel.
1889 * src/gram.c (gram_free): Adjust to new sentinel.
1890
1891 2006-01-12 Joel E. Denny <jdenny@ces.clemson.edu>
1892
1893 * data/glr.c (yyGLRStateSet): Rename yylookaheadStatuses to
1894 yylookaheadNeeds. All uses updated.
1895 (yysplitStack): Rename local yynewLookaheadStatuses to
1896 yynewLookaheadNeeds.
1897 * data/glr-regression.at (Incorrect lookahead during nondeterministic
1898 GLR): In comments, change `lookahead status' to `lookahead need'.
1899
1900 2006-01-11 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
1901
1902 * data/glr.c (yysplitStack): A little stylistic rewrite.
1903
1904 2006-01-11 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
1905
1906 * data/glr.c (yyaddDeferredAction): Flesh out the comment.
1907
1908 2006-01-11 Joel E. Denny <jdenny@ces.clemson.edu>
1909
1910 * doc/bison.texinfo: Fix some typos.
1911 (GLR Semantic Actions): New subsection discussing special
1912 considerations because GLR semantic actions might be deferred.
1913 (Actions): Mention look-ahead usage of yylval.
1914 (Actions and Locations): Mention look-ahead usage of yylloc.
1915 (Special Features for Use in Actions): Add YYEOF entry and mention it
1916 in the yychar entry.
1917 In the yychar entry, remove mention of the local yychar case (pure
1918 parser) since this is irrelevant information when writing semantic
1919 actions and since it's already discussed in `Bison Symbols' where
1920 yychar is otherwise described as an external variable.
1921 In the yychar entry, don't call it the `current' look-ahead since it
1922 isn't when semantic actions are deferred.
1923 In the yychar and yyclearin entries, add note about deferred semantic
1924 actions.
1925 Add yylloc and yylval entries discussing look-ahead usage.
1926 (Look-Ahead Tokens): When discussing yychar, don't call it the
1927 `current' look-ahead, and do mention yylval and yylloc.
1928 (Error Recovery): Cross-reference `Action Features' when mentioning
1929 yyclearin.
1930 (Bison Symbols): In the yychar entry, don't call it the `current'
1931 look-ahead.
1932 In the yylloc and yylval entries, mention look-ahead usage.
1933
1934 2006-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
1935
1936 * tests/glr-regression.at: Update copyright year to 2006.
1937
1938 2006-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
1939
1940 * data/glr.c (yyGLRStateSet): Add yybool* yylookaheadStatuses member to
1941 use during nondeterministic operation to track which stacks have
1942 actually needed the current lookahead.
1943 (yyinitStateSet, yyfreeStateSet, yyremoveDeletes, yysplitStack):
1944 Allocate, deallocate, resize, and otherwise shuffle space for
1945 yylookaheadStatuses in parallel with yystates member of yyGLRStateSet.
1946 (yysplitStack, yyprocessOneStack, yyparse): Set lookahead status
1947 appropriately during nondeterministic operation.
1948 (yySemanticOption): Add int yyrawchar, YYSTYPE yyval, and YYLTYPE yyloc
1949 members to store the current lookahead to be used by the deferred
1950 user action.
1951 (yyaddDeferredAction): Add size_t yyk parameter specifying the stack
1952 from which the RHS is taken. Set the lookahead members of the new
1953 yySemanticOption according to the lookahead status for stack yyk.
1954 (yyglrShiftDefer, yyglrReduce): Pass yyk parameter on to
1955 yyaddDeferredAction.
1956 (yyresolveAction): Set yychar, yylval, and yylloc to the lookahead
1957 members of yySemanticOption before invoking yyuserAction, and then set
1958 them back to their current values afterward.
1959 (yyparse): Set yychar = YYEMPTY where yytoken = YYEMPTY.
1960 (yyreportAmbiguity): Add /*ARGSUSED*/ to pacify lint.
1961 * tests/glr-regression.at: Remove `.' from the ends of recent test case
1962 titles for consistency.
1963 (Leaked merged semantic value if user action cuts parse): In order to
1964 suppress lint warnings, use arguments in merge function, and assign
1965 char value < 128 in main.
1966 (Incorrect lookahead during deterministic GLR): New test case.
1967 (Incorrect lookahead during nondeterministic GLR): New test case.
1968
1969 2006-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
1970
1971 * data/c.m4 (b4_yy_symbol_print_generate): In yy_symbol_print, accept
1972 !yyvaluep as signal that no semantic value is available to print.
1973 * data/glr.c (yydestroyGLRState): If state is not resolved, don't try
1974 to print a semantic value.
1975
1976 2006-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
1977
1978 * tests/glr-regression.at: For consistency with my newer test cases,
1979 don't thank myself.
1980
1981 2006-01-05 Joel E. Denny <jdenny@ces.clemson.edu>
1982
1983 * data/glr.c (yyresolveValue): When merging semantic options, if at
1984 least one user action succeeds but a later one cuts the parse, then
1985 destroy the semantic value before returning rather than leaking it.
1986 (yyresolveStates): If a user action cuts the parse and thus
1987 yyresolveValue fails, ignore the (unset) semantic value rather than
1988 corrupting the yyGLRState, and empty the semantic options list since
1989 the user actions should have called all necessary destructors.
1990 Simplify code with YYCHK.
1991 * tests/glr-regression.at (Corrupted semantic options if user action
1992 cuts parse): New test case.
1993 (Undesirable destructors if user action cuts parse): New test case.
1994 Before applying any of this patch, this test case never actually failed
1995 for me... but only because the corrupted semantic options usually
1996 masked this bug.
1997 (Leaked merged semantic value if user action cuts parse): New test
1998 case.
1999
2000 2006-01-05 Akim Demaille <akim@epita.fr>
2001
2002 * src/reader.c, src/symlist.h, src/symlist.c: s/mid_rule/midrule/.
2003
2004 2006-01-04 Paul Eggert <eggert@cs.ucla.edu>
2005
2006 * data/c.m4 (b4_c_modern): New macro, with a new provision for
2007 _MSC_VER. Problem reported by Cenzato Marco.
2008 (b4_c_function_def): Use it.
2009 * data/yacc.c (YYMODERN_C): Remove. All uses replaced by
2010 b4_c_modern.
2011 (yystrlen, yystpcpy, yyparse): Use b4_c_function... macros rather
2012 than rolling our own.
2013
2014 2006-01-04 Akim Demaille <akim@epita.fr>
2015
2016 Also warn about non-used mid-rule values.
2017 * src/symlist.h, src/symlist.c (symbol_list): Add a mid_rule
2018 member.
2019 (symbol_list_new): Adjust.
2020 * src/reader.c (symbol_typed_p): New.
2021 (grammar_rule_check): Use it.
2022 (grammar_midrule_action): Bind a mid-rule LHS to its rule.
2023 Check its rule.
2024 * tests/input.at (AT_CHECK_UNUSED_VALUES): New.
2025 Use it.
2026 * tests/actions.at (Exotic Dollars): Adjust.
2027
2028 2006-01-04 Akim Demaille <akim@epita.fr>
2029
2030 * src/reader.c (grammar_midrule_action): If $$ is set in a
2031 mid-rule, move the `used' bit to its lhs.
2032 * tests/input.at (Unused values): New.
2033 * tests/actions.at (Exotic Dollars): Adjust: exp is not typed.
2034
2035 2006-01-03 Paul Eggert <eggert@cs.ucla.edu>
2036
2037 * doc/bison.texinfo (Bison Options): Say more accurately what
2038 --yacc does.
2039 * src/parse-gram.y (rules_or_grammar_declaration): Don't complain
2040 about declarations in the grammar when in Yacc mode, as POSIX does
2041 not require a diagnostic when the grammar uses extensions.
2042
2043 * src/reduce.c (reduce_grammar): Remove unnecessary cast to bool.
2044
2045 Warn about dubious constructions like "%token T T".
2046 Reported by twlevo.
2047 * src/symtab.h (struct symbol.declared): New member.
2048 * src/symtab.c (symbol_new): Initialize it to false.
2049 (symbol_class_set): New arg DECLARING, specifying whether
2050 this is a declaration that we want to warn about, if there
2051 is more than one of them. All uses changed.
2052
2053 * data/glr.c, data/glr.cc, data/lalr1.cc, data/yacc.c:
2054 Allow multiple %union directives, whose contents concatenate.
2055 * src/parse-gram.y (grammar_declaration): Likewise.
2056 Use muscle_code_grow, so that we don't need stype_line any more.
2057 All uses changed.
2058
2059 * src/muscle_tab.c (muscle_grow): Fix comment.
2060
2061 * ChangeLog, data/c.m4, data/glr.c, data/glr.cc, data/location.cc:
2062 * data/yacc.c, src/getargs.c, src/output.c, tests/cxx-type.at:
2063 Update copyright year to 2006.
2064
2065 2006-01-03 Akim Demaille <akim@epita.fr>
2066
2067 Have glr.cc pass (some of) the calc.at tests.
2068 * data/glr.cc (b4_parse_param_orig): New.
2069 (b4_parse_param): Improve its definition, and bound it more
2070 clearly in the skeleton.
2071 (b4_epilogue): Append, instead of prepending, in order to keep
2072 #line consistency.
2073 Simplify the generation of auxiliary functions: locations and
2074 purity are mandated.
2075 (b4_global_tokens_and_yystype): Honor it.
2076 * data/location.cc (c++.m4): Don't include it.
2077 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Define AT_GLR_CC_IF
2078 and AT_SKEL_CC_IF.
2079 * tests/calc.at (AT_CHECK_CALC): Rely on AT_SKEL_CC_IF instead of
2080 AT_LALR1_CC_IF.
2081 Be sure to initialize the first position's filename.
2082 (AT_CHECK_CALC_LALR1_CC): Add %location and %defines, they are
2083 mandated anyway.
2084 (AT_CHECK_CALC_GLR_CC): New.
2085 Use it to exercise glr.cc as a lalr1.cc drop-in replacement.
2086
2087 2006-01-02 Akim Demaille <akim@epita.fr>
2088
2089 * src/output.c (output_skeleton): Don't hard wire the inclusion of
2090 c.m4.
2091 * data/c++.m4, data/glr.c, data/yacc.c: Include c.m4.
2092 * data/glr.cc: Do not include stack.hh.
2093
2094 2006-01-02 Joel E. Denny <jdenny@ces.clemson.edu>
2095
2096 * data/glr.c: Reformat whitespace with tabs.
2097 (b4_lpure_formals): Remove this unused m4 macro.
2098 * tests/cxx-type.at: Reformat whitespace with tabs.
2099 (_AT_TEST_GLR_CXXTYPES): In union Node, rename node_info to nodeInfo
2100 since it's a member. Rename type to isNterm for clarity.
2101
2102 2005-12-29 Akim <akim@sulaco.local>
2103
2104 Let glr.cc catch up with symbol_value_print.
2105 * data/glr.cc (b4_yysymprint_generate): Replace by...
2106 (b4_yy_symbol_print_generate): this.
2107 (yy_symbol_print, yy_symbol_value_print): Declare them.
2108
2109 2005-12-28 Paul Eggert <eggert@cs.ucla.edu>
2110
2111 * src/location.h (boundary): Note that a line or column equal
2112 to INT_MAX indicates an overflow.
2113 * src/scan-gram.l: Include verify.h. Don't include get-errno.h.
2114 (rule_length_overflow, increment_rule_length, add_column_width):
2115 New functions.
2116 (<INITIAL>{id}, <SC_ESCAPED_STRING>"\"", <SC_ESCAPED_CHARACTER>"'"):
2117 (<SC_BRACED_CODE>"}"):
2118 Use increment_rule_length rather than incrementing it by hand.
2119 (adjust_location, handle_syncline): Diagnose overflow.
2120 (handle_action_dollar, handle_action_at):
2121 Fix bug with monstrosities like $-2147483648.
2122 Remove now-unnecessary checks.
2123 (scan_integer): Verify assumptions and remove now-unnecessary checks.
2124 (convert_ucn_to_byte): Verify assumptions.
2125 (handle_syncline): New arg LOC. All callers changed.
2126 Don't store through a value derived from char const * pointer.
2127
2128 * src/reader.c (grammar_rule_check): Rewrite slightly to avoid
2129 GCC warnings.
2130
2131 2005-12-27 Paul Eggert <eggert@cs.ucla.edu>
2132
2133 * src/reader.c (grammar_midrule_action, grammar_symbol_append):
2134 Remove unnecessary forward static decls.
2135
2136 2005-12-27 Akim Demaille <akim@epita.fr>
2137
2138 * src/reader.c (grammar_current_rule_check): Also check that $$
2139 is used.
2140 Take the rule to check as argument, hence rename as...
2141 (grammar_rule_check): this.
2142 * src/reader.h, src/reader.c (grammar_rule_begin, grammar_rule_end):
2143 Rename as...
2144 (grammar_rule_begin, grammar_rule_end): these, for consistency.
2145 (grammar_midrule_action, grammar_symbol_append): Now static.
2146 * tests/torture.at (input): Don't rely on the default action
2147 being always performed.
2148 * tests/calc.at: "Set" $$ even when the action is "cut" with
2149 YYERROR or other.
2150 * tests/actions.at (Exotic Dollars): Instead of using unused
2151 values, check that the warning is issued.
2152
2153 2005-12-22 Paul Eggert <eggert@cs.ucla.edu>
2154
2155 * NEWS: Improve wording for unused-value warnings.
2156
2157 2005-12-22 Akim Demaille <akim@epita.fr>
2158
2159 * data/lalr1.cc, data/yacc.c, data/glr.c, data/c.m4
2160 (b4_yysymprint_generate): Rename as...
2161 (b4_yy_symbol_print_generate): this.
2162 Generate yy_symbol_print instead of yysymprint.
2163 Generate also yy_symbol_value_print, and use it.
2164
2165 2005-12-22 Akim Demaille <akim@epita.fr>
2166
2167 * NEWS: Warn about unused values.
2168 * src/symlist.h, src/symlist.c (symbol_list, symbol_list_new): Add
2169 a `used' member.
2170 (symbol_list_n_get, symbol_list_n_used_set): New.
2171 (symbol_list_n_type_name_get): Use symbol_list_n_get.
2172 * src/scan-gram.l (handle_action_dollar): Flag used symbols.
2173 * src/reader.c (grammar_current_rule_check): Check that values are
2174 used.
2175 * src/symtab.c (symbol_print): Accept 0.
2176 * tests/existing.at: Remove the type information.
2177 Empty the actions.
2178 Remove useless actions (beware of mid-rule actions: perl -000
2179 -pi -e 's/\s*\{\}(?=[\n\s]*[|;])//g').
2180 * tests/actions.at (Exotic Dollars): Use unused values.
2181 * tests/calc.at: Likewise.
2182 * tests/glr-regression.at (No users destructors if stack 0 deleted):
2183 Likewise.
2184
2185 * src/gram.c (rule_useful_p, rule_never_reduced_p): Use
2186 rule_useful_p.
2187
2188 2005-12-21 Paul Eggert <eggert@cs.ucla.edu>
2189
2190 Undo 2005-12-01 tentative license wording change. The wording is
2191 still being reviewed by the lawyers, and we don't want to wait for
2192 them before publishing a test release. For now, revert to the
2193 previous wording.
2194 * NEWS: Undo 2005-12-01 change.
2195 * data/glr.c: Revert to previous license wording.
2196 * data/glr.cc: Likewise.
2197 * data/lalr1.cc: Likewise.
2198 * data/location.cc: Likewise.
2199 * data/yacc.c: Likewise.
2200
2201 * NEWS: Reword %destructor vs YYABORT etc.
2202 * data/glr.c: Use American spacing, for consistency.
2203 * data/glr.cc: Likewise.
2204 * data/lalr1.cc: Likewise.
2205 * data/yacc.c: Likewise.
2206 * data/yacc.c: Reformat comments slightly.
2207 * doc/bison.texinfo: Replace "non-" with "non" when that makes sense,
2208 for consistency. Fix some spelling errors and reword recently-included
2209 text slightly.
2210 * tests/cxx-type.at: Cast results of malloc, for C++.
2211
2212 2005-12-21 Joel E. Denny <address@hidden>
2213
2214 * tests/cxx-type.at: Construct a tree, count the parents of shared
2215 nodes, and free each node once and only once. Previously, the memory
2216 for semantic values was leaked instead.
2217
2218 2005-12-21 Joel E. Denny <address@hidden>
2219
2220 * data/glr.c (struct yyGLRStack): If pure, add yyval and yyloc members.
2221 (yylval, yylloc): If pure, #define to yystackp->yyval and
2222 yystackp->yyloc similar to yychar and yynerrs.
2223 (yyparse): If pure, remove local yylval and yylloc. Add local
2224 yystackp to accommodate pure definitions of yylval and yylloc.
2225 (b4_lex_param, b4_lyyerror_args, b4_lpure_args): If pure, change
2226 yylvalp and yyllocp to &yylval and &yylloc.
2227 (nerrs, char, lval, lloc): If pure, add #define's for b4_prefix[]
2228 namespace. Previously, nerrs and char were missing, but lval and lloc
2229 weren't necessary.
2230 (yyprocessOneStack, yyreportSyntaxError, yyrecoverSyntaxError): Remove
2231 yylvalp and yyllocp parameters since, if pure, these are now always
2232 accessible through yystackp. If not pure, they are still accessible
2233 globally.
2234 * data/glr.c, data/yacc.c (YYLLOC_DEFAULT): Change `if (N)' to
2235 `if (YYID (N))' to pacify lint.
2236
2237 2005-12-21 Akim Demaille <akim@epita.fr>
2238
2239 YYACCEPT, YYERROR, and YYABORT, as user actions, should not
2240 destroy the RHS symbols of a rule.
2241 * data/yacc.c (yylen): Initialize to 0.
2242 Keep its value to the number of items to possibly shift.
2243 In particular, a regular successful parse that ends on YYFINAL by
2244 a (internal) YYACCEPT must not have yylen != 0.
2245 (yyerrorlab, yyreturn): Pop the RHS.
2246 Reorder a bit to emphasize the `shifting' bits of code.
2247 (YYPOPSTACK): Now accept a number of items to pop.
2248 * data/lalr1.cc: Likewise.
2249 * data/glr.c: Formatting changes.
2250 Use goto instead of fall through.
2251 * doc/bison.texinfo (Destructor Decl): Complete.
2252
2253 2005-12-20 Juan Manuel Guerrero <juan.guerrero@gmx.de>
2254
2255 * Makefile.am: DJGPP specific files added to EXTRA_DIST.
2256 * djgpp/Makefile.maint: Fix PACKAGE variable computation.
2257 * djgpp/config.bat: Replace every occurence of the file name
2258 scan-gram-c.c with c-scan-gram.c. The same for scan-skel-c.c with
2259 c-scan-skel.c to conform with the 8.3 file name restriction on MSDOS.
2260 * djgpp/config.sed: Replace every occurence of the file name
2261 scan-gram-c.c with c-scan-gram.c. The same for scan-skel-c.c with
2262 c-scan-skel.c to conform with the 8.3 file name restriction on MSDOS.
2263 * djgpp/djunpack.bat: DJGPP specific file.
2264 * djgpp/fnchange.lst: DJGPP specific file.
2265 * djgpp/README.in: Add new information about how to unpack the bison
2266 source on MSDOS and other systems which have 8.3 file name restrictions
2267 using djunpack.bat and fnchange.lst.
2268
2269 2005-12-12 Paul Eggert <eggert@cs.ucla.edu>
2270
2271 * bootstrap (build_cvs_prefix): Remove; unused.
2272 (CVS_PREFIX): Adjust to yesterday's Savannah reorganization
2273 when getting gnulib.
2274
2275 2005-12-12 "Joel E. Denny" <jdenny@ces.clemson.edu>
2276
2277 * data/glr.c: Reorder typedef declarations for structs to match order
2278 of struct declarations.
2279 Rename yystack everywhere to yystackp except in yyparse where it's not
2280 a pointer.
2281 (yyglrShift): Change parameter YYSTYPE yysval to YYSTYPE* yyvalp for
2282 consistency.
2283 (yyis_table_ninf): Change 0 to YYID (0) to pacify lint.
2284 (yyreportSyntaxError): Add /*ARGSUSED*/ to pacify lint.
2285 (yyparse): Change while (yytrue) to while ( YYID (yytrue)) to pacify
2286 lint.
2287
2288 2005-12-09 Paul Eggert <eggert@cs.ucla.edu>
2289
2290 * tests/sets.at (Accept): Fix typos in regular expression used to
2291 sed out the final state number.
2292
2293 Work around portability problem on Solaris 10: flex-generated
2294 files include <stdio.h> before <config.h>, which messes up
2295 because the latter defines __EXTENSIONS__. Address the problem
2296 by creating two new little files that include <config.h> first,
2297 then include the flex-generated files. Rewrite everyone else
2298 to include <config.h> first, as well.
2299 * lib/timevar.c: Always include "config.h".
2300 * src/Makefile.am (bison_SOURCES): Replace scan-gram.l with
2301 scan-gram-c.c, and scan-skel.l with scan-skel-c.c.
2302 (EXTRA_bison_SOURCES): New macro.
2303 * src/scan-gram-c.c, src/scan-skel-c.c: New files.
2304 * src/system.h: Don't include config.h.
2305 * src/LR0.c: Include <config.h> first.
2306 * src/assoc.c: Likewise.
2307 * src/closure.c: Likewise.
2308 * src/complain.c: Likewise.
2309 * src/conflicts.c: Likewise.
2310 * src/derives.c: Likewise.
2311 * src/files.c: Likewise.
2312 * src/getargs.c: Likewise.
2313 * src/gram.c: Likewise.
2314 * src/lalr.c: Likewise.
2315 * src/location.c: Likewise.
2316 * src/main.c: Likewise.
2317 * src/muscle_tab.c: Likewise.
2318 * src/nullable.c: Likewise.
2319 * src/output.c: Likewise.
2320 * src/parse-gram.y: Likewise.
2321 * src/print.c: Likewise.
2322 * src/print_graph.c: Likewise.
2323 * src/reader.c: Likewise.
2324 * src/reduce.c: Likewise.
2325 * src/relation.c: Likewise.
2326 * src/state.c: Likewise.
2327 * src/symlist.c: Likewise.
2328 * src/symtab.c: Likewise.
2329 * src/tables.c: Likewise.
2330 * src/uniqstr.c: Likewise.
2331 * src/vcg.c: Likewise.
2332
2333 * src/parse-gram.y: Fix minor problems uncovered by lint.
2334 (current_lhs, current_lhs_location): Now static.
2335 (current_assoc): Remove unused variable.
2336
2337 Cleanups so that Bison-generated parsers have less lint.
2338 * data/c.m4 (b4_yydestruct_generate, b4_yysymprint_generate):
2339 Prepend /*ARGSUSED*/, for lint's sake.
2340 * data/glr.c (YYUSE): Properly parenthesize, and use an alternate
2341 definition if 'lint' is defined.
2342 (YYID): New macro (or function, if lint).
2343 All uses of /*CONSTCOND*/0 replaced by YYID(0).
2344 * data/yacc.c: Likewise.
2345 * data/glr.c (yyuserAction, yyuserMerge, yy_reduce_print):
2346 (yyrecoverSyntaxError): Prepend /*ARGSUSED*/.
2347 * data/glr.cc (YYLLOC_DEFAULT): Omit /*CONSTCOND*/ since this code
2348 is C++ only.
2349 * data/lalr1.cc (YYUSE): Just use a cast, since this code is C++ only.
2350 * data/yacc.c (YYSTACK_FREE) [defined YYSTACK_ALLOC]:
2351 Use YYID(0) rather than 0, for lint.
2352 (yystrlen): Rewrite to avoid lint warning about ptrdiff_t overflow.
2353 (yysyntax_error): Rewrite to avoid lint warnings about parenthesization.
2354
2355 2005-12-07 Paul Eggert <eggert@cs.ucla.edu>
2356
2357 * tests/glr-regression.at
2358 (Improper handling of embedded actions and dollar(-N) in GLR parsers):
2359 Close memory leak reported by twlevo.
2360
2361 2005-12-06 "Joel E. Denny" <jdenny@ces.clemson.edu>
2362
2363 * data/glr.c (yyprocessOneStack, yyparse): Synchronize the shift for
2364 all stacks.
2365 (yyparse): Iterate another stack in order to call user destructors.
2366 * tests/glr-regression.at (No users destructors if stack 0 deleted):
2367 New test case.
2368 (Duplicated user destructor for lookahead): This test now is expected
2369 to succeed.
2370
2371 2005-12-01 Paul Eggert <eggert@cs.ucla.edu>
2372
2373 * NEWS: Document the following change.
2374 * data/yacc.c: Say "parser skeleton" rather than "file", since
2375 it's no longer just a file.
2376 * data/glr.c: Grant a special exception for C GLR parsers, that
2377 reads like the already-existing exception for C LALR(1) parsers.
2378 * data/glr.cc: Likewise.
2379 * data/lalr1.cc: Likewise.
2380 * data/location.cc: Likewise.
2381 * data/yacc.c: Reword the "written by" statement to clarify that
2382 it was the parser skeleton, not the entire output file.
2383 * data/glr.c: Written by Paul Hilfinger.
2384 * data/glr.cc: Written by Akim Demaille.
2385 * data/lalr1.cc: Likewise.
2386
2387 2005-11-18 Paul Eggert <eggert@cs.ucla.edu>
2388
2389 * data/yacc.c (yy_reduce_print, YY_REDUCE_PRINT):
2390 Fix typos in previous change that broke 'make check'.
2391 YY_REDUCE_PRINT cannot be a pseudo-varargs macro; that isn't
2392 supported in C.
2393 * tests/calc.at (_AT_CHECK_CALC,_AT_CHECK_CALC_ERROR):
2394 Don't check NUM-STDERR-LINES, since the output format is fluctuating.
2395 We can revert this once things settle down.
2396
2397 * src/conflicts.c (conflicts_print): Don't print file name twice
2398 when %expect fails because there were no conflicts.
2399 * doc/bison.texinfo (Expect Decl): Tighten up wording in previous
2400 change.
2401 * tests/conflicts.at (%expect not enough, %expect too much):
2402 (%expect with reduce conflicts): Adjust to new behavior.
2403
2404 2005-11-18 Akim Demaille <akim@epita.fr>
2405
2406 * src/conflicts.c (conflicts_print): Unsatisfied %expectation are
2407 errors.
2408 * NEWS: Document this.
2409 * doc/bison.texinfo (Expect Decl): Likewise.
2410
2411 2005-11-16 Akim Demaille <akim@epita.fr>
2412
2413 Generalize the display of semantic values and locations in traces.
2414 * data/glr.c (yy_reduce_print): Fix indices (again).
2415 * data/c++.m4 (b4_rhs_value, b4_rhs_location): Don't expect
2416 literal integers.
2417 * data/lalr1.cc (yyreduce_print): Rename as...
2418 (yy_reduce_print): this.
2419 Display values and locations.
2420 * data/yacc.c (yy_reduce_print): Likewise.
2421 (YY_REDUCE_PRINT): Adjust to pass the required arguments.
2422 (yysymprint): Move higher to be visible from yy_reduce_print).
2423 (yyparse): Adjust.
2424 * tests/calc.at: Adjust the expected length of the traces.
2425
2426 2005-11-14 Akim Demaille <akim@epita.fr>
2427
2428 * data/glr.c (yy_reduce_print): The loop was quite wrong: type are
2429 from 1 to N, while values and location start at 0.
2430 (b4_rhs_location, b4_rhs_value): Add parens around $1 and $2.
2431
2432 2005-11-14 Akim Demaille <akim@epita.fr>
2433
2434 * data/glr.c (yy_reduce_print): Fix the $ number.
2435
2436 2005-11-14 Akim Demaille <akim@epita.fr>
2437
2438 "Use" parse parameters.
2439 * data/c.m4 (b4_parse_param_for, b4_parse_param_use): New.
2440 * data/glr.c, data/glr.cc: Use them.
2441 * data/glr.c (YYUSE): Have a C++ definition that supports
2442 non-pointer types.
2443
2444 2005-11-14 Akim Demaille <akim@epita.fr>
2445
2446 * data/glr.c (yyexpandGLRStack): Declare only if defined.
2447
2448 2005-11-14 Akim Demaille <akim@epita.fr>
2449
2450 * data/glr.cc: New.
2451 * data/m4sugar/m4sugar.m4 (m4_prepend): New.
2452
2453 2005-11-12 Akim Demaille <akim@epita.fr>
2454
2455 Let position and location be PODs.
2456 * data/location.cc (position::initialize, location::initialize): New.
2457 (position::position, location::location): Define only if
2458 b4_location_constructors is defined.
2459 * data/lalr1.cc (b4_location_constructors): Define it for backward
2460 compatibility.
2461 * doc/bison.texinfo (Initial Action Decl): Use initialize.
2462
2463 2005-11-12 Akim Demaille <akim@epita.fr>
2464
2465 * data/lalr1.cc: Move the body of the ctor and dtor into the
2466 parser file (instead of the header).
2467 Wrap the implementations in a "namespace yy".
2468
2469 2005-11-12 Akim Demaille <akim@epita.fr>
2470
2471 Have glr.c include its header file when created.
2472 * data/glr.c (b4_shared_declarations): New.
2473 Output them verbatim in the parser if !%defines, otherwise
2474 output then in the header file, and include it instead.
2475
2476 2005-11-11 Akim Demaille <akim@epita.fr>
2477
2478 * data/glr.c: Comment changes.
2479
2480 2005-11-11 Akim Demaille <akim@epita.fr>
2481
2482 When yydebug, report semantic and location values for reductions.
2483 * data/glr.c (yy_reduce_print): Report the semantic values and the
2484 locations.
2485 (YY_REDUCE_PRINT): Adjust.
2486 (yyglrReduce): Use them.
2487 (b4_rhs_value, b4_rhs_location): Remove m4_eval invocations.
2488 * data/c.m4 (b4_yysymprint_generate): Specify the const arguments.
2489 * tests/calc.at (_AT_CHECK_CALC_ERROR): Remove the reduction
2490 traces.
2491
2492 2005-11-10 Akim Demaille <akim@epita.fr>
2493
2494 * data/glr.c (yynewGLRStackItem, YY_RESERVE_GLRSTACK): New.
2495 (yyaddDeferredAction, yyglrShift, yyglrShiftDefer): Use them.
2496 (yyexpandGLRStack, YYRELOC): Define only when YYSTACKEXPANDABLE.
2497
2498 2005-11-09 Albert Chin-A-Young <china@thewrittenword.com>
2499
2500 * m4/cxx.m4, examples/Makefile.am: Don't build
2501 examples/calc++ if no C++ compiler is available. (trivial change)
2502
2503 2005-11-09 Akim Demaille <akim@epita.fr>
2504
2505 * src/scan-skel.l: Use a couple of asserts.
2506
2507 2005-11-03 Akim Demaille <akim@epita.fr>
2508
2509 In some (weird) cases, the final state number is incorrect.
2510 Reported by Alexandre Duret-Lutz.
2511 * src/LR0.c (state_list_append): Remove the computation of
2512 final_state.
2513 (save_reductions): Do it here.
2514 (get_state): Alpha conversion.
2515 (generate_states): Use a for loop.
2516 * src/gram.h (item_number_is_rule_number)
2517 (item_number_is_symbol_number): New.
2518 * src/state.c: Use assert.
2519 * src/system.h: Include assert.h.
2520 * tests/sets.at (Accept): New.
2521
2522 2005-10-30 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
2523
2524 * data/glr.c (yyfill): Adjust comment.
2525 (yyresolveAction): Initialize default location properly
2526 for empty right-hand sides.
2527 (yydoAction): Ditto.
2528 Add comment explaining apparently dead code.
2529 * tests/glr-regression.at
2530 (Incorrectly initialized location for empty right-hand side in GLR):
2531 New test.
2532
2533 2005-10-30 Paul Eggert <eggert@cs.ucla.edu>
2534
2535 * bootstrap (cleanup_gnulib): New function. Use it to clean up
2536 gnulib when interrupted. This fixes some race conditions and
2537 works around some portability problems (one noted by Paul
2538 Hilfinger).
2539
2540 2005-10-22 Akim <akim@epita.fr>
2541
2542 * Makefile.cfg: Adjust to config -> build-aux.
2543 Reported by twledo.
2544
2545 2005-10-21 Akim Demaille <akim@epita.fr>
2546
2547 * data/c.m4 (b4_yydestruct_generate, b4_yysymprint_generate): Pass
2548 the %parse-params.
2549 * data/glr.c (YY_SYMBOL_PRINT, yydestroyGLRState): Adjust.
2550 * data/yacc.c (b4_Pure_if): Rename as...
2551 (b4_yacc_pure_if): this.
2552 (YY_SYMBOL_PRINT, yyparse): Adjust.
2553 * doc/bison.texinfo: Formatting changes.
2554
2555 2005-10-21 Akim Demaille <akim@epita.fr>
2556
2557 Finish the transition config -> build-aux.
2558 * configure.ac, Makefile.am: Use build-aux.
2559 * config/prev-version, config/announce-gen, config/Makefile.am:
2560 Move to...
2561 * build-aux/prev-version, build-aux/announce-gen,
2562 * build-aux/Makefile.am: here.
2563
2564 2005-10-14 Akim Demaille <akim@epita.fr>
2565
2566 * examples/calc++/test: Use set -x only when VERBOSE.
2567
2568 2005-10-13 Paul Eggert <eggert@cs.ucla.edu>
2569
2570 * NEWS: Bison now warns if it finds a stray `$' or `@' in an action.
2571 * src/scan-gram.l (<SC_BRACED_CODE>[$@]): Implement this.
2572
2573 2005-10-13 Akim Demaille <akim@epita.fr>
2574
2575 * src/scan-skel.l: Output the base name parts of the parser and
2576 header file names.
2577 * tests/output.at (AT_CHECK_OUTPUT): Support subdirectories, and
2578 additional checks.
2579 Use this to exercise C++ outputs in subdirs.
2580 Reported by Oleg Smolsky.
2581
2582 2005-10-12 Paul Eggert <eggert@cs.ucla.edu>
2583
2584 * data/c.m4 (b4_c_function_def): Look at __C99_FUNC__, not at
2585 __STDC_VERSION__, as IBM cc 7.0 doesn't define the latter either.
2586 Problem reported by John P. Hartmann.
2587 * data/yacc.c (YYMODERN_C): Likewise. Don't define if the user has
2588 already defined it.
2589
2590 2005-10-12 Akim Demaille <akim@epita.fr>
2591
2592 * src/parse-gram.y (version_check): Exit 63 to please missing
2593 (stands for "version mismatch).
2594 * tests/input.at, doc/bison.texinfo: Adjust.
2595
2596 2005-10-10 Paul Eggert <eggert@cs.ucla.edu>
2597
2598 Work around portability problems with Visual Age C compiler
2599 (xlc and xlC_r) reported by John P. Hartmann.
2600 * data/location.cc (initial_column, initial_line): Remove.
2601 All uses replaced by 0 and 1.
2602 * src/scan-gram.l (gram_wrap): Redefine to avoid bug in flex 2.5.31
2603 that xlc complains about.
2604 * src/scan-skel.l (skel_wrap): Likewise.
2605 * data/c.m4 (b4_c_function_def): Look at __STDC_VERSION__ as well
2606 as __STDC__.
2607 * data/yacc.c (YYMODERN_C): New macro, which also looks at
2608 __STDC_VERSION__. Use it everywhere instead of looking at
2609 __STDC__ and __cplusplus.
2610
2611 2005-10-10 Akim Demaille <akim@epita.fr>
2612
2613 * examples/calc++/test: Be quiet unless VERBOSE.
2614
2615 2005-10-05 Paul Eggert <eggert@cs.ucla.edu>
2616
2617 * data/c.m4 (yydestruct, yysymprint):
2618 Use YYUSE instead of casting to void.
2619 * data/glr.c (YYUSE): New macro.
2620 (yyuserMerge, yyreportAmbiguity, yyreportSyntaxError):
2621 Use it instead of rolling our own.
2622 (YYLLOC_DEFAULT, YYCHK, YYDPRINTF, YY_SYMBOL_PRINT, YY_REDUCE_PRINT):
2623 (YYCHK1):
2624 Use /*CONSTCOND*/ to suppress lint warnings.
2625 * data/lalr1.cc (YYLLOC_DEFAULT, YY_SYMBOL_PRINT, YY_REDUCE_PRINT):
2626 (YY_STACK_PRINT): Use 'false' not '0'.
2627 (YYUSE): New macro.
2628 (yysymprint_, yydestruct_): Use it instead of rolling our own.
2629 * data/yacc.c (YYUSE): New macro.
2630 (YYCOPY, YYSTACK_RELOCATE, YYBACKUP, YYLLOC_DEFAULT):
2631 (YYDPRINTF, YY_SYMBOL_PRINT, YY_STACK_PRINT, YY_REDUCE_PRINT):
2632 (yyerrorlab): Use /*CONSTCOND*/ to suppress lint warnings.
2633
2634
2635 * data/m4sugar/m4sugar.m4 (_m4_map): New macro.
2636 (m4_map, m4_map_sep): Use it. Handle the empty list correctly.
2637
2638 2005-10-04 Paul Eggert <eggert@cs.ucla.edu>
2639
2640 Undo the parts of the unlocked-I/O change that substituted
2641 putc or puts for printf. This might hurt performance a bit,
2642 but some people prefer the printf style.
2643 * data/c.m4 (yysymprint): Prefer printf to puts and putc.
2644 * data/glr.c (YYFPUTC, YYFPUTS, YYDPUTS): Remove.
2645 All uses replaced by YYFPRINTF and YYDPRINTF.
2646 * data/yacc.c: Likewise.
2647 * lib/bitset.c (bitset_print): Likewise.
2648 * lib/bitsetv.c (bitsetv_dump, debug-bitsetv): Prefer printf to
2649 putc and puts.
2650 * lib/lbitset.c (debug_lbitset): Likewise.
2651 * src/closure.c (print_firsts, print_fderives): Likewise.
2652 * src/gram.c (grammar_dump): Likewise.
2653 * src/lalr.c (look_ahead_tokens_print): Likewise.
2654 * src/output.c (escaped_output): Likewise.
2655 (user_actions_output): Break apart two printfs.
2656 * src/parse-gram.y (%printer): Prefer printf to putc and puts.
2657 * src/reduce.c (reduce_print): Likewise.
2658 * src/state.c (state_rule_look_ahead_tokens_print): Likewise.
2659 * src/system.h: Include unlocked-io.h rathe than stdio.h.
2660
2661 * data/glr.c (yyuserMerge, yyreportAmbiguity, yyreportSyntaxError):
2662 Use assignments rather than casts-to-void to suppress
2663 unused-variable warnings. This pacifies 'lint'.
2664 * data/lalr1.cc (yysymprint_, yydestruct_): Use a call to suppress
2665 unused-variable warnings.
2666
2667 2005-10-03 Juan Manuel Guerrero <juan.guerrero@gmx.de>
2668
2669 * Makefile.am: DJGPP specific files added to EXTRA_DIST.
2670
2671 2005-10-02 Paul Eggert <eggert@cs.ucla.edu>
2672
2673 Use unlocked I/O for a minor performance improvement on hosts like
2674 GNU/Linux and Solaris that support unlocked I/O. The basic idea
2675 is to use the gnlib unlocked-io module, and to prefer putc and
2676 puts to printf when either will work (since the latter doesn't
2677 come in an unlocked flavor).
2678 * bootstrap (gnulib_modules): Add unlocked-io.
2679 * data/c.m4 (yysymprint): Prefer puts and putc to printf.
2680 * data/glr.c (YYFPUTC, YYFPUTS, YYDPUTS): New macros.
2681 Prefer them to YYFPRINTF and YYDPRINTF if either will do,
2682 and similarly for puts and putc and printf.
2683 * data/yacc.c: Likewise.
2684 * lib/bitset.c (bitset_print): Likewise.
2685 * lib/bitset.h [USE_UNLOCKED_IO]: Include unlocked-io.h.
2686 * lib/bitsetv.c (bitsetv_dump, debug-bitsetv): Prefer putc and puts
2687 to printf.
2688 * lib/lbitset.c (debug_lbitset): Likewise.
2689 * src/closure.c (print_firsts, print_fderives): Likewise.
2690 * src/gram.c (grammar_dump): Likewise.
2691 * src/lalr.c (look_ahead_tokens_print): Likewise.
2692 * src/output.c (escaped_output): Likewise.
2693 (user_actions_output): Coalesce two printfs.
2694 * src/parse-gram.y (%printer): Prefer putc and puts to printf.
2695 * src/reduce.c (reduce_print): Likewise.
2696 * src/state.c (state_rule_look_ahead_tokens_print): Likewise.
2697 * src/system.h: Include unlocked-io.h rather than stdio.h.
2698
2699 * data/lalr1.cc: Don't put an unmatched ' in a dnl comment, as
2700 this confuses xgettext.
2701
2702 2005-10-02 Akim Demaille <akim@epita.fr>
2703
2704 * bootstrap (gnulib_modules): Add strverscmp.
2705 * lib/.cvsignore: Add strverscmp.c, strverscmp.h.
2706 * m4/.cvsignore: Add strverscmp.m4.
2707 * src/parse-gram.y (%require): New token, new rule.
2708 (version_check): New.
2709 * src/scan-gram.l (%require): Adjust.
2710 * tests/input.at (AT_REQUIRE): New.
2711 Use it.
2712 * doc/bison.texinfo (Require Decl): New.
2713 (Calc++ Parser): Use %require.
2714
2715 2005-10-02 Akim Demaille <akim@epita.fr>
2716
2717 * data/location.cc: New.
2718
2719 2005-10-02 Paul Eggert <eggert@cs.ucla.edu>,
2720 Akim Demaille <akim@epita.fr>
2721
2722 Make sure -odir/foo.cc creates dir/location.hh etc.
2723 * src/files.h (spec_outfile, parser_file_name, spec_name_prefix)
2724 (spec_file_prefix, spec_verbose_file, spec_graph_file)
2725 (spec_defines_file): Now const.
2726 (dir_prefix): New.
2727 (short_base_name): Remove.
2728 * src/files.c: Adjust.
2729 (dirname.h): Include.
2730 (base_name): Don't prototype it.
2731 (finput): Remove, duplicates gram_in.
2732 (full_base_name, short_base_name): Replace by...
2733 (all_but_ext, all_but_tab_ext): these.
2734 (compute_base_names): Rename as...
2735 (compute_file_name_parts): this.
2736 Update to compute the new variables, including dir_prefix.
2737 Adjust dependencies.
2738 * src/output.c (prepare): Output them.
2739 * src/reader.c: Adjust to use gram_in, not finput.
2740 * src/scan-skel.l (@dir_prefix@): New.
2741
2742 2005-10-02 Juan Manuel Guerrero <juan.guerrero@gmx.de>
2743
2744 * lib/subpipe.c: New function end_of_output_subpipe() added
2745 to allow support for non-posix systems. This is a no-op function
2746 for posix systems.
2747
2748 * lib/subpipe.h: New function end_of_output_subpipe() added
2749 to allow support for non-posix systems. This is a no-op function
2750 for posix systems.
2751
2752 * src/output.c (output_skeleton): Use end_of_output_subpipe() to
2753 handle the lack of pipe/fork functionality on non-posix systems.
2754
2755 * djgpp/Makefile.maint: DJGPP specific file.
2756
2757 * djgpp/README.in: DJGPP specific file.
2758
2759 * djgpp/config.bat: DJGPP specific configuration file.
2760
2761 * djgpp/config.sed: DJGPP specific configuration file.
2762
2763 * djgpp/config.site: DJGPP specific configuration file.
2764
2765 * djgpp/config_h.sed: DJGPP specific configuration file.
2766
2767 * djgpp/subpipe.c: DJGPP specific replacement file for lib/subpipe.c.
2768
2769 * djgpp/subpipe.h: DJGPP specific replacement file for lib/subpipe.h.
2770
2771 2005-10-02 Akim Demaille <akim@epita.fr>
2772
2773 * data/location.cc: New, extract from...
2774 * data/lalr1.cc: here.
2775 (location.hh): Include it after the user prologue, in case the
2776 filename type is defined by the user.
2777 Forward declation location and position before the pre-prologue.
2778 (yyresult_): Rename as...
2779 (yyresult): this, it's a local variable, not an attribute.
2780 * data/Makefile.am (dist_pkgdata_DATA): Adjust.
2781
2782 2005-10-01 Akim Demaille <akim@epita.fr>
2783
2784 * examples/extexi: Restore the #line generation.
2785
2786 2005-09-30 Akim Demaille <akim@epita.fr>,
2787 Alexandre Duret-Lutz <adl@gnu.org>
2788
2789 Move the token type and YYSTYPE in the parser class.
2790 * data/lalr1.cc (stack.hh, location.hh): Include earlier.
2791 (parser::token): New, from the moved free definition of tokens.
2792 (parser::semantic_value): Now a full definition instead of an
2793 indirection to YYSTYPE.
2794 (b4_post_prologue): No longer included in the header file, but
2795 in the implementation file.
2796 * doc/bison.texi (C+ Language Interface): Update.
2797 * src/parse-gram.y: Support unary %define.
2798 * tests/actions.at: Define global_tokens_and_yystype for backward
2799 compatibility until we update the tests.
2800 * tests/calc.at: Idem.
2801 (first_line, first_column, last_line, last_column): Define for lalr1.cc
2802 to simplify the code.
2803
2804 2005-09-29 Paul Eggert <eggert@cs.ucla.edu>
2805
2806 Port to SunOS 4.1.4, which lacks strtoul and strerror.
2807 Ah, the good old days! Problem reported by Peter Klein.
2808 * bootstrap (gnulib_modules): Add strerror, strtoul.
2809 * lib/.cvsignore: Add strerror.c, strtol.c, strtoul.c
2810 * m4/.cvsignore: Add strerror.m4, strtol.m4, strtoul.m4.
2811
2812 2005-09-29 Akim Demaille <akim@epita.fr>
2813
2814 * data/c.m4 (b4_error_verbose_if): New.
2815 * data/lalr1.cc: Use it.
2816 (YYERROR_VERBOSE_IF): Remove.
2817 (yyn_, yylen_, yystate_, yynerrs_, yyerrstatus_): Remove as
2818 parser members, replaced by...
2819 (yyn, yylen, yystate, yynerss, yyerrstatus): these parser::parse
2820 local variables.
2821 (yysyntax_error_): Takes the state number as argument.
2822 (yyreduce_print_): Use the argument yyrule, not the former
2823 attribute yyn_.
2824
2825 2005-09-26 Paul Eggert <eggert@cs.ucla.edu>
2826
2827 * bootstrap (gnulib_modules): Add verify.
2828 * lib/.cvsignore: Add verify.h.
2829 * src/getargs.c: Use ARGMATCH_VERIFY rather than verify.
2830 * src/system.h (verify): Remove.
2831 Include verify.h instead.
2832 * src/tables.c (tables_generate): Use new API for 'verify'.
2833
2834 2005-09-21 Paul Eggert <eggert@cs.ucla.edu>
2835
2836 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Do not use
2837 local variables whose names begin with 'yy'.
2838 * tests/calc.at (_AT_DATA_CALC_Y): Likewise.
2839 Trivial changes from Joel E. Denny.
2840
2841 * bootstrap (gnulib_modules): Remove alloca. Bison doesn't need
2842 it itself.
2843 * src/main.c (main) [C_ALLOCA]: Don't flush alloca'ed memory; we
2844 don't use alloca any more.
2845
2846 * data/yacc.c [YYSTACK_USE_ALLOCA && !defined __GNUC__ && ! defined
2847 __BUILTIN_VA_ARG_INCR && ! defined _AIX && ! defined _MSC_VER &&
2848 defined _ALLOCA_H]: Don't include <stdlib.h>; not needed in this case.
2849 * tests/torture.at (Exploding the Stack Size with Alloca): Adjust
2850 to match yacc.c, to test more hosts.
2851
2852 2005-09-20 Paul Eggert <eggert@cs.ucla.edu>
2853
2854 * data/yacc.c (YYSIZE_T): Reindent to make it clearer. This
2855 doesn't affect behavior.
2856 (YYSTACK_ALLOC) [YYSTACK_USE_ALLOCA]: Improve support for
2857 Solaris, AIX, MSC.
2858 (_STDLIB_H): Renamed from YYINCLUDED_STDLIB_H. All uses changed.
2859 This works a bit better with glibc, if user code has already included
2860 stdlib.h.
2861 * doc/bison.texinfo (Bison Parser): Document that users can't
2862 arbitrarily use malloc and free for other purposes. Document
2863 that <alloca.h> and <malloc.h> might be included.
2864 (Table of Symbols): Under YYSTACK_USE_ALLOCA, Don't claim that the
2865 user must declare alloca.
2866
2867 * HACKING (release): Forwarn the Translation Project about
2868 stable releses.
2869
2870 2005-09-20 Akim Demaille <akim@epita.fr>
2871
2872 * data/glr.c: Use b4_token_enums, not b4_token_enums_defines.
2873
2874 2005-09-19 Paul Eggert <eggert@cs.ucla.edu>
2875
2876 * data/yacc.c (YYSIZE_MAXIMUM): New macro.
2877 (YYSTACK_ALLOC_MAXIMUM): Use it.
2878 (yysyntax_error): New function.
2879 (yyparse) [YYERROR_VERBOSE]: Don't leak memory indefinitely if
2880 multiple syntax errors are reported, and alloca is being used.
2881 Instead, reallocate buffers twice as big each time, so that
2882 we waste at most half the allocated memory. Start with a small
2883 (128-byte) buffer that will suffice in most cases anyway.
2884 Use yysyntax_error to do most of the work.
2885
2886 * doc/bison.texinfo (Error Reporting, Table of Symbols):
2887 yynerrs is the number of errors reported, not the number of
2888 errors encountered.
2889
2890 * tests/glr-regression.at (Duplicated user destructor for lookahead):
2891 Mark it as expected to fail.
2892 Cast result of malloc; problem reported by twlevo@xs4all.nl.
2893 * tests/actions.at, tests/calc.at, tests/glr-regression.at:
2894 Don't start user-code symbols with "yy", to avoid name space problems.
2895
2896 2005-09-19 Akim Demaille <akim@epita.fr>
2897
2898 Remove the traits, failed experiment.
2899 It never proved useful, and anyway because of the current
2900 definition, it was not possible to have several specialization of
2901 this traits, making it useless.
2902 * data/lalr1.cc (yy:traits): Remove.
2903 Inline its definitions in the parser class.
2904
2905 2005-09-19 Akim Demaille <akim@epita.fr>
2906
2907 * tests/atlocal.in (LIBS): Pass INTLLIBS to address failures on at
2908 least Mac OSX with a /usr/local install of gettext.
2909
2910 2005-09-19 Akim Demaille <akim@epita.fr>
2911
2912 * data/lalr1.cc (yyparse): Rename yylooka and yyilooka as yychar
2913 and yytoken for similarity with the other skeletons.
2914
2915 2005-09-19 Akim Demaille <akim@epita.fr>
2916
2917 * NEWS, configure.ac: update version number to 2.1a.
2918
2919 2005-09-16 Paul Eggert <eggert@cs.ucla.edu>
2920
2921 * NEWS: Version 2.1.
2922
2923 * NEWS: Remove notice of yytname change, since it was never in an
2924 official release.
2925 * data/glr.c (yydestroyGLRState): Rename local var to avoid shadowing
2926 diagnostic.
2927 * src/output.c (prepare): Likewise.
2928 * data/lalr1.cc (YYERROR_VERBOSE_IF): New macro.
2929 (yysyntax_error_): Use it to avoid GCC warning when YYERROR_VERBOSE
2930 is not defined. This is an awful hack, but it's enough for now.
2931 All callers changed.
2932 * tests/glr-regression-at (make_value): Args are const pointers now,
2933 to avoid GCC warning.
2934 (Duplicated user destructor for lookahead): New test. Currently
2935 skipped. It fails on my host but I'm not sure it'll always fail.
2936
2937 2005-09-16 Akim Demaille <akim@epita.fr>
2938
2939 * src/symtab.h (struct symbol): Declare the printer and destructor
2940 as const, to avoid accidental calls to free.
2941 (symbol_destructor_set, symbol_printer_set): Adjust.
2942 * src/symtab.c: Adjust.
2943
2944 2005-09-16 Akim Demaille <akim@epita.fr>
2945
2946 * data/c.m4 (b4_token_enums): New.
2947 (b4_token_defines): Rename as...
2948 (b4_token_enums_defines): this.
2949 (b4_token_defines): New, output only the #defines.
2950 * data/yacc.c, data/glr.c: Adjust.
2951 * data/lalr1.cc: Use b4_token_enums instead of b4_token_enums_defines.
2952 * data/c.m4 (b4_yydestruct_generate, b4_yysymprint_generate): Define
2953 as default values.
2954
2955 2005-09-16 Akim Demaille <akim@epita.fr>
2956
2957 * data/lalr1.cc (yylex_): Remove, inline its code.
2958 (yyreport_syntax_error_): Remove, replaced by...
2959 (yysyntax_error_): this which returns a string and leaves to the
2960 caller the call to the users' error function.
2961 (yylooka_, yyilooka_, yylval, yylloc, yyerror_range_, yyval, yyloc):
2962 Move from members of the parser object...
2963 (yylooka, yyilooka, yylval, yylloc, yyerror_range, yyval, yyloc):
2964 to local variables of the parse function.
2965
2966 2005-09-16 Akim Demaille <akim@epita.fr>
2967
2968 * doc/bison.texinfo (Calc++ Parser): Don't promote defining YYEOF
2969 since it's in Bison's name space.
2970
2971 2005-09-15 Paul Eggert <eggert@cs.ucla.edu>
2972
2973 * data/glr.c (yyresolveValue): Add default case to pacify
2974 gcc -Wswitch-default. Problem reported by twlevo@xs4all.nl.
2975
2976 * NEWS: Document when yyparse started to return 2.
2977 * doc/bison.texinfo (Parser Function): Document when yyparse
2978 returns 2.
2979
2980 * data/lalr1.cc: Revert part of previous change, as it's incompatible.
2981 (b4_filename_type): Renamed back from b4_file_name_type. All uses
2982 changed.
2983 (class position): file_name -> filename (reverting). All uses changed.
2984
2985 2005-09-14 Paul Eggert <eggert@cs.ucla.edu>
2986
2987 * examples/calc++/Makefile.am ($(calc_sources_generated)): Don't
2988 do anything if $@ exists. This reverts part of the 2005-07-07
2989 patch.
2990
2991 2005-09-11 Paul Eggert <eggert@cs.ucla.edu>
2992
2993 * Makefile.am (EXTRA_DIST): Do not distribute REFERENCES; it
2994 contains obsolete information and isn't worth distributing as a
2995 separate file anyway.
2996 * data/glr.c [defined YYSETJMP]: Don't include <setjmp.h>.
2997 (YYJMP_BUF, YYSETJMP, YYLONGJMP) [!defined YYSETJMP]: New macros.
2998 All uses of jmp_buf, setjmp, longjmp changed to use these instead.
2999 (yyparse): Abort if user code uses longjmp to throw an unexpected
3000 value.
3001
3002 2005-09-09 Paul Eggert <eggert@cs.ucla.edu>
3003
3004 * data/c.m4 (b4_identification): Define YYBISON_VERSION.
3005 Suggested by twlevo@xs4all.nl.
3006
3007 * data/glr.c (YYCHK1): Do not assume YYE is in range.
3008 This avoids a diagnostic from gcc -Wswitch-enum.
3009 Problem reported by twlevo@xs4all.nl.
3010
3011 * doc/bison.texinfo: Don't use "filename", as per GNU coding
3012 standards. Use "file name" or "file" or "name", depending on
3013 the context.
3014 (Invocation): The output of "bison hack/foo.y" goes to foo.tab.c,
3015 not to hack/foo.tab.c.
3016 (Calc++ Top Level): 2nd arg of main is not const.
3017 * data/glr.c: b4_filename -> b4_file_name.
3018 * data/lalr1.cc: Likewise. Also, b4_filename_type -> b4_file_name_type.
3019 All uses changed.
3020 (class position): filename -> file_name. All uses changed.
3021 * data/yacc.c: b4_filename -> b4_file_name.
3022 * lib/bitset.h: filename -> file_name in local vars.
3023 * lib/bitset_stats.c: Likewise.
3024 * src/files.c: Likewise.
3025 * src/scan-skel.l ("@output ".*\n): Likewise.
3026 * src/files.c (file_name_split): Renamed from filename_split.
3027 * src/muscle_tab.c (muscle_init): Output b4_file_name, not b4_filename.
3028
3029 2005-09-08 Paul Eggert <eggert@cs.ucla.edu>
3030
3031 * lib/.cvsignore: Add pipe-safer.c, stdio--.h, unistd--.h,
3032 to accommodate latest gnulib.
3033
3034 * tests/glr-regression.at (Duplicate representation of merged trees):
3035 Add casts to pacify g++. Problem reported by twlevo@xs4all.nl.
3036
3037 * bootstrap: Add comment as to why the AM_LANGINFO_CODESET hack is
3038 needed.
3039
3040 2005-08-26 Paul Eggert <eggert@cs.ucla.edu>
3041
3042 * data/glr.c (yydestroyGLRState): Renamed from yydestroyStackItem.
3043 All uses changed. Invoke user destructor after an error during a
3044 split parse (trivial change from Joel E. Denny).
3045
3046 * tests/glr-regression.at
3047 (User destructor after an error during a split parse): New test case.
3048 Problem reported by Joel E. Denny in:
3049 http://lists.gnu.org/archive/html/bison-patches/2005-08/msg00029.html
3050
3051 2005-08-25 Paul Eggert <eggert@cs.ucla.edu>
3052
3053 * README-cvs: Give URLs for recommended tools.
3054 Mention Gzip version problem, and bootstrapping issues.
3055 Remove troubleshooting section, as it's somewhat obsolete.
3056
3057 * bootstrap (no_cache): New var, to accommodate different wget
3058 variants. Use it instead of '-C off'. Problem reported by
3059 twlevo@xs4all.nl.
3060
3061 * data/glr.c (yydestroyStackItem): New function.
3062 (yyrecoverSyntaxError, yyreturn): Use it to improve quality of
3063 debugging information. Problem reported by Joel E. Denny.
3064
3065 2005-08-25 Akim Demaille <akim@epita.fr>
3066
3067 * tests/local.at (AT_COMPILE_CXX): Pass $LINKS too.
3068
3069 2005-08-24 Paul Eggert <eggert@cs.ucla.edu>
3070
3071 * data/glr.c (yyrecoverSyntaxError, yyreturn):
3072 Don't invoke destructor on unresolved entries.
3073 * tests/glr-regression.at
3074 (User destructor for unresolved GLR semantic value): New test case.
3075 Problem reported by Joel E. Denny in:
3076 http://lists.gnu.org/archive/html/bison-patches/2005-08/msg00016.html
3077
3078 2005-08-21 Paul Eggert <eggert@cs.ucla.edu>
3079
3080 * lib/.cvsignore: Remove realloc.c, strncasecmp.c, xstrdup.c.
3081 Add strnlen.c.
3082 * m4/.cvsignore: Remove codeset.m4, gettext.m4, lib-ld.m4,
3083 lib-prefix.m4, po.m4.
3084
3085 * data/glr.c (yyreturn): Use "Cleanup:" rather than "Error:"
3086 in yydestruct diagnostic, since it might not be an error.
3087 Problem reported by Joel Denny near end of
3088 <http://lists.gnu.org/archive/html/help-bison/2005-07/msg00040.html>.
3089 * data/lalr1.cc (yyerturn): Likewise.
3090 * data/yacc.c (yyreturn): Likewise.
3091 * tests/calc.at (_AT_CHECK_CALC_ERROR): Adjust to the above change.
3092
3093 * src/files.c: Remove obsolete FIXME comment.
3094
3095 * data/glr.c (YY_SYMBOL_PRINT): Append a newline, for consistency
3096 with the other templates, and to fix bogus run-on messages such
3097 as the one reported at the end of
3098 <http://lists.gnu.org/archive/html/help-bison/2005-07/msg00040.html>.
3099 All callers changed to avoid the newline.
3100 (yyprocessOneStack): Output two lines rather than one, to accommodate
3101 the above change. This changes the debug output format slightly.
3102
3103 * data/glr.c (yyresolveValue): Fix redundant parse tree problem
3104 reported by Joel E. Denny in
3105 <http://lists.gnu.org/archive/html/bison-patches/2005-08/msg00004.html>
3106 (trivial change).
3107 * tests/glr-regression.at (Duplicate representation of merged trees):
3108 New test, from Joel E. Denny in:
3109 <http://lists.gnu.org/archive/html/help-bison/2005-07/msg00013.html>.
3110 * THANKS: Add Joel E. Denny.
3111
3112 * configure.ac (AC_INIT): Bump to 2.0c.
3113
3114 2005-07-24 Paul Eggert <eggert@cs.ucla.edu>
3115
3116 * NEWS: Version 2.0b.
3117
3118 * Makefile.am (SUBDIRS): Put examples before tests, so that
3119 "make check" doesn't finish with "All 1 tests passed".
3120
3121 * tests/regression.at (Token definitions): Don't rely on
3122 AT_PARSER_CHECK for data that contains backslashes. It currently
3123 uses 'echo', and 'echo' isn't portable if its argument contains
3124 backslashes. Problem found on OpenBSD 3.4. Also, do not assume
3125 that the byte '\0xff' is not printable in the C locale; it is,
3126 under OpenBSD 3.4 (!). Luckily, '\0x80' through '\0x9e' are
3127 not printable, so use '\0x81' to test.
3128
3129 * data/glr.c (YYOPTIONAL_LOC): Define even if it's not a recent
3130 version of GCC, since the macro is used with non-GCC compilers.
3131
3132 Fix core dump reported by Pablo De Napoli in
3133 <http://lists.gnu.org/archive/html/bug-bison/2005-07/msg00053.html>.
3134 * tests/regression.at (Invalid inputs with {}): New test.
3135 * src/parse-gram.y (token_name): Translate type before using
3136 it as an index.
3137
3138 * data/glr.c (ATTRIBUTE_UNUSED): Remove, since it infringes on
3139 the user's name space. All uses changed to __attribute__
3140 ((__unused__)).
3141 (yyFail, yyMemoryExhausted, yyreportAmbiguity):
3142 Add __attribute__ ((__noreturn__)).
3143
3144 * etc/clcommit: Remove. We weren't using it, and it failed
3145 "make maintainer-distcheck".
3146 * Makefile.maint: Merge from coreutils.
3147 (CVS_LIST, CVS_LIST_EXCEPT): New macros.
3148 (syntax-check-rules): Change list of rules as described below.
3149 (sc_cast_of_alloca_return_value, sc_dd_max_sym_length):
3150 (sc_file_system, sc_obsolete_symbols, sc_prohibit_atoi_atof):
3151 (sc_prohibit_jm_in_m4, sc_root_tests, sc_tight_scope):
3152 (sc_trailing_space): New rules.
3153 (sc_xalloc_h_in_src): Remove.
3154 (sc_cast_of_argument_to_free, sc_cast_of_x_alloc_return_value):
3155 (sc_space_tab, sc_error_exit_success, sc_changelog):
3156 (sc_system_h_headers, sc_sun_os_names, sc_unmarked_diagnostics):
3157 (makefile-check, po-check, author_mark_check):
3158 (makefile_path_separator_check, copyright-check):
3159 Use grep -n, to make it easier to find violations.
3160 Use CVS_LIST and CVS_LIST_EXCEPT.
3161 (header_regexp, h_re): Remove.
3162 (dd_c): New macro.
3163 (sc_dd_max_sym_length, .re-list, news-date-check): New rules.
3164 (my-distcheck): Use more-modern GCC flags.
3165 (signatures, %.asc): Remove.
3166 (rel-files, announcement): Remove signatures.
3167 Restore old updating code, even though we don't use it, so
3168 that we're the same as coreutils.
3169 (alpha, beta, major): Depend on news-date-check.
3170 Make the upload commands.
3171
3172 * data/c.m4, data/lalr1.cc, data/yacc.c: Normalize white space.
3173 * lib/abitset.h, lib/bbitset.h, lib/bitset.h: Likewise.
3174 * lib/bitset_stats.c, lib/ebitset.h, lib/lbitset.c: Likewise.
3175 * lib/libitset.h, lib/timevar.c, lib/vbitset.h: Likewise.
3176 * src/Makefile.am, src/gram.c, src/muscle_tab.h: Likewise.
3177 * src/parse-gram.y, src/system.h, src/tables.c, src/vcg.c: Likewise.
3178 * src/vcg_defaults.h, tests/cxx-type.at, tests/existing.at: Likewise.
3179 * tests/sets.at: Likewise.
3180
3181 * data/m4sugar/m4sugar.m4: Sync from Autoconf, except that
3182 we comment out the Autoconf version number.
3183 * doc/bison.texinfo (Calc++ Scanner): Don't use atoi, as
3184 it's error-prone and "make maintainer-distcheck" rejects it.
3185
3186 * lib/subpipe.c: Include <fcntl.h> without checking for HAVE_FCNTL_H.
3187 Indent calls to "error" to pacify "make maintainer-distcheck",
3188 when the calls are not intended to be translated.
3189 * m4/subpipe.m4 (BISON_PREREQ_SUBPIPE): Don't check for fcntl.h.
3190
3191 * src/Makefile.am (DEFS): Use +=, to pacify
3192 "make maintainer-distcheck".
3193 (bison_SOURCES): Add scan-skel.h.
3194 (sc_tight_scope): New rule, from coreutils.
3195
3196 * src/files.c (src_extension, header_extension):
3197 Now static, not extern.
3198 * src/getargs.c (short_options): Likewise.
3199 * src/muscle_tab.c (muscle_table): Likewise.
3200 * src/parse-gram.y (current_class, current_type, current_prec):
3201 Likewise.
3202 * src/reader.c (grammar_end, previous_rule_end): Likewise.
3203 * src/getargs.h: Redo comments to pacify "make maintainer-distcheck".
3204 * src/main.c (main): Cast bindtextdomain and textdomain calls to
3205 void, to avoid warning when NLS is disabled.
3206 * src/output.c: Include scan-skel.h.
3207 (scan_skel): Remove decl, since scan-skel.h does this.
3208 (output_skeleton):
3209 Indent calls to "error" to pacify "make maintainer-distcheck".
3210 * src/print_graph.c: Don't include <obstack.h>, as system.h does this.
3211 * src/reader.h (gram_end, gram_lineno): New decls to pacify
3212 "make maintainer-distcheck".
3213 * src/scan-skel.l (skel_lex, skel_get_lineno, skel_get_in):
3214 (skel_get_out, skel_get_leng, skel_get_text, skel_set_lineno):
3215 (skel_set_in, skel_set_out, skel_get_debug, skel_set_debug):
3216 (skel_lex_destroy, scan_skel): Move these decls to...
3217 * src/scan-skel.h: New file.
3218 * src/uniqstr.c (uniqstr_assert):
3219 Indent calls to "error" to pacify "make maintainer-distcheck".
3220
3221 * tests/Makefile.am ($(srcdir)/package.m4): Use $(VAR),
3222 not @VAR@.
3223
3224 * tests/torture.at: Revamp to avoid misuse of atoi that
3225 "make maintainer-distcheck" complained about.
3226
3227 * examples/extexi (message): Don't print a message more than once,
3228 and omit line-number decoration that makes Emacs compile think
3229 that informative messages are worth worrying about.
3230
3231 2005-07-22 Paul Eggert <eggert@cs.ucla.edu>
3232
3233 * configure.ac: Update version number.
3234
3235 * Makefile.am (SUBDIRS): Add examples; somehow this got removed
3236 accidentally.
3237 * examples/calc++/calc++-parser.yy: Remove from CVS, as it's
3238 autogenerated by the maintainer.
3239 * examples/calc++/.cvsignore: Add *.yy.
3240
3241 * lib/bitset.c (bitset_alloc): Don't cast xcalloc result.
3242 * lib/bitset_stats.c (bitset_stats_init): Likewise.
3243 * lib/bitsetv.c (bitsetv_alloc): Likewise.
3244
3245 * po/POTFILES.in: Add lib/xalloc-die.c; remove lib/xmalloc.c.
3246
3247 * src/relation.c (relation_transpose): Rewrite to avoid bogus complaint
3248 from maintainer-distcheck about casting the argument of 'free'.
3249
3250 * NEWS: Mention recent yytname changes.
3251 * THANKS: Add Anthony Heading, twlevo@xs4all.nl.
3252
3253 * bootstrap: For translations that have not yet been upgraded to
3254 the new runtime-po domain, prime the pump by extracting the
3255 relevant strings from the obsolete translations. This code can be
3256 removed once the bison-runtime domain has been translated by each
3257 team.
3258
3259 * src/scan-gram.l (<SC_PRE_CODE>.): Don't double-quote token names,
3260 now that token names are already quoted.
3261
3262 Fix problem reported by Anthony Heading.
3263 * data/glr.c (YYTOKEN_TABLE): New macro.
3264 (yytname): Define if YYTOKEN_TABLE.
3265 * data/yacc.c (YYTOKEN_TABLE, yytname): Likewise.
3266 * data/lalr1.cc (YYTOKEN_TABLE, yytname_): Likewise.
3267 (YYERROR_VERBOSE): Define the same way the other skeletons do.
3268 * src/output.c (prepare_symbols): Output token_table_flag.
3269
3270 2005-07-21 Paul Eggert <eggert@cs.ucla.edu>
3271
3272 * data/glr.c (yyinitGLRStack, yyreturn): Don't call malloc
3273 again if the first call fails.
3274
3275 * data/glr.c (yytnamerr): New function.
3276 (yyreportSyntaxError): Use it to dequote most string literals.
3277 * data/lalr1.c (yytname_): Renamed from yyname_, for compatibility
3278 with other skeletons. All uses changed.
3279 (yytnameerr_): New function.
3280 (yyreport_syntax_error): Use it to dequote most string literals.
3281 * data/yacc.c (yytnamerr): New function.
3282 (yyerrlab): Use it to decode most string literals.
3283 * doc/bison.texinfo (Decl Summary, Calling Convention):
3284 Clarify quoting convention of yytname.
3285 * src/output.c (prepare_symbols): Quote all names. This undoes
3286 the 2005-04-17 change, which is now accomplished (mostly) via
3287 changes in the parsers as described above.
3288 * tests/regression.at (Token definitions, Web2c Actions):
3289 Undo most 2005-04-17 change here, too.
3290
3291 2005-07-20 Paul Eggert <eggert@cs.ucla.edu>
3292
3293 Fix more problems reported by twlevo@xs4all.nl.
3294 * tests/cxx-type.at: Don't pipe output of ./types through sed to
3295 remove trailing spaces. This loses the exit status of ./types,
3296 and isn't needed since ./types shouldn't be emitting trailing
3297 spaces.
3298 * data/glr.c (yyreturn): Don't pop stack if yyinitStateSet failed,
3299 as the stack isn't valid in that case.
3300
3301 * src/scan-gram.l (gram_get_lineno, gram_get_in, gram_get_out):
3302 (gram_get_leng, gram_get_text, gram_set_lineno, gram_set_in):
3303 (gram_set_out, gram_get_debug, gram_set_debug, gram_lex_destroy):
3304 Add declarations to pacify "gcc -Wmissing-prototypes" when flex 2.5.31
3305 is used.
3306 * src/scan-skel.l (skel_get_lineno, skel_get_in, skel_get_out):
3307 (skel_get_leng, skel_get_text, skel_set_lineno, skel_set_in):
3308 (skel_set_out, skel_get_debug, skel_set_debug, skel_lex_destroy):
3309 Likewise.
3310
3311 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Work even with
3312 overly-picky compilers that reject 'char *foo = "bar";'.
3313
3314 * src/symtab.c (SYMBOL_ATTR_PRINT, symbol_print): Direct output
3315 to FILE * parameter, not to stderr. This fixes a typo introduced
3316 in the 2005-07-12 change.
3317
3318 * lib/subpipe.c (create_subpipe): Rewrite slightly to avoid
3319 warnings from GCC 4.
3320
3321 * data/glr.c (yyexpandGLRStack, yyaddDeferredAction, yyexpandGLRStack):
3322 (yyglrShiftDefer, yysplitStack):
3323 Remove unused parameters b4_pure_formals. All uses changed.
3324 (yyglrShift): Remove unused parameters b4_user_formals.
3325 All uses changed.
3326 (yyglrReduce): Removed unused parameter yylocp. All uses changed.
3327
3328 2005-07-18 Paul Eggert <eggert@cs.ucla.edu>
3329
3330 Destructor cleanups and regularization among the three skeletons.
3331 * NEWS: Document the behavior changes.
3332 * data/glr.c (yyrecoverSyntaxError): Don't bother to pop the
3333 stack before failing, as the cleanup code will do it for us now.
3334 * data/lalr1.cc (yyerrlab): Likewise.
3335 * data/glr.c (yyparse): Pop everything off the stack before
3336 freeing it, so that destructors get called properly.
3337 * data/lalr1.cc (yyreturn): Likewise.
3338 * data/yacc.c (yyreturn): Pop and destroy the start symbol, too.
3339 This is more consistent.
3340 * doc/bison.texinfo (Destructor Decl): Mention more reasons
3341 why destructors might be called. 1.875 -> 2.1.
3342 (Destructor Decl, Decl Summary, Table of Symbols):
3343 Some English-language cleanups for %destructor.
3344 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
3345 Add output line for destructor of start symbol.
3346 * tests/calc.at (AT_CHECK_CALC): Add one to line counts,
3347 because of that same extra output line.
3348
3349 * NEWS: Document minor wording changes in diagnostics of
3350 Bison-generated parsers.
3351 * data/glr.c (yyMemoryExhausted): Renamed from yyStackOverflow.
3352 Remove unused formals. All uses changed.
3353 (yyreportAmbiguity): "ambiguity detected" -> "syntax is ambiguous".
3354 (yyparse): Rename yyoverflowlab to yyexhaustedlab.
3355 * data/yacc.c (yyparse): "parser stack overflow" -> "memory exhausted".
3356 Rename yyoverflowab to yyexhaustedlab.
3357 When memory exhaustion occurs during syntax-error reporting,
3358 report it separately rather than in a single diagnostic; this
3359 eases translation.
3360 * doc/bison.texinfo (Memory Management): Renamed from Stack Overflow.
3361 (Memory Exhausted): Renamed from Parser Stack Overflow.
3362 Revamp wording slightly to prefer "memory exhaustion".
3363 * tests/actions.at: "parser stack overflow" -> "memory exhausted".
3364
3365 * data/c.m4 (b4_yysymprint_generate): Use YYFPRINTF, not fprintf.
3366
3367 Add i18n support to the GLR skeleton. Partially fix the C++
3368 skeleton; a C++ expert needs to finish this. Remove debugging
3369 msgids; there's little point to having them translated, since they
3370 can be understood only by someone who can read the
3371 (English-language) source code.
3372
3373 Generate runtime-po/bison-runtime.pot automatically, so that we
3374 don't have to worry about garbage getting in that file. We'll
3375 make sure after the next official release that old msgids don't
3376 get lost. See
3377 <http://lists.gnu.org/archive/html/bison-patches/2005-07/msg00119.html>.
3378
3379 * runtime-po/Makefile.in.in, runtime-po/bison-runtime.pot: Remove.
3380 Now auto-generated.
3381 * PACKAGING: Don't claim that Gawk, GCC, Perl use this method yet.
3382 Fix typos in explanations of the runtime file.
3383 * bootstrap: Change gettext keyword from YYI18N to YY_.
3384 Use standard Makefile.in.in in runtime-po, since we'll arrange
3385 for backward-compatible bison-runtime.po files in a different way.
3386 * data/glr.c (YY_): New macro, from yacc.c.
3387 (yyuserAction, yyreportAmbiguity, yyreportSyntaxError, yyparse):
3388 Translate messages intended for users.
3389 (yyreportSyntaxError): Change "virtual memory" to "memory" to match
3390 the wording in the other skeletons. We don't know that the memory
3391 is virtual.
3392 * data/lalr1.cc (YY_): Renamed from _. All uses changed.
3393 Use same method that yacc.c uses.
3394 Don't translate debugging messages.
3395 (yy::yyreport_syntax_error): Put in a FIXME for the i18n stuff;
3396 it doesn't work (yet), and requires C++ expertise to fix.
3397 * data/yacc.c (YY_): Renamed from YY18N. All uses changed.
3398 Move defn to a more logical place, to be consistent with other
3399 skeletons.
3400 Don't translate debugging messages.
3401 Don't assume line numbers fit in unsigned int; use unsigned long fmts.
3402 * doc/bison.texinfo: Mention <libintl.h>. Change glibc cross reference
3403 to gettext cross reference. Add indexing terms. Mention YYENABLE_NLS.
3404 * runtime-po/POTFILES.in: Add data/glr.c, data/lalr1.cc.
3405
3406 Fix yyerror / yylex test glitches noted by twlevo@xs4all.nl.
3407 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Have yyerror return
3408 void, not int.
3409 * tests/glr-regression.at (Badly Collapsed GLR States):
3410 Likewise.
3411 (Improper handling of embedded actions and dollar(-N) in GLR parsers):
3412 yylex should return 0 at EOF rather than aborting.
3413
3414 Improve tests for stack overflow in GLR parser.
3415 Problem reported by twlevo@xs4all.nl.
3416 * data/glr.c (struct yyGLRStack): Remove yyerrflag member.
3417 All uses removed.
3418 (yyStackOverflow): Just longjmp, but with value 2 so that caller
3419 can handle the problem.
3420 (YYCHK1): Use goto (a la yacc.c) rather than setting a flag.
3421 (yyparse): New local variable yyresult to record the result.
3422 Use result of setjmp to set it, rather than storing itinto
3423 struct.
3424 (yyDone): Remove label.
3425 (yyacceptlab, yyabortlab, yyoverflowlab, yyreturn): New labels,
3426 to mimic yacc.c. Do not discard lookahead if it's EOF (possible
3427 if YYABORT is used).
3428 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Exit with
3429 yyparse status; put status > 1 into diagnostic.
3430 Check that status==2 works.
3431 * tests/calc.at, tests/cxx-type.at, tests/glr-regression.at:
3432 Use exit status 3 for failure to open (which shouldn't happen).
3433
3434 2005-07-17 Paul Eggert <eggert@cs.ucla.edu>
3435
3436 * tests/conflicts.at (%nonassoc and eof): Don't exit with status
3437 1 on syntax error; just let yyparse do its thing.
3438 * tests/glr-regression.at (Badly Collapsed GLR States): Likewise.
3439 * tests/torture.at (AT_DATA_STACK_TORTURE): Likewise.
3440 (Exploding the Stack Size with Alloca):
3441 (Exploding the Stack Size with Malloc):
3442 Expect exit status 2, not 1, since the parser is supposed to blow
3443 its stack. Problem reported by twlevo@xs4all.nl.
3444
3445 * data/glr.c (yyparse): Don't assume that the initial calls
3446 to YYMALLOC succeed; in that case, yyparse incorrectly returned 0.
3447 Print a stack-overflow message and fail instead.
3448 Initialize the line-number information before creating the stack,
3449 so that the stack-overflow message can report line zero safely.
3450
3451 2005-07-14 Paul Eggert <eggert@cs.ucla.edu>
3452
3453 Fix problems reported by twlevo@xs4all.nl.
3454 * data/glr.c (YYSTACKEXPANDABLE): Don't define if already defined.
3455 (yyuserMerge): Provide a default case if b4_mergers is empty.
3456 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Define YYSTACKEXPANDABLE.
3457 * tests/glr-regression.at
3458 (Improper handling of embedded actions and dollar(-N) in GLR parsers):
3459 Add casts to pacify C++ compilers.
3460 * tests/glr-regression.at (Improper merging of GLR delayed action
3461 sets): Declare yylex before using it.
3462 * tests/Makefile.am (maintainer-check-g++): Fix a stray
3463 $(GXX) that escaped the renaming of GXX to CXX. Remove bogus
3464 test for valgrind; valgrind is independent of g++.
3465 (maintainer-check-posix): Add _POSIX2_VERSION=200112, to check
3466 for compatibility with POSIX 1003.1-2001 (if running coreutils).
3467 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Port to stricter C++.
3468 Use a destructor, so that we can expand the stack. Change
3469 YYSTYPE to char * so that we can free it. Cast result of malloc.
3470
3471 2005-07-13 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
3472
3473 * data/glr.c (yyuserAction): Fix uninitialized variable that caused
3474 a valgrind failure. Problem reported by twlevo@xs4all.nl.
3475
3476 2005-07-13 Paul Eggert <eggert@cs.ucla.edu>
3477
3478 * PACKAGING: New file, suggested by Bruno Haible and taken from
3479 similar wording in gettext's PACKAGING file.
3480 * NEWS: Mention PACKAGING.
3481 * Makefile.am (EXTRA_DIST): Add PACKAGING.
3482
3483 2005-07-12 Paul Eggert <eggert@cs.ucla.edu>
3484
3485 * NEWS: Document recent i18n improvements.
3486 * bootstrap: Get runtime translations into runtime-po.
3487 Create runtime-po files automatically, if possible.
3488 * configure.ac: Invoke BISON_I18N, so that we eat our own dog food.
3489 * data/yacc.c: Rewrite inclusion of <libintl.h> so that ENABLE_NLS
3490 does not infringe on the user's name space.
3491 (YYENABLE_NLS): Renamed from ENABLE_BISON_NLS.
3492 * doc/bison.texinfo (Internationalization): Revamp the English
3493 and Texinfo syntax a bit, to try to make it clearer.
3494 (Bison Options, Option Cross Key): Mention --print-localedir.
3495 * m4/bison-i18n.m4 (BISON_I18N): Rename ENABLE_BISON_NLS to
3496 YYENABLE_NLS. Quote a bit more.
3497 * runtime-po/.cvsignore: New file.
3498 * runtime-po/Makefile.in.in (mostlyclean): Remove *.old.pot.
3499 * runtime-po/Rules-quot: Remove; now created by bootstrap.
3500 * runtime-po/quot.sed: Likewise.
3501 * runtime-po/boldquot.sed: Likewise.
3502 * runtime-po/en@quot.header: Likewise.
3503 * runtime-po/en@boldquot.header: Likewise.
3504 * runtime-po/insert-header.sin: Likewise.
3505 * runtime-po/remove-potcdate.sin: Likewise.
3506 * runtime-po/Makevars: Likewise.
3507 * runtime-po/LINGUAS: Likewise.
3508 * runtime-po/de.po: Likewise; we will rely on the translation project
3509 to maintain this, so "bootstrap" should get it.
3510 * src/getarg.c (PRINT_LOCALEDIR_OPTION): Let the C compiler determine
3511 its value.
3512 * src/main.c (main): Bind the bison-runtime domain, too.
3513
3514 2005-07-12 Bruno Haible <bruno@clisp.org>
3515
3516 * data/yacc.c: Include <libintl.h> when NLS is enabled.
3517 (YYI18N): Renamed from _. Use dgettext when NLS is enabled.
3518 * po/POTFILES.in: Remove autogenerated file src/parse-gram.c.
3519 * runtime-po: New directory.
3520 * runtime-po/Makefile.in.in: New file, copied from po/, with modified
3521 $(DOMAIN).pot-update rule, so that old messages are never dropped.
3522 * runtime-po/Rules-quot: New file, copied from po/.
3523 * runtime-po/quot.sed: Likewise.
3524 * runtime-po/boldquot.sed: Likewise.
3525 * runtime-po/en@quot.header: Likewise.
3526 * runtime-po/en@boldquot.header: Likewise.
3527 * runtime-po/insert-header.sin: Likewise.
3528 * runtime-po/remove-potcdate.sin: Likewise.
3529 * runtime-po/Makevars: New file.
3530 * runtime-po/POTFILES.in: New file.
3531 * runtime-po/LINGUAS: New file.
3532 * runtime-po/bison-runtime.pot: New file.
3533 * runtime-po/de.po: New file.
3534 * m4/bison.m4: New file.
3535 * Makefile.am (SUBDIRS): Add runtime-po.
3536 (aclocaldir, aclocal_DATA): New variables.
3537 * configure.ac: Add AC_CONFIG_FILES of runtime-po/Makefile.in.
3538 Define aclocaldir.
3539 * src/getargs.c (usage): Document --print-localedir option.
3540 (PRINT_LOCALEDIR_OPTION): New enum item.
3541 (long_options): Add --print-localedir option.
3542 (getargs): Handle --print-localedir option.
3543 * doc/bison.texinfo (Bison Parser): Remove paragraph about _().
3544 (Internationalization): New section.
3545
3546 2005-07-12 Akim Demaille <akim@epita.fr>
3547
3548 * src/symtab.h, src/symtab.c (symbol_print): Swap the arguments,
3549 for consistency with the rest of the code.
3550 * src/symlist.h, src/symlist.c (symbol_list_print): Ditto.
3551 Add separators.
3552
3553 2005-07-12 Akim Demaille <akim@epita.fr>
3554
3555 * src/parse-gram.y: Use %printer instead of YYPRINT.
3556
3557 2005-07-12 Akim Demaille <akim@epita.fr>
3558
3559 * src/symtab.h, src/symtab.c (symbol_print): New.
3560 * src/symlist.h, src/symlist.c (symbol_list_print): New.
3561 * src/symlist.c (symbol_list_n_type_name_get): Report the culprit.
3562
3563 2005-07-12 Akim Demaille <akim@epita.fr>
3564
3565 * data/glr.c (b4_syncline): Fix (swap) the definitions of
3566 b4_at_dollar and b4_dollar_dollar.
3567
3568 2005-07-11 Paul Eggert <eggert@cs.ucla.edu>
3569
3570 * doc/bison.texinfo (Mystery Conflicts): Add reference to DeRemer
3571 and Pennello's paper.
3572
3573 2005-07-09 Paul Eggert <eggert@cs.ucla.edu>
3574
3575 * data/yacc.c (yyparse): Undo previous patch. Instead,
3576 set yylsp[0] and yyvsp[0] only if the initial action
3577 sets yylloc and yylval, respectively.
3578
3579 * data/yacc.c (yyparse): In the initial action, set
3580 yylsp[0] and yyvsp[0] rather than yylloc and yylval.
3581 This avoids the use of undefined variables if the initial
3582 action does not set yylloc and/or yylval.
3583
3584 2005-07-07 Paul Eggert <eggert@cs.ucla.edu>
3585
3586 * examples/calc++/calc++-driver.cc, examples/calc++/calc++-driver.hh:
3587 * examples/calc++/calc++-scanner.ll, examples/calc++/calc++.cc:
3588 Remove from CVS. These files are automatically generated.
3589 * examples/extexi: Clarify that this file is now part of Bison,
3590 not GNU M4, and that it works with any POSIX-compatible Awk.
3591 * examples/calc++/Makefile.am (run_extexi): Remove; not used.
3592 ($(calc_extracted)): Renamed from $(calc_sources_extracted),
3593 so that we also get calc++-parser.yy. Geneate it.
3594 Use $(AWK), not gawk, since any conforming Awk will do.
3595 Put comment before action, since older 'make' can't handle comment
3596 in action.
3597 $(BUILT_SOURCES): List all built sources, not just some of them.
3598 $(MAINTAINERCLEANFILES): Remove *.stamp, and all built sources.
3599 $($(srcdir)/calc++-parser.stamp): Work even if POSIXLY_CORRECT.
3600 $($(calc_sources_generated)): Remove unnecessary test for existence
3601 of target. (This had a shell syntax error anyway; a stray "x".)
3602 (calc_extracted): List $(srcdir)/calc++-parser.yy, not
3603 calc++-parser.yy.
3604 * examples/.cvsignore, examples/calc++/.cvsignore: New files.
3605
3606 * bootstrap (gnulib_modules): Add gettext, now that it's no longer
3607 implied by the other modules.
3608
3609 2005-07-06 Akim Demaille <akim@epita.fr>
3610
3611 Bind examples/calc++ to the package.
3612 * examples/calc++/Makefile: Remove, replaced by...
3613 * examples/calc++/Makefile.am: ... this new file.
3614 * examples/calc++/test: Remove input.
3615 * examples/calc++/compile: Remove.
3616 * examples/Makefile.am: New.
3617 * configure.ac, Makefile.am: Adjust.
3618 * doc/Makefile.am (clean-local): New, for more recent texi2dvis.
3619
3620 2005-07-05 Paul Eggert <eggert@cs.ucla.edu>
3621
3622 * data/glr.c (yyFail): Drastically simplify; since the format argument
3623 never had any % directives, we can simply pass it to yyerror.
3624 (yyparse): Use "t a; a=b;" rather than "t a = b;" when a will
3625 be modified later, as that is the usual style in glr.c.
3626 Problems reported by Paul Hilfinger.
3627
3628 Rewrite GLR parser to catch more buffer overrun, storage exhaustion,
3629 and size overflow errors.
3630 * data/glr.c: Include <stdio.h> etc. after user prolog, not before,
3631 in case the user prolog sets feature-test macros like _GNU_SOURCE.
3632 (YYSIZEMAX): New macro.
3633 (yystpcpy): New function, taken from yacc.c.
3634 (struct yyGLRStack.yyspaceLeft): Now size_t, not int.
3635 (yyinitGLRStack, yyfreeGLRstack): Remove unnecessary forward decls,
3636 so that we don't have to maintain their signatures.
3637 (yyFail): Check for buffer overflow, by using vsnprintf rather
3638 than vsprintf. Allocate a bigger buffer if possible.
3639 Report an error if buffer allocation fails.
3640 (yyStackOverflow): New function.
3641 (yyinitStateSet, yyinitGLRStack): Return a boolean indicating whether
3642 the initialization was successful. It might fail if storage was
3643 exhausted.
3644 (yyexpandGLRStack): Add more checks for storage allocation failure.
3645 Use yyStackOverflow to report failures.
3646 (yymarkStackDeleted, yyglrShift, yyglrShiftDefer, yydoAction):
3647 (yysplitStack, yyprocessOneStack, yyparse, yypstack):
3648 Don't assume stack number fits in int.
3649 (yysplitStack): Check for storage allocation failure.
3650 (yysplitStack, yyprocessOneStack): Add pure_formals, so that we
3651 can print diagnostics on storage allocation failure. All callers
3652 changed.
3653 (yyresolveValue): Use yybool for boolean.
3654 (yyreportSyntaxError): Check for size-calculation overflow.
3655 This code is taken from yacc.c.
3656 (yyparse): Check for storage allocation errors when allocating
3657 the initial stack.
3658
3659 2005-07-05 Akim Demaille <akim@epita.fr>
3660
3661 Extract calc++ from the documentation.
3662 * doc/bison.texinfo (Calc++): Add the extraction marks.
3663 * examples/extexi: New, from the aborted GNU Programming 2E.
3664 Separate the different paragraph of a file with empty lines.
3665 * examples/Makefile: Use it to extract the whole calc++ example.
3666
3667 2005-06-24 Akim Demaille <akim@epita.fr>
3668
3669 * doc/bison.texinfo (C++ Parser Interface): Use defcv to define
3670 class typedefs.
3671
3672 2005-06-22 Akim Demaille <akim@epita.fr>
3673
3674 * doc/bison.texinfo (C++ Language Interface): First stab.
3675 (C++ Parsers): Remove.
3676
3677 2005-06-22 Akim Demaille <akim@epita.fr>
3678
3679 * data/lalr1.cc (yylex_): Honor %lex-param.
3680
3681 2005-06-22 Akim Demaille <akim@epita.fr>
3682
3683 Start a set of simple examples.
3684 * examples/calc++/Makefile, examples/calc++/calc++-driver.cc,
3685 * examples/calc++/calc++-driver.hh,
3686 * examples/calc++/calc++-parser.yy,
3687 * examples/calc++/calc++-scanner.ll, examples/calc++/calc++.cc,
3688 * examples/calc++/compile, examples/calc++/test: New.
3689
3690 2005-06-09 Paul Eggert <eggert@cs.ucla.edu>
3691
3692 * data/yacc.c (malloc, free) [defined __cplusplus]: Wrap inside
3693 extern "C" {}. This fixes a problem reported by Paul Hilfinger,
3694 which stems from the 2005-05-27 patch.
3695
3696 2005-06-06 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
3697
3698 * data/glr.c: Modify treatment of unused parameters to permit use
3699 of g++ (which doesn't allow __attribute__ ((unused)) for parameters).
3700
3701 2005-05-30 Paul Eggert <eggert@cs.ucla.edu>
3702
3703 Fix infringement on user name space reported by Janos Zoltan Szabo.
3704 * data/yacc.c (yyparse): strlen -> yystrlen.
3705
3706 2005-05-30 Akim Demaille <akim@epita.fr>
3707
3708 * data/lalr1.cc (_): New.
3709 Translate the various messages.
3710
3711 2005-05-27 Paul Eggert <eggert@cs.ucla.edu>
3712
3713 Fix infringement on user name space reported by Bruno Haible.
3714 * data/yacc.c (YYSIZE_T): Define first, so that later decls can use it.
3715 Prefer GCC's __SIZE_TYPE__ if available, so that we don't infringe on
3716 the user's name space.
3717 (alloca): Include <stdlib.h> to get it, if it's not built in.
3718 (YYMALLOC, YYFREE): Define only if needed.
3719 (malloc, free): Declare, but only if needed, as this infringes on
3720 the user name space.
3721
3722 2005-05-25 Paul Eggert <eggert@cs.ucla.edu>
3723
3724 Fix BeOS, FreeBSD, MacOS porting problems reported by Bruno Haible.
3725 * lib/bitset.c (bitset_print): Don't assume size_t can be printed
3726 with %d format.
3727 * lib/ebitset.c (min, max): Undef before defining.
3728 * lib/vbitset.c (min, max): Likewise.
3729 * lib/subpipe.c (create_subpipe): Save local variables in case
3730 vfork clobbers them.
3731
3732 2005-05-24 Bruno Haible <bruno@clisp.org>
3733
3734 * tests/synclines.at (AT_SYNCLINES_COMPILE): Add support for the
3735 error message syntax used by gcc-4.0.
3736
3737 2005-05-23 Paul Eggert <eggert@cs.ucla.edu>
3738
3739 * README: Mention m4 1.4.3. Remove obsolete advice about
3740 Sun Forte Developer 6 update 2, VMS, and MS-DOS.
3741
3742 * bootstrap: Remove workaround for problem I encountered with
3743 gettext 0.14.1; it seems to be fixed now.
3744
3745 2005-05-22 Paul Eggert <eggert@cs.ucla.edu>
3746
3747 * NEWS: Version 2.0a.
3748
3749 * src/files.c: Include "stdio-safer.h"; this fixes a typo in
3750 the previous change.
3751
3752 Various maintainer cleanups.
3753 * .cvsignore: Add a.exe, a.out, b.out,, conf[0-9]*, confdefs*,
3754 conftest*, for benefit of CVS commands run at the same time as
3755 "configure". Add build-aux, since "bootstrap" now creates it and
3756 its subfiles.
3757 * Makefile.cfg (move_if_change): Remove.
3758 * Makefile.maint: Remove the update stuff; we now use "bootstrap".
3759 (ftp-gnu, www-gnu, move_if_change, local_updates, update):
3760 (po_repo, do-po-update, po-update, wget_files, get-targets):
3761 (config.guess-url_prefix, config.sub-url_prefix):
3762 (ansi2knr.c-url_prefix, texinfo.tex-url_prefix):
3763 (standards.texi-url_prefix, make-stds.texi-url_prefix, taget, url):
3764 ($(get-targets), cvs-files, automake_repo, wget-update, cvs-update):
3765 Remove.
3766 * configure.ac (AC_CONFIG_AUX_DIR): Change from config to build-aux;
3767 this is now the recommended name.
3768 * config/.cvsignore: Remove config.guess, config.rpath, config.sub,
3769 depcomp, install-sh, mdate-sh, missing, mkinstalldirs, texinfo.tex,
3770 ylwrap. These files now go into build-aux.
3771 * config/move-if-change: Remove.
3772 * config/prev-version.txt: Bump from 1.75 to 2.0.
3773
3774 * bootstrap: Add stdio-safer, unistd-safer modules.
3775 Remove m4/glibc2.m4 (introduced by latest gnulib, but
3776 we don't need it).
3777 * lib/.cvsignore: Add dup-safer.c, fd-safer.c,
3778 fopen-safer.c, stdio-safer.h, unistd-safer.h.
3779 * lib/subpipe.c: Include "unistd-safer.h".
3780 (create_subpipe): Make sure all the newly-created
3781 file descriptors are > 2, so that diagnostics don't
3782 get sent down them (which might cause Bison to hang, in theory).
3783 * m4/.cvsignore: Add stdio-safer.m4, unistd-safer.m4.
3784 * src/files.c (xfopen): Use fopen_safer, not fopen.
3785
3786 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Port
3787 yesterday's yacc.c fix.
3788
3789 2005-05-21 Paul Eggert <eggert@cs.ucla.edu>
3790
3791 * data/glr.c, data/lalr1.cc: Update copyright date.
3792
3793 Fix a destructor bug reported by Wolfgang Spraul in
3794 <http://lists.gnu.org/archive/html/bug-bison/2005-05/msg00042.html>.
3795 * data/yacc.c (yyabortlab): Don't call destructor, and
3796 don't set yychar to EMPTY.
3797 (yyoverflowlab): Don't call destructor.
3798 (yyreturn): Call destructor, if yychar is neither YYEOF nor YYEMPTY.
3799 * tests/calc.at (AT_CHECK_CALC): Expect one fewer output lines,
3800 since we no longer output the message "discarding lookahead token
3801 end of input ()".
3802
3803 2005-05-20 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
3804
3805 * data/glr.c (YY_SYMBOL_PRINT): Don't print newline at end to
3806 fix a small glitch in debugging output.
3807 (yyprocessOneStack, yyrecoverSyntaxError, yyparse): Print newline
3808 after YY_SYMBOL_PRINT where needed.
3809
3810 (struct yyGLRState): Add some comments.
3811 (struct yySemanticOption): Add some comments.
3812 (union yyGLRStackItem): Add comment.
3813
3814 (yymergeOptionSets): Correct this to properly perform the union,
3815 avoiding infinite reported by Michael Rosien.
3816 Update comment.
3817
3818 * tests/glr-regression.at: Add test for GLR merging error reported
3819 by M. Rosien.
3820
3821 2005-05-13 Paul Eggert <eggert@cs.ucla.edu>
3822
3823 * COPYING, ChangeLog, GNUmakefile, HACKING, Makefile.am,
3824 Makefile.cfg, Makefile.maint, NEWS, README, README-alpha,
3825 README-cvs, TODO, bootstrap, configure.ac, data/Makefile.am,
3826 data/README, data/c.m4, data/glr.c, data/lalr1.cc, data/yacc.c,
3827 data/m4sugar/m4sugar.m4, doc/Makefile.am, doc/bison.texinfo,
3828 doc/fdl.texi, doc/gpl.texi, doc/refcard.tex, lib/Makefile.am,
3829 lib/abitset.c, lib/abitset.h, lib/bbitset.h, lib/bitset.c,
3830 lib/bitset.h, lib/bitset_stats.c, lib/bitset_stats.h,
3831 lib/bitsetv-print.c, lib/bitsetv-print.h, lib/bitsetv.c,
3832 lib/bitsetv.h, lib/ebitset.c, lib/ebitset.h, lib/get-errno.c,
3833 lib/get-errno.h, lib/lbitset.c, lib/lbitset.h, lib/libiberty.h,
3834 lib/main.c, lib/subpipe.c, lib/subpipe.h, lib/timevar.c,
3835 lib/timevar.def, lib/timevar.h, lib/vbitset.c, lib/vbitset.h,
3836 lib/yyerror.c, m4/cxx.m4, m4/m4.m4, m4/subpipe.m4, m4/timevar.m4,
3837 m4/warning.m4, src/LR0.c, src/LR0.h, src/Makefile.am, src/assoc.c,
3838 src/assoc.h, src/closure.c, src/closure.h, src/complain.c,
3839 src/complain.h, src/conflicts.c, src/conflicts.h, src/derives.c,
3840 src/derives.h, src/files.c, src/files.h, src/getargs.c,
3841 src/getargs.h, src/gram.c, src/gram.h, src/lalr.c, src/lalr.h,
3842 src/location.c, src/location.h, src/main.c, src/muscle_tab.c,
3843 src/muscle_tab.h, src/nullable.c, src/nullable.h, src/output.c,
3844 src/output.h, src/parse-gram.c, src/parse-gram.h,
3845 src/parse-gram.y, src/print.c, src/print.h, src/print_graph.c,
3846 src/print_graph.h, src/reader.c, src/reader.h, src/reduce.c,
3847 src/reduce.h, src/relation.c, src/relation.h, src/scan-gram.l,
3848 src/scan-skel.l, src/state.c, src/state.h, src/symlist.c,
3849 src/symlist.h, src/symtab.c, src/symtab.h, src/system.h,
3850 src/tables.c, src/tables.h, src/uniqstr.c, src/uniqstr.h,
3851 src/vcg.c, src/vcg.h, src/vcg_defaults.h, tests/Makefile.am,
3852 tests/actions.at, tests/c++.at, tests/calc.at, tests/conflicts.at,
3853 tests/cxx-type.at, tests/existing.at, tests/glr-regression.at,
3854 tests/headers.at, tests/input.at, tests/local.at, tests/output.at,
3855 tests/reduce.at, tests/regression.at, tests/sets.at,
3856 tests/synclines.at, tests/testsuite.at, tests/torture.at:
3857 Update FSF postal mail address.
3858
3859 2005-05-11 Paul Eggert <eggert@cs.ucla.edu>
3860
3861 * tests/local.at (AT_COMPILE_CXX): Treat LDFLAGS like AT_COMPILE does.
3862 Problem reported by Ralf Menzel.
3863
3864 2005-05-01 Paul Eggert <eggert@cs.ucla.edu>
3865
3866 * tests/actions.at: Test that stack overflow invokes destructors.
3867 From Marcus Holland-Moritz.
3868 * data/yacc.c (yyerrlab): Move the code that destroys the stack
3869 from here....
3870 (yyreturn): to here. That way, destructors are called properly
3871 even if the stack overflows, or the user calls YYACCEPT or
3872 YYABORT. Stack-overflow problem reported by Marcus Holland-Moritz.
3873 (yyoverflowlab): Destroy the lookahead.
3874
3875 2005-04-24 Paul Eggert <eggert@cs.ucla.edu>
3876
3877 * data/yacc.c (YYSTACK_ALLOC_MAXIMUM): Add more-descriptive comment.
3878
3879 2005-04-17 Paul Eggert <eggert@cs.ucla.edu>
3880
3881 * NEWS: Bison-generated C parsers no longer quote literal strings
3882 associated with tokens.
3883 * src/output.c (prepare_symbols): Don't escape strings,
3884 since users don't want to see C escapes.
3885 * tests/calc.at (AT_CHECK_CALC): Adjust to lack of quotes
3886 in diagnostics.
3887 * tests/input.at (Torturing the Scanner): Likewise.
3888 * tests/regression.at (Token definitions, Web2c Actions): Likewise.
3889
3890 2005-04-16 Paul Eggert <eggert@cs.ucla.edu>
3891
3892 * tests/torture.at (AT_INCREASE_DATA_SIZE): Skip the test if
3893 the data size is known to be too small and we can't increase it.
3894 This works around an HP-UX 11.00 glitch reported by Andrew Benham.
3895
3896 2005-04-15 Paul Eggert <eggert@cs.ucla.edu>
3897
3898 * src/parse-gram.y: Include quotearg.h.
3899 (string_as_id): Quote $1 before using it as a key, since the
3900 lexer no longer quotes it for us.
3901 (string_content): Don't strip quotes, since lexer no longer
3902 quotes it for us.
3903 * src/scan-gram.l: Include quotearg.h.
3904 ("\""): Omit quote.
3905 ("'"<SC_ESCAPED_CHARACTER>): Quote symbol before using it as
3906 a key, since the rest of the lexer doesn't quote it.
3907 * src/symtab.c (symbol_get): Don't quote symbol; caller does it now.
3908 * tests/regression.at (Token definitions): Check for backslashes
3909 in token strings.
3910
3911 * data/yacc.c (YYSTACK_ALLOC_MAXIMUM): New macro.
3912 (YYSIZE_T): Define to unsigned long int when using an older compiler.
3913 (yyparse): Revamp code to generate long syntax error message, to
3914 make it easier to translate, and to avoid problems with arithmetic
3915 overflow. Change "virtual memory" to "memory" in diagnostic, since
3916 we don't know whether the memory is virtual.
3917
3918 2005-04-13 Paul Eggert <eggert@cs.ucla.edu>
3919
3920 * NEWS: Bison-generated C parsers now use the _ macro to
3921 translate strings.
3922 * data/yacc.c (_) [!defined _]: New macro.
3923 All English strings wrapped inside this macro.
3924 * doc/bison.texinfo (Bison Parser): Document _.
3925 * po/POTFILES.in: Include src/parse-gram.c, since it now
3926 includes translateable strings that parse-gram.y doesn't.
3927
3928 2005-04-12 Paul Eggert <eggert@cs.ucla.edu>
3929
3930 * src/symtab.c (symbol_make_alias): Call symbol_type_set,
3931 reverting the 2004-10-11 change to this function.
3932 (symbol_check_alias_consistency): Don't call symbol_type_set
3933 if the type name is already correct.
3934 * tests/input.at (Typed symbol aliases): New test, from Tim Van Holder.
3935
3936 2005-03-25 Paul Eggert <eggert@cs.ucla.edu>
3937
3938 * tests/regression.at (Token definitions): Don't use a token named
3939 c, as that generates a "#define c ..." that runs afoul of buggy
3940 stdlib.h that uses the identifier c as a member of struct
3941 drand48_data. Problem reported by Horst Wente.
3942
3943 2005-03-21 Paul Eggert <eggert@cs.ucla.edu>
3944
3945 * bootstrap: Change translation URL from
3946 http://www2.iro.umontreal.ca/~gnutra/po/maint/bison/ to
3947 http://www.iro.umontreal.ca/translation/maint/bison/ to avoid
3948 redirection glitches. Problem reported by twlevo@xs4all.nl.
3949
3950 2005-03-20 Paul Eggert <eggert@cs.ucla.edu>
3951
3952 * tests/local.at (AT_COMPILE, AT_COMPILE_CXX): Don't put options
3953 after operands; POSIX says this isn't portable for the c99 command.
3954
3955 2005-03-18 Paul Eggert <eggert@cs.ucla.edu>
3956
3957 * tests/glr-regression.at (glr-regr2a.y): Try to dump core
3958 immediately if a data overrun has occurred; this may help us track
3959 down what may be a spurious failure on MacOS.
3960
3961 2005-03-17 Paul Eggert <eggert@cs.ucla.edu>
3962
3963 Respond to problems reported by twlevo@xs4all.nl.
3964
3965 * bootstrap: Use "trap - 0" rather than the unportable "trap 0".
3966
3967 * src/vcg.h: Comment fix.
3968 * src/vcg_defaults.h: Parenthesize macro bodies to make them safe.
3969 (G_CMAX): Change to -1 instead of INT_MAX.
3970
3971 * data/yacc.c (yyparse): Omit spaces before #line.
3972
3973 2005-03-15 Paul Eggert <eggert@cs.ucla.edu>
3974
3975 * src/tables.c (state_number_to_vector_number): Put it inside an
3976 "#if 0", since it's not currently used. Problem reported by
3977 Roland McGrath.
3978
3979 2005-03-06 Paul Eggert <eggert@cs.ucla.edu>
3980
3981 * src/output.c (escaped_output): Renamed from
3982 escaped_file_name_output, since we now use it for symbol tags as
3983 well. All uses changed.
3984 (symbol_destructors_output, symbol_printers_output):
3985 Escape symbol tags too.
3986 Problem reported by Matyas Forstner in
3987 <http://lists.gnu.org/archive/html/bug-bison/2005-03/msg00009.html>.
3988
3989 * src/muscle_tab.c (muscle_code_grow): Don't quote numbers; it's
3990 not needed.
3991 * src/output.c (user_actions_output, token_definitions_output,
3992 symbol_destructors_output, symbol_printers_output): Likewise.
3993 * src/reader.c (prologue_augment): Likewise.
3994 * src/scan-gram.l (handle_action_dollar, handle_action_at): Likewise.
3995
3996 * src/vcg.c (output_edge): Don't quote linestyle arg.
3997 Problem reported by twlevo@xs4all.nl.
3998
3999 2005-02-28 Paul Eggert <eggert@cs.ucla.edu>
4000
4001 * doc/bison.texinfo (Semantic Tokens): Fix scoping problem in
4002 example, reported by Derek M Jones. Also, make the example even
4003 more outrageous, to better illustrate how bad the problem is.
4004
4005 2005-02-24 Paul Eggert <eggert@cs.ucla.edu>
4006
4007 * doc/bison.texinfo (Mfcalc Symtab): Correct the prototype for
4008 putsym. Typo reported by Sebastian Piping.
4009
4010 2005-02-23 Paul Eggert <eggert@cs.ucla.edu>
4011
4012 * doc/bison.texinfo (Language and Grammar): some -> same
4013 (Epilogue): int he -> in the
4014 Typos reported by Sebastian Piping via Justin Pence.
4015
4016 2005-02-07 Paul Eggert <eggert@cs.ucla.edu>
4017
4018 * tests/glr-regression.at (Improper handling of embedded actions
4019 and dollar(-N) in GLR parsers): Renamed from "Improper handling of
4020 embedded actions and $-N in GLR parsers", work around an Autoconf bug
4021 with dollar signs in test names.
4022 * tests/input.at (Invalid dollar-n): Renamed from "Invalid \$n",
4023 for a similar reason.
4024
4025 2005-01-28 Paul Eggert <eggert@cs.ucla.edu>
4026
4027 * src/vcg.c (output_graph): G_VIEW -> normal_view in case someone
4028 wants to redefine G_VIEW.
4029
4030 2005-01-27 Paul Eggert <eggert@cs.ucla.edu>
4031
4032 * src/vcg.c (get_view_str): Remove case for normal_view.
4033 Problem reported by twlevo@xs4all.nl.
4034
4035 2005-01-24 Paul Eggert <eggert@cs.ucla.edu>
4036
4037 * configure.ac (O0CFLAGS, O0CXXFLAGS): Fix quoting bug.
4038 Problem reported by twlevo@xs4all.nl.
4039
4040 * doc/bison.texinfo: Change @dircategory from "GNU programming
4041 tools" to "Software development". Requested by Richard Stallman
4042 via Karl Berry.
4043
4044 2005-01-23 Paul Eggert <eggert@cs.ucla.edu>
4045
4046 * tests/c++.at (AT_CHECK_DOXYGEN): Don't use options after operands.
4047 Problem reported by twlevo@xs4all.nl.
4048
4049 2005-01-21 Paul Eggert <eggert@cs.ucla.edu>
4050
4051 * data/yacc.c (YYCOPY, yystpcpy, yyparse): Remove "register"
4052 keyword; it's not needed with modern compilers, and it doesn't
4053 affect correctness with older compilers. Suggested by
4054 twlevo@xs4all.nl.
4055
4056 2005-01-17 Paul Eggert <eggert@cs.ucla.edu>
4057
4058 * data/glr.c (yyuserAction): Add "default: break;" case to pacify
4059 gcc -Wswitch-default.
4060 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Likewise.
4061 * data/yacc.c (yyparse): Likewise.
4062
4063 2005-01-12 Paul Eggert <eggert@cs.ucla.edu>
4064
4065 * src/system.h (OUTPUT_EXT, TAB_EXT): Define only if not defined
4066 already. Let config.h define any nonstandard values.
4067
4068 2005-01-10 Paul Eggert <eggert@cs.ucla.edu>
4069
4070 * tests/calc.at (_AT_DATA_CALC_Y): Use alarm (100), not alarm (10),
4071 for the benefit of slower hosts. Problem reported by
4072 Nelson H. F. Beebe.
4073
4074 2005-01-07 Paul Eggert <eggert@cs.ucla.edu>
4075
4076 * data/yacc.c (yyparse): Pacify non-GCC compilers about yyerrorlab
4077 being defined and not used.
4078 * data/lalr1.cc (yyparse): Likewise.
4079 Use "if (false)" rather than "if (0)".
4080
4081 2005-01-05 Paul Eggert <eggert@cs.ucla.edu>
4082
4083 * TODO: Mention that we should allow NUL bytes in tokens.
4084
4085 2005-01-02 Paul Eggert <eggert@cs.ucla.edu>
4086
4087 * src/scan-skel.l (<<EOF>>): Don't close standard output.
4088 Problem reported by Hans Aberg.
4089
4090 2005-01-01 Paul Eggert <eggert@cs.ucla.edu>
4091
4092 * src/getargs.c (version): Happy new year; update overall
4093 program copyright date from 2004 to 2005.
4094
4095 * src/scan-skel.l ("@output ".*\n): Don't close standard output.
4096 Problem reported by Hans Aberg.
4097 * tests/output.at (AT_CHECK_OUTPUT): New arg SHELLIO.
4098 (Output file names.): Add a test for the case when standard output
4099 is closed.
4100
4101 2004-12-26 Paul Eggert <eggert@cs.ucla.edu>
4102
4103 * doc/bison.texinfo (@copying): Update FDL version number to 1.2,
4104 to fix an oversight in the Bison 2.0 manual.
4105
4106 2004-12-25 Paul Eggert <eggert@cs.ucla.edu>
4107
4108 * NEWS: Version 2.0. Reformat the existing news items since
4109 1.875, so that related items are grouped together.
4110 * configure.ac (AC_INIT): Bump version to 2.0.
4111 * src/parse-gram.c, src/parse-gram.h: Regenerate with 2.0.
4112
4113 * tests/torture.at (Exploding the Stack Size with Alloca): Set
4114 YYSTACK_USE_ALLOCA to 1 if __GNUC__ or alloca are defined;
4115 otherwise, we're not testing alloca. Unfortunately there's no
4116 simple way to consult HAVE_ALLOCA here.
4117
4118 * data/lalr1.cc (yydestruct_): Pacify unused variable warning
4119 for yymsg, too.
4120
4121 * src/LR0.c (new_itemsets): Use memset rather than zeroing by
4122 hand. This avoids a warning about comparing int to size_t when
4123 GCC warnings are enabled.
4124
4125 2004-12-22 Paul Eggert <eggert@cs.ucla.edu>
4126
4127 * NEWS: Bison-generated parsers no longer default to using the
4128 alloca function (when available) to extend the parser stack, due
4129 to widespread problems in unchecked stack-overflow detection.
4130 * data/glr.c (YYMAXDEPTH): Remove undef when zero. It's the user's
4131 responsibility to set it to a positive value. This lets the user
4132 specify a value that is not a preprocessor constant.
4133 * data/yacc.c (YYMAXDEPTH): Likewise.
4134 (YYSTACK_ALLOC): Define only if YYSTACK_USE_ALLOCA is nonzero.
4135 * doc/bison.texinfo (Stack Overflow): YYMAXDEPTH no longer needs
4136 to be a compile-time constant. However, explain the constraints on it.
4137 Also, explain the constraints on YYINITDEPTH.
4138 (Table of Symbols): Explain that alloca is no longer the default.
4139 Explain the user's responsibility if they define YYSTACK_USE_ALLOCA
4140 to 1.
4141
4142 * doc/bison.texinfo (Location Default Action): Mention that n must
4143 be zero when k is zero. Suggested by Frank Heckenbach.
4144
4145 2004-12-22 Akim Demaille <akim@epita.fr>
4146
4147 * data/lalr1.cc (parser::token_number_type, parser::rhs_number_type)
4148 (parser::state_type, parser::semantic_type, parser::location_type):
4149 Private, not public.
4150 (parser::parse): Return ints, not bool.
4151 Returning a bool introduces a problem: 0 corresponds to false, and
4152 it seems weird to return false on success. Returning true changes
4153 the conventions for yyparse.
4154 Alternatively we could return void and send an exception.
4155 There is no clear consensus (yet?).
4156 (state_stack, semantic_stack, location_stack): Rename as...
4157 (state_stack_type, semantic_stack_type, location_stack_type): these.
4158 Private, not public.
4159 * tests/c++.at: New.
4160 * tests/testsuite.at, tests/Makefile.am: Adjust.
4161
4162 2004-12-21 Akim Demaille <akim@epita.fr>
4163
4164 * data/lalr1.cc (parser::parse): Return a bool instead of an int.
4165
4166 2004-12-21 Akim Demaille <akim@epita.fr>
4167
4168 Don't impose std::string for filenames.
4169
4170 * data/lalr1.cc (b4_filename_type): New.
4171 (position::filename): Use it.
4172 (parser.hh): Move the inclusion of stack.hh and location.hh below
4173 the user code, so that needed headers for the filename type can be
4174 included first.
4175 Forward declare them before the user code.
4176 * tests/Makefile.am (check-local, installcheck-local): Pass
4177 TESTSUITEFLAGS to the TESTSUITE.
4178
4179 2004-12-20 Akim Demaille <akim@epita.fr>
4180
4181 Use more STL like names: my_class instead of MyClass.
4182
4183 * data/lalr1.cc (LocationStack, LocationType, RhsNumberType)
4184 (SemanticStack, SemanticType, StateStack, StateType)
4185 (TokenNumberType, Stack, Slice, Traits, Parser::location)
4186 (Parser::value): Rename as...
4187 (location_stack, location_type, rhs_number_type, semantic_stack)
4188 (semantic_type, state_stack, state_type, token_number_type, stack)
4189 (slice, traits, parser::yylloc, parser::yylval): these.
4190
4191 * tests/calc.at, tests/regression.at, tests/actions.at: Adjust.
4192
4193 2004-12-19 Paul Eggert <eggert@cs.ucla.edu>
4194
4195 * data/glr.c (YYLLOC_DEFAULT): Use GNU spacing conventions.
4196 * data/yacc.c (YYLLOC_DEFAULT): Likewise.
4197
4198 2004-12-17 Paul Eggert <eggert@cs.ucla.edu>
4199
4200 Remove uses of 'short int' and 'unsigned short int'. This raises
4201 some arbitrary limits. It uses more memory but nowadays that's
4202 not much of an issue.
4203
4204 This change does not affect the generated parsers; that's a different
4205 task, as some users will want to conserve memory there.
4206
4207 Ideally we should use size_t to represent all object counts, and
4208 something like ptrdiff_t to represent signed differences of object
4209 counts; but that will require more code-cleanup than I have the
4210 time to do right now.
4211
4212 * src/LR0.c (allocate_itemsets, new_itemsets, save_reductions):
4213 Use size_t, not int or short int, to count objects.
4214 * src/closure.c (nritemset, closure): Likewise.
4215 * src/closure.h (nritemset, closure): Likewise.
4216 * src/nullable.c (nullable_compute): Likewise.
4217 * src/print.c (print_core): Likewise.
4218 * src/print_graph.c (print_core): Likewise.
4219 * src/state.c (state_compare, state_hash): Likewise.
4220 * src/state.h (struct state): Likewise.
4221 * src/tables.c (default_goto, goto_actions): Likewise.
4222
4223 * src/gram.h (rule_number, rule): Use int, not short int.
4224 * src/output.c (prepare_rules): Likewise.
4225 * src/state.h (state_number, STATE_NUMBER_MAXIMUM, transitions,
4226 errs, reductions): Likewise.
4227 * src/symtab.h (symbol_number, SYMBOL_NUMBER_MAXIMUM, struct symbol):
4228 Likewise.
4229 * src/tables.c (vector_number, tally, action_number,
4230 ACTION_NUMBER_MINIMUM): Likewise.
4231 * src/output.c (muscle_insert_short_int_table): Remove.
4232
4233 2004-12-17 Akim Demaille <akim@epita.fr>
4234
4235 * data/lalr1.cc: Extensive Doxygenation.
4236 (error_): Rename as...
4237 (error): this, since it is visible to the user.
4238 Adjust callers.
4239 (Parser::message): Now an automatic variable from...
4240 (Parser::yyreport_syntax_error_): here.
4241 * tests/actions.at, tests/calc.at, tests/regression.at: Adjust to
4242 Parser::error.
4243 * tests/input.at: Escape $.
4244
4245 2004-12-16 Paul Eggert <eggert@cs.ucla.edu>
4246
4247 * data/glr.c (b4_lhs_value, b4_rhs_value, b4_rhs-location):
4248 Parenthesize rhs to avoid obscure problems with mistakes like
4249 "foo$$bar = foo$1bar;". Problem reported by twlevo at xs4all.
4250 * data/lalr1.cc (b4_lhs_value, b4_rhs_value, b4_lhs_location,
4251 b4_rhs_location): Likewise.
4252 * data/yacc.c (b4_lhs_value, b4_rhs_value, b4_lhs_location,
4253 b4_rhs_location): Likewise.
4254
4255 2004-12-16 Akim Demaille <akim@epita.fr>
4256
4257 * data/lalr1.cc (yyreport_syntax_error_): Catch up with glr.c and
4258 yacc.c: be sure to stay within yycheck_.
4259 * tests/actions.at: Re-enable C++ tests.
4260
4261 2004-12-16 Akim Demaille <akim@epita.fr>
4262
4263 * src/print_graph.c (print_graph): Remove layoutalgorithm uses for
4264 real.
4265
4266 2004-12-16 Akim Demaille <akim@epita.fr>
4267
4268 Use #define to handle the %name-prefix.
4269
4270 * data/glr.c, data/yacc.c: Comment changes.
4271 * data/lalr1.cc (yylex): Use #define to select the name of yylex,
4272 so that one can refer to yylex in the parser file, and have it
4273 renamed, as is the case with other skeletons.
4274
4275 2004-12-16 Akim Demaille <akim@epita.fr>
4276
4277 Move lalr1.cc internals into yy*.
4278
4279 * data/lalr1.cc (semantic_stack_, location_stack_, state_stack_)
4280 (semantic_stack_, location_stack_, pact_, pact_ninf_, defact_)
4281 (pgoto_, defgoto_, table_, table_ninf_, check_, stos_, r1_, r2_)
4282 (name_, rhs_, prhs_, rline_, token_number_, eof_, last_, nnts_)
4283 (empty_, final_, terror_, errcode_, ntokens_)
4284 (user_token_number_max_, undef_token_, n_, len_, state_, nerrs_)
4285 (looka_, ilooka_, error_range_, nerrs_):
4286 Rename as...
4287 (yysemantic_stack_, yylocation_stack_, yystate_stack_)
4288 (yysemantic_stack_, yylocation_stack_, yypact_, yypact_ninf_)
4289 (yydefact_, yypgoto_, yydefgoto_, yytable_, yytable_ninf_)
4290 (yycheck_, yystos_, yyr1_, yyr2_, yyname_, yyrhs_, yyprhs_)
4291 (yyrline_, yytoken_number_, yyeof_, yylast_, yynnts_, yyempty_)
4292 (yyfinal_, yyterror_, yyerrcode_, yyntokens_)
4293 (yyuser_token_number_max_, yyundef_token_, yyn_, yylen_, yystate_)
4294 (yynerrs_, yylooka_, yyilooka_, yyerror_range_, yynerrs_):
4295 these.
4296
4297 2004-12-15 Paul Eggert <eggert@cs.ucla.edu>
4298
4299 Fix some problems reported by twlevo at xs4all.
4300 * src/symtab.c (symbol_new): Report an error if the input grammar
4301 contains too many symbols. This is better than calling abort() later.
4302 * src/vcg.h (enum layoutalgorithm): Remove. All uses removed.
4303 (struct node, struct graph):
4304 Rename member expand to stretch. All uses changed.
4305 (struct graph): Remove member layoutalgorithm. All uses removed.
4306 * src/vcg.c (get_layoutalgorithm_str): Remove. All uses removed.
4307 * src/vcg_defaults.h (G_STRETCH): Renamed from G_EXPAND.
4308 All uses changed.
4309 (N_STRETCH): Rename from N_EXPAND. All uses changed.
4310
4311 2004-12-15 Akim Demaille <akim@epita.fr>
4312
4313 * data/lalr1.cc: Normalize /** \brief ... */ to ///.
4314 Add more Doxygen comments.
4315 (symprint_, stack_print_, reduce_print_, destruct_, pop)
4316 (report_syntax_error_, translate_): Rename as...
4317 (yysymprint_, yystack_print_, yyreduce_print_, yydestruct_)
4318 (yypop_, yyreport_syntax_error_, yytranslate_): this.
4319
4320 2004-12-15 Akim Demaille <akim@epita.fr>
4321
4322 * data/lalr1.cc (lex_): Rename as...
4323 (yylex_): this.
4324 Move the trace here.
4325 Take the %name-prefix into account.
4326 Reported by Alexandre Duret-Lutz.
4327
4328 2004-12-15 Akim Demaille <akim@epita.fr>
4329
4330 Simplify the C++ parser constructor.
4331
4332 * data/lalr1.cc (debug_): Rename as...
4333 (yydebug_): so that the parser's internals are always in the yy*
4334 pseudo namespace.
4335 Adjust uses.
4336 (b4_parse_param_decl): Remove the leading comma as it is now only
4337 called as unique argument list.
4338 (Parser::Parser): Remove the constructor accepting a location and
4339 an initial debugging level.
4340 Remove from the other ctor the argument for the debugging level.
4341 (debug_level_type, debug_level, set_debug_level): New.
4342
4343 * tests/actions.at, tests/calc.at, tests/regression.at: Adjust
4344 constructor calls.
4345
4346 2004-12-15 Akim Demaille <akim@epita.fr>
4347
4348 Remove b4_root related material: failure experiment
4349 (which goal was to allow to derive from a class).
4350
4351 * data/lalr1.cc (b4_root, b4_param, b4_constructor): Remove
4352 definitions and uses.
4353
4354 2004-12-14 Paul Eggert <eggert@cs.ucla.edu>
4355
4356 * data/glr.c (struct yyGLRStack): yyerror_range now has 3 items,
4357 not 2, since it's not portable to subtract 1 from the start of an
4358 array. The new item 0 is never set or used. All uses changed.
4359
4360 (yyrecoverSyntaxError): Use YYLLOC_DEFAULT instead of assuming
4361 the default definition of YYLLOC_DEFAULT. Problem reported
4362 by Frank Heckenbach.
4363
4364 2004-12-12 Paul Eggert <eggert@cs.ucla.edu>
4365
4366 * data/glr.c (YYRHSLOC): Don't have two definitions, one for
4367 the normal case and one for the error case. Just use the
4368 first one uniformly. Problem reported by Frank Heckenbach.
4369 (YYLLOC_DEFAULT): Use the conventions of yacc.c, so we can
4370 use exactly the same macro in both places.
4371 (yyerror_range): Now of type yyGLRStackItem, not YYLTYPE,
4372 so that the normal-case YYRHSLOC works for the error case too.
4373 All uses changed.
4374 * data/yacc.c (YYRHSLOC): New macro, taken from glr.c.
4375 (YYLLOC_DEFAULT): Use the same macro as glr.c.
4376 * doc/bison.texinfo (Location Default Action): Don't claim that
4377 we have an array of locations. Use the same macro for both glr
4378 and lalr parsers. Mention YYRHSLOC. Mention what happens when
4379 the index is 0.
4380
4381 2004-12-10 Paul Eggert <eggert@cs.ucla.edu>
4382
4383 * HACKING: Update email addresses to send announcements to.
4384
4385 * configure.ac (AC_INIT): Bump version to 1.875f.
4386
4387 2004-12-10 Paul Eggert <eggert@cs.ucla.edu>
4388
4389 * NEWS: Version 1.875e.
4390 * src/parse-gram.c, src/parse-gram.h: Regenerate with 1.875e.
4391
4392 * src/scan-skel.l: Include "complain.h", for "fatal".
4393
4394 * src/relation.h (relation_print, relation_digraph):
4395 Relation sizes are of type relation_node, not size_t (this is
4396 merely a doc fix, since the two types are equivalent).
4397 (relation_transpose): Relation sizes are of type relation_node,
4398 not int.
4399 * src/relation.c: Likewise.
4400 (top, infinity): Now of type relation_node, not int.
4401 (traverse, relation_transpose): Use relation_node, not int.
4402
4403 * data/glr.c (yyuserAction, yyrecoverSyntaxError): Mark args
4404 with ATTRIBUTE_UNUSED if they're not used, to avoid GCC warning.
4405 (yyparse): Remove unused local introduced in 2004-10-25 patch.
4406
4407 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): New arg
4408 specifying whether the test should be skipped. Use it tp
4409 specify that the [%defines %skeleton "lalr1.cc"] tests currently
4410 fail on some hosts, and should be skipped.
4411
4412 2004-12-08 Paul Eggert <eggert@cs.ucla.edu>
4413
4414 * src/system.h (CALLOC, MALLOC, REALLOC): Remove. All callers
4415 changed to use xcalloc, xnmalloc, xnrealloc, respectively,
4416 unless otherwise specified below.
4417
4418 * src/LR0.c (allocate_itemsets): Use xnmalloc, not xcalloc,
4419 to allocate kernel_base, kernel_items, kernel_size, since
4420 they needn't be initialized to 0.
4421 (allocate_storgae): Likewise, for shiftset, redset, shift_symbol.
4422 * src/closure.c (new_closure): Likewise, for itemset.
4423 * src/derives.c (derives_compute): Likewise, for delts, derives, q.
4424 * src/lalr.c (set_goto_map): Likewise, for temp_map.
4425 (initialize_F): Likewise, for reads, edge, reads[i], includes[i].
4426 (build_relations): Likewise for edge, states1, includes.
4427 * src/nullable.c (nullable_compute): Likewise, for squeue, relts.
4428 * src/reader.c (packgram): Likewise, for ritem, rules.
4429 * src/reduce.c (nonterminals_reduce): Likewise for nontermmap.
4430 * src/relation.c (relation_digraph): Likewise for VERTICES.
4431 (relation_transpose): Likewise for new_R, end_R.
4432 * src/symtab.c (symbols_token_translations_init): Likewise for
4433 token_translations.
4434 * src/tables.c (save_row): Likewise for froms, tos, conflict_tos.
4435 (token_actions): Likewise for yydefact, actrow, conflrow,
4436 conflict_list.
4437 (save_column): Likewise for froms[symno], tos[symno].
4438 (goto_actions): Likewise for state_count.
4439 (pack_table): Likewise for base, pos, check.
4440 (tables_generate): Likewise for width.
4441
4442 * src/LR0.c (set_states): Don't reuse kernel_size and kernel_base
4443 for initial core. Just have a separate core, so we needn't worry
4444 about whether kernel_size and kernel_base are initialized.
4445
4446 * src/LR0.c (shift_symbol, redset, shiftset, kernel_base,
4447 kernel_size, kernel_items): Remove unnecessary initialization.
4448 * src/conflicts.c (conflicts): Likewise.
4449 * src/derives.c (derives): Likewise.
4450 * src/muscle_tablc (muscle_insert): Likewise.
4451 * src/relation.c (relation_digraph): Likewise.
4452 * src/tables.c (froms, tos, conflict_tos, tally, width, actrow, order,
4453 conflrow, conflict_table, conflict_list, table, check):
4454 Likewise.
4455
4456 * src/closure.c (new_closure): Arg is of type unsigned int, not int.
4457 This is because all callers pass unsigned int.
4458 * src/closure.h (new_closure): Likewise.
4459
4460 * src/lalr.c (initialize_F): Initialize reads[i] in all cases.
4461 (build_relations): Initialize includes[i] in all cases.
4462 * src/reader.c (packgram): Always initialize rules[ruleno].prec
4463 and rules[ruleno].precsym. Initialize members in order.
4464 * src/relation.c (relation_transpose): Always initialize new_R[i]
4465 and end_R[i].
4466 * src/table.c (conflict_row): Initialize 0 at end of conflict_list.
4467
4468 * src/output.c (prepare_actions): Pass 0 instead of conflict_list[0];
4469 conflict_list[0] was always 0, but now it isn't initialized.
4470
4471 * src/table.c (table_grow): When conflict_table grew, the grown
4472 area wasn't cleared. Fix this.
4473
4474 * lib/.cvsignore: Add strdup.c, strdup.h.
4475 * m4/.cvsignore: Add strdup.m4.
4476
4477 2004-12-07 Paul Eggert <eggert@cs.ucla.edu>
4478
4479 * src/lalr.h (GOTO_NUMBER_MAXIMUM): New macro.
4480 * src/lalr.c (set_goto_map): Don't allow ngotos to equal
4481 GOTO_NUMBER_MAXIMUM, since we occasionally compute
4482 ngotos + 1 without checking for overflow.
4483 (build_relations): Use END_NODE, not -1, to denote end of edges.
4484 * src/lalr.c (set_goto_map, map_goto, initialize_F, add_loopback_edge,
4485 build_relations): Use goto_number, not int, for goto numbers.
4486 * src/tables.c (save_column, default_goto): Likewise.
4487
4488 2004-11-23 Akim Demaille <akim@epita.fr>
4489
4490 * data/lalr1.cc (YYSTYPE): Define it as is done for C, instead
4491 of #defining from yystype.
4492 Don't typedef yystype, C++ does not need it.
4493 This lets it possible to forward declare it as union.
4494
4495 2004-11-23 Paul Eggert <eggert@cs.ucla.edu>
4496
4497 * bootstrap (gnulib_modules): Add extensions.
4498 Problem reported by Jim Meyering.
4499
4500 2004-11-22 Paul Eggert <eggert@cs.ucla.edu>
4501
4502 * src/LR0.c, src/closure.c, src/derives.c, src/gram.c,
4503 src/lalr.c, src/nullable.c, src/relation.c, src/scan-skel.l,
4504 src/system.h, src/tables.c: XFREE -> free, to accommodate
4505 recent change to gnulib xalloc.h.
4506 Problem reported by Jim Meyering.
4507
4508 2004-11-17 Akim Demaille <akim@epita.fr>
4509
4510 * data/lalr1.cc (symprint_): Use cdebug_ to avoid warnings.
4511
4512 2004-11-17 Akim Demaille <akim@epita.fr>,
4513 Alexandre Duret-Lutz <adl@gnu.org>
4514
4515 * data/lalr1.cc (Parser::yycdebug_): New, a pointer, to allow
4516 changes.
4517 (YYCDEBUG): Adjust.
4518 Use it instead of cdebug_.
4519 (Parser::debug_stream, Parser::set_debug_stream): New.
4520 (Parser::symprint_): Define cdebug_ for temporary backward
4521 compatibility.
4522 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Use
4523 debug_stream ().
4524
4525 2004-11-17 Akim Demaille <akim@epita.fr>
4526
4527 * data/lalr1.cc (Parser:print_): Remove, use %printer instead.
4528 * tests/regression.at (_AT_DATA_DANCER_Y): Adjust.
4529 * tests/calc.at (_AT_DATA_CALC_Y): Ditto.
4530 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise.
4531
4532 2004-10-27 Paul Eggert <eggert@cs.ucla.edu>
4533
4534 * data/glr.c (yyloc_default): Remove; not used.
4535 Problem reported by Frank Heckenbach.
4536
4537 2004-10-25 Akim Demaille <akim@epita.fr>
4538
4539 * data/glr.c (YYRHSLOC): Move its definition next to its uses.
4540 Introduce another definition to address simple location arrays.
4541 (yyGLRStack): New member: yyerror_range.
4542 (yyrecoverSyntaxError, yyparse): Update it.
4543 (yyrecoverSyntaxError): Use it when shifting the error token to
4544 have an accurate range, equivalent to the one computed by both
4545 yacc.c and lalr1.cc.
4546 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Change its yylex so
4547 that column numbers start at column 0, as per GNU Coding
4548 Standards, the others tests, and the doc.
4549 (_AT_RESOLVED_GLR_OUTPUT_WITH_LOC, _AT_AMBIG_GLR_OUTPUT_WITH_LOC):
4550 Adjust to the above change (first column is 0).
4551 And adjust the location of the "<error>", now covering the whole
4552 line.
4553
4554 2004-10-22 Akim Demaille <akim@epita.fr>
4555 and Paul Eggert <eggert@cs.ucla.edu>
4556
4557 Remove some arbitrary limits on goto numbers and relations.
4558 * src/lalr.c (goto_map, ngotos, from_state, to_state): Omit
4559 initial values, since they're never used.
4560 (set_goto_map): ngotos is now unsigned, so test for overflow
4561 by seeing whether it wraps around to zero.
4562 * src/lalr.h (goto_number): Now size_t, not short int.
4563 (GOTO_NUMBER_MAXIMUM): Remove.
4564 * src/relation.c (relation_print, traverse, relation_transpose):
4565 Check for END_NODE rather than looking at sign.
4566 * src/relation.h (END_NODE): New macro.
4567 (relation_node): Now size_t, not short int.
4568
4569 2004-10-22 Paul Eggert <eggert@cs.ucla.edu>
4570
4571 * doc/bison.texinfo (Language and Grammar): In example, "int" is a
4572 keyword, not an identifier. Problem reported by Baron Schwartz in
4573 <http://lists.gnu.org/archive/html/bug-bison/2004-10/msg00017.html>.
4574
4575 2004-10-11 Akim Demaille <akim@epita.fr>
4576
4577 * src/symtab.c (symbol_check_alias_consistency): Also check
4578 type names, destructors, and printers.
4579 Reported by Alexandre Duret-Lutz.
4580 Recode the handling of associativity and precedence in terms
4581 of symbol_precedence_set.
4582 Accept no redeclaration at all, not even equal to the previous
4583 value.
4584 (redeclaration): New.
4585 Use it to factor redeclaration complaints.
4586 (symbol_make_alias): Don't set the type of the alias, let
4587 symbol_check_alias_consistency do it as for other features.
4588 * src/symtab.h (symbol): Add new member prec_location, and
4589 type_location.
4590 * src/symtab.c (symbol_precedence_set, symbol_type_set): Set them.
4591 * tests/input.at (Incompatible Aliases): New.
4592
4593 2004-10-09 Paul Eggert <eggert@cs.ucla.edu>
4594
4595 .cvsignore fixes to accommodate gnulib changes,
4596 and the practice of naming build directories "_build".
4597 * .cvsignore: Add "_*". Sort.
4598 * lib/.cvsignore: Add getopt_.h, xalloc-die.c.
4599 * m4/.cvsignore: Add "*_gl.m4".
4600
4601 2004-10-06 Akim Demaille <akim@epita.fr>
4602
4603 * src/parse-gram.y (add_param): Fix the truncation of trailing
4604 spaces.
4605
4606 2004-10-05 Akim Demaille <akim@epita.fr>
4607
4608 In Bison 1.875's yacc.c, YYLLOC_DEFAULT was called regardless
4609 whether the reducion was empty or not. This leaves room to
4610 improve the use of YYLLOC_DEFAULT in such a case.
4611 lalr1.cc is still experimental, so changing this is acceptable.
4612 And finally, there are probably not many users who changed the
4613 handling of locations in GLR, so changing is admissible too.
4614
4615 * data/glr.c, data/lalr1.cc, data/yacc.c (YYLLOC_DEFAULT): On an
4616 empty reduction, set @$ to an empty location ending the previously
4617 stacked symbol.
4618 Adjust uses to make sure the code is triggered on empty
4619 reductions.
4620 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust the
4621 expected output: empty reductions have empty locations.
4622
4623 2004-09-29 Akim Demaille <akim@epita.fr>
4624
4625 * data/lalr1.cc: Move towards a more standard C++ coding style
4626 for templates: Class < T > -> Class<T>.
4627
4628 2004-09-29 Akim Demaille <akim@epita.fr>
4629
4630 * data/lalr1.cc: Reinstall the former ctor, for sake of
4631 compatibility, but warn it will be removed.
4632 Move towards a more standard C++ coding style (i.e., type *var ->
4633 type* var).
4634
4635 2004-09-27 Paul Eggert <eggert@cs.ucla.edu>
4636
4637 * src/parse-gram.y (add_param): Rewrite to avoid strchr,
4638 since it's less likely to work if NULs are involved in the future.
4639
4640 2004-09-27 Akim Demaille <akim@epita.fr>
4641
4642 * data/yacc.c (YY_LOCATION_PRINT): Fix its default declaration.
4643
4644 2004-09-27 Akim Demaille <akim@epita.fr>
4645
4646 * data/lalr1.cc (b4_parse_param_decl_1): New.
4647 (b4_parse_param_decl): Use it to have different names between attribute
4648 and argument names.
4649 (b4_cc_constructor_call): Likewise.
4650
4651 2004-09-24 Akim Demaille <akim@epita.fr>
4652
4653 * src/parse-gram.y (add_param): Strip the leading and trailing
4654 blanks from a formal argument declaration.
4655 (YY_LOCATION_PRINT): New.
4656
4657 2004-09-24 Akim Demaille <akim@epita.fr>
4658
4659 * data/c.m4 (b4_yysymprint_generate): Move the YYINPUT invocation
4660 after the location.
4661
4662 2004-09-24 Akim Demaille <akim@epita.fr>
4663
4664 * doc/bison.texinfo (Table of Symbols): Sort.
4665
4666 2004-09-21 Akim Demaille <akim@epita.fr>
4667
4668 * data/yacc.c, data/glr.c (b4_at_dollar, b4_dollar_dollar): Remove
4669 the useless parentheses.
4670 Suggested by Paul Eggert.
4671
4672 2004-09-20 Akim Demaille <akim@epita.fr>
4673
4674 Let the initial-action act on the look-ahead, and use it for the
4675 "initial push" (corresponding to an hypothetical beginning-of-file).
4676 And let lalr1.cc honor %initial-action.
4677
4678 * doc/bison.texinfo (Initial Action Decl): Clarify, and add an
4679 example.
4680 * data/lalr1.cc (Parser::initlocation_): Remove, bad experiment.
4681 (Parser::Parser): Remove the ctor that used to initialize it.
4682 (Parser::parse): Like in the other skeletons, issue the "starting
4683 parse" message before any action.
4684 Honor %initial-action.
4685 Initialize the stacks with the lookahead.
4686 * data/yacc.c: Let $$ and @$ in %initial-action designate the
4687 look-ahead.
4688 Push them in the stacks.
4689 * tests/actions.at, tests/calc.at: Adjust the C++ ctor invocations.
4690
4691 2004-09-20 Akim Demaille <akim@epita.fr>
4692
4693 * doc/bison.texinfo (Initial Action Decl): New.
4694
4695 2004-09-20 Akim Demaille <akim@epita.fr>
4696
4697 * data/yacc.c (YY_LOCATION_PRINT): Use YYLTYPE_IS_TRIVIAL as a
4698 clearer criterion to define it.
4699 (parse): Initialize the initial location when YYLTYPE_IS_TRIVIAL.
4700 When reducing on an empty RHS, use the latest stacked location as
4701 location.
4702 yylloc is not always available.
4703 * data/glr.c: Likewise.
4704 Also, honor initial-actions.
4705
4706 2004-09-20 Akim Demaille <akim@epita.fr>
4707
4708 * data/yacc.c (YY_LOCATION_PRINT): New.
4709 Define when we know YYLTYPE's structure, i.e., when the default
4710 YYLLOC_DEFAULT is used.
4711 * data/c.m4 (b4_yysymprint_generate): Use it.
4712 * data/lalr1.cc (YYLLOC_DEFAULT): Stop relying on the initial
4713 value of the result.
4714 (error_start_): Replace with...
4715 (error_range_): this location array.
4716 This allows to replace code relying on the implementation of
4717 locations by portable code.
4718 * data/yacc.c (yylerrsp): Replace with...
4719 (yyerror_range): this.
4720 Every time a token is popped, update yyerror_range[0], to have an
4721 accurate location for the error token.
4722 * data/glr.c (YY_LOCATION_PRINT): New.
4723 (yyprocessOneStack): Fix an invocation of YY_SYMBOL_PRINT:
4724 deference a pointer.
4725 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): No longer
4726 report the location in %printers.
4727
4728 * src/scan-skel.l: Instead of abort, report error messages to ease
4729 understanding skeleton scanning failures.
4730
4731 2004-09-16 Akim Demaille <akim@epita.fr>
4732
4733 * data/lalr1.cc (Stack::Iterator, Stack::ConstIterator): Rename as...
4734 (iterator, const_iterator): these, to be more in the C++ spirit.
4735 Also, return reverse iterators so that when displaying the stack
4736 we display its bottom first.
4737 (Parser::stack_print_, Parser::reduce_print_): Match the messages
4738 from yacc.c.
4739 We should probably use vector here though.
4740
4741 2004-09-16 Akim Demaille <akim@epita.fr>
4742
4743 Have more complete shift traces.
4744
4745 * data/yacc.c, data/lalr1.c, data/glr.c: Use YY_SYMBOL_PRINT
4746 to report Shifts instead of ad hoc YYDPRINTF invocations,
4747 including for the error token.
4748 * data/lalr1.cc (symprint_): Output the location.
4749 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): In C++, don't
4750 output the location within the %printer.
4751 Activate GLR tests, at least to make sure they compile properly.
4752 They still don't pass though.
4753 * tests/calc.at: Adjust expect verbose output, since now "Entering
4754 state..." is on a different line than the "Shifting" message.
4755
4756 2004-09-08 Akim Demaille <akim@epita.fr>
4757
4758 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Move the
4759 Bison directive from the Bison file to the invocation of this
4760 macro, so that these directives are passed to
4761 AT_BISON_OPTION_PUSHDEFS to get correct help macros.
4762 Use these helping macros (e.g., AT_LOC, AT_VAL and so forth).
4763 Move the AT_SETUP/AT_CLEANUP outside, to report as test title
4764 the extra Bison directives instead of the whole series.
4765 Change the grammar so that there are recoverable errors, and
4766 unrecoverable errors. Now we can have the parser give up before
4767 consuming the whole input. As a result we now can observe that
4768 the lookahead is freed when needed.
4769 Change the parser source to parse argv[1] instead of a hard coded
4770 string.
4771 Simplify yylex, and give a value and location to EOF.
4772 Simplify some invocations of AT_CHECK_PRINTER_AND_DESTRUCTOR that
4773 passed directives already coded in the file.
4774 Add some tests to check the location of "error".
4775 For some tests, the C++ parser is correct, and not yacc.c.
4776 For other tests, they provide different, but unsatisfying, values,
4777 so keep the C++ value so that at least one parser is "correct"
4778 according to the test suite.
4779 (Actions after errors): Remove, this is subsumed by the
4780 AT_CHECK_PRINTER_AND_DESTRUCTOR series.
4781
4782 2004-09-06 Akim Demaille <akim@epita.fr>
4783
4784 * data/lalr1.cc: Adjust the indentation of the labels.
4785 (Parser::pop): New.
4786 Use it.
4787
4788 2004-09-06 Akim Demaille <akim@epita.fr>
4789
4790 * data/yacc.cc, data/glr.cc (yydestruct): Accept an additional
4791 argument, an informative message.
4792 Call YY_SYMBOL_PRINT.
4793 Adjust all callers: integrate the associated YY_SYMBOL_PRINT.
4794 * data/lalr1.cc (destruct_): Likewise.
4795 In addition, no longer depend on b4_yysymprint_generate and
4796 b4_yydestruct_generate to generate these functions, do it "by
4797 hand".
4798
4799 2004-09-03 Akim Demaille <akim@epita.fr>
4800
4801 * data/glr.c, data/lalr1.cc, data/yacc.c: When YYABORT was
4802 invoked, yydestruct the lookahead.
4803 * tests/calc.at (Calculator $1): Update the expected lengths of
4804 traces: there is an added line for the discarded lookahead.
4805 * doc/bison.texinfo (Destructor Decl): Some rewording.
4806 Define "discarded" symbols.
4807
4808 2004-09-02 Akim Demaille <akim@epita.fr>
4809
4810 * data/lalr1.cc (translate_, destruct_): No reason to be static.
4811
4812 2004-09-02 Akim Demaille <akim@epita.fr>
4813
4814 * data/glr.c, yacc.c (YYDSYMPRINT): Remove, not used.
4815 (YYDSYMPRINTF): Rename as...
4816 (YY_SYMBOL_PRINT): this.
4817 * data/lalr1.cc (YY_SYMBOL_PRINT): New, modeled after the previous
4818 two.
4819 Use it instead of direct symprint_ calls.
4820 (yybackup): Tweak the "Now at end of input" case to match yacc.c's
4821 one.
4822
4823 2004-09-02 Akim Demaille <akim@epita.fr>
4824
4825 * data/lalr1.cc (b4_yysymprint_generate): New.
4826 (symprint_): New member function, defined when YYDEBUG.
4827 Use it consistently instead of token/nterm debugging output by
4828 hand.
4829 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust
4830 %printer calls to use cdebug_ when using lalr1.cc.
4831
4832 2004-08-30 Florian Krohm <florian@edamail.fishkill.ibm.com>
4833
4834 * data/glr.c: Guard the declarations of yypstack and yypdumpstack
4835 with #ifdef YYDEBUG.
4836
4837 2004-08-26 Akim Demaille <akim@epita.fr>
4838
4839 * doc/bison.texinfo (Implementing Loops): Rename as...
4840 (Implementing Gotos/Loops): this.
4841
4842 2004-08-13 Paul Eggert <eggert@cs.ucla.edu>
4843
4844 Adjust to latest gnulib.
4845 * bootstrap (gnulib_modules): Add xalloc-die.
4846 Set LC_ALL=C so that file names sort consistently.
4847 Prefer the gnulib copies of gettext.m4, glibc21.m4,
4848 inttypes_h.m4, lib-ld.m4, lib-prefix.m4, po.m4, stdint_h.m4,
4849 uintmax_t.m4, ulonglong.m4.
4850 (intl_files_to_remove): Add gettext.m4, lib-ld.m4, lib-prefix.m4,
4851 po.m4 since we are now using _gl.m4 instead.
4852
4853 2004-08-10 Florian Krohm <florian@edamail.fishkill.ibm.com>
4854
4855 * src/scan-action.l: Remove. Scanning of semantic actions is
4856 handled in scan-gram.l.
4857
4858 2004-08-07 Florian Krohm <florian@edamail.fishkill.ibm.com>
4859
4860 * src/scan-gram.l (handle_syncline): Use uniqstr_new not xstrdup.
4861
4862 * src/location.h (struct): The file member is a uniqstr.
4863 (equal_boundaries): Use UNIQSTR_EQ for comparison.
4864
4865 2004-07-22 Paul Eggert <eggert@cs.ucla.edu>
4866
4867 Fix bug with non-%union parsers that have printers or destructors,
4868 which led to a Bison core dump. Reported by Peter Fales in
4869 <http://lists.gnu.org/archive/html/bug-bison/2004-07/msg00014.html>.
4870
4871 * data/c.m4 (b4_symbol_actions): Don't assume %union was used.
4872 * data/lalr1.cc (yystype) [defined YYSTYPE]: Define to YYSTYPE,
4873 not to our own type.
4874 * src/output.c (symbol_destructors_output, symbol_printers_output):
4875 Don't assume %union.
4876 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR,
4877 AT_CHECK_PRINTER_AND_DESTRUCTOR): New argument
4878 UNION-FLAG. All callers changed.
4879 (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Don't assume %union.
4880 Use type char, not unsigned int, when declaring an array of char;
4881 this lets us remove a cast.
4882 (Printers and Destructors): Add non-%union test cases.
4883
4884 2004-06-21 Paul Eggert <eggert@cs.ucla.edu>
4885
4886 * doc/bison.texinfo: Minor editorial changes, mostly to the new
4887 GLR writeups. E.g., avoid frenchspacing and the future tense,
4888 change "lookahead" to "look-ahead", and change "wrt" to "with
4889 respect to".
4890
4891 2004-06-21 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
4892
4893 * doc/bison.texinfo (Merging GLR Parses, Compiler Requirements):
4894 New sections, split off from the GLR Parsers section. Put the new
4895 Simple GLR Parser near the start of the GLR section, for clarity.
4896 Rewrite connective text.
4897
4898 2004-06-21 Frank Heckenbach <frank@g-n-u.de>
4899
4900 * doc/bison.texinfo (Simple GLR Parsers): New section.
4901
4902 2004-06-21 Paul Eggert <eggert@cs.ucla.edu>
4903
4904 * NEWS, TODO, doc/bison.texinfo:
4905 Use "look-ahead" instead of "lookahead", to be consistent.
4906 * REFERENCES: Fix incorrect reference to DeRemer and Pennello,
4907 while we're fixing "look-ahead".
4908 * src/conflicts.c (shift_set): Renamed from shiftset.
4909 (look_ahead_set): Renamed from lookaheadset.
4910 * src/print.c: Likewise.
4911 * src/getargs.c (report_args): Add "look-ahead" as the new canonical
4912 name for "lookahead".
4913 (report_types, usage): Likewise.
4914 * src/getargs.h (report_look_ahead_tokens): Renamed from
4915 report_lookaheads.
4916 * src/lalr.c (compute_look_ahead_tokens): Renamed from
4917 compute_lookaheads.
4918 (state_look_ahead_tokens_count): Renamed from state_lookaheads_count.
4919 (look_ahead_tokens_print): Renamed from lookaheads_print.
4920 * src/state.c (state_rule_look_ahead_tokens_print): Renamed from
4921 state_rule_lookaheads_print.
4922 * src/state.h: Likewise.
4923 (reductions.look_ahead_tokens): Renamed from lookaheads.
4924 * tests/torture.at (AT_DATA_LOOK_AHEAD_TOKENS_GRAMMAR): Renamed from
4925 AT_DATA_LOOKAHEADS_GRAMMAR.
4926
4927 2004-06-03 Paul Eggert <eggert@cs.ucla.edu>
4928
4929 * README: Update location of patched M4 distribution.
4930
4931 2004-05-30 Albert Chin-A-Young <china@thewrittenword.com>
4932
4933 Don't assume the C++ compiler takes the same arguments as the C compiler
4934 (trivial change).
4935 * configure.ac (O0CXXFLAGS): New var.
4936 * tests/atlocal.in (CXXFLAGS): Use it.
4937
4938 2004-05-29 Paul Eggert <eggert@cs.ucla.edu>
4939
4940 Fix some "make check" problems with C++ reported by
4941 Albert Chin-A-Young for Tru64 C++ in this thread:
4942 http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00049.html
4943
4944 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check for std::cerr.
4945 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
4946 Output to a .cc file for C++, not to a .c file.
4947 * tests/calc.at (AT_CHECK_CALC): Likewise.
4948 * tests/regression.at (AT_CHECK_DANCER): Likewise.
4949 * tests/local.at (AT_COMPILE_CXX): Default to OUTPUT.cc, not OUTPUT.c.
4950
4951 2004-05-28 Albert Chin-A-Young <china@thewrittenword.com>
4952
4953 * tests/calc.at, tests/actions.at: Workaround for SGI
4954 C++ compiler. (trivial change)
4955
4956 2004-05-27 Paul Eggert <eggert@cs.ucla.edu>
4957
4958 Spent a few hours checking out which prerequisite versions the
4959 current sources actually require. I went all the way back to
4960 Gettext 0.10.40, Automake 1.4, and Autoconf 2.57 and investigated
4961 a seemingly endless set of combinations of versions more recent
4962 than that. The bottom line is that the current sources require
4963 fairly recent versions of the build tools, and it'll be some work
4964 to change this.
4965 * configure.ac (AC_PREREQ): Increase from 2.58 to 2.59.
4966 (AM_INIT_AUTOMAKE): Increase from 1.7 to 1.8.
4967 (AM_GNU_GETTEXT_VERSION): Increase from 0.11.5 to 0.12.
4968 Add comments explaining why those particular versions are
4969 currently needed.
4970
4971 * src/parse-gram.y (lloc_default): Rewrite to avoid compiler bug
4972 in SGI MIPSpro 7.4.1m. Problem reported by Albert Chin-A-Young in
4973 <http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00037.html>.
4974
4975 * configure.ac (AC_PREREQ): Bump to 2.58, since 2.57 doesn't work
4976 (it fails with a Autoconf-without-aclocal-m4 diagnostic).
4977
4978 2004-05-26 Paul Eggert <eggert@cs.ucla.edu>
4979
4980 * configure.ac (AM_GNU_GETTEXT_VERSION): Lower it from 0.14.1 to
4981 0.11.5. Suggested by Bruno Haible.
4982 * bootstrap: Remove gettext version checking.
4983
4984 * doc/bison.texinfo (Decl Summary): Also mention that %union
4985 can depend on prerequisite types. Problem reported by Tim
4986 Van Holder.
4987
4988 2004-05-25 Paul Eggert <eggert@cs.ucla.edu>
4989
4990 * README: Mention GNU m4 1.4 bugs and Akim's patched version.
4991 * README-alpha: Don't tell people not to package this.
4992
4993 * bootstrap: Don't assume $(...) works; use `...` instead.
4994 Problem reported by Paul Hilfinger. Also, diagnose non-GNU
4995 gettext better.
4996
4997 * doc/bison.texinfo (Decl Summary, Bison Options): Clarify what's
4998 put into the -d output file, and mention what to do if YYSTYPE is
4999 defined as a macro.
5000
5001 2004-05-24 Paul Eggert <eggert@cs.ucla.edu>
5002
5003 Undo change made earlier today: it caused autopoint to not bring
5004 in ABOUT-NLS. Ouch. Instead, substitute our own diagnostic for
5005 autopoint's.
5006
5007 * bootstrap: Check that gettext version matches what's in
5008 configure.ac. Warn users to ignore robots.txt ERROR 404.
5009 * bootstrap: Undo today's earlier change (logged below).
5010 * configure.ac (AM_GNU_GETTEXT_VERSION): Likewise.
5011
5012 The gettext version checking is causing more trouble than it's
5013 curing; remove it. Problem reported by Paul Hilfinger.
5014
5015 * bootstrap: Issue a warning that one can expect a message
5016 'AM_GNU_GETTEXT is used, but not AM_GNU_GETTEXT_VERSION'.
5017 * configure.ac (AM_GNU_GETTEXT_VERSION): Remove.
5018
5019 2004-05-23 Paul Eggert <eggert@cs.ucla.edu>
5020
5021 Ensure that the C++ compiler used for testing actually works on a
5022 simple test program; if not, skip the C++-related tests. Problem
5023 reported by Vin Shelton in:
5024 http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00026.html
5025
5026 * m4/cxx.m4: New file.
5027 * configure.ac (BISON_TEST_FOR_WORKING_CXX_COMPILER): Add.
5028 * tests/atlocal.in (BISON_CXX_WORKS): Add.
5029 * tests/local.at (AT_COMPILE_CXX): Use it.
5030
5031 2004-05-21 Paul Eggert <eggert@cs.ucla.edu>
5032
5033 * data/glr.c (yylloc): Output this macro even if locations are not
5034 being generated, as the GLR parser needs it even in that case.
5035 Problem reported by Troy A. Johnson
5036 <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=195946>.
5037
5038 * configure.ac (AC_INIT): Update to 1.875e.
5039
5040 2004-05-21 Paul Eggert <eggert@cs.ucla.edu>
5041
5042 * NEWS: Version 1.875d.
5043 * configure.ac (AC_INIT): Likewise.
5044 * src/parse-gram.c, src/parse-gram.h: Regenerate with 1.875d.
5045
5046 * configure.ac (--enable-gcc-warnings): Do not enable -Wshadow,
5047 -Wmissing-prototypes, or -Wstrict-prototypes for C++. The current
5048 lalr1.cc runs afoul of the first, and the last two are no longer
5049 supported by GCC 3.4.0.
5050 * README: Mention GNU m4 1.4 or later; mention m4 patches.
5051 * HACKING: Use ./bootstrap, not "make update" to import foreign files.
5052
5053 2004-05-06 Paul Eggert <eggert@cs.ucla.edu>
5054
5055 * src/muscle_tab.c (hash_muscle): Accept and return size_t, not
5056 unsigned int, for compatibility with latest gnulib hash module.
5057 * src/state.c (state_hash, state_hasher): Likewise.
5058 * src/symtab.c (hash_symbol, hash_symbol_hasher): Likewise.
5059 * src/uniqstr.c (hash_uniqstr): Likewise.
5060
5061 2004-05-03 Paul Eggert <eggert@cs.ucla.edu>
5062
5063 * NEWS: Unescaped newlines are no longer allowed in char & strings.
5064
5065 * src/scan-gram.l (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER,
5066 SC_CHARACTER,SC_STRING>): Reject unescaped newlines in
5067 character and string literals.
5068 (unexpected_end): New function.
5069 (unexpected_eof): Use it.
5070 (unexpected_newline): New function.
5071 (<INITIAL,SC_AFTER_IDENTIFIER,SC_PRE_CODE>): Coalesce duplicate
5072 actions.
5073
5074 * NEWS: Document %expect-rr.
5075
5076 * bootstrap (--gnulib-srcdir=*, --cvs-user=*):
5077 Fix typo by replacing $1 with $option.
5078 Remove more 'intl'-related files.
5079 Don't DEFUN AM_INTL_SUBDIR twice.
5080
5081 * lib/.cvsignore: Add strndup.h. Remove memchr.c, memcmp.c,
5082 memrchr.c, strcasecmp.c, strchr.c, strrchr.c, strspn.c, strtol.c,
5083 strtoul.c.
5084 * m4/.cvsignore: Add exitfail.m4, extensions.m4, gnulib.m4,
5085 hard-locale.m4, mbstate_t.m4, strerror_r.m4, strndup.m4,
5086 xstrndup.m4. Remove glibc21.m4, intdiv0.m4, inttypes-pri.m4,
5087 inttypes.m4, inttypes_h.m4, isc-posix.m4, lcmessage.m4,
5088 stdint_h.m4, uintmax_t.m4, ulonglong.m4.
5089 * src/.cvsignore: Add *.output.
5090
5091 * src/parse-gram.y: Put copyright notice inside %{ %} so it
5092 gets copied to the output file.
5093
5094 2004-04-28 Paul Eggert <eggert@twinsun.com>
5095
5096 Get files from the gnulib and po repositories, instead of relying
5097 on them being in our CVS. Upgrade to latest versions of gnulib
5098 and Automake.
5099
5100 * Makefile.am (SUBDIRS): Remove m4; Automake now does m4.
5101 * bootstrap: Bootstrap from gnulib and po repositories.
5102 Much of this code was stolen from GNU diff and GNU tar's bootstrap.
5103 * README-cvs: Document these changes. Remove version numbers from
5104 mentions of build tools, since they change so often. Mention Flex.
5105
5106 * configure.ac (AC_CONFIG_MACRO_DIR): Add, with m4 as arg.
5107 (gl_USE_SYSTEM_EXTENSIONS): Add.
5108 (AC_GNU_SOURCE, AC_AIX, AC_MINIX):
5109 Remove; no longer needed, as gl_USE_SYSTEM_EXTENSIONS
5110 does this for us.
5111 (AC_ISC_POSIX): Remove; we no longer support this
5112 ancient OS, as it gets in the way of latest Autoconf & gnulib.
5113 (AC_HEADER_STDC): Remove: we now assume C89 or better.
5114 (AC_CHECK_HEADERS_ONCE): Use instead of AC_CHECK_HEADERS.
5115 Do not check for C89 headers, except for locale.h which is used
5116 by the Yacc library and must port to K&R hosts.
5117 (AC_CHECK_FUNCS_ONCE): Use instead of AC_CHECK_FUNCS.
5118 Do not check for C89 functions, except for setlocale which is
5119 used by the Yacc library.
5120 (AC_CHECK_DECLS, AC_REPLACE_FUNCS): Remove; no longer needed.
5121 (gl_DIRNAME, gl_ERROR, gl_FUNC_ALLOCA, gl_FUNC_MEMCHR,
5122 gl_FUNC_MEMRCHR, gl_FUNC_STPCPY, gl_FUNC_STRNLEN, gl_FUNC_STRTOL,
5123 gl_GETOPT, gl_HASH, gl_MBSWIDTH, gl_OBSTACK, gl_QUOTE,
5124 gl_QUOTEARG, gl_XALLOC, jm_FUNC_GLIBC_UNLOCKED_IO, jm_FUNC_MALLOC,
5125 AM_GNU_GETTEXT): Remove; now done by:
5126 (GNULIB_AUTOCONF_SNIPPET): Add. "bootstrap" builds this for us.
5127 (AC_CONFIG_FILES): Remove m4/Makefile, as Automake now does this
5128 for us.
5129
5130 * lib/Makefile.am: Include gnulib.mk, built for us by "bootstrap".
5131 (BUILT_SOURCES, EXTRA_DIST, MOSTLYCLEANFILES):
5132 Define to empty, as gnulib.mk will do the rest for us.
5133 ($(libbison_a_OBJECTS), stdbool.h): Remove, as gnulib.mk does this
5134 for us.
5135 (libbison_a_SOURCES): Define to $(lib_SOURCES) now.
5136 (lib_SOURCES): New symbol, containing only the non-gnulib libs.
5137
5138 * src/files.c: Include gnulib's xstrndup.h.
5139
5140 * src/system.h (MALLOC): Use xnmalloc, for better overflow checking.
5141 (REALLOC): Use xnrealloc, for likewise.
5142 (xstrndup, stpcpy): Remove decls, as gnulib does this for us now.
5143 (strnlen, memrchr): Remove decls; functions no longer used.
5144 Include <stpcpy.h>.
5145
5146 * config/depcomp, config/install-sh, lib/alloca.c, lib/argmatch.c,
5147 lib/argmatch.h, lib/basename.c, lib/dirname.c, lib/dirname.h,
5148 lib/error.c, lib/error.h, lib/getopt.c, lib/getopt.h,
5149 lib/getopt1.c, lib/gettext.h, lib/hash.c, lib/hash.h,
5150 lib/malloc.c, lib/mbswidth.c, lib/mbswidth.h, lib/memchr.c,
5151 lib/memcmp.c, lib/memrchr.c, lib/obstack.c, lib/obstack.h,
5152 lib/quote.c, lib/quote.h, lib/quotearg.c, lib/quotearg.h,
5153 lib/realloc.c, lib/stdbool_.h, lib/stpcpy.c, lib/strcasecmp.c,
5154 lib/strchr.c, lib/strncasecmp.c, lib/strnlen.c, lib/strrchr.c,
5155 lib/strspn.c, lib/strtol.c, lib/strtoul.c, lib/unlocked-io.h,
5156 lib/xalloc.h, lib/xmalloc.c, lib/xstrdup.c, lib/xstrndup.c,
5157 m4/Makefile.am, m4/alloca.m4, m4/dirname.m4, m4/dos.m4,
5158 m4/error.m4, m4/getopt.m4, m4/hash.m4, m4/malloc.m4,
5159 m4/mbrtowc.m4, m4/mbswidth.m4, m4/memchr.m4, m4/memcmp.m4,
5160 m4/memrchr.m4, m4/obstack.m4, m4/onceonly.m4, m4/prereq.m4,
5161 m4/quote.m4, m4/quotearg.m4, m4/realloc.m4, m4/stdbool.m4,
5162 m4/stpcpy.m4, m4/strnlen.m4, m4/strtol.m4, m4/strtoul.m4,
5163 m4/unlocked-io.m4, m4/xalloc.m4, po/LINGUAS, po/Makefile.in.in,
5164 po/Makevars, po/da.po, po/de.po, po/es.po, po/et.po, po/fr.po,
5165 po/hr.po, po/id.po, po/it.po, po/ja.po, po/ms.po, po/nl.po,
5166 po/pt_BR.po, po/ro.po, po/ru.po, po/sv.po, po/tr.po:
5167 Remove, as these files are now generated automatically
5168 by bootstrap or automake.
5169
5170 * po/ChangeLog: Remove: all but one entry was a duplicate
5171 of this file, and I moved that 2000-11-02 entry here.
5172
5173 * config/.cvsignore: Add Makefile, depcomp, install-sh.
5174 * lib/.cvsignore: Add alloca.c, alloca.h, alloca_.h, argmatch.c,
5175 argmatch.h, basename.c, dirname.c, dirname.h, error.c, error.h,
5176 exit.h, exitfail.c, exitfail.h, getopt.c, getopt.h, getopt1.c,
5177 getopt_int.h, gettext.h, gnulib.mk, hard-locale.c, hard-locale.h,
5178 hash.c, hash.h, malloc.c, mbswidth.c, mbswidth.h, memchr.c,
5179 memcmp.c, memrchr.c, obstack.c, obstack.h, quote.c, quote.h,
5180 quotearg.c, quotearg.h, realloc.c, stdbool_.h, stpcpy.c, stpcpy.h,
5181 strcasecmp.c, strchr.c, stripslash.c, strncasecmp.c, strndup.c,
5182 strnlen.c, strrchr.c, strspn.c, strtol.c, strtoul.c,
5183 unlocked-io.h, xalloc.h, xmalloc.c, xstrdup.c, xstrndup.c,
5184 xstrndup.h.
5185 * m4/.cvsignore: Remove Makefile, Makefile.in. Add alloca.m4,
5186 dirname.m4, dos.m4, error.m4, getopt.m4, hash.m4, mbrtowc.m4,
5187 mbswidth.m4, obstack.m4, onceonly.m4, quote.m4, quotearg.m4,
5188 stdbool.m4, stpcpy.m4, strnlen.m4, unlocked-io.m4, xalloc.m4.
5189 * po/.cvsignore: Add *.po, LINGUAS, Makefile.in.in, Makevars.
5190 * src/.cvsignore: Remove *_.c.
5191
5192
5193 * Makefile.maint (GZIP_ENV): Don't use --rsyncable if gzip doesn't
5194 support it. (The latest stable gzip doesn't.)
5195
5196 2004-04-27 Paul Eggert <eggert@twinsun.com>
5197
5198 * data/lalr1.cc (Parser::stos_) [! YYDEBUG]: Define even in this
5199 case, as stos_ is now used by destructors due to the 2004-02-09
5200 change.
5201
5202 Remove more K&R C support.
5203 * lib/libiberty.y (PARAMS): Remove. All uses removed.
5204 * lib/subpipe.c (errno): Remove decl.
5205 Include <stdlib.h> unconditionally.
5206 (EXIT_FAILURE): Remove macro.
5207 * src/complain.c (vfprintf, strerror): Remove.
5208 * src/system.h: Include limits.h, stdlib.h, string.h, locale.h
5209 unconditionally.
5210 (EXIT_FAILURE, EXIT_SUCCESS, setlocale): Remove defns.
5211 Use latest Autoconf recommendations for including inttypes.h, stdint.h.
5212 (strchr, strspn, memchr): Remove decls.
5213 * tests/calc.at (_AT_DATA_CALC_Y): Include stdlib.h, string.h
5214 unconditionally. Do not declare perror.
5215 * tests/conflicts.at (%nonassoc and eof): Include stdlib.h
5216 unconditionally.
5217
5218 * src/complain.c (_): Remove useless defn, as system.h defines this.
5219
5220 * lib/bitset.h (__INT_TO_PTR): Remove; workaround no longer needed
5221 with latest obstack.h.
5222 * lib/ebitset.c (ebitset_elt_alloc): Don't bother to cast args
5223 to procedure types, as obstack.h now does that for us.
5224 * lib/lbitset.c (lbitset_elt_alloc): Likewise.
5225
5226 * lib/subpipe.h [HAVE_SYS_TYPES_H]: Include <sys/types.h>,
5227 so that this include file can stand alone.
5228 * lib/subpipe.c: Do not include <sys/types.h>, as subpipe.h
5229 does this now. Include subpipe.h first after config.h, to
5230 test whether it can stand alone.
5231
5232 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Don't
5233 declare yyerror when using lalr.cc, as GCC 3.4.0 warns about the
5234 unused declaration.
5235
5236 * tests/synclines.at (%union synch line): Put a dummy member in
5237 the union, because empty unions aren't allowed in C. Caught
5238 by GCC 3.4.0.
5239
5240 2004-04-13 Jim Meyering <jim@meyering.net>
5241
5242 * src/conflicts.c (conflicts_print): Correct format string typo:
5243 use `%%' to produce literal `%'. (trivial change)
5244
5245 2004-03-30 Paul Eggert <eggert@twinsun.com>
5246
5247 * src/getargs.c (version): Update copyright year to 2004.
5248
5249 * data/c.m4 (b4_int_type): Use 'short int' rather than
5250 'short', and similarly for 'long', 'unsigned', etc.
5251 * data/glr.c (YYTRANSLATE, yyconfl, yySymbol, yyItemNum,
5252 yygetLRActions, yyprocessOneStack, yyrecoverSyntaxError,
5253 yy_yypstack, yydumpstack): Likewise.
5254 * data/lalr1.cc (user_token_number_max_, user_token_number_max_,
5255 translate_, seq_, [], pop, Slice, range_, operator+, operator+=):
5256 Likewise.
5257 * data/yacc.c (b4_int_type, yyss, YYSTACK_BYTES, yysigned_char,
5258 yy_stack_print, yyparse): Likewise.
5259 * doc/bison.texinfo (Prologue, Multiple Types): Likewise.
5260 * lib/bbitset.h (bitset_word, BITSET_WORD_BITS): Likewise.
5261 * lib/bitset.c (bitset_print): Likewise.
5262 * lib/bitset_stats.c (bitste_log_histogram_print): Likewise.
5263 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
5264 * lib/bitsetv.c (bitsetv_dump): Likewise.
5265 * lib/ebitset.c (EBITSET_ELT_BITS, ebitset_elt_alloc): Likewise.
5266 * lib/lbitset.c (LBITSET_ELT_BITS, lbitset_elt_alloc, debug_lbitset):
5267 Likewise.
5268 * src/LR0.c (allocate_itemsets): Likewise.
5269 * src/gram.h (rule_number, rule): Likewise.
5270 * src/lalr.h (goto_number): Likewise.
5271 * src/nullable.c (nullable_compute): Likewise.
5272 * src/output.c (prepare_rules): Likewise.
5273 * src/relation.c (relation_print, relation_digraph): Likewise.
5274 * src/relation.h (relation_node): Likewise.
5275 * src/state.h (state_number, transitions, errs, reductions,
5276 struct state): Likewise.
5277 * src/symtab.h (symbol_number, struct symbol): Likewise.
5278 * src/tables.c (vector_number, tally, action_number,
5279 default_goto, goto_actions): Likewise.
5280 * tests/existing.at (GNU Cim Grammar): Likewise.
5281 * tests/regression.at (Web2c Actions): Likewise.
5282
5283 * src/output.c (muscle_insert_short_int_table): Renamed from
5284 muscle_insert_short_table. All uses changed.
5285
5286 2004-03-25 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
5287
5288 * src/parse-gram.y: Define PERCENT_EXPECT_RR.
5289 (declaration): Replace expected_conflicts with expected_sr_conflicts.
5290 Add %expect-rr rule.
5291
5292 * src/scan-gram.l: Recognize %expect-rr.
5293
5294 * src/conflicts.h (expected_sr_conflicts): Rename from
5295 expected_conflicts.
5296 (expected_rr_conflicts): Declare.
5297
5298 * src/conflicts.c (expected_sr_conflicts): Rename from
5299 expected_conflicts.
5300 (expected_rr_conflicts): Define.
5301 (conflicts_print): Check r/r conflicts against expected_rr_conflicts
5302 for GLR parsers.
5303 Use expected_sr_conflicts in place of expected_conflicts.
5304 Warn if expected_rr_conflicts used in non-GLR parser.
5305
5306 * doc/bison.texinfo: Add documentation for %expect-rr.
5307
5308 2004-03-08 Paul Eggert <eggert@gnu.org>
5309
5310 Add support for hex token numbers. Suggested by Odd Arild Olsen in
5311 <http://lists.gnu.org/archive/html/bison-patches/2004-03/msg00000.html>.
5312
5313 * NEWS: Document hexadecimal tokens, no NUL bytes, %destructor
5314 in lalr1.cc.
5315 * doc/bison.texinfo (Token Decl): Add hexadecimal token numbers.
5316 * src/scan-gram.l (scan_integer): New function.
5317 ({int}): Use it.
5318 (0[xX][0-9abcdefABCDEF]+): New pattern, to support hex numbers.
5319 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>, \\x[0-9abcdefABCDEF]+,
5320 handle_action_dollar, handle_action_at, convert_ucn_to_byte):
5321 Say "long int", not "long", for uniformity with GNU style.
5322
5323 2004-02-25 Paul Eggert <eggert@twinsun.com>
5324
5325 * tests/local.at (AT_COMPILE, AT_COMPILE_CXX): Ignore stdout from
5326 compilers. This fixes a problem with Intel's C++ compiler being
5327 chatty, reported by Guido Trentalancia in
5328 <http://lists.gnu.org/archive/html/bug-bison/2004-02/msg00030.html>.
5329
5330 2004-02-09 Alexandre Duret-Lutz <adl@gnu.org>
5331
5332 Support %destructor and merge error locations in lalr1.cc.
5333
5334 * data/lalr1.cc (b4_cxx_destruct_def): New macro.
5335 (Parser::stos_): Define unconditionally.
5336 (Parser::destruct_): New method. Generate its body with
5337 b4_yydestruct_generate.
5338 (Parser::error_start_): New attribute.
5339 (Parser::parse) <yyerrlab, yyerrlab1>: Call destruct_ on erroneous
5340 token which are discarded.
5341 (Parser::parse) <yyerrlab, yyerrorlab, yyerrlab1>: Update
5342 error_start_ when erroneous token are discarded.
5343 (Parser::parse) <yyerrlab1>: Compute the location of the error
5344 token so that it covers all the discarded tokens.
5345 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust so
5346 it can be called with `%skeleton "lalr1.cc"', and do that.
5347
5348 2004-02-02 Paul Eggert <eggert@twinsun.com>
5349
5350 * src/Makefile.am (AM_CPPFLAGS): New macro. It mentions
5351 $(top_srcdir)/lib and ../lib. This fixes a bug reported
5352 by Paul Hilfinger; the old INCLUDES value didn't mention ../lib.
5353 There's no need to mention top_builddir since Automake does that
5354 for us.
5355 (INCLUDES): Remove, as Automake says it's obsolescent.
5356 Contents migrated into AM_CPPFLAGS as described above.
5357 * lib/Makefile.am (INCLUDES): Remove; obsolescent.
5358
5359 2004-01-14 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
5360
5361 * data/glr.c (yytokenName): Bullet-proof against YYEMPTY token.
5362 (yyreportSyntaxError): Handle case where lookahead token is
5363 YYEMPTY.
5364
5365 2004-01-13 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
5366
5367 * data/glr.c: Put casts on uses of YYREALLOC and YYMALLOC so that
5368 resulting parsers are compilable with C++.
5369
5370 2003-12-23 Paul Eggert <eggert@twinsun.com>
5371
5372 * config/depcomp, config/install-sh: Sync with Automake 1.8.
5373 * src/output.c (output_skeleton): Rename local var.
5374 * tests/input.at (Torturing the Scanner): Don't use \x0 or \0 in
5375 Bison tokens, as this runs afoul of the 2003-10-07 change that
5376 disallowed NUL bytes in character constants or string literals.
5377
5378 * tests/local.at: Require Autoconf 2.59's Autotest.
5379 * tests/testsuite.at: Don't include local.at, since we now assume
5380 Autoconf 2.59 or later. Autoconf 2.59 had some problems with
5381 including it.
5382 * tests/Makefile.am ($(TESTSUITE)): Remove warning about ignoring
5383 multiple inclusion warnings.
5384
5385 2003-12-02 Akim Demaille <akim@epita.fr>
5386
5387 * doc/bison.texinfo (How Can I Reset the Parser): More about start
5388 conditions.
5389 From Bruno Haible.
5390
5391 2003-11-18 Alexandre Duret-Lutz <adl@gnu.org>
5392
5393 * doc/bison.texinfo (Bison Options): Escape `@' in `$@'.
5394
5395 2003-10-07 Paul Eggert <eggert@twinsun.com>
5396
5397 * tests/Makefile.am (clean-local): Don't run 'testsuite --clean'
5398 if testsuite doesn't exist.
5399
5400 * doc/bison.texinfo (Symbols): NUL bytes are not allowed in string
5401 literals, unfortunately.
5402 * src/scan-gram.l (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>):
5403 Complain about NUL bytes in character constants or string literals.
5404
5405 2003-10-05 Paul Eggert <eggert@twinsun.com>
5406
5407 * NEWS: Don't document %no-default-prec, as it's still
5408 too experimental.
5409 * doc/bison.texinfo: Document %no-default-prec only if
5410 the defaultprec flag is set. Normally it's not.
5411
5412 2003-10-04 Paul Eggert <eggert@twinsun.com>
5413
5414 * data/glr.c (b4_rhs_value, b4_rhs_location): Yield a
5415 non-modifiable lvalue, instead of a modifiable one.
5416 * doc/bison.texinfo (Actions): Document that $$ can
5417 be assigned to. Do not claim that $$ and $N are
5418 array element references: user code should not rely on this.
5419
5420 2003-10-01 Paul Eggert <eggert@twinsun.com>
5421
5422 * src/parse-gram.h (PERCENT_NO_DEFAULT_PREC): New token.
5423 (grammar_declaration): Use it.
5424 * src/scan-gram.l: New token %no-default-prec.
5425 * tests/conflicts.at: Revamp tests to use %no-default-prec.
5426 * NEWS, doc/bison.texinfo: Document the above.
5427
5428 2003-10-01 Akim Demaille <akim@epita.fr>
5429
5430 VCG no longer supports long_straight_phase.
5431
5432 * src/vcg.c, src/vcg.h: Remove the handling of long_straight_phase.
5433 * src/print_graph.c (print_graph): Adjust.
5434
5435 2003-09-30 Frank Heckenbach <frank@g-n-u.de>
5436 and Paul Eggert <eggert@twinsun.com>
5437
5438 * doc/bison.texinfo (Decl Summary, Contextual Precedence,
5439 Table of Symbols): Document %default-prec.
5440 * src/parse-gram.y (PERCENT_DEFAULT_PREC): New token.
5441 (grammar_declaration): Set default_prec on %default-prec.
5442 * src/scan-gram.l (%default-prec): New token.
5443 * src/reader.h (default_prec): New flag.
5444 * src/reader.c: Likewise.
5445 (packgram): Handle it.
5446 * tests/conflicts.at (%default-prec without %prec,
5447 %default-prec with %prec, %default-prec 1): New tests.
5448
5449 2003-09-30 Paul Eggert <eggert@twinsun.com>
5450
5451 * tests/testsuite.at: Include local.at, not input.at, fixing
5452 a typo in the 2003-08-25 patch.
5453
5454 2003-08-27 Akim Demaille <akim@epita.fr>
5455
5456 * data/lalr1.cc (yyparse) [__GNUC__]: "Use" yyerrorlab to pacify
5457 GCC warnings.
5458
5459 2003-08-26 Akim Demaille <akim@epita.fr>
5460
5461 * config/announce-gen (print_changelog_deltas): Neutralize "<#" as
5462 "<\#" to avoid magic from Gnus when posting parts of this script.
5463
5464 2003-08-26 Akim Demaille <akim@epita.fr>
5465
5466 * data/lalr1.cc (Parser::report_syntax_error_): New, extracted from
5467 (Parser::parse): here.
5468 Adjust: nerrs and errstatus is now replaced by...
5469 (Parser::nerrs_, Parser::errstatus_): New.
5470
5471 2003-08-25 Akim Demaille <akim@epita.fr>
5472
5473 * config/announce-gen, Makefile.cfg: New.
5474 * Makefile.am: Adjust.
5475 * GNUmakefile, Makefile.maint: Update from CVS Autoconf, but
5476 keeping local WGET and WGETFLAGS modifications from Paul Eggert.
5477
5478 2003-08-25 Akim Demaille <akim@epita.fr>
5479
5480 When reducing initial empty rules, Bison parser read an initial
5481 location that is not defined. This results in garbage, and that
5482 affects Bison's own parser. Therefore we need (i) to extend Bison
5483 to support a means to initialize this location, and (ii) to use
5484 this CVS Bison to fix CVS Bison's parser.
5485
5486 * src/reader.h, reader.c (epilogue_augment): Remove, replace
5487 with...
5488 * src/muscle_tab.h, src/muscle_tab.c (muscle_code_grow): this.
5489 * src/parse-gram.y: Adjust.
5490 (%initial-action): New.
5491 (%error-verbose): Since we require CVS Bison, there is no reason
5492 not to use it.
5493 * src/scan-gram.l: Adjust.
5494 * src/Makefile.am (YACC): New, to make sure we use our own parser.
5495 * data/yacc.c (yyparse): Use b4_initial_action.
5496
5497 2003-08-25 Akim Demaille <akim@epita.fr>
5498
5499 * doc/bison.texinfo: Don't promote stdout for error messages.
5500
5501 2003-08-25 Akim Demaille <akim@epita.fr>
5502
5503 * data/lalr1.cc (Parser::reduce_print_): Remove unused yyi.
5504 From Alexandre Duret-Lutz.
5505
5506 2003-08-25 Akim Demaille <akim@epita.fr>
5507
5508 Version 1.875c.
5509
5510 2003-08-25 Akim Demaille <akim@epita.fr>
5511
5512 * data/lalr1.cc (Parser::stack_print_, YY_STACK_PRINT): New.
5513 Use them.
5514
5515 2003-08-25 Akim Demaille <akim@epita.fr>
5516
5517 * data/lalr1.cc (Parser::reduce_print_): New.
5518 Use it.
5519
5520 2003-08-25 Akim Demaille <akim@epita.fr>
5521
5522 Have lalr1.cc catch with Paul Eggert's patch to fix the infinite
5523 error recovery loops. This patch is based on
5524 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00000.html>.
5525 Also, augment the similarity between lalr1.cc and yacc.c.
5526 Note: the locations of error recovery rules are not correct yet.
5527
5528 * data/lalr1.cc: Comment changes to augment the similarity between
5529 lalr1.cc and yacc.c.
5530 (YYERROR): Goto to yyerrorlab, not yyerrlab1.
5531 (yyerrlab1): Remove, but where it used to be (now the bottom part of
5532 yyerrlab), when hitting EOF, pop the whole stack here instead of
5533 merely falling thru the default error handling mechanism.
5534 (yyerrorlab): New label, with the old contents of YYERROR,
5535 plus the following change: pop the stack of rhs corresponding
5536 to the production that invoked YYERROR. That is how Yacc
5537 behaves (required by POSIX).
5538 * tests/calc.at (AT_CHECK_CALC_LALR1_CC): No longer expected to
5539 fail.
5540
5541 2003-08-25 Akim Demaille <akim@epita.fr>
5542
5543 Tune local.at so that people can "autom4te -l autotest calc.at -o
5544 calc" for instance, to extract a sub test suite.
5545
5546 * tests/testsuite.at: Move the initialization, Autotest version
5547 requirement, and AT_TESTED invocation into...
5548 * tests/local.at: here.
5549 * tests/testsuite.at: Include it for compatibility with Autoconf
5550 2.57.
5551 * tests/Makefile.am ($(TESTSUITE)): Report that the warning should
5552 be ignore.
5553
5554 2003-08-04 Paul Eggert <eggert@twinsun.com>
5555
5556 Rework code slightly to avoid gcc -Wtraditional warnings.
5557 * data/glr.c (yyuserMerge): Return void, not YYSTYPE.
5558 The returned value is now stored in *YY0. All callers changed.
5559 * src/output.c (merge_output): Adjust to the above change.
5560
5561 2003-07-26 Paul Eggert <eggert@twinsun.com>
5562
5563 * data/glr.c (YYASSERT): New macro.
5564 (yyfillin, yydoAction, yyglrReduce, yysplitStack,
5565 yyresolveStates, yyprocessOneStack):
5566 Use `YYASSERT (FOO);' rather than `if (! (FOO)) abort ();'.
5567 Derived from a suggestion by Frank Heckenbach.
5568
5569 2003-07-25 Paul Eggert <eggert@twinsun.com>
5570
5571 * data/glr.c (yyglrReduce): Don't use C89 string concatenation,
5572 for portability to K&R C (after ansi2knr, presumably). See
5573 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00041.html>
5574 by Frank Heckenbach, though I have omitted the structure-initialization
5575 part of his glr-knr.diff patch since I recall that the Portable
5576 C Compiler didn't require that change.
5577
5578 Let the user specify how to allocate and free memory.
5579 Derived from a suggestion by Frank Heckenbach in
5580 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00041.html>.
5581 * data/glr.c (YYFREE, YYMALLOC, YYREALLOC): New macros.
5582 All uses of free, malloc, realloc changed to use these macros,
5583 and unnecessary casts removed.
5584 * data/yacc.c (YYFREE, YYMALLOC): Likewise.
5585
5586 2003-07-06 Matthias Mann <MatthiasMann@gmx.de>
5587
5588 * data/lalr1.cc (operator<<(std::ostream&, const Position&)):
5589 use s.empty() rather than s == "" to test for empty string; see
5590 <http://lists.gnu.org/archive/html/bison-patches/2003-07/msg00003.html>
5591 (trivial change)
5592
5593 2003-06-25 Akim Demaille <akim@epita.fr>
5594
5595 * config/depcomp, config/install-sh: Update from masters.
5596
5597 2003-06-20 Paul Eggert <eggert@twinsun.com>
5598
5599 * data/glr.c (YYLLOC_DEFAULT): Parenthesize arguments as needed,
5600 and return properly parenthesized result.
5601 * data/lalar1.cc (YYLLOC_DEFAULT): Likewise.
5602 * data/yacc.c (YYLLOC_DEFAULT): Likewise.
5603 Remove unnecessary parentheses from uses.
5604 * doc/bison.texinfo (Location Default Action): Describe the
5605 conventions for parentheses.
5606
5607 2003-06-19 Paul Eggert <eggert@twinsun.com>
5608
5609 * data/glr.c (yyremoveDeletes, yy_reduce_print, yyglrReduce,
5610 yyreportTree): Do not assume that size_t is the same width as int,
5611 when printing sizes. Print sizes using an unsigned format.
5612 Problem reported by Frank Heckenbach in
5613 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00035.html>.
5614
5615 Port to Forte Developer 7 C compiler.
5616 * data/glr.c (struct YYLTYPE): If locations are not being used,
5617 declare a single dummy member, as empty structs do not conform
5618 to the C standard.
5619 (YYERROR, YYBACKUP): Do not use "do { ...; return foo; } while (0)";
5620 the Forte Developer 7 C compiler complains that end-of-loop
5621 code is not reached.
5622
5623 2003-06-17 Paul Eggert <eggert@twinsun.com>
5624
5625 * lib/libiberty.h (PARAMS): Spell argument as Args, not as X, to
5626 avoid warnings from picky compilers about redefinition of PARAMS.
5627
5628 2003-06-17 Paul Eggert <eggert@twinsun.com>
5629
5630 Version 1.875b.
5631
5632 * NEWS: Document 1.875b.
5633
5634 * lib/bbitset.h: Do not include config.h; that's the includer's job.
5635 Do not include <sys/types.h>; shouldn't be needed on a C89 host.
5636 * lib/bitset.h (bitset_compatible_p): Indent as per GNU standard.
5637 Don't use 'index' in comments, as it's a builtin fn on some hosts.
5638 * lib/bitset_stats.c: Include gettext.h unconditionally, as
5639 per recent gettext manual's suggestion.
5640 * lib/ebitset.c (ebitset_resize, ebitset_unused_clear):
5641 Use prototypes, not old-style definitions.
5642 * lib/lbitset.c (lbitset_unused_clear): Likewise.
5643 * lib/vbitset.c (vbitset_resize, vbitset_ones, vbitset_zero,
5644 vbitset_empty_p, vbitset_copy1, vbitset_not, vbitset_equal_p,
5645 vbitset_subset_p, vbitset_disjoint_p, vbitset_and, vbitset_and_cmp,
5646 vbitset_andn, vbitset_andn_cmp, vbitset_or, vbitset_or_cmp,
5647 vbitset_xor, vbitset_xor_cmp, vbitset_and_or, vbitset_and_or_cmp,
5648 vbitset_andn_or, vbitset_andn_or_cmp, vbitset_or_and,
5649 vbitset_or_and_cmp, vbitset_copy): Likewise.
5650
5651 * lib/libiberty.h: Do not include config.h; that's the includer's job.
5652 Do not include <stdlib.h>.
5653 (PARAMS): Define unconditionally for C89.
5654 (ATTRIBUTE_NORETURN): Remove.
5655 (ATTRIBUTE_UNUSED): Define unconditionally.
5656
5657 Upgrade to 2003-06-08 libbitset, submitted by Michael Hayes in:
5658 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00005.html>
5659 * lib/Makefile.am (bitsets_sources): Add vbitset.c, vbitset.h.
5660 * lib/vbitset.c, lib/vbitset.h: New files.
5661 * lib/abitset.c, lib/bbitset.h, lib/bitset.c, lib/bitset.h,
5662 lib/bitset_stats.c, lib/ebitset.c, lib/lbitset.c: Import
5663 from libbitset.
5664
5665 * doc/bison.texinfo (How Can I Reset the Parser): Renamed from
5666 `How Can I Reset @code{yyparse}', since texinfo does not allow
5667 arbitrary @ in node names.
5668
5669 * m4/Makefile.am (EXTRA_DIST): Add the following files, which
5670 shouldn't be needed according to the gettext 0.12.1 documentation
5671 but which seem to be needed anyway: codeset.m4 glibc21.m4
5672 intdiv0.m4 inttypes-pri.m4 inttypes.m4 inttypes_h.m4 isc-posix.m4
5673 lcmessage.m4 nls.m4 po.m4 stdint_h.m4 uintmax_t.m4 ulonglong.m4.
5674 * po/Makefile.in.in: Upgrade to gettext 0.12.1 version.
5675
5676 * lib/.cvsignore: Add stdbool.h.
5677 * m4/.cvsignore: Add nls.m4, po.m4.
5678
5679 Upgrade to CVS gnulib.
5680 * stdbool_.h: File renamed from stdbool.h.in.
5681 * configure.ac (AM_STDBOOL_H): Invoke this instead of
5682 AC_HEADER_STDBOOL.
5683 (AM_GNU_GETTEXT): Put brackets around args, as latest manual suggests.
5684 (AM_GNU_GETTEXT_VERSION): Update to 0.12.1.
5685 * lib/Makefile.am (EXTRA_DIST): Add stdbool_.h.
5686 (MOSTLYCLEANFILES): New var.
5687 ($(libbison_a_OBJECTS)): Depend on $(STDBOOL_H).
5688 (stdbool.h): New rule.
5689 * lib/dirname.c, lib/dirname.h, lib/hash.c, lib/hash.h,
5690 lib/malloc.c, lib/obstack.h, lib/quote.c, lib/realloc.c,
5691 lib/strcasecmp.c, lib/xalloc.h, m4/alloca.m4, m4/onceonly.m4,
5692 m4/quote.m4: Upgrade to today's gnulib.
5693
5694 * tests/calc.at (AT_CHECK_CALC): New option EXPECTED-TO-FAIL.
5695 (AT_CHECK_CALC_LALR1_CC): Use it, since the C++ LALR parser fails
5696 the tests right now.
5697 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Ensure yylex and
5698 yyerror are declared before use; C99 requires this.
5699
5700 2003-06-09 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
5701
5702 * data/glr.c (YYERROR): Update definition to reset yyerrState to 0
5703 first.
5704 (yyrecoverSyntaxError): Correct the logic for setting and testing
5705 yyerrState.
5706 Correct comment on handling EOF.
5707 Allow states with only a default reduction, rather than failing
5708 (I can't quite reconstruct why these were not allowed before).
5709
5710 Fixes to avoid problem that $-N rules in GLR parsers can cause
5711 buffer overruns, corrupting state.
5712
5713 * src/output.c (prepare_rules): Output max_left_semantic_context
5714 definition.
5715 * src/reader.h (max_left_semantic_context): New variable declaration.
5716 * src/scan-gram.l (max_left_semantic_context): Define.
5717 (handle_action_dollar): Update max_left_semantic_context.
5718 * data/glr.c (YYMAXLEFT): New definition.
5719 (yydoAction): Increase size of yyrhsVals by YYMAXLEFT.
5720 (yyresolveAction): Ditto.
5721
5722 Fixes to problems with location handling in GLR parsers reported by
5723 Frank Heckenbach (2003/06/05).
5724
5725 * data/glr.c (YYLTYPE): Make trivial if locations not used.
5726 (YYRHSLOC): Add parentheses, and define only if locations used.
5727 (YYLLOC_DEFAULT): Add parentheses, and give trivial definition if
5728 locations not used.
5729 (yyuserAction): Use YYLLOC_DEFAULT to set *yylocp.
5730 (yydoAction): Remove redundant initialization of *yyvalp and *yylocp.
5731
5732 * tests/cxx-type.at: Exercise location information; update tests
5733 to differentiate output with and without locations.
5734 Remove forward declarations of yylex and yyerror---caused errors
5735 because default YYLTYPE not yet defined.
5736 Change semantic actions to compute strings, rather than printing
5737 them directly (to test proper passing of semantics values). Change
5738 output to prefix notation and update test data and expected results.
5739 (yylex): Track locations.
5740 (stmtMerge): Return value rather than printing, and include arguments
5741 in value.
5742
5743 2003-06-03 Paul Eggert <eggert@twinsun.com>
5744
5745 Avoid warnings generated by GCC 2.95.4 when Bison is
5746 configured with --enable-gcc-warnings.
5747 * data/lalr1.cc (yy::]b4_parser_class_name[::parse,
5748 yy::]b4_parser_class_name[::translate_,
5749 yy::Stack::operator[] (unsigned),
5750 yy::Stack::operator[] (unsigned) const,
5751 yy::Slice::operator[] (unsigned),
5752 yy::Slice::operator[] (unsigned) const):
5753 Rename local vars to avoid warnings.
5754 * tests/glr-regression.at (Improper handling of embedded actions
5755 and $-N in GLR parsers): Remove unused local variable from yylex.
5756 * tests/regression.at (_AT_DATA_DANCER_Y): Declare yylex to take
5757 (void) as arg when not pure, since we now assume C89 when building
5758 Bison. Pacify GCC by using parameter.
5759
5760 2003-06-02 Paul Eggert <eggert@twinsun.com>
5761
5762 * data/lalr1.cc (yy::Position::lines, yy::Position::columns,
5763 yy::Location::lines, yy::Location::columns): Rename arguments
5764 to avoid shadowing; this removes a warning generated by GCC 3.3.
5765
5766 2003-06-01 Paul Eggert <eggert@twinsun.com>
5767
5768 Don't pass C-only warning optins (e.g., -Wmissing-declarations)
5769 to g++, as GCC 3.3 complains if you do it.
5770 * configure.ac (WARNING_CXXFLAGS): New subst. Set it to
5771 everything that WARNING_CFLAGS has, except omit warnings
5772 not suitable for C++.
5773 (AC_PROG_CXX): Use this instead of AC_CHECK_PROGS([CXX], [g++]).
5774 * tests/atlocal.in (CXXFLAGS): New var.
5775 * tests/local.at (AT_COMPILE_CXX): Use it instead of CFLAGS.
5776
5777 Fix a GLR parser bug I reported in February; see
5778 <http://lists.gnu.org/archive/html/bison-patches/2003-02/msg00008.html>.
5779 The problem was that GLR parsers did not conform to the C standard,
5780 because actions like { $1 = $2 + $3; } expanded to expressions
5781 that invoked YYFILL in separate subexpressions, and YYFILL assigned
5782 to a local variable. The C standard says that expressions
5783 like (var = f ()) + (var = f ()) have undefined behavior.
5784 Another problem was that GCC sometimes issues warnings that
5785 yyfill and its parameters are unused.
5786
5787 * data/glr.c (yyfillin): Renamed from the old yyfill. Mark
5788 as possibly unused.
5789 (yyfill): New function.
5790 (YYFILL): Use it.
5791 (yyuserAction): Change type of yynormal to bool, so that it matches
5792 the new yyfill signature. Mark it as possibly unused.
5793
5794
5795 Follow up on a bug I reported in February, where a Bison-generated
5796 parser can loop. Provide a test case and a fix for yacc.c. I
5797 don't have a fix for lalr1.cc or for glr.c, unfortunately.
5798 The original bug report is in:
5799 <http://lists.gnu.org/archive/html/bison-patches/2003-02/msg00044.html>
5800
5801 * data/yacc.c (YYERROR): Now just 'goto yyerrorlab', since the
5802 macro's size was becoming unwieldy.
5803 (yyerrlab): Do not discard an empty lookahead symbol, as this
5804 might destroy garbage.
5805 (yyerrorlab): New label, with the old contents of YYERROR,
5806 plus the following change: pop the stack of rhs corresponding
5807 to the production that invoked YYERROR. That is how Yacc
5808 behaves, and POSIX requires this behavior.
5809 (yyerrlab1): Use YYPOPSTACK instead of its definiens.
5810 * tests/calc.at (_AT_DATA_CALC_Y): Include unistd.h if available.
5811 Define 'alarm' to do nothing if unistd.h is not available.
5812 Add a new rule "exp: '-' error;" to test the above change to
5813 data/yacc.c. Use 'alarm' to abort any test taking longer than
5814 10 seconds, as it's probably looping.
5815 (AT_CHECK_CALC): Test recovery from error in new grammar rule.
5816 Also, the new yacc.c generates two fewer diagnostics for an
5817 existing test.
5818
5819 2003-05-24 Paul Eggert <eggert@twinsun.com>
5820
5821 * data/glr.c (YYSTACKEXPANDABLE): Do not evaluate
5822 YYSTYPE_IS_TRIVIAL or YYSTYPE_IS_TRIVIAL unless they are defined.
5823 This fixes a problem reported by John Bowman when the Compaq/HP
5824 Alpha cxx compiler happy (e.g. using cxx -D__USE_STD_IOSTREAM
5825 -ansi -Wall -gall).
5826 * data/yacc.c (union yyalloc): Likewise.
5827 (YYCOPY): Do not evaluate __GNUC__ unless it is defined.
5828
5829 Switch from 'int' to 'bool' where that makes sense.
5830
5831 * lib/abitset.c (abitset_test, abitset_empty_p, abitset_equal_p,
5832 abitset_subset_p, abitset_disjoint_p, abitset_and_cmp,
5833 abitset_andn_cmp, abitset_or_cmp, abitset_xor_cmp, abitset_and_or,
5834 abitset_and_or_cmp, abitset_andn_or_cmp, abitset_or_and_cmp):
5835 Return or accept bool, not int. All callers changed.
5836 * lib/bbitset.h: (bitset_toggle_, bitset_copy_, bitset_and_or_cmp_,
5837 bitset_andn_or_cmp_, bitset_or_and_cmp_): Likewise.
5838 * lib/bitset.c (bitset_only_set_p, bitset_print, bitset_toggle_,
5839 bitset_copy_, bitset_op4_cmp, bitset_and_or_cmp_, bitset_andn_or_cmp_,
5840 bitset_or_and_cmp_): Likewise.
5841 * lib/bitset.h (bitset_test, bitset_only_set_p): Likewise.
5842 * lib/bitset_stats.c (bitset_stats_print, bitset_stats_toggle,
5843 bitset_stats_test, bitset_stats_empty_p, bitset_stats_disjoint_p,
5844 bitset_stats_equal_p, bitset_stats_subset_p, bitset_stats_and_cmp,
5845 bitset_stats_andn_cmp, bitset_stats_or_cmp, bitset_stats_xor_cmp,
5846 bitset_stats_and_or_cmp, bitset_stats_andn_or_cmp,
5847 bitset_stats_or_and_cmp): Likewise.
5848 * lib/ebitset.c (ebitset_elt_zero_p, ebitset_equal_p, ebitset_copy_cmp,
5849 ebitset_test, ebitset_empty_p, ebitset_subset_p, ebitset_disjoint_p,
5850 ebitset_op3_cmp, ebitset_and_cmp, ebitset_andn_cmp, ebitset_or_cmp,
5851 ebitset_xor_cmp): Likewise.
5852 * lib/lbitset.c (lbitset_elt_zero_p, lbitset_equal_p, lbitset_copy_cmp,
5853 lbitset_test, lbitset_empty_p, lbitset_subset_p, lbitset_disjoint_p,
5854 lbitset_op3_cmp, lbitset_and_cmp, lbitset_andn_cmp, lbitset_or_cmp,
5855 lbitset_xor_cmp): Likewise.
5856 * lib/bbitset.h: Include <stdbool.h>.
5857 (struct bitset_vtable): The following members now return bool, not
5858 int: toggle, test, empty_p, disjoint_p, equal_p, subset_p,
5859 and_cmp, andn_cmp, or_cmp, xor_cmp, and_or_cmp, andn_or_cmp,
5860 or_and_cmp).
5861 * src/conflicts.c (count_rr_conflicts): Likewise.
5862 * lib/bitset_stats.h (bitset_stats_enabled): Now bool, not int.
5863 All uses changed.
5864 * lib/ebitset.c (ebitset_obstack_init): Likewise.
5865 * lib/lbitset.c (lbitset_obstack_init): Likewise.
5866 * src/getargs.c (debug_flag, defines_flag, locations_flag,
5867 no_lines_flag, no_parser_flag, token_table_flag, yacc_flag,
5868 graph_flag): Likewise.
5869 * src/getargs.h (debug_flag, defines_flag, locations_flag,
5870 no_lines_flag, no_parser_flag, token_table_flag, yacc_flag,
5871 graph_flag): Likewise.
5872 * src/output.c (error_verbose): Likewise.
5873 * src/output.h (error_verbose): Likewise.
5874 * src/reader.c (start_flag, typed): Likewise.
5875 * src/reader.h (typed): Likewise.
5876 * src/getargs.c (LOCATIONS_OPTION): New constant.
5877 (long_options, getargs): Use it.
5878 * src/lalr.c (build_relations): Use bool, not int.
5879 * src/nullable.c (nullable_compute): Likewise.
5880 * src/print.c (print_reductions): Likewise.
5881 * src/tables.c (action_row, pack_vector): Likewise.
5882 * src/muscle_tab.h (MUSCLE_INSERT_BOOL): New macro.
5883 * src/output.c (prepare): Use it.
5884 * src/output.c (token_definitions_output,
5885 symbol_destructors_output, symbol_destructors_output): Use string,
5886 not boolean integer, to keep track of whether to output separator.
5887 * src/print_graph.c (print_core): Likewise.
5888 * src/state.c (state_rule_lookaheads_print): Likewise.
5889
5890 * config/install-sh: Sync from automake 1.7.5.
5891
5892 2003-05-14 Paul Eggert <eggert@twinsun.com>
5893
5894 * src/parse-gram.y (rules_or_grammar_declaration): Require a
5895 semicolon after a grammar declaration, in the interest of possible
5896 future changes to the Bison input language.
5897 Do not allow a stray semicolon at the start of the grammar.
5898 (rhses.1): Allow one or more semicolons after any rule, including
5899 just before "|" as required by POSIX.
5900 * tests/input.at (Torturing the Scanner): Add tests for ";|" in a
5901 grammar.
5902
5903 2003-05-14 Alexandre Duret-Lutz <adl@gnu.org>
5904
5905 %parse-param support for lalr1.cc.
5906
5907 * data/lalr1.cc (b4_parse_param_decl, b4_parse_param_cons,
5908 b4_cc_constructor_calls, b4_cc_constructor_call,
5909 b4_parse_param_vars, b4_cc_var_decls, b4_cc_var_decl): New m4
5910 definitions.
5911 (yy::b4_parser_class_name::b4_parser_class_name): Take extra
5912 parse-param arguments.
5913 (yy::b4_parser_class_name): Declare instance variables to
5914 hold parse-param arguments.
5915 * tests/calc.at: s/value/semantic_value/ because value clashes
5916 with a member of yy::b4_parser_class_name. Adjust C++ code
5917 to handle %parse-param. Enable %parse-param test in C++.
5918
5919 2003-05-12 Paul Eggert <eggert@twinsun.com>
5920
5921 * doc/bison.texinfo (How Can I Reset @code{yyparse}): Reword the
5922 English a bit. Fix fclose typo. Change "const char" to "char
5923 const", and use ANSI C rather than K&R for "main". Suggest
5924 YY_FLUSH_BUFFER over yyrestart (as that is what Flex recommends)
5925 and suggest yy_switch_to_buffer.
5926
5927 2003-05-05 Paul Eggert <eggert@twinsun.com>
5928
5929 * lib/bitset.h (__INT_TO_PTR): Define to a value that presumes
5930 C89. This avoids a diagnostic on compilers that define __STDC__
5931 to 0, fixing a problem with Tru64 cc reported by Martin Mokrejs in
5932 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00041.html>.
5933
5934 2003-05-03 Paul Eggert <eggert@twinsun.com>
5935
5936 * lib/bitset.h (BITSET_FOR_EACH, BITSET_FOR_EACH_REVERSE):
5937 Do not overrun array bounds.
5938 This should fix a bug reported today by Olatunji Oluwabukunmi in
5939 <http://lists.gnu.org/archive/html/bug-bison/2003-05/msg00004.html>.
5940
5941 2003-04-29 Akim Demaille <akim@epita.fr>
5942
5943 * src/gram.h, src/gram.c (pure_parser, glr_parser): Move to...
5944 * src/getargs.c, src/getargs.h: here, as bool, not int.
5945 (nondeterministic_parser): New.
5946 * src/parse-gram.y, src/scan-gram.l: Support
5947 %nondeterministic-parser.
5948 * src/output.c (prepare): Use nondeterministic_parser instead
5949 of glr_parser where appropriate.
5950 * src/tables.c (conflict_row, action_row, save_row)
5951 (token_actions, token_actions, pack_vector): Ditto.
5952
5953 2003-04-29 Akim Demaille <akim@epita.fr>
5954
5955 * doc/bison.texinfo (C++ Parsers, Implementing Loops): New.
5956
5957 2003-04-29 Akim Demaille <akim@epita.fr>
5958
5959 * tests/calc.at: Also test yacc.c and glr.c (but not lalr1.cc yet)
5960 with %pure-parser and %locations to exercise the patch from Yakov
5961 Markovitch below.
5962
5963 2003-04-28 Tim Van Holder <tim.van.holder@pandora.be>
5964
5965 * data/yacc.c: (b4_lex_param): Corrected for the case where
5966 %lex-param is provided and %pure-parser isn't.
5967
5968 2003-04-27 Paul Eggert <eggert@twinsun.com>
5969
5970 Avoid gcc -Wundef warnings reported by Gerald Pfeifer in
5971 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00044.html>.
5972 * data/yacc.c (YYSTACK_ALLOC): Don't evaluate YYSTACK_USE_ALLOCA
5973 if it is not defined.
5974 (YYMAXDEPTH): Don't evaluate YYMAXDEPTH if it is not defined.
5975
5976 2003-04-26 Paul Eggert <eggert@twinsun.com>
5977
5978 * data/lalr1.cc (yy::Parser::pact_ninf_, yy::Parser::table_ninf_):
5979 Declare to be of type suitable for the ninf value itself, not of
5980 type suitable for the corresponding table, since the latter might
5981 be unsigned but the ninf value might be negative. This fixes a
5982 bug reported by Alexandre Duret-Lutz in
5983 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00017.html>.
5984
5985 * configure.ac (AC_FUNC_ERROR_AT_LINE): Remove, since gl_ERROR
5986 invokes it. We shouldn't invoke it twice because it will attempt
5987 to put error.o in the archive twice. This fixes a glitch reported
5988 by Martin Mokrejs in
5989 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00041.html>.
5990
5991 2003-04-21 Paul Eggert <eggert@twinsun.com>
5992
5993 * m4/error.m4: Update from Bruno Haible's 2003-04-14 patch
5994 to gnulib.
5995
5996 2003-04-21 Yakov Markovitch <Markovitch@iso.ru>
5997
5998 * data/glr.c (yyexpandGLRStack) [!YYSTACKEXPANDABLE]:
5999 Fix obvious typo that results in uncompilable GLR parsers
6000 when both %pure-parser and %locations are used. (trivial change)
6001
6002 2003-04-17 Paul Eggert <eggert@twinsun.com>
6003
6004 * src/scan-gram.l: Add %option nounput, since we no longer use unput.
6005 (unexpected_eof): Renamed from unexpected_end_of_file, for brevity.
6006 Do not insert the expected token via unput, as this runs afoul
6007 of a POSIX-compatibility bug in flex 2.5.31.
6008 All uses changed to BEGIN the parent state,
6009 since we no longer insert the expected token via unput.
6010 * tests/regression.at (Invalid inputs): Remove cascaded diagnostic
6011 that is no longer emitted after the above change.
6012
6013 * src/conflicts.c (set_conflicts): Resolve all conflicts, not just
6014 the first one. This change is from Paul Hilfinger, and it fixes
6015 regression reported by Werner Lemberg in
6016 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00026.html>.
6017
6018 (resolve_sr_conflict): Don't invoke state_errs_set
6019 unless one or more tokens have been explicitly made errors.
6020 Otherwise, the above change causes Bison to abort.
6021
6022 * tests/existing.at (GNU pic Grammar): New test case, taken from
6023 Lemberg's email.
6024
6025 2003-03-31 Akim Demaille <akim@epita.fr>
6026
6027 * doc/Makefile.am (AM_MAKEINFOFLAGS): Don't split the info file.
6028
6029 2003-03-31 Akim Demaille <akim@epita.fr>
6030
6031 * src/output.c (prepare_symbols): Avoid trailing spaces in the
6032 output.
6033
6034 2003-03-31 Akim Demaille <akim@epita.fr>
6035
6036 * doc/bison.texinfo (Strings are Destroyed): s/losses/loses/.
6037 From Paul Hilfinger.
6038
6039 2003-03-29 Akim Demaille <akim@epita.fr>
6040
6041 * m4/error.m4: Do not put under dynamic conditions some code which
6042 expansion is under static control.
6043
6044 2003-03-29 Akim Demaille <akim@epita.fr>
6045
6046 * doc/bison.texinfo (How Can I Reset @code{yyparse}): New.
6047
6048 2003-03-29 Akim Demaille <akim@epita.fr>
6049
6050 * doc/bison.texinfo (Strings are Destroyed): New.
6051
6052 2003-03-13 Paul Eggert <eggert@twinsun.com>
6053
6054 * .cvsignore: Add configure.lineno.
6055 * src/.cvsignore: Add yacc.
6056 * tests/.cvsignore: Add testsuite.log.
6057 * doc/fdl.texi: Sync with latest FSF version.
6058
6059 2003-03-12 Paul Eggert <eggert@twinsun.com>
6060
6061 * scan-gram.l (YY_USER_INIT): Initialize code_start, too.
6062 (<INITIAL><<EOF>>, <SC_PRE_CODE><<EOF>>): Set *loc to the scanner
6063 cursor, instead of leaving it undefined. This fixes a bug
6064 reported by Tim Van Holder in
6065 <http://lists.gnu.org/archive/html/bug-bison/2003-03/msg00023.html>.
6066 * tests/input.at (Torturing the Scanner): Test the scanner on
6067 an empty input file, which was Tim Van Holder's test case.
6068
6069 * m4/timevar.m4 (BISON_PREREQ_TIMEVAR): When checking whether
6070 <sys/resource.h> can be included, include sys/time.h and
6071 sys/times.h first, if available. This works around the SunOS
6072 4.1.4 porting bug reported by Bruce Becker in
6073 <http://lists.gnu.org/archive/html/bug-bison/2003-03/msg00018.html>.
6074
6075 * m4/subpipe.m4 (BISON_PREREQ_SUBPIPE): Don't
6076 AC_CHECK_HEADERS([sys/wait.h]), as this interferes with
6077 AC_HEADER_SYS_WAIT.
6078
6079 Merge changes from gnulib. This was prompted because the CVS
6080 snapshot didn't build on Solaris 7 due to strnlen problems.
6081
6082 These changes need to be merged back into gnulib:
6083 * lib/hash.c: Include <stdbool.h> unconditionally.
6084 * m4/onceonly.m4 (m4_quote): New macro.
6085 (AC_CHECK_HEADERS_ONCE, AC_CHECK_FUNCS_ONCE, AC_CHECK_DECLS_ONCE):
6086 Quote AC_FOREACH variable-expansions properly.
6087 The 2003-01-03 obstack.h change also needs merging.
6088 {end of changes requiring merging}
6089
6090 * lib/stdbool.h.in, m4/alloca.m4, m4/dirname.m4, m4/dos.m4,
6091 m4/getopt.m4, m4/hash.m4, m4/malloc.m4, m4/memchr.m4,
6092 m4/memrchr.m4, m4/obstack.m4, m4/onceonly.m4, m4/quote.m4,
6093 m4/quotearg.m4, m4/realloc.m4, m4/stpcpy.m4, m4/strnlen.m4,
6094 m4/strtol.m4, m4/strtoul.m4, m4/unlocked-io.m4, m4/xalloc.m4:
6095 New files, imported from gnulib.
6096 * m4/Makefile.am (EXTRA_DIST): Add the new m4/*.m4 files mentioned
6097 above.
6098
6099 * lib/mbswidth.c, m4/error.m4, m4/mbrtowc.m4, m4/mbswidth.m4,
6100 m4/memcmp.m4, m4/prereq.m4, m4/stdbool.m4: Update to current
6101 gnulib sources.
6102
6103 * configure.ac (gl_DIRNAME, gl_GETOPT, gl_HASH, gl_QUOTE, gl_XALLOC):
6104 Add.
6105 (gl_ERROR): New, replacing jm_PREREQ_ERROR.
6106 (gl_FUNC_ALLOCA): New, replacing AC_FUNC_ALLOCA.
6107 (gl_FUNC_STPCPY): New, replacing AC_REPLACE_FUNCS(stpcpy).
6108 (gl_FUNC_STRNLEN): New, replacing AC_FUNC_STRNLEN.
6109 (gl_MBSWIDTH): New, replacing jm_PREREQ_MBSWIDTH.
6110 (gl_OBSTACK): New, replacing AC_FUNC_OBSTACK.
6111 (gl_QUOTEARG): New, replacing jm_PREREQ_QUOTEARG.
6112 (jm_FUNC_GLIBC_UNLOCKED_IO, gl_FUNC_STPCPY, gl_FUNC_STRTOL): New.
6113 (jm_FUNC_MALLOC): New, replacing AC_FUNC_MALLOC.
6114 (jm_FUNC_REALLOC): New, replacing AC_FUNC_REALLOC.
6115 (jm_PREREQ_ARGMATCH): Remove.
6116 (AC_REPLACE_FUNCS): Remove memchr, memrchr, stpcpy, strtol, strtoul.
6117 * lib/Makefile.am (libbison_a_SOURCES): Add argmatch.c, argmatch.h.
6118
6119 * src/system.h: Include <stdbool.h> unconditionally.
6120
6121 * lib/bbitset.h: Include <limits.h> unconditionally. We have been
6122 assuming at least C89 in the bitset code for some time now.
6123
6124 2003-03-03 Akim Demaille <akim@epita.fr>
6125
6126 * ro.po: New.
6127
6128 2003-03-02 Akim Demaille <akim@epita.fr>
6129
6130 * doc/bison.texinfo (Table of Symbols): Reactivate the
6131 documentation for %lex-param, and %parse-param.
6132
6133 2003-03-02 Akim Demaille <akim@epita.fr>
6134
6135 * data/yacc.c, data/glr.c, data/lal1.cc: Use similar code to
6136 generate verbose error messages.
6137 Use the number of tokens as an upper bound in yytname, as it
6138 cannot be a non terminal.
6139
6140 2003-03-02 Akim Demaille <akim@epita.fr>
6141
6142 * tests/regression.at (_AT_DATA_DANCER_Y): Fix the expected error
6143 message.
6144
6145 2003-03-02 Akim Demaille <akim@epita.fr>
6146
6147 * tests/regression.at (_AT_DATA_DANCER_Y, AT_CHECK_DANCER): New.
6148 Use them to exercise yycheck overrun.
6149 Based on Andrew Suffield's grammar.
6150
6151 2003-03-02 Akim Demaille <akim@epita.fr>
6152
6153 Create tests/local.at for Bison generic testing macros.
6154
6155 * tests/calc.at (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): Move to...
6156 * tests/local.at (AT_BISON_OPTION_PUSHDEFS, AT_BISON_OPTION_POPDEFS):
6157 This new file.
6158 * tests/calc.at (AT_CHECK_CALC): Adjust.
6159 * tests/testsuite.at (AT_DATA_GRAMMAR_PROLOGUE, AT_DATA_GRAMMAR)
6160 (AT_COMPILE, AT_COMPILE_CXX, AT_PARSER_CHECK): Move to...
6161 * tests/local.at: here.
6162 (AT_COMPILE_CXX): Tags the tests using it as c++.
6163 Ignore the test if CXX is not functional.
6164
6165 2003-03-01 Paul Eggert <eggert@twinsun.com>
6166
6167 * src/scan-gram.l (code_start): Initialize it to scanner_cursor,
6168 not loc->end, since loc->end might contain garbage and this leads
6169 to undefined behavior on some platforms.
6170 (id_loc, token_start): Use (IF_LINTed) initial values that do not
6171 depend on *loc, so that the reader doesn't give the the false
6172 impression that *loc is initialized.
6173 (<INITIAL>"%%"): Do not bother setting code_start, since its value
6174 does not survive the return.
6175
6176 2003-03-01 Akim Demaille <akim@epita.fr>
6177
6178 * src/scan-gram.l (code_start): Always initialize it when entering
6179 into yylex, as SC_EPILOGUE is activated *before* the corresponding
6180 yylex invocation. An alternative would be making it static, but
6181 then it starts with the second %%'s beginning, instead of its end.
6182
6183 2003-02-28 Paul Eggert <eggert@twinsun.com>
6184
6185 * lib/mbswidth.c: Include <wchar.h> before "mbswidth.h", to work
6186 around a UnixWare 7.1.1 porting bug reported by John Hughes in
6187 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00030.html>.
6188
6189 2003-02-26 Paul Eggert <eggert@twinsun.com>
6190
6191 * README: Mention compiler bug in Sun Forte Developer 6 update 2.
6192 Remove Sequent/Pyramid discussion (nobody uses them any more).
6193 Merge VMS and MS-DOS discussion; these ports may well be dead
6194 but let's keep mentioning them for now. Put <> around email
6195 addresses. Add copyright notice.
6196
6197 2003-02-24 Paul Eggert <eggert@twinsun.com>
6198
6199 * data/glr.c (yy_reduce_print): yylineno -> yylno,
6200 to avoid collision with flex use of yylineno.
6201 Problem reported by Bruce Lilly in
6202 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00016.html>.
6203 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Likewise.
6204 * data/yacc.c (yy_reduce_print): Likewise.
6205
6206 * config/depcomp: Sync with Automake 1.7.3.
6207
6208 2003-02-21 Akim Demaille <akim@epita.fr>
6209
6210 * data/lalr1.cc: Use temporary variables instead of casts to
6211 change integer types.
6212 Suggested by Paul Eggert.
6213
6214 2003-02-21 Akim Demaille <akim@epita.fr>
6215
6216 * doc/bison.texinfo: Use "location" consistently to refer to @n,
6217 to avoid confusions with lalr1.cc's notion of Position.
6218 Suggested by Paul Eggert.
6219
6220 2003-02-20 Akim Demaille <akim@epita.fr>
6221
6222 * data/lalr1.cc (position.hh): Make sure "columns" never pushes
6223 before initial_columns.
6224 (location.hh): Use consistent variable names when defining the
6225 operator<<.
6226 Use "last" so that we subtract from Positions, not from unsigned.
6227
6228 2003-02-20 Akim Demaille <akim@epita.fr>
6229
6230 * data/lalr1.cc (position.hh): New subfile, including the extended
6231 and Doxygen'ed documentation of class Position.
6232 (location.hh): Use it.
6233 Document a` la Doxygen.
6234 With the help of Benoit Perrot.
6235
6236 2003-02-20 Akim Demaille <akim@epita.fr>
6237
6238 * tests/calc.at (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): Define
6239 AT_YACC_IF.
6240 Redefine AT_YYERROR_SEES_LOC_IF using it.
6241 (_AT_DATA_CALC_Y): Don't declare yyerror when lalr1.cc, as it is
6242 not defined.
6243 Don't use the location in yy::Parser::error_ and
6244 yy::Parser::print_ when not %locations.
6245 Activate more lalr1.cc tests.
6246
6247 2003-02-19 Akim Demaille <akim@epita.fr>
6248
6249 * data/lalr1.cc: When displaying a line number, be sure to make it
6250 an int.
6251
6252 2003-02-19 Akim Demaille <akim@epita.fr>
6253
6254 * data/lalr1.cc (b4_stack_depth_init, yy::Parser::initdepth_):
6255 Remove, useless.
6256 (YYABORT, YYACCEPT, YYERROR): New.
6257 * tests/calc.at: Renable the lalr1.cc test.
6258
6259 2003-02-19 Akim Demaille <akim@epita.fr>
6260
6261 * tests/calc.at (AT_CHECK_CALC): Check different scenarios of
6262 error recovery, mixing with/without pops and discarding of the
6263 lookahead.
6264 Exercise YYERROR.
6265 Disable the lalr1.cc tests as currently it doesn't support YYERROR.
6266
6267 2003-02-17 Paul Eggert <eggert@twinsun.com>
6268
6269 * tests/atlocal.in (LDFLAGS, LIBS): New vars.
6270 * tests/testsuite.at (AT_COMPILE): Use them.
6271 This fixes the testsuite problem reported by Robert Lentz in
6272 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00011.html>.
6273
6274 2003-02-12 Paul Eggert <eggert@twinsun.com>
6275
6276 * data/yacc.c (yyerrlab) [YYERROR_VERBOSE]:
6277 Avoid subscript error in yycheck. Bug reported by Andrew Suffield in
6278 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00003.html>.
6279 * data/glr.c (yyreportSyntaxError) [YYERROR_VERBOSE]: Likewise.
6280 Check for malloc failure, for consistency with yacc.c.
6281 (yytname_size): Remove, for consistency with yacc.c.
6282
6283 The bug still remains in data/lalr1.cc, as I didn't have time
6284 to fix it there.
6285
6286 2003-02-06 Akim Demaille <akim@epita.fr>
6287
6288 * configure.ac (GXX): Rename as...
6289 (CXX): this, to keep the original Autoconf semantics.
6290 Require 2.57.
6291 * data/lalr1.cc: Fix b4_copyright invocations.
6292 If YYDEBUG is not defined, don't depend upon name_ being defined.
6293 (location.hh): Include string and iostream.
6294 (Position::filename): New member.
6295 (Position::Position ()): New.
6296 (operator<< (Position)): New.
6297 (operator- (Position, int)): New.
6298 (Location::first, Location::last): Rename as...
6299 (Location::begin, Location::end): these, to mock the conventional
6300 iterator names.
6301 (operator<< (Location)): New.
6302 * tests/atlocal.in (CXX): New.
6303 * tests/testsuite.at (AT_COMPILE_CXX): New.
6304 * tests/calc.at (_AT_DATA_CALC_Y): Adjust yyerror to report the
6305 locations in a more synthetic way.
6306 (AT_CHECK_PUSHDEFS): AT_YYERROR_SEES_LOC_IF is positive if
6307 lalr1.cc is used.
6308 Adjust the C locations to match those from Emacs: first column is
6309 column 0.
6310 Change all the expected results.
6311 Conform to the GCS: simplify the locations when applicable.
6312 (LOC, VAL, YYLLOC_FORMAL, YYLLOC_ARG, USE_YYLLOC, LEX_FORMALS)
6313 (LEX_ARGS, USE_LEX_ARGS, LEX_PRE_FORMALS, LEX_PRE_ARGS): Replace
6314 these CPP macros with the m4 macros new defined by...
6315 (AT_CHECK_PUSHDEFS): this, i.e.:
6316 (AT_LALR1_CC_IF, AT_PURE_LEX_IF, AT_LOC, AT_VAL, AT_LEX_FORMALS)
6317 (AT_LEX_ARGS, AT_USE_LEX_ARGS, AT_LEX_PRE_FORMALS, AT_LEX_PRE_ARGS)
6318 New macros.
6319 (AT_CHECK_POPDEFS): Undefine them.
6320 (AT_CHECK_CALC_LALR1_CC): New.
6321 Use it for the first lalr1.cc test.
6322
6323 2003-02-04 Akim Demaille <akim@epita.fr>
6324
6325 * data/lalr1.cc (YYLLOC_DEFAULT): Fix its definition: be based on
6326 Location as is defined.
6327
6328 2003-02-04 Akim Demaille <akim@epita.fr>
6329
6330 * data/lalr1.cc: If YYDEBUG is not defined, don't depend upon
6331 name_ being defined.
6332
6333 2003-02-03 Paul Eggert <eggert@twinsun.com>
6334
6335 * src/gram.h (start_symbol): Remove unused decl.
6336
6337 Use more-consistent naming conventions for local vars.
6338
6339 * src/derives.c (derives_compute): Change type of local var from
6340 int to rule_number.
6341 * src/gram.c (grammar_rules_partial_print): Likewise.
6342 * src/print.c (print_core): Likewise.
6343 * src/reduce.c (reduce_grammar_tables): Likewise.
6344
6345 * src/gram.c (grammar_dump): Change name of item_number *
6346 local var from r to rp.
6347 * src/nullable.c (nullable_compute): Likewise.
6348
6349 * src/gram.h (ISTOKEN, ISVAR): Use i, not s, for int var.
6350
6351 * src/gram.h (symbol_number_as_item_number): Use sym, not s,
6352 for symbol or symbol_number var.
6353 * src/reader.c (grammar_start_symbol_set): Likewise.
6354 * src/reader.h (grammar_start_symbol_set, grammar_symbol_append):
6355 Likewise.
6356 * src/state.c (transitions_to): Likewise.
6357 * src/state.h: Likewise.
6358 * src/tables.c (symbol_number_to_vector_number): Likewise.
6359
6360 * src/muscle_tab.h (MUSCLE_OBSTACK_SGROW): Use p, not s, for
6361 char * var.
6362
6363 * src/parse-gram.y (lloc_default): Use loc, not r, for YYLTYPE
6364 var.
6365
6366 * src/scan-gram.l (no_cr_read): Use bytes_read, not s, for size
6367 var.
6368
6369 * src/system.h (xstrndup, strchr, strspn, strnlen, memchr, memrchr):
6370 Use str, not s, for char * var. Use ch, not c, for character var.
6371 Use size for size var.
6372
6373 * src/uniqstr.c (uniqstr_new, uniqstr_assert): Use str, not s, for
6374 char * var.
6375 (uniqstr_print, uniqst_print_processor): Use ustr, not s, for
6376 uniqstr var.
6377 * src/uniqstr.h: Likewise.
6378
6379 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str,
6380 get_layoutalgorithm_str, get_decision_str, get_orientation_str,
6381 get_node_alignment_str, get_arrow_mode_str, get_crossing_type_str,
6382 get_view_str, get_linestyle_str, get_arrowstyle_str): Rename
6383 param to have same name as that of enum, so that we don't use
6384 "s" to stand for a non-state.
6385
6386 2003-02-02 Akim Demaille <akim@epita.fr>
6387
6388 * src/scan-skel.l: Scan more than one inert character per yylex
6389 invocation.
6390
6391 2003-02-01 Paul Eggert <eggert@twinsun.com>
6392
6393 Version 1.875a.
6394
6395 * po/LINGUAS: Add ms.
6396
6397 2003-01-30 Akim Demaille <akim@epita.fr>
6398
6399 * doc/Makefile.am (CLEANFILES): Add bison.fns for distcheck.
6400
6401 2003-01-29 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
6402
6403 * tests/cxx-type.at: Correct apparent typo in Bison input: $$ instead
6404 of $1.
6405
6406 Changes in response to error report by S. Eken: GLR mode does not
6407 handle negative $ indices or $ indices in embedded rules correctly.
6408 See <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00076.html>.
6409
6410 * data/glr.c (b4_rhs_value): Change to use YYFILL macro.
6411 (b4_rhs_location): Ditto.
6412 (yyfill): New function to copy from stack tree into array
6413 incrementally.
6414 (yyuserAction): Modify to allow incremental move of semantic values
6415 to rhs array when in GLR mode.
6416 Define YYFILL to use in user-defined actions to fill semantic array
6417 as needed.
6418 Remove dummy use of yystack, as there is now a guaranteed use.
6419 (yydoAction): Modify to allow incremental move of semantic values
6420 to rhs array when in GLR mode.
6421 (yyresolveAction): Ditto.
6422 (yyglrShiftDefer): Update comment.
6423 (yyresolveStates): Use X == NULL for pointers, not !X.
6424 (yyglrReduce): Ditto.
6425 (yydoAction): Ditto
6426
6427 * tests/glr-regr1.at: Rename to ...
6428 * tests/glr-regression.at: Add new regression test for the problems
6429 described above (adapted from S. Eken).
6430 Update copyright notice.
6431 * tests/testsuite.at: Rename glr-regr1.at to glr-regression.at.
6432 * tests/Makefile.am: Ditto.
6433
6434 2003-01-28 Paul Eggert <eggert@twinsun.com>
6435
6436 * data/lalr1.cc: Do not use @output_header_name@ unless
6437 b4_defines_flag is set. This fixes two bugs reported by
6438 Tim Van Holder in
6439 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00071.html>
6440 and <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00073.html>.
6441
6442 2003-01-21 Paul Eggert <eggert@twinsun.com>
6443
6444 * data/yacc.c (YYERROR): Move code from yyerrlab1 to here, so that
6445 we don't need to worry about yyerrlab1 being reported as an
6446 "unused label" by non-GCC C compilers. The downside is that if
6447 locations are used then a couple of statements are duplicated each
6448 time YYERROR is invoked, but the upside is that the warnings
6449 should vanish.
6450 (yyerrlab1): Move code to YERROR.
6451 (yyerrlab2): Remove. Change uses back to yyerrlab1.
6452 This reverts some of the 2002-12-27 change.
6453
6454 2003-01-17 Paul Eggert <eggert@twinsun.com>
6455
6456 * src/output.c (symbol_printers_output): Fix typo that led
6457 to core dump. Problem reported by Antonio Rus in
6458 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00058.html>.
6459
6460 2003-01-13 Akim Demaille <akim@epita.fr>,
6461 Quoc Peyrot <chojin@lrde.epita.fr>,
6462 Robert Anisko <anisko_r@lrde.epita.fr>
6463
6464 * data/lalr1.cc (parse::yyerrlab1): When popping the stack, stop
6465 when the stacks contain one element, as the loop would otherwise
6466 free the last state, and then use the top state (the one we just
6467 popped). This means that the initial elements will not be freed
6468 explicitly, as is the case in yacc.c; it is not a problem, as
6469 these elements have fake values.
6470
6471 2003-01-11 Paul Eggert <eggert@twinsun.com>
6472
6473 * NEWS: %expect-violations are now just warnings, reverting
6474 to Bison 1.30 and 1.75 behavior. This fixes the GCC 3.2
6475 bootstrapping problem reported by Matthias Klose; see
6476 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00053.html>.
6477 * src/conflicts.c (conflicts_print): Likewise.
6478 * tests/conflicts.at (%expect not enough, %expect too much,
6479 %expect with reduce conflicts): Likewise.
6480 * doc/bison.texinfo (Expect Decl): Document this. Also mention
6481 that the warning is enabled if the number of conflicts changes
6482 (not necessarily increases).
6483
6484 * src/getargs.c (version): Update copyright year.
6485
6486 2003-01-09 Akim Demaille <akim@epita.fr>
6487
6488 * src/Makefile.am, lib/Makefile.am: Use $(VAR) instead of @VAR@.
6489
6490 2003-01-08 Paul Eggert <eggert@twinsun.com>
6491
6492 * Makefile.maint (WGETFLAGS):
6493 New macro, containing "-C off" to disable proxy caches.
6494 All uses of $(WGET) changed to $(WGET) $(WGETFLAGS).
6495 (rel-check): Use $(WGET) instead of wget.
6496
6497 2003-01-06 Paul Eggert <eggert@twinsun.com>
6498
6499 * doc/bison.texinfo (Generalized LR Parsing): Add a reference to
6500 the GLR paper of Scott, Johnstone and Hussain.
6501
6502 2003-01-04 Paul Eggert <eggert@twinsun.com>
6503
6504 * configure.ac (AC_ARG_ENABLE): Add --disable-yacc.
6505 (YACC_SCRIPT, YACC_LIBRARY): New vars to AC_SUBST.
6506 * lib/Makefile.am (lib_LIBRARIES): liby.a -> @YACC_LIBRARY@.
6507 (EXTRA_LIBRARIES): New var, for liby.a.
6508 * src/Makefile.am (bin_SCRIPTS): yacc -> @YACC_SCRIPT@.
6509 (EXTRA_SCRIPTS): New var, for yacc.
6510
6511 * data/yacc.c (yyerrlab1): Omit attribute if __cplusplus is defined,
6512 since GNU C++ (as of 3.2.1) does not allow attributes on labels.
6513 Problem reported by Nelson H. F. Beebe.
6514
6515 2003-01-03 Paul Eggert <eggert@twinsun.com>
6516
6517 * lib/obstack.h (__INT_TO_PTR) [__STDC__]: Cast result to
6518 (void *) to avoid diagnostic with native c89 on SGI IRIX 6.5
6519 when compiling Bison 1.875's `bitset bset = obstack_alloc
6520 (bobstack, bytes);'. Problem reported by Nelson H. F. Beebe.
6521
6522 * src/scan-skel.l (QPUTS): Omit redundant `;' from macro definition.
6523 ([^@\n]): Renamed from [^@\n]+ so that the token buffer does not
6524 grow to a huge size with typical invocation.
6525
6526 * lib/hash.c (_Bool, bool, false, true, __bool_true_false_are_defined):
6527 Use the pattern recommended by Autoconf 2.57, except also protect
6528 against double-definition.
6529 * src/system.h: Likewise.
6530 Portability issues reported by Nelson H. F. Beebe.
6531
6532 * data/glr.c (yybool): Renamed from bool, to avoid collisions in C.
6533 All uses changed. Provide a definition in both C and C++.
6534 (yytrue, yyfalse): Define even if defined (__cplusplus).
6535
6536 * lib/bitset_stats.c (bitset_stats_list): Remove unused var.
6537 Reported by Nelson H. F. Beebe.
6538
6539 * src/scan-skel.l ("@oline@"): Output lineno+1, not lineno.
6540
6541 2003-01-02 Paul Eggert <eggert@twinsun.com>
6542
6543 * data/yacc.c (yyerrlab1): Append `;' after attribute, to
6544 pacify the buggy "smart preprocessor" in MacOS 10.2.3.
6545 Bug reported by Nelson H. F. Beebe.
6546
6547 2003-01-01 Paul Eggert <eggert@twinsun.com>
6548
6549 * Version 1.875.
6550
6551 2002-12-30 Paul Eggert <eggert@twinsun.com>
6552
6553 * src/scan-gram.l (<INITIAL,SC_AFTER_IDENTIFIER,SC_PRE_CODE>","):
6554 Moved here from...
6555 (<INITIAL>","): Here. This causes stray "," to be treated
6556 more uniformly.
6557
6558 * src/scan-gram.l (<SC_BRACED_CODE>"}"): Output ";" before the
6559 last brace in braced code when not in Yacc mode, for compatibility
6560 with Bison 1.35. This resurrects the 2001-12-15 patch to
6561 src/reader.c.
6562
6563 * src/reader.h (YYDECL): Use YYSTYPE, not its deprecated alias
6564 yystype. This follows up the 2002-12-24 YYSTYPE bug fix.
6565
6566 2002-12-28 Paul Eggert <eggert@twinsun.com>
6567
6568 * src/symtab.c (symbol_make_alias): Set type of SYMVAL to be
6569 that of SYM's type. This fixes Debian bug 168069, reported by
6570 Thomas Olsson.
6571
6572 2002-12-28 Paul Eggert <eggert@twinsun.com>
6573
6574 Version 1.75f.
6575
6576 Switch back to the Yacc style of conflict reports, undoing some
6577 of the 2002-07-30 change.
6578 * doc/bison.texinfo (Understanding): Use Yacc style for
6579 conflict reports. Also, use new way of locating rules.
6580 * src/conflicts.c (conflict_report):
6581 Renamed from conflict_report_yacc, removing the old
6582 'conflict_report'. Translate the entire conflict report at once,
6583 so that we don't assume that "," has the same interpretation in
6584 all languages.
6585 (conflicts_output): Use Yacc-style conflict report for each state,
6586 instead of our more-complicated style.
6587 (conflicts_print): Use Yacc-style conflict report, except print
6588 the input file name when not emulating Yacc.
6589 * tests/conflicts.at (Unresolved SR Conflicts, Defaulted
6590 Conflicted Reduction, %expect not enough, %expect too much,
6591 %expect with reduce conflicts): Switch to Yacc-style conflict reports.
6592 * tests/existing.at (GNU Cim Grammar): Likewise.
6593 * tests/glr-regr1.at (Badly Collapsed GLR States): Likewise.
6594
6595 * src/complain.c (warn_at, warn, complain_at, complain, fatal_at,
6596 fatal): Don't invoke fflush; it's not needed and it might even be
6597 harmful for stdout, as stdout might not be open.
6598 * src/reduce.c (reduce_print): Likewise.
6599
6600 2002-12-27 Paul Eggert <eggert@twinsun.com>
6601
6602 Fix a bug where error locations were not being recorded correctly.
6603 This problem was originally reported by Paul Hilfinger in
6604 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00086.html>.
6605
6606 * data/yacc.c (yyparse): New local var yylerrsp, to record the
6607 top of the location stack's error locations.
6608 (yyerrlab): Set it. When discarding a token, push its location
6609 onto yylerrsp so that we don't lose track of the error's end.
6610 (yyerrlab1): Now is only the target of YYERROR, so that we can
6611 properly record the location of the action that failed. For GCC
6612 2.93 and later, insert an __attribute__ ((__unused__)) to avoid
6613 GCC warning about yyerrlab1 being unused if YYERROR is unused.
6614 (yyerrlab2): New label, which yyerrlab now falls through to.
6615 Compute the error's location by applying YYLLOC_DEFAULT to
6616 the locations of all the symbols that went into the error.
6617 * doc/bison.texinfo (Location Default Action): Mention that
6618 YYLLOC_DEFAULT is also invoked for syntax errors.
6619 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
6620 Error locations include the locations of all the tokens that were
6621 discarded, not just the last token.
6622
6623 2002-12-26 Paul Eggert <eggert@twinsun.com>
6624
6625 * src/files.c: Include quote.h.
6626 (compute_output_file_names): Warn if we detect conflicting
6627 outputs to the same file. This should catch the misunderstanding
6628 exemplified by Debian Bug 165349, reported by Bruce Stephens..
6629
6630 * src/conflicts.c (conflicts_print): If the user specifies
6631 "%expect N", report an error if there are any reduce/reduce
6632 conflicts. This is what the manual says should happen.
6633 This fixes Debian bug 130890, reported by Anthony DeRobertis.
6634 * tests/conflicts.at (%expect with reduce conflicts): New test.
6635
6636 Don't use m4_include on relative file names, as it doesn't work as
6637 desired if there happens to be a file with that name under ".".
6638
6639 * m4sugar/version.m4: Remove; it was included but it wasn't used.
6640 * data/Makefile.am (dist_m4sugar_DATA): Remove m4sugar/version.m4.
6641 * data/m4sugar/m4sugar.m4: Don't include m4sugar/version.m4.
6642 * data/glr.c, data/lalr1.cc, data/yacc.c: Don't include c.m4.
6643 * src/output.c (output_skeleton): Use full path names when
6644 specifying a file to include; don't rely on include path, as
6645 it's unreliable when the working file contains a file with
6646 that name.
6647
6648 2002-12-25 Paul Eggert <eggert@twinsun.com>
6649
6650 Remove obsolete references to bison.simple and bison.hairy.
6651 Problem mentioned by Aubin Mahe in
6652 <http://lists.gnu.org/archive/html/help-bison/2002-12/msg00010.html>.
6653 * data/glr.c: Comment fix.
6654 * doc/bison.1: Remove references. Also, mention "yacc".
6655
6656 * src/getargs.c (getargs) [MSDOS]: Don't assume optarg != NULL
6657 with -g option.
6658
6659 * src/parse-gram.y (declaration): Use enum "report_states" rather
6660 than its numeric value 1.
6661
6662 * src/scan-skel.l ("@output ".*\n): Close any old yyout before
6663 opening a new one. This fixes Debian bug 165349, reported by
6664 Bruce Stephens.
6665
6666 2002-12-24 Paul Eggert <eggert@twinsun.com>
6667
6668 Version 1.75e.
6669
6670 * Makefile.maint (cvs-update): Don't assume that the shell
6671 supports $(...), as Solaris sh doesn't.
6672
6673 * src/parse-gram.y (lloc_default): Remove test for empty
6674 nonterminals at the end, since it didn't change the result.
6675
6676 2002-12-24 Paul Eggert <eggert@twinsun.com>
6677
6678 If the user does not define YYSTYPE as a macro, Bison now declares it
6679 using typedef instead of defining it as a macro. POSIX requires this.
6680 For consistency, YYLTYPE is also declared instead of defined.
6681
6682 %union directives can now have a tag before the `{', e.g., the
6683 directive `%union foo {...}' now generates the C code
6684 `typedef union foo { ... } YYSTYPE;'; this is for Yacc compatibility.
6685 The default union tag is `YYSTYPE', for compatibility with Solaris 9
6686 Yacc. For consistency, YYLTYPE's struct tag is now `YYLTYPE'
6687 instead of `yyltype'.
6688
6689 `yystype' and `yyltype' are now obsolescent macros instead of being
6690 typedefs or tags; they are no longer documented and will be
6691 withdrawn in a future release.
6692
6693 * data/glr.c (b4_location_type): Remove.
6694 (YYSTYPE): Renamed from yystype.
6695 (YYSTYPE_IS_DECLARED): New macro, used to prevent double-typedef.
6696 (struct YYLTYPE): Renamed from struct yyltype.
6697 (YYLTYPE): Renamed from yyltype.
6698 (yyltype, yystype): New (and obsolescent) macros,
6699 for backward compatibility.
6700 * data/yacc.c: Likewise.
6701
6702 * data/yacc.c (YYSTYPE): Declare as union YYSTYPE if the user
6703 does not specify a union tag. This is for compatibility with
6704 Solaris 9 yacc.
6705
6706 * src/parse-gram.y (add_param): 2nd arg is now char * not char
6707 const *, since it is now modified by stripping surrounding { }.
6708 (current_braced_code): Remove.
6709 (PERCENT_DESTRUCTOR, PERCENT_PRINTER, PERCENT_UNION,
6710 PERCENT_LEX_PARAM, PERCENT_PARSE_PARAM): Change names to include
6711 trailing " {...}". Now of type <chars>.
6712 (grammar_declaration): Adjust to bundled tokens.
6713 (code_content): Remove; stripping is now done by add_param.
6714 (print_token_value): Print contents of bundled tokens.
6715 (token_name): New function.
6716
6717 * src/reader.h (braced_code, current_braced_code): Remove.
6718 (token_name): New decl.
6719
6720 * src/scan-gram.l (handle_dollar, handle_at): Now takes int
6721 token_type, not braced_code code_kind. All uses changed.
6722 (SC_PRE_CODE): New state, for scanning after a keyword that
6723 has (or usually has) an immediately-following braced code.
6724 (token_type): New local var, to keep track of which token type
6725 to return when scanning braced code.
6726 (<INITIAL>"%destructor", <INITIAL>"%lex-param",
6727 <INITIAL>"%parse-param", <INITIAL>"%printer",
6728 <INITIAL>"%union"): Set token type and BEGIN SC_PRE_CODE
6729 instead of returning a token type immediately.
6730 (<INITIAL>"{"): Set token type.
6731 (<SC_BRACED_CODE>"}"): Use it.
6732 (handle_action_dollar, handle_action_at): Now returns bool
6733 indicating success. Fail if ! current_rule; this prevents a core dump.
6734 (handle_symbol_code_dollar, handle_symbol_code_at):
6735 Remove; merge body into caller.
6736 (handle_dollar, handle_at): Complain in invalid contexts.
6737
6738 * NEWS, doc/bison.texinfo: Document the above.
6739 * NEWS: Fix years and program names in copyright notice.
6740
6741 2002-12-17 Paul Eggert <eggert@twinsun.com>
6742
6743 * NEWS, doc/bison.texinfo (Parser Function, Pure Calling, Error
6744 Reporting, Table of Symbols): Omit mentions of %lex-param and
6745 %parse-param from the documentation for now.
6746
6747 2002-12-15 Paul Eggert <eggert@twinsun.com>
6748
6749 Undo most of the 2002-11-12 yychar -> yytoken patch, as it broke
6750 GCC 3.2.1 (which depends on yychar == YYEMPTY when there is no
6751 lookahead symbol, and which sets yychar in parser actions) and it
6752 disagreed with the Bison documentation. Bug
6753 reported by Andrew Walrond.
6754
6755 * data/yacc.c (YYTRANSLATE): Don't check for negative argument,
6756 as the caller now does that.
6757 (yyclearin, YYBACKUP, yyparse): Use yychar, not yytoken.
6758 (YYEMPTY): Parenthesize right hand side, since others use it.
6759 (yyparse): Don't assume that our generated code is the only code
6760 that sets yychar.
6761
6762 2002-12-13 Paul Eggert <eggert@twinsun.com>
6763
6764 Version 1.75d.
6765
6766 POSIX requires a "yacc" command.
6767 * src/Makefile.am (bin_SCRIPTS): New macro, for yacc.
6768 (MOSTLYCLEANFILES): Add yacc.
6769 (yacc): New rule.
6770 * doc/bison.texinfo (Invocation, Bison Options): Mention yacc
6771 as an alias for bison y.
6772
6773 * po/LINGUAS: Add da.
6774
6775 * src/getargs.c (__GNU_LIBRARY__) [lint]: Define to work around
6776 problem with latest <getopt.h>.
6777 (HACK_FOR___GNU_LIBRARY___PROTOTYPE): New macro.
6778
6779 * doc/fdl.texi: Upgrade to 1.2.
6780 * lib/alloca.c, lib/error.c, lib/getopt.c, lib/getopt.h
6781 lib/getopt1.c, lib/gettext.h, lib/memrchr.c, lib/obstack.c,
6782 lib/obstack.h, lib/strnlen.c, lib/unlocked-io.h: Sync with
6783 gnulib.
6784 * config/install-sh: Sync with autotools.
6785
6786 Fix a bad interaction with flex 2.5.23 reported by Bruce Lilly in
6787 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00114.html>.
6788 * data/yacc.c (YYLTYPE, struct yyltype): Do not define unless
6789 locations are requested.
6790 (union yyalloc): Do not depend on YYLTYPE_IS_TRIVIAL unless
6791 locations are requested.
6792
6793 2002-12-12 Paul Eggert <eggert@twinsun.com>
6794
6795 Remove unportable casts and storage allocation tricks.
6796 While we're at it, remove almost all casts, since they
6797 usually aren't needed and are a sign of trouble.
6798
6799 * configure.ac (AC_CHECK_TYPES): Check for uintptr_t.
6800
6801 * src/derives.c (derives_compute): Do not subtract NTOKENS from
6802 the pointer DSET returned by malloc; this isn't portable.
6803 Instead, always use DSET[i - NTOKENS] rather than DSET[i].
6804 Similarly for DERIVES.
6805 * src/lalr.c (set_goto_map): Likewise, for GOTO_MAP and TEMP_MAP.
6806 * src/nullable.c (nullable_compute): Likewise, for RSETS and NULLABLE.
6807 * src/reduce.c (reduce_grammar_tables): Likewise, for nontermmap
6808
6809 * src/derives.c (derives_compute): Do not bother invoking
6810 int_of_rule_number, since rule numbers are integers.
6811
6812 * src/files.c (concat2, tr, compute_base_name): Use xmalloc (N)
6813 rather than XMALLOC (char, N).
6814
6815 * src/files.c (filename_split): Rewrite to avoid cast.
6816
6817 * src/gram.h (symbol_number_as_item_number,
6818 item_number_as_symbol_number, rule_number_as_item_number,
6819 item_number_as_rule_number):
6820 Now inline functions rather than macros, to avoid casts.
6821 * src/state.h (state_number_as_int): Likewise.
6822 * src/tables.c (state_number_to_vector_number,
6823 symbol_number_to_vector_number): Likewise.
6824
6825 * src/gram.h (int_of_rule_number): Remove; no longer used.
6826
6827 * src/lalr.c (add_lookback_edge): Use malloc rather than calloc,
6828 since the resulting storage is always stored into.
6829
6830 * src/main.c (alloca) [C_ALLOCA]: Add decl here, the only place
6831 where it's needed.
6832
6833 * src/muscle_tab.c (muscle_m4_output):
6834 Now inline. Return bool, not int.
6835 * src/state.c (state_compare): Likewise.
6836 * src/symtab.c (symbol_check_defined,
6837 symbol_check_alias_consistency, symbol_pack, symbol_translation,
6838 hash_compare_symbol, hash_symbol):
6839 Likewise.
6840 * src/uniqstr.c (uniqstr_print): Likewise.
6841 * src/muscle_tab.c (muscle_m4_output_processor):
6842 New function, to avoid casts.
6843 * src/state.c (state_comparator, stage_hasher): Likewise.
6844 * src/symtab.c (symbol_check_defined_processor,
6845 symbol_check_alias_consistency_processor, symbol_pack_processor,
6846 symbol_translation_processor, hash_symbol_comparator,
6847 hash_symbol_hasher): Likewise.
6848 * src/uniqstr.c (uniqstr_print_processor): Likewise.
6849 * src/muscle_tab.c (muscles_m4_output):
6850 Use new functions instead of casting old functions unportably.
6851 * src/state.c (state_hash_new): Likewise.
6852 * src/symtab.c (symbols_new, symbols_do, symbols_check_defined,
6853 symbols_token_translations_init):
6854 Likewise.
6855 * src/uniqstr.c (uniqstrs_new, hash_initialize, uniqstrs_do): Likewise.
6856
6857 * src/output.c (GENERATE_MUSCLE_INSERT_TABLE): Use long local
6858 var instead of casting to long, to avoid casts.
6859 (prepare_states): Use MALLOC rather than alloca, so that we don't
6860 have to worry about alloca.
6861 * src/state.c (state_hash_lookup): Likewise.
6862
6863 * src/scan-gram.l (<SC_ESCAPED_CHARACTER>"'"): Use unsigned char
6864 local var instead of casting to unsigned char, to avoid casts.
6865
6866 * src/state.c (TRANSITIONS_ALLOC, ERRS_ALLOC, REDUCTIONS_ALLOC,
6867 STATE_ALLOC): Remove.
6868 (transitions_new, errs_new, reductions_new, state_new): Use malloc
6869 rather than calloc, and use offsetof to avoid allocating slightly
6870 too much storage.
6871 (state_new): Initialize all members.
6872
6873 * src/state.c (state_hash): Use unsigned accumulator, not signed.
6874
6875 * src/symtab.c (symbol_free): Remove; unused.
6876 (symbol_get): Remove cast in lhs of assignment.
6877 (symbols_do): Now static. Accept generic arguments, not
6878 hashing-related ones.
6879
6880 * src/symtab.h: (NUMBER_UNDEFINED): Remove unnecessary cast.
6881 (symbol_processor): Remove.
6882 (symbols_do): Remove decl; now static.
6883
6884 * src/system.h (alloca): Remove; decl no longer needed.
6885 (<stddef.h>): Include, for offsetof.
6886 (<inttypes.>, <stdint.h>): Include if available.
6887 (uintptr_t): New type, if system lacks it.
6888 (CALLOC, MALLOC, REALLOC): New macros.
6889 All uses of XCALLOC, XMALLOC, and XREALLOC changed to use these
6890 new macros.
6891
6892 * src/tables.c (table_size): Now int, to pacify GCC.
6893 (table_grow, table_ninf_remap): Use signed table size.
6894 (save_row): Don't bother initializing locals when not needed.
6895 (default_goto, goto_actions, pack_vector): Remove unnecessary casts.
6896 * src/uniqstr.c (hash_compare_uniqstr): Likewise.
6897
6898 * src/vcg.h: Correct misspellings.
6899
6900 * src/vcg_defaults.h (G_CMAX): Now INT_MAX.
6901
6902
6903 * src/getargs.c (getargs): Don't assume EOF == -1.
6904
6905 2002-12-09 Paul Eggert <eggert@twinsun.com>
6906
6907 Change identifier spellings to avoid collisions with names
6908 that are reserved by POSIX.
6909
6910 Don't use names ending in _t, since POSIX reserves them.
6911 For consistency, remove _e and _s endings -- they're weren't
6912 needed to remove ambiguity. All uses changed.
6913 * src/uniqstr.h (uniqstr): Renamed from uniqstr_t, which in
6914 turn was just renamed from struniq_t.
6915 * src/uniqstr.c (uniqstr_processor): Renamed from struniq_processor,
6916 which in turn was just renamed from struniq_processor_t.
6917 (hash_compare_uniqstr): Renamed from hash_compare_struniq, which
6918 in turn was renamed from hash_compare_struniq_t.
6919 * src/LR0.c (struct state_list): Renamed from struct state_list_s.
6920 (state_list): Renamed from state_list_t.
6921 * src/assoc.h (assoc): Renamed from assoc_t.
6922 * src/conflicts.c (enum conflict_resolution): Renamed from
6923 enum conflict_resolution_e.
6924 * src/derives.c (struct rule_list): Renamed from struct rule_list_s.
6925 (rule_list): Renamed from rule_list_t.
6926 * src/getargs.h (enum trace): Renamed from enum trace_e.
6927 (enum report): Renamed from enum report_e.
6928 * src/gram.h (item_number): Renamed from item_number_t.
6929 (rule_number): Renamed from rule_number_t.
6930 (struct rule_s): Remove the "rule_s" part; not used.
6931 (rule): Renamed from rule_t.
6932 (rule_filter): Renamed from rule_filter_t.
6933 * src/lalr.c (struct goto_list): Renamed from struct goto_list_s.
6934 (goto_list): Renamed from goto_list_t.
6935 * src/lalr.h (goto_number): Renamed from goto_number_t.
6936 * src/location.h (location): Renamed from location_t.
6937 * src/muscle_tab.c (muscle_entry): Renamed from muscle_entry_t,
6938 and moved here from:
6939 * src/muscle_tab.h (muscle_entry_t): here.
6940 * src/nullable.c (struct rule_list): Renamed from struct rule_list_s.
6941 (rule_list): Renamed from rule_list_t.
6942 * src/print_graph.c (static_graph): Renamed from graph.
6943 * src/reader.h (braced_code): Renamed from braced_code_t.
6944 Remove brace_code_e tag.
6945 * src/relation.h (relation_node): Renamed from relation_node_t.
6946 (relation_nodes): Renamed from relation_nodes_t.
6947 (relation): Renamed from relation_t.
6948 * src/state.h (state_number): Renamed from state_number_t.
6949 (struct state): Renamed from struct state_s.
6950 (state): Renamed from state_t.
6951 (transitions): Renamed from transitions_t. Unused (and
6952 misspelled) transtion_s tag removed.
6953 (errs): Renamed from errs_t. Unused errs_s tag removed.
6954 (reductions): Renamed from reductions_t. Unused tag
6955 reductions_s removed.
6956 * src/symlist.h (symbol_list): Renamed from symbol_list_t.
6957 (struct symbol_list): Renamed from struct symbol_list_s.
6958 * src/symtab.h (symbol_number): Renamed from symbol_number_t.
6959 (struct symbol): Renamed from struct symbol_s.
6960 (symbol): Renamed from symbol_t.
6961 * src/tables.c (vector_number): Renamed from vector_number_t.
6962 (action_number): Renamed from action_t.
6963 * src/tables.h (base_number): Renamed from base_t.
6964 * src/vcg.h (enum color): Renamed from enum color_e.
6965 (enum textmode): Renamed from enum textmode_e.
6966 (enum shape): Renamed from enum shape_e.
6967 (struct colorentry): Renamed from struct colorentry_s.
6968 (struct classname): Renamed from struct classname_s.
6969 (struct infoname): Renamed from struct infoname_s.
6970 (enum layoutalgorithm): Renamed from enum layoutalgorithm_e.
6971 (enum decision): Renamed from enum decision_e.
6972 (enum orientation): Renamed from enum orientation_e.
6973 (enum alignment): Renamed from enum alignment_e.
6974 (enum arrow_mode): Renamed from enum arrow_mode_e.
6975 (enum crossing_type): Renamed from enum crossing_type_e.
6976 (enum view): Renamed from enum view_e.
6977 (struct node): Renamed from struct node_s.
6978 (node): Renamed from node_t.
6979 (enum linestyle): Renamed from enum linestyle_e.
6980 (enum arrowstyle): Renamed from enum arrowstyle_e.
6981 (struct edge): Renamed from struct edge.
6982 (edge): Renamed from edge_t.
6983 (struct graph): Renamed from struct graph_s.
6984 (graph): Renamed from graph_t.
6985 * tests/calc.at (_AT_DATA_CALC_Y, Simple LALR Calculator):
6986 Rename value_t -> value.
6987 * tests/input.at (Torturing the Scanner): Rename value_t -> value,
6988 value_t_as_yystype -> value_as_yystype.
6989
6990 Don't include <errno.h> in the mainstream code, since it
6991 reserves E[A-Z0-9]* and we want to use symbols like 'EQUALS'.
6992 * lib/get-errno.c, lib/get-errno.h: New files.
6993 * lib/Makefile.am (libbison_a_SOURCES): Add get-errno.h,
6994 get-errno.c.
6995 * src/files.c (xfopen, xfclose): Use get_errno instead of errno.
6996 * src/output.c (output_skeleton): Likewise.
6997 * src/scan-gram.l (<INITIAL>{int}): Use set_errno and get_errno
6998 instead of errno.
6999 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>\\x[0-9abcdefABCDEF]+):
7000 Likewise.
7001 (handle_action_dollar, handle_action_at): Likewise.
7002 * src/system.h: Do not include <errno.h>.
7003 (TAB_EXT): Renamed from EXT_TAB.
7004 (OUTPUT_EXT): Renamed from EXT_OUTPUT.
7005
7006 Avoid str[a-z]*, since <string.h> reserves that name space.
7007 Change all instances of "struniq" in names to "uniqstr", and
7008 likewise for "STRUNIQ" and "UNIQSTR".
7009 * src/uniqstr.c: Renamed from src/struniq.c.
7010 * src/uniqstr.h: Renamed from src/struniq.h.
7011 * src/Makefile.am (bison_SOURCES): Adjust to these renamings.
7012 * src/files.c (strsuffix): Remove; unused.
7013 (concat2): Renamed from stringappend. Now static.
7014 * src/files.h (strsuffix, stringappend): Remove; unused.
7015 * src/parse-gram.y (<chars>): Renamed from <string>.
7016 (<uniqstr>): Renamed from <struniq>.
7017 * src/scan-gram.l (obstack_for_string): Renamed from string_obstack.
7018 * src/vcg.h (struct node_s.expand): Renamed from struct node_s.stretch.
7019 (struct graph_s.expand): Renamed from struct graph_s.stretch.
7020 * src/vcg_defaults.h (G_EXPAND): Renamed from G_STRETCH.
7021 (G_LONG_STRAIGHT_PHASE): Renamed from G_STRAIGHT_PHASE.
7022 (N_EXPAND): Renamed from N_STRETCH.
7023
7024 Avoid *_MAX and *_MIN, since <limits.h> reserves that name space.
7025 * data/yacc.c (YYSTACK_GAP_MAXIMUM): Renamed from YYSTACK_GAP_MAX.
7026 * src/gram.h (ITEM_NUMBER_MAX, ITEM_NUMBER_MIN, RULE_NUMBER_MAX):
7027 Remove; unused.
7028 * src/lalr.h (GOTO_NUMBER_MAXIMUM): Renamed from GOTO_NUMBER_MAX.
7029 * src/state.h (STATE_NUMBER_MAXIMUM): Renamed from STATE_NUMBER_MAX.
7030 * src/symtab.h (SYMBOL_NUMBER_MAXIMUM): Renamed from SYMBOL_NUMBER_MAX.
7031 * src/tables.c (VECTOR_NUMBER_MAX, VECTOR_NUMBER_MIN): Remove; unused.
7032 (BASE_MAXIMUM): Renamed from BASE_MAX.
7033 (BASE_MINIMUM): Renamed from BASE_MIN.
7034 (ACTION_MAX): Remove; unused.
7035 (ACTION_NUMBER_MINIMUM): Renamed from ACTION_MIN.
7036 Unnecessary casts removed from above defines.
7037
7038
7039 Fix misspelling in names.
7040 * src/vcg.h (enum_alignment_e): Renamed from enum_alignement_e.
7041 * src/vcg_defaults.h (G_NODE_ALIGNMENT): Renamed from
7042 G_NODE_ALIGNEMENT.
7043
7044
7045 * lib/timevar.c (timevar_report): Renamed from time_report,
7046 for consistency with other names.
7047 * lib/timevar.h (timevar_report): New decl.
7048 * src/system.h (time_report): Remove; decl is now in lib/timevar.h.
7049
7050
7051 Sort include-file uses.
7052
7053 Reorder all include files under src to be in the order "system.h".
7054 then the ../lib include files in angle brackets (alphabetized),
7055 then the . include files in double-quotes (alphabetized). Fix
7056 dependency breakages encountered in this process, as follows:
7057 * src/closure.h, src/derives.h, src/state.h: Include "gram.h".
7058 * src/complain.c: Don't include stdlib.h, string.h _LIBC stuff.
7059 * src/state.h: Include "symtab.h".
7060
7061 2002-12-08 Paul Eggert <eggert@twinsun.com>
7062
7063 * data/glr.c, data/lalr1.cc, data/yacc.c: Do not use __file__,
7064 since this causes problems when __file__ contains character
7065 sequences like "@" that are treated specially by src/scan-skel.l.
7066 Instead, just use the file's basename. This fixes the bug
7067 reported by Martin Mokrejs in
7068 <http://lists.gnu.org/archive/html/bug-bison/2002-12/msg00007.html>.
7069
7070 2002-12-06 Paul Eggert <eggert@twinsun.com>
7071
7072 Add support for rules that do not have trailing semicolons, as
7073 POSIX requires. Improve the quality of locations in Bison
7074 diagnostics.
7075
7076 * src/location.c: Include <quotearg.h>.
7077 (empty_location): Now const.
7078 (location_print): New function. Follow the recommendation of the
7079 GNU Coding Standards for locations that span file boundaries.
7080 * src/location.h: Do not include <quotearg.h>; no longer needed.
7081 (boundary): New type.
7082 (location_t): Use it. This allows locations to span file boundaries.
7083 All member uses changed: file -> start.file or end.file (as needed),
7084 first_line -> start.line, first_column -> start.column,
7085 last_line -> end.line, last_column -> end.column.
7086 (equal_boundaries): New function.
7087 (LOCATION_RESET, LOCATION_STEP): Remove.
7088 (LOCATION_PRINT): Remove. All callers changed to use location_print.
7089 (empty_location): Now const.
7090 (location_print): New decl.
7091 * src/parse-gram.y (lloc_default): New function, which handles
7092 empty locations more accurately.
7093 (YYLLOC_DEFAULT): Use it.
7094 (%token COLON): Remove.
7095 (%token ID_COLON): New token.
7096 (rules): Use it.
7097 (declarations, rules): Remove trailing semicolon.
7098 (declaration, rules_or_grammar_declaration):
7099 Allow empty (";") declaration.
7100 (symbol_def): Remove empty actions; no longer needed.
7101 (rules_or_grammar_declaration): Remove trailing semicolon.
7102 (semi_colon.opt): Remove.
7103 * src/reader.h: Include location.h.
7104 (scanner_cursor): New decl.
7105 * src/reduce.c (nonterminals_reduce): Use warn_at rather than
7106 rolling our own.
7107 * src/scan-gram.l (YY_USER_INIT): Initialize scanner_cursor instead
7108 of *loc.
7109 (STEP): Remove. No longer needed, now that adjust_location does
7110 the work. All uses removed.
7111 (scanner_cursor): New var.
7112 (adjust_location): Renamed from extend_location. It now sets
7113 *loc and adjusts the scanner cursor. All uses changed.
7114 Don't bother testing for CR.
7115 (handle_syncline): Remove location arg; now updates scanner cursor.
7116 All callers changed.
7117 (unexpected_end_of_file): Now accepts start boundary of token or
7118 comment, not location. All callers changed. Update scanner cursor,
7119 not the location.
7120 (SC_AFTER_IDENTIFIER): New state.
7121 (context_state): Renamed from c_context. All uses changed.
7122 (id_loc, code_start, token_start): New local vars.
7123 (<INITIAL,SC_AFTER_IDENTIFIER>): New initial context. Move all
7124 processing of Yacc white space and equivalents here.
7125 (<INITIAL>{id}): Save id_loc. Begin state SC_AFTER_IDENTIFIER
7126 instead of returning ID immediately, since we need to search for
7127 a subsequent colon.
7128 (<INITIAL>"'", "\""): Save token_start.
7129 (<INITIAL>"%{", "{", "%%"): Save code_start.
7130 (<SC_AFTER_IDENTIFIER>): New state, looking for a colon.
7131 (<SC_YACC_COMMENT>, <SC_COMMENT>, <SC_LINE_COMMENT>):
7132 BEGIN context_state at end, not INITIAL.
7133 (<SC_ESCAPED_STRING>"\"", <SC_ESCAPED_CHARACTER>"'",
7134 <SC_BRACED_CODE>"}", <SC_PROLOGUE>"%}", <SC_EPILOGUE><<EOF>>):
7135 Return correct token start.
7136 (<SC_BRACED_CODE,SC_PROLOGUE,SC_EPILOGUE>): Save start boundary when
7137 the start of a character, string or multiline comment is found.
7138 * tests/conflicts.at (S/R in initial, Defaulted Conflicted
7139 Reduction): Adjust reported locations to match the more-precise
7140 results now expected.
7141 * tests/input.at (Invalid $n, Invalid @n, Type Clashes): Likewise.
7142 * tests/reduce.at (Useless Rules, Reduced Automaton,
7143 Underivable Rules): Likewise.
7144 * tests/regression.at (Invalid inputs): No longer `expecting ";"
7145 or "|"' now that so many other tokens are allowed by the new grammar.
7146
7147 * src/complain.h (current_file): Remove duplicate decl;
7148 current_file is now owned by files.h.
7149 * src/complain.c, src/scan-gram.l: Include files.h.
7150
7151 2002-12-06 Paul Eggert <eggert@twinsun.com>
7152
7153 * data/glr.c (yy_reduce_print): Don't assume that yyrline[yyrule]
7154 promotes to int; it might be unsigned int.
7155 * data/yacc.c (yy_reduce_print): Likewise.
7156
7157 * doc/bison.texinfo (Table of Symbols): YYERROR_VERBOSE should
7158 be #defined in the prologue, not in the Bison declarations.
7159 This fixes Debian Bug 102878, reported by Shaul Karl.
7160
7161 2002-12-02 Paul Eggert <eggert@twinsun.com>
7162
7163 * configure.ac (AC_REPLACE_FUNCS): Add strtoul.
7164 * lib/strtoul.c: New file, from gnulib.
7165 This fixes a porting bug reported by Peter Klein in
7166 <http://lists.gnu.org/archive/html/bug-bison/2002-12/msg00000.html>.
7167
7168 2002-11-30 Paul Eggert <eggert@twinsun.com>
7169
7170 * src/scan-gram.l (no_cr_read, extend_location): Move to epilogue,
7171 and put only a forward declaration in the prologue. This is for
7172 consistency with the other scanner helper functions.
7173
7174 Type clashes now generate warnings, not errors, since it
7175 appears that POSIX may allow some grammars with type clashes.
7176 * src/reader.c (grammar_current_rule_check): Warn about
7177 type clashes instead of complaining.
7178 * tests/input.at (Type Clashes): Expect warnings, not complaints.
7179
7180 Add Yacc library, since POSIX requires it.
7181 * doc/bison.texinfo (Yacc Library): New node. Regenerate top menu.
7182 * lib/Makefile.am (lib_LIBRARIES, liby_a_SOURCES): New macros.
7183 * lib/main.c, lib/yyerror.c: New files.
7184
7185 gram_error can be static; it need not be extern.
7186 * src/reader.h (gram_error): Remove decl.
7187 * src/parse-gram.y (gram_error): Now static. Add static decl.
7188 (print_token_value): Omit parameter names from forward decl,
7189 for consistency.
7190
7191 2002-11-29 Paul Eggert <eggert@twinsun.com>
7192
7193 * doc/bison.texinfo: Emphasize that yylex and yyerror must
7194 be declared before being used. E.g., one should typically
7195 declare them in the prologue. Use GNU coding style in examples.
7196 Put "const" consistently after the type it modifies. Mention
7197 that C99 supports "inline". Mention that yyerror traditionally
7198 returns "int".
7199
7200 %parse-param and %lex-param now take just one argument, the
7201 declaration; the argument name is deduced from the declaration.
7202
7203 * doc/bison.texinfo (Parser Function, Pure Calling, Error
7204 Reporting, Table of Symbols): Document this.
7205 * src/parse-gram.y (add_param): New function.
7206 (COMMA): Remove.
7207 (declaration): Implement new rule for %parse-param and %lex-param.
7208 * src/scan-gram.l: "," now elicits a warning, rather than being
7209 a token; this is more compatible with byacc.
7210 * tests/calc.at (Simple LALR Calculator): Adopt new convention.
7211
7212 2002-11-27 Paul Eggert <eggert@twinsun.com>
7213
7214 Rename identifiers to avoid real and potential collisions.
7215
7216 * data/c.m4 (b4_yysymprint_generate): yyout -> yyoutput,
7217 to avoid collision with lex macro described by Bruce Lilly in
7218 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00114.html>.
7219 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise.
7220 * doc/bison.texinfo (Prologue, Tracing): yyprint -> print_token_value.
7221 * src/parse-gram.y (print_token_value): Renamed from yyprint.
7222 All uses changed.
7223 (YYPARSE_PARAM, YYLEX_PARAM, yycontrol): Remove. All uses changed.
7224 The name "yycontrol" violates the name space rules, and this stuff
7225 wasn't being used anyway.
7226 (input): Remove action; this stuff wasn't being used.
7227 (gram_error): Rename local variable yylloc -> loc.
7228 * src/reader.h (struct gram_control_s, gram_control_t): Remove.
7229 (YY_DECL): Don't use "yy" at start of local variables.
7230 All uses changed, e.g., yylloc -> loc.
7231 * src/scan-gram.l (STEP): Renamed from YY_STEP. All uses changed.
7232 (STRING_GROW): Renamed from YY_OBS_GROW. All uses changed.
7233 (STRING_FINISH): Renamed from YY_OBS_FINISH. All uses changed.
7234 (STRING_FREE): Renamed from YY_OBS_FREE. All uses changed.
7235
7236 * src/parse-gram.y (gram_error): loc is now const *.
7237 * src/reader.h (gram_error): Likewise.
7238
7239 2002-11-24 Paul Eggert <eggert@twinsun.com>
7240
7241 Version 1.75c.
7242
7243 * tests/actions.at (Actions after errors): Use an output format
7244 more similar to that of the Printers and Destructors test.
7245 Test the position of the ';' token too.
7246 (Printers and Destructors): Likewise.
7247 (Printers and Destructors: %glr-parser): Remove for now, to avoid
7248 unnecessarily alarming people when the test fails.
7249
7250 * data/yacc.c (yyerrlab1): Move this label down, so that the
7251 parser does not discard the lookahead token if the user code
7252 invokes YYERROR. This change is required for POSIX conformance.
7253
7254 * lib/error.c: Sync with gnulib.
7255
7256 2002-11-22 Paul Eggert <eggert@twinsun.com>
7257
7258 * lib/quotearg.c, lib/quotearg.h: Sync with gnulib.
7259 * lib/mbswidth.c, lib/mbswidth.h: Likewise.
7260 * lib/xmalloc.c: Likewise.
7261
7262 2002-11-20 Paul Eggert <eggert@twinsun.com>
7263
7264 * lib/argmatch.c, lib/argmatch.h: Sync with gnulib.
7265
7266 2002-11-20 Paul Eggert <eggert@twinsun.com>
7267
7268 Avoid use of <assert.h>, as the GNU Coding Standards hint that one
7269 should use `if (! x) abort ();' rather than `assert (x);', and
7270 anyway it's one less thing to worry about configuring.
7271
7272 * data/glr.c, lib/hash.c, src/system.h: Do not include <assert.h>.
7273 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise,
7274 and replace all instances of assert with abort.
7275 * tests/calc.at (_AT_DATA_CALC_Y): Likewise.
7276 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Likewise.
7277
7278 * data/glr.c (yydoAction, yyglrReduce, yysplitStack, yyresolveStates,
7279 yyresolveAction, yyprocessOneStack): Use abort rather than assert.
7280 * lib/hash.c (hash_lookup, hash_get_first, hash_get_next,
7281 hash_find_entry, hash_rehash, hash_insert): Likewise.
7282 * src/conflicts.c (resolve_sr_conflict): Likewise.
7283 * src/lalr.c (set_goto_map, map_goto): Likewise.
7284 * src/nullable.c (nullable_compute): Likewise.
7285 * src/output.c (prepare_rules, token_definitions_output): Likewise.
7286 * src/reader.c (packgram, reader): Likewise.
7287 * src/state.c (state_new, state_free, state_transitions_set,
7288 state_reduction_find): Likewise.
7289 * src/symtab.c (symbol_user_token_number_set, symbol_make_alias,
7290 symbol_pack): Likewise.
7291 * src/tables.c (conflict_row, pack_vector): Likewise.
7292 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str,
7293 get_layoutalgorithm_str, get_decision_str, get_orientation_str,
7294 get_node_alignement_str, get_arrow_mode_str, get_crossing_type_str,
7295 get_view_str, get_linestyle_str, get_arrowstyle_str): Likewise.
7296
7297 * lib/argmatch.h (ARRAY_CARDINALITY): Do not bother to #undef.
7298 (ARGMATCH_CONSTRAINT): New macro.
7299 (ARGMATCH_ASSERT): Use it.
7300
7301 * src/system.h (verify): New macro.
7302 * src/getargs.c (trace_argmatch, report_argmatch): Use verify
7303 rather than assert.
7304 * src/tables.c (tables_generate): Likewise.
7305
7306 * src/struniq.c (struniq_assert): Now returns void, and aborts
7307 if the assertion is false.
7308 (struniq_assert_p): Remove.
7309 * src/struniq.h: Likewise.
7310
7311 2002-11-18 Paul Eggert <eggert@twinsun.com>
7312
7313 * data/glr.c (yygetLRActions): Replace `yyindex' with
7314 `yytable[yyindex]' to fix typo introduced in my 2002-11-09 patch.
7315 This fixes the regression with Sun ONE Studio 7 cc that I reported in
7316 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00077.html>.
7317
7318 2002-11-18 Akim Demaille <akim@epita.fr>
7319
7320 * doc/bison.texinfo (Tracing): `yyprint' shouldn't prepend a
7321 space.
7322 From Tim Van Holder.
7323
7324 2002-11-17 Paul Eggert <eggert@twinsun.com>
7325
7326 Pacify Sun ONE Studio 7 lint. Also, rename "ParseError"
7327 to "SyntaxError" for consistency with my 2002-11-15 change.
7328
7329 * data/glr.c (YYDPRINTF, YYDSYMPRINT, YYDSYMPRINTF) [!YYDEBUG]: Do
7330 not define to {}, since this breaks the common use of `YYDPRINTF
7331 ((...));' if a single statement is desired (e.g. before `else').
7332 Work around GCC warnings by surrounding corresponding calls with
7333 {} if needed.
7334 (yyhasResolvedValue): Remove unused function.
7335 (yymergeOptionSets, yyresolvStack): Use `continue;' for empty
7336 loop body.
7337 (yyreportSyntaxError): Renamed from yyreportParseError.
7338 (yyrecoverSyntaxError): Renamed from yyrecoverParseError.
7339 All uses changed.
7340 * tests/calc.at (_AT_DATA_CALC_Y): Make vars static instead of
7341 extern when possible. Remove unused initializations.
7342
7343 2002-11-16 Akim Demaille <akim@epita.fr>
7344
7345 Augment the similarity between GLR and LALR traces.
7346
7347 * data/yacc.c (yy_stack_print, YY_STACK_PRINT, yy_reduce_print)
7348 (YY_REDUCE_PRINT): New.
7349 (yyparse): Use them.
7350 * data/glr.c (yy_reduce_print): Use YYFPRINTF, no need for
7351 YYDPRINT here.
7352 (yyglrReduce, yyrecoverParseError, yyparse): Don't report the
7353 state reached after the reduction/recovery, since...
7354 (yyparse, yyprocessOneStack): Report the state we are entering in.
7355
7356 2002-11-16 Akim Demaille <akim@epita.fr>
7357
7358 * src/getargs.h, src/getargs.c (trace_e, trace_args, trace_types):
7359 Add support for --trace=skeleton.
7360 * src/scan-skel.l: %option debug.
7361 Scan strings of non-@ or \n instead of character by character.
7362 (scan_skel): Handle trace_skeleton.
7363 (QPUTS): New.
7364 (@output_parser_name@, @output_header_name@): ``Restore'' their
7365 support (used to be M4 macros).
7366 * data/yacc.c: Quote larger chunks, a la glr.c.
7367 * data/lalr1.cc: Likewise.
7368 The header guards are no longer available, so use some other
7369 string than `YYLSP_NEEDED'.
7370
7371 2002-11-16 Akim Demaille <akim@epita.fr>
7372
7373 Make the ``Printers and Destructors'' test more verbose, taking
7374 `yacc.c''s behavior as (possibly wrong) reference.
7375
7376 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Use printf
7377 instead of fprint on stdout.
7378 Set and report the last_line of the symbols.
7379 Consistently display values and locations.
7380
7381 2002-11-16 Paul Eggert <eggert@twinsun.com>
7382
7383 * data/yacc.c: Avoid over-quoting of __line__ and __file__.
7384
7385 2002-11-15 Paul Eggert <eggert@twinsun.com>
7386
7387 * tests/actions.at (Actions after errors): New test case.
7388
7389 * data/glr.c, data/lalr1.cc, data/yacc.cc, doc/bison.texinfo,
7390 src/conflicts.c, src/parse-gram.y, src/tables.c, src/tables.h,
7391 tests/action.at, tests/calc.at, tests/conflicts.at,
7392 tests/cxx-type.at, tests/regression.at:
7393 "parse error" -> "syntax error" for POSIX compatibility.
7394 "parsing stack overflow..." -> "parser stack overflow" so
7395 that code matches Bison documentation.
7396
7397 2002-11-15 Akim Demaille <akim@epita.fr>
7398
7399 * src/parse-gram.y (declaration): Have %parse-param and %lex-param
7400 take two BRACED_CODE, not two string_content.
7401 Free the scanner's obstack when we are done.
7402 (code_content): New.
7403 * tests/calc.at: Adjust.
7404 * doc/bison.texinfo: Adjust.
7405 Also, make sure to include the `,' for these declarations.
7406
7407 2002-11-15 Tim Van Holder <tim.van.holder@pandora.be>
7408
7409 * m4/prereq.m4: Removed the commented jm_PREREQ_HASH
7410 definition; avoids potential autoreconf problems.
7411
7412 2002-11-15 Akim Demaille <akim@epita.fr>
7413
7414 Always check the value returned by yyparse.
7415
7416 * tests/calc.at (_AT_DATA_CALC_Y): Have `main' exit with the value
7417 returned by yyparse.
7418 (_AT_CHECK_CALC_ERROR): Take the expected exit value as argument.
7419 Adjust calls.
7420 * tests/glr-regr1.at (glr-regr1.y): Have `main' exit with the value
7421 returned by yyparse.
7422
7423 2002-11-14 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
7424
7425 * data/glr.c (yyFail): Always set yyerrflag. Corrects regression
7426 on input.at test.
7427
7428 2002-11-14 Paul Eggert <eggert@twinsun.com>
7429
7430 * src/output.c (output_skeleton): Call xfopen instead of
7431 duplicating xfopen's body.
7432
7433 Fix bugs reported by Nelson H. F. Beebe in
7434 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00078.html>.
7435
7436 * tests/headers.at (AT_TEST_CPP_GUARD_H): Don't assume that
7437 "$CC -E foo.h" is allowed, as this doesn't work with the Portland
7438 Group compiler. Instead, use "$CC -E bar.c". Include the .h
7439 file twice in the grammar, as an extra check.
7440
7441 * tests/input.at (Torturing the Scanner): Surround the
7442 backslash-newline tests with "#if 0", to make it less likely that
7443 we'll run into compiler bugs. Bring back solitary \ inside
7444 comment, but add a closing comment to work around HP C bug. Don't
7445 test backslash-newline in C character constant.
7446
7447 2002-11-14 Akim Demaille <akim@epita.fr>
7448
7449 * tests/synclines.at (AT_SYNCLINES_COMPILE): Ignore the exit
7450 status of the compiler.
7451 Calling `exit 1' is no longer needed.
7452 Reported by Nelson H. F. Beebe.
7453
7454 2002-11-14 Akim Demaille <akim@epita.fr>
7455
7456 * tests/atlocal.in (CPPFLAGS): We have config.h.
7457 * tests/testsuite.at (AT_DATA_GRAMMAR_PROLOGUE, AT_DATA_GRAMMAR):
7458 New.
7459 * tests/actions.at, tests/calc.at, tests/conflicts.at,
7460 * tests/cxx-type.at, tests/glr-regr1.at, tests/headers.at,
7461 * tests/regression.at, tests/torture.at: Use them for all the
7462 grammars that are to be compiled.
7463 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Rename as...
7464 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): this.
7465 * doc/bison.texinfo (GLR Parsers): Document `inline'.
7466
7467 2002-11-14 Akim Demaille <akim@epita.fr>
7468
7469 * doc/bison.texinfo: Various formatting changes (alignments in
7470 samples, additional @group/@end group, GCS in samples.
7471 Use @deffn instead of simple @table to define the directives,
7472 macros, variables etc.
7473
7474 2002-11-13 Paul Eggert <eggert@twinsun.com>
7475
7476 Fix some bugs reported by Albert Chin-A-Young in
7477 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00066.html>.
7478
7479 * tests/input.at (Torturing the Scanner): Don't invoke "cc a.c b.c
7480 -o c"; the HP C compiler chatters during compilation.
7481 Instead, invoke "cc -c a.c -o a.o; cc -c b.c -o b.o; cc a.o b.o -o c".
7482 * tests/headers.at (export YYLTYPE): Likewise.
7483
7484 * tests/input.at (Torturing the Scanner): Remove lines containing
7485 solitary backslashes, as they tickle a bug in the HP C compiler.
7486
7487 * tests/glr-regr1.at (Badly Collapsed GLR States): Avoid //
7488 comments, since they're not portable. Use GNU coding style.
7489
7490 2002-11-13 Akim Demaille <akim@epita.fr>
7491
7492 * data/yacc.c: Leave bigger chunks of quoted text.
7493 (YYDSYMPRINTF): New.
7494 Use it to report symbol activities.
7495 * data/glr.c (YYDSYMPRINTF): New.
7496 Use it.
7497
7498 2002-11-12 Paul Eggert <eggert@twinsun.com>
7499
7500 Version 1.75b.
7501
7502 * data/glr.c (yydoAction): Return YYRESULTTAG, not int.
7503 (yyglrReduce): Return yyok, not 0.
7504 This should avoid the enumerated-type warnings reported
7505 by Nelson H. F. Beebe in
7506 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00057.html>.
7507
7508 * lib/bbitset.h (BITSET_INLINE): Remove.
7509 * lib/bitset.h [! BITSET_INLINE]: Remove.
7510 (bitset_set, bitset_reset, bitset_test): Rename local vars
7511 to avoid shadowing warnings by GCC.
7512
7513 * data/glr.c (inline): Remove #define. It's the user's
7514 responsibility to #define it away, just like 'const'.
7515 This fixes one of the bugs reported by Nelson H. F. Beebe in
7516 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00058.html>.
7517
7518 * Makefile.maint (po-check): Scan .l and .y files instead of the
7519 .c and the .h files that they generate. This fixes the bug
7520 reported by Tim Van Holder in:
7521 <http://lists.gnu.org/archive/html/bison-patches/2002-11/msg00062.html>
7522 Look for N_ as well as for _. Try to avoid matching #define for
7523 N_ and _.
7524 * po/POTFILES.in: Remove src/parse-gram.c, src/scan-gram.c,
7525 src/system.h. Add src/parse-gram.y, src/scan-gram.l.
7526 * src/scan-gram.l: Revamp regular expressions so that " and '
7527 do not confuse xgettext.
7528
7529 * src/struniq.h (struniq_new): Do not declare the return type
7530 to be 'const'; this violates the C standard.
7531 * src/struniq.c (struniq_new): Likewise.
7532
7533 2002-11-12 Albert Chin-A-Young <china@thewrittenword.com>
7534
7535 * src/Makefile.am (LDADD): Link $(LIBINTL) last to avoid the
7536 duplicate definition of optind on Tru64 UNIX 4.0D with the Compaq
7537 linker.
7538
7539 2002-11-12 Akim Demaille <akim@epita.fr>
7540
7541 * Makefile.maint: Sync with Autoconf:
7542 (local_updates): New.
7543
7544 2002-11-12 Akim Demaille <akim@epita.fr>
7545
7546 * po/POTFILES.in (src/lalr.c, src/state.c): Remove
7547
7548 2002-11-12 Akim Demaille <akim@epita.fr>
7549
7550 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Display the
7551 locations.
7552
7553 2002-11-12 Akim Demaille <akim@epita.fr>
7554
7555 * data/c.m4 (b4_yysymprint_generate): Pass *yyvaluep to YYPRINT,
7556 not yyvalue.
7557
7558 2002-11-12 Akim Demaille <akim@epita.fr>
7559
7560 * tests/actions.at (AT_CHECK_PRINTER_AND_DESTRUCTOR): New.
7561 Use it to test the GLR parser.
7562
7563 2002-11-12 Akim Demaille <akim@epita.fr>
7564
7565 * tests/regression.at (input.y): s/YYEOF/MYEOF/, as the skeleton
7566 defines it.
7567 * data/glr.c (yystos): New.
7568 (b4_yysymprint_generate, b4_yydestruct_generate): Invoke.
7569 (YYDSYMPRINT): New.
7570 (yyval): Don't define it, it is handled via M4.
7571 (yyrecoverParseError): Free verbosely the discarded symbols.
7572 * data/yacc.c (yysymprint): Remove, rather...
7573 (b4_yysymprint_generate): invoke.
7574 * data/c.m4 (b4_yysymprint_generate): New.
7575 Accept pointers as arguments, as opposed to the version from
7576 yacc.c.
7577 (b4_yydestruct_generate): Likewise.
7578 * tests/cations.at (Printers and Destructors): Use Bison directives
7579 instead of CPP macros.
7580 Don't rely on internal details.
7581
7582 2002-11-12 Akim Demaille <akim@epita.fr>
7583
7584 * data/c.m4 (b4_yydestruct_generate, b4_symbol_actions): New.
7585 * data/yacc.c: Rename yychar1 as yytoken, as in glr.c.
7586 Don't work on yychar (i.e., do set it to YYEMPTY, don't match
7587 it against YYEMPTY and so forth), work on yytoken (i.e., set
7588 it to YYEMPTY etc.).
7589 (yydestruct): Replace with a b4_yydestruct_generate invocation.
7590 (b4_symbol_actions): Remove.
7591 * data/glr.c (YYTRANSLATE): As for yacc.c, if negative, it stands
7592 for 0, end-of-input.
7593
7594 2002-11-12 Akim Demaille <akim@epita.fr>
7595
7596 * doc/bison.texinfo (Destructor Decl): New.
7597
7598 2002-11-12 Akim Demaille <akim@epita.fr>
7599
7600 * src/tables.c (tables_generate): Use free for pointers that
7601 cannot be NULL, not XFREE.
7602 (pack_vector): Use assert, not fatal, for bound violations.
7603 * src/state.c (state_new): Likewise.
7604 * src/reader.c (reader): Likewise.
7605 * src/lalr.c (set_goto_map): Likewise.
7606 * src/location.h (LOCATION_PRINT): If first_line is 0, just issue
7607 the file name.
7608
7609 2002-11-12 Akim Demaille <akim@epita.fr>
7610
7611 * src/scan-gram.l, src/reader.h (scanner_last_string_free):
7612 Restore.
7613 * src/scan-gram.l (last_string): Is global to the file, not to
7614 yylex.
7615 * src/parse-gram.y (input): Don't append the epilogue here,
7616 (epilogue.opt): do it here, and free the scanner's obstack.
7617 * src/reader.c (epilogue_set): Rename as...
7618 (epilogue_augment): this.
7619 * data/c.m4 (b4_epilogue): Defaults to empty.
7620
7621 2002-11-12 Akim Demaille <akim@epita.fr>
7622
7623 * src/getargs.c (long_options): Remove duplicates.
7624 * src/vmsgetargs.c, src/build.com, src/bison.cld, src/vmshlp.mar:
7625 Remove.
7626 * doc/bison.rnh: Remove.
7627 * doc/bison.texinfo (VMS Invocation): Remove.
7628
7629 2002-11-12 Akim Demaille <akim@epita.fr>
7630
7631 * src/struniq.h, src/struniq.c (struniq_t): Is const.
7632 (STRUNIQ_EQ, struniq_assert, struniq_assert_p): New.
7633
7634 Use struniq for symbols.
7635
7636 * src/symtab.h (symbol_t): The tag member is a struniq.
7637 (symbol_type_set): Adjust.
7638 * src/symtab.c (symbol_new): Takes a struniq.
7639 (symbol_free): Don't free the tag member.
7640 (hash_compare_symbol_t, hash_symbol_t): Rename as...
7641 (hash_compare_symbol, hash_symbol): these.
7642 Use the fact that tags as struniqs.
7643 (symbol_get): Use struniq_new.
7644 * src/symlist.h, src/symlist.c (symbol_list_n_type_name_get):
7645 Returns a strniq.
7646 * src/reader.h (merger_list, grammar_currentmerge_set): The name
7647 and type members are struniqs.
7648 * src/reader.c (get_merge_function)
7649 (grammar_current_rule_merge_set): Adjust.
7650 (TYPE, current_type): Are struniq.
7651
7652 Use struniq for file names.
7653
7654 * src/files.h, src/files.c (infile): Split into...
7655 (grammar_file, current_file): these.
7656 * src/scan-gram.c (YY_USER_INIT, handle_syncline): Adjust.
7657 * src/reduce.c (reduce_print): Likewise.
7658 * src/getargs.c (getargs): Likewise.
7659 * src/complain.h, src/complain.c: Likewise.
7660 * src/main.c (main): Call struniqs_new early enough to use it for
7661 file names.
7662 Don't free the input file name.
7663
7664 2002-11-12 Akim Demaille <akim@epita.fr>
7665
7666 * src/symtab.c (symbol_free): Remove dead deactivated code:
7667 type_name are properly removed.
7668 Don't use XFREE to free items that cannot be NULL.
7669 * src/struniq.h, src/struniq.c: New.
7670 * src/main.c (main): Initialize/free struniqs.
7671 * src/parse-gram.y (%union): Add astruniq member.
7672 (yyprint): Adjust.
7673 * src/scan-gram.l (<{tag}>): Return a struniq.
7674 Free the obstack bit that used to store it.
7675 * src/symtab.h (symbol_t): The 'type_name' member is a struniq.
7676
7677 2002-11-11 Paul Eggert <eggert@twinsun.com>
7678
7679 Revamp to fix many (but not all) of the C- and M4-related quoting
7680 problems. Among other things, this fixes the Bison bug reported
7681 by Jan Hubicka when processing the Bash grammar; see:
7682 <http://lists.gnu.org/archive/html/bison-patches/2002-11/msg00039.html>
7683
7684 Use new @ escapes consistently. Represent brackets with @{ and @}
7685 rather than @<:@ and @:>@, since this works a bit better with dumb
7686 editors like vi. Represent @ with @@, since @ is now consistently
7687 an escape. Use @oline@ and @ofile@ rather than __oline__ and
7688 __ofile__, to avoid unexpected expansions. Similarly, use @output
7689 rather than #output.
7690
7691 * data/c.m4 (b4_copyright): Omit file name from comment, since
7692 the file name could contain "*/".
7693 (b4_synclines_flag): Don't quote the 2nd argument; it should already
7694 be quoted. All uses changed.
7695
7696 * data/glr.c: Use new @ escapes consistently.
7697 (b4_input_suffix, b4_output_parser_suffix, b4_output_parser_name,
7698 b4_output_header_suffix, b4_output_header_name, b4_header_guard):
7699 Remove, since they couldn't handle arbitrary characters in file
7700 names.
7701 * data/lalr1.cc: Likewise.
7702 * data/yacc.c: Likewise.
7703
7704 * src/files.c (output_infix): Remove; all uses removed.
7705 * src/files.h: Likewise.
7706
7707 * data/glr.c: Remove use of "#ifdef b4_header_guard", since it
7708 mishandled funny characters in file names, and anyway it isn't
7709 needed any more.
7710 * data/yacc.c: Likewise.
7711 * data/lalr1.cc: Use YYSLP_NEEDED instead of b4_header_guard.
7712
7713 * data/glr.c (YYSTYPE_IS_TRIVIAL): Define when the .h file would.
7714 * data/yacc.c: Likewise.
7715
7716 * src/muscle_tab.c: Include quotearg.h, since we need to quote C
7717 strings now.
7718 (muscle_init): Quote filename as a C string.
7719 * src/muscle_tab.h (MUSCLE_GROW_STRING_PAIR): Remove; unused.
7720 (MUSCLE_OBSTACK_SGROW, MUSCLE_INSERT_C_STRING): New macros.
7721 * src/output.c (escaped_file_name_output): New function.
7722 (prepare_symbols): Quote tokens for M4.
7723 (prepare): Don't insert output_infix, output_prefix,
7724 output_parser_name, output_header_name; this is now down by scan-skel.
7725 Insert skeleton as a C string.
7726
7727 * src/output.c (user_actions_output, symbol_destructors_output,
7728 symbol_printers_output): Quote filenames for C and M4.
7729 * src/reader.c (prologue_augment, epilogue_set): Likewise.
7730
7731 * src/scan-gram.l (<SC_CHARACTER>): Don't worry about any backslash
7732 escapes other than \\ and \'; this simplifies the code.
7733 (<SC_STRING>): Likewise, for \\ and \".
7734 (<SC_COMMENT,SC_LINE_COMMENT,SC_STRING,SC_CHARACTER,SC_BRACED_CODE,
7735 SC_PROLOGUE,SC_EPILOGUE>): Escape $ and @, too.
7736 Use new escapes @{ and @} for [ and ].
7737
7738 * src/scan-skel.l (yylineno, yyoutname): Remove static vars, replacing
7739 them with auto vars.
7740 Switch to new escape scheme, where @ is the escape character uniformly.
7741 Abort if a stray escape character is found. Avoid unbounded input
7742 buffer when parsing non-escaped text.
7743
7744 * tests/input.at (Torturing the Scanner): Add tests that @oline@,
7745 __oline__, #output, $@, and @{ do not have unintended meanings.
7746
7747 2002-11-09 Paul Eggert <eggert@twinsun.com>
7748
7749 Fix the test failure due to GCC warnings described in
7750 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00000.html>.
7751 * data/glr.c (yyis_pact_ninf, yyis_table_ninf): New macros, which
7752 evaluate to 0 if it's impossible for NINF to be in the respective
7753 table.
7754 (yygetLRActions, yyrecoverParseError): Use them.
7755
7756 * src/scan-gram.l (unexpected_end_of_file): Fix bug: columns were
7757 counted in the token inserted at end of file. Now takes
7758 location_t *, not location_t, so that the location can be
7759 adjusted. All uses changed.
7760
7761 * tests/regression.at (Invalid inputs): Adjust wording in
7762 diagnostic to match the new behavior.
7763
7764 * tests/torture.at (AT_DATA_TRIANGULAR_GRAMMAR,
7765 AT_DATA_HORIZONTAL_GRAMMAR, AT_DATA_LOOKAHEADS_GRAMMAR,
7766 AT_DATA_STACK_TORTURE): Replace `assert (x);' with `if (! (x))
7767 abort ();'. This reduces the runtime of the "Many lookaheads"
7768 test from 27.6 to 2.7 minutes on a 440 MHz Ultrasparc III running
7769 GCC 3.2.
7770
7771 2002-11-07 Paul Eggert <eggert@twinsun.com>
7772
7773 * src/parse-gram.y (CHARACTER): Remove unused token.
7774 All uses removed.
7775
7776 * src/scan-gram.l: Remove stack option. We no longer use the
7777 stack, since the stack was never deeper than 1; instead, use the
7778 new auto var c_context to record the stacked value.
7779
7780 Remove nounput option. At an unexpected end of file, we now unput
7781 the minimal input necessary to end cleanly; this simplifies the
7782 code.
7783
7784 Avoid unbounded token sizes where this is easy.
7785
7786 (unexpected_end_of_file): New function.
7787 Use it to systematize the error message on unexpected EOF.
7788 (last-string): Now auto, not static.
7789 (YY_OBS_FREE): Remove unnecessary do while (0) wrapper.
7790 (scanner_last_string_free): Remove; not used.
7791 (percent_percent_count): Move decl to just before use.
7792 (SC_ESCAPED_CHARACTER): Return ID at unexpected end of file,
7793 not the (never otherwised-used) CHARACTER.
7794
7795 2002-11-07 Akim Demaille <akim@epita.fr>
7796
7797 Let yyerror always receive the msg as last argument, so that
7798 yyerror can be variadic.
7799
7800 * data/yacc.c (b4_yyerror_args): New.
7801 Use it when calling yyerror.
7802 * data/glr.c (b4_yyerror_args, b4_lyyerror_args): New.
7803 Use it when calling yyerror.
7804 * doc/bison.texinfo (Error Reporting): Adjust.
7805 * tests/calc.at (_AT_DATA_CALC_Y): Adjust.
7806 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Adjust.
7807
7808 2002-11-06 Akim Demaille <akim@epita.fr>
7809
7810 #line should have quoted strings.
7811 Ideally, this should be done by m4_quotearg.
7812
7813 * src/scan-skel.l: Include quotearg.h.
7814 Quote __ofile__.
7815 * src/output.c (symbol_printers_output)
7816 (symbol_destructors_output): Quote the file name.
7817
7818 2002-11-06 Akim Demaille <akim@epita.fr>
7819
7820 * tests/regression.at (Invalid inputs): Adjust to the recent
7821 messages.
7822
7823 2002-11-06 Akim Demaille <akim@epita.fr>
7824
7825 Restore --no-lines.
7826 Reported by Jim Kent.
7827
7828 * data/c.m4 (b4_syncline): New.
7829 * data/glr.c, data/yacc.c, data/lalr1.cc: Use it.
7830 * src/reader.c (prologue_augment, epilogue_set): Use b4_syncline.
7831 * src/output.c (user_actions_output): Likewise.
7832 (prepare): Define 'b4_synclines_flag'.
7833 * src/muscle_tab.c (muscle_init): Don't define b4_linef.
7834
7835 2002-11-06 Akim Demaille <akim@epita.fr>
7836
7837 * src/main.c (main): Free `infile'.
7838 * src/scan-gram.l (handle_syncline): New.
7839 Recognize `#line'.
7840 * src/output.c (user_actions_output, symbol_destructors_output)
7841 (symbol_printers_output): Use the location's file name, not
7842 infile.
7843 * src/reader.c (prologue_augment, epilogue_set): Likewise.
7844
7845 2002-11-05 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
7846
7847 * src/tables.c (matching_state): Don't allow states to match if
7848 either has GLR conflict entries.
7849
7850 2002-11-05 Paul Eggert <eggert@twinsun.com>
7851
7852 * src/scan-gram.l: Use more accurate diagnostics, e.g.
7853 "integer out of range" rather than "invalid value".
7854 * tests/input.at (Invalid $n, Invalid @n): Change expected wording
7855 accordingly.
7856
7857 Scan <% and %> digraphs in C code as POSIX 1003.1-2001 requires.
7858 Also, remove one static variable in the scanner.
7859
7860 * src/scan-gram.l (braces_level): Now auto, not static.
7861 Initialize to zero if the compiler is being picky.
7862 (INITIAL): Clear braces_level instead of incrementing it.
7863 (SC_BRACED_CODE): Treat <% and %> as { and } when inside C code,
7864 as POSIX 1003.1-2001 requires.
7865 * src/system.h (IF_LINT): New macro, taken from coreutils.
7866 * configure.ac: Define "lint" if --enable-gcc-warnings.
7867
7868 2002-11-05 Akim Demaille <akim@epita.fr>
7869
7870 * src/scan-gram.l: When it starts with `%', complain about the
7871 whole directive, not just that `invalid character: %'.
7872
7873 2002-11-04 Akim Demaille <akim@epita.fr>
7874
7875 * Makefile.maint: Update from Autoconf.
7876 (update, cvs-update, po-update, do-po-update): New.
7877
7878 2002-11-04 Akim Demaille <akim@epita.fr>
7879
7880 * tests/glr-regr1.at (Badly Collapsed GLR States): Prototype yylex
7881 and yyerror.
7882 Have yyerror `use' its arguments.
7883 * tests/calc.at (AT_CHECK_PUSHDEFS): AT_YYERROR_SEES_LOC_IF
7884 returns true when location & yacc & pure & parse-param.
7885 (_AT_DATA_CALC_Y): Let yyerror ``use'' its arguments.
7886
7887 2002-11-04 Akim Demaille <akim@epita.fr>
7888
7889 * src/location.h (LOCATION_PRINT): Use quotearg slot 3 to avoid
7890 clashes.
7891 * src/scan-gram.l: Use [\'] instead of ['] to pacify
7892 font-lock-mode.
7893 Use complain_at.
7894 Use quote, not quote_n since LOCATION_PRINT no longer uses the
7895 slot 0.
7896
7897 2002-11-03 Paul Eggert <eggert@twinsun.com>
7898
7899 * src/reader.c (get_merge_function, grammar_current_rule_check):
7900 Use consistent diagnostics for reporting type name clashes.
7901 Quote the types with <>, for consistency with Yacc.
7902 * tests/input.at (Type Clashes): Adjust to diagnostic changes.
7903
7904 2002-11-03 Akim Demaille <akim@epita.fr>
7905
7906 * data/c.m4 (b4_identification, b4_user_args, b4_parse_param):
7907 New.
7908 * data/yacc.m4 (b4_pure_args, b4_Pure_args): New.
7909 (b4_parse_param): Remove.
7910 Use b4_identification.
7911 Propagate b4_pure_args where needed to pass them to yyerror.
7912 * data/glr.m4 (b4_parse_param): Remove.
7913 (b4_user_formals, b4_pure_args, b4_pure_formals, b4_lpure_args)
7914 (b4_lpure_formals): New.
7915 Use b4_identification.
7916 (YY_USER_FORMALS, YY_USER_ARGS): Remove, replaced by
7917 b4_user_formals and b4_user_args.
7918 (yyexpandGLRStack, yyFail, yyaddDeferredAction, yyglrShiftDefer)
7919 (yyreportAmbiguity): When using a pure parser, also need
7920 the location, and the parse-params.
7921 Adjust callers.
7922 (yyuserAction, yyglrShift, yyreportParseError, yyrecoverParseError):
7923 When using a pure parser, also need the parse-params.
7924 Adjust callers.
7925 * tests/calc.at: Test pure (%pure-parser) and absolutely pure
7926 (%pure-parser + %parse-param) LALR and GLR parsers.
7927 (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): New, define AT_PARAM_IF,
7928 AT_LOCATION_IF, AT_PURE_IF, AT_GLR_IF, AAT_PURE_AND_LOC_IF,
7929 AT_GLR_OR_PARAM_IF, AT_YYERROR_ARG_LOC_IF, AT_YYERROR_SEES_LOC_IF.
7930 (_AT_DATA_CALC_Y): Equip for purity of yyerror.
7931 (_AT_CHECK_CALC_ERROR): Use AT_YYERROR_SEES_LOC_IF.
7932 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Equip for yyerror purity.
7933 * doc/bison.texinfo: Untabify the whole file.
7934 (Parser Function): Document %parse-param, deprecate YYPARSE_PARAM.
7935 (Pure Calling): Document %lex-param, deprecate YYLEX_PARAM.
7936 (Error Reporting): Adjust to these new directives.
7937 Document %error-verbose, deprecate YYERROR_VERBOSE.
7938
7939 2002-11-03 Akim Demaille <akim@epita.fr>
7940
7941 * tests/calc.at: Change all the AT_CHECK_CALC_LALR and
7942 AT_CHECK_CALC_GLR invocations to use % directives, instead of
7943 command line options.
7944 * tests/cxx-type.at: Formatting changes.
7945
7946 2002-11-03 Paul Eggert <eggert@twinsun.com>
7947
7948 * src/scan-gram.l: Revamp to fix POSIX incompatibilities,
7949 to count columns correctly, and to check for invalid inputs.
7950
7951 Use mbsnwidth to count columns correctly. Account for tabs, too.
7952 Include mbswidth.h.
7953 (YY_USER_ACTION): Invoke extend_location rather than LOCATION_COLUMNS.
7954 (extend_location): New function.
7955 (YY_LINES): Remove.
7956
7957 Handle CRLF in C code rather than in Lex code.
7958 (YY_INPUT): New macro.
7959 (no_cr_read): New function.
7960
7961 Scan UCNs, even though we don't fully handle them yet.
7962 (convert_ucn_to_byte): New function.
7963
7964 Handle backslash-newline correctly in C code.
7965 (SC_LINE_COMMENT, SC_YACC_COMMENT): New states.
7966 (eols, blanks): Remove. YY_USER_ACTION now counts newlines etc.;
7967 all uses changed.
7968 (tag, splice): New EREs. Do not allow NUL or newline in tags.
7969 Use {splice} wherever C allows backslash-newline.
7970 YY_STEP after space, newline, vertical-tab.
7971 ("/*"): BEGIN SC_YACC_COMMENT, not yy_push_state (SC_COMMENT).
7972
7973 (letter, id): Don't assume ASCII; e.g., spell out a-z.
7974
7975 ({int}, handle_action_dollar, handle_action_at): Check for integer
7976 overflow.
7977
7978 (YY_STEP): Omit trailing semicolon, so that it's more like C.
7979
7980 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>): Allow \0 and \00
7981 as well as \000. Check for UCHAR_MAX, not 255.
7982 Allow \x with an arbitrary positive number of digits, as in C.
7983 Check for overflow here.
7984 Allow \? and UCNs, for compatibility with C.
7985
7986 (handle_symbol_code_dollar): Use quote_n slot 1 to avoid collision
7987 with quote slot used by complain_at.
7988
7989 * tests/input.at: Add tests for backslash-newline, m4 quotes
7990 in symbols, long literals, and funny escapes in strings.
7991
7992 * configure.ac (jm_PREREQ_MBSWIDTH): Add.
7993 * lib/Makefile.am (libbison_a_SOURCES): Add mbswidth.h, mbswidth.c.
7994 * lib/mbswidth.h, lib/mbswidth.c: New files, from GNU gettext.
7995 * m4/Makefile.am (EXTRA_DIST): Add mbswidth.m4.
7996 * m4/mbswidth.m4: New file, from GNU coreutils.
7997
7998 * doc/bison.texinfo (Grammar Outline): Document // comments.
7999 (Symbols): Document that trigraphs have no special meaning in Bison,
8000 nor is backslash-newline allowed.
8001 (Actions): Document that trigraphs have no special meaning.
8002
8003 * src/location.h (LOCATION_COLUMNS, LOCATION_LINES): Remove;
8004 no longer used.
8005
8006 2002-11-02 Paul Eggert <eggert@twinsun.com>
8007
8008 * src/reader.c: Don't include quote.h; not needed.
8009 (get_merge_function): Reword warning to be consistent with
8010 type clash diagnostic in grammar_current_rule_check.
8011
8012 * lib/quotearg.c (quotearg_buffer_restyled): Fix off-by-two
8013 bug in trigraph handling.
8014
8015 * src/output.c (prepare_symbols): When printing token names,
8016 escape "[" as "@<:@" and likewise for "]".
8017
8018 * src/system.h (errno): Remove declaration, as we are now
8019 assuming C89 or better, and C89 guarantees errno.
8020
8021 2002-10-30 Paul Eggert <eggert@twinsun.com>
8022
8023 * lib/bitset_stats.c (bitset_stats_read, bitset_stats_write):
8024 Check for close failures.
8025 * src/files.h (xfclose): Return void, not int, since it always
8026 returned zero.
8027 * src/files.c (xfclose): Likewise. Report I/O error if ferror
8028 indicates one.
8029 * src/output.c (output_skeleton): Use xfclose rather than fclose
8030 and ferror. xfclose now checks ferror.
8031
8032 * data/glr.c (YYLEFTMOST_STATE): Remove.
8033 (yyreportTree): Use a stack-based leftmost state. This avoids
8034 our continuing battles with bogus warnings about initializers.
8035
8036 2002-10-30 Akim Demaille <akim@epita.fr>
8037
8038 * src/system.h: Don't use #ifdef/#ifndef on HAVE_ values, only
8039 #if.
8040
8041 2002-10-29 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
8042
8043 * tests/glr-regr1.at: New test for reported regressions.
8044 * tests/testsuite.at: Add glr-regr1.at test.
8045 * tests/Makefile.am: Add glr-regr1.at test.
8046
8047 2002-10-24 Paul Eggert <eggert@twinsun.com>
8048
8049 Version 1.75a.
8050
8051 * tests/calc.at (_AT_DATA_CALC_Y): Remove unused strcat declaration.
8052 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Include stdlib.h, since
8053 we use malloc. Don't assume 'A' through 'Z' are contiguous.
8054 Don't assume strdup exists; POSIX says its an XSI extension.
8055 Check for buffer overflow on input.
8056
8057 2002-10-24 Akim Demaille <akim@epita.fr>
8058
8059 * src/output.c (output_skeleton): Don't disable M4sugar comments
8060 too soon: it results in comments being expanded.
8061 * data/yacc.c, data/glr.c, data/lalr1.cc: Do it right before the
8062 first output.
8063
8064 2002-10-24 Akim Demaille <akim@epita.fr>
8065
8066 * data/yacc.c (m4_int_type): New.
8067 * data/c.m4 (m4_int_type): Don't use yysigned_char, but `signed
8068 char' as only yacc.c wants K&R portability.
8069 * data/glr.c (yysigned_char): Remove.
8070 * data/lalr1.cc: Rename the trailing b4_name as b4_parser_class_name.
8071 Reported by Quoc Peyrot.
8072
8073 2002-10-23 Paul Eggert <eggert@twinsun.com>
8074
8075 * src/main.c (main): With --trace=time, report times even if a
8076 non-fatal error occurs. Formerly, the times were reported in some
8077 such cases but not in others.
8078 * src/reader.c (reader): Just return if a complaint has been issued,
8079 instead of exiting, so that 'main' can report times.
8080
8081 2002-10-22 Akim Demaille <akim@epita.fr>
8082
8083 * src/system.h: Include sys/types.
8084 Reported by Bert Deknuydt.
8085
8086 2002-10-23 Paul Eggert <eggert@twinsun.com>
8087
8088 * configure.ac (AC_PROG_LEX): Use instead of AM_PROG_LEX.
8089 Suggested by Art Haas.
8090
8091 2002-10-22 Paul Eggert <eggert@twinsun.com>
8092
8093 * src/complain.c (exit) [! (STDC_HEADERS || _LIBC)]: Remove exit
8094 decl; not needed any more.
8095 * src/main.c (main): Use return to exit, undoing yesterday's change.
8096 The last OS that we could find where this wouldn't work is
8097 SunOS 3.5, and that's too old to worry about now.
8098
8099 * data/glr.c (struct yyltype): Define members even when not
8100 doing locations. This is more consistent with yacc.c, and it
8101 works around the following bug reports:
8102 http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00106.html
8103 http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00111.html
8104
8105 * doc/bison.texinfo: Minor spelling and typographical fixes. Use
8106 @acronym consistently. Standardize on "Yacc" instead of "YACC",
8107 "Algol" instead of "ALGOL". Give a bit more history about BNF.
8108
8109 2002-10-22 Akim Demaille <akim@epita.fr>
8110
8111 * data/README: New.
8112
8113 2002-10-21 Paul Eggert <eggert@twinsun.com>
8114
8115 Be consistent about 'bool'; the old code used an enum in one
8116 module and an int in another, and this violates the C standard.
8117 * m4/stdbool.m4: New file, from coreutils 4.5.3.
8118 * configure.ac (AC_HEADER_STDBOOL): Add.
8119 * m4/Makefile.am (EXTRA_DIST): Add stdbool.m4.
8120 * src/muscle_tab.c (hash_compare_muscles): (a ? FALSE : TRUE) -> (! a)
8121 * src/symtab.c (hash_compare_symbol_t): Likewise.
8122 * src/system.h (bool, false, true): Use a definition consistent
8123 with ../lib/hash.c. All uses changed.
8124
8125 * src/complain.c (warning_issued): Renamed from warn_message_count,
8126 so that we needn't worry about integer overflow (!).
8127 Now of type bool. All uses changed.
8128 (complaint_issued): Renamed from complain_message_count; likewise.
8129
8130 * src/main.c (main): Use exit to exit with failure.
8131
8132 * src/complain.c (fatal_at, fatal): Use EXIT_FAILURE and EXIT_SUCCESS
8133 rather than 1 and 0.
8134 * src/main.c (main): Likewise.
8135 * src/getargs.c (getargs): Likewise.
8136 * src/reader.c (reader): Likewise.
8137
8138 * src/getarg.c (getargs): Remove duplicate code for
8139 "Try `bison --help'".
8140
8141 * src/files.c (xfopen, xfclose): Use EXIT_FAILURE rather than 2.
8142 What was that "2" for?
8143
8144 * src/complain.h (fatal, fatal_at): Add __attribute__((__noreturn__)).
8145 * src/getargs.c (usage): Likewise.
8146
8147 * src/getargs.c (getargs): When there are too few operands, report
8148 the last one. When there are too many, report the first extra
8149 one. This is how diffutils does it.
8150
8151 2002-10-20 Paul Eggert <eggert@twinsun.com>
8152
8153 Remove K&R vestiges.
8154 * configure.ac (AC_C_CONST, AM_C_PROTOTYPES): Remove.
8155 * src/complain.c (VA_START): Remove. Assume prototypes.
8156 (vfprintf) [! (HAVE_VPRINTF || defined vfprintf)]: New macro.
8157 (private_strerror, warn_at, warn, complain_at, complain, fatal_at,
8158 fatal): Assume prototypes.
8159 * src/complain.h: Assume prototypes.
8160 * src/system.h (PARAMS): Remove.
8161 Include <limits.h> unconditionally, since it's guaranteeed even
8162 for a freestanding C89 compiler.
8163 (SHRT_MIN, SHRT_MAX): Remove, since C89 guarantees them.
8164 * src/vmsgetargs.c (getargs, cli_present, cli_get_value): Prototype.
8165
8166 2002-10-20 Akim Demaille <akim@epita.fr>
8167
8168 * src/muscle_tab.c (muscle_grow): Remove trailing debugging code.
8169 * data/glr.c (YY_USER_FORMALS, YY_USER_ARGS): New.
8170 (yyuserAction, yydoAction, yyglrReduce, yyresolveValue)
8171 (yyresolveStates, yyresolveAction, yyresolveStack)
8172 (yyprocessOneStack): Use them.
8173 (yy_reduce_print): New.
8174 * tests/calc.at (_AT_DATA_CALC_Y): Exercise %parse-param.
8175
8176 2002-10-20 Akim Demaille <akim@epita.fr>
8177
8178 * data/c.m4 (b4_c_ansi_args): Recognize functions with no
8179 arguments and output `void'.
8180 (b4_c_function): Rename as...
8181 (b4_c_function_def): this.
8182 (b4_c_function_decl, b4_c_ansi_function_def)
8183 (b4_c_ansi_function_decl): New.
8184 Change the interpretation of the arguments: before `int, foo', now
8185 `int foo, foo'.
8186 * data/yacc.c (yyparse): Prototype and define thanks to these.
8187 Adjust b4_c_function_def uses.
8188 * data/glr.c (yyparse): Likewise, but ANSI only.
8189
8190 2002-10-20 Akim Demaille <akim@epita.fr>
8191
8192 * src/output.c (prepare): Move the definition of `tokens_number',
8193 `nterms_number', `undef_token_number', `user_token_number_max'
8194 to...
8195 (prepare_tokens): Here.
8196 (prepare_tokens): Rename as...
8197 (prepare_symbols): this.
8198 (prepare): Move the definition of `rules_number' to...
8199 (prepare_rules): here.
8200 (prepare): Move the definition of `last', `final_state_number',
8201 `states_number' to...
8202 (prepare_states): here.
8203 * data/yacc.c, data/lalr1.cc, data/glr.c: Normalize `>' into `<'.
8204
8205 2002-10-20 Akim Demaille <akim@epita.fr>
8206
8207 * src/tables.h, src/tables.c, src/output.c: Comment changes.
8208
8209 2002-10-20 Akim Demaille <akim@epita.fr>
8210
8211 * data/yacc.c, data/yacc.c (b4_location_if, b4_pure_if): Move to...
8212 * data/c.m4: here.
8213
8214 2002-10-20 Akim Demaille <akim@epita.fr>
8215
8216 * src/output.c (prepare): Use MUSCLE_INSERT_STRING.
8217 * src/muscle_tab.c (muscle_pair_list_grow): Rename `val as
8218 `pair'.
8219 (muscle_init): Move the `b4_ltype', `b4_maxdepth', `b4_initdepth',
8220 `name' to...
8221 * data/glr.c, data/lalr1.cc, data/yacc.c (b4_location_type)
8222 (b4_stack_depth_init, b4_stack_depth_max, b4_parser_class_name):
8223 These.
8224
8225 2002-10-19 Paul Eggert <eggert@twinsun.com>
8226
8227 Do not create a temporary file, as that involves security and
8228 cleanup headaches. Instead, use a pair of pipes.
8229 Derived from a suggestion by Florian Krohm.
8230 * lib/subpipe.c, lib/subpipe.h, m4/subpipe.m4: New files.
8231 * lib/mkstemp.c, lib/readpipe.c, lib/tempname.c, m4/mkstemp.m4: Remove.
8232 * configure.ac (UTILS_FUNC_MKSTEMP, jm_PREREQ_TEMPNAME): Remove.
8233 (BISON_PREREQ_SUBPIPE): Add.
8234 * lib/Makefile.am (libbison_a_SOURCES): Remove readpipe.c.
8235 Add subpipe.h, subpipe.c.
8236 * m4/Makefile.am (EXTRA_DIST): Remove mkstemp.m4. Add subpipe.m4.
8237 * po/POTFILES.in: Add lib/subpipe.c.
8238 * src/output.c: Include "subpipe.h".
8239 (m4_invoke): Remove decl.
8240 (scan_skel): New decl.
8241 (output_skeleton): Use pipe rather than temporary file for m4 input.
8242 Check that m4sugar.m4 is readable, to avoid deadlock.
8243 Check for pipe I/O error.
8244 * src/scan-skel.l (readpipe): Remove decl.
8245 (scan_skel): New function, to be used in place of m4_invoke.
8246 Read from stream rather than file.
8247
8248 * lib/timevar.c (TICKS_TO_MSEC, CLOCKS_TO_MSEC): Do not cast to
8249 float, as this generates a warning on Solaris 8 + GCC 3.2 with
8250 --enable-gcc-warnings. Instead, divide into 1.0 rather than 1;
8251 this generates a more-accurate value anyway.
8252
8253 * lib/timevar.c (timervar_accumulate): Rename locals to
8254 avoid confusion with similarly-named more-global.
8255 * src/muscle_tab.c (muscle_pair_list_grow): Likewise.
8256
8257 * src/output.c (prepare): Use xstrdup to convert char const *
8258 to char *, to avoid GCC warning.
8259
8260 2002-10-19 Akim Demaille <akim@epita.fr>
8261
8262 * tests/calc.at (_AT_DATA_CALC_Y): Define VAL, LOC, LEX_FORMALS,
8263 LEX_PRE_FORMALS, LEX_ARGS, LEX_PRE_ARGS, USE_LEX_ARGS.
8264 Use them to have `calc.y' ready for %pure-parser.
8265 * data/yacc.c (YYLEX): Pass a yylex return type to
8266 b4_c_function_call.
8267
8268 2002-10-19 Akim Demaille <akim@epita.fr>
8269
8270 Prototype support of %lex-param and %parse-param.
8271
8272 * src/parse-gram.y: Add the definition of the %lex-param and
8273 %parse-param tokens, plus their rules.
8274 Drop the `_' version of %glr-parser.
8275 Add the "," token.
8276 * src/scan-gram.l (INITIAL): Scan them.
8277 * src/muscle_tab.c: Comment changes.
8278 (muscle_insert, muscle_find): Rename `pair' as `probe'.
8279 * src/muscle_tab.h (MUSCLE_INSERT_PREFIX): Remove unused.
8280 (muscle_entry_s): The `value' member is no longer const.
8281 Adjust all dependencies.
8282 * src/muscle_tab.c (muscle_init): Adjust: use
8283 MUSCLE_INSERT_STRING.
8284 Initialize the obstack earlier.
8285 * src/muscle_tab.h, src/muscle_tab.c (muscle_grow)
8286 (muscle_pair_list_grow): New.
8287 * data/c.m4 (b4_c_function_call, b4_c_args): New.
8288 * data/yacc.c (YYLEX): Use b4_c_function_call to honor %lex-param.
8289 * tests/calc.at: Use %locations, not --locations.
8290 (AT_CHECK_CALC_GLR): Use %glr-parser, not %glr_parser.
8291
8292 2002-10-19 Akim Demaille <akim@epita.fr>
8293
8294 * src/getargs.c (usage): Take status as argument and exit
8295 accordingly.
8296 Report the traditional `Try ... --help' message when status != 0.
8297 (usage, version): Don't take a FILE * as arg, it is pointless.
8298 (getargs): When there is an incorrect number of arguments, make it
8299 an error, and report it GNUlically thanks to `usage ()'.
8300
8301 2002-10-18 Paul Eggert <eggert@twinsun.com>
8302
8303 * data/glr.c (yyreportParseError): Don't assume that sprintf
8304 yields the length of the printed string, as this is not true
8305 on SunOS 4.1.4. Reported by Peter Klein.
8306
8307 * tests/calc.at (_AT_DATA_CALC_Y): #undef memcmp and realloc.
8308 * tests/conflicts.at (%nonassoc and eof): Likewise.
8309 Fixes SunOS 4.1.4 test failure reported by Peter Klein.
8310
8311 2002-10-17 Akim Demaille <akim@epita.fr>
8312
8313 * src/getargs.h (trace_e): Add trace_scan, and trace_parse.
8314 * src/getargs.c (trace_types, trace_args): Adjust.
8315 * src/reader.c (grammar_current_rule_prec_set)
8316 (grammar_current_rule_dprec_set, grammar_current_rule_merge_set):
8317 Standardize error messages.
8318 And s/@prec/%prec/!
8319 (reader): Use trace_flag to enable scanner/parser debugging,
8320 instead of an adhoc scheme.
8321 * src/scan-gram.l: Remove trailing debugging code.
8322
8323 2002-10-16 Paul Eggert <eggert@twinsun.com>
8324
8325 * src/muscle_tab.h (MUSCLE_TAB_H_): Was misspelled as
8326 MUSCLE_TAB_H.
8327
8328 * NEWS: Officially drop support for building Bison with K&R C,
8329 since it didn't work anyway and it's not worth worrying about.
8330 * Makefile.maint (wget_files): Remove ansi2knr.c.
8331 (ansi2knr.c-url_prefix): Remove.
8332 * lib/.cvsignore: Remove ansi2knr, ansi2knr.*.
8333 * lib/Makefile.am (AUTOMAKE_OPTIONS): Remove.
8334 * src/Makefile.am (AUTOMAKE_OPTIONS): Remove.
8335
8336 2002-10-15 Paul Eggert <eggert@twinsun.com>
8337
8338 Stop using the "enum_" trick for K&R-style function definitions;
8339 it confused me, and I was the author! Instead, assume that people
8340 who want to use K&R C compilers (when using these modules in GCC,
8341 perhaps?) will run ansi2knr.
8342
8343 * lib/bbitset.h: (enum_bitset_ops, enum_bitset_type): Remove.
8344 All uses of "enum_" changed to "enum ".
8345 * lib/ebitset.c (enum_ebitset_find_mode): Likewise.
8346 * lib/lbitset.c (enum_lbitset_find_mode): Likewise.
8347
8348 * lib/abitset.c (abitset_and, abitset_and_cmp, abitset_and_or,
8349 abitset_and_or_cmp, abitset_andn, abitset_andn_cmp,
8350 abitset_andn_or, abitset_andn_or_cmp, abitset_bytes, abitset_copy,
8351 abitset_copy1, abitset_disjoint_p, abitset_empty_p,
8352 abitset_equal_p, abitset_init, abitset_list, abitset_list_reverse,
8353 abitset_not, abitset_ones, abitset_or, abitset_or_and,
8354 abitset_or_and_cmp, abitset_or_cmp, abitset_reset, abitset_set,
8355 abitset_size, abitset_small_list, abitset_subset_p, abitset_test,
8356 abitset_unused_clear, abitset_xor, abitset_xor_cmp, abitset_zero):
8357 Use function prototypes; this removes the need for declaring
8358 static functions simply to provide their prototypes.
8359 * lib/bitset.c (bitset_alloc, bitset_and_or_, bitset_and_or_cmp_,
8360 bitset_andn_or_, bitset_andn_or_cmp_, bitset_bytes, bitset_copy_,
8361 bitset_count_, bitset_create, bitset_dump, bitset_first,
8362 bitset_free, bitset_init, bitset_last, bitset_next,
8363 bitset_obstack_alloc, bitset_obstack_free, bitset_only_set_p,
8364 bitset_op4_cmp, bitset_or_and_, bitset_or_and_cmp_, bitset_prev,
8365 bitset_print, bitset_release_memory, bitset_toggle_,
8366 bitset_type_choose, bitset_type_get, bitset_type_name_get,
8367 debug_bitset): Likewise.
8368 * lib/bitset.h (bitset_set, bitset_reset, bitset_test): Likewise.
8369 * lib/bitset_stats.c (bitset_log_histogram_print,
8370 bitset_percent_histogram_print, bitset_stats_and,
8371 bitset_stats_and_cmp, bitset_stats_and_or,
8372 bitset_stats_and_or_cmp, bitset_stats_andn, bitset_stats_andn_cmp,
8373 bitset_stats_andn_or, bitset_stats_andn_or_cmp, bitset_stats_copy,
8374 bitset_stats_count, bitset_stats_disable, bitset_stats_disjoint_p,
8375 bitset_stats_dump, bitset_stats_empty_p, bitset_stats_enable,
8376 bitset_stats_equal_p, bitset_stats_free, bitset_stats_init,
8377 bitset_stats_list, bitset_stats_list_reverse, bitset_stats_not,
8378 bitset_stats_ones, bitset_stats_or, bitset_stats_or_and,
8379 bitset_stats_or_and_cmp, bitset_stats_or_cmp, bitset_stats_print,
8380 bitset_stats_print_1, bitset_stats_read, bitset_stats_reset,
8381 bitset_stats_set, bitset_stats_size, bitset_stats_subset_p,
8382 bitset_stats_test, bitset_stats_toggle, bitset_stats_type_get,
8383 bitset_stats_write, bitset_stats_xor, bitset_stats_xor_cmp,
8384 bitset_stats_zero): Likewise.
8385 * lib/bitsetv.c (bitsetv_alloc, bitsetv_create, bitsetv_free,
8386 bitsetv_zero, bitsetv_ones, bitsetv_transitive_closure,
8387 bitsetv_dump, debug_bitsetv): Likewise.
8388 * lib/ebitset.c (ebitset_and, ebitset_and_cmp, ebitset_andn,
8389 ebitset_andn_cmp, ebitset_bytes, ebitset_copy, ebitset_copy_,
8390 ebitset_copy_cmp, ebitset_disjoint_p, ebitset_elt_add,
8391 ebitset_elt_alloc, ebitset_elt_calloc, ebitset_elt_find,
8392 ebitset_elt_free, ebitset_elt_last, ebitset_elt_remove,
8393 ebitset_elt_zero_p, ebitset_elts_grow, ebitset_empty_p,
8394 ebitset_equal_p, ebitset_free, ebitset_init, ebitset_list,
8395 ebitset_list_reverse, ebitset_not, ebitset_ones, ebitset_op3_cmp,
8396 ebitset_or, ebitset_or_cmp, ebitset_release_memory, ebitset_reset,
8397 ebitset_set, ebitset_size, ebitset_subset_p, ebitset_test,
8398 ebitset_weed, ebitset_xor, ebitset_xor_cmp, ebitset_zero):
8399 Likewise.
8400 * lib/lbitset.c (debug_lbitset, lbitset_and, lbitset_and_cmp,
8401 lbitset_andn, lbitset_andn_cmp, lbitset_bytes, lbitset_copy,
8402 lbitset_copy_cmp, lbitset_disjoint_p, lbitset_elt_alloc,
8403 lbitset_elt_calloc, lbitset_elt_find, lbitset_elt_free,
8404 lbitset_elt_link, lbitset_elt_unlink, lbitset_elt_zero_p,
8405 lbitset_empty_p, lbitset_equal_p, lbitset_free, lbitset_init,
8406 lbitset_list, lbitset_list_reverse, lbitset_not, lbitset_ones,
8407 lbitset_op3_cmp, lbitset_or, lbitset_or_cmp, lbitset_prune,
8408 lbitset_release_memory, lbitset_reset, lbitset_set, lbitset_size,
8409 lbitset_subset_p, lbitset_test, lbitset_weed, lbitset_xor,
8410 lbitset_xor_cmp, lbitset_zero): Likewise.
8411
8412 2002-10-14 Akim Demaille <akim@epita.fr>
8413
8414 Version 1.75.
8415
8416 2002-10-14 Akim Demaille <akim@epita.fr>
8417
8418 * tests/Makefile.am (maintainer-check-posix): New.
8419
8420 2002-10-14 Akim Demaille <akim@epita.fr>
8421
8422 * data/glr.c [YYDEBUG] (YYLEFTMOST_STATE): Initialize the yyloc
8423 member.
8424
8425 2002-10-14 Akim Demaille <akim@epita.fr>
8426
8427 * src/tables.c (table_ninf_remap): base -> tab.
8428 Reported by Matt Rosing.
8429
8430 2002-10-14 Paul Eggert <eggert@twinsun.com>
8431
8432 * tests/action.at, tests/calc.at, tests/conflicts.at,
8433 tests/cxx-type.at, tests/headers.at, tests/input.at,
8434 tests/regression.at, tests/synclines.at, tests/torture.at:
8435 Say "bison -o foo.c foo.y", not "bison foo.y -o foo.c",
8436 so that the tests still work even if POSIXLY_CORRECT is set.
8437 * doc/bison.texinfo (Rpcalc Compile, Invocation): Likewise.
8438
8439 * data/c.m4 (b4_int_type): Use yysigned_char instead of signed char,
8440 for portability to K&R hosts. Fix typo: signed char is guaranteed
8441 only to 127, not to 128.
8442 * data/glr.c (yysigned_char): New type.
8443 * data/yacc.c (yysigned_char): Likewise.
8444 * tests/regression.at (Web2c Actions): signed char -> yysigned_char.
8445
8446 2002-10-13 Paul Eggert <eggert@twinsun.com>
8447
8448 * data/yacc.c (yyparse): Rewrite to avoid "comparison is always
8449 true due to limited range of data type" warning from GCC.
8450
8451 * data/c.m4 (b4_token_defines): Protect against double-inclusion
8452 by wrapping enum yytokentype's definition inside #ifndef
8453 YYTOKENTYPE. This undoes a bug I introduced on 2002-10-12.
8454
8455 2002-10-13 Akim Demaille <akim@epita.fr>
8456
8457 * data/glr.c (yyglrShiftDefer, yyaddDeferredAction, yydoAction):
8458 Un yy- yyrhs to avoid the name clash with the global YYRHS.
8459
8460 2002-10-13 Akim Demaille <akim@epita.fr>
8461
8462 * Makefile.maint: Update from Autoconf 2.54.
8463 * m4/strerror_r.m4 (AC_FUNC_STRERROR_R): Remove, shipped with 2.54.
8464
8465 2002-10-13 Akim Demaille <akim@epita.fr>
8466
8467 * src/print.c (print_state): Separate the list of solved conflicts
8468 from the other items.
8469 * tests/conflicts.at (Resolved SR Conflicts): Adjust.
8470
8471 2002-10-13 Akim Demaille <akim@epita.fr>
8472
8473 Let nondeterministic skeletons be usable with deterministic
8474 tables.
8475
8476 With the patch, GAWK compiled by GCC without -O2 passes its test
8477 suite using a GLR parser driven by LALR tables. It fails with -O2
8478 because `struct stat' gives two different answers on my machine:
8479 88 (definition of an auto var) and later 96 (memset on this var).
8480 Hence the stack is badly corrumpted. The headers inclusion is to
8481 blame: if I move the awk.h inclusion before GLR's system header
8482 inclusion, the two struct stat have the same size.
8483
8484 * src/tables.c (pack_table): Always create conflict_table.
8485 (token_actions): Always create conflict_list.
8486 * data/glr.c (YYFLAG): Remove, unused.
8487
8488 2002-10-13 Akim Demaille <akim@epita.fr>
8489
8490 * configure.ac (AC_GNU_SOURCE): Use it instead of hand written code.
8491 (O0FLAGS): New.
8492 (VALGRIND, GXX): New.
8493 * tests/atlocal.in (CFLAGS): Use O0FLAGS.
8494 * tests/bison.in: Run $PREBISON a pre-command.
8495 * tests/Makefile.am (maintainer-check, maintainer-check-valgrind)
8496 (maintainer-check-g++): New.
8497 * Makefile.am (maintainer-check): New.
8498
8499 2002-10-13 Akim Demaille <akim@epita.fr>
8500
8501 * data/glr.c: Formatting changes.
8502 Tweak some trace messages to match yacc.c's.
8503
8504 2002-10-13 Akim Demaille <akim@epita.fr>
8505
8506 GLR parsers sometimes raise parse errors instead of performing the
8507 default reduction.
8508 Reported by Charles-Henry de Boysson.
8509
8510 * tests/calc.at (_AT_CHECK_CALC, _AT_CHECK_CALC_ERROR): Don't
8511 check the length of the traces when %glr.
8512 (_AT_CHECK_CALC_ERROR): Also skip `^Stack' lines, coming from
8513 GLR's traces.
8514 (AT_CHECK_CALC_LALR, AT_CHECK_CALC_GLR): New.
8515 Test GLR parsers.
8516 * data/glr.c (YYLEFTMOST_STATE): Fix its value.
8517 (yyltype): Remove the yy prefix from the member names.
8518 (yytable): Complete its comment.
8519 (yygetLRActions): Map error action number from YYTABLE from
8520 YYTABLE_NINF to 0.
8521 (yyisErrorAction): No longer compare YYACTION to YYPACT_NINF
8522 (which was a bug: it should have been YYTABEL_NINF, and yet it was
8523 not satisfying as we could compare an YYACTION computed from
8524 YYDEFACT to YYTABLE_NINF although they are unrelated): 0 is the
8525 only value for error actions.
8526 (yyreportParseError): In verbose parse error messages, don't issue
8527 `error' in the list of expected tokens.
8528 * data/yacc.c (yyparse) <yybackup>: Rewrite the decoding of the
8529 next action to perform to match glr.c's decoding.
8530 (yytable): Complete its comment.
8531
8532 2002-10-13 Paul Eggert <eggert@twinsun.com>
8533
8534 Fix problem reported by Henrik Grubbstroem in
8535 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00098.html>:
8536 "nonterm: { $$ = 123; } { $$ = $1; };" was wrongly rejected,
8537 because the Bison parser reads the second action before reducing
8538 the first one.
8539 * src/scan-gram.l (rule_length): New static var.
8540 Use it to keep track of the rule length in the scanner, since
8541 we can't expect the parser to be in lock-step sync with the scanner.
8542 (handle_action_dollar, handle_action_at): Use this var.
8543 * tests/actions.at (Exotic Dollars): Test for the problem.
8544
8545 2002-10-12 Paul Eggert <eggert@twinsun.com>
8546
8547 * lib/timevar.c [! IN_GCC && HAVE_SYS_TIME_H]: Include <sys/time.h>.
8548 * m4/timevar.m4 (BISON_PREREQ_TIMEVAR): Check for <sys/time.h>.
8549 Include <sys/time.h> when checking for clock_t and struct tms.
8550 Use same include order as source.
8551 This is for the SunOS 4.1.4 porting bug reported by Peter Klein in
8552 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00016.html>.
8553
8554 * lib/timevar.c: Update copyright date and clarify comments.
8555 (get_time) [IN_GCC]: Keep the GCC version for reference.
8556
8557 * lib/timevar.c, lib/timevar.h, lib/timevar.def: Import
8558 GCC version as of today, then merge Bison's changes.
8559 Change "GCC" to "Bison" in copyright notice. timevar.def's
8560 author is Akim, so change that too.
8561
8562 * src/reader.c (grammar_current_rule_check):
8563 Don't worry about the default action if $$ is untyped.
8564 Prevents bogus warnings reported by Jim Gifford in
8565 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00015.html>.
8566
8567 * data/c.m4 (b4_token_enum): Do not define YYTOKENTYPE.
8568 * data/glr.c, data/lalr1.cc, data/yacc.c:
8569 Output token definitions before the first part of user declarations.
8570 Fixes compatibility problem reported by Jim Gifford for kbd in
8571 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00014.html>.
8572
8573 2002-10-11 Paul Eggert <eggert@twinsun.com>
8574
8575 * data/yacc.c (yyreport_parse_error): Remove, putting its body into...
8576 (yyparse): here. This undoes some of the 2002-07-25 change.
8577 Compatibility problem reported by Ralf S. Engelschall with
8578 OSSP cfg <http://www.ossp.org/pkg/lib/cfg/>.
8579
8580 2002-10-11 Akim Demaille <akim@epita.fr>
8581
8582 * tests/regression.at Characters Escapes): New.
8583 * src/scan-gram.l (SC_ESCAPED_CHARACTER): Accept \' in strings and
8584 characters.
8585 Reported by Jan Nieuwenhuizen.
8586
8587 2002-10-11 Akim Demaille <akim@epita.fr>
8588
8589 * po/id.po: New.
8590
8591 2002-10-10 Paul Eggert <eggert@twinsun.com>
8592
8593 Portability fixes for bitsets; this also avoids several GCC
8594 warnings.
8595
8596 * lib/abitset.c: Include <stddef.h>, for offsetof.
8597 * lib/lbitset.c: Likewise.
8598
8599 * lib/abitset.c (abitset_bytes): Return a size that is aligned
8600 properly for vectors of objects. Do not assume that adding a
8601 header size to a multiple of a word size yields a value that is
8602 properly aligned for the whole union.
8603 * lib/bitsetv.c (bitsetv_alloc): Likewise.
8604
8605 * lib/bitset_stats.c (bitset_stats_bytes): Adjust to new,
8606 unique names for structures.
8607 * lib/ebitset.c (ebitset_bytes): Likewise.
8608 * lib/lbitset.c (lbitset_bytes): Likewise.
8609
8610 * lib/abitset.c (abitset_ones, abitset_zero, abitset_empty_p,
8611 abitset_copy1, abitset_not, abitset_equal_p, abitset_subset_p,
8612 abitset_disjoint_p, abitset_and, abitset_and_cmp, abitset_andn,
8613 abitset_andn_cmp, abitset_or, abitset_or_cmp, abitset_xor,
8614 abitset_xor_cmp, abitset_and_or, abitset_and_or_cmp,
8615 abitset_andn_or, abitset_andn_or_cmp, abitset_or_and,
8616 abitset_or_and_cmp, abitset_copy): Supply prototype decls,
8617 to improve the type-checking that GCC can do.
8618 * lib/bitset.c (bitset_op4_cmp): Likewise.
8619 * lib/bitset_stats.c (bitset_stats_count,
8620 bitset_stats_empty_p, bitset_stats_ones, bitset_stats_zero,
8621 bitset_stats_copy, bitset_stats_disjoint_p,
8622 bitset_stats_equal_p, bitset_stats_not, bitset_stats_subset_p,
8623 bitset_stats_and, bitset_stats_and_cmp, bitset_stats_andn,
8624 bitset_stats_andn_cmp, bitset_stats_or, bitset_stats_or_cmp,
8625 bitset_stats_xor, bitset_stats_xor_cmp, bitset_stats_and_or,
8626 bitset_stats_and_or_cmp, bitset_stats_andn_or,
8627 bitset_stats_andn_or_cmp, bitset_stats_or_and,
8628 bitset_stats_or_and_cmp): Likewise.
8629 * lib/lbitset.c (lbitset_and, lbitset_and_cmp, lbitset_andn,
8630 lbitset_andn_cmp, lbitset_or, lbitset_or_cmp, lbitset_xor,
8631 lbitset_xor_cmp, lbitset_empty_p, lbitset_ones, lbitset_not,
8632 lbitset_subset_p, lbitset_disjoint_p, debug_lbitset): Likewise.
8633
8634 * lib/abitset.h: Include bitset.h, not bbitset.h.
8635 * lib/ebitset.h: Likewise.
8636 * lib/lbitset.h: Likewise.
8637
8638 * lib/bbitset.h: (enum_bitset_ops, enum_bitset_type): New types.
8639 All instances of parameters of type enum bitset_opts are now of
8640 type enum_bitset_opts, to conform to the C Standard, and similarly
8641 for enum_bitset_type.
8642 * lib/ebitset.c (enum_ebitset_find_mode): Likewise.
8643 * lib/lbitset.c (enum_lbitset_find_mode): Likewise.
8644
8645 Do not use "struct bitset_struct" to mean different things in
8646 different modules. Not only is this confusing, it violates
8647 the C Standard, which requires that structure types in different
8648 modules must be compatible if one is to be passed to the other.
8649 * lib/bbitset.h (bitset): Now points to a union, not to a struct.
8650 All instances of "struct bitset_struct *" replaced with "bitset".
8651 * lib/bitset.h (struct bitset_struct): Remove, replacing with....
8652 (union bitset_union, struct abitset_struct, struct ebitset_struct,
8653 struct lbitset_struct, struct bitset_stats_struct): New types.
8654 All uses of struct bitset_struct changed to union bitset_union,
8655 etc.
8656 * lib/abitset.c (struct abitset_struct, abitset,
8657 struct bitset_struct): Remove.
8658 * lib/bitset_stats.c (struct bitset_stats_struct, bitset_stats,
8659 struct bitset_struct): Remove.
8660 * lib/ebitset.c (struct ebitset_struct, ebitset, struct
8661 bitset_struct): Remove.
8662 * lib/lbitset.c (struct lbitset_struct, lbitset, bitset_struct):
8663 Likewise.
8664
8665 Do not call a function of type T using a call that assumes the
8666 function is of a different type U. Standard C requires that a
8667 function must be called with a type that is compatible with its
8668 definition.
8669 * lib/bbitset.h (bitset_and_or_, bitset_andn_or_, bitset_or_and_):
8670 New decls.
8671 * lib/bitset.c (bitset_and_or_, bitset_andn_or_, bitset_or_and_):
8672 New functions.
8673 * lib/ebitset.c (PFV): Remove.
8674 * lib/lbitset.c (PFV): Likewise.
8675 * lib/ebitset.c (ebitset_and, ebitset_andn, ebitset_or,
8676 ebitset_xor, ebitset_copy, ebitset_ones, ebitset_empty_p): New
8677 decls.
8678 (ebitset_and, ebitset_andn, ebitset_or, ebitset_xor): New functions.
8679 (ebitset_vtable): Use them.
8680 * lib/lbitset.c (lbitset_and, lbitset_andn, lbitset_or,
8681 lbitset_xor): New functions.
8682 (lbitset_vtable): Use them.
8683
8684 * lib/bitset.h (bitset_next, bitset_prev, bitset_only_set_p):
8685 Declare.
8686
8687 * lib/bitsetv.c (bitsetv_alloc): Add a cast to (void *) to avoid a
8688 GCC warning.
8689 * lib/lbitset.c (LBITSET_CURRENT1): Likewise.
8690 Use offsetof, for simplicity.
8691
8692 2002-10-06 Paul Eggert <eggert@twinsun.com>
8693
8694 * lib/bitset.h (bitset_reset): Do not assume that bitset_word is
8695 the same width as int. This reapplies a hunk of the 2002-08-12 patch
8696 <http://lists.gnu.org/archive/html/bison-patches/2002-08/msg00007.html>,
8697 which was inadvertently undone by the 2002-09-30 patch.
8698 * lib/lbitset.c (debug_lbitset): Do not assume that bitset_word is
8699 the same width as int.
8700
8701 2002-10-04 Paul Eggert <eggert@twinsun.com>
8702
8703 Version 1.50.
8704
8705 * configure.ac (AC_INIT), NEWS: Increment version number.
8706
8707 * doc/bison.texinfo: Minor spelling, grammar, and white space
8708 fixes.
8709 (Symbols): Mention that any negative value returned from yylex
8710 signifies end-of-input. Warn about negative chars. Mention
8711 the portable Standard C character set.
8712
8713 The GNU coding standard says CFLAGS and YFLAGS are reserved
8714 for the installer to set.
8715 * lib/Makefile.am (AM_CFLAGS): Renamed from CFLAGS.
8716 * src/Makefile.am (AM_CFLAGS): Likewise.
8717 (AM_YFLAGS): Renamed from YFLAGS.
8718
8719 Fix some MAX and MIN problems.
8720 * src/gram.h (ITEM_NUMBER_MIN): MIN_MAX -> INT_MIN.
8721 * src/lalr.h (GOTO_NUMBER_MAX): INT_MAX -> SHRT_MAX.
8722 * src/symtab.h (SYMBOL_NUMBER_MAX): New macro.
8723 * src/reader.c (reader): Use it.
8724
8725 * tests/regression.at (Braces parsing): Use grep, not fgrep, as
8726 POSIX 1003.1-2001 has removed fgrep.
8727
8728 2002-10-04 Michael Hayes <m.hayes@elec.canterbury.ac.nz>
8729
8730 * lib/bbitset.h (BITSET_WINDEX_MAX): Redefine so that it cannot be
8731 interpreted as signed.
8732 * lib/ebitset.c (ebitset_list): Fix bug.
8733
8734 2002-10-01 Paul Eggert <eggert@twinsun.com>
8735
8736 More fixes for 64-bit hosts and large bitsets.
8737
8738 * lib/abitset.c (struct abitset_struct.n_bits, abitset_small_list,
8739 abitset_size, abitset_list, abitset_list_reverse, abitset_list):
8740 Use bitset_bindex, not int or unsigned int or size_t, to count bits.
8741 * lib/bbitset.h (struct bitset_vtable.size, struct bitset_vtable.count,
8742 struct bitset_vtable.list, struct bitset_vtable.list_reverse,
8743 bitset_count_, bitset_next, bitset_prev, bitset_first, bitset_last,
8744 bitset_count_): Likewise.
8745 * lib/bitset.h (bitset_iterator.num, bitset_iterator.i,
8746 bitset_first, bitset_last): Likewise.
8747 * lib/bitset_stats.c (bitset_stats_size, bitset_stats_list,
8748 bitset_stats_list_reverse, bitset_stats_size,
8749 bitset_stats_count, bitset_stats_list, bitset_stat_list_reverse):
8750 Likewise.
8751 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
8752 * lib/bitsetv.c (bitsetv_alloc, bitsetv_create, bitsetv_free,
8753 bitsetv_zero, bitsetv_ones, bitsetv_transitive_closure,
8754 bitsetv_reflexive_transitive_closure): Likewise.
8755 * lib/bitsetv.h (bitsetv_alloc, bitsetv_create): Likewise.
8756 * lib/ebitset.c (ebitset_size, ebitset_list, ebitset_list_reverse):
8757 Likewise.
8758 * lib/lbitset.c (lbitset_size, lbitset_list, lbitset_list_merge):
8759 Likewise.
8760
8761 * lib/abitset.c (abitset_ones, abitset_zero, abitset_bytes):
8762 Use size_t, not unsigned int, to count bytes.
8763 * lib/abitset.h (abitset_bytes): Likewise.
8764 * lib/bitset.c (bitset_bytes, bitset_alloc, bitset_obstack_alloc):
8765 Likewise.
8766 * lib/bitset.h (bitset_bytes): Likewise.
8767 * lib/bitset_stats.c (bitset_stats_bytes, bitset_stats_init): Likewise.
8768 * lib/bitset_stats.h (bitset_stats_bytes): Likewise.
8769 * lib/bitsetv.c (bitsetv_alloc): Likewise.
8770 * lib/ebitset.c (ebitset_bytes): Likewise.
8771 * lib/ebitset.h (ebitset_bytes): Likewise.
8772 * lib/lbitset.c (lbitset_bytes): Likewise.
8773 * lib/lbitset.h (lbitset_bytes): Likewise.
8774
8775 * lib/abitset.c (abitset_empty_p, abitset_not, abitset_equal_p,
8776 abitset_subset_p, abitset_disjoint_p, abitset_and,
8777 abitset_and_cmp, abitset_andn, abitset_andn_cmp, abitset_or,
8778 abitset_or_cmp, abitset_xor, abitset_xor_cmp, abitset_and_or,
8779 abitset_and_or_cmp, abitset_andn_or, abitset_andn_or_cmp,
8780 abitset_or_and, abitset_or_and_cmp):
8781 Use bitset_windex instead of unsigned int.
8782 * lib/bitsetv.c (bitsetv_dump, debug_bitsetv): Likewise.
8783 * lib/ebitset.c (struct ebitset_struct.size, ebitset_elts_grow,
8784 ebitset_elt_add, ebitset_elt_remove, ebitset_weed,
8785 ebitset_elt_find, ebitset_list_reverse, ebitset_list, ebitset_init):
8786 Likewise.
8787 * lib/lbitset.c (lbitset_ones, lbitset_not): Likewise.
8788
8789 * lib/bitset.c (bitset_print):
8790 Use proper printf formats for widths of integer types.
8791 * lib/bitset_stats.c (bitset_percent_histogram_print,
8792 bitset_log_histogram_print, bitset_stats_print_1): Likewise.
8793 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
8794 * lib/bitsetv.c (bitsetv_dump, debug_bitsetv): Likewise.
8795 * lib/lbitset.c (lbitset_bytes): Likewise.
8796
8797 * lib/bbitset.h (BITSET_BINDEX_MAX, BITSET_WINDEX_MAX,
8798 BITSET_SIZE_MAX): New macros.
8799 (BITSET_INDEX_MAX): Remove. It wasn't right, since it assumed that
8800 sizeof (bitset_word) == sizeof (bitset_windex). All uses changed
8801 to BITSET_WINDEX_MAX.
8802
8803 * lib/bitset.c (bitset_next, bitset_prev, bitset_first,
8804 bitset_last): Return BITSET_BINDEX_MAX (not -1) for no value,
8805 since we now return the bitset_bindex type (not int).
8806
8807 * lib/bitsetv.c (bitsetv_alloc): Check for arithmetic overflow
8808 when computing sizes.
8809 * lib/ebitset.c (ebitset_elts_grow): Likewise.
8810
8811 * lib/lbitset.c (lbitset_elt_find): Simplify windex calculation
8812 and avoid cast to unsigned.
8813
8814 2002-09-30 Akim Demaille <akim@epita.fr>
8815
8816 * lib/abitset.c, lib/bbitset.h, lib/bitset.c, lib/bitset.h,
8817 * lib/bitset_stats.c, lib/bitsetv.c, lib/ebitset.c, lib/lbitset.c:
8818 Updates from Michael Hayes.
8819
8820 2002-09-30 Art Haas <ahaas@neosoft.com>
8821
8822 * configure.ac: Update AC_OUTPUT and AM_CONFIG_HEADER
8823 invocations.
8824 * tests/cxx-type.at (declarator): Don't rely on NDEBUG being not
8825 defined.
8826
8827 2002-09-27 Akim Demaille <akim@epita.fr>
8828
8829 Version 1.49c.
8830
8831 2002-09-27 Akim Demaille <akim@epita.fr>
8832
8833 * configure.ac (AM_INIT_AUTOMAKE): We _need_ 1.7.
8834 (Because of AC_LIBSOURCE).
8835
8836 2002-09-27 Akim Demaille <akim@epita.fr>
8837
8838 Playing with Autoscan.
8839
8840 * configure.ac: Remove the old LIBOBJ tweaks.
8841 (AC_REPLACE_FUNCS): Add strrchr and strtol.
8842 * lib/strrchr.c: New.
8843 * lib/strtol.c: New, from the Coreutils 4.5.1.
8844
8845 2002-09-27 Akim Demaille <akim@epita.fr>
8846
8847 Playing with Autoscan.
8848
8849 * m4/prereq.m4 (jm_PREREQ_ARGMATCH, jm_FUNC_ARGMATCH): New.
8850 * lib/Makefile.am (libbison_a_SOURCES): No longer include
8851 argmatch.c and argmatch.h, since they are AC_LIBSOURCE'd.
8852 * lib/strcasecmp.c, lib/strncasecmp.c, lib/memcmp.c: New, from the
8853 Coreutils 4.5.1.
8854
8855 2002-09-24 Akim Demaille <akim@epita.fr>
8856
8857 * doc/bison.texinfo (Stack Overflow): xref to Recursion.
8858 (Frequently Asked Questions, Parser Stack Overflow): New.
8859
8860 2002-09-13 Akim Demaille <akim@epita.fr>
8861
8862 Playing with autoscan.
8863
8864 * src/reader.c (get_merge_function): Use xstrdup, not strdup.
8865 * src/files.c (skeleton_find): Remove, unused.
8866 * m4/memcmp.m4: New, from the Coreutils 4.5.1.
8867 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Run jm_FUNC_MEMCMP.
8868
8869 2002-09-13 Akim Demaille <akim@epita.fr>
8870
8871 * configure.ac (AM_INIT_AUTOMAKE): Require Automake 1.6.3.
8872 * Makefile.am (AUTOMAKE_OPTIONS): Don't.
8873
8874 2002-09-13 Akim Demaille <akim@epita.fr>
8875
8876 * configure.ac: Require 2.54.
8877 s/jm_FUNC_MALLOC/AC_FUNC_MALLOC/.
8878 s/jm_FUNC_REALLOC/AC_FUNC_REALLOC/.
8879 * m4/c-bs-a.m4, m4/malloc.m4, m4/mbstate_t.m4, m4/realloc.m4:
8880 Remove, provided by Autoconf macros.
8881
8882 2002-09-12 Akim Demaille <akim@epita.fr>
8883
8884 * m4/prereq.m4: Update, from Coreutils 4.5.1.
8885
8886 2002-09-12 Akim Demaille <akim@epita.fr>
8887
8888 * m4/prereq.m4: Update, from Fileutils 4.1.5.
8889 * configure.ac (jm_PREREQ_TEMPNAME): Invoke it.
8890 Reported by Martin Mokrejs.
8891
8892 2002-09-10 Akim Demaille <akim@epita.fr>
8893
8894 * src/parse-gram.y: Associate a human readable string to each
8895 token type.
8896 * tests/regression.at (Invalid inputs): Adjust.
8897
8898 2002-09-10 Gary V. Vaughan <gary@gnu.org>
8899
8900 * tests/Makefile.am ($(srcdir)/package.m4): Bison now ships
8901 with an Autoconf-2.5x style configure.ac.
8902
8903 2002-09-06 Paul Eggert <eggert@twinsun.com>
8904
8905 * doc/bison.texinfo (Conditions): Make explicit that the GPL
8906 exception applies only to yacc.c. This is a modification of a
8907 patch originally suggested by Akim Demaille.
8908
8909 2002-09-06 Akim Demaille <akim@epita.fr>
8910
8911 * data/c.m4 (b4_copyright): Move the GPL exception comment from
8912 here to...
8913 * data/yacc.c: here.
8914
8915 * data/lalr1.cc (struct yyltype): Don't define it, since we use
8916 LocationType.
8917 (b4_ltype): Default to yy::Location from location.hh.
8918
8919 2002-09-04 Jim Meyering <jim@meyering.net>
8920
8921 * data/yacc.c: Guard the declaration of yytoknum also with
8922 `#ifdef YYPRINT', so it is declared only when used.
8923
8924 2002-09-04 Akim Demaille <akim@epita.fr>
8925
8926 * configure.in: Rename as...
8927 * configure.ac: this.
8928 Bump to 1.49c.
8929
8930 2002-09-04 Akim Demaille <akim@epita.fr>
8931
8932 * src/assoc.c, src/closure.c, src/gram.c, src/injections.c,
8933 * src/lalr.c, src/LR0.c, src/relation.c, src/tables.c: Don't
8934 translate maintainer only messages.
8935
8936 2002-08-12 Paul Eggert <eggert@twinsun.com>
8937
8938 Version 1.49b.
8939
8940 * Makefile.am (SUBDIRS): Remove intl.
8941 (DISTCLEANFILES): Remove.
8942 * NEWS: Mention that GNU M4 is now required. Clarify what is
8943 meant by "larger grammars". Mention the pt_BR translation.
8944 * configure.in (AC_CHECK_DECLS): Add getenv, getopt.
8945 (AM_GNU_GETTEXT_VERSION): New macro, replacing GETTEXT_VERSION var.
8946 Bump version from 0.11.2 to 0.11.5.
8947 (BISON_PREREQ_STAGE): Remove.
8948 (AM_GNU_GETTEXT): Use external gettext.
8949 (AC_OUTPUT): Remove intl/Makefile.
8950
8951 * config/depcomp, config/install-sh: Sync with Automake 1.6.3.
8952
8953 * data/glr.c: Include string.h, for strlen.
8954 (yyreportParseError): Use size_t for yysize.
8955 (yy_yypstack): No longer nested inside yypstates, as nested
8956 functions are not portable. Do not assume size_t is the
8957 same width as int.
8958 (yypstates): Do not assume that ptrdiff_t is the same width
8959 as int, and similarly for yyposn and YYINDEX.
8960
8961 * data/yacc.c: Fix comment about `$$ = $1': it can copy garbage.
8962
8963 * lib/Makefile.am (INCLUDES): Do not include from the intl
8964 directory, which has been removed.
8965 * src/Makefile.am (INCLUDES): Likewise.
8966
8967 * lib/Makefile.am (libbison_a_SOURCES): Add unlocked-io.h.
8968 (bitsets_sources, additional_bitsets_sources, timevars_sources):
8969 New vars.
8970
8971 * lib/Makefile.am (libbison_a_SOURCES): Avoid +=, a GNU make extension.
8972 * tests/Makefile.am (EXTRA_DIST): Likewise.
8973
8974 * lib/abitset.c (abitset_reverse_list, ebitset_reverse_list):
8975 Do not assume that bitset_windex is the same width as unsigned.
8976
8977 * lib/abitset.c (abitset_unused_clear): Do not assume that
8978 bitset_word is the same width as int.
8979 * lib/bbitset.h (BITSET_INDEX_MAX, BITSET_MSB): Likewise.
8980 * lib/bitset.h (bitset_set, bitset_reset): Likewise.
8981 * lib/bitset_stats.c (bitset_stats_set, bitset_stats_reset): Likewise.
8982 * lib/ebitset.c (ebitset_set, ebitset_reset): Likewise.
8983 * lib/lbitset.c (lbitset_set, lbitset_reset): Likewise.
8984
8985 * lib/abitset.c (abitset_op1): Use -1, not ~0, as memset arg (for
8986 portability to one's complement hosts!).
8987 * lib/ebitset.c (ebitset_op1): Likewise.
8988 * lib/lbitset.c (lbitset_op1): Likewise.
8989
8990 * lib/argmatch.c, lib/quotearg.c, quotearg.h: Sync with GNU tar.
8991 * lib/argmatch.h, lib/basename.c, lib/dirname.c, lib/dirname.h,
8992 lib/hash.c, lib/hash.h, lib/strnlen.c, lib/xmalloc.c:
8993 Sync with fileutils.
8994 * lib/error.c, lib/getopt.c, lib/getopt.h, lib/getopt1.c,
8995 lib/gettext.h: Sync with diffutils.
8996
8997 * lib/memrchr.c, lib/mkstemp.c, lib/strchr.c, lib/strnlen.c,
8998 lib/strspn.c, lib/tempname.c: Use GPL, not LGPL.
8999
9000 * lib/obstack.c, lib/obstack.h: Sync with fileutils, except use
9001 PROTOTYPES to check for prototypes, and "defined __STDC__" to
9002 check for void *.
9003
9004 * lib/bbitset.h (BITSET_WORD_BITS): Now of type unsigned, not
9005 size_t; the old version tried to do this but casted improperly.
9006 (bitset_bindex, bitset_windex): Now size_t, not unsigned long.
9007 (bitset_test): Now returns int, not unsigned long.
9008
9009 * lib/bitset_stats.c: Include "gettext.h".
9010 (_): New macro.
9011 (bitset_stats_set, bitset_stats_reset, bitset_stats_test): Don't
9012 name locals "index", as it generates unnecessary warnings on some
9013 hosts that have an "index" function.
9014
9015 * lib/bitset_stats.c (bitset_stats_print_1, bitset_stats_print,
9016 bitset_stats_read, bitset_stats_write): Wrap strings in _() if
9017 they need translation.
9018 * src/LR0.c (state_list_append, new_itemsets, get_state,
9019 append_states, generate_states): Likewise.
9020 * src/assoc.c (assoc_to_string): Likewise.
9021 * src/closure.c (print_closure, set_firsts, closure): Likewise.
9022 * src/gram.c (grammar_dump): Likewise.
9023 * src/injections.c (injections_compute): Likewise.
9024 * src/lalr.c (lookaheads_print): Likewise.
9025 * src/relation.c (relation_transpose): Likewise.
9026 * src/scan-gram.l: Likewise.
9027 * src/tables.c (table_grow, pack_vector): Likewise.
9028
9029 * m4/Makefile.am (EXTRA_DIST): Remove codeset.m4,
9030 glibc21.m4, isc-posix.m4 lcmessage.m4, stage.m4.
9031 * m4/malloc.m4, m4/realloc.m4: Sync with diffutils.
9032 * m4/mbstate_t.m4: Sync with fileutils.
9033 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): AC_MBSTATE_T -> AC_TYPE_MBSTATE_T.
9034
9035 * po/LINGUAS: Add pt_BR.
9036 * po/POTFILES.in: Add src/assoc.c, src/closure.c, src/gram.c,
9037 src/main.c, src/relation.c, src/state.c, lib/bitset_stats.c,
9038 lib/timevar.c.
9039 Use src/parse-gram.y instead of src/parse-gram.c, as the gettext
9040 manual recommends.
9041 Similarly, use src/scan-gram.l instead of src/scan-gram.c.
9042
9043 * src/complain.c (strerror_r): Remove decl; not needed.
9044 (strerror): Use same pattern as ../lib/error.c.
9045
9046 * src/files.c, src/files.h (compute_header_macro): Remove; unused.
9047
9048 * src/gram.c (grammar_dump): Do not assume ptrdiff_t fits in int.
9049
9050 * src/main.c (main): Cast result of bindtextdomain and textdomain
9051 to void, to avoid a GCC warning when --disable-nls is in effect.
9052
9053 * src/scan-gram.l: Use strings rather than escapes when possible,
9054 to minimize the number of warnings from xgettext.
9055 (handle_action_dollar, handle_action_at): Don't use isdigit,
9056 as it mishandles negative chars and it may not work as expected
9057 outside the C locale.
9058
9059 * src/symtab.c (symbol_get): Don't cast LHS of an assignment;
9060 this is a GCC extension and is not portable to other compilers.
9061
9062 * src/system.h (alloca): Use same pattern as ../lib/error.c.
9063 Do not include <ctype.h>; no longer needed.
9064 Do not include <malloc.h>; no longer needed (and generates
9065 warnings on OpenBSD 3.0).
9066
9067 * tests/cxx-type.at (yylex): Do not pass signed char to isupper;
9068 it's not portable.
9069
9070 * tests/regression.at: Do not use 'cc -c input.c -o input';
9071 Sun C rejects this. Instead, use 'cc -c input.c -o input.o'.
9072
9073 * tests/synclines.at (AC_SYNCLINES_COMPILE): Accept any nonzero
9074 exit status as failure, not just exit status 1. Sun C exits
9075 with status 2 sometimes.
9076
9077 * tests/torture.at (AT_INCREASE_DATA_SIZE): New macro.
9078 Use it for the two large tests.
9079
9080 2002-08-02 Akim Demaille <akim@epita.fr>
9081
9082 * src/conflicts.c (conflicts_output): Don't output rules never
9083 reduced here, since anyway that computation doesn't work.
9084 * src/gram.h, src/gram.h (rule_filter_t, rule_useful_p)
9085 (rule_useless_p, rule_never_reduced_p): New.
9086 (grammar_rules_partial_print): Use a filter instead of a range.
9087 Display the title only if needed.
9088 (grammar_rules_print): Adjust.
9089 (grammar_rules_never_reduced_report): New.
9090 * src/tables.c (action_row): Move the computation of rules never
9091 reduced to...
9092 (token_actions): here.
9093 * src/main.c (main): Make the parser before making the report, so
9094 that rules never reduced are computed.
9095 Call grammar_rules_never_reduced_report.
9096 * src/print.c (print_results): Report rules never reduced.
9097 * tests/conflicts.at, tests/reduce.at: Adjust.
9098
9099 2002-08-01 Akim Demaille <akim@epita.fr>
9100
9101 Instead of attaching lookaheads and duplicating the rules being
9102 reduced by a state, attach the lookaheads to the reductions.
9103
9104 * src/state.h (state_t): Remove the `lookaheads',
9105 `lookaheads_rule' member.
9106 (reductions_t): Add a `lookaheads' member.
9107 Use a regular array for the `rules'.
9108 * src/state.c (reductions_new): Initialize the lookaheads member
9109 to 0.
9110 (state_rule_lookaheads_print): Adjust.
9111 * src/state.h, src/state.c (state_reductions_find): New.
9112 * src/conflicts.c (resolve_sr_conflict, set_conflicts)
9113 (count_rr_conflicts): Adjust.
9114 * src/lalr.c (LArule): Remove.
9115 (add_lookback_edge): Adjust.
9116 (state_lookaheads_count): New.
9117 (states_lookaheads_initialize): Merge into...
9118 (initialize_LA): this.
9119 (lalr_free): Adjust.
9120 * src/main.c (main): Don't free nullable and derives too early: it
9121 is used by --verbose.
9122 * src/print.c, src/print_graph.c, src/tables.c: Adjust.
9123
9124 2002-08-01 Akim Demaille <akim@epita.fr>
9125
9126 * src/derives.h, src/derives.c (derives): A `rule_t***' instead of
9127 `rule_number_t**'.
9128 (set_derives, free_derives): Rename as...
9129 (derives_compute, derives_free): this.
9130 Adjust all dependencies.
9131 * src/nullable.c (set_nullable, free_nullable): Rename as...
9132 (nullable_compute, nullable_free): these.
9133 (rule_list_t): Store rule_t *, not rule_number_t.
9134 * src/state.c (state_rule_lookaheads_print): Directly compare rule
9135 pointers, instead of their numbers.
9136 * src/main.c (main): Call nullable_free, and derives_free earlier,
9137 as they were lo longer used.
9138
9139 2002-08-01 Akim Demaille <akim@epita.fr>
9140
9141 * lib/timevar.c (get_time): Include children time.
9142 * src/lalr.h (LA, LArule): Don't export them: used with the
9143 state_t.
9144 * src/lalr.c (LA, LArule): Static.
9145 * src/lalr.h, src/lalr.c (lalr_free): New.
9146 * src/main.c (main): Call it.
9147 * src/tables.c (pack_vector): Check whether loc is >= to the
9148 table_size, not >.
9149 (pack_tables): Don't free froms, tos, conflict_tos, and pos...
9150 (tables_generate): do it, since that's also it which allocates
9151 them.
9152 Don't free LA and LArule, main does.
9153
9154 2002-07-31 Akim Demaille <akim@epita.fr>
9155
9156 Separate parser tables computation and output.
9157
9158 * src/output.c (nvectors, base_t, base, base_ninf, conflict_table)
9159 (conflict_list, conflict_list_cnt, table, check, table_ninf)
9160 (yydefgoto, yydefact, high): Move to...
9161 * src/tables.h, src/tables.c: here.
9162 * src/output.c (vector_number_t, VECTOR_NUMBER_MAX)
9163 (VECTOR_NUMBER_MIN, state_number_to_vector_number)
9164 (symbol_number_to_vector_number, nvectors, BASE_MAX, BASE_MIN)
9165 (froms, tos, conflict_tos, tally, width, action_t, ACTION_MAX)
9166 (ACTION_MIN, actrow, order, nentries, pos, conflrow)
9167 (conflict_list_free, table_size, lowzero, table_grow, conflict_row)
9168 (action_row, save_row, token_actions, save_column, default_goto)
9169 (goto_actions, sort_actions, matching_state, pack_vector)
9170 (table_ninf_remap, pack_table, prepare_actions): Move to...
9171 * src/tables.c: here.
9172 * src/tables.h, src/tables.c(tables_generate, tables_free): New.
9173 * src/output.c (token_actions, output_base, output_conflicts)
9174 (output_check): Merge into...
9175 (prepare_actions): this.
9176 (actions_output): Rename as...
9177 (user_actions_output): this.
9178 * src/main.c (main): Call tables_generate and tables_free.
9179
9180 2002-07-31 Akim Demaille <akim@epita.fr>
9181
9182 Steal GCC's --time-report support.
9183
9184 * lib/timevar.c, lib/timevar.h, lib/timevar.def: New,
9185 stolen/adjusted from GCC.
9186 * m4/stage.m4: Remove time related checks.
9187 * m4/timevar.m4: New.
9188 * configure.in: Adjust.
9189 * src/system.h: Adjust to using timevar.h.
9190 * src/getargs.h, src/getargs.c: Support trace_time for
9191 --trace=time.
9192 * src/main.c (stage): Remove.
9193 (main): Replace `stage' invocations with timevar calls.
9194 * src/output.c: Insert pertinent timevar calls.
9195
9196 2002-07-31 Akim Demaille <akim@epita.fr>
9197
9198 Let --trace have arguments.
9199
9200 * src/getargs.h (enum trace_e): New.
9201 * src/getargs.c (trace_args, trace_types, trace_argmatch): New.
9202 (long_options, short_options): --trace/-T takes an optional
9203 argument.
9204 Change all the uses of trace_flag to reflect the new flags.
9205 * tests/sets.at (Firsts, Nullable, Broken Closure): Use --trace=sets.
9206
9207 Strengthen `stage' portability.
9208
9209 * m4/stage.m4 (BISON_PREREQ_STAGE): New.
9210 * configure.in: Use it.
9211 Don't check for malloc.h and sys/times.h.
9212 * src/system.h: Include them when appropriate.
9213 * src/main.c (stage): Compile only when mallinfo, struct mallinfo,
9214 times and struct tms are available.
9215
9216 2002-07-30 Akim Demaille <akim@epita.fr>
9217
9218 In verbose parse error message, don't report `error' as an
9219 expected token.
9220 * tests/actions.at (Printers and Destructors): Adjust.
9221 * tests/calc.at (Calculator $1): Adjust.
9222 * data/yacc.c, data/glr.c, data/lalr1.c: When making the verbose
9223 error message, do not report the parser accepts the error token in
9224 that state.
9225
9226 2002-07-30 Akim Demaille <akim@epita.fr>
9227
9228 Normalize conflict related messages.
9229
9230 * src/complain.h, src/complain.c (warn, complain): New.
9231 * src/conflicts.c (conflicts_print): Use them.
9232 (conflict_report_yacc): New, extracted from...
9233 (conflicts_print): here.
9234 * tests/conflicts.at, tests/existing.at: Adjust.
9235
9236 2002-07-30 Akim Demaille <akim@epita.fr>
9237
9238 Report rules which are never reduced by the parser: those hidden
9239 by conflicts.
9240
9241 * src/LR0.c (save_reductions): Don't make the final state too
9242 different: save its reduction (accept) instead of having a state
9243 without any action (no shift or goto, no reduce).
9244 Note: the final state is now a ``regular'' state, i.e., the
9245 parsers now contain `reduce 0' as default reduction.
9246 Nevertheless, since they decide to `accept' when yystate =
9247 final_state, they still will not reduce rule 0.
9248 * src/print.c (print_actions, print_reduction): Adjust.
9249 * src/output.c (action_row): Track reduced rules.
9250 (token_actions): Report rules never reduced.
9251 * tests/conflicts.at, tests/regression.at: Adjust.
9252
9253 2002-07-30 Akim Demaille <akim@epita.fr>
9254
9255 `stage' was accidently included in a previous patch.
9256 Initiate its autoconfiscation.
9257
9258 * configure.in: Look for malloc.h and sys/times.h.
9259 * src/main.c (stage): Adjust.
9260 Report only when trace_flag.
9261
9262 2002-07-29 Akim Demaille <akim@epita.fr>
9263
9264 * src/state.h, src/state.c (transitions_t): Holds state_t*'s, not
9265 state_number_t.
9266 (errs_t): symbol_t*, not symbol_number_t.
9267 (reductions_t): rule_t*, not rule_number_t.
9268 (FOR_EACH_SHIFT): New.
9269 * src/LR0.c, src/conflicts.c, src/lalr.c, src/output.c
9270 * src/print.c, src/print_graph.c: Adjust.
9271
9272 2002-07-29 Akim Demaille <akim@epita.fr>
9273
9274 Use $accept and $end, as BYacc and BTYacc do, instead of $axiom and $.
9275
9276 * src/symtab.h, src/symtab.c (eoftoken, axiom): Rename as...
9277 (endtoken, accept): these.
9278 * src/reader.c (reader): Set endtoken's default tag to "$end".
9279 Set undeftoken's tag to "$undefined" instead of "$undefined.".
9280 * doc/bison.texinfo (Table of Symbols): Mention $accept and $end.
9281 Adjust.
9282
9283 2002-07-29 Akim Demaille <akim@epita.fr>
9284
9285 * src/reduce.c (reduce_grammar): When the language is empty,
9286 complain about the start symbol, not the axiom.
9287 Use its location.
9288 * tests/reduce.at (Empty Language): New.
9289
9290 2002-07-26 Akim Demaille <akim@epita.fr>
9291
9292 * src/reader.h, src/reader.c (gram_error): ... can't get
9293 yycontrol without making too strong assumptions on the parser
9294 itself.
9295 * src/output.c (prepare_tokens): Use the real 0th value of
9296 token_translations instead of `0'.
9297 * src/parse-gram.y (yyerror): Don't rely on yycontrol being
9298 visible here.
9299 * data/yacc.c (yyreport_parse_error): Rename yylocation as yylloc
9300 for the time being: %locations ought to provide it to yyerror.
9301
9302 2002-07-25 Akim Demaille <akim@epita.fr>
9303
9304 * src/output.c (prepare_tokens): Go up to ntokens, not ntokens + 1.
9305 * doc/bison.texinfo (Decl Summary): s/$illegal/$undefined./.
9306 * tests/regression.at (Web2c Actions): Adjust.
9307
9308 2002-07-25 Akim Demaille <akim@epita.fr>
9309
9310 Stop storing rules from 1 to nrules + 1.
9311
9312 * src/LR0.c, src/closure.c, src/derives.c, src/gram.c, src/lalr.c
9313 * src/nullable.c, src/output.c, src/print.c, src/reader.c
9314 * src/reduce.c: Allocate and free from &rules[0], not &rules[1].
9315 Iterate from 0 to nrules.
9316 Use rule_number_as_item_number and item_number_as_rule_number.
9317 Adjust to `derive' now containing possibly 0.
9318 * src/gram.h (rule_number_as_item_number, item_number_as_rule_number):
9319 Handle the `- 1' part in rule numbers from/to item numbers.
9320 * src/conflicts.c (log_resolution): Fix the message which reversed
9321 shift and reduce.
9322 * src/output.c (action_row): Initialize default_rule to -1.
9323 (token_actions): Adjust.
9324 * tests/sets.at (Nullable, Firsts): Fix the previously bogus
9325 expected output.
9326 * tests/conflicts.at (Resolved SR Conflicts): Likewise.
9327
9328 2002-07-25 Akim Demaille <akim@epita.fr>
9329
9330 * data/c.m4 (b4_c_function, b4_c_ansi_args, b4_c_ansi_arg)
9331 (b4_c_knr_arg_names, b4_c_knr_arg_name, b4_c_knr_arg_decls)
9332 (b4_c_knr_arg_decl): New.
9333 * data/yacc.c: Use it to define yysymprint, yydestruct, and
9334 yyreport_parse_error.
9335
9336 2002-07-25 Akim Demaille <akim@epita.fr>
9337
9338 * data/yacc.c (yyreport_parse_error): New, extracted from...
9339 (yyparse): here.
9340 (yydestruct, yysymprint): Move above yyparse.
9341 Be K&R compliant.
9342
9343 2002-07-25 Akim Demaille <akim@epita.fr>
9344
9345 * data/c.m4 (b4_ints_in, b4_int_type, b4_int_type_for): New,
9346 replace...
9347 (b4_sint_type, b4_uint_type): these.
9348 * data/yacc.c, data/glr.c, data/lalr1.cc: Use b4_int_type_for.
9349 * tests/regression.at (Web2c Actions): Adjust.
9350
9351 2002-07-25 Akim Demaille <akim@epita.fr>
9352
9353 * src/gram.h (TIEM_NUMBER_MAX): New.
9354 (item_number_of_rule_number, rule_number_of_item_number): Rename
9355 as...
9356 (rule_number_as_item_number, item_number_as_rule_number): these.
9357 Adjust dependencies.
9358 * src/output.c (vector_number_t, VECTOR_NUMBER_MAX)
9359 (VECTOR_NUMBER_MIN, state_number_to_vector_number)
9360 (symbol_number_to_vector_number): New.
9361 (order): Of vector_number_t* type.
9362 (base_t, BASE_MAX, BASE_MIN): New.
9363 (froms, tos, width, pos, check): Of base_t type.
9364 (action_number_t, ACTION_MIN, ACTION_MAX): New.
9365 (actrow): Of action_number_t type.
9366 (conflrow): Of unsigned int type.
9367 (table_ninf, base_ninf): New.
9368 (GENERATE_MUSCLE_INSERT_TABLE): Also output the `*_min' value.
9369 (muscle_insert_int_table, muscle_insert_base_table)
9370 (muscle_insert_rule_number_table): New.
9371 (prepare_tokens): Output `toknum' as int_table.
9372 (action_row): Returns a rule_number_t.
9373 Use ACTION_MIN, not SHRT_MIN.
9374 (token_actions): yydefact is rule_number_t*.
9375 (table_ninf_remap): New.
9376 (pack_table): Use it for `base' and `table'.
9377 * data/yacc.c, data/glr.c, data/lalr1.cc (YYFLAG): Remove,
9378 replaced with...
9379 (YYPACT_NINF, YYTABLE_NINF): these.
9380 (yypact, yytable): Compute their types instead of hard-coded
9381 `short'.
9382 * tests/regression.at (Web2c Actions): Adjust.
9383
9384 2002-07-19 Akim Demaille <akim@epita.fr>
9385
9386 * src/scan-gram.l (id): Can start with an underscore.
9387
9388 2002-07-16 Akim Demaille <akim@epita.fr>
9389
9390 * src/assoc.c, src/asssoc.h (assoc_t, assoc_to_string): New.
9391 Adjust all former `associativity' dependencies.
9392 * src/symtab.c (symbol_new): Default associativity is `undef', not
9393 `right'.
9394 (symbol_check_alias_consistence): Adjust.
9395
9396 2002-07-09 Akim Demaille <akim@epita.fr>
9397
9398 * doc/bison.texinfo: Properly set the ``header'' part.
9399 Use @dircategory ``GNU programming tools'' as per Texinfo's
9400 documentation.
9401 Use @copying.
9402
9403 2002-07-09 Akim Demaille <akim@epita.fr>
9404
9405 * lib/quotearg.h: Protect against multiple inclusions.
9406 * src/location.h (location_t): Add a `file' member.
9407 (LOCATION_RESET, LOCATION_PRINT): Adjust.
9408 * src/complain.c (warn_at, complain_at, fatal_at): Drop
9409 `error_one_per_line' support.
9410
9411 2002-07-09 Akim Demaille <akim@epita.fr>
9412
9413 * src/complain.h, src/complain.c (warn, complain): Remove, unused.
9414 * src/reader.c (lineno): Remove.
9415 Adjust all dependencies.
9416 (get_merge_function): Take a location and use complain_at.
9417 * src/symtab.h, src/symtab.c (symbol_make_alias): Likewise.
9418 * tests/regression.at (Invalid inputs, Mixing %token styles):
9419 Adjust.
9420
9421 2002-07-09 Akim Demaille <akim@epita.fr>
9422
9423 * src/parse-gram.y (rules_or_grammar_declaration): Add an error
9424 recovery rule, and forbid extensions when --yacc.
9425 (gram_error): Use complain_at.
9426 * src/reader.c (reader): Exit if there were parse errors.
9427
9428 2002-07-09 Akim Demaille <akim@epita.fr>
9429
9430 * tests/synclines.at (AT_SYNCLINES_COMPILE): New.
9431 (AT_TEST_SYNCLINE): Adjust to unusual GCC outputs.
9432 Reported by R Blake <blakers@mac.com>.
9433
9434 2002-07-09 Akim Demaille <akim@epita.fr>
9435
9436 * data/yacc.c: Output the copyright notive in the header.
9437
9438 2002-07-03 Akim Demaille <akim@epita.fr>
9439
9440 * src/output.c (froms, tos): Are state_number_t.
9441 (save_column): sp, sp1, and sp2 are state_number_t.
9442 (prepare): Rename `final' as `final_state_number', `nnts' as
9443 `nterms_number', `nrules' as `rules_number', `nstates' as
9444 `states_number', and `ntokens' as `tokens_number'. Remove `nsym',
9445 unused.
9446 * data/yacc.c, data/glr.c, data/lalr1.cc: Adjust.
9447 * data/lalr1.cc (nsym_): Remove, unused.
9448
9449 2002-07-03 Akim Demaille <akim@epita.fr>
9450
9451 * src/lalr.h, src/lalr.c (goto_number_t): New.
9452 * src/lalr.c (goto_list_t): New.
9453 Propagate them.
9454 * src/nullable.c (rule_list_t): New.
9455 Propagate.
9456 * src/types.h: Remove.
9457
9458 2002-07-03 Akim Demaille <akim@epita.fr>
9459
9460 * src/closure.c (print_fderives): Use rule_rhs_print.
9461 * src/derives.c (print_derives): Use rule_rhs_print.
9462 (rule_list_t): New, replaces `shorts'.
9463 (set_derives): Add comments.
9464 * tests/sets.at (Nullable, Firsts): Adjust.
9465
9466 2002-07-03 Akim Demaille <akim@epita.fr>
9467
9468 * src/output.c (prepare_actions): Free `tally' and `width'.
9469 (prepare_actions): Allocate and free `order'.
9470 * src/symtab.c (symbols_free): Free `symbols'.
9471 * src/scan-gram.l (scanner_free): Clear Flex's scanners memory.
9472 * src/output.c (m4_invoke): Move to...
9473 * src/scan-skel.l: here.
9474 (<<EOF>>): Close yyout, and free its name.
9475
9476 2002-07-03 Akim Demaille <akim@epita.fr>
9477
9478 Fix some memory leaks, and fix a bug: state 0 was examined twice.
9479
9480 * src/LR0.c (new_state): Merge into...
9481 (state_list_append): this.
9482 (new_states): Merge into...
9483 (generate_states): here.
9484 (set_states): Don't ensure a proper `errs' state member here, do it...
9485 * src/conflicts.c (conflicts_solve): here.
9486 * src/state.h, src/state.c: Comment changes.
9487 (state_t): Rename member `shifts' as `transitions'.
9488 Adjust all dependencies.
9489 (errs_new): For consistency, also take the values as argument.
9490 (errs_dup): Remove.
9491 (state_errs_set): New.
9492 (state_reductions_set, state_transitions_set): Assert that no
9493 previous value was assigned.
9494 (state_free): New.
9495 (states_free): Use it.
9496 * src/conflicts.c (resolve_sr_conflict): Don't use an `errs_t' as
9497 temporary storage: use `errs' and `nerrs' as elsewhere.
9498 (set_conflicts): Allocate and free this `errs'.
9499
9500 2002-07-02 Akim Demaille <akim@epita.fr>
9501
9502 * lib/libiberty.h: New.
9503 * lib: Update the bitset implementation from upstream.
9504 * src/closure.c, src/lalr.c, src/output.c, src/print_graph.c,
9505 * src/state.c: Use BITSET_FOR_EACH, not BITSET_EXECUTE.
9506 * src/main.c: Adjust bitset stats calls.
9507
9508 2002-07-01 Paul Eggert <eggert@twinsun.com>
9509
9510 * src/scan-gram.l (<SC_ESCAPED_CHARACTER>): Convert to unsigned
9511 char, so that negative chars don't collide with $.
9512
9513 2002-06-30 Akim Demaille <akim@epita.fr>
9514
9515 Have the GLR tests be `warning' checked, and fix the warnings.
9516
9517 * data/glr.c (YYFPRINTF): Always define it, not only when YYDEBUG
9518 (yyuserAction, yyreportAmbiguity): `Use' all the arguments.
9519 (yyremoveDeletes): `yyi' and `yyj' are size_t.
9520 Use YYFPRINTF when under if (YYDEBUG) to avoid empty `if' bodies.
9521 (yyaddDeferredAction): static.
9522 (yyglrReduce): yyi, yyk, amd yyposn are size_t.
9523 (yyreportParseError): yyprefix is const.
9524 yytokenp is used only when verbose.
9525 (yy__GNUC__): Replace with __GNUC__.
9526 (yypdumpstack): yyi is size_t.
9527 (yypreference): Un-yy local variables and arguments, to avoid
9528 clashes with `yyr1'. Anyway, we are not in the user name space.
9529 (yytname_size): be an int, as is compared with ints.
9530 * tests/testsuite.at (AT_COMPILE, AT_PARSER_CHECK): New.
9531 Use them.
9532 * tests/cxx-gram.at: Use quotation to protect $1.
9533 Use AT_COMPILE to enable warnings hunts.
9534 Prototype yylex and yyerror.
9535 `Use' argc.
9536 Include `string.h', not `strings.h'.
9537 Produce and prototype stmtMerge only when used.
9538 yylex takes a location.
9539
9540 2002-06-30 Akim Demaille <akim@epita.fr>
9541
9542 We spend a lot of time in quotearg, in particular when --verbose.
9543
9544 * src/symtab.c (symbol_get): Store a quoted version of the key.
9545 (symbol_tag_get, symbol_tag_get_n, symbol_tag_print): Remove.
9546 Adjust all callers.
9547
9548 2002-06-30 Akim Demaille <akim@epita.fr>
9549
9550 * src/state.h (reductions_t): Rename member `nreds' as num.
9551 (errs_t): Rename members `nerrs' and `errs' as `num' and `symbols'.
9552 * src/state.c (ERRS_ALLOC, REDUCTIONS_ALLOC): Use the correct types.
9553
9554 2002-06-30 Akim Demaille <akim@epita.fr>
9555
9556 * src/state.h, src/state.c (shift_t, SHIFT_SYMBOL, SHIFT_IS_SHIFT)
9557 (SHIFT_IS_GOTO, SHIFT_IS_ERROR, SHIFT_DISABLE, SHIFT_IS_DISABLED)
9558 (shifts_to): Rename as...
9559 (transition_t, TRANSITION_SYMBOL, TRANSITION_IS_TRANSITION)
9560 (TRANSITION_IS_GOTO, TRANSITION_IS_ERROR, TRANSITION_DISABLE)
9561 (TRANSITION_IS_DISABLED, transitions_to): these.
9562
9563 2002-06-30 Akim Demaille <akim@epita.fr>
9564
9565 * src/print.c (print_shifts, print_gotos): Merge into...
9566 (print_transitions): this.
9567 (print_transitions, print_errs, print_reductions): Align the
9568 lookaheads columns.
9569 (print_core, print_transitions, print_errs, print_state,
9570 print_grammar): Output empty lines separator before, not after.
9571 (state_default_rule_compute): Rename as...
9572 (state_default_rule): this.
9573 * tests/conflicts.at (Defaulted Conflicted Reduction),
9574 (Unresolved SR Conflicts, Resolved SR Conflicts): Adjust.
9575 * tests/regression.at (Rule Line Numbers, Web2c Report): Adjust.
9576
9577 2002-06-30 Akim Demaille <akim@epita.fr>
9578
9579 Display items as we display rules.
9580
9581 * src/gram.h, src/gram.c (rule_lhs_print): New.
9582 * src/gram.c (grammar_rules_partial_print): Use it.
9583 * src/print.c (print_core): Likewise.
9584 * tests/conflicts.at (Defaulted Conflicted Reduction),
9585 (Unresolved SR Conflicts): Adjust.
9586 (Unresolved SR Conflicts): Adjust and rename as...
9587 (Resolved SR Conflicts): this, as was meant.
9588 * tests/regression.at (Web2c Report): Adjust.
9589
9590 2002-06-30 Akim Demaille <akim@epita.fr>
9591
9592 * src/print.c (state_default_rule_compute): New, extracted from...
9593 (print_reductions): here.
9594 Pessimize, but clarify the code.
9595 * tests/conflicts.at (Defaulted Conflicted Reduction): New.
9596
9597 2002-06-30 Akim Demaille <akim@epita.fr>
9598
9599 * src/output.c (action_row): Let default_rule be always a rule
9600 number.
9601
9602 2002-06-30 Akim Demaille <akim@epita.fr>
9603
9604 * src/closure.c (print_firsts, print_fderives, closure):
9605 Use BITSET_EXECUTE.
9606 * src/lalr.c (lookaheads_print): Likewise.
9607 * src/state.c (state_rule_lookaheads_print): Likewise.
9608 * src/print_graph.c (print_core): Likewise.
9609 * src/print.c (print_reductions): Likewise.
9610 * src/output.c (action_row): Likewise.
9611 Use SHIFT_IS_DISABLED, SHIFT_IS_SHIFT and SHIFT_SYMBOL.
9612
9613 2002-06-30 Akim Demaille <akim@epita.fr>
9614
9615 * src/print_graph.c: Use report_flag.
9616
9617 2002-06-30 Akim Demaille <akim@epita.fr>
9618
9619 * src/lalr.c (traverse, digraph, matrix_print, transpose): Move
9620 to...
9621 * src/relation.h, src/relation.c (traverse, relation_digraph)
9622 (relation_print, relation_transpose): New.
9623
9624 2002-06-30 Akim Demaille <akim@epita.fr>
9625
9626 * src/state.h, src/state.c (shifts_to): New.
9627 * src/lalr.c (build_relations): Use it.
9628
9629 2002-06-30 Akim Demaille <akim@epita.fr>
9630
9631 * src/gram.h (rule_number_t, RULE_NUMBER_MAX, int_of_rule_number)
9632 (item_number_of_rule_number, rule_number_of_item_number): New.
9633 * src/LR0.c, src/closure.c, src/derives.c, src/derives.h,
9634 * src/gram.c, src/lalr.c, src/nullable.c, src/output.c, src/print.c,
9635 * src/print_graph.c, src/reader.c, src/reduce.c, src/reduce.h:
9636 Propagate their use.
9637 Much remains to be done, in particular wrt `shorts' from types.h.
9638
9639 2002-06-30 Akim Demaille <akim@epita.fr>
9640
9641 * src/symtab.c (symbol_new): Initialize the `printer' member.
9642
9643 2002-06-30 Akim Demaille <akim@epita.fr>
9644
9645 * src/LR0.c (save_reductions): Remove, replaced by...
9646 * src/state.h, src/state.c (state_reductions_set): New.
9647 (reductions, errs): Rename as...
9648 (reductions_t, errs_t): these.
9649 Adjust all dependencies.
9650
9651 2002-06-30 Akim Demaille <akim@epita.fr>
9652
9653 * src/LR0.c (state_list_t, state_list_append): New.
9654 (first_state, last_state): Now symbol_list_t.
9655 (this_state): Remove.
9656 (new_itemsets, append_states, save_reductions): Take a state_t as
9657 argument.
9658 (set_states, generate_states): Adjust.
9659 (save_shifts): Remove, replaced by...
9660 * src/state.h, src/state.c (state_shifts_set): New.
9661 (shifts): Rename as...
9662 (shifts_t): this.
9663 Adjust all dependencies.
9664 * src/state.h (state_t): Remove the `next' member.
9665
9666 2002-06-30 Akim Demaille <akim@epita.fr>
9667
9668 * src/vcg.c (quote): Use slot 2, since we often pass symbol tag
9669 escaped in slot 0.
9670
9671 2002-06-30 Akim Demaille <akim@epita.fr>
9672
9673 Use hash.h for the state hash table.
9674
9675 * src/LR0.c (STATE_HASH_SIZE, state_hash): Remove.
9676 (allocate_storage): Use state_hash_new.
9677 (free_storage): Use state_hash_free.
9678 (new_state, get_state): Adjust.
9679 * src/lalr.h, src/lalr.c (states): Move to...
9680 * src/states.h (state_t): Remove the `link' member, no longer
9681 used.
9682 * src/states.h, src/states.c: here.
9683 (state_hash_new, state_hash_free, state_hash_lookup)
9684 (state_hash_insert, states_free): New.
9685 * src/states.c (state_table, state_compare, state_hash): New.
9686 * src/output.c (output_actions): Do not free states now, since we
9687 still need to know the final_state number in `prepare', called
9688 afterwards. Do it...
9689 * src/main.c (main): here: call states_free after `output'.
9690
9691 2002-06-30 Akim Demaille <akim@epita.fr>
9692
9693 * src/state.h, src/state.c (state_new): New, extracted from...
9694 * src/LR0.c (new_state): here.
9695 * src/state.h (STATE_ALLOC): Move to...
9696 * src/state.c: here.
9697 * src/LR0.h, src/LR0.c (nstates, final_state): Move to...
9698 * src/state.h, src/state.c: here.
9699
9700 2002-06-30 Akim Demaille <akim@epita.fr>
9701
9702 * src/reader.c (gensym): Rename as...
9703 * src/symtab.h, src/symtab.c (dummy_symbol_get): this.
9704 (getsym): Rename as...
9705 (symbol_get): this.
9706
9707 2002-06-30 Akim Demaille <akim@epita.fr>
9708
9709 * src/state.h (state_number_t, STATE_NUMBER_MAX): New.
9710 * src/LR0.c, src/LR0.h, src/conflicts.c, src/lalr.c, src/lalr.h,
9711 * src/output.c, src/print.c, src/print_graph.c: Propagate.
9712 * src/LR0.h, src/LR0.h (final_state): Is a state_t*.
9713
9714 2002-06-30 Akim Demaille <akim@epita.fr>
9715
9716 Make the test suite pass with warnings checked.
9717
9718 * tests/actions.at (Printers and Destructors): Improve.
9719 Avoid unsigned vs. signed issues.
9720 * tests/calc.at: Don't exercise the scanner here, do it...
9721 * tests/input.at (Torturing the Scanner): here.
9722
9723 2002-06-28 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
9724
9725 * data/glr.c: Correct typo in Emacs-mode directive. Slightly
9726 reorganize first lines parallel to yacc.c.
9727
9728 2002-06-28 Akim Demaille <akim@epita.fr>
9729
9730 * data/c.m4 (b4_copyright, b4_sint_type, b4_uint_type, b4_token_define)
9731 (b4_token_enum, b4_token_defines): New, factored from...
9732 * data/lalr1.cc, data/yacc.c, glr.c: here.
9733
9734 2002-06-28 Akim Demaille <akim@epita.fr>
9735
9736 * data/yacc.c (yydestruct, yysymprint): Pacify GCC warnings for
9737 unused variables.
9738 * src/output.c (merger_output): static.
9739
9740 2002-06-28 Akim Demaille <akim@epita.fr>
9741
9742 * src/reader.h: s/grammer_current_rule_merge_set/grammar_.../.
9743 * src/conflicts.c (conflicts_total_count): `i' is unsigned, to
9744 pacify GCC.
9745 * src/output.c (save_row): Initialize all the variables to pacify GCC.
9746
9747 2002-06-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
9748
9749 Accumulated changelog for new GLR parsing features.
9750
9751 * src/conflicts.c (count_total_conflicts): Change name to
9752 conflicts_total_count.
9753 * src/conflicts.h: Ditto.
9754 * src/output.c (token_actions): Use the new name.
9755 (output_conflicts): Change conflp => conflict_list_heads, and
9756 confl => conflict_list for better readability.
9757 * data/glr.c: Use the new names.
9758 * NEWS: Add self to GLR announcement.
9759
9760 * src/reader.c (free_merger_functions): Cleanup: XFREE->free.
9761
9762 * doc/bison.texinfo (GLR Parsers): Make corrections suggested by
9763 Akim Demaille.
9764
9765 * data/bison.glr: Change name to glr.c
9766 * data/glr.c: Renamed from bison.glr.
9767 * data/Makefile.am: Add glr.c
9768
9769 * src/getargs.c:
9770
9771 * src/symlist.h: Add dprec and merger fields to symbol_list_s.
9772 * src/symlist.c (symbol_list_new): Initialize dprec and merger fields.
9773
9774 Originally 2002-06-16 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
9775
9776 * data/bison.glr: Be sure to restore the
9777 current #line when returning to the skeleton contents after having
9778 exposed the input file's #line.
9779
9780 Originally 2002-06-13 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
9781
9782 * data/bison.glr: Bring up to date with changes to bison.simple.
9783
9784 Originally 2002-06-03 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
9785
9786 * data/bison.glr: Correct definitions that use b4_prefix.
9787 Various reformatting.
9788 (GLRStack): Make yychar (in YYPURE case) and yytokenp as part of stack.
9789 (yyreportParseError, yyrecoverParseError, yyprocessOneStack): remove
9790 yytokenp argument; now part of stack.
9791 (yychar): Define to behave as documented.
9792 (yyclearin): Ditto.
9793
9794 Originally 2002-05-14 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
9795
9796 * src/reader.h: Add declaration for free_merger_functions.
9797
9798 * src/reader.c (merge_functions): New variable.
9799 (get_merge_function): New function.
9800 (free_merger_functions): New function.
9801 (readgram): Check for %prec that is not followed by a symbol.
9802 Handle %dprec and %merge declarations.
9803 (packgram): Initialize dprec and merger fields in rules array.
9804
9805 * src/output.c (conflict_tos, conflrow, conflict_table, conflict_list,
9806 conflict_list_cnt, conflict_list_free): New variables.
9807 (table_grow): Also grow conflict_table.
9808 (prepare_rules): Output dprec and merger tables.
9809 (conflict_row): New function.
9810 (action_row): Output conflict lists for GLR parser. Don't use
9811 default reduction in conflicted states for GLR parser so that there
9812 are spaces for the conflict lists.
9813 (save_row): Also save conflict information.
9814 (token_actions): Allocate conflict list.
9815 (merger_output): New function.
9816 (pack_vector): Pack conflict table, too.
9817 (output_conflicts): New function to output yyconflp and yyconfl.
9818 (output_check): Allocate conflict_tos.
9819 (output_actions): Output conflict tables, also.
9820 (output_skeleton): Output b4_mergers definition.
9821 (prepare): Output b4_max_rhs_length definition.
9822 Use 'bison.glr' as default skeleton for GLR parsers.
9823
9824 * src/gram.c (glr_parser): New flag.
9825 (grammar_free): Call free_merger_functions.
9826
9827 * src/conflicts.c (count_rr_conflicts): Augment to optionally count
9828 all pairs of conflicting reductions, rather than just all tokens
9829 causing conflicts. Needed to size conflict tables.
9830 (conflicts_output): Modify call to count_rr_conflicts for new
9831 interface.
9832 (conflicts_print): Ditto.
9833 (count_total_conflicts): New function.
9834
9835 * src/reader.h (merger_list): New type.
9836 (merge_functions): New variable.
9837
9838 * src/lex.h (tok_dprec, tok_merge): New token types.
9839
9840 * src/gram.h (rule_s): Add dprec and merger fields.
9841 (glr_parser): New flag.
9842
9843 * src/conflicts.h (count_total_conflicts): New function.
9844
9845 * src/options.c (option_table): Add %dprec, %merge, and %glr-parser.
9846
9847 * doc/bison.texinfo (Generalized LR Parsing): New section.
9848 (GLR Parsers): New section.
9849 (Language and Grammar): Mention GLR parsing.
9850 (Table of Symbols): Add %dprec, %glr-parser, %merge, GLR
9851 Correct typo ("tge" -> "the").
9852
9853 * data/bison.glr: New skeleton for GLR parsing.
9854
9855 * tests/cxx-gram.at: New tests for GLR parsing.
9856
9857 * tests/testsuite.at: Include cxx-gram.at.
9858
9859 * tests/Makefile.am: Add cxx-gram.at.
9860
9861 * src/parse-gram.y:
9862
9863 * src/scan-gram.l: Add %dprec, %glr-parser, %merge.
9864
9865 * src/parse-gram.y: Grammar for %dprec, %merge, %glr-parser.
9866
9867 2002-06-27 Akim Demaille <akim@epita.fr>
9868
9869 * src/options.h, src/options.c: Remove.
9870 * src/getargs.c (short_options, long_options): New.
9871
9872 2002-06-27 Akim Demaille <akim@epita.fr>
9873
9874 * data/bison.simple, data/bison.c++: Rename as...
9875 * data/yacc.c, data/lalr1.cc: these.
9876 * doc/bison.texinfo (Environment Variables): Remove.
9877
9878 2002-06-25 Raja R Harinath <harinath@cs.umn.edu>
9879
9880 * src/getargs.c (report_argmatch): Initialize strtok().
9881
9882 2002-06-20 Akim Demaille <akim@epita.fr>
9883
9884 * data/bison.simple (b4_symbol_actions): New, replaces...
9885 (b4_symbol_destructor, b4_symbol_printer): these.
9886 (yysymprint): Be sure to call YYPRINT only for tokens, and using
9887 user token numbers.
9888
9889 2002-06-20 Akim Demaille <akim@epita.fr>
9890
9891 * data/bison.simple (yydestructor): Rename as...
9892 (yydestruct): this.
9893
9894 2002-06-20 Akim Demaille <akim@epita.fr>
9895
9896 * src/symtab.h, src/symtab.c (symbol_type_set)
9897 (symbol_destructor_set, symbol_precedence_set): The location is
9898 the last argument.
9899 Adjust all callers.
9900
9901 2002-06-20 Akim Demaille <akim@epita.fr>
9902
9903 * src/parse-gram.y (YYPRINT, yyprint): Don't mess with the parser
9904 internals.
9905 * src/reader.h, src/reader.c (grammar_current_rule_prec_set):
9906 Takes a location.
9907 * src/symtab.h, src/symtab.c (symbol_class_set)
9908 (symbol_user_token_number_set): Likewise.
9909 Adjust all callers.
9910 Promote complain_at.
9911 * tests/input.at (Type Clashes): Adjust.
9912
9913 2002-06-20 Akim Demaille <akim@epita.fr>
9914
9915 * data/bison.simple (YYLEX): Fix the declaration when
9916 %pure-parser.
9917
9918 2002-06-20 Akim Demaille <akim@epita.fr>
9919
9920 * data/bison.simple (yysymprint): Don't print the token number,
9921 just its name.
9922 * tests/actions.at (Destructors): Rename as...
9923 (Printers and Destructors): this.
9924 Also exercise %printer.
9925
9926 2002-06-20 Akim Demaille <akim@epita.fr>
9927
9928 * data/bison.simple (YYDSYMPRINT): New.
9929 Use it to remove many of the #if YYDEBUG/if (yydebug).
9930
9931 2002-06-20 Akim Demaille <akim@epita.fr>
9932
9933 * src/symtab.h, src/symtab.c (symbol_t): printer and
9934 printer_location are new members.
9935 (symbol_printer_set): New.
9936 * src/parse-gram.y (PERCENT_PRINTER): New token.
9937 Handle its associated rule.
9938 * src/scan-gram.l: Adjust.
9939 (handle_destructor_at, handle_destructor_dollar): Rename as...
9940 (handle_symbol_code_at, handle_symbol_code_dollar): these.
9941 * src/output.c (symbol_printers_output): New.
9942 (output_skeleton): Call it.
9943 * data/bison.simple (yysymprint): New. Cannot be named yyprint
9944 since there are already many grammar files with a user `yyprint'.
9945 Replace the calls to YYPRINT to calls to yysymprint.
9946 * tests/calc.at: Adjust.
9947 * tests/torture.at (AT_DATA_STACK_TORTURE): Remove YYPRINT: it was
9948 taking advantage of parser very internal details (stack size!).
9949
9950 2002-06-20 Akim Demaille <akim@epita.fr>
9951
9952 * src/scan-gram.l: Complete the scanner with the missing patterns
9953 to pacify Flex.
9954 Use `quote' and `symbol_tag_get' where appropriate.
9955
9956 2002-06-19 Akim Demaille <akim@epita.fr>
9957
9958 * tests/actions.at (Destructors): Augment to test locations.
9959 * data/bison.simple (yydestructor): Pass it the current location
9960 if locations are enabled.
9961 Prototype only when __STDC__ or C++.
9962 Change the argument names to move into the yy name space: there is
9963 user code here.
9964
9965 2002-06-19 Akim Demaille <akim@epita.fr>
9966
9967 * data/bison.simple (b4_pure_if): New.
9968 Use it instead of #ifdef YYPURE.
9969
9970 2002-06-19 Akim Demaille <akim@epita.fr>
9971
9972 * data/bison.simple (b4_location_if): New.
9973 Use it instead of #ifdef YYLSP_NEEDED.
9974
9975 2002-06-19 Akim Demaille <akim@epita.fr>
9976
9977 Prepare @$ in %destructor, but currently don't bind it in the
9978 skeleton, as %location use is not cleaned up yet.
9979
9980 * src/scan-gram.l (handle_dollar, handle_destructor_at)
9981 (handle_action_at): New.
9982 (handle_at, handle_action_dollar, handle_destructor_dollar): Take
9983 a braced_code_t and a location as additional arguments.
9984 (handle_destructor_dollar): Instead of requiring `b4_eval', just
9985 unquote one when outputting `b4_dollar_dollar'.
9986 Adjust callers.
9987 * data/bison.simple (b4_eval): Remove.
9988 (b4_symbol_destructor): Adjust.
9989 * tests/input.at (Invalid @n): Adjust.
9990
9991 2002-06-19 Zack Weinberg <zack@codesourcery.com>
9992
9993 * doc/bison.texinfo: Document ability to have multiple
9994 prologue sections.
9995
9996 2002-06-18 Akim Demaille <akim@epita.fr>
9997
9998 * src/files.c (compute_base_names): When computing the output file
9999 names from the input file name, strip the directory part.
10000
10001 2002-06-18 Akim Demaille <akim@epita.fr>
10002
10003 * data/bison.simple.new: Comment changes.
10004 Reported by Andreas Schwab.
10005
10006 2002-06-18 Matt Kraai <kraai@alumni.cmu.edu>
10007
10008 * data/bison.simple (yyoverflowlab): #ifndef yyoverflow, so that
10009 there are no `label `yyoverflowlab' defined but not used' warnings
10010 when yyoverflow is defined.
10011
10012 2002-06-18 Akim Demaille <akim@epita.fr>
10013
10014 * src/symtab.h, src/symtab.c (symbol_t): destructor_location is a
10015 new member.
10016 (symbol_destructor_set): Adjust.
10017 * src/output.c (symbol_destructors_output): Output the destructor
10018 locations.
10019 Output the symbol name.
10020 * data/bison.simple (b4_symbol_destructor): Adjust.
10021
10022 2002-06-18 Cris Bailiff <c.bailiff@awayweb.com>
10023 and Akim Demaille <akim@epita.fr>
10024
10025 * data/bison.simple.new (yyerrlab1): Be sure to pop and destroy
10026 what's left on the stack when the error recovery hits EOF.
10027 * tests/actions.at (Destructors): Complete to exercise this case.
10028
10029 2002-06-17 Akim Demaille <akim@epita.fr>
10030
10031 * data/m4sugar/m4sugar.m4 (m4_map): Recognize when the list of
10032 arguments is really empty, not only equal to `[]'.
10033 * src/symtab.h, src/symtab.c (symbol_t): `destructor' is a new
10034 member.
10035 (symbol_destructor_set): New.
10036 * src/output.c (symbol_destructors_output): New.
10037 * src/reader.h (brace_code_t, current_braced_code): New.
10038 * src/scan-gram.l (BRACED_CODE): Use it to branch on...
10039 (handle_dollar): Rename as...
10040 (handle_action_dollar): this.
10041 (handle_destructor_dollar): New.
10042 * src/parse-gram.y (PERCENT_DESTRUCTOR): New.
10043 (grammar_declaration): Use it.
10044 * data/bison.simple (yystos): Is always defined.
10045 (yydestructor): New.
10046 * tests/actions.at (Destructors): New.
10047 * tests/calc.at (_AT_CHECK_CALC_ERROR): Don't rely on egrep.
10048
10049 2002-06-17 Akim Demaille <akim@epita.fr>
10050
10051 * src/symlist.h, src/symlist.c (symbol_list_length): New.
10052 * src/scan-gram.l (handle_dollar, handle_at): Compute the
10053 rule_length only when needed.
10054 * src/output.c (actions_output, token_definitions_output): Output
10055 the full M4 block.
10056 * src/symtab.c: Don't access directly to the symbol tag, use
10057 symbol_tag_get.
10058 * src/parse-gram.y: Use symbol_list_free.
10059
10060 2002-06-17 Akim Demaille <akim@epita.fr>
10061
10062 * src/reader.h, src/reader.c (symbol_list, symbol_list_new)
10063 (symbol_list_prepend, get_type_name): Move to...
10064 * src/symlist.h, src/symlist.c (symbol_list_t, symbol_list_new)
10065 (symbol_list_prepend, symbol_list_n_type_name_get): here.
10066 Adjust all callers.
10067 (symbol_list_free): New.
10068 * src/scan-gram.l (handle_dollar): Takes a location.
10069 * tests/input.at (Invalid $n): Adjust.
10070
10071 2002-06-17 Akim Demaille <akim@epita.fr>
10072
10073 * src/reader.h, src/reader.c (symbol_list_new): Export it.
10074 (symbol_list_prepend): New.
10075 * src/parse-gram.y (%union): `list' is a new member.
10076 (symbols.1): New, replaces...
10077 (terms_to_prec.1, nterms_to_type.1): these.
10078 * src/symtab.h, src/symtab.c (symbol_type_set, symbol_precedence_set)
10079 Take a location as additional argument.
10080 Adjust all callers.
10081
10082 2002-06-15 Akim Demaille <akim@epita.fr>
10083
10084 * src/parse-gram.y: Move %token in the declaration section so that
10085 we don't depend upon CVS Bison.
10086
10087 2002-06-15 Akim Demaille <akim@epita.fr>
10088
10089 * src/state.h, src/state.c (state_rule_lookaheads_print): New.
10090 * src/print.c (print_core): Use it.
10091
10092 2002-06-15 Akim Demaille <akim@epita.fr>
10093
10094 * src/conflicts.c (log_resolution): Accept the rule involved in
10095 the sr conflicts instead of the lookahead number that points to
10096 that rule.
10097 (flush_reduce): Accept the current lookahead vector as argument,
10098 instead of the index in LA.
10099 (resolve_sr_conflict): Accept the current number of lookahead
10100 bitset to consider for the STATE, instead of the index in LA.
10101 (set_conflicts): Adjust.
10102 * src/lalr.c, src/lalr.h, src/state.h: Comment changes.
10103
10104 2002-06-15 Akim Demaille <akim@epita.fr>
10105
10106 * src/state.h (state_t): Replace the `lookaheadsp' member, a
10107 short, with `lookaheads' (bitsetv), `lookaheads_rule' (rule_t**).
10108 Adjust all dependencies.
10109 * src/lalr.c (initialize_lookaheads): Split into...
10110 (states_lookaheads_count, states_lookaheads_initialize): these.
10111 (lalr): Adjust.
10112
10113 2002-06-15 Akim Demaille <akim@epita.fr>
10114
10115 * src/gram.h, src/gram.c (grammar_rules_partial_print): New, eved
10116 out of...
10117 (grammar_rules_print): here.
10118 * src/reduce.c (reduce_output): Use it.
10119 * tests/reduce.at (Useless Rules, Reduced Automaton)
10120 (Underivable Rules): Adjust.
10121
10122 2002-06-15 Akim Demaille <akim@epita.fr>
10123
10124 Copy BYacc's nice way to report the grammar.
10125
10126 * src/gram.h, src/gram.c (grammar_rhs_print, grammar_rules_print):
10127 New.
10128 Don't print the rules' location, it is confusing and useless.
10129 (rule_print): Use grammar_rhs_print.
10130 * src/print.c (print_grammar): Use grammar_rules_print.
10131
10132 2002-06-15 Akim Demaille <akim@epita.fr>
10133
10134 Complete and rationalize `useless thing' warnings.
10135
10136 * src/symtab.h, src/symtab.c (symbol_tag_get, symbol_tag_get_n)
10137 (symbol_tag_print): New.
10138 Use them everywhere in place of accessing directly the tag member.
10139 * src/gram.h, src/gram.c (rule_print): New.
10140 Use it where a rule used to be printed `by hand'.
10141 * src/reduce.c (nonterminals_reduce): Report the use nonterminals.
10142 (reduce_grammar_tables): Report the useless rules.
10143 (reduce_print): Useless things are a warning, not an error.
10144 Report it as such.
10145 * tests/reduce.at (Useless Nonterminals, Useless Rules):
10146 (Reduced Automaton, Underivable Rules): Adjust.
10147 * tests/regression.at (Web2c Report, Web2c Report): Adjust.
10148 * tests/conflicts.at (Unresolved SR Conflicts)
10149 (Solved SR Conflicts): Adjust.
10150
10151 2002-06-15 Akim Demaille <akim@epita.fr>
10152
10153 Let symbols have a location.
10154
10155 * src/symtab.h, src/symtab.c (symbol_t): Location is a new member.
10156 (getsym): Adjust.
10157 Adjust all callers.
10158 * src/complain.h, src/complain.c (complain_at, fatal_at, warn_at):
10159 Use location_t, not int.
10160 * src/symtab.c (symbol_check_defined): Take advantage of the
10161 location.
10162 * tests/regression.at (Invalid inputs): Adjust.
10163
10164 2002-06-15 Akim Demaille <akim@epita.fr>
10165
10166 * src/parse-gram.y (YYLLOC_DEFAULT, current_lhs_location): New.
10167 (input): Don't try to initialize yylloc here, do it in the
10168 scanner.
10169 * src/scan-gram.l (YY_USER_INIT): Initialize yylloc.
10170 * src/gram.h (rule_t): Change line and action_line into location
10171 and action_location, of location_t type.
10172 Adjust all dependencies.
10173 * src/location.h, src/location.c (empty_location): New.
10174 * src/reader.h, src/reader.c (grammar_start_symbol_set)
10175 (grammar_symbol_append, grammar_rule_begin, grammar_rule_end)
10176 (grammar_current_rule_symbol_append)
10177 (grammar_current_rule_action_append): Expect a location as argument.
10178 * src/reader.c (grammar_midrule_action): Adjust to attach an
10179 action's location as dummy symbol location.
10180 * src/symtab.h, src/symtab.c (startsymbol_location): New.
10181 * tests/regression.at (Web2c Report, Rule Line Numbers): Adjust
10182 the line numbers.
10183
10184 2002-06-14 Akim Demaille <akim@epita.fr>
10185
10186 Grammar declarations may be found in the grammar section.
10187
10188 * src/parse-gram.y (rules_or_grammar_declaration): New.
10189 (declarations): Each declaration may end with a semicolon, not
10190 just...
10191 (grammar_declaration): `"%union"'.
10192 (grammar): Branch to rules_or_grammar_declaration.
10193
10194 2002-06-14 Akim Demaille <akim@epita.fr>
10195
10196 * src/main.c (main): Invoke scanner_free.
10197
10198 2002-06-14 Akim Demaille <akim@epita.fr>
10199
10200 * src/output.c (m4_invoke): Extracted from...
10201 (output_skeleton): here.
10202 Free tempfile.
10203
10204 2002-06-14 Akim Demaille <akim@epita.fr>
10205
10206 * src/parse-gram.y (directives, directive, gram)
10207 (grammar_directives, precedence_directives, precedence_directive):
10208 Rename as...
10209 (declarations, declaration, grammar, grammar_declaration)
10210 (precedence_declaration, precedence_declarator): these.
10211 (symbol_declaration): New.
10212
10213 2002-06-14 Akim Demaille <akim@epita.fr>
10214
10215 * src/files.c (action_obstack): Remove, unused.
10216 (output_obstack): Remove it, and all its dependencies, as it is no
10217 longer needed.
10218 * src/reader.c (epilogue_set): Build the epilogue in the
10219 muscle_obstack.
10220 * src/output.h, src/output.c (muscle_obstack): Move to...
10221 * src/muscle_tab.h, src/muscle_tab.h: here.
10222 (muscle_init): Initialize muscle_obstack.
10223 (muscle_free): New.
10224 * src/main.c (main): Call it.
10225
10226 2002-06-14 Akim Demaille <akim@epita.fr>
10227
10228 * src/location.h: New, extracted from...
10229 * src/reader.h: here.
10230 * src/Makefile.am (noinst_HEADERS): Merge into
10231 (bison_SOURCES): this.
10232 Add location.h.
10233 * src/parse-gram.y: Use location_t instead of Bison's.
10234 * src/reader.h, src/reader.c (prologue_augment, epilogue_set):
10235 Use location_t instead of ints.
10236
10237 2002-06-14 Akim Demaille <akim@epita.fr>
10238
10239 * data/bison.simple, data/bison.c++: Be sure to restore the
10240 current #line when returning to the skeleton contents after having
10241 exposed the input file's #line.
10242
10243 2002-06-12 Akim Demaille <akim@epita.fr>
10244
10245 * src/scan-gram.l (SC_BRACED_CODE): Don't use `<.*>', it is too
10246 eager.
10247 * tests/actions.at (Exotic Dollars): New.
10248
10249 2002-06-12 Akim Demaille <akim@epita.fr>
10250
10251 * src/scan-gram.l (SC_PROLOGUE): Don't eat characters amongst
10252 ['"/] too eagerly.
10253 * tests/input.at (Torturing the Scanner): New.
10254
10255 2002-06-11 Akim Demaille <akim@epita.fr>
10256
10257 * src/scan-gram.l (YY_OBS_INIT): Remove, replace with...
10258 [SC_COMMENT,SC_STRING,SC_CHARACTER,SC_BRACED_CODE,SC_PROLOGUE]
10259 [SC_EPILOGUE]: Output the quadrigraphs only when not in a comment.
10260 * src/reader.h, src/scan-gram.l (scanner_initialize): this.
10261 * src/reader.c (reader): Use it.
10262
10263 2002-06-11 Akim Demaille <akim@epita.fr>
10264
10265 * src/scan-gram.l (YY_OBS_FINISH): Don't set yylval.
10266 Adjust all callers.
10267 (scanner_last_string_free): New.
10268
10269 2002-06-11 Akim Demaille <akim@epita.fr>
10270
10271 * src/scan-gram.l (YY_INIT, YY_GROW, YY_FINISH): Rename as...
10272 (YY_OBS_INIT, YY_OBS_GROW, YY_OBS_FINISH): these.
10273 (last_string, YY_OBS_FREE): New.
10274 Use them when returning an ID.
10275
10276 2002-06-11 Akim Demaille <akim@epita.fr>
10277
10278 Have Bison grammars parsed by a Bison grammar.
10279
10280 * src/reader.c, src/reader.h (prologue_augment): New.
10281 * src/reader.c (copy_definition): Remove.
10282
10283 * src/reader.h, src/reader.c (gram_start_symbol_set, prologue_augment)
10284 (grammar_symbol_append, grammar_rule_begin, grammar_midrule_action)
10285 (grammar_current_rule_prec_set, grammar_current_rule_check)
10286 (grammar_current_rule_symbol_append)
10287 (grammar_current_rule_action_append): Export.
10288 * src/parse-gram.y (symbol_list_new, symbol_list_symbol_append_
10289 (symbol_list_action_append): Remove.
10290 Hook the routines from reader.
10291 * src/scan-gram.l: In INITIAL, characters and strings are tokens.
10292 * src/system.h (ATTRIBUTE_NORETURN, ATTRIBUTE_UNUSED): Now.
10293
10294 * src/reader.c (read_declarations): Remove, unused.
10295
10296 * src/parse-gram.y: Handle the epilogue.
10297 * src/reader.h, src/reader.c (gram_start_symbol_set): Rename as...
10298 (grammar_start_symbol_set): this.
10299 * src/scan-gram.l: Be sure to ``use'' yycontrol to keep GCC quiet.
10300 * src/reader.c (readgram): Remove, unused.
10301 (reader): Adjust to insert eoftoken and axiom where appropriate.
10302
10303 * src/reader.c (copy_dollar): Replace with...
10304 * src/scan-gram.h (handle_dollar): this.
10305 * src/parse-gram.y: Remove `%thong'.
10306
10307 * src/reader.c (copy_at): Replace with...
10308 * src/scan-gram.h (handle_at): this.
10309
10310 * src/complain.h, src/complain.c (warn_at, complain_at, fatal_at):
10311 New.
10312
10313 * src/scan-gram.l (YY_LINES): Keep lineno synchronized for the
10314 time being.
10315
10316 * src/reader.h, src/reader.c (grammar_rule_end): New.
10317
10318 * src/parse.y (current_type, current_class): New.
10319 Implement `%nterm', `%token' support.
10320 Merge `%term' into `%token'.
10321 (string_as_id): New.
10322 * src/symtab.h, src/symtab.c (symbol_make_alias): Don't pass the
10323 type name.
10324
10325 * src/parse-gram.y: Be sure to handle properly the beginning of
10326 rules.
10327
10328 * src/parse-gram.y: Handle %type.
10329 * src/reader.c (grammar_rule_end): Call grammar_current_rule_check.
10330
10331 * src/parse-gram.y: More directives support.
10332 * src/options.c: No longer handle source directives.
10333
10334 * src/parse-gram.y: Fix %output.
10335
10336 * src/parse-gram.y: Handle %union.
10337 Use the prologue locations.
10338 * src/reader.c (parse_union_decl): Remove.
10339
10340 * src/reader.h, src/reader.c (epilogue_set): New.
10341 * src/parse-gram.y: Use it.
10342
10343 * data/bison.simple, data/bison.c++: b4_stype is now either not
10344 defined, then default to int, or to the contents of %union,
10345 without `union' itself.
10346 Adjust.
10347 * src/muscle_tab.c (muscle_init): Don't predefine `stype'.
10348
10349 * src/output.c (actions_output): Don't output braces, as they are
10350 already handled by the scanner.
10351
10352 * src/scan-gram.l (SC_CHARACTER): Set the user_token_number of
10353 characters to themselves.
10354
10355 * tests/reduce.at (Reduced Automaton): End the grammars with %% so
10356 that the epilogue has a proper #line.
10357
10358 * src/parse-gram.y: Handle precedence/associativity.
10359
10360 * src/symtab.c (symbol_precedence_set): Requires the symbol to be
10361 a terminal.
10362 * src/scan-gram.l (SC_BRACED_CODE): Catch strings and characters.
10363 * tests/calc.at: Do not use `%token "foo"' as it makes not sense
10364 at all to define terminals that cannot be emitted.
10365
10366 * src/scan-gram.l: Escape M4 characters.
10367
10368 * src/scan-gram.l: Working properly with escapes in user
10369 strings/characters.
10370
10371 * tests/torture.at (AT_DATA_TRIANGULAR_GRAMMAR)
10372 (AT_DATA_HORIZONTAL_GRAMMAR): Respect the `%token ID NUM STRING'
10373 grammar.
10374 Use more modest sizes, as for the time being the parser does not
10375 release memory, and therefore the process swallows a huge amount
10376 of memory.
10377
10378 * tests/torture.at (AT_DATA_LOOKAHEADS_GRAMMAR): Adjust to the
10379 stricter %token grammar.
10380
10381 * src/symtab.h (associativity): Add `undef_assoc'.
10382 (symbol_precedence_set): Do nothing when passed an undef_assoc.
10383 * src/symtab.c (symbol_check_alias_consistence): Adjust.
10384
10385 * tests/regression.at (Invalid %directive): Remove, as it is now
10386 meaningless.
10387 (Invalid inputs): Adjust to the new error messages.
10388 (Token definitions): The new grammar doesn't allow too many
10389 eccentricities.
10390
10391 * src/lex.h, src/lex.c: Remove.
10392 * src/reader.c (lastprec, skip_to_char, read_signed_integer)
10393 (copy_character, copy_string2, copy_string, copy_identifier)
10394 (copy_comment, parse_token_decl, parse_type_decl, parse_assoc_decl)
10395 (parse_muscle_decl, parse_dquoted_param, parse_skel_decl)
10396 (parse_action): Remove.
10397 * po/POTFILES.in: Adjust.
10398
10399 2002-06-11 Akim Demaille <akim@epita.fr>
10400
10401 * src/reader.c (parse_action): Don't store directly into the
10402 rule's action member: return the action as a string.
10403 Don't require `rule_length' as an argument: compute it.
10404 (grammar_current_rule_symbol_append)
10405 (grammar_current_rule_action_append): New, eved out from
10406 (readgram): here.
10407 Remove `action_flag', `rulelength', unused now.
10408
10409 2002-06-11 Akim Demaille <akim@epita.fr>
10410
10411 * src/reader.c (grammar_current_rule_prec_set).
10412 (grammar_current_rule_check): New, eved out from...
10413 (readgram): here.
10414 Remove `xaction', `first_rhs': useless.
10415 * tests/input.at (Type clashes): New.
10416 * tests/existing.at (GNU Cim Grammar): Adjust.
10417
10418 2002-06-11 Akim Demaille <akim@epita.fr>
10419
10420 * src/reader.c (grammar_midrule_action): New, Eved out from
10421 (readgram): here.
10422
10423 2002-06-11 Akim Demaille <akim@epita.fr>
10424
10425 * src/reader.c (grammar_rule_begin, previous_rule, current_rule):
10426 New.
10427 (readgram): Use them as replacement of inlined code, crule and
10428 crule1.
10429
10430 2002-06-11 Akim Demaille <akim@epita.fr>
10431
10432 * src/reader.c (grammar_end, grammar_symbol_append): New.
10433 (readgram): Use them.
10434 Make the use of `p' as local as possible.
10435
10436 2002-06-10 Akim Demaille <akim@epita.fr>
10437
10438 GCJ's parser requires the tokens to be defined before the prologue.
10439
10440 * data/bison.simple: Output the token definition before the user's
10441 prologue.
10442 * tests/regression.at (Braces parsing, Duplicate string)
10443 (Mixing %token styles): Check the output from bison.
10444 (Early token definitions): New.
10445
10446 2002-06-10 Akim Demaille <akim@epita.fr>
10447
10448 * src/symtab.c (symbol_user_token_number_set): Don't complain when
10449 assigning twice the same user number to a token, so that we can
10450 use it in...
10451 * src/lex.c (lex): here.
10452 Also use `symbol_class_set' instead of hand written code.
10453 * src/reader.c (parse_assoc_decl): Likewise.
10454
10455 2002-06-10 Akim Demaille <akim@epita.fr>
10456
10457 * src/symtab.c, src/symtab.c (symbol_class_set)
10458 (symbol_user_token_number_set): New.
10459 * src/reader.c (parse_token_decl): Use them.
10460 Use a switch instead of ifs.
10461 Use a single argument.
10462
10463 2002-06-10 Akim Demaille <akim@epita.fr>
10464
10465 Remove `%thong' support as it is undocumented, unused, duplicates
10466 `%token's job, and creates useless e-mail traffic with people who
10467 want to know what it is, why it is undocumented, unused, and
10468 duplicates `%token's job.
10469
10470 * src/reader.c (parse_thong_decl): Remove.
10471 * src/options.c (option_table): Remove "thong".
10472 * src/lex.h (tok_thong): Remove.
10473
10474 2002-06-10 Akim Demaille <akim@epita.fr>
10475
10476 * src/symtab.c, src/symtab.c (symbol_type_set)
10477 (symbol_precedence_set): New.
10478 * src/reader.c (parse_type_decl, parse_assoc_decl): Use them.
10479 (value_components_used): Remove, unused.
10480
10481 2002-06-09 Akim Demaille <akim@epita.fr>
10482
10483 Move symbols handling code out of the reader.
10484
10485 * src/reader.h, src/reader.c (errtoken, undeftoken, eoftoken)
10486 (axiom): Move to...
10487 * src/symtab.h, src/symtab.c: here.
10488
10489 * src/gram.c (start_symbol): Remove: use startsymbol->number.
10490 * src/reader.c (startval): Rename as...
10491 * src/symtab.h, src/symtab.c (startsymbol): this.
10492 * src/reader.c: Adjust.
10493
10494 * src/reader.c (symbol_check_defined, symbol_make_alias)
10495 (symbol_check_alias_consistence, symbol_pack, symbol_translation)
10496 (token_translations_init)
10497 Move to...
10498 * src/symtab.c: here.
10499 * src/reader.c (packsymbols): Move to...
10500 * src/symtab.h, src/symtab.c (symbols_pack): here.
10501 * src/symtab.h, src/symtab.c (symbol_make_alias): Takes SYMVAL as
10502 argument.
10503
10504 2002-06-03 Akim Demaille <akim@epita.fr>
10505
10506 * src/muscle_tab.c (muscle_insert, muscle_find): Declarations,
10507 then statements.
10508
10509 2002-06-03 Akim Demaille <akim@epita.fr>
10510
10511 * src/muscle_tab.c (muscle_find, muscle_insert): Don't initialize
10512 structs with non literals.
10513 * src/scan-skel.l: never-interactive.
10514 * src/conflicts.c (enum conflict_resolution_e): No trailing
10515 comma.
10516 * src/getargs.c (usage): Split long literal strings.
10517 Reported by Hans Aberg.
10518
10519 2002-05-28 Akim Demaille <akim@epita.fr>
10520
10521 * data/bison.c++: Use C++ ostreams.
10522 (cdebug_): New member.
10523
10524 2002-05-28 Akim Demaille <akim@epita.fr>
10525
10526 * src/output.c (output_skeleton): Be sure to allocate enough room
10527 for `/' _and_ for `\0' in full_skeleton.
10528
10529 2002-05-28 Akim Demaille <akim@epita.fr>
10530
10531 * data/bison.c++: Catch up with bison.simple:
10532 2002-05-24 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
10533 and Paul Eggert <eggert@twinsun.com>: `error' handing.
10534 2002-05-26 Akim Demaille <akim@epita.fr>: stos_, token_number_,
10535 and popping traces.
10536
10537 2002-05-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
10538
10539 * src/output.c (output_skeleton): Put an explicit path in front of
10540 the skeleton file name, rather than relying on the -I directory,
10541 to partially alleviate effects of having a skeleton file lying around
10542 in the current directory.
10543
10544 2002-05-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
10545
10546 * src/conflicts.c (log_resolution): Correct typo:
10547 obstack_printf should be obstack_fgrow1.
10548
10549 2002-05-26 Akim Demaille <akim@epita.fr>
10550
10551 * src/state.h (state_t): `solved_conflicts' is a new member.
10552 * src/LR0.c (new_state): Set it to 0.
10553 * src/conflicts.h, src/conflicts.c (print_conflicts)
10554 (free_conflicts, solve_conflicts): Rename as...
10555 (conflicts_print, conflicts_free, conflicts_solve): these.
10556 Adjust callers.
10557 * src/conflicts.c (enum conflict_resolution_e)
10558 (solved_conflicts_obstack): New, used by...
10559 (log_resolution): this.
10560 Adjust to attach the conflict resolution to each state.
10561 Complete the description with the precedence/associativity
10562 information.
10563 (resolve_sr_conflict): Adjust.
10564 * src/print.c (print_state): Output its solved_conflicts.
10565 * tests/conflicts.at (Unresolved SR Conflicts)
10566 (Solved SR Conflicts): Exercise --report=all.
10567
10568 2002-05-26 Akim Demaille <akim@epita.fr>
10569
10570 * src/LR0.c, src/derives.c, src/gram.c, src/gram.h, src/lalr.c,
10571 * src/nullable.c, src/output.c, src/print.c, src/print_graph.c,
10572 * src/reader.c, src/reduce.c, src/state.h, src/symtab.h
10573 (token_number_t, item_number_as_token_number)
10574 (token_number_as_item_number, muscle_insert_token_number_table):
10575 Rename as...
10576 (symbol_number_t, item_number_as_symbol_number)
10577 (symbol_number_as_item_number, muscle_insert_symbol_number_table):
10578 these, since it is more appropriate.
10579
10580 2002-05-26 Akim Demaille <akim@epita.fr>
10581
10582 * tests/calc.at (AT_CHECK_CALC): Adjust: there are now additional
10583 `Error:' lines.
10584 * data/bison.simple (yystos) [YYDEBUG]: New.
10585 (yyparse) [YYDEBUG]: Display the symbols which are popped during
10586 error recovery.
10587 * tests/regression.at (Web2c Actions): Adjust: yystos is output now.
10588
10589 2002-05-25 Akim Demaille <akim@epita.fr>
10590
10591 * doc/bison.texinfo (Debugging): Split into...
10592 (Tracing): this new section, its former contents, and...
10593 (Understanding): this new section.
10594 * src/getargs.h, src/getargs.c (verbose_flag): Remove, replaced
10595 by...
10596 (report_flag): this.
10597 Adjust all dependencies.
10598 (report_args, report_types, report_argmatch): New.
10599 (usage, getargs): Report/support -r, --report.
10600 * src/options.h
10601 (struct option_table_struct): Rename as..,
10602 (struct option_table_s): this.
10603 Rename the `set_flag' member to `flag' to match with getopt_long's
10604 struct.
10605 * src/options.c (option_table): Split verbose into an entry for
10606 %verbose, and another for --verbose.
10607 Support --report/-r, so remove -r from the obsolete --raw.
10608 * src/print.c: Attach full item sets and lookaheads reports to
10609 report_flag instead of trace_flag.
10610 * lib/argmatch.h, lib/argmatch.c: New, from Fileutils 4.1.
10611
10612 2002-05-24 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
10613 and Paul Eggert <eggert@twinsun.com>
10614
10615 * data/bison.simple (yyparse): Correct error handling to conform to
10616 POSIX and yacc. Specifically, after syntax error is discovered,
10617 do not reduce further before shifting the error token.
10618 Clean up the code a bit by removing the labels yyerrdefault,
10619 yyerrhandle, yyerrpop.
10620 * NEWS: Document the above.
10621
10622 2002-05-20 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
10623
10624 * data/bison.simple (yyr1): Don't use yy_token_number_type as element
10625 type; it isn't always big enough, since it doesn't necessarily
10626 include non-terminals.
10627 (yytranslate): Expand definition of yy_token_number_type, so that
10628 the latter can be removed.
10629 (yy_token_number_type): Remove, only one use.
10630 * data/bison.c++ (r1_): Parallel change to yyr1 in bison.simple---
10631 don't use TokenNumberType as element type.
10632
10633 * tests/regression.at: Modify expected output to agree with change
10634 to yyr1 and yytranslate.
10635
10636 2002-05-13 Florian Krohm <florian@edamail.fishkill.ibm.com>
10637
10638 * src/reader.c (parse_action): Use copy_character instead of
10639 obstack_1grow.
10640
10641 2002-05-13 Akim Demaille <akim@epita.fr>
10642
10643 * tests/regression.at (Token definitions): Prototype yylex and
10644 yyerror.
10645
10646 2002-05-12 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
10647
10648 * src/scan-skel.l: Correct off-by-one error in handling of __oline__.
10649 * data/bison.simple (b4_sint_type, b4_uint_type): Correct to reflect
10650 32-bit arithmetic.
10651 * data/bison.c++ (b4_sint_type, b4_uint_type): Ditto.
10652
10653 2002-05-07 Akim Demaille <akim@epita.fr>
10654
10655 * tests/synclines.at: Be sure to prototype yylex and yyerror to
10656 avoid GCC warnings.
10657
10658 2002-05-07 Akim Demaille <akim@epita.fr>
10659
10660 Kill GCC warnings.
10661
10662 * src/reduce.c (nonterminals_reduce): Don't loop over RITEM: loop
10663 over the RHS of each rule.
10664 * src/gram.h, src/gram.c (nritems): Is `unsigned int', not int.
10665 * src/state.h (state_t): Member `nitems' is unsigned short.
10666 * src/LR0.c (get_state): Adjust.
10667 * src/reader.c (packgram): Likewise.
10668 * src/output.c (GENERATE_MUSCLE_INSERT_TABLE): `max' is of type
10669 `Type'.
10670 (muscle_insert_int_table): Remove, unused.
10671 (prepare_rules): Remove `max'.
10672
10673 2002-05-06 Akim Demaille <akim@epita.fr>
10674
10675 * src/closure.c (print_firsts): Display of the symbol tags.
10676 (bitmatrix_print): Move to...
10677 * lib/bitsetv-print.h, lib/bitsetv-print.c (bitsetv_matrix_dump):
10678 here.
10679 * tests/sets.at (Nullable, Broken Closure, Firsts): Adjust.
10680
10681 2002-05-06 Akim Demaille <akim@epita.fr>
10682
10683 * src/muscle_tab.c (muscle_m4_output): Must return TRUE for
10684 hash_do_for_each.
10685
10686 2002-05-06 Akim Demaille <akim@epita.fr>
10687
10688 * src/LR0.c (new_state, get_state): Instead of using the global
10689 `kernel_size' and `kernel_base', have two new arguments:
10690 `core_size' and `core'.
10691 Adjust callers.
10692
10693 2002-05-06 Akim Demaille <akim@epita.fr>
10694
10695 * src/reader.c (packgram): No longer end `ritem' with a 0
10696 sentinel: it is not used.
10697
10698 2002-05-05 Akim Demaille <akim@epita.fr>
10699
10700 New experimental feature: display the lookaheads in the report and
10701 graph.
10702
10703 * src/print (print_core): When --trace-flag, display the rules
10704 lookaheads.
10705 * src/print_graph.c (print_core): Likewise.
10706 Swap the arguments.
10707 Adjust caller.
10708
10709 2002-05-05 Akim Demaille <akim@epita.fr>
10710
10711 * tests/torture.at (Many lookaheads): New test.
10712
10713 2002-05-05 Akim Demaille <akim@epita.fr>
10714
10715 * src/output.c (GENERATE_OUTPUT_TABLE): Replace with...
10716 (GENERATE_MUSCLE_INSERT_TABLE): this.
10717 (output_int_table, output_unsigned_int_table, output_short_table)
10718 (output_token_number_table, output_item_number_table): Replace with...
10719 (muscle_insert_int_table, muscle_insert_unsigned_int_table)
10720 (muscle_insert_short_table, muscle_insert_token_number_table)
10721 (muscle_insert_item_number_table): these.
10722 Adjust all callers.
10723 (prepare_tokens): Don't free `translations', since...
10724 * src/reader.h, src/reader.c (grammar_free): do it.
10725 Move to...
10726 * src/gram.h, src/gram.c (grammar_free): here.
10727 * data/bison.simple, data/bison.c++: b4_token_number_max is now
10728 b4_translate_max.
10729
10730 2002-05-05 Akim Demaille <akim@epita.fr>
10731
10732 * src/output.c (output_unsigned_int_table): New.
10733 (prepare_rules): `i' is unsigned.
10734 `prhs', `rline', `r2' are unsigned int.
10735 Rename muscle `rhs_number_max' as `rhs_max'.
10736 Output muscles `prhs_max', `rline_max', and `r2_max'.
10737 Free rline and r1.
10738 * data/bison.simple, data/bison.c++: Adjust to use these muscles
10739 to compute types instead of constant types.
10740 * tests/regression.at (Web2c Actions): Adjust.
10741
10742 2002-05-04 Akim Demaille <akim@epita.fr>
10743
10744 * src/symtab.h (SALIAS, SUNDEF): Rename as...
10745 (USER_NUMBER_ALIAS, USER_NUMBER_UNDEFINED): these.
10746 Adjust dependencies.
10747 * src/output.c (token_definitions_output): Be sure not to output a
10748 `#define 'a'' when fed with `%token 'a' "a"'.
10749 * tests/regression.at (Token definitions): New.
10750
10751 2002-05-03 Paul Eggert <eggert@twinsun.com>
10752
10753 * data/bison.simple (b4_token_defines): Also define YYTOKENTYPE
10754 for K&R C.
10755
10756 2002-05-03 gettextize <bug-gnu-gettext@gnu.org>
10757
10758 * Makefile.am (SUBDIRS): Remove intl.
10759 (EXTRA_DIST): Add config/config.rpath.
10760
10761 2002-05-03 Akim Demaille <akim@epita.fr>
10762
10763 * data/bison.simple (m4_if): Don't output empty enums.
10764 And actually, output valid enum definitions :(.
10765
10766 2002-05-03 Akim Demaille <akim@epita.fr>
10767
10768 * configure.bat: Remove, completely obsolete.
10769 * Makefile.am (EXTRA_DIST): Adjust.
10770 Don't distribute config.rpath...
10771 * config/Makefile.am (EXTRA_DIST): Do it.
10772
10773 2002-05-03 Akim Demaille <akim@epita.fr>
10774
10775 * configure.in (GETTEXT_VERSION): New.
10776 Suggested by Bruno Haible for the forthcoming Gettext 0.10.3.
10777
10778 2002-05-03 Akim Demaille <akim@epita.fr>
10779
10780 * data/bison.simple (b4_token_enum): New.
10781 (b4_token_defines): Use it to output tokens both as #define and
10782 enums.
10783 Suggested by Paul Eggert.
10784 * src/output.c (token_definitions_output): Don't output spurious
10785 white spaces.
10786
10787 2002-05-03 Akim Demaille <akim@epita.fr>
10788
10789 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
10790
10791 2002-05-02 Robert Anisko <robert@lrde.epita.fr>
10792
10793 * data/bison.c++: Adapt expansion of $s and @s to the C++ parser.
10794 Update the stack class, give a try to deque as the default container.
10795
10796 2002-05-02 Akim Demaille <akim@epita.fr>
10797
10798 * data/bison.simple (yyparse): Do not implement @$ = @1.
10799 (YYLLOC_DEFAULT): Adjust to do it.
10800 * doc/bison.texinfo (Location Default Action): Fix.
10801
10802 2002-05-02 Akim Demaille <akim@epita.fr>
10803
10804 * src/reader.c (parse_braces): Merge into...
10805 (parse_action): this.
10806
10807 2002-05-02 Akim Demaille <akim@epita.fr>
10808
10809 * configure.in (ALL_LINGUAS): Remove.
10810 * po/LINGUAS, hr.po: New.
10811
10812 2002-05-02 Akim Demaille <akim@epita.fr>
10813
10814 Remove the so called hairy (semantic) parsers.
10815
10816 * src/system.h (EXT_GUARD_C, EXT_STYPE_H): Remove.
10817 * src/gram.h, src/gram.c (semantic_parser): Remove.
10818 (rule_t): Remove the guard and guard_line members.
10819 * src/lex.h (token_t): remove tok_guard.
10820 * src/options.c (option_table): Remove %guard and %semantic_parser
10821 support.
10822 * src/output.c, src/output.h (guards_output): Remove.
10823 (prepare): Adjust.
10824 (token_definitions_output): Don't output the `T'
10825 tokens (???).
10826 (output_skeleton): Don't output the guards.
10827 * src/files.c, src/files.c (attrsfile): Remove.
10828 * src/reader.c (symbol_list): Remove the guard and guard_line
10829 members.
10830 Adjust dependencies.
10831 (parse_guard): Remove.
10832 * data/bison.hairy: Remove.
10833 * doc/bison.texinfo (Environment Variables): Remove occurrences of
10834 BISON_HAIRY.
10835
10836 2002-05-02 Akim Demaille <akim@epita.fr>
10837
10838 * src/reader.c (copy_at, copy_dollarm parse_braces, parse_action)
10839 (parse_guard): Rename the formal argument `stack_offset' as
10840 `rule_length', which is more readable.
10841 Adjust callers.
10842 (copy_at, copy_dollar): Instead of outputting the hard coded
10843 values of $$, $n and so forth, output invocation to b4_lhs_value,
10844 b4_lhs_location, b4_rhs_value, and b4_rhs_location.
10845 Note: this patch partially drops `semantic-parser' support: it
10846 always does `rule_length - n', where semantic parsers ought to
10847 always use `-n'.
10848 * data/bison.simple, data/bison.c++ (b4_lhs_value)
10849 (b4_lhs_location, b4_rhs_value, and b4_rhs_location: New.
10850
10851 2002-05-02 Akim Demaille <akim@epita.fr>
10852
10853 * configure.in (AC_INIT): Bump to 1.49b.
10854 (AM_INIT_AUTOMAKE): Short invocation.
10855
10856 2002-05-02 Akim Demaille <akim@epita.fr>
10857
10858 Version 1.49a.
10859
10860 2002-05-01 Akim Demaille <akim@epita.fr>
10861
10862 * src/skeleton.h: Remove.
10863
10864 2002-05-01 Akim Demaille <akim@epita.fr>
10865
10866 * src/skeleton.h: Fix the #endif.
10867 Reported by Magnus Fromreide.
10868
10869 2002-04-26 Paul Eggert <eggert@twinsun.com>
10870
10871 * data/bison.simple (YYSTYPE_IS_TRIVIAL, YYLTYPE_IS_TRIVIAL):
10872 Define if we define YYSTYPE and YYLTYPE, respectively.
10873 (YYCOPY): Fix [] quoting problem in the non-GCC case.
10874
10875 2002-04-25 Robert Anisko <robert@lrde.epita.fr>
10876
10877 * src/scan-skel.l: Postprocess quadrigraphs.
10878
10879 * src/reader.c (copy_character): New function, used to output
10880 single characters while replacing `[' and `]' with quadrigraphs, to
10881 avoid troubles with M4 quotes.
10882 (copy_comment): Output characters with copy_character.
10883 (read_additionnal_code): Likewise.
10884 (copy_string2): Likewise.
10885 (copy_definition): Likewise.
10886
10887 * tests/calc.at: Exercise M4 quoting.
10888
10889 2002-04-25 Akim Demaille <akim@epita.fr>
10890
10891 * tests/sets.at (AT_EXTRACT_SETS): Sed portability issue: no space
10892 between `!' and the command.
10893 Reported by Paul Eggert.
10894
10895 2002-04-24 Robert Anisko <robert@lrde.epita.fr>
10896
10897 * tests/calc.at: Exercise prologue splitting.
10898
10899 * data/bison.simple, data/bison.c++: Use `b4_pre_prologue' and
10900 `b4_post_prologue' instead of `b4_prologue'.
10901
10902 * src/output.c (prepare): Add the `pre_prologue' and `post_prologue'
10903 muscles.
10904 (output): Free pre_prologue_obstack and post_prologue_obstack.
10905 * src/files.h, src/files.c (attrs_obstack): Remove.
10906 (pre_prologue_obstack, post_prologue_obstack): New.
10907 * src/reader.c (copy_definition): Add a parameter to specify the
10908 obstack to fill, instead of using attrs_obstack unconditionally.
10909 (read_declarations): Pass pre_prologue_obstack to copy_definition if
10910 `%union' has not yet been seen, pass post_prologue_obstack otherwise.
10911
10912 2002-04-23 Paul Eggert <eggert@twinsun.com>
10913
10914 * data/bison.simple: Remove unnecessary commentary and white
10915 space differences from 1_29-branch.
10916 Depend on YYERROR_VERBOSE, not defined (YYERROR_VERBOSE).
10917
10918 (union yyalloc, YYSTACK_GAP_MAX, YYSTACK_BYTES, YYCOPY,
10919 YYSTACK_RELOCATE): Do not define if yyoverflow is defined, or
10920 if this is a C++ parser and YYSTYPE or YYLTYPE has nontrivial
10921 constructors or destructors.
10922
10923 (yyparse) [! defined YYSTACK_RELOCATE]: Do not relocate the stack.
10924
10925 2002-04-23 Akim Demaille <akim@epita.fr>
10926
10927 * tests/sets.at (AT_EXTRACT_SETS): Don't use 8 char long sed labels.
10928 * tests/synclines.at (AT_TEST_SYNCLINE): Be robust to GCC's
10929 location with columns.
10930 * tests/conflicts.at (%nonassoc and eof): Don't use `error.h'.
10931 All reported by Paul Eggert.
10932
10933 2002-04-22 Akim Demaille <akim@epita.fr>
10934
10935 * src/reduce.c (dump_grammar): Move to...
10936 * src/gram.h, src/gram.c (grammar_dump): here.
10937 Be sure to separate long item numbers.
10938 Don't read the members of a rule's prec if its nil.
10939
10940 2002-04-22 Akim Demaille <akim@epita.fr>
10941
10942 * src/output.c (table_size, table_grow): New.
10943 (MAXTABLE): Remove, replace uses with table_size.
10944 (pack_vector): Instead of dying when the table is too big, grow it.
10945
10946 2002-04-22 Akim Demaille <akim@epita.fr>
10947
10948 * data/bison.simple (yyr1): Its type is that of a token number.
10949 * data/bison.c++ (r1_): Likewise.
10950 * tests/regression.at (Web2c Actions): Adjust.
10951
10952 2002-04-22 Akim Demaille <akim@epita.fr>
10953
10954 * src/reader.c (token_translations_init): 256 is now the default
10955 value for the error token, i.e., it will be assigned another
10956 number if the user assigned 256 to one of her tokens.
10957 (reader): Don't force 256 to error.
10958 * doc/bison.texinfo (Symbols): Adjust.
10959 * tests/torture.at (AT_DATA_HORIZONTAL_GRAMMAR)
10960 (AT_DATA_TRIANGULAR_GRAMMAR): Number the tokens as 1, 2, 3
10961 etc. instead of 10, 20, 30 (which was used to `jump' over error
10962 (256) and undefined (2)).
10963
10964 2002-04-22 Akim Demaille <akim@epita.fr>
10965
10966 Propagate more token_number_t.
10967
10968 * src/gram.h (token_number_as_item_number)
10969 (item_number_as_token_number): New.
10970 * src/output.c (GENERATE_OUTPUT_TABLE): New.
10971 Use it to create output_item_number_table and
10972 output_token_number_table.
10973 * src/LR0.c, src/derives.c, src/gram.c, src/gram.h, src/lalr.c,
10974 * src/lex.c, src/nullable.c, src/output.c, src/print.c,
10975 * src/print_graph.c, src/reader.c, src/reduce.c, src/state.h,
10976 * src/symtab.c, src/symtab.h: Use token_number_t instead of shorts.
10977
10978 2002-04-22 Akim Demaille <akim@epita.fr>
10979
10980 * src/output.h, src/output.c (get_lines_number): Remove.
10981
10982 2002-04-19 Akim Demaille <akim@epita.fr>
10983
10984 * doc/bison.texinfo (Actions): Make clear that `|' is not the same
10985 as Lex/Flex'.
10986 (Debugging): More details about enabling the debugging features.
10987 (Table of Symbols): Describe $$, $n, @$, and @n.
10988 Suggested by Tim Josling.
10989
10990 2002-04-19 Akim Demaille <akim@epita.fr>
10991
10992 * doc/bison.texinfo: Remove the uses of the obsolete @refill.
10993
10994 2002-04-10 Akim Demaille <akim@epita.fr>
10995
10996 * src/system.h: Rely on HAVE_LIMITS_H.
10997 Suggested by Paul Eggert.
10998
10999 2002-04-09 Akim Demaille <akim@epita.fr>
11000
11001 * tests/calc.at (_AT_CHECK_CALC_ERROR): Receive as argument the
11002 full stderr, and strip it according to the bison options, instead
11003 of composing the error message from different bits.
11004 This makes it easier to check for several error messages.
11005 Adjust all the invocations.
11006 Add an invocation exercising the error token.
11007 Add an invocation demonstrating a stupid error message.
11008 (_AT_DATA_CALC_Y): Follow the GCS: initial column is 1, not 0.
11009 Adjust the tests.
11010 Error message are for stderr, not stdout.
11011
11012 2002-04-09 Akim Demaille <akim@epita.fr>
11013
11014 * src/gram.h, src/gram.c (error_token_number): Remove, use
11015 errtoken->number.
11016 * src/reader.c (reader): Don't specify the user token number (2)
11017 for $undefined, as it uselessly prevents using it.
11018 * src/gram.h (token_number_t): Move to...
11019 * src/symtab.h: here.
11020 (state_t.number): Is a token_number_t.
11021 * src/print.c, src/reader.c: Use undeftoken->number instead of
11022 hard coded 2.
11023 (Even though this 2 is not the same as above: the number of the
11024 undeftoken remains being 2, it is its user token number which
11025 might not be 2).
11026 * src/output.c (prepare_tokens): Rename the `maxtok' muscle with
11027 `user_token_number_max'.
11028 Output `undef_token_number'.
11029 * data/bison.simple, data/bison.c++: Use them.
11030 Be sure to map invalid yylex return values to
11031 `undef_token_number'. This saves us from gratuitous SEGV.
11032
11033 * tests/conflicts.at (Solved SR Conflicts)
11034 (Unresolved SR Conflicts): Adjust.
11035 * tests/regression.at (Web2c Actions): Adjust.
11036
11037 2002-04-08 Akim Demaille <akim@epita.fr>
11038
11039 * data/bison.c++: s/b4_item_number_max/b4_rhs_number_max/.
11040 Adding #line.
11041 Remove the duplicate `typedefs'.
11042 (RhsNumberType): Fix the declaration and various other typos.
11043 Use __ofile__.
11044 * data/bison.simple: Use __ofile__.
11045 * src/scan-skel.l: Handle __ofile__.
11046
11047 2002-04-08 Akim Demaille <akim@epita.fr>
11048
11049 * src/gram.h (item_number_t): New, the type of item numbers in
11050 RITEM. Note that it must be able to code symbol numbers as
11051 positive number, and the negation of rule numbers as negative
11052 numbers.
11053 Adjust all dependencies (pretty many).
11054 * src/reduce.c (rule): Remove this `short *' pointer: use
11055 item_number_t.
11056 * src/system.h (MINSHORT, MAXSHORT): Remove.
11057 Include `limits.h'.
11058 Adjust dependencies to using SHRT_MAX and SHRT_MIN.
11059 (shortcpy): Remove.
11060 (MAXTABLE): Move to...
11061 * src/output.c (MAXTABLE): here.
11062 (prepare_rules): Use output_int_table to output rhs.
11063 * data/bison.simple, data/bison.c++: Adjust.
11064 * tests/torture.at (Big triangle): Move the limit from 254 to
11065 500.
11066 * tests/regression.at (Web2c Actions): Ajust.
11067
11068 Trying with bigger grammars shows various phenomena: at 3000 (28Mb
11069 of grammar file) bison is killed by my system, at 2000 (12Mb) bison
11070 passes, but produces negative #line number, once fixed, GCC is
11071 killed while compiling 14Mb, at 1500 (6.7 Mb of grammar, 8.2Mb of
11072 C), it passes.
11073 * src/state.h (state_h): Code input lines on ints, not shorts.
11074
11075 2002-04-08 Akim Demaille <akim@epita.fr>
11076
11077 * src/reduce.c (reduce_grammar): First reduce the nonterminals,
11078 and then the grammar.
11079
11080 2002-04-08 Akim Demaille <akim@epita.fr>
11081
11082 * src/system.h: No longer using strndup.
11083
11084 2002-04-07 Akim Demaille <akim@epita.fr>
11085
11086 * src/muscle_tab.h (MUSCLE_INSERT_LONG_INT): New.
11087 * src/output.c (output_table_data): Return the longest number.
11088 (prepare_tokens): Output `token_number_max').
11089 * data/bison.simple, data/bison.c++ (b4_sint_type, b4_uint_type):
11090 New.
11091 Use them to define yy_token_number_type/TokenNumberType.
11092 Use this type for yytranslate.
11093 * tests/torture.at (Big triangle): Push the limit from 124 to
11094 253.
11095 * tests/regression.at (Web2c Actions): Adjust.
11096
11097 2002-04-07 Akim Demaille <akim@epita.fr>
11098
11099 * tests/torture.at (Big triangle): New.
11100 (GNU AWK Grammar, GNU Cim Grammar): Move to...
11101 * tests/existing.at: here.
11102
11103 2002-04-07 Akim Demaille <akim@epita.fr>
11104
11105 * src/gram.h, src/gram.c (nitems): Remove, it is an alias of
11106 nritems.
11107 Adjust dependencies.
11108
11109 2002-04-07 Akim Demaille <akim@epita.fr>
11110
11111 * src/reader.c: Normalize increments to prefix form.
11112
11113 2002-04-07 Akim Demaille <akim@epita.fr>
11114
11115 * src/reader.c, symtab.c: Remove debugging code.
11116
11117 2002-04-07 Akim Demaille <akim@epita.fr>
11118
11119 Rename all the `bucket's as `symbol_t'.
11120
11121 * src/gram.c, src/gram.h, src/lex.c, src/lex.h, src/output.c,
11122 * src/reader.c, src/reader.h, src/reduce.c, src/state.h,
11123 * src/symtab.c, src/symtab.h (bucket): Rename as...
11124 (symbol_t): this.
11125 (symbol_list_new, bucket_check_defined, bucket_make_alias)
11126 (bucket_check_alias_consistence, bucket_pack, bucket_translation)
11127 (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
11128 (buckets_new, buckets_free, buckets_do): Rename as...
11129 (symbol_list_new, symbol_check_defined, symbol_make_alias)
11130 (symbol_check_alias_consistence, symbol_pack, symbol_translation)
11131 (symbol_new, symbol_free, hash_compare_symbol_t, hash_symbol_t)
11132 (symbols_new, symbols_free, symbols_do): these.
11133
11134 2002-04-07 Akim Demaille <akim@epita.fr>
11135
11136 Use lib/hash for the symbol table.
11137
11138 * src/gram.c (ntokens): Initialize to 1, to reserve a slot for
11139 EOF.
11140 * src/lex.c (lex): Set the `number' member of new terminals.
11141 * src/reader.c (bucket_check_defined, bucket_make_alias)
11142 (bucket_check_alias_consistence, bucket_translation): New.
11143 (reader, grammar_free, readgram, token_translations_init)
11144 (packsymbols): Adjust.
11145 (reader): Number the predefined tokens.
11146 * src/reduce.c (inaccessable_symbols): Just use hard coded numbers
11147 for predefined tokens.
11148 * src/symtab.h (bucket): Remove all the hash table related
11149 members.
11150 * src/symtab.c (symtab): Replace by...
11151 (bucket_table): this.
11152 (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
11153 (buckets_new, buckets_do): New.
11154
11155 2002-04-07 Akim Demaille <akim@epita.fr>
11156
11157 * src/gram.c (nitems, nrules, nsyms, ntokens, nvars, nritems)
11158 (start_symbol, max_user_token_number, semantic_parser)
11159 (error_token_number): Initialize.
11160 * src/reader.c (grammar, start_flag, startval, typed, lastprec):
11161 Initialize.
11162 (reader): Don't.
11163 (errtoken, eoftoken, undeftoken, axiom): Extern.
11164
11165 2002-04-07 Akim Demaille <akim@epita.fr>
11166
11167 * src/gram.h (rule_s): prec and precsym are now pointers
11168 to the bucket giving the priority/associativity.
11169 Member `associativity' removed: useless.
11170 * src/reduce.c, src/conflicts.c: Adjust.
11171
11172 2002-04-07 Akim Demaille <akim@epita.fr>
11173
11174 * src/lalr.c, src/LR0.c, src/closure.c, src/gram.c, src/reduce.c:
11175 Properly escape the symbols' TAG when outputting them.
11176
11177 2002-04-07 Akim Demaille <akim@epita.fr>
11178
11179 * src/lalr.h (LA): Is a bitsetv, not bitset*.
11180
11181 2002-04-07 Akim Demaille <akim@epita.fr>
11182
11183 * src/lalr.h, src/lalr.c (LAruleno): Replace with...
11184 (LArule): this, which is an array to rule_t*.
11185 * src/print.c, src/conflicts.c: Adjust.
11186
11187 2002-04-07 Akim Demaille <akim@epita.fr>
11188
11189 * src/gram.h (rule_t): Rename `number' as `user_number'.
11190 `number' is a new member.
11191 Adjust dependencies.
11192 * src/reduce.c (reduce_grammar_tables): Renumber rule_t.number.
11193
11194 2002-04-07 Akim Demaille <akim@epita.fr>
11195
11196 As a result of the previous patch, it is no longer needed
11197 to reorder ritem itself.
11198
11199 * src/reduce.c (reduce_grammar_tables): Don't sort RITEM.
11200
11201 2002-04-07 Akim Demaille <akim@epita.fr>
11202
11203 Be sure never to walk through RITEMS, but use only data related to
11204 the rules themselves. RITEMS should be banished.
11205
11206 * src/output.c (output_token_translations): Rename as...
11207 (prepare_tokens): this.
11208 In addition to `translate', prepare the muscles `tname' and
11209 `toknum', which were handled by...
11210 (output_rule_data): this.
11211 Remove, and move the remainder of its outputs into...
11212 (prepare_rules): this new routines, which also merges content from
11213 (output_gram): this.
11214 (prepare_rules): Be sure never to walk through RITEMS.
11215 (output_stos): Rename as...
11216 (prepare_stos): this.
11217 (output): Always invoke prepare_states, after all, just don't use it
11218 in the output if you don't need it.
11219
11220 2002-04-07 Akim Demaille <akim@epita.fr>
11221
11222 * src/LR0.c (new_state): Display `nstates' as the name of the
11223 newly created state.
11224 Adjust to initialize first_state and last_state if needed.
11225 Be sure to distinguish the initial from the final state.
11226 (new_states): Create the itemset of the initial state, and use
11227 new_state.
11228 * src/closure.c (closure): Now that the initial state has its
11229 items properly set, there is no need for a special case when
11230 creating `ruleset'.
11231
11232 As a result, now the rule 0, reducing to $axiom, is visible in the
11233 outputs. Adjust the test suite.
11234
11235 * tests/conflicts.at (Solved SR Conflicts)
11236 (Unresolved SR Conflicts): Adjust.
11237 * tests/regression.at (Web2c Report, Rule Line Numbers): Idem.
11238 * tests/conflicts.at (S/R in initial): New.
11239
11240 2002-04-07 Akim Demaille <akim@epita.fr>
11241
11242 * src/LR0.c (allocate_itemsets): Don't loop over ritem: loop over
11243 the RHS of the rules.
11244 * src/output.c (output_gram): Likewise.
11245
11246 2002-04-07 Akim Demaille <akim@epita.fr>
11247
11248 * src/gram.h (rule_t): `lhs' is now a pointer to the symbol's
11249 bucket.
11250 Adjust all dependencies.
11251 * src/reduce.c (nonterminals_reduce): Don't forget to renumber the
11252 `number' of the buckets too.
11253 * src/gram.h: Include `symtab.h'.
11254 (associativity): Move to...
11255 * src/symtab.h: here.
11256 No longer include `gram.h'.
11257
11258 2002-04-07 Akim Demaille <akim@epita.fr>
11259
11260 * src/gram.h, src/gram.c (rules_rhs_length): New.
11261 (ritem_longest_rhs): Use it.
11262 * src/gram.h (rule_t): `number' is a new member.
11263 * src/reader.c (packgram): Set it.
11264 * src/reduce.c (reduce_grammar_tables): Move the useless rules at
11265 the end of `rules', and count them out of `nrules'.
11266 (reduce_output, dump_grammar): Adjust.
11267 * src/print.c (print_grammar): It is no longer needed to check for
11268 the usefulness of a rule, as useless rules are beyond `nrules + 1'.
11269 * tests/reduce.at (Reduced Automaton): New test.
11270
11271 2002-04-07 Akim Demaille <akim@epita.fr>
11272
11273 * src/reduce.c (inaccessable_symbols): Fix a buglet: because of a
11274 lacking `+ 1' to nrules, Bison reported as useless a token if it
11275 was used solely to set the precedence of the last rule...
11276
11277 2002-04-07 Akim Demaille <akim@epita.fr>
11278
11279 * data/bison.c++, data/bison.simple: Don't output the current file
11280 name in #line, to avoid useless diffs between two identical
11281 outputs under different names.
11282
11283 2002-04-07 Akim Demaille <akim@epita.fr>
11284
11285 * src/closure.c, src/print.c, src/reader.c, src/reduce.c:
11286 Normalize loops to using `< nrules + 1', not `<= nrules'.
11287
11288 2002-04-07 Akim Demaille <akim@epita.fr>
11289
11290 * TODO: Update.
11291
11292 2002-04-07 Akim Demaille <akim@epita.fr>
11293
11294 * src/output.c, src/reader.c, src/symtab.c, src/symtab.h: Rename
11295 bucket.value as bucket.number.
11296
11297 2002-04-07 Akim Demaille <akim@epita.fr>
11298
11299 * src/closure.c, src/derives.c, src/gram.h, src/lalr.c,
11300 * src/nullable.c, src/output.c, src/print.c, src/print_graph.c,
11301 * src/reader.c, src/reduce.c: Let rule_t.rhs point directly to the
11302 RHS, instead of being an index in RITEMS.
11303
11304 2002-04-04 Paul Eggert <eggert@twinsun.com>
11305
11306 * doc/bison.texinfo: Update copyright date.
11307 (Rpcalc Lexer, Symbols, Token Decl): Don't assume ASCII.
11308 (Symbols): Warn about running Bison in one character set,
11309 but compiling and/or running in an incompatible one.
11310 Warn about character code 256, too.
11311
11312 2002-04-03 Paul Eggert <eggert@twinsun.com>
11313
11314 * src/bison.data (YYSTACK_ALLOC): Depend on whether
11315 YYERROR_VERBOSE is nonzero, not whether it is defined.
11316
11317 Merge changes from bison-1_29-branch.
11318
11319 2002-03-20 Paul Eggert <eggert@twinsun.com>
11320
11321 Merge fixes from Debian bison_1.34-1.diff.
11322
11323 * configure.in (AC_PREREQ): 2.53.
11324
11325 2002-03-20 Akim Demaille <akim@epita.fr>
11326
11327 * src/conflicts.c (log_resolution): Argument `resolution' is const.
11328
11329 2002-03-19 Paul Eggert <eggert@twinsun.com>
11330
11331 * src/bison.simple (YYCOPY): New macro.
11332 (YYSTACK_RELOCATE): Use it.
11333 Remove Type arg; no longer needed. All callers changed.
11334 (yymemcpy): Remove; no longer needed.
11335
11336 * Makefile.am (AUTOMAKE_OPTIONS): 1.6.
11337 * doc/Makefile.am (AUTOMAKE_OPTIONS): Remove.
11338
11339 2002-03-19 Akim Demaille <akim@epita.fr>
11340
11341 Test and fix the #line outputs.
11342
11343 * tests/atlocal.at (GCC): New.
11344 * tests/synclines.at (AT_TEST_SYNCLINE): New macro.
11345 (Prologue synch line, %union synch line, Postprologue synch line)
11346 (Action synch line, Epilogue synch line): New tests.
11347 * src/reader.c (parse_union_decl): Define the muscle stype_line.
11348 * data/bison.simple, data/bison.c++: Use it.
11349
11350 2002-03-19 Akim Demaille <akim@epita.fr>
11351
11352 * tests/regression.at (%nonassoc and eof, Unresolved SR Conflicts)
11353 (Solved SR Conflicts, %expect not enough, %expect right)
11354 (%expect too much): Move to...
11355 * tests/conflicts.at: this new file.
11356
11357 2002-03-19 Akim Demaille <akim@epita.fr>
11358
11359 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
11360 * data/bison.simple, data/bison.c++: Handle the `#define' part, so
11361 that we can move to enums for instance.
11362 * src/output.c (token_definitions_output): Output a list of
11363 `token-name, token-number' instead of the #define.
11364 (output_skeleton): Name this list `b4_tokens', not `b4_tokendefs'.
11365
11366 2002-03-14 Akim Demaille <akim@epita.fr>
11367
11368 Use Gettext 0.11.1.
11369
11370 2002-03-09 Robert Anisko <robert@lrde.epita.fr>
11371
11372 * data/bison.c++: Make the user able to add members to the generated
11373 parser by subclassing.
11374
11375 2002-03-05 Robert Anisko <robert@lrde.epita.fr>
11376
11377 * src/reader.c (read_additionnal_code): `c' should be an integer, not
11378 a character.
11379 Reported by Nicolas Tisserand and Nicolas Burrus.
11380
11381 2002-03-04 Robert Anisko <robert@lrde.epita.fr>
11382
11383 * src/reader.c: Warn about lacking semi-colons, do not complain.
11384
11385 2002-03-04 Robert Anisko <robert@lrde.epita.fr>
11386
11387 * data/bison.c++: Remove a debug line.
11388
11389 2002-03-04 Robert Anisko <robert@lrde.epita.fr>
11390
11391 * data/bison.c++: Unmerge value as yylval and value as yyval. Unmerge
11392 location as yylloc and location as yyloc. Use YYLLOC_DEFAULT, and
11393 provide a default implementation.
11394
11395 2002-03-04 Akim Demaille <akim@epita.fr>
11396
11397 * tests/input.at (Invalid $n, Invalid @n): Add the ending `;'.
11398 * tests/output.at (AT_CHECK_OUTPUT): Likewise.
11399 * tests/headers.at (AT_TEST_CPP_GUARD_H): Ditto.
11400 * tests/semantic.at (Parsing Guards): Similarly.
11401 * src/reader.at (readgram): Complain if the last rule is not ended
11402 with a semi-colon.
11403
11404 2002-03-04 Akim Demaille <akim@epita.fr>
11405
11406 * src/warshall.h, src/warshall.c (bitmatrix_print): Move to...
11407 * src/closure.c: here.
11408 (set_firsts): Use bitsetv_reflexive_transitive_closure instead of
11409 RTC.
11410 * src/warshall.h, src/warshall.c: Remove.
11411 * tests/sets.at (Broken Closure): Adjust.
11412
11413 2002-03-04 Akim Demaille <akim@epita.fr>
11414
11415 * src/output.c (output_skeleton): tempdir is const.
11416 bytes_read is unused.
11417
11418 2002-03-04 Akim Demaille <akim@epita.fr>
11419
11420 * lib/bbitset.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
11421 * lib/bitsetv.h, lib/ebitset.c, lib/lbitset.c, lib/sbitset.c:
11422 Update.
11423 From Michael Hayes.
11424
11425 2002-03-04 Akim Demaille <akim@epita.fr>
11426
11427 * src/closure.c (closure): `r' is unused.
11428
11429 2002-03-04 Akim Demaille <akim@epita.fr>
11430
11431 * tests/sets.at (Broken Closure): Add the ending `;'.
11432 * src/reader.at (readgram): Complain if a rule is not ended with a
11433 semi-colon.
11434
11435 2002-03-04 Akim Demaille <akim@epita.fr>
11436
11437 * src/conflicts.c (set_conflicts): Use bitset_disjoint_p.
11438 (count_sr_conflicts): Use bitset_count.
11439 * src/reduce.c (inaccessable_symbols): Ditto.
11440 (bits_size): Remove.
11441 * src/warshall.h, src/warshall.c: Convert to bitsetv.
11442
11443 2002-03-04 Akim Demaille <akim@epita.fr>
11444
11445 * src/closure.c, src/conflicts.c, src/lalr.c, src/print.c,
11446 * src/reduce.c: Remove the `bitset_zero's following the
11447 `bitset_create's, as now it is performed by the latter.
11448
11449 2002-03-04 Akim Demaille <akim@epita.fr>
11450
11451 * lib/bitset.c, lib/bitset.h, lib/bitsetv.c, lib/bitsetv.h,
11452 * lib/ebitset.c, lib/ebitset.h, lib/lbitset.c, lib/lbitset.h,
11453 * lib/sbitset.c, lib/sbitset.h, lib/bbitset.h: Update from the
11454 latest sources from Michael.
11455
11456 2002-03-04 Akim Demaille <akim@epita.fr>
11457
11458 * src/output.c (output): Don't free the grammar.
11459 * src/reader.c (grammar_free): New.
11460 * src/main.c (main): Call it and don't free symtab here.
11461
11462 2002-03-04 Akim Demaille <akim@epita.fr>
11463
11464 * src/lex.c (parse_percent_token): Be sure to 0-end token_buffer
11465 before returning.
11466 Reported by Benoit Perrot.
11467
11468 2002-03-04 Akim Demaille <akim@epita.fr>
11469
11470 Use bitset operations when possible, not loops over bits.
11471
11472 * src/conflicts.c (set_conflicts, count_sr_conflicts): Use
11473 bitset_or.
11474 * src/print.c (print_reductions): Use bitset_and, bitset_andn.
11475 * src/reduce.c (useless_nonterminals): Formatting changes.
11476 * src/warshall.c (TC): Use bitset_or.
11477
11478 2002-03-04 Akim Demaille <akim@epita.fr>
11479
11480 * src/lalr.h, src/lalr.c (tokensetsize): Remove, unused.
11481 * src/system.h (BITS_PER_WORD, WORDSIZE, SETBIT, RESETBIT, BITISSET):
11482 Ditto.
11483
11484 2002-03-04 Akim Demaille <akim@epita.fr>
11485
11486 * src/lalr.c (F): Now a bitset*.
11487 Adjust all dependencies.
11488
11489 2002-03-04 Akim Demaille <akim@epita.fr>
11490
11491 * src/conflicts.c (shiftset, lookaheadset): Now bitset.
11492 Adjust all dependencies.
11493
11494 2002-03-04 Akim Demaille <akim@epita.fr>
11495
11496 * src/L0.c, src/LR0.h (nstates): Be size_t.
11497 Adjust comparisons (signed vs unsigned).
11498 * src/conflics.c, src/lalr.c, src/lalr.h, src/output.c (LA): Now a
11499 bitset*.
11500 Adjust all dependencies.
11501
11502 2002-03-04 Akim Demaille <akim@epita.fr>
11503
11504 * src/closure.c (firsts): Now, also a bitset.
11505 Adjust all dependencies.
11506 (varsetsize): Remove, now unused.
11507 * src/warshall.h, src/warshall.c: Now work on arrays of bitsets.
11508
11509 2002-03-04 Akim Demaille <akim@epita.fr>
11510
11511 * src/print.c: Convert to use bitset.h, not hand coded iterations
11512 over ints.
11513
11514 2002-03-04 Akim Demaille <akim@epita.fr>
11515
11516 * src/reduce.c: Convert to use bitset.h, not hand coded BSet.
11517
11518 2002-03-04 Akim Demaille <akim@epita.fr>
11519
11520 * src/closure.c (ruleset): Be a bitset.
11521 (rulesetsize): Remove.
11522
11523 2002-03-04 Akim Demaille <akim@epita.fr>
11524
11525 * lib/bitset-int.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
11526 * lib/bitsetv.h, lib/ebitset.c, lib/ebitset.h, lib/lbitset.c,
11527 * lib/lbitset.h, lib/sbitset.c, lib/sbitset.h: New.
11528 * src/closure.c (fderives): Be an array of bitsets.
11529
11530 2002-02-28 Robert Anisko <robert@lrde.epita.fr>
11531
11532 * data/bison.c++: Merge the two generated headers. Insert a copyright
11533 notice in each output file.
11534
11535 2002-02-28 Akim Demaille <akim@epita.fr>
11536
11537 * data/bison.c++: Copy the prologue of bison.simple to fetch
11538 useful M4 definitions, such as b4_header_guard.
11539
11540 2002-02-25 Akim Demaille <akim@epita.fr>
11541
11542 * src/getargs.c (version): Give the name of the authors, and use a
11543 translator friendly scheme for the bgr
11544 copyright notice.
11545
11546 2002-02-25 Akim Demaille <akim@epita.fr>
11547
11548 * src/output.c (header_output): Remove, now handled completely via
11549 M4.
11550
11551 2002-02-25 Akim Demaille <akim@epita.fr>
11552
11553 * m4/m4.m4: New, from CVS Autoconf.
11554 * configure.in: Invoke it.
11555 * src/output.c (output_skeleton): Use its result instead of the
11556 hard coded name.
11557
11558 2002-02-25 Akim Demaille <akim@epita.fr>
11559
11560 * lib/tempname.c, lib/mkstemp.c, m4/mkstemp.m4: New, stolen from
11561 Fileutils 4.1.5.
11562 * configure.in: Invoke UTILS_FUNC_MKSTEMP.
11563 * src/output.c (output_skeleton): Use mkstemp to create a real
11564 temporary file.
11565 Move the filling of `skeleton' and its muscle to...
11566 (prepare): here.
11567 (output): Move the definition of the prologue muscle to...
11568 (prepare): here.
11569 * src/system.h (DEFAULT_TMPDIR): New.
11570
11571 2002-02-14 Paul Eggert <eggert@twinsun.com>
11572
11573 Remove the support for C++ namespace cleanliness; it was
11574 causing more problems than it was curing, since it didn't work
11575 properly on some nonstandard C++ compilers. This can wait
11576 for a proper C++ parser.
11577
11578 * NEWS: Document this.
11579 * doc/bison.texinfo (Bison Parser, Debugging): Remove special mention
11580 of C++, as it's treated like C now.
11581 * src/bison.simple (YYSTD): Remove.
11582 (YYSIZE_T, YYFPRINTF, YYPARSE_PARAM_ARG, YYPARSE_PARAM_DECL):
11583 Treat C++ just like Standard C instead of trying to support
11584 namespace cleanliness.
11585
11586 2002-02-14 Akim Demaille <akim@epita.fr>
11587
11588 * tests/regression.at (else): Adjust to Andreas' change.
11589
11590 2002-02-14 Akim Demaille <akim@epita.fr>
11591
11592 * lib/Makefile.am (EXTRA_DIST): Ship strnlen.c.
11593
11594 2002-02-13 Andreas Schwab <schwab@suse.de>
11595
11596 * src/output.c (output_rule_data): Don't output NULL, it might
11597 not be defined yet.
11598
11599 2002-02-11 Robert Anisko <robert@lrde.epita.fr>
11600
11601 * data/bison.c++ (YYDEBUG, YYERROR_VERBOSE): After the prologue.
11602 (Copyright notice): Update.
11603
11604 2002-02-11 Akim Demaille <akim@epita.fr>
11605
11606 * tests/regression.at (%nonassoc and eof): Don't include
11607 nonportable headers.
11608
11609 2002-02-08 Robert Anisko <robert@lrde.epita.fr>
11610
11611 * data/bison.c++: Correct error recovery. Make the user able to
11612 initialize the starting location.
11613
11614 2002-02-07 Akim Demaille <akim@epita.fr>
11615
11616 * tests/input.at: New.
11617
11618 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
11619
11620 * data/bison.c++: Replace some direct m4 expansions by constants. Be
11621 more consistent when naming methods and variables. Put preprocessor
11622 directives around tables only needed for debugging.
11623
11624 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
11625
11626 * data/bison.c++ (yy::b4_name::print_): New method, replaces yyprint in
11627 C++ parsers.
11628 (yy::b4_name::parse): Use print_.
11629
11630 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
11631
11632 * data/bison.c++ (yy::b4_name::parse): Error recovery is back.
11633
11634 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
11635
11636 * data/bison.c++ (yy::b4_name::error_): New method, replaces yyerror in
11637 C++ parsers.
11638 (yy::b4_name::parse): Build verbose error messages, and use error_.
11639
11640 2002-02-06 Robert Anisko <robert@lrde.epita.fr>
11641
11642 * data/bison.c++: Fix m4 quoting in comments.
11643
11644 2002-02-06 Robert Anisko <robert@lrde.epita.fr>
11645
11646 * data/bison.c++: Adjust the parser code. Fix some muscles that were
11647 not expanded by m4.
11648
11649 2002-02-05 Akim Demaille <akim@epita.fr>
11650
11651 * data/bison.c++: Adjust to the M4 back end.
11652 More is certainly needed.
11653
11654 2002-02-05 Akim Demaille <akim@epita.fr>
11655
11656 Give a try to M4 as a back end.
11657
11658 * lib/readpipe.c: New, from wdiff.
11659 * src/Makefile.am (DEFS): Define PKGDATADIR, not BISON_SIMPLE and
11660 BISON_HAIRY.
11661 * src/system.h (BISON_HAIRY, BISON_SIMPLE): Remove the DOS and VMS
11662 specific values. Now it is m4 that performs the lookup.
11663 * src/parse-skel.y: Remove.
11664 * src/muscle_tab.c, src/muscle_tab.h (muscles_m4_output): New.
11665 * src/output.c (actions_output, guards_output)
11666 (token_definitions_output): No longer keeps track of the output
11667 line number, hence remove the second argument.
11668 (guards_output): Check against the guard member of a rule, not the
11669 action member.
11670 Adjust callers.
11671 (output_skeleton): Don't look for the skeleton location, let m4 do
11672 that.
11673 Create `/tmp/muscles.m4'. This is temporary, a proper temporary
11674 file will be used.
11675 Invoke `m4' on m4sugar.m4, muscles.m4, and the skeleton.
11676 (prepare): Given that for the time being changesyntax is not
11677 usable in M4, rename the muscles using `-' to `_'.
11678 Define `defines_flag', `output_parser_name' and `output_header_name'.
11679 * src/output.h (actions_output, guards_output)
11680 (token_definitions_output): Adjust prototypes.
11681 * src/scan-skel.l: Instead of scanning the skeletons, it now
11682 processes the output of m4: `__oline__' and `#output'.
11683 * data/bison.simple: Adjust to be used by M4(sugar).
11684 * tests/Makefile.am: Use check_SCRIPTS to make sure `bison' is up
11685 to date.
11686 * tests/bison.in: Use the secrete envvar `BISON_PKGDATADIR'
11687 instead of the dead `BISON_SIMPLE' and `BISON_HAIRY'.
11688 * data/m4sugar/m4sugar.m4, data/m4sugar/version.m4: New,
11689 shamelessly stolen from CVS Autoconf.
11690
11691 2002-02-05 Akim Demaille <akim@epita.fr>
11692
11693 * lib/hash.c, lib/hash.h: Replace with Fileutils 4.1's version.
11694 * configure.in: Check for the declarations of free and malloc.
11695 * src/muscle_tab.c: Adjust.
11696
11697 2002-02-05 Akim Demaille <akim@epita.fr>
11698
11699 * src/muscle_tab.c (muscle_init): Don't default to NULL muscle
11700 which have no values.
11701
11702 2002-02-05 Akim Demaille <akim@epita.fr>
11703
11704 * src/bison.simple, src/bison.hairy, src/bison.c++: Move to...
11705 * data/: here.
11706
11707 2002-01-29 Paul Eggert <eggert@twinsun.com>
11708
11709 * src/bison.simple (YYSIZE_T): Do not define merely because
11710 YYSTACK_USE_ALLOCA is nonzero or alloca or _ALLOCA_H are defined.
11711 On some platforms, <alloca.h> does not declare YYSTD (size_t).
11712
11713 2002-01-27 Akim Demaille <akim@epita.fr>
11714
11715 Fix `%nonassoc and eof'.
11716
11717 * src/state.c (errs_dup): Aaaah! The failure was due to bytes
11718 which were not properly copied! Replace
11719 memcpy (res->errs, src->errs, src->nerrs);
11720 with
11721 memcpy (res->errs, src->errs, src->nerrs * sizeof (src->errs[0]));
11722 !!!
11723 * tests/regression.at (%nonassoc and eof): Adjust to newest
11724 Autotest: `.' is not in the PATH.
11725
11726 2002-01-27 Akim Demaille <akim@epita.fr>
11727
11728 * tests/sets.at (AT_EXTRACT_SETS): New.
11729 (Nullable): Use it.
11730 (Firsts): New.
11731
11732 2002-01-26 Akim Demaille <akim@epita.fr>
11733
11734 * tests/actions.at, tests/calc.at, tests/headers.at,
11735 * tests/torture.at: Adjust to the newest Autotest which no longer
11736 forces `.' in the PATH.
11737
11738 2002-01-25 Akim Demaille <akim@epita.fr>
11739
11740 * tests/regression.at (%nonassoc and eof): New.
11741 Suggested by Robert Anisko.
11742
11743 2002-01-24 Akim Demaille <akim@epita.fr>
11744
11745 Bison dumps core when trying to complain about broken input files.
11746 Reported by Cris van Pelt.
11747
11748 * src/lex.c (parse_percent_token): Be sure to set token_buffer.
11749 * tests/regression.at (Invalid input: 1, Invalid input: 2): Merge
11750 into...
11751 (Invalid inputs): Strengthen: exercise parse_percent_token.
11752
11753 2002-01-24 Robert Anisko <robert.anisko@epita.fr>
11754
11755 * src/Makefile.am: Add bison.c++.
11756 * src/bison.c++: New skeleton.
11757
11758 2002-01-21 Paolo Bonzini <bonzini@gnu.org>
11759
11760 * po/it.po: New.
11761
11762 2002-01-21 Kees Zeelenberg <kzlg@users.sourceforge.net>
11763
11764 * src/files.c (skeleton_find) [MSDOS]: Fix cp definition.
11765
11766 2002-01-20 Marc Autret <marc@gnu.org>
11767
11768 * src/files.c (compute_output_file_names): Fix
11769
11770 2002-01-20 Marc Autret <marc@gnu.org>
11771
11772 * tests/output.at: New test.
11773 * src/files.c (compute_base_names): Don't map extensions when
11774 the YACC flag is set, use defaults.
11775 Reported by Evgeny Stambulchik.
11776
11777 2002-01-20 Marc Autret <marc@gnu.org>
11778
11779 * src/system.h: Need to define __attribute__ away for non-GCC
11780 compilers as well (i.e., the vendor C compiler).
11781 Suggested by Albert Chin-A-Young.
11782
11783 2002-01-11 Tim Van Holder <tim.van.holder@pandora.be>
11784
11785 * lib/hash.h, lib/hash.c: Renamed __P to PARAMS and used the
11786 canonical definition.
11787 * src/system.h: Use the canonical definition for PARAMS (avoids
11788 a conflict with the macro from lib/hash.h).
11789
11790 2002-01-11 Akim Demaille <akim@epita.fr>
11791
11792 * configure.in: Use AC_FUNC_STRNLEN.
11793 Fixes the failures observed on AIX 4.3 by H.Merijn Brand.
11794
11795 2002-01-09 Akim Demaille <akim@epita.fr>
11796
11797 * src/files.c, src/files.h (output_infix): New.
11798 (tab_extension): Remove.
11799 (compute_base_names): Compute the former, drop the latter.
11800 * src/output.c (prepare): Insert the muscles `output-infix', and
11801 `output-suffix'.
11802 * src/parse-skel.y (string, string.1): New.
11803 (section.header): Use it.
11804 (section.yacc): Remove.
11805 (prefix): Remove too.
11806 * src/scan-skel.l: Adjust.
11807 * src/bison.simple, src/bison.hairy: Adjust.
11808
11809 2002-01-09 Akim Demaille <akim@epita.fr>
11810
11811 * configure.in (WERROR_CFLAGS): Compute it.
11812 * src/Makefile.am (CFLAGS): Pass it.
11813 * tests/atlocal.in (CFLAGS): Idem.
11814 * src/files.c: Fix a few warnings.
11815 (get_extension_index): Remove, unused.
11816
11817 2002-01-08 Akim Demaille <akim@epita.fr>
11818
11819 * src/getargs.c (AS_FILE_NAME): New.
11820 (getargs): Use it to convert DOSish file names.
11821 * src/files.c (base_name): Rename as full_base_name to avoid
11822 clashes with `base_name ()'.
11823 (filename_split): New.
11824 (compute_base_names): N-th rewrite, using filename_split.
11825
11826 2002-01-08 Akim Demaille <akim@epita.fr>
11827
11828 * lib/basename.c, lib/dirname.h, lib/dirname.c, lib/memrchr.c:
11829 New, stolen from the Fileutils 4.1.
11830 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
11831 * configure.in: Check for the presence of memrchr, and of its
11832 prototype.
11833
11834 2002-01-07 Tim Van Holder <tim.van.holder@pandora.be>
11835
11836 * lib/hash.h (__P): Added definition for this macro.
11837 * src/Makefile.am: Add parse-skel.c and scan-skel.c to
11838 BUILT_SOURCES, to ensure they are generated first.
11839 * src/parse-skel.y: Use YYERROR_VERBOSE instead of
11840 %error-verbose to allow bootstrapping with bison 1.30x.
11841
11842 2002-01-06 Akim Demaille <akim@epita.fr>
11843
11844 * src/reader.c (parse_braces): Don't fetch the next char, the
11845 convention is to fetch on entry.
11846 * tests/torture.at (GNU Cim Grammar): Reintroduce their weird
11847 'switch' without a following semicolon.
11848 * tests/regression.at (braces parsing): New.
11849
11850 2002-01-06 Akim Demaille <akim@epita.fr>
11851
11852 Bison is dead wrong in its RR conflict reports.
11853
11854 * tests/torture.at (GNU Cim Grammar): New.
11855 * src/conflicts.c (count_rr_conflicts): Fix.
11856
11857 2002-01-06 Akim Demaille <akim@epita.fr>
11858
11859 Creating package.m4 from configure.ac causes too many problems.
11860
11861 * tests/Makefile.am (package.m4): Create it by hand,
11862 AC_CONFIG_TESTDIR no longer does in the most recent CVS Autoconf.
11863
11864 2002-01-06 Akim Demaille <akim@epita.fr>
11865
11866 * src/Makefile.am (bison_SOURCES): Add parse-skel.h and
11867 skeleton.h.
11868
11869 2002-01-04 Paul Eggert <eggert@twinsun.com>
11870
11871 * doc/bison.texinfo (Debugging):
11872 Remove YYSTDERR; it's no longer defined or used.
11873 Also, s/cstdio.h/cstdio/.
11874
11875 2002-01-03 Akim Demaille <akim@epita.fr>
11876
11877 * tests/bison.in, tests/atlocal.in: Adjust to CVS Autoconf.
11878
11879 2002-01-03 Akim Demaille <akim@epita.fr>
11880
11881 * src/parse-skel.y (process_skeleton): Don't bind the parser's
11882 tracing code to --trace, wait for a better --trace option, with
11883 args.
11884
11885 2002-01-03 Akim Demaille <akim@epita.fr>
11886
11887 * src/bison.simple (YYSTDERR): Remove, replace `stderr'.
11888 The ISO C++ standard is extremely clear about it: stderr is
11889 considered a macro, not a regular symbol (see table 94 `Header
11890 <cstdio> synopsis', [lib.c.files] 27.8.2 C Library files).
11891 Therefore std:: does not apply to it. It still does with fprintf.
11892 Also, s/cstdio.h/cstdio/.
11893
11894 2002-01-03 Akim Demaille <akim@epita.fr>
11895
11896 * lib/quotearg.c: Use `#include "..."' instead of `#include <...>'
11897 for non system headers.
11898
11899 2002-01-02 Akim Demaille <akim@epita.fr>
11900
11901 Equip the skeleton chain with location tracking, runtime trace,
11902 pure parser and scanner.
11903
11904 * src/parse-skel.y: Request a pure parser, locations, and prefix
11905 renaming.
11906 (%union): Having several members with the same type does not help
11907 type mismatches, simplify.
11908 (YYPRINT, yyprint): New.
11909 (yyerror): ``Rename'' (there is a #define yyerror skel_error) as...
11910 (skel_error): this.
11911 Handle locations.
11912 * src/scan-skel.l: Adjust to these changes.
11913 * src/skeleton.h (LOCATION_RESET, LOCATION_LINES, LOCATION_STEP)
11914 (LOCATION_PRINT, skel_control_t): New.
11915
11916 2001-12-30 Akim Demaille <akim@epita.fr>
11917
11918 * src/parse-skel.y: Get rid of the shift/reduce conflict:
11919 replace `gb' with BLANKS.
11920 * src/scan-skel.l: Adjust.
11921
11922 2001-12-30 Akim Demaille <akim@epita.fr>
11923
11924 * src/system.h: We don't need nor want bcopy.
11925 Throw away MS-DOS crap: we don't need getpid.
11926 * configure.in: We don't need strndup. It was even causing
11927 problems: because Flex includes the headers *before* us,
11928 _GNU_SOURCE is not defined by config.h, and therefore strndup was
11929 not visible.
11930 * lib/xstrndup.c: New.
11931 * src/scan-skel.l: Use it.
11932 Be sure to initialize yylval.muscle member when scanning a MUSCLE.
11933 * src/parse-skel.y: Use %directives instead of #defines.
11934
11935 2001-12-30 Akim Demaille <akim@epita.fr>
11936
11937 * src/skeleton.h: New.
11938 * src/output.c (output_parser, output_master_parser): Remove, dead
11939 code.
11940 * src/output.h (get_lines_number, actions_output, guards_output)
11941 (token_definitions_output): Prototype them.
11942 * src/parse-skel.y: Add the license notice.
11943 Include output.h and skeleton.h.
11944 (process_skeleton): Returns void, and takes a single parameter.
11945 * src/scan-skel.l: Add the license notice.
11946 Include skeleton.h.
11947 Don't use %option yylineno: it seems that then Flex imagines
11948 REJECT has been used, and therefore it won't reallocate its
11949 buffers (which makes no other sense to me than a bug). It results
11950 in warnings for `unused: yy_flex_realloc'.
11951
11952 2001-12-30 Robert Anisko <robert.anisko@epita.fr>
11953
11954 * src/muscle_tab.h (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
11955 (MUSCLE_INSERT_PREFIX): ...to there.
11956 * src/output.c (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
11957 (MUSCLE_INSERT_PREFIX): Move from here...
11958
11959 * src/bison.hairy: Add a section directive. Put braces around muscle
11960 names. This parser skeleton is still broken, but Bison should not
11961 choke on a bad muscle 'syntax'.
11962 * src/bison.simple: Add a section directive. Put braces around muscle
11963 names.
11964
11965 * src/files.h (strsuffix, stringappend): Add declarations.
11966 (tab_extension): Add declaration.
11967 (short_base_name): Add declaration.
11968
11969 * src/files.c (strsuffix, stringappend): No longer static. These
11970 functions are used in the skeleton parser.
11971 (tab_extension): New.
11972 (compute_base_names): Use the computations done in this function
11973 to guess if the generated parsers should have '.tab' in their
11974 names.
11975 (short_base_name): No longer static.
11976
11977 * src/output.c (output_skeleton): New.
11978 (output): Disable call to output_master_parser, and give a try to
11979 a new skeleton handling system.
11980 (guards_output, actions_output): No longer static.
11981 (token_definitions_output, get_lines_number): No longer static.
11982
11983 * configure.in: Use AM_PROG_LEX and AC_PROG_YACC.
11984
11985 * src/Makefile.am (bison_SOURCES): Add scan-skel.l and
11986 parse-skel.y.
11987
11988 * src/parse-skel.y: New file.
11989 * src/scan-skel.l: New file.
11990
11991 2001-12-29 Akim Demaille <akim@epita.fr>
11992
11993 %name-prefix is broken.
11994
11995 * src/files.c (spec_name_prefix): Initialize to NULL, not to "yy".
11996 Adjust all dependencies.
11997 * tests/headers.at (export YYLTYPE): Strengthen this test: use
11998 %name-prefix.
11999
12000 Renaming yylval but not yylloc is not consistent. Now we do.
12001
12002 * src/bison.simple: Prefix yylloc if used.
12003 * doc/bison.texinfo (Decl Summary): Document that.
12004
12005 2001-12-29 Akim Demaille <akim@epita.fr>
12006
12007 * doc/bison.texinfo: Promote `%long-directive' over
12008 `%long_directive'.
12009 Remove all references to fixed-output-files, yacc is enough.
12010
12011 2001-12-29 Akim Demaille <akim@epita.fr>
12012
12013 * src/bison.simple: Define YYDEBUG and YYERROR_VERBOSE *after* the
12014 user prologue. These are defaults.
12015 * tests/actions.at (Mid-rule actions): Make sure the user can
12016 define YYDEBUG and YYERROR_VERBOSE.
12017
12018 2001-12-29 Akim Demaille <akim@epita.fr>
12019
12020 * src/output.c (header_output): Don't forget to export YYLTYPE and
12021 yylloc.
12022 * tests/headers.at (export YYLTYPE): New, make sure it does.
12023 * tests/regression.at (%union and --defines, Invalid CPP headers):
12024 Move to...
12025 * tests/headers.at: here.
12026
12027 2001-12-29 Akim Demaille <akim@epita.fr>
12028
12029 * src/gram.h (rule_s): Member `assoc' is of type `associativity'.
12030
12031 2001-12-29 Akim Demaille <akim@epita.fr>
12032
12033 * tests/actions.at (Mid-rule actions): Output on a single line
12034 instead of several.
12035
12036 2001-12-29 Akim Demaille <akim@epita.fr>
12037
12038 * doc/bison.texinfo: Formatting changes.
12039
12040 2001-12-29 Akim Demaille <akim@epita.fr>
12041
12042 Don't store the token defs in a muscle, just be ready to output it
12043 on command. Now possible via `symbols'. Fixes a memory leak.
12044
12045 * src/output.c (token_definitions_output): New.
12046 (output_parser, header_output): Use it.
12047 * src/reader.c (symbols_save): Remove.
12048
12049 2001-12-29 Akim Demaille <akim@epita.fr>
12050
12051 * src/bison.simple: Do not provide a default for YYSTYPE and
12052 YYLTYPE before the user's prologue. Otherwise it's hardly... a
12053 default.
12054
12055 2001-12-29 Akim Demaille <akim@epita.fr>
12056
12057 Mid-rule actions are simply... ignored!
12058
12059 * src/reader.c (readgram): Be sure to attach mid-rule actions to
12060 the empty-rule associated to the dummy symbol, not to the host
12061 rule.
12062 * tests/actions.at (Mid-rule actions): New.
12063
12064 2001-12-29 Akim Demaille <akim@epita.fr>
12065
12066 Memory leak.
12067
12068 * src/reader.c (reader): Free grammar.
12069
12070 2001-12-29 Akim Demaille <akim@epita.fr>
12071
12072 Memory leak.
12073
12074 * src/LR0.c (new_itemsets): Don't allocate `shift_symbol' here,
12075 since it allocates it for each state, although only one is needed.
12076 (allocate_storage): Do it here.
12077
12078 2001-12-29 Akim Demaille <akim@epita.fr>
12079
12080 * src/options.h, src/options.c (create_long_option_table): Rename
12081 as...
12082 (long_option_table_new): this, with a clearer prototype.
12083 (percent_table): Remove, unused,
12084 * src/getargs.c (getargs): Adjust.
12085
12086 2001-12-29 Akim Demaille <akim@epita.fr>
12087
12088 * src/LR0.c, src/conflicts.c, src/lalr.c, src/lalr.h, src/output.c
12089 * src/print.c, src/print_graph.c, src/state.h: Rename state_table
12090 as states.
12091
12092 2001-12-29 Akim Demaille <akim@epita.fr>
12093
12094 * src/lalr.c (build_relations): Rename `states' as `states1'.
12095 Sorry, I don't understand exactly what it is, no better name...
12096
12097 2001-12-29 Akim Demaille <akim@epita.fr>
12098
12099 * src/closure.c, src/conflicts.c, src/derives.c, src/gram.c
12100 * src/gram.h, src/lalr.c, src/nullable.c, src/output.c, src/print.c
12101 * src/print_graph.c, src/reader.c, src/reduce.c: Rename rule_table
12102 as rules.
12103
12104 2001-12-29 Akim Demaille <akim@epita.fr>
12105
12106 * src/gram.c (rprec, rprecsym, rassoc): Remove, unused since long
12107 ago.
12108
12109 2001-12-29 Akim Demaille <akim@epita.fr>
12110
12111 * src/reader.c, src/reader.h (user_toknums): Remove.
12112 Adjust all users to use symbols[i]->user_token_number.
12113
12114 2001-12-29 Akim Demaille <akim@epita.fr>
12115
12116 * src/gram.c, src/gram.h (sprec, sassoc): Remove.
12117 Adjust all users to use symbols[i]->prec or ->assoc.
12118
12119 2001-12-29 Akim Demaille <akim@epita.fr>
12120
12121 * src/reader.c, src/reader.h (tags): Remove.
12122 Adjust all users to use symbols[i]->tag.
12123
12124 2001-12-29 Akim Demaille <akim@epita.fr>
12125
12126 * src/gram.h, src/gram.c (symbols): New, similar to state_table
12127 and rule_table.
12128 * src/reader.c (packsymbols): Fill this table.
12129 Drop sprec.
12130 * src/conflicts.c (resolve_sr_conflict): Adjust.
12131 * src/reduce.c (reduce_grammar): Adjust: just sort symbols, a
12132 single table.
12133 Use symbols[i]->tag instead of tags[i].
12134
12135 2001-12-29 Akim Demaille <akim@epita.fr>
12136
12137 * tests/calc.at (_AT_DATA_CALC_Y): Also use %union.
12138 In addition, put a comment in there, to replace...
12139 * tests/regression.at (%union and C comments): Remove.
12140
12141 2001-12-29 Akim Demaille <akim@epita.fr>
12142
12143 * tests/regression.at (Web2c Actions): Blindly move the actual
12144 output as expected output. The contents *seem* right to me, but I
12145 can't pretend reading perfectly parser tables... Nonetheless, all
12146 the other tests pass correctly, the table look OK, even though the
12147 presence of `$axiom' is to be noted: AFAICS it is useless (but
12148 harmless).
12149
12150 2001-12-29 Akim Demaille <akim@epita.fr>
12151
12152 * src/reader.c (readgram): Don't add the rule 0 if there were no
12153 rules read. In other words, add it _after_ having performed
12154 grammar sanity checks.
12155 Fixes the `tests/regression.at (Invalid input: 1)' Failure.
12156
12157 2001-12-29 Akim Demaille <akim@epita.fr>
12158
12159 * tests/regression.at (Web2c Report): Catch up: the rule 0 is now
12160 visible, and some states have now a different number.
12161
12162 2001-12-29 Akim Demaille <akim@epita.fr>
12163
12164 * src/reader.c (readgram): Bind the initial rule's lineno to that
12165 of the first rule.
12166 * tests/regression.at (Rule Line Numbers, Unresolved SR Conflicts):
12167 (Solved SR Conflicts): Adjust rule 0's line number.
12168
12169 2001-12-29 Akim Demaille <akim@epita.fr>
12170
12171 Fix the `GAWK Grammar' failure.
12172
12173 * src/LR0.c (final_state): Initialize to -1 so that we do compute
12174 the reductions of the first state which was mistakenly confused
12175 with the final state because precisely final_state was initialized
12176 to 0.
12177 * tests/sets.at (Nullable): Adjust: state 0 does have lookaheads,
12178 now noticed by Bison.
12179 * tests/regression.at (Rule Line Numbers): Adjust: state 0 does
12180 have a reduction on $default.
12181
12182 2001-12-29 Akim Demaille <akim@epita.fr>
12183
12184 * src/gram.c (ritem_print): Be sure to subtract 1 when displaying
12185 rule line numbers.
12186 * src/closure.c (print_closure): Likewise.
12187 * src/derives.c (print_derives): Likewise.
12188 * tests/sets.at (Nullable): Adjust: the rule numbers are correct
12189 now.
12190
12191 2001-12-29 Akim Demaille <akim@epita.fr>
12192
12193 * src/lalr.c (lookaheads_print): New.
12194 (lalr): Call it when --trace-flag.
12195 * tests/sets.at (Nullable): Adjust: when tracing, the lookaheads
12196 are dumped.
12197
12198 2001-12-29 Akim Demaille <akim@epita.fr>
12199
12200 * src/derives.c (print_derives): Be sure to use `>= 0', not `> 0',
12201 when walking through ritem, even via rule->rhs.
12202 * src/reduce.c (dump_grammar, useful_production, reduce_output)
12203 (useful_production, useless_nonterminals): Likewise.
12204 (reduce_grammar_tables): Likewise, plus update nritems.
12205 * src/nullable.c (set_nullable): Likewise.
12206 * src/lalr.c (build_relations): Likewise.
12207 * tests/sets.at (Nullable): Adjust.
12208 Fortunately, now, the $axiom is no longer nullable.
12209
12210 2001-12-29 Akim Demaille <akim@epita.fr>
12211
12212 * src/LR0.c (generate_states): Use nritems, not nitems, nor using
12213 the 0-sentinel.
12214 * src/gram.c (ritem_longest_rhs): Likewise.
12215 * src/reduce.c (nonterminals_reduce): Likewise.
12216 * src/print_graph.c (print_graph): Likewise.
12217 * src/output.c (output_rule_data): Likewise.
12218 * src/nullable.c (set_nullable): Likewise.
12219
12220 2001-12-29 Akim Demaille <akim@epita.fr>
12221
12222 * src/output.c: Comment changes.
12223
12224 2001-12-27 Paul Eggert <eggert@twinsun.com>
12225
12226 * src/bison.simple (YYSTACK_ALLOC, YYSIZE_T): Remove special
12227 cases for non-GNU systems like AIX, HP-UX, SGI, Sun, and
12228 Sparc, as they were causing more porting problems than the
12229 (minor) performance improvement was worth.
12230
12231 Also, catch up with 1.31's YYSTD.
12232
12233 2001-12-27 Akim Demaille <akim@epita.fr>
12234
12235 * src/output.c (output_gram): Rely on nritems, not the
12236 0-sentinel. See below.
12237 Use -1 as separator, not 0.
12238 * src/bison.simple (yyparse): Subtract 1 to the rule numbers.
12239 Rely on -1 as separator in yyrhs, instead of 0.
12240 * tests/calc.at (AT_CHECK_CALC): Now, the parsers no longer issue
12241 twice `Now at end of input', therefore there are two lines less to
12242 expect.
12243
12244 2001-12-27 Akim Demaille <akim@epita.fr>
12245
12246 * tests/regression.at (Unresolved SR Conflicts):
12247 (Solved SR Conflicts, Rule Line Numbers): Adjust to the changes
12248 below.
12249
12250 2001-12-27 Akim Demaille <akim@epita.fr>
12251
12252 * src/LR0.c (new_state): Recognize the final state by the fact it
12253 is reached by eoftoken.
12254 (insert_start_shifting_state, insert_eof_shifting_state)
12255 (insert_accepting_state, augment_automaton): Remove, since now
12256 these states are automatically computed from the initial state.
12257 (generate_states): Adjust.
12258 * src/print.c: When reporting a rule number to the user, substract
12259 1, so that the axiom rule is rule 0, and the first user rule is 1.
12260 * src/reduce.c: Likewise.
12261 * src/print_graph.c (print_core): For the time being, just as for
12262 the report, depend upon --trace-flags to dump the full set of
12263 items.
12264 * src/reader.c (readgram): Once the grammar read, insert the rule
12265 0: `$axiom: START-SYMBOL $'.
12266 * tests/set.at: Adjust: rule 0 is now displayed, and since the
12267 number of the states has changed (the final state is no longer
12268 necessarily the last), catch up.
12269
12270 2001-12-27 Akim Demaille <akim@epita.fr>
12271
12272 Try to make the use of the eoftoken valid. Given that its value
12273 is 0 which was also used as a sentinel in ritem, (i) make sure >= 0
12274 is used instead of > 0 where appropriate, (ii), depend upon nritems
12275 instead of the 0-sentinel.
12276
12277 * src/gram.h, src/gram.c (nritems): New.
12278 Expected to be duplication of nitems, but for the time being...
12279 * src/reader.c (packgram): Assert nritems and nitems are equal.
12280 * src/LR0.c (allocate_itemsets, new_itemsets): Adjust.
12281 * src/closure.c (print_closure, print_fderives): Likewise.
12282 * src/gram.c (ritem_print): Likewise.
12283 * src/print.c (print_core, print_grammar): Likewise.
12284 * src/print_graph.c: Likewise.
12285
12286 2001-12-27 Akim Demaille <akim@epita.fr>
12287
12288 * src/main.c (main): If there are complains after grammar
12289 reductions, then output the report anyway if requested, then die.
12290 * src/symtab.c (bucket_new): Initialize `value' to -1, not 0.
12291 * src/reader.c (eoftoken): New.
12292 (parse_token_decl): If the token being defined has value `0', it
12293 is the eoftoken.
12294 (packsymbols): No longer hack `tags' to insert `$' by hand.
12295 Be sure to preserve the value of the eoftoken.
12296 (reader): Make sure eoftoken is defined.
12297 Initialize nsyms to 0: now eoftoken is created just like the others.
12298 * src/print.c (print_grammar): Don't special case the eof token.
12299 * src/regression.at: Adjust: `$' has value 0, not -1, which was a
12300 lie anyway, albeit pleasant.
12301 * tests/calc.at: Exercise error messages with eoftoken.
12302 Change the grammar so that empty input is invalid.
12303 Adjust expectations.
12304 When yyungeting, be sure to use a valid yylloc: use last_yylloc.
12305
12306 2001-12-27 Akim Demaille <akim@epita.fr>
12307
12308 * configure.in: Check the protos of strchr ans strspn.
12309 Replace strchr if needed.
12310 * src/system.h: Provide the protos of strchr, strspn and memchr if
12311 missing.
12312 * lib/strchr.c: New.
12313 * src/reader.c (symbols_save): Use strchr.
12314
12315 2001-12-27 Akim Demaille <akim@epita.fr>
12316
12317 * src/print.c, src/print_graph.c (escape): New.
12318 Use it to quote the TAGS outputs.
12319 * src/print_graph.c (print_state): Now errors are in red, and
12320 reductions in green.
12321 Prefer high to wide: output the state number on a line of its own.
12322
12323 2001-12-27 Akim Demaille <akim@epita.fr>
12324
12325 * src/state.h, src/state.c (reductions_new): New.
12326 * src/LR0.c (set_state_table): Let all the states have a
12327 `reductions', even if reduced to 0.
12328 (save_reductions): Adjust.
12329 * src/lalr.c (initialize_LA, initialize_lookaheads): Adjust.
12330 * src/print.c (print_reductions, print_actions): Adjust.
12331 * src/output.c (action_row): Adjust.
12332
12333 2001-12-27 Akim Demaille <akim@epita.fr>
12334
12335 * src/state.h, src/state.c (errs_new, errs_dup): New.
12336 * src/LR0.c (set_state_table): Let all the states have an errs,
12337 even if reduced to 0.
12338 * src/print.c (print_errs, print_reductions): Adjust.
12339 * src/output.c (output_actions, action_row): Adjust.
12340 * src/conflicts.c (resolve_sr_conflict): Adjust.
12341
12342 2001-12-27 Akim Demaille <akim@epita.fr>
12343
12344 * src/lalr.c (set_goto_map, initialize_F): Use SHIFT_SYMBOL.
12345
12346 2001-12-27 Akim Demaille <akim@epita.fr>
12347
12348 * src/conflicts.c, src/conflicts.h (print_reductions): Move to...
12349 * src/print.c: here.
12350 (lookaheadset, shiftset): New, used as additional storage by
12351 print_reductions.
12352 (print_results): Adjust.
12353 (print_shifts, print_gotos, print_errs): New, extracted from...
12354 (print_actions): here.
12355 * src/print_graph.c (print_actions): Remove dead code.
12356
12357 2001-12-27 Akim Demaille <akim@epita.fr>
12358
12359 * src/reader.c (copy_dollar, copy_at): Better checking of `n' in
12360 `$n' and `@n'.
12361
12362 2001-12-27 Akim Demaille <akim@epita.fr>
12363
12364 * src/lalr.c (add_lookback_edge): Use state_t instead of ints.
12365 (build_relations): Adjust.
12366
12367 2001-12-27 Akim Demaille <akim@epita.fr>
12368
12369 * src/lalr.c (set_goto_map): Remove a wrong but benign loop
12370 duplication.
12371
12372 2001-12-27 Akim Demaille <akim@epita.fr>
12373
12374 * src/reader.c (packgram): Catch nitems overflows.
12375
12376 2001-12-27 Akim Demaille <akim@epita.fr>
12377
12378 * src/files.c, src/files.h (guard_obstack): Remove.
12379 * src/output.c (output): Adjust.
12380 * src/reader.c (parse_braces): New, factoring...
12381 (copy_action, copy_guard): these two which are renamed as...
12382 (parse_action, parse_guard): these.
12383 As a voluntary consequence, using braces around guards is now
12384 mandatory.
12385
12386 2001-12-27 Akim Demaille <akim@epita.fr>
12387
12388 * src/gram.h (rule_t): `guard' and `guard_line' are new members.
12389 * src/reader.c (symbol_list): `guard' and `guard_line' are new
12390 members.
12391 (symbol_list_new): Adjust.
12392 (copy_action): action_line is the first line, not the last.
12393 (copy_guard): Just as for actions, store the `action' only, not
12394 the switch/case/break flesh.
12395 Don't parse the user action that might follow the guard, let...
12396 (readgram): do it, i.e., now, there can be an action after a
12397 guard.
12398 In other words the guard is just explicitly optional.
12399 (packgram): Adjust.
12400 * src/output.c (guards_output): New.
12401 (output_parser): Call it when needed.
12402 (output): Also free the guard and attrs obstacks.
12403 * src/files.c, src/files.h (obstack_save): Remove.
12404 (output_files): Remove.
12405 As a result, if one needs the former `.act' file, using an
12406 appropriate skeleton which requires actions and guards is now
12407 required.
12408 * src/main.c (main): Adjust.
12409 * tests/semantic.at: New.
12410 * tests/regression.at: Use `input.y' as input file name.
12411 Avoid 8+3 problems by requiring input.c when the test needs the
12412 parser.
12413
12414 2001-12-27 Akim Demaille <akim@epita.fr>
12415
12416 * src/reader.c (symbol_list_new): Be sure to initialize all the
12417 fields.
12418
12419 2001-12-27 Akim Demaille <akim@epita.fr>
12420
12421 All the hacks using a final pseudo state are now useless.
12422
12423 * src/LR0.c (set_state_table): state_table holds exactly nstates.
12424 * src/lalr.c (nLA): New.
12425 (initialize_LA, compute_lookaheads, initialize_lookaheads): Use it
12426 instead of lookaheadsp from the pseudo state (nstate + 1).
12427
12428 2001-12-27 Akim Demaille <akim@epita.fr>
12429
12430 * src/output.c (action_row, token_actions): Use a state_t instead
12431 of a integer, and nlookaheads instead of the following state's
12432 lookaheadsp.
12433
12434 2001-12-27 Akim Demaille <akim@epita.fr>
12435
12436 * src/conflicts.c (log_resolution, flush_shift)
12437 (resolve_sr_conflict, set_conflicts, solve_conflicts)
12438 (count_sr_conflicts, count_rr_conflicts, conflicts_output)
12439 (conflicts_print, print_reductions): Use a state_t instead of an
12440 integer when referring to a state.
12441 As much as possible, depend upon nlookaheads, instead of the
12442 `lookaheadsp' member of the following state (since lookaheads of
12443 successive states are successive, the difference between state n + 1
12444 and n served as the number of lookaheads for state n).
12445 * src/lalr.c (add_lookback_edge): Likewise.
12446 * src/print.c (print_core, print_actions, print_state)
12447 (print_results): Likewise.
12448 * src/print_graph.c (print_core, print_actions, print_state)
12449 (print_graph): Likewise.
12450 * src/conflicts.h: Adjust.
12451
12452 2001-12-27 Akim Demaille <akim@epita.fr>
12453
12454 * src/bison.hairy: Formatting/comment changes.
12455 ANSIfy.
12456 Remove `register' indications.
12457 Add plenty of `static'.
12458
12459 2001-12-27 Akim Demaille <akim@epita.fr>
12460
12461 * src/output.c (prepare): Drop the muscle `ntbase' which
12462 duplicates ntokens.
12463 * src/bison.simple: Formatting/comment changes.
12464 Use YYNTOKENS only, which is documented, but not YYNTBASE, which
12465 is an undocumented synonym.
12466
12467 2001-12-22 Akim Demaille <akim@epita.fr>
12468
12469 * src/output.c (output_table_data): Change the prototype to use
12470 `int' for array ranges: some invocations do pass an int, not a
12471 short.
12472 Reported by Wayne Green.
12473
12474 2001-12-22 Akim Demaille <akim@epita.fr>
12475
12476 Some actions of web2c.y are improperly triggered.
12477 Reported by Mike Castle.
12478
12479 * src/lalr.c (traverse): s/F (i)[k] = F (j)[k]/F (j)[k] = F (i)[k]/.
12480 * tests/regression.at (Web2c): Rename as...
12481 (Web2c Report): this.
12482 (Web2c Actions): New.
12483
12484 2001-12-22 Akim Demaille <akim@epita.fr>
12485
12486 Reductions in web2c.y are improperly reported.
12487 Reported by Mike Castle.
12488
12489 * src/conflicts.c (print_reductions): Fix.
12490 * tests/regression.at (Web2c): New.
12491
12492 2001-12-18 Akim Demaille <akim@epita.fr>
12493
12494 Some host fail on `assert (!"foo")', which expands to
12495 ((!"foo") ? (void)0 : __assert("!"foo."", __FILE__, __LINE__))
12496 Reported by Nelson Beebee.
12497
12498 * src/output.c, src/vcg.c: Replace `assert (!"it succeeded")' with
12499 `#define it_succeeded 0' and `assert (it_succeeded)'.
12500
12501 2001-12-17 Marc Autret <autret_m@epita.fr>
12502
12503 * src/bison.simple: Don't hard code the skeleton line and filename.
12504 * src/output.c (output_parser): Rename 'line' as 'output_line'.
12505 New line counter 'skeleton_line' (skeleton-line muscle).
12506
12507 2001-12-17 Paul Eggert <eggert@twinsun.com>
12508
12509 * NEWS, doc/bison.texinfo, doc/bison.1, doc/bison.rnh: Document that
12510 YYDEBUG must be defined to a nonzero value.
12511
12512 * src/bison.simple (yytname): Do not assume that the user defines
12513 YYDEBUG to a properly parenthesized expression.
12514
12515 2001-12-17 Akim Demaille <akim@epita.fr>
12516
12517 * src/state.h (state_t): Rename lookaheads as lookaheadsp.
12518 nlookaheads is a new member.
12519 Adjust all users.
12520 * src/lalr.h (nlookaheads): Remove this orphan declaration.
12521 * src/lalr.c (initialize_lookaheads): Set nlookaheads for each
12522 state.
12523
12524 2001-12-17 Akim Demaille <akim@epita.fr>
12525
12526 * src/files.h, src/files.c (open_files, close_files): Remove.
12527 * src/main.c (main): Don't open/close files, nor invoke lex_free,
12528 let...
12529 * src/reader.c (reader): Do it.
12530
12531 2001-12-17 Akim Demaille <akim@epita.fr>
12532
12533 * src/conflicts.c (print_reductions): Formatting changes.
12534
12535 2001-12-17 Akim Demaille <akim@epita.fr>
12536
12537 * src/conflicts.c (flush_shift): Also adjust lookaheadset.
12538 (flush_reduce): New.
12539 (resolve_sr_conflict): Adjust.
12540
12541 2001-12-17 Akim Demaille <akim@epita.fr>
12542
12543 * src/output.c (output_obstack): Be static and rename as...
12544 (format_obstack): this, to avoid any confusion with files.c's
12545 output_obstack.
12546 * src/reader.h (muscle_obstack): Move to...
12547 * src/output.h: here, since it's defined in output.c.
12548
12549 2001-12-17 Akim Demaille <akim@epita.fr>
12550
12551 * src/output.c (action_row, save_column, default_goto)
12552 (sort_actions, matching_state, pack_vector): Better variable
12553 locality.
12554
12555 2001-12-17 Akim Demaille <akim@epita.fr>
12556
12557 * src/output.c: Various formatting changes.
12558
12559 2001-12-17 Akim Demaille <akim@epita.fr>
12560
12561 * src/files.c (output_files): Free the output_obstack.
12562 * src/main.c (main): Call print and print_graph conditionally.
12563 * src/print.c (print): Work unconditionally.
12564 * src/print_graph.c (print_graph): Work unconditionally.
12565 * src/conflicts.c (log_resolution): Output only if verbose_flag.
12566
12567 2001-12-16 Marc Autret <autret_m@epita.fr>
12568
12569 * src/output.c (actions_output): Fix. When we use %no-lines,
12570 there is one less line per action.
12571
12572 2001-12-16 Marc Autret <autret_m@epita.fr>
12573
12574 * src/bison.simple: Remove a useless #line directive.
12575 s/#line %%line %%skeleton/#line %%line "%%parser-file-name"/'.
12576 * src/output.c (get_lines_number): New.
12577 (output_parser): Adjust, now takes care about the lines of a
12578 output muscles.
12579 Fix line numbering.
12580 (actions_output): Computes the number of lines taken by actions.
12581 (output_master_parser): Insert new skeleton which is the name of
12582 the output parser file name.
12583
12584 2001-12-15 Marc Autret <autret_m@epita.fr>
12585
12586 * src/bison.simple [YYERROR_VERBOSE]: Restore backward compatibility.
12587
12588 2001-12-15 Marc Autret <autret_m@epita.fr>
12589
12590 * src/output.c (output_gram): Keep track of the hairy one.
12591
12592 2001-12-15 Akim Demaille <akim@epita.fr>
12593
12594 Make `make distcheck' work.
12595
12596 * lib/Makefile.am (INCLUDES): Add top_srcdir/intl, since hash uses
12597 system.h which uses libgettext.h.
12598
12599 2001-12-15 Akim Demaille <akim@epita.fr>
12600
12601 * src/nullable.c (set_nullable): Useless rules must be skipped,
12602 otherwise, since we range over their symbols, we might look at a
12603 nonterminal which no longer ``exists'', i.e., it is not counted in
12604 `nvars', hence we overflow our arrays.
12605
12606 2001-12-15 Akim Demaille <akim@epita.fr>
12607
12608 The header can also be produced directly, without any obstack!
12609 Yahoo!
12610
12611 * src/files.c, src/files.h (defines_obstack): Remove.
12612 (compute_header_macro): Global.
12613 (defines_obstack_save): Remove.
12614 * src/reader.c (parse_union_decl): No longer output to
12615 defines_obstack: its content can be found in the `stype' muscle
12616 anyway.
12617 (output_token_translations): Merge into...
12618 (symbols_output): this.
12619 Rename as...
12620 (symbols_save): this.
12621 (reader): Adjust.
12622 * src/output.c (header_output): New.
12623 (output): Call it.
12624
12625 2001-12-15 Akim Demaille <akim@epita.fr>
12626
12627 * src/reader.c (parse_union_decl): Instead of handling two obstack
12628 simultaneously, use one to define the `stype' muscle, and use the
12629 value of the latter to fill defines_obstack.
12630 (copy_comment): Remove.
12631 (copy_comment2): Work for a single obstack.
12632 Rename as...
12633 (copy_comment): this.
12634
12635 2001-12-15 Akim Demaille <akim@epita.fr>
12636
12637 * src/lex.c, src/lex.h (xgetc): No longer static.
12638 * src/reader.c (parse_union_decl): Revamp.
12639
12640 2001-12-15 Akim Demaille <akim@epita.fr>
12641
12642 Still making progress in separating Bison into (i) input, (ii)
12643 process, (iii) output: now we can directly output the parser file
12644 without using table_obstack at all.
12645
12646 * src/files.c, src/files.h (table_obstack): Bye bye.
12647 (parser_file_name): New.
12648 * src/files.c (compute_output_file_names): Compute it.
12649 * src/output.c (actions_output, output_parser)
12650 (output_master_parser): To a file instead of an obstack.
12651
12652 2001-12-15 Akim Demaille <akim@epita.fr>
12653
12654 Attach actions to rules, instead of pre-outputting them to
12655 actions_obstack.
12656
12657 * src/gram.h (rule_t): action and action_line are new members.
12658 * src/reader.c (symbol_list): Likewise.
12659 (copy_action): Save the actions within the rule.
12660 (packgram): Save them in rule_table.
12661 * src/output.c (actions_output): New.
12662 (output_parser): Use it on `%%actions'.
12663 (output_rule_data): Don't free rule_table.
12664 (output): Do it.
12665 (prepare): Don't save the `action' muscle.
12666 * src/bison.simple: s/%%action/%%actions/.
12667
12668 2001-12-15 Akim Demaille <akim@epita.fr>
12669
12670 * src/reader.c (copy_action): When --yacc, don't append a `;'
12671 to the user action: let it fail if lacking.
12672 Suggested by Arnold Robbins and Tom Tromey.
12673
12674 2001-12-14 Akim Demaille <akim@epita.fr>
12675
12676 * src/lex.c (literalchar): Simply return the char you decoded, non
12677 longer mess around with obstacks and int pointers.
12678 Adjust all callers.
12679
12680 2001-12-14 Akim Demaille <akim@epita.fr>
12681
12682 * src/lex.c (literalchar): Don't escape the special characters,
12683 just decode them, and keep them as char (before, eol was output as
12684 the 2 char string `\n' etc.).
12685 * src/output.c (output_rule_data): Use quotearg to output the
12686 token strings.
12687
12688 2001-12-13 Paul Eggert <eggert@twinsun.com>
12689
12690 * src/bison.simple (YYSIZE_T, YYSTACK_ALLOC, YYSTACK_FREE):
12691 Do not infringe on the global user namespace when using C++.
12692 (YYFPRINTF, YYSTDERR): New macros, needed for the above.
12693 All uses of `fprintf' and `stderr' changed.
12694
12695 * doc/bison.texinfo: Document YYFPRINTF, YYSTDERR.
12696
12697 2001-12-13 Akim Demaille <akim@epita.fr>
12698
12699 The computation of nullable is broken: it doesn't handle empty
12700 RHS's properly.
12701
12702 * tests/torture.at (GNU AWK Grammar): New.
12703 * tests/sets.at (Nullable): New.
12704 * src/nullable.c (set_nullable): Instead of blindly looping over
12705 `ritems', loop over the rules, and then over their rhs's.
12706
12707 Work around Autotest bugs.
12708
12709 * src/warshall.c (bitmatrix_print): Don't use `+--+' as table
12710 frame, because Autotest understand lines starting with a `+' as
12711 traces from the shell. Then, they are not processed properly.
12712 Admittedly an Autotest bug, but we don't have time to wait for
12713 Autotest to catch up.
12714 * tests/regression.at (Broken Closure): Adjust to the new table
12715 frames.
12716 Move to...
12717 * tests/sets.at: here.
12718
12719 2001-12-13 Akim Demaille <akim@epita.fr>
12720
12721 * src/closure.c (closure): Use nrules instead of playing tricks
12722 with BITS_PER_WORD.
12723
12724 2001-12-13 Akim Demaille <akim@epita.fr>
12725
12726 * src/print.c (print_actions): Output the handling of `$' as the
12727 traces do: shifting the token EOF. Before EOF was treated as a
12728 nonterminal.
12729 * tests/regression.at: Adjust some tests.
12730 * src/print_graph.c (print_core): Complete the set of items via
12731 closure. The next-to-final and final states are still unsatisfying,
12732 but that's to be addressed elsewhere.
12733 No longer output the rule numbers, but do output the state number.
12734 A single loop for the shifts + gotos is enough, but picked a
12735 distinct color for each.
12736 (print_graph): Initialize and finalize closure.
12737
12738 2001-12-13 Akim Demaille <akim@epita.fr>
12739
12740 * src/reader.c (readgram): Remove dead code, an strip useless
12741 braces.
12742 (get_type): Remove, unused.
12743
12744 2001-12-12 Akim Demaille <akim@epita.fr>
12745
12746 * src/complain.h, src/complain.c: Remove error_one_per_line, rely
12747 on that of lib/error.c.
12748
12749 2001-12-12 Akim Demaille <akim@epita.fr>
12750
12751 Some hosts don't like `/' in includes.
12752
12753 * src/system.h: Include libgettext.h without qualifying the path.
12754 * src/Makefile.am (INCLUDES): Add $(top_srcdir)/intl, remove
12755 $(top_srcdir).
12756
12757 2001-12-11 Marc Autret <autret_m@epita.fr>
12758
12759 * src/output.c (output_parser): Remove useless muscle.
12760
12761 2001-12-11 Marc Autret <autret_m@epita.fr>
12762
12763 * src/bison.simple: Remove #line just before %%epilogue. It
12764 is now handled in ...
12765 * src/reader.c (read_additionnal_code): Add the output of a
12766 #line for the epilogue.
12767
12768 2001-12-10 Marc Autret <autret_m@epita.fr>
12769
12770 * src/reader.c (copy_definition): Re-use CPP-outed code which
12771 replace precedent remove.
12772 * src/bison.simple: Remove #line before %%prologue because
12773 %%input-line is wrong at this time.
12774
12775 2001-12-10 Marc Autret <autret_m@epita.fr>
12776
12777 * src/reader.c (symbols_output): Clean up.
12778 * src/output.c (output_gram, output): Clean up.
12779
12780 2001-12-10 Akim Demaille <akim@epita.fr>
12781
12782 * src/lalr.c (initialize_lookaheads): New. Extracted from...
12783 * src/LR0.c (set_state_table): here.
12784 * src/lalr.c (lalr): Call it.
12785
12786 2001-12-10 Akim Demaille <akim@epita.fr>
12787
12788 * src/state.h (shifts): Remove the `number' member: shifts are
12789 attached to state, hence no longer need to be labelled with a
12790 state number.
12791
12792 2001-12-10 Akim Demaille <akim@epita.fr>
12793
12794 Now that states have a complete set of members, the linked list of
12795 shifts is useless: just fill directly the state's shifts member.
12796
12797 * src/state.h (shifts): Remove the `next' member.
12798 * src/LR0.c (first_state, last_state): Remove.
12799 Adjust the callers.
12800 (augment_automaton): Don't look for the shifts that must be added
12801 a shift on EOF: it is those of the state we looked for! But now,
12802 since shifts are attached, it is no longer needed to looking
12803 merely by its id: its number.
12804
12805 2001-12-10 Akim Demaille <akim@epita.fr>
12806
12807 * src/LR0.c (augment_automaton): Better variable locality.
12808 Remove an impossible branch: if there is a state corresponding to
12809 the start symbol being shifted, then there is shift for the start
12810 symbol from the initial state.
12811
12812 2001-12-10 Akim Demaille <akim@epita.fr>
12813
12814 * src/LR0.c (augment_automaton): Call `insert_eof_shifting_state'
12815 only when appropriate: when insert_start_shifting_state' is not
12816 invoked.
12817 * tests/regression.at (Rule Line Numbers): Adjust.
12818
12819 2001-12-10 Akim Demaille <akim@epita.fr>
12820
12821 * src/LR0.c (augment_automaton): Now that all states have shifts,
12822 merge the two cases addition shifts to the initial state.
12823
12824 2001-12-10 Akim Demaille <akim@epita.fr>
12825
12826 * src/lalr.c (set_state_table): Move to...
12827 * src/LR0.c: here.
12828 * src/lalr.c (lalr): Don't call it...
12829 * src/LR0.c (generate_states): do it.
12830 * src/LR0.h (first_state): Remove, only the table is used.
12831
12832 2001-12-10 Akim Demaille <akim@epita.fr>
12833
12834 * src/LR0.h (first_shift, first_reduction): Remove.
12835 * src/lalr.c: Don't use first_shift: find shifts through the
12836 states.
12837
12838 2001-12-10 Akim Demaille <akim@epita.fr>
12839
12840 * src/LR0.c: Attach shifts to states as soon as they are
12841 computed.
12842 * src/lalr.c (set_state_table): Instead of assigning shifts to
12843 state, just assert that the mapping was properly done.
12844
12845 2001-12-10 Akim Demaille <akim@epita.fr>
12846
12847 * src/LR0.c (insert_start_shift): Rename as...
12848 (insert_start_shifting_state): this.
12849 (insert_eof_shifting_state, insert_accepting_state): New.
12850 (augment_automaton): Adjust.
12851 Better locality of the variables.
12852 When looking if the start_symbol is shifted from the initial
12853 state, using `while (... symbol != start_symbol ...)' sounds
12854 better than `while (... symbol < start_symbol ...)': If fail
12855 to see how the order between symbols could be relevant!
12856
12857 2001-12-10 Akim Demaille <akim@epita.fr>
12858
12859 * src/getargs.h: Don't declare `spec_name_prefix' and
12860 `spec_file_prefix', declared by src/files.h.
12861 * src/files.c, src/files.h: Default for spec_name_prefix is "yy".
12862 * src/muscle_tab.c (muscle_init): Default prefix to NULL.
12863 * src/output.c (prepare): Adjust.
12864 * src/reader.c (symbols_output): Likewise.
12865 * src/vmsgetargs.c: Vaguely adjust, but who cares?
12866
12867 2001-12-10 Akim Demaille <akim@epita.fr>
12868
12869 * src/muscle_tab.c (muscle_init): NULL is a better default than
12870 `"0"'.
12871
12872 2001-12-10 Akim Demaille <akim@epita.fr>
12873
12874 * src/reader.c (reader): Calling symbols_output once is enough.
12875
12876 2001-12-10 Akim Demaille <akim@epita.fr>
12877
12878 Now that states have a complete set of members, the linked list of
12879 reductions is useless: just fill directly the state's reductions
12880 member.
12881
12882 * src/state.h (struct reductions): Remove member `number' and
12883 `next'.
12884 * src/LR0.c (first_reduction, last_reduction): Remove.
12885 (save_reductions): Don't link the new reductions, store them in
12886 this_state.
12887 * src/lalr.c (set_state_table): No need to attach reductions to
12888 states, it's already done.
12889 * src/output.c (output_actions): No longer free the shifts, then
12890 the reductions, then the states: free all the states and their
12891 members.
12892
12893 2001-12-10 Akim Demaille <akim@epita.fr>
12894
12895 * src/options.c (OPTN, DRTV, BOTH): New.
12896 (option_table): Use them.
12897
12898 * src/muscle_tab.c: Don't include xalloc.h and string.h: that's
12899 the job of system.h.
12900 * src/options.c: Don't include stdio.h and xalloc.h for the same
12901 reasons.
12902
12903 2001-12-10 Akim Demaille <akim@epita.fr>
12904
12905 * src/output.c (output, prepare): Make sure the values of the
12906 muscles `action' and `prologue' are 0-terminated.
12907
12908 2001-12-10 Akim Demaille <akim@epita.fr>
12909
12910 Clean up GCC warnings.
12911
12912 * src/reader.c (copy_action): `buf' is not used.
12913 (parse_skel_decl): Be static.
12914 * src/muscle_tab.c (mhash1, mhash2, muscle_insert): Preserve `const'.
12915 * src/options.h (create_long_option_table): Have a real prototype.
12916 * lib/hash.c, lib/hash.h (hash_insert, hash_insert_at, hash_delete)
12917 (hash_delete_at): Return const void *.
12918 Adjust casts to preserve the const.
12919
12920 2001-12-10 Akim Demaille <akim@epita.fr>
12921
12922 * configure.in: Require 2.52g.
12923 M4 is not needed, but AUTOM4TE is.
12924 * m4/m4.m4: Remove.
12925 * tests/Makefile.am: Adjust.
12926
12927 2001-12-10 Akim Demaille <akim@epita.fr>
12928
12929 One structure for states is enough, even though theoretically
12930 there are LR(0) states and LALR(1) states.
12931
12932 * src/lalr.h (state_t): Remove.
12933 (state_table): Be state_t **, not state_t *.
12934 * src/state.h (core, CORE_ALLOC): Rename as...
12935 (state_t, STATE_ALLOC): this.
12936 Add the LALR(1) members: shifts, reductions, errs.
12937 * src/LR0.c (state_table): Rename as...
12938 (state_hash): this, to avoid name clashes with the global
12939 `state_table'.
12940 * src/print_graph.c, src/LR0.c, src/LR0.h, src/conflicts.c
12941 * src/lalr.c, src/lalr.h, src/output.c, src/print.c: Adjust.
12942
12943 2001-12-10 Akim Demaille <akim@epita.fr>
12944
12945 Bison dumps core on bash.y.
12946 Reported by Pascal Bart.
12947
12948 * src/warshall.c (bitmatrix_print): New.
12949 (TC): Use it.
12950 When performing a transitive closure R(i, j) && R(j, k) => R(i, k),
12951 j must be the outer loop.
12952 * tests/regression.at (Broken Closure): New.
12953
12954 2001-12-05 Akim Demaille <akim@epita.fr>
12955
12956 * tests/atlocal.in (CPPFLAGS): Do not leave a space between -I and
12957 its argument.
12958 Reported by Peter Hamorsky.
12959
12960 2001-12-05 Akim Demaille <akim@epita.fr>
12961
12962 * src/conflicts.c (err_table): Remove.
12963 (resolve_sr_conflict): Adjust.
12964 * src/lalr.h (state_t.reduction_table, state_t.shift_table):
12965 Rename as...
12966 (state_t.reductions, state_t.shifts): this.
12967
12968 2001-12-05 Akim Demaille <akim@epita.fr>
12969
12970 * src/reduce.c (reduce_grammar_tables): No longer disable the
12971 removal of useless rules via CPP but via `if (0)', so that the
12972 compiler still check the code is valid.
12973 For instance, it should have noticed `rline' no longer exists: use
12974 the `line' member of rule_t.
12975 * src/gram.c (dummy, rline): Remove, unused.
12976
12977 2001-12-05 Akim Demaille <akim@epita.fr>
12978
12979 * src/output.c (pack_vector): Use assert, not berror.
12980 * src/main.c (berror): Remove, unused.
12981
12982 2001-12-05 Akim Demaille <akim@epita.fr>
12983
12984 New experimental feature: if --verbose --trace output all the
12985 items of a state, not only its kernel.
12986
12987 * src/print.c (print_core): If `trace_flag', then invoke closure
12988 before outputting the items of the state (print_core is no longer
12989 a correct name them).
12990 (print_results): Invoke new_closure/free_closure if needed.
12991
12992 2001-12-05 Akim Demaille <akim@epita.fr>
12993
12994 * src/LR0.c (new_itemsets): Use nshifts only, not shiftcount.
12995 * src/closure.c, src/closure.h (itemsetsize): Rename as...
12996 (nitemset): for consistency with the rest of the project.
12997
12998 2001-12-05 Akim Demaille <akim@epita.fr>
12999
13000 * src/closure.c (print_closure): Improve.
13001 (closure): Use it for printing input and output.
13002
13003 2001-12-05 Akim Demaille <akim@epita.fr>
13004
13005 * src/closure.c (FIRSTS, FDERIVES): Adjust to reality: they are
13006 indexed by nonterminals.
13007
13008 2001-12-05 Akim Demaille <akim@epita.fr>
13009
13010 * src/warshall.c (TC, RTC): De-obsfucate (source reduced to 22% of
13011 what it was!).
13012 * src/warshall.h: Remove accidental duplication of the content.
13013
13014 2001-12-05 Akim Demaille <akim@epita.fr>
13015
13016 * src/closure.c (set_fderives): De-obfuscate.
13017
13018 2001-12-05 Akim Demaille <akim@epita.fr>
13019
13020 * src/closure.c (print_firsts, print_fderives): De-obfuscate.
13021
13022 2001-12-05 Akim Demaille <akim@epita.fr>
13023
13024 * src/closure.c (set_firsts): De-obfuscate.
13025
13026 2001-12-05 Akim Demaille <akim@epita.fr>
13027
13028 * src/output.c (action_row): De-obfuscate
13029 using the good o' techniques: arrays not pointers, variable
13030 locality, BITISSET, RESETBIT etc.
13031
13032 2001-12-05 Akim Demaille <akim@epita.fr>
13033
13034 Pessimize the code to simplify it: from now on, all the states
13035 have a valid SHIFTS, which NSHIFTS is possibly 0.
13036
13037 * src/LR0.c (shifts_new): Be global and move to..
13038 * src/state.c, src/state.h: here.
13039 * src/conflicts, src/lalr.c, src/output.c, src/print.c,
13040 * src/print_graph: Adjust.
13041
13042 2001-12-05 Akim Demaille <akim@epita.fr>
13043
13044 * src/state.h (SHIFT_DISABLE, SHIFT_IS_DISABLED): New.
13045 * src/conflicts.c: Use it.
13046 Restore a few missing `if (!SHIFT_IS_DISABLED)' which were
13047 incorrectly ``simplified''.
13048
13049 2001-12-05 Akim Demaille <akim@epita.fr>
13050
13051 * src/conflicts.c (flush_shift, resolve_sr_conflict): De-obfuscate
13052 using the good o' techniques: arrays not pointers, variable
13053 locality, BITISSET, RESETBIT etc.
13054
13055 2001-12-05 Akim Demaille <akim@epita.fr>
13056
13057 * src/state.h (SHIFT_SYMBOL): New.
13058 * src/conflicts.c: Use it to deobfuscate.
13059
13060 2001-12-05 Akim Demaille <akim@epita.fr>
13061
13062 * src/conflicts.c (count_sr_conflicts, count_rr_conflicts)
13063 (print_reductions): De-obfuscate using the good o' techniques:
13064 arrays not pointers, variable locality, BITISSET.
13065
13066 2001-12-05 Akim Demaille <akim@epita.fr>
13067
13068 * src/conflicts.c (print_reductions): Arrays, not pointers.
13069 Use BITISSET.
13070
13071 2001-12-05 Akim Demaille <akim@epita.fr>
13072
13073 * src/conflicts.c (print_reductions): Pessimize, but clarify.
13074
13075 2001-12-05 Akim Demaille <akim@epita.fr>
13076
13077 * src/conflicts.c (print_reductions): Improve variable locality.
13078
13079 2001-12-05 Akim Demaille <akim@epita.fr>
13080
13081 * src/conflicts.c (print_reductions): Pessimize, but clarify.
13082
13083 2001-12-05 Akim Demaille <akim@epita.fr>
13084
13085 * src/conflicts.c (print_reductions): Improve variable locality.
13086
13087 2001-12-05 Akim Demaille <akim@epita.fr>
13088
13089 * src/state.h (SHIFT_IS_ERROR, SHIFT_IS_GOTO, SHIFT_IS_SHIFT): New.
13090 * src/lalr.c: Use them.
13091
13092 2001-12-05 Akim Demaille <akim@epita.fr>
13093
13094 * src/LR0.c (augment_automaton): Formatting changes.
13095 Better variable locality.
13096
13097 2001-12-05 Akim Demaille <akim@epita.fr>
13098
13099 * src/lalr.c (matrix_print): New.
13100 (transpose): Use it.
13101 Use arrays instead of pointers.
13102
13103 2001-12-05 Akim Demaille <akim@epita.fr>
13104
13105 * src/lalr.c (maxrhs): Move to...
13106 * src/gram.c, src/gram.h (ritem_longest_rhs): here.
13107 * src/lalr.c (build_relations): Adjust.
13108
13109 2001-12-05 Akim Demaille <akim@epita.fr>
13110
13111 * src/lalr.c (transpose): Free the memory allocated to the
13112 argument, as it is replaced by the results by the unique caller.
13113 (build_relations): Merely invoke transpose: it handles the memory
13114 deallocation.
13115 Improve variable locality.
13116 Avoid variables used as mere abbreviations.
13117 (compute_lookaheads): Use arrays instead of pointers.
13118
13119 2001-12-05 Akim Demaille <akim@epita.fr>
13120
13121 * src/lalr.c (initialize_F): Improve variable locality.
13122 Avoid variables used as mere abbreviations.
13123
13124 2001-12-05 Akim Demaille <akim@epita.fr>
13125
13126 * src/derives.c (print_derives): Display the ruleno.
13127 * src/lalr.c (initialize_F, transpose): Better variable locality
13128 to improve readability.
13129 Avoid variables used as mere abbreviations.
13130
13131 2001-12-05 Akim Demaille <akim@epita.fr>
13132
13133 * src/lalr.c (traverse): Use arrays instead of pointers.
13134
13135 2001-12-05 Akim Demaille <akim@epita.fr>
13136
13137 * src/nullable.c (set_nullable): Use a for loop to de-obfuscate
13138 the handling of squeue.
13139 `symbol >= 0' is wrong now, use `rule_table[ruleno].useful'.
13140
13141 2001-12-05 Akim Demaille <akim@epita.fr>
13142
13143 Because useless nonterminals are now kept alive (instead of being
13144 `destroyed'), we now sometimes examine them, and store information
13145 related to them. Hence we need to know their number, and adjust
13146 memory allocations.
13147
13148 * src/reduce.c, src/reduce.h (nuseless_nonterminals): No longer
13149 static.
13150 * src/LR0.c (allocate_itemsets): The memory allocated to
13151 `symbol_count' was used for two different purpose: once to count
13152 the number of occurrences of each symbol, and later reassigned to
13153 `shift_symbol', containing the symbol that can be shifted from a
13154 given state.
13155 Deobfuscate, i.e., allocate, use and free `symbol_count' here
13156 only, and...
13157 (new_itemsets): Allocate `shift_symbol' here.
13158 (allocate_itemsets): symbol_count includes useless nonterminals.
13159 Make room for them.
13160 (free_storage): Use `free', not `XFREE', for pointers that cannot
13161 be null.
13162
13163 2001-12-05 Akim Demaille <akim@epita.fr>
13164
13165 * src/nullable.c (set_nullable): Deobfuscate the handling of
13166 ritem.
13167 `symbol >= 0' is wrong now, use `rule_table[ruleno].useful'.
13168
13169 2001-12-05 Akim Demaille <akim@epita.fr>
13170
13171 * src/gram.c, src/gram.h (ritem_print): New.
13172 * src/gram.c (dummy): Remove, now there is actual code in gram.c.
13173 (This useless function was defined only to work around VMS linkers
13174 that can't handle compilation units with variables only).
13175 * src/reduce.c (dump_grammar): Use it to trace the construction of
13176 ritem.
13177
13178 2001-12-04 Paul Eggert <eggert@twinsun.com>
13179
13180 * src/bison.simple (union yyalloc): Change member names
13181 to be the same as the stack names.
13182 (yyparse): yyptr is now union yyalloc *, not char *.
13183 (YYSTACK_RELOCATE): Likewise. This avoids a GCC warning,
13184 and may generate better code on some machines.
13185 (yystpcpy): Use prototype if __STDC__ is defined, not just
13186 if __cplusplus is defined.
13187
13188 2001-11-30 Akim Demaille <akim@epita.fr>
13189
13190 * configure.in (WARNING_CFLAGS): Add -Werror when possible.
13191 (CFLAGS): Do not include the WARNING_CFLAGS here, since GNU
13192 Gettext doesn't compile cleanly, and dies with -Werror.
13193 * src/Makefile.am, lib/Makefile.am, tests/atlocal.in (CFLAGS):
13194 Include WARNING_CFLAGS here.
13195 * lib/xstrdup.c: Include xalloc.h, so that xstrdup be declared
13196 before being defined.
13197
13198 2001-11-27 Paul Eggert <eggert@twinsun.com>
13199
13200 * lib/quotearg.h (quotearg_n, quotearg_n_style):
13201 First arg is int, not unsigned.
13202 * lib/quotearg.c (quotearg_n, quotearg_n_style): Likewise.
13203 (SIZE_MAX, UINT_MAX): New macros.
13204 (quotearg_n_options): Abort if N is negative.
13205 Avoid overflow check on hosts where size_t is 64 bits and int
13206 is 32 bits, as overflow is impossible there.
13207 Fix off-by-one typo that caused unnecessary reallocation.
13208
13209 2001-11-29 Paul Eggert <eggert@twinsun.com>
13210
13211 Name space cleanup in generated parser.
13212
13213 * doc/bison.texinfo (Bison Parser): Discuss system headers
13214 and their effect on the user name space.
13215
13216 * src/bison.simple:
13217 (YYSTACK_ALLOC, YYSTACK_FREE, union yyalloc, YYSTACK_GAP_MAX,
13218 YYSTACK_BYTES, YYSTACK_RELOCATE): Do not define unless necessary,
13219 i.e. unless ! defined (yyoverflow) || defined (YYERROR_VERBOSE).
13220
13221 (YYSIZE_T): New macro. Use it instead of size_t, to avoid infringing
13222 on user names when possible.
13223
13224 (YYSTACK_USE_ALLOCA): Do not define; just use any existing defn.
13225 Simplify test for whather <alloca.h> exists.
13226
13227 (<stdlib.h>): Include if we will use malloc, and if standard C or C++.
13228
13229 (<stdio.h>): Include if YYDEBUG.
13230
13231 (yymemcpy): Renamed from __yy_memcpy. Do not define unless
13232 ! defined (yyoverflow) && ! defined (yymemcpy).
13233
13234 (yymemcpy, yyparse): Rename local variables as needed so that
13235 they all begin with 'yy'.
13236
13237 (yystrlen, yystpcpy): New functions.
13238
13239 (YY_DECL_NON_LSP_VARIABLES): Renamed from _YY_DECL_VARIABLES.
13240 All uses changed.
13241
13242 (yyparse): size_t -> YYSIZE_T. Use yystrlen and yystpcpy
13243 instead of relying on string.h functions. Use YYSTACK_ALLOC
13244 and YYSTACK_FREE instead of malloc and free.
13245
13246 2001-11-30 Akim Demaille <akim@epita.fr>
13247
13248 * src/bison.simple (YYSTYPE, YYLTYPE): Move their definitions
13249 before their first uses.
13250 (YYBISON, YYPURE): Move to the top of the output.
13251
13252 2001-11-30 Akim Demaille <akim@epita.fr>
13253
13254 * tests/reduce.at (Useless Nonterminals): Fix.
13255
13256 2001-11-30 Akim Demaille <akim@epita.fr>
13257
13258 * src/bison.simple (YYSTACK_FREE): Use `do {;} while (0)' as empty
13259 if body instead of `;' to pacify GCC's warnings.
13260
13261 2001-11-30 Akim Demaille <akim@epita.fr>
13262
13263 Instead of mapping the LHS of unused rules to -1, keep the LHS
13264 valid, but flag the rules as invalid.
13265
13266 * src/gram.h (rule_t): `useful' is a new member.
13267 * src/print.c (print_grammar): Adjust.
13268 * src/derives.c (set_derives): Likewise.
13269 * src/reader.c (packgram, reduce_output): Likewise.
13270 * src/reduce.c (reduce_grammar_tables): Likewise.
13271 * tests/reduce.at (Underivable Rules, Useless Rules): New.
13272
13273 2001-11-30 Akim Demaille <akim@epita.fr>
13274
13275 * src/reduce.c (reduce_output): Formatting changes.
13276 * src/print.c (print_results, print_grammar): Likewise.
13277 * tests/regression.at (Rule Line Numbers)
13278 (Solved SR Conflicts, Unresolved SR Conflicts): Adjust.
13279
13280 2001-11-30 Akim Demaille <akim@epita.fr>
13281
13282 * src/reduce.c (nonterminals_reduce): Instead of throwing away
13283 useless nonterminals, move them at the end of the symbol arrays.
13284 (reduce_output): Adjust.
13285 * tests/reduce.at (Useless Nonterminals): Adjust.
13286
13287 2001-11-30 Akim Demaille <akim@epita.fr>
13288
13289 * src/reduce.c: Various comment/formatting changes.
13290 (nonterminals_reduce): New, extracted from...
13291 (reduce_grammar_tables): here.
13292 (reduce_grammar): Call nonterminals_reduce.
13293
13294 2001-11-29 Paul Eggert <eggert@twinsun.com>
13295
13296 * src/bison.simple (YYSTACK_REALLOC): Remove.
13297 (YYSTACK_ALLOC): Resurrect this macro, with its old meaning.
13298 (YYSTACK_FREE, YYSTACK_GAP_MAX, YYSTACK_BYTES, YYSTACK_RELOCATE):
13299 New macros.
13300 (union yyalloc): New type.
13301 (__yy_memcpy): Last arg is size_t, not unsigned int, to remove
13302 an arbitrary restriction on hosts where size_t is wider than int.
13303
13304 (yyparse): Don't dump core if alloca or malloc fails; instead, report
13305 a parser stack overflow. Allocate just one block of memory for all
13306 three stacks, instead of allocating three blocks; this typically is
13307 faster and reduces fragmentation.
13308
13309 Do not limit the number of items in the stack to a value that fits
13310 in 'int', as this is an arbitrary limit on hosts with 64-bit
13311 size_t and 32-bit int.
13312
13313 2001-11-29 Marc Autret <autret_m@epita.fr>
13314
13315 * tests/calc.at [AT_DATA_CALC_Y]: Use %error-verbose instead
13316 of defining YYERROR_VERBOSE.
13317 [AT_DATA]: $4 is now out of C declarations in the prologue.
13318
13319 2001-11-28 Marc Autret <autret_m@epita.fr>
13320
13321 * src/reader.c (parse_dquoted_param): New.
13322 (parse_skel_decl): Use it.
13323 * src/lex.h: Add its prototype.
13324 * src/lex.c (literalchar): Become not static.
13325
13326 2001-11-28 Marc Autret <autret_m@epita.fr>
13327
13328 * src/output.h: And put its extern declaration here.
13329 * src/output.c (error_verbose): Define here.
13330 (prepare): Echo name modification.
13331 * src/getargs.h: Clean its extern declaration.
13332 * src/getargs.c (error_verbose_flag): Remove.
13333 (getargs): Remove case 'e'.
13334 * src/options.c (option_table): 'error-verbose' is now seen as simple
13335 percent option.
13336 Include output.h.
13337
13338 * src/reader.c (read_declarations): Remove case tok_include.
13339 (parse_include_decl): Remove.
13340 * src/lex.h (token_t): Remove tok_include.
13341 * src/options.c (option_table): 'include' is now a simple command line
13342 option.
13343
13344 2001-11-28 Marc Autret <autret_m@epita.fr>
13345
13346 * src/bison.simple: Adjust muscle names.
13347 * src/muscle_tab.c (muscle_init): Also rename the muscles.
13348 * src/output.c (prepare): s/_/-/ for the muscles names.
13349 (output_parser): When scanning for a muscle, allow '-' instead of '_'.
13350
13351 2001-11-28 Marc Autret <autret_m@epita.fr>
13352
13353 * src/bison.simple: Fix debug.
13354 [YYERROR_VERBOSE]: Re-integrate as an internal macro.
13355
13356 2001-11-28 Akim Demaille <akim@epita.fr>
13357
13358 * src/LR0.c (shifts_new): New.
13359 (save_shifts, insert_start_shift, augment_automaton): Use it.
13360
13361 2001-11-28 Akim Demaille <akim@epita.fr>
13362
13363 * src/closure.c (closure): `b' and `ruleno' denote the same value:
13364 keep ruleno only.
13365
13366 2001-11-28 Akim Demaille <akim@epita.fr>
13367
13368 * src/closure.c (closure): Instead of looping over word in array
13369 then bits in words, loop over bits in array.
13370
13371 2001-11-28 Akim Demaille <akim@epita.fr>
13372
13373 * src/closure.c (closure): No longer optimize the special case
13374 where all the bits of `ruleset[r]' are set to 0, to make the code
13375 clearer.
13376
13377 2001-11-28 Akim Demaille <akim@epita.fr>
13378
13379 * src/closure.c (closure): `r' and `c' are new variables, used to
13380 de-obfuscate accesses to RULESET and CORE.
13381
13382 2001-11-28 Akim Demaille <akim@epita.fr>
13383
13384 * src/reduce.c (reduce_print): Use ngettext.
13385 (dump_grammar): Improve the trace accuracy.
13386
13387 2001-11-28 Akim Demaille <akim@epita.fr>
13388
13389 * src/reduce.c (dump_grammar): Don't translate trace messages.
13390
13391 2001-11-28 Akim Demaille <akim@epita.fr>
13392
13393 * tests/reduce.at (Useless Terminals, Useless Nonterminals): New.
13394 * src/reduce.c (reduce_grammar_tables): Do not free useless tags,
13395 as all tags are free'ed afterwards.
13396 From Enrico Scholz.
13397
13398 2001-11-27 Paul Eggert <eggert@twinsun.com>
13399
13400 * src/bison.simple (YYSTACK_REALLOC): Fix typo that caused us to
13401 use alloca when we didn't want to, and vice versa.
13402
13403 2001-11-27 Marc Autret <autret_m@epita.fr>
13404
13405 * src/muscle_tab.c (muscle_init): Remove 'verbose' muscle
13406 initialization.
13407 * src/output.c (prepare): Remove its update.
13408
13409 2001-11-27 Marc Autret <autret_m@epita.fr>
13410
13411 * tests/torture.at [AT_DATA]: Remove YYERROR_VERBOSE definition.
13412 Use %error-verbose.
13413
13414 2001-11-27 Marc Autret <autret_m@epita.fr>
13415
13416 * src/bison.simple: Remove YYERROR_VERBOSE using.
13417 Use %%error_verbose.
13418 (yyparse): Likewise.
13419 * src/output.c (prepare): Give its final value.
13420 * src/muscle_tab.c (muscle_init): Init new muscle 'error_verbose'.
13421 * src/getargs.h: Add its extern declaration.
13422 * src/getargs.c (error_verbose_flag): New int.
13423 (getargs): Update to catch new case.
13424 * src/options.c (option_table): 'error-verbose' is a new option.
13425 (shortopts): Update.
13426
13427 2001-11-27 Akim Demaille <akim@epita.fr>
13428
13429 * src/system.h: Use intl/libgettext.h.
13430 * src/Makefile.am (INCLUDES): Add -I $(top_srcdir).
13431
13432 2001-11-27 Akim Demaille <akim@epita.fr>
13433
13434 * tests/torture.at (Exploding the Stack Size with Malloc):
13435 s/YYSTACK_USE_ALLOCA_ALLOCA/YYSTACK_USE_ALLOCA/.
13436
13437 2001-11-27 Akim Demaille <akim@epita.fr>
13438
13439 * src/files.c: Include error.h.
13440 Reported by Hans Aberg.
13441
13442 2001-11-26 Marc Autret <autret_m@epita.fr>
13443
13444 * src/reader.c (parse_include_decl): New, not yet implemented.
13445 (read_declarations): Add case tok_include.
13446 * src/getargs.h (include): Add its extern definition.
13447 * src/getargs.c (include): New const char *.
13448 (getargs): Add case '-I'.
13449 * src/options.c (option_table): Add include as command line and
13450 percent option.
13451 * src/lex.h (token_t): Add tok_include.
13452
13453 2001-11-26 Akim Demaille <akim@epita.fr>
13454
13455 * src/reader.c (readgram): Make sure rules for mid-rule actions
13456 have a lineno equal to that of their host rule.
13457 Reported by Hans Aberg.
13458 * tests/regression.at (Rule Line Numbers): New.
13459
13460 2001-11-26 Akim Demaille <akim@epita.fr>
13461
13462 * src/LR0.c (allocate_itemsets): kernel_size contains ints, not
13463 size_ts.
13464
13465 2001-11-26 Akim Demaille <akim@epita.fr>
13466
13467 * src/complain.c, src/complain.h (error): Remove, provided by
13468 lib/error.[ch].
13469
13470 2001-11-26 Akim Demaille <akim@epita.fr>
13471
13472 * src/reader.c (read_declarations): Don't abort on tok_illegal,
13473 issue an error message.
13474 * tests/regression.at (Invalid %directive): New.
13475 Reported by Hans Aberg.
13476
13477 2001-11-26 Akim Demaille <akim@epita.fr>
13478
13479 * configure.in: Invoke AC_FUNC_OBSTACK and AC_FUNC_ERROR_AT_LINE.
13480 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
13481
13482 2001-11-26 Akim Demaille <akim@epita.fr>
13483
13484 * src/conflicts.c (conflicts_print): Don't complain at all when
13485 there are no reduce/reduce conflicts, and as many shift/reduce
13486 conflicts as expected.
13487 * tests/regression.at (%expect right): Adjust.
13488
13489 2001-11-23 Akim Demaille <akim@epita.fr>
13490
13491 * lib/alloca.c: Update, from fileutils.
13492
13493 2001-11-23 Akim Demaille <akim@epita.fr>
13494
13495 * lib/Makefile.am (libbison_a_LIBADD): Add @ALLOCA@.
13496
13497 2001-11-23 Akim Demaille <akim@epita.fr>
13498
13499 * src/system.h: Include alloca.h.
13500 * src/main.c (main) [C_ALLOCA]: Call alloca (0).
13501
13502 2001-11-23 Akim Demaille <akim@epita.fr>
13503
13504 * src/print_graph.c (print_actions): Remove `rule', unused.
13505 * src/LR0.c (kernel_size): Contain `int' instead of `size_t' to
13506 pacify GCC's signed < unsigned warnings.
13507 * src/closure.c (itemsetsize): Likewise.
13508 * src/reader.c (symbol_list_new): Static.
13509
13510 2001-11-23 Akim Demaille <akim@epita.fr>
13511
13512 Attaching lineno to buckets is stupid, since only one copy of each
13513 symbol is kept, only the line of the first occurrence is kept too.
13514
13515 * src/symtab.h, src/symtab.c (bucket): Remove the line member.
13516 * src/reader.c (rline_allocated): Remove, unused.
13517 (symbol_list): Have a `line' member.
13518 (symbol_list_new): New.
13519 (readgram): Use it.
13520 * src/print.c (print_grammar): Output the rule line numbers.
13521 * tests/regression.at (Solved SR Conflicts)
13522 (Unresolved SR Conflicts): Adjust.
13523 Reported by Hans Aberg.
13524
13525 2001-11-22 Marc Autret <autret_m@epita.fr>
13526
13527 * src/bison.simple [YYERROR_VERBOSE]: Force its value to be 1 or 0.
13528
13529 2001-11-22 Marc Autret <autret_m@epita.fr>
13530
13531 * src/muscle_tab.c (muscle_init): Remove initialization of
13532 skeleton muscle.
13533 * src/output.c (output_master_parser): Do it here.
13534
13535 2001-11-20 Akim Demaille <akim@epita.fr>
13536
13537 * po/sv.po: New.
13538 * configure.in (ALL_LINGUAS): Adjust.
13539 * po/POTFILE.in: Remove `nullable.c' and `derives.c' which no
13540 longer contains strings to translate.
13541
13542 2001-11-19 Akim Demaille <akim@epita.fr>
13543
13544 * src/conflicts.c (conflicts_print): Add a missing \n.
13545
13546 2001-11-19 Akim Demaille <akim@epita.fr>
13547
13548 * src/nullable.c (nullable_print): New.
13549 (set_nullable): Call it when tracing.
13550 Better locality of variables.
13551
13552 2001-11-19 Akim Demaille <akim@epita.fr>
13553
13554 * src/print.c (print_actions): Better locality of variables.
13555
13556 2001-11-19 Akim Demaille <akim@epita.fr>
13557
13558 * src/derives.c (print_derives): Fix and enrich.
13559 * src/closure.c (print_fderives): Likewise.
13560
13561 2001-11-19 Akim Demaille <akim@epita.fr>
13562
13563 * src/closure.c (itemsetend): Remove, replaced with...
13564 (itemsetsize): new.
13565
13566 2001-11-19 Akim Demaille <akim@epita.fr>
13567
13568 * src/LR0.c (kernel_end): Remove, replaced with...
13569 (kernel_size): new.
13570
13571 2001-11-19 Akim Demaille <akim@epita.fr>
13572
13573 * src/conflicts.c (set_conflicts): Use arrays instead of pointers
13574 to clarify.
13575
13576 2001-11-19 Akim Demaille <akim@epita.fr>
13577
13578 * src/closure.c (closure): Use arrays instead of pointers to clarify.
13579
13580 2001-11-19 Akim Demaille <akim@epita.fr>
13581
13582 * src/closure.c, src/derives.c, src/nullable.c: Adjust various
13583 trace messages.
13584 * src/LR0.c: Likewise.
13585 (allocate_itemsets): Use arrays instead of pointers to clarify.
13586
13587 2001-11-19 Akim Demaille <akim@epita.fr>
13588
13589 * src/getargs.c (statistics_flag): Replace with...
13590 (trace_flag): New.
13591 (longopts): Accept --trace instead of --statistics.
13592 * src/getargs.h, src/options.c: Adjust.
13593 * src/LR0.c, src/closure.c, src/derives.c, src/nullable.c,
13594 * src/reduce.c: Use trace_flags instead of the CPP conditional TRACE.
13595
13596 2001-11-19 Akim Demaille <akim@epita.fr>
13597
13598 * src/LR0.c (new_itemsets, get_state): Use more arrays and fewer
13599 pointers to clarify the code.
13600 (save_reductions, save_shifts): Factor common parts of alternatives.
13601
13602 2001-11-19 Akim Demaille <akim@epita.fr>
13603
13604 * src/LR0.c (new_state, get_state): Complete TRACE code.
13605 * src/closure.c: Include `reader.h' to get `tags', needed by the
13606 trace code.
13607 Rename the conditional DEBUG as TRACE.
13608 Output consistently TRACEs to stderr, not stdout.
13609 * src/derives.c: Likewise.
13610 * src/reduce.c: (inaccessable_symbols): Using if is better style
13611 than goto.
13612 Use `#if TRACE' instead of `#if 0' for tracing code.
13613
13614 2001-11-19 Akim Demaille <akim@epita.fr>
13615
13616 * src/system.h (LIST_FREE, shortcpy): New.
13617 * src/LR0.c: Use them.
13618 * src/output.c (free_itemsets, free_reductions, free_shifts):
13619 Remove, replaced by LIST_FREE.
13620
13621 2001-11-19 Akim Demaille <akim@epita.fr>
13622
13623 * src/state.h (CORE_ALLOC, SHIFTS_ALLOC, ERRS_ALLOC)
13624 (REDUCTIONS_ALLOC): New.
13625 * src/LR0.c, src/conflicts.c: Use them to de-obfuscate memory
13626 allocation.
13627
13628 2001-11-19 Akim Demaille <akim@epita.fr>
13629
13630 * src/LR0.c (new_state): Complete trace code.
13631 * src/nullable.c (set_nullable): Don't translate traces.
13632
13633 2001-11-19 Akim Demaille <akim@epita.fr>
13634
13635 * src/print_graph.c (print_core): Better locality of variables.
13636 * src/print.c (print_core): Likewise.
13637
13638 2001-11-19 Akim Demaille <akim@epita.fr>
13639
13640 * src/vcg.c: You do the output, so you are responsible of the
13641 handling of VCG syntax, in particular: use quotearg.
13642 * src/print_graph.c: Don't.
13643 (print_actions): Don't output the actions as part of the nodes,
13644 since that's the job of the edges.
13645 (print_state): Don't output by hand: fill the node description,
13646 and ask for its output.
13647
13648 2001-11-19 Akim Demaille <akim@epita.fr>
13649
13650 * src/bison.simple (yyparse): When verbosely reporting an error,
13651 no longer put additional quotes around token names.
13652 * tests/calc.at: Adjust.
13653
13654 2001-11-19 Akim Demaille <akim@epita.fr>
13655
13656 * src/symtab.h, src/symtab.c: `line' is a new member of `bucket'.
13657 * src/reader.c (record_rule_lines, rline, rline_allocated): Remove.
13658 * src/output.c: Adjust.
13659
13660 2001-11-19 Akim Demaille <akim@epita.fr>
13661
13662 * src/gram.h (rprec, rprecsym, rassoc): Remove, now part of...
13663 (rule_t): this.
13664 * src/conflicts.c, src/reader.c, src/reduce.c: Adjust.
13665
13666 2001-11-19 Akim Demaille <akim@epita.fr>
13667
13668 * src/gram.h (rule_t): New.
13669 (rule_table): New.
13670 (rrhs, rlhs): Remove, part of state_t.
13671 * src/print_graph.c, src/closure.c, src/conflicts.c, src/derives.c,
13672 * src/lalr.c, src/nullable.c, src/output.c, src/print.c,
13673 * src/reader.c, src/reduce.c: Adjust.
13674
13675 2001-11-19 Akim Demaille <akim@epita.fr>
13676
13677 * src/reader.c (symbols_output): New, extracted from...
13678 (packsymbols): Here.
13679 (reader): Call it.
13680
13681 2001-11-19 Akim Demaille <akim@epita.fr>
13682
13683 * src/lalr.c (set_maxrhs, maxrhs): Remove, replaced with...
13684 (maxrhs): this new function.
13685
13686 2001-11-19 Akim Demaille <akim@epita.fr>
13687
13688 * src/lalr.c (F): New macro to access the variable F.
13689 Adjust.
13690
13691 2001-11-19 Akim Demaille <akim@epita.fr>
13692
13693 * src/lalr.h (LA): New macro to access the variable LA.
13694 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
13695 * src/lalr.c: Adjust.
13696
13697 2001-11-19 Akim Demaille <akim@epita.fr>
13698
13699 * src/lalr.c (initialize_LA): Only initialize LA. Let...
13700 (set_state_table): handle the `lookaheads' members.
13701
13702 2001-11-19 Akim Demaille <akim@epita.fr>
13703
13704 * src/lalr.h (lookaheads): Removed array, whose contents is now
13705 a member of...
13706 (state_t): this structure.
13707 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
13708 Adjust.
13709
13710 2001-11-19 Akim Demaille <akim@epita.fr>
13711
13712 * src/lalr.h (consistent): Removed array, whose contents is now
13713 a member of...
13714 (state_t): this structure.
13715 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
13716 Adjust.
13717
13718 2001-11-19 Akim Demaille <akim@epita.fr>
13719
13720 * src/lalr.h (reduction_table, shift_table): Removed arrays, whose
13721 contents are now members of...
13722 (state_t): this structure.
13723 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
13724 Adjust.
13725
13726 2001-11-19 Akim Demaille <akim@epita.fr>
13727
13728 * src/lalr.h (state_t): New.
13729 (state_table): Be a state_t * instead of a core **.
13730 (accessing_symbol): Remove, part of state_t.
13731 * src/lalr.c: Adjust.
13732 (set_accessing_symbol): Merge into...
13733 (set_state_table): this.
13734 * src/print_graph.c, src/conflicts.c: Adjust.
13735
13736 2001-11-14 Akim Demaille <akim@epita.fr>
13737
13738 * tests/calc.at, tests/output.at, tests/regression.at,
13739 * tests/testsuite.at, tests/torture.at: Rely on Autotest 2.52g:
13740 now the tests are run in private dirs, therefore AC_CLEANUP and
13741 family can be simplified to 0-ary.
13742 * tests/atlocal.in: Now that we run `elsewhere' than in tests/,
13743 use abs. path to find config.h.
13744 * tests/calc.at (AT_CHECK_CALC): Don't try to check the compiler's
13745 stderr, there can be way too much random noise.
13746 Instead pass -Werror to GCC and rely on the exit status.
13747 Reported by Wolfram Wagner.
13748
13749 2001-11-14 Akim Demaille <akim@epita.fr>
13750
13751 * src/bison.simple (yyparse): Let yyls1, yyss1 and yyvs1 be
13752 defined only if yyoverflow is defined, to avoid `warning: unused
13753 variable `yyvs1''.
13754 Reported by The Test Suite.
13755
13756 2001-11-14 Akim Demaille <akim@epita.fr>
13757
13758 * src/print.c: Include reduce.h.
13759 Reported by Hans Aberg.
13760
13761 2001-11-14 Akim Demaille <akim@epita.fr>
13762
13763 * src/lex.c, src/lex.h (token_buffer, unlexed_token_buffer):
13764 Revert a previous patch: these are really const.
13765 * src/conflicts.c (conflict_report): Additional useless pair of
13766 braces to pacify GCC's warnings for `if () if () {} else {}'.
13767 * src/lex.c (parse_percent_token): Replace equal_offset with
13768 arg_offset.
13769 arg is const.
13770 Be sure to strdup `arg' when used, since there is no reason for
13771 token_buffer not to change.
13772
13773 2001-11-14 Akim Demaille <akim@epita.fr>
13774
13775 * src/system.h (EXIT_SUCCESS, EXIT_FAILURE): Ensure a proper
13776 definition.
13777 * src/main.c (main): Use them.
13778 Suggested by Hans Aberg.
13779
13780 2001-11-12 Akim Demaille <akim@epita.fr>
13781
13782 * src/system.h (ngettext): Now that we use ngettext, be sure to
13783 provide a default definition when NLS are not used.
13784
13785 2001-11-12 Akim Demaille <akim@epita.fr>
13786
13787 * doc/bison.texinfo: Use `$' as shell prompt, not `%'.
13788 Use @kbd to denote user input.
13789 (Language and Grammar): ANSIfy the example.
13790 Adjust its layout for info/notinfo.
13791 (Location Tracking Calc): Output error messages to stderr.
13792 Output locations in a more GNUtically correct way.
13793 Fix a couple of Englishos.
13794 Adjust @group/@end group pairs.
13795
13796 2001-11-12 Akim Demaille <akim@epita.fr>
13797
13798 %expect was not functioning at all.
13799
13800 * src/conflicts.c (expected_conflicts): Set to -1.
13801 (conflict_report): Use ngettext.
13802 (conflicts_print): Check %expect and make its violation an error.
13803 * doc/bison.texinfo (Expect Decl): Adjust.
13804 * configure.in (AM_GNU_GETTEXT): Ask for ngettext.
13805 * tests/regression.at (%expect not enough, %expect right)
13806 (%expect too much): New.
13807
13808 2001-11-12 Akim Demaille <akim@epita.fr>
13809
13810 * tests/regression.at (Conflicts): Rename as...
13811 (Unresolved SR Conflicts): this.
13812 (Solved SR Conflicts): New.
13813
13814 2001-11-12 Akim Demaille <akim@epita.fr>
13815
13816 * src/reduce.c (print_results): Rename as...
13817 (reduce_output): This.
13818 Output to OUT, passed as argument, instead of output_obstack.
13819 (dump_grammar): Likewise.
13820 (reduce_free): New.
13821 Also free V1.
13822 (reduce_grammar): No longer call reduce_output, since...
13823 * src/print.c (print_results): do it.
13824 * src/main.c (main): Call reduce_free;
13825
13826 2001-11-12 Akim Demaille <akim@epita.fr>
13827
13828 * src/conflicts.c (print_reductions): Accept OUT as argument.
13829 Output to it, not to output_obstack.
13830 * src/print.c (print_actions): Adjust.
13831
13832 2001-11-12 Akim Demaille <akim@epita.fr>
13833
13834 * src/conflicts.c (count_sr_conflicts, count_rr_conflicts): Return
13835 the result instead of using...
13836 (src_total, rrc_total, src_count, rrc_count): Remove.
13837 (any_conflicts): Remove.
13838 (print_conflicts): Split into...
13839 (conflicts_print, conflicts_output): New.
13840 * src/conflicts.h: Adjust.
13841 * src/main.c (main): Invoke both conflicts_output and conflicts_print.
13842 * src/print.c (print_grammar): Issue `\n' between two rules.
13843 * tests/regression.at (Conflicts): New.
13844 Reported by Tom Lane.
13845
13846 2001-11-12 Akim Demaille <akim@epita.fr>
13847
13848 * tests/regression.at (Invalid input): Remove, duplicate with
13849 ``Invalid input: 1''.
13850
13851 2001-11-12 Akim Demaille <akim@epita.fr>
13852
13853 * tests/torture.at (AT_DATA_STACK_TORTURE)
13854 (Exploding the Stack Size with Alloca)
13855 (Exploding the Stack Size with Malloc): New.
13856
13857 2001-11-12 Akim Demaille <akim@epita.fr>
13858
13859 * src/bison.simple (YYSTACK_REALLOC): New.
13860 (yyparse) [!yyoverflow]: Use it and free the old stack.
13861 Reported by Per Allansson.
13862
13863 2001-11-12 Pascal Bart <pascal.bart@epita.fr>
13864
13865 * src/bison.simple: Define type yystype instead of YYSTYPE, and
13866 define CPP macro, which substitute YYSTYPE by yystype.
13867 * src/reader.c (parse_union_decl): Output yystype/YYSTYPE as we do
13868 with yyltype/YYLTYPE. This allows inclusion of the generated
13869 header within the parser if the compiler, such as GGC, accepts
13870 multiple equivalent #defines.
13871 From Akim.
13872
13873 2001-11-05 Akim Demaille <akim@epita.fr>
13874
13875 * src/reader.c (symbols_output): New, extracted from...
13876 (packsymbols): here.
13877 (reader): Adjust.
13878
13879 2001-11-05 Akim Demaille <akim@epita.fr>
13880
13881 * src/lex.c (parse_percent_token): s/quotearg/quote/.
13882
13883 2001-11-05 Akim Demaille <akim@epita.fr>
13884
13885 * tests/regression.at (AT_TEST_CPP_GUARD_H): Adjust the clean up
13886 pattern.
13887
13888 2001-11-05 Akim Demaille <akim@epita.fr>
13889
13890 * src/options.h (struct option_table_struct): set_flags is void*.
13891 * src/options.c (longopts): Support `--output' and `%output'.
13892 (usage): Adjust.
13893 * src/lex.h (tok_setopt): Remove, replaced with...
13894 (tok_intopt, tok_stropt): these new guys.
13895 * src/lex.c (getopt.h): Not needed.
13896 (token_buffer, unlexed_token_buffer): Not const.
13897 (percent_table): Promote `-' over `_' in directive names.
13898 Active `%name-prefix', `file-prefix', and `output'.
13899 (parse_percent_token): Accept possible arguments to directives.
13900 Promote `-' over `_' in directive names.
13901
13902 2001-11-04 Akim Demaille <akim@epita.fr>
13903
13904 * doc/bison.texinfo (Decl Summary): Split the list into
13905 `directives for grammars' and `directives for bison'.
13906 Sort'em.
13907 Add description of `%name-prefix', `file-prefix', and `output'.
13908 Promote `-' over `_' in directive names.
13909 (Bison Options): s/%locactions/%locations/. Nice Freudian slip.
13910 Simplify the description of `--name-prefix'.
13911 Promote `-' over `_' in directive names.
13912 Promote `--output' over `--output-file'.
13913 Fix the description of `--defines'.
13914 * tests/output.at: Exercise %file-prefix and %output.
13915
13916 2001-11-02 Akim Demaille <akim@epita.fr>
13917
13918 * doc/refcard.tex: Update.
13919
13920 2001-11-02 Akim Demaille <akim@epita.fr>
13921
13922 * src/symtab.h (SUNDEF): New.
13923 * src/symtab.c (bucket_new): Init user_token_number to SUNDEF to
13924 stand for `uninitialized', instead of 0.
13925 * src/reader.c (packsymbols, parse_thong_decl): Adjust.
13926 * src/lex.c (lex): Adjust.
13927
13928 * tests/calc.at (_AT_DATA_CALC_Y): Declare a token for EOF.
13929 Number it 0.
13930 Let yylex return it instead of a plain 0.
13931 Reported by Dick Streefland.
13932
13933 2001-11-02 Akim Demaille <akim@epita.fr>
13934
13935 * tests/regression.at (Mixing %token styles): New test.
13936
13937 2001-11-02 Akim Demaille <akim@epita.fr>
13938
13939 * src/reader.c (parse_thong_decl): Formatting changes.
13940 (token_translations_init): New, extracted from...
13941 (packsymbols): Here.
13942 Adjust.
13943
13944 2001-11-01 Akim Demaille <akim@epita.fr>
13945
13946 * tests/regression.at (AT_TEST_CPP_GUARD_H): New.
13947 Check that `9foo.y' produces correct cpp guards.
13948 * src/files.c (compute_header_macro): Prepend `BISON_' to CPP
13949 guards.
13950 Reported by Wwp.
13951
13952 2001-11-01 Akim Demaille <akim@epita.fr>
13953
13954 * tests/regression.at (Invalid input: 2): New.
13955 * src/lex.c (unlexed_token_buffer): New.
13956 (lex, unlex): Adjust: when unlexing, be sure to save token_buffer
13957 too.
13958 Reported by Wwp.
13959
13960 2001-11-01 Akim Demaille <akim@epita.fr>
13961
13962 * tests/calc.at: Catch up with 1.30.
13963 * configure.in: Bump to 1.49a.
13964 Adjust to newer Autotest.
13965
13966 2001-10-19 Pascal Bart <pascal.bart@epita.fr>
13967
13968 * src/conflicts.c: Move global variables rrc_total and src_total ...
13969 (print_conflicts): here.
13970 * src/output.c (output): Free global variable user_toknums.
13971 * src/lex.c (token_obstack): Become static.
13972
13973 2001-10-18 Akim Demaille <akim@epita.fr>
13974
13975 * tests/atlocal.in (GCC): Add.
13976 * tests/calc.at: s/m4_match/m4_bmatch/.
13977 s/m4_patsubst/m4_bpatsubst/.
13978 (AT_CHECK_CALC): Check the compiler's stderr only if it's GCC.
13979 * configure.in: AC_SUBST(GCC).
13980
13981 2001-10-14 Marc Autret <autret_m@epita.fr>
13982
13983 * src/options.c (create_long_option_table): Fix.
13984
13985 2001-10-10 Akim Demaille <akim@epita.fr>
13986
13987 * src/bison.simple: Be sure to set YYSTACK_USE_ALLOCA.
13988
13989 2001-10-04 Akim Demaille <akim@epita.fr>
13990
13991 * src/reader.c (parse_union_decl): Push the caracters in
13992 union_obstack, not attrs_obstack.
13993
13994 2001-10-04 Akim Demaille <akim@epita.fr>
13995
13996 Merge in the branch 1.29.
13997
13998 * src/reader.c (packsymbols): Use a temporary obstack for
13999 `%%tokendef', since output_stack is already used elsewhere.
14000
14001 2001-10-02 Akim Demaille <akim@epita.fr>
14002
14003 Bump 1.29d.
14004
14005 2001-10-02 Akim Demaille <akim@epita.fr>
14006
14007 Version 1.29c.
14008
14009 2001-10-02 Akim Demaille <akim@epita.fr>
14010
14011 * tests/regression.at (Invalid CPP headers): New.
14012 From Alexander Belopolsky.
14013 * src/files.c (compute_header_macro): Map non alnum chars to `_'.
14014
14015 2001-10-02 Akim Demaille <akim@epita.fr>
14016
14017 * tests/regression.at (Invalid input): New.
14018 * src/lex.c (lex): Be sure to set `token_buffer' in any case.
14019 Reported by Shura.
14020
14021 2001-10-02 Akim Demaille <akim@epita.fr>
14022
14023 * tests/calc.at: Now that --debug works, the tests must be adjusted.
14024
14025 2001-10-02 Akim Demaille <akim@epita.fr>
14026
14027 * src/output.c (output_parser): Assert `skeleton'.
14028 * src/files.c (skeleton_find): Look harder for skeletons on DOSish
14029 systems.
14030 From Shura.
14031
14032 2001-10-01 Marc Autret <autret_m@epita.fr>
14033
14034 * src/lex.h: Echo modifications.
14035 * src/lex.c (unlex): Parameter is now token_t.
14036 From Hans Aberg.
14037
14038 2001-10-01 Marc Autret <autret_m@epita.fr>
14039
14040 * src/main.c: Include lex.h.
14041 From Hans Aberg.
14042
14043 2001-09-29 Akim Demaille <akim@epita.fr>
14044
14045 * src/getargs.c (longopts): `--debug' is `-t', not `-d'.
14046
14047 2001-09-28 Akim Demaille <akim@epita.fr>
14048
14049 * tests/testsuite.at: Update to newer Autotest.
14050 * tests/Makefile.am (EXTRA_DIST): bison is not to be shipped.
14051
14052 2001-09-27 Akim Demaille <akim@epita.fr>
14053
14054 Position independent wrapper.
14055
14056 * tests/bison: Remove.
14057 * tests/bison.in: New.
14058 * configure.in: Adjust.
14059
14060 2001-09-27 Paul Eggert <eggert@twinsun.com>
14061
14062 Port quotearg fixes from tar 1.13.24.
14063
14064 * lib/quotearg.c: BSD/OS 4.1 wchar.h requires FILE and struct
14065 tm to be declared.
14066 (HAVE_MBSINIT): Undef if !HAVE_MBRTOWC.
14067 (mbsinit): Define to 1 if !defined mbsinit && !HAVE_MBSINIT.
14068
14069 * m4/Makefile.am (EXTRA_DIST): Add mbrtowc.m4.
14070 * m4/mbrtowc.m4: New file.
14071 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Check for mbsinit and stddef.h.
14072 Use jm_FUNC_MBRTOWC instead of AC_CHECK_FUNCS(mbrtowc).
14073
14074 2001-09-27 Akim Demaille <akim@epita.fr>
14075
14076 Bump to 1.29c.
14077
14078 2001-09-27 Akim Demaille <akim@epita.fr>
14079
14080 Version 1.29b.
14081
14082 2001-09-25 Akim Demaille <akim@epita.fr>
14083
14084 * src/system.h: Include `xalloc.h'.
14085 Remove it from the C files.
14086 * src/files.c (output_files): Free the obstacks.
14087 * src/lex.c (init_lex): Rename as...
14088 (lex_init): this.
14089 (lex_free): New.
14090 * src/main.c (main): Use it.
14091
14092 2001-09-24 Marc Autret <autret_m@epita.fr>
14093
14094 * src/vcg.c (open_edge, close_edge, open_node, close_node): Change
14095 to output informations in fout (FILE*).
14096 (open_graph, close_graph): Likewise.
14097 (output_graph, output_edge, output_node): Likewise.
14098 * src/vcg.h: Update function prototypes.
14099 * src/print_graph.c (print_graph): Open output graph file.
14100 (print_actions): Adjust.
14101 * src/files.h: Remove extern declaration.
14102 * src/files.c: Remove graph_obstack declaration.
14103 (open_files): Remove graph_obstack initialization.
14104 (output_files): Remove graph_obstack saving.
14105
14106 2001-09-24 Marc Autret <autret_m@epita.fr>
14107
14108 * src/files.c (compute_output_file_names): Fix.
14109
14110 2001-09-24 Marc Autret <autret_m@epita.fr>,
14111 Akim Demaille <akim@epita.fr>
14112
14113 * src/reader.c (reader): Remove call to free_symtab ().
14114 * src/main.c (main): Call it here.
14115 Include symtab.h.
14116 * src/conflicts.c (initialize_conflicts): Rename as...
14117 (solve_conflicts): this.
14118 * src/print.c (print_core, print_actions, print_state)
14119 (print_grammar): Dump to a file instead a `output_obstack'.
14120 (print_results): Dump `output_obstack', and then proceed with the
14121 FILE *.
14122 * src/files.c (compute_output_file_names, close_files): New.
14123 (output_files): Adjust.
14124 * src/main.c (main): Adjust.
14125
14126 2001-09-23 Marc Autret <autret_m@epita.fr>
14127
14128 * src/files.c (compute_header_macro): Computes header macro name
14129 from spec_defines_file when given.
14130
14131 2001-09-23 Marc Autret <autret_m@epita.fr>
14132
14133 * src/files.c (output_files): Add default extensions.
14134
14135 2001-09-22 Akim Demaille <akim@epita.fr>
14136
14137 * src/conflicts.c (finalize_conflicts): Rename as...
14138 (free_conflicts): this.
14139
14140 2001-09-22 Akim Demaille <akim@epita.fr>
14141
14142 * src/gram.c (gram_free): Rename back as...
14143 (dummy): this.
14144 (output_token_translations): Free `token_translations'.
14145 * src/symtab.c (free_symtab): Free the tag field.
14146
14147 2001-09-22 Akim Demaille <akim@epita.fr>
14148
14149 Remove `translations' as it is always set to true.
14150
14151 * src/gram.h: Adjust.
14152 * src/reader.c (packsymbols, parse_token_decl): Adjust
14153 * src/print.c (print_grammar): Adjust.
14154 * src/output.c (output_token_translations): Adjust.
14155 * src/lex.c (lex): Adjust.
14156 * src/gram.c: Be sure the set pointers to NULL.
14157 (dummy): Rename as...
14158 (gram_free): this.
14159
14160 2001-09-22 Akim Demaille <akim@epita.fr>
14161
14162 * configure.in: Invoke AM_LIB_DMALLOC.
14163 * src/system.h: Use dmalloc.
14164 * src/LR0.c: Be sure to have pointers initialized to NULL.
14165 (allocate_itemsets): Allocate kernel_items only if needed.
14166
14167 2001-09-22 Akim Demaille <akim@epita.fr>
14168
14169 * configure.in: Bump to 1.29b.
14170 * tests/Makefile.am (DISTCLEANFILES): Add package.m4.
14171 * tests/calc.at (_AT_DATA_CALC_Y): #undef malloc so that we don't
14172 need xmalloc.c in calc.y.
14173 From Pascal Bart.
14174
14175 2001-09-21 Akim Demaille <akim@epita.fr>
14176
14177 Version 1.29a.
14178 * Makefile.maint, config/config.guess, config/config.sub,
14179 * config/missing: Update from masters.
14180 * tests/Makefile.am ($(srcdir)/$(TESTSUITE)): No longer depend
14181 upon package.m4.
14182 * configure.in (ALL_LINGUAS): Add `tr'.
14183
14184 2001-09-21 Akim Demaille <akim@epita.fr>
14185
14186 * tests/Makefile.am (package.m4): Move to...
14187 ($(srcdir)/$(TESTSUITE)): here.
14188
14189 2001-09-20 Akim Demaille <akim@epita.fr>
14190
14191 * src/complain.c: No longer try to be standalone: use system.h.
14192 Don't assume __STDC__ is defined to 1. Just test if it is defined.
14193 * src/complain.h: Likewise.
14194 * src/reduce.c (useless_nonterminals, inaccessable_symbols):
14195 Remove the unused variable `n'.
14196 From Albert Chin-A-Young.
14197
14198 2001-09-18 Marc Autret <autret_m@epita.fr>
14199
14200 * doc/bison.1: Update.
14201 * doc/bison.texinfo (Bison Options): Update --defines and --graph
14202 descriptions.
14203 (Option Cross Key): Update.
14204 Add --graph.
14205
14206 2001-09-18 Marc Autret <autret_m@epita.fr>
14207
14208 * tests/regression.at: New test (comment in %union).
14209
14210 2001-09-18 Marc Autret <autret_m@epita.fr>
14211
14212 * src/reader.c (parse_union_decl): Do not output '/'. Let copy_comment
14213 do that.
14214 Reported by Keith Browne.
14215
14216 2001-09-18 Marc Autret <autret_m@epita.fr>
14217
14218 * tests/output.at: Add tests for --defines and --graph.
14219
14220 2001-09-18 Marc Autret <autret_m@epita.fr>
14221
14222 * tests/output.at: Removes tests of %{header,src}_extension features.
14223
14224 2001-09-18 Akim Demaille <akim@epita.fr>
14225
14226 * tests/Makefile.am (package.m4): New.
14227 * tests/calc.at (_AT_CHECK_CALC): Just run `calc input'.
14228 (_AT_CHECK_CALC_ERROR): Likewise.
14229 Factor the `, ' part of verbose error messages.
14230
14231 2001-09-18 Marc Autret <autret_m@epita.fr>
14232
14233 * src/getargs.c (longopts): Declare --defines and --graph as options
14234 with optional arguments.
14235 * src/files.h: Add extern declarations.
14236 * src/files.c (spec_graph_file, spec_defines_file): New.
14237 (output_files): Update.
14238 Remove CPP-outed code.
14239
14240 2001-09-18 Marc Autret <autret_m@epita.fr>
14241
14242 Turn off %{source,header}_extension feature.
14243
14244 * src/files.c (compute_exts_from_gf): Update.
14245 (compute_exts_from_src): Update.
14246 (output_files): CPP-out useless code.
14247 * src/files.h: Remove {header,source}_extension extern declarations.
14248 * src/reader.c (parse_dquoted_param): CPP-out.
14249 (parse_header_extension_decl): Remove.
14250 (parse_source_extension_decl): Remove.
14251 (read_declarations): Remove cases tok_{hdrext,srcext}.
14252 * src/lex.c (percent_table): Remove {header,source}_extension entries.
14253 * src/lex.h (token_t): Remove tok_hdrext and tok_srcext.
14254
14255 2001-09-10 Akim Demaille <akim@epita.fr>
14256
14257 * tests/output.at (AT_CHECK_BISON_FLAGS, AT_CHECK_BISON_PERCENT):
14258 (AT_CHECK_BISON_PERCENT_FLAGS): Merge into...
14259 (AT_CHECK_OUTPUT): this.
14260 Merely check ls' exit status, its output is useless.
14261
14262 2001-09-10 Akim Demaille <akim@epita.fr>
14263
14264 * tests/calc.at: Use m4_match.
14265 (_AT_DATA_CALC_Y): Check `yyin != NULL', not `stdin != NULL'.
14266
14267 2001-09-10 Marc Autret <autret_m@epita.fr>,
14268 Akim Demaille <akim@epita.fr>
14269
14270 * src/vcg.h (graph_s): color, textcolor, bordercolor are now
14271 enum color_e.
14272 * src/print_graph.c (print_graph): Initalize graph.layoutalgorithm
14273 to `normal'.
14274 * src/reader.c (parse_token_decl): Initialize token with tok_eof.
14275 * src/lex.h: Adjust prototype.
14276 (token_t): Add `tok_undef'.
14277 * src/lex.c (struct percent_table_struct): Retval is now a token_t.
14278 (parse_percent_token): Now returns token_t.
14279 Add default statement in switch.
14280 (lex): Separate `c' as an input variable, from the token_t result
14281 part.
14282 (unlexed): Is a token_t.
14283
14284 2001-09-10 Akim Demaille <akim@epita.fr>
14285
14286 * configure.in: Bump to 1.29a.
14287
14288 2001-09-07 Akim Demaille <akim@epita.fr>
14289
14290 Version 1.29.
14291
14292 2001-08-30 Akim Demaille <akim@epita.fr>
14293
14294 * tests/atgeneral.m4, tests/atconfig.in, tests/suite.at: Remove.
14295 * m4/atconfig.m4: Remove.
14296 * tests/testsuite.at, tests/atlocal.in, tests/output.at,
14297 * tests/bison: New.
14298 * tests/regression.at, tests/calc.at: Use m4_define, AT_BANNER,
14299 m4_if, m4_patsubst, and m4_regexp.
14300 * tests/calc.at (_AT_CHECK_CALC, _AT_CHECK_CALC_ERROR): Use an
14301 `input' file instead of echo.
14302
14303 2001-08-29 Akim Demaille <akim@epita.fr>
14304
14305 Bump to 1.28e.
14306
14307 2001-08-29 Akim Demaille <akim@epita.fr>
14308
14309 Version 1.28d.
14310
14311 2001-08-29 Paul Eggert <eggert@twinsun.com>
14312
14313 * src/bison.simple (yyparse): Don't take the address of an
14314 item before the start of an array, as that doesn't conform to
14315 the C Standard.
14316
14317 2001-08-29 Robert Anisko <anisko_r@epita.fr>
14318
14319 * doc/bison.texinfo (Location Tracking Calc): New node.
14320
14321 2001-08-29 Paul Eggert <eggert@twinsun.com>
14322
14323 * src/output.c (output): Do not define const, as this now
14324 causes more problems than it cures.
14325
14326 2001-08-29 Akim Demaille <akim@epita.fr>
14327
14328 * doc/bison.texinfo: Modernize `@node' and `@top' use: just name
14329 the nodes.
14330 Be sure to tag the `detailmenu'.
14331
14332 2001-08-29 Akim Demaille <akim@epita.fr>
14333
14334 * Makefile.maint (do-po-update): Wget refuses to overwrite files:
14335 download in a tmp dir.
14336
14337 2001-08-28 Marc Autret <autret_m@epita.fr>
14338
14339 * config/depcomp: New file.
14340
14341 2001-08-28 Marc Autret <autret_m@epita.fr>
14342
14343 * doc/bison.1 (mandoc): Adjust.
14344 From Juan Manuel Guerrero.
14345
14346 2001-08-28 Marc Autret <autret_m@epita.fr>
14347
14348 * src/print_graph.c (print_state): Fix.
14349
14350 2001-08-27 Marc Autret <autret_m@epita.fr>
14351
14352 * src/vcg.h (classname_s, infoname_s, node_s): Constify the
14353 char * members.
14354 Echo modifications to the functions prototypes.
14355 * src/vcg.c (add_classname, add_infoname): Adjust arguments.
14356
14357 2001-08-27 Marc Autret <autret_m@epita.fr>
14358
14359 * src/vcg.c: Include `xalloc.h'.
14360 (add_colorentry): New.
14361 (add_classname): New.
14362 (add_infoname): New.
14363 * src/vcg.h: Add new prototypes.
14364
14365 2001-08-27 Akim Demaille <akim@epita.fr>
14366
14367 * Makefile.maint: Sync. again with CVS Autoconf.
14368
14369 2001-08-27 Akim Demaille <akim@epita.fr>
14370
14371 * Makefile.maint: Formatting changes.
14372 (po-update, cvs-update, update): New targets.
14373 (AMTAR): Remove.
14374
14375 2001-08-27 Akim Demaille <akim@epita.fr>
14376
14377 * Makefile.am (AUTOMAKE_OPTIONS): 1.5.
14378 * Makefile.maint: Sync. with CVS Autoconf.
14379
14380 2001-08-27 Marc Autret <autret_m@epita.fr>
14381
14382 * src/vcg.h (struct infoname_s): New.
14383 (struct colorentry_s): New.
14384 (graph_s): New fields {vertical,horizontal}_order in structure.
14385 Add `infoname' field.
14386 Add `colorentry' field;
14387 * src/vcg_defaults.h (G_VERTICAL_ORDER): New.
14388 (G_HORIZONTAL_ORDER): New.
14389 (G_INFONAME): New.
14390 (G_COLORENTRY): New.
14391 * src/vcg.c (output_graph): Add output of {vertical,horizontal}_order.
14392 Add output of `infoname'.
14393 Add output of `colorentry'.
14394
14395 2001-08-27 Marc Autret <autret_m@epita.fr>
14396
14397 * src/reader.c (parse_dquoted_param): Rename variable `index' to `i'.
14398 This one shadowed a global parameter.
14399
14400 2001-08-24 Marc Autret <autret_m@epita.fr>
14401
14402 * src/print_graph.c (node_output_size): Declared POSIX `size_t' type,
14403 instead of `unsigned'.
14404 (print_state): Do not call obstack_object_size () in obstack_grow ()
14405 to avoid macro variables shadowing.
14406
14407 2001-08-23 Marc Autret <autret_m@epita.fr>
14408
14409 * src/lex.c (percent_table): Typo: s/naem/name/.
14410 Add graph option.
14411 Normalize new options declarations.
14412
14413 2001-08-20 Pascal Bart <pascal.bart@epita.fr>
14414
14415 * tests/suite.at: Exercise %header_extension and %source_extension.
14416
14417 2001-08-16 Marc Autret <autret_m@epita.fr>
14418
14419 * src/reader.c (parse_dquoted_param): New.
14420 (parse_header_extension_decl): Use it.
14421 (parse_source_extension_decl): Likewise.
14422
14423 2001-08-16 Marc Autret <autret_m@epita.fr>
14424
14425 * src/vcg.c: Remove includes of `complain.h' and `xalloc.h'.
14426 (get_xxxx_str): Use assert () instead of complain ().
14427 Remove return invokations in default cases.
14428 (get_decision_str): Modify default behaviour. Remove second argument.
14429 Echo modifications on calls.
14430 (output_graph): Fix.
14431
14432 2001-08-16 Marc Autret <autret_m@epita.fr>
14433
14434 * src/getargs.c (usage): Update with ``-g, --graph''.
14435
14436 2001-08-16 Marc Autret <autret_m@epita.fr>
14437
14438 * doc/bison.texinfo (Bison Options): Add items `-g', `--graph'.
14439 (Option Cross Key): Likewise.
14440 * doc/bison.1: Update.
14441
14442 2001-09-25 Pascal Bart <pascal.bart@epita.fr>
14443
14444 * src/output.c (output_master_parser): Don't finish action_obstack.
14445 (output_parser): Don't care about the muscle action, here.
14446 (prepare): Copy the action_obstack in the action muscle.
14447 (output): Free action_obstack.
14448
14449 2001-09-23 Pascal Bart <pascal.bart@epita.fr>
14450
14451 * src/reader.c (parse_union_decl): Add new obstack union_obstack. Which
14452 will contain `%union' declaration.
14453 (parse_union_decl): Delete #line directive output.
14454 (parse_union_decl): Substitute /attrs_obstack/union_obstack for all
14455 informations about %union.
14456 (parse_union_decl): Copy the union_obstack in the muscle stype.
14457 * src/bison.simple: Add new #line directive.
14458 Add typdef %%stype YYSTYPE.
14459
14460 2001-09-23 Pascal Bart <pascal.bart@epita.fr>
14461
14462 * src/bison.simple: Add new `#line' directive.
14463
14464 2001-09-22 Pascal Bart <pascal.bart@epita.fr>
14465
14466 * src/bison.simple: New `#line' directive.
14467 * src/output.c (output_parser): Support new dynamic muscle input_line.
14468
14469 2001-09-22 Marc Autret <autret_m@epita.fr>
14470
14471 * src/output.c (output_master_parser): New.
14472 (output_parser): Be more re-entrant.
14473
14474 2001-09-21 Marc Autret <autret_m@epita.fr>
14475
14476 * src/reader.c (copy_definition, parse_union_decl): Update and use
14477 `linef' muscle.
14478 (copy_action): Likewise.
14479 Use obstack_1grow ().
14480 * src/muscle_tab.c (muscle_init): Add muscle `linef'.
14481
14482 2001-09-21 Marc Autret <autret_m@epita.fr>
14483
14484 * src/options.c (option_table): Adjust.
14485 * src/lex.c (parse_percent_token): Fix.
14486
14487 2001-09-20 Pascal Bart <pascal.bart@epita.fr>
14488
14489 * src/options.c (symtab.h): Include it, need by lex.h.
14490
14491 2001-09-20 Pascal Bart <pascal.bart@epita.fr>
14492
14493 * src/lex.c (parse_percent_token): Change type of variable `tx', which
14494 is now an option_table_struct*.
14495 (option_strcmp): New function option_strcmp.
14496 (parse_percent_token): Call option_strcmp.
14497 * src/getargs.c (xalloc.h, options.h): Include it.
14498 (getargs): Call create_long_option_table.
14499 (getargs): Free longopts at the end of the function.
14500 (shortopts): Move in options.c.
14501 * src/options.c (create_long_option_table): New function. Convert
14502 information from option_table to option structure.
14503 * src/reader.c (options.h): Include it.
14504
14505 * src/Makefile.am: Adjust.
14506 * src/options.c (option_table): Create from longopts and percent_table.
14507 * src/getargs.c (longopts): Delete.
14508 * src/lex.c (struct percent_table_struct): Delete.
14509 (percent_table): Delete.
14510 (options.h): Include it.
14511 * src/options.c: Create.
14512 * src/options.h: Create.
14513 Declare enum opt_access_e.
14514 Define struct option_table_struct.
14515
14516 2001-09-20 Marc Autret <autret_m@epita.fr>
14517
14518 * doc/bison.texinfo: Adjust terminologies about prologue and epilogue
14519 sections of Bison.
14520
14521 2001-09-19 Pascal Bart <pascal.bart@epita.fr>
14522
14523 * src/bison.simple: s/%%filename/%%skeleton.
14524 * src/muscle_tab.c (getargs.h): Include it.
14525 (muscle_init): Insert new muscle skeleton.
14526
14527 2001-09-18 Pascal Bart <pascal.bart@epita.fr>
14528
14529 * src/output.c (output_parser): Delete unused variable actions_dumped.
14530
14531 2001-09-07 Pascal Bart <pascal.bart@epita.fr>
14532
14533 * src/output.c (output): Delete call to reader_output_yylsp.
14534 * src/reader.c (reader): Likewise.
14535 * src/reader.h: Delete declaration of reader_output_yylsp.
14536
14537 2001-09-02 Marc Autret <autret_m@epita.fr>
14538
14539 * src/reader.c: Include muscle_tab.h.
14540 (parse_union_decl): Update.
14541 (parse_macro_decl): Rename parse_muscle_decl.
14542 Update to use renamed functions and variable.
14543 (read_declarations, copy_action, read_additionnal_code, : Updated
14544 with correct variables and functions names.
14545 (packsymbols, reader): Likewise.
14546
14547 * src/reader.h (muscle_obstack): Extern declaration update.
14548
14549 * src/output.c: Include muscle_tab.h
14550 In all functions using macro_insert, change by using muscle_insert ().
14551 (macro_obstack): Rename muscle_obstack.
14552 Echo modifications in the whole file.
14553 (MACRO_INSERT_INT): Rename MUSCLE_INSERT_INT.
14554 (MACRO_INSERT_STRING): Rename MUSCLE_INSERT_STRING.
14555 (MACRO_INSERT_PREFIX): Rename MUSCLE_INSERT_PREFIX.
14556
14557 * src/muscle_tab.h: Update double inclusion macros.
14558 (macro_entry_s): Rename muscle_entry_s.
14559 Update prototypes.
14560
14561 * src/muscle_tab.c: Include muscle_tab.h.
14562 Rename macro_tabble to muscle_table.
14563 (mhash1, mhash2, mcmp): Use muscle_entry.
14564 (macro_init): Rename muscle_init. Update.
14565 (macro_insert): Rename muscle_insert. Update.
14566 (macro_find): Rename muscle_find. Update.
14567
14568 * src/main.c: Include muscle_tab.h.
14569 (main): Call muscle_init ().
14570 * src/Makefile.am (bison_SOURCES): Echo modifications.
14571
14572 2001-09-02 Marc Autret <autret_m@epita.fr>
14573
14574 Now the files macro_tab.[ch] are named muscle_tab.[ch].
14575
14576 * src/muscle_tab.c, src/muscle_tab.h: Add files.
14577
14578 2001-09-02 Marc Autret <autret_m@epita.fr>
14579
14580 * src/macrotab.c, src/macrotab.h: Remove.
14581
14582 2001-09-01 Pascal Bart <pascal.bart@epita.fr>
14583
14584 * src/reader.c (copy_guard): Use muscle to specify the `#line'
14585 filename.
14586
14587 2001-09-01 Marc Autret <autret_m@epita.fr>
14588
14589 * tests/calc.at (exp): Now, YYERROR_VERBOSE need to be set
14590 to an explicit value to activate the feature. We do it here.
14591
14592 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
14593
14594 * src/output.c (prepare): Delete the `filename' muscule insertion.
14595 * src/reader.c (copy_action): Use `filename' muscule with `#line'.
14596 (parse_union_decl): Likewise.
14597 * src/macrotab.c (macro_init): Initialize filename by infile.
14598
14599 2001-08-31 Marc Autret <autret_m@epita.fr>
14600
14601 * src/bison.simple (YYLSP_NEEDED): New definition.
14602 * src/output.c (prepare): Add macro insertion of `locations_flag'
14603
14604 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
14605
14606 * src/output.c (prepare): Delete insertion of previous muscles,
14607 and insert the `prefix' muscles.
14608 * src/macrotab.c (macro_init): Likewise.
14609 (macro_init): Initialization prefix directive by `yy'.
14610 * src/bison.simple: Substitute all %%yylex, %%yychar, %%yylval,
14611 %%yydebug, %%yyerror, %%yynerrs and %%yyparse by yylex, yychar,
14612 yylval, yydebug, yyerror, yynerrs and yyparse.
14613 New directive `#define' to substitute yydebug, ... with option
14614 name_prefix.
14615
14616 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
14617
14618 * src/main.c (main): Standardize.
14619 * src/output.c (output_table_data, output_parser): Likewise.
14620 * src/macrotab.h, src/macrotab.c, src/bison.simple: Likewise.
14621
14622 2001-08-31 Pascal Bart <pascal.bart@epita.fr>, Marc Autret <autret_m@epita.fr>
14623
14624 * src/reader.c (read_additionnal_code): Rename %%user_code to
14625 %%epilogue.
14626 * src/output.c (output): Rename %%declarations to %%prologue.
14627 * src/bison.simple: Echo modifications.
14628
14629 2001-08-31 Marc Autret <autret_m@epita.fr>
14630
14631 * src/reader.c (readgram): CleanUp.
14632 (output_token_defines): Likewise.
14633 (packsymbols): Likewise.
14634 (reader): Likewise.
14635 * src/output.c (output): CPP-out useless code.
14636
14637 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
14638
14639 * src/reader.c (reader): Delete obsolete call to function
14640 output_trailers and output_headers.
14641 * src/output.h: Remove obsolete functions prototypes of output_headers
14642 and output_trailers.
14643
14644 2001-08-30 Pascal Bart <pascal.bart@epita.fr>
14645
14646 * src/main.c: Include macrotab.h.
14647 * src/macrotab.h (macro_entry_s): Constify fields.
14648 Adjust functions prototypes.
14649 * src/macrotab.c (macro_insert): Constify key and value.
14650 (macro_find): Constify key.
14651 (macro_insert): Include 'xalloc.h'
14652 (macro_insert): Use XMALLOC.
14653 (macro_find): Constify return value.
14654 * src/output.c (output_table_data): Rename table to table_data.
14655 (output_parser): Constify macro_key, macro_value.
14656
14657 2001-08-30 Marc Autret <autret_m@epita.fr>
14658
14659 * src/reader.c (parse_skel_decl): New.
14660 (read_declarations): Add case `tok_skel', call parse_skel_decl ().
14661 * src/lex.h (token_t): New token `tok_skel'.
14662 * src/lex.c (percent_table): Add skeleton option entry.
14663 Standardize.
14664
14665 2001-08-29 Marc Autret <autret_m@epita.fr>
14666
14667 * src/bison.simple: Add %%user_code directive at the end.
14668 * src/reader.c (read_additionnal_code): New.
14669 (reader): Use it.
14670 * src/output.c (output_program): Remove.
14671 (output): Update.
14672
14673 2001-08-28 Marc Autret <autret_m@epita.fr>
14674
14675 * src/output.c (output_actions): Clean up.
14676 (output_gram): CPP-out useless code.
14677 * src/reader.c (reader): Clean up, CPP-out useless code.
14678
14679 2001-08-28 Pascal Bart <pascal.bart@epita.fr>
14680
14681 * src/output.c (output): Copy attrs_obstack in the '%%definitions'
14682 directive.
14683 * src/bison.simple: Add `%%definitions'.
14684
14685 2001-08-28 Marc Autret <autret_m@epita.fr>
14686
14687 * config/depcomp: New file.
14688
14689 2001-08-27 Paul Eggert <eggert@twinsun.com>
14690
14691 * src/bison.simple (yyparse): Don't take the address of an
14692 item before the start of an array, as that doesn't conform to
14693 the C Standard.
14694
14695 2001-08-27 Robert Anisko <robert.anisko@epita.fr>
14696
14697 * src/output.c (output): Remove the initialization of the macro
14698 obstack. It was done too late here.
14699
14700 * src/reader.c (parse_macro_decl): Fix. Use of the macro obstack was
14701 completely wrong.
14702 (reader): Initialize the macro obstack here, since we need it to grow
14703 '%define' directives.
14704
14705 * src/reader.h: Declare the macro obstack as extern.
14706
14707 2001-08-27 Robert Anisko <robert.anisko@epita.fr>
14708
14709 * src/output.c (output_parser): Fix. Store single '%' characters in
14710 the output obstack instead of throwing them away.
14711
14712 2001-08-27 Akim Demaille <akim@epita.fr>
14713
14714 * Makefile.am (AUTOMAKE_OPTIONS): 1.5.
14715
14716 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
14717
14718 * lib/Makefile.am: Adjust.
14719
14720 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
14721
14722 * src/bison.simple: Update and add '%%' directives.
14723
14724 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
14725
14726 * src/reader.c (reader): Remove calls to 'output_headers' and
14727 'output_trailers'. Remove some C output.
14728 (readgram): Disable a piece of code that was writing a default
14729 definition for 'YYSTYPE'.
14730 (reader_output_yylsp): Remove.
14731 (packsymbols): Output token defintions to a macro.
14732 (copy_definition): Disable C output.
14733
14734 * src/reader.c (parse_macro_decl): New function used to parse macro
14735 declarations.
14736 (copy_string2): Put the body of copy_string into this new function.
14737 Add a parameter to let the caller choose whether he wants to copy the
14738 string delimiters or not.
14739 (copy_string): Be a simple call to copy_string2 with the last argument
14740 bound to true.
14741 (read_declarations): Add case for macro definition.
14742 (copy_identifier): New.
14743 (parse_macro_decl): Read macro identifiers using copy_identifier
14744 rather than lex.
14745
14746 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
14747
14748 * src/output.c (prepare): Add prefixed names.
14749 (output_parser): Output semantic actions.
14750 (output_parser): Fix bug on '%%line' directives.
14751
14752 * src/output.c (output_headers): Remove. The C code printed by this
14753 function should now be in the skeletons.
14754 (output_trailers): Remove.
14755 (output): Disable call to 'reader_output_yylsp'.
14756 (output_rule_data): Do not output tables to the table obstack.
14757
14758 * src/output.c: Remove some C dedicated output.
14759 Improve the use of macro and output obstacks.
14760 (output_defines): Remove.
14761
14762 * src/output.c (output_token_translations): Associate 'translate'
14763 table with a macro. No output to the table obstack.
14764 (output_gram): Same for 'rhs' and 'prhs'.
14765 (output_stos): Same for 'stos'.
14766 (output_rule_data): Same for 'r1' and 'r2'.
14767 (token_actions): Same for 'defact'.
14768 (goto_actions): Same for 'defgoto'.
14769 (output_base): Same for 'pact' and 'pgoto'.
14770 (output_table): Same for 'table'.
14771 (output_check): Same for 'check'.
14772
14773 * src/output.c (output_table_data): New function.
14774 (output_short_table): Remove.
14775 (output_short_or_char_table): Remove.
14776
14777 * src/output.c (output_parser): Replace most of the skeleton copy code
14778 with something new. Skeletons are now processed character by character
14779 rather than line by line, and Bison looks for '%%' macros. This is the
14780 first step in making Bison's output process (a lot) more flexible.
14781 (output_parser): Use the macro table.
14782
14783 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
14784
14785 * src/main.c (main): Initialize the macro table.
14786
14787 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
14788
14789 * src/lex.c (percent_table): Add tok_define.
14790 * src/lex.h: Add tok_define.
14791
14792 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
14793
14794 * src/macrotab.c: New file.
14795 * src/macrotab.h: New file.
14796 * src/Makefile.am: Update.
14797
14798 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
14799
14800 * lib/hash.c: New file.
14801 * lib/hash.h: New file.
14802 * lib/Makefile.am: Update.
14803
14804 2001-08-15 Akim Demaille <akim@epita.fr>
14805
14806 Version 1.28c.
14807
14808 2001-08-15 Marc Autret <autret_m@epita.fr>
14809
14810 * src/reader.c (readgram): Indent output macro YYSTYPE.
14811 (packsymbols): Likewise.
14812 (output_token_defines): Likewise.
14813 * src/files.c: Standardize.
14814 (compute_header_macro): New.
14815 (defines_obstack_save): New. Use compute_header_macro.
14816 (output_files): Update. Use defines_obstack_save.
14817
14818 2001-08-15 Akim Demaille <akim@epita.fr>
14819
14820 * doc/bison.texinfo (Table of Symbols): Document
14821 YYSTACK_USE_ALLOCA.
14822
14823 2001-08-15 Akim Demaille <akim@epita.fr>
14824
14825 * missing: Update from CVS Automake.
14826 * config/config.guess, config/config.sub, config/texinfo.tex:
14827 Update from gnu.org.
14828
14829 2001-08-15 Akim Demaille <akim@epita.fr>
14830
14831 * Makefile.maint: Sync with CVS Autoconf.
14832
14833 2001-08-14 Pascal Bart <pascal.bart@epita.fr>
14834
14835 * doc/bison.texinfo: Include GNU Free Documentation License from
14836 `fdl.texi'.
14837 * doc/fdl.texi: Add to package.
14838
14839 2001-08-14 Marc Autret <autret_m@epita.fr>
14840
14841 Turn on %{source,header}_extension features.
14842
14843 * src/lex.c (percent_table): Un-CPP out header_extension and
14844 source_extension.
14845 * src/files.c (compute_exts_from_gf): Compare pointers with NULL.
14846 (compute_exts_from_src): Remove conditions. It restores priorities
14847 between options.
14848
14849 2001-08-14 Marc Autret <autret_m@epita.fr>
14850
14851 * src/files.c (compute_base_names): Add extensions computing when
14852 `--file-prefix' used.
14853 Standardize function calls.
14854
14855 2001-08-13 Marc Autret <autret_m@epita.fr>
14856
14857 * src/bison.simple (YYSTACK_USE_ALLOCA): Changed to allow users
14858 defining it (defined but null disables alloca).
14859
14860 2001-08-13 Marc Autret <autret_m@epita.fr>
14861
14862 * src/bison.simple (_yy_memcpy): CPP reformat.
14863
14864 2001-08-13 Pascal Bart <pascal.bart@epita.fr>
14865
14866 * tests/atconfig.in (CPPFLAGS): Fix.
14867
14868 2001-08-10 Pascal Bart <pascal.bart@epita.fr>
14869
14870 * doc/bison.texinfo: Include GNU General Public License from
14871 `gpl.texi'.
14872 * doc/gpl.texi: Add to package.
14873
14874 2001-08-10 Marc Autret <autret_m@epita.fr>
14875
14876 * src/print_graph.h: Fix.
14877 * src/reader.c (read_declarations): Use parse_header_extension_decl ().
14878
14879 2001-08-10 Akim Demaille <akim@epita.fr>
14880
14881 * src/system.h: Provide default declarations for stpcpy, strndup,
14882 and strnlen.
14883
14884 2001-08-10 Robert Anisko <anisko_r@epita.fr>
14885
14886 * doc/bison.texinfo (Locations): Update @$ stuff.
14887
14888 2001-08-09 Robert Anisko <anisko_r@epita.fr>
14889
14890 * src/bison.simple (YYLLOC_DEFAULT): Update.
14891 (yyparse): Adjust.
14892
14893 2001-08-08 Marc Autret <autret_m@epita.fr>
14894
14895 * doc/bison.texinfo: Change @samp{$<@dots{}>} to
14896 @samp{$<@dots{}>@var{n}} in Section Actions in Mid-Rule.
14897 Reported by Fabrice Bauzac.
14898
14899 2001-08-08 Marc Autret <autret_m@epita.fr>
14900
14901 * src/vcg_default.h: Use NULL instead of 0 to initialize pointers.
14902 * src/vcg.c (output_node): Fix.
14903 * src/vcg.h: Cleanup.
14904 * src/print_graph.c: Add comments.
14905 (node_output_size): New global variable. Simplify the formatting of
14906 the VCG graph output.
14907 (print_actions): Unused code is now used. It notifies the final state
14908 and no action states in the VCG graph. It also give the reduce actions.
14909 The `shift and goto' edges are red and the `go to state' edges are
14910 blue.
14911 Get the current node name and node_obstack by argument.
14912 (node_obstack): New variable.
14913 (print_state): Manage node_obstack.
14914 (print_core): Use node_obstack given by argument.
14915 A node is not only computed here but in print_actions also.
14916 (print_graph): CPP out useless code instead of commenting it.
14917
14918 2001-08-07 Pascal Bart <pascal.bart@epita.fr>
14919
14920 * tests/atconfig.in (CPPFLAGS): Fix.
14921
14922 2001-08-07 Akim Demaille <akim@epita.fr>
14923
14924 * src/print_graph.c (quote): New.
14925 (print_core): Use it.
14926
14927 2001-08-06 Akim Demaille <akim@epita.fr>, Marc Autret <autret_m@epita.fr>
14928
14929 * src/vcg.c (complain.h): Include it.
14930 Unepitaize `return' invocations.
14931 [NDEBUG] (main): Remove.
14932 * src/vcg.h (node_t, edge_t, graph_t): Constify the char * members.
14933 * src/files.c (open_files): Initialize graph_obstack.
14934 * src/print_graph.c (print_actions): CPP out useless code.
14935 (print_core): Don't output the last `\n' in labels.
14936 Use `quote'.
14937 * src/files.c (output_files): Output the VCG file.
14938 * src/main.c (main): Invoke print_graph ();
14939
14940 2001-08-06 Marc Autret <autret_m@epita.fr>
14941
14942 Automaton VCG graph output.
14943 Using option ``-g'' or long option ``--graph'', you can generate
14944 a gram_filename.vcg file containing a VCG description of the LALR (1)
14945 automaton of your grammar.
14946
14947 * src/main.c: Call to print_graph() function.
14948 * src/getargs.h: Update.
14949 * src/getargs.c (options): Update to catch `-g' and `--graph' options.
14950 (graph_flag): New flag.
14951 (longopts): Update.
14952 (getargs): Add case `g'.
14953 * src/files.c (graph_obstack): New obstack struct.
14954 (open_files): Initialize new obstack.
14955 (output_files): Saves graph_obstack if required.
14956 * src/files.h (graph_obstack): New extern declaration.
14957 * src/Makefile.am: Add new source files.
14958
14959 2001-08-06 Marc Autret <autret_m@epita.fr>
14960
14961 * src/print_graph.c, src/print_graph.h (graph): New.
14962 * src/vcg.h: New file.
14963 * src/vcg.c: New file, VCG graph handling.
14964
14965 2001-08-06 Marc Autret <autret_m@epita.fr>
14966
14967 Add of %source_extension and %header_extension which specify
14968 the source or/and the header output file extension.
14969
14970 * src/files.c (compute_base_names): Remove initialisation of
14971 src_extension and header_extension.
14972 (compute_exts_from_gf): Update.
14973 (compute_exts_from_src): Update.
14974 (output_files): Update.
14975 * src/reader.c (parse_header_extension_decl): New.
14976 (parse_source_extension_decl): New.
14977 (read_declarations): New case statements for the new tokens.
14978 * src/lex.c (percent_table): Add entries for %source_extension
14979 and %header_extension.
14980 * src/lex.h (token_e): New tokens tok_hdrext and tok_srcext.
14981
14982 2001-08-06 Marc Autret <autret_m@epita.fr>
14983
14984 * configure.in: Bump to 1.28c.
14985 * doc/bison.texinfo: Texinfo thingies.
14986
14987 2001-08-04 Pascal Bart <pascal.bart@epita.fr>
14988
14989 * tests/atconfig.in (CPPFLAGS): Add.
14990 * tests/calc.at (AT_CHECK): Use CPPFLAGS.
14991
14992 2001-08-03 Akim Demaille <akim@epita.fr>
14993
14994 Version 1.28b.
14995
14996 2001-08-03 Akim Demaille <akim@epita.fr>
14997
14998 * tests/Makefile.am (check-local): Ship testsuite.
14999 * tests/calc.at (_AT_DATA_CALC_Y): Prototype all the functions.
15000 Include `string.h'.
15001
15002 2001-08-03 Akim Demaille <akim@epita.fr>
15003
15004 * configure.in: Try using -Wformat when compiling.
15005
15006 2001-08-03 Akim Demaille <akim@epita.fr>
15007
15008 * configure.in: Bump to 1.28b.
15009
15010 2001-08-03 Akim Demaille <akim@epita.fr>
15011
15012 * src/complain.c: Adjust strerror_r portability issues.
15013
15014 2001-08-03 Akim Demaille <akim@epita.fr>
15015
15016 Version 1.28a.
15017
15018 2001-08-03 Akim Demaille <akim@epita.fr>
15019
15020 * src/getargs.c, src/getarg.h (skeleton)): Constify.
15021 * src/lex.c (literalchar): Avoid name clashes on `buf'.
15022 * src/getargs.c: Include complain.h.
15023 * src/files.c, src/files.h (skeleton_find): Avoid name clashes.
15024 * lib/quotearg.c, lib/quotearg.h: Update from fileutils 4.1.
15025
15026 2001-08-03 Akim Demaille <akim@epita.fr>
15027
15028 * src/reader.c (readgram): Display hidden chars in error messages.
15029
15030 2001-08-03 Akim Demaille <akim@epita.fr>
15031
15032 Update to gettext 0.10.39.
15033
15034 2001-08-03 Akim Demaille <akim@epita.fr>
15035
15036 * lib/strspn.c: New.
15037
15038 2001-08-01 Marc Autret <autret_m@epita.fr>
15039
15040 * doc/bison.texinfo: Update.
15041 * doc/bison.1 (mandoc): Update.
15042 * src/system.h (EXT_GUARD_C, EXT_STYPE_H): Remove .c and .h.
15043 * src/files.c: Support output files extensions computing.
15044 (src_extension): New static variable.
15045 (header_extension): New static variable.
15046 (tr): New function.
15047 (get_extension_index): New function, gets the index of an extension
15048 filename in a string.
15049 (compute_exts_from_gf): New function, computes extensions from the
15050 grammar file extension.
15051 (compute_exts_from_src): New functions, computes extensions from the
15052 C source file extension, file given by ``-o'' option.
15053 (compute_base_names): Update.
15054 (output_files): Update.
15055
15056 2001-08-01 Robert Anisko <anisko_r@epita.fr>
15057
15058 * doc/bison.texi: Document @$.
15059 (Locations): New section.
15060
15061 2001-07-18 Akim Demaille <akim@epita.fr>
15062
15063 * Makefile.maint, GNUmakefile: New, from Autoconf 2.52.
15064 * config/prev-version.txt, config/move-if-change: New.
15065 * Makefile.am: Adjust.
15066
15067 2001-07-08 Pascal Bart <pascal.bart@epita.fr>
15068
15069 * src/bison.simple (yyparse): Suppress warning `comparaison
15070 between signed and unsigned'.
15071
15072 2001-07-05 Pascal Bart <pascal.bart@epita.fr>
15073
15074 * src/getargs.h (raw_flag): Remove.
15075 * src/getargs.c: Die on `-r'/`--raw'.
15076 * src/lex.c (parse_percent_token): Die on `%raw'.
15077 * src/reader.c (output_token_defines): Suppress call to `raw_flag'.
15078 * tests/calc.at: Suppress test with option `--raw'.
15079
15080 2001-07-14 Akim Demaille <akim@epita.fr>
15081
15082 * config/: New.
15083 * configure.in: Require Autoconf 2.50.
15084 Update to gettext 0.10.38.
15085
15086 2001-03-16 Akim Demaille <akim@epita.fr>
15087
15088 * doc/bison.texinfo: ANSIfy the examples.
15089
15090 2001-03-16 Akim Demaille <akim@epita.fr>
15091
15092 * getargs.c (skeleton): New variable.
15093 (longopts): --skeleton is a new option.
15094 (shortopts, getargs): -S is a new option.
15095 * getargs.h: Declare skeleton.
15096 * output.c (output_parser): Use it.
15097
15098 2001-03-16 Akim Demaille <akim@epita.fr>
15099
15100 * m4/strerror_r.m4: New.
15101 * m4/error.m4: Run AC_FUNC_STRERROR_R.
15102 * lib/error.h, lib/error.c: Update.
15103
15104 2001-03-16 Akim Demaille <akim@epita.fr>
15105
15106 * src/getargs.c (longopts): Clean up.
15107
15108 2001-02-21 Akim Demaille <akim@epita.fr>
15109
15110 * src/reader.c (gensym): `gensym_count' is your own.
15111 Use a static buf to create the symbol name, as token_buffer is no
15112 longer a buffer.
15113
15114 2001-02-08 Akim Demaille <akim@epita.fr>
15115
15116 * src/conflicts.c (conflict_report): Be sure not to append to res
15117 between two calls, which could happen if both first sprintf were
15118 skipped, but not the first cp += strlen.
15119
15120 2001-02-08 Akim Demaille <akim@epita.fr>
15121
15122 * lib/memchr.c, lib/stpcpy.c, lib/strndup.c, lib/strnlen.c:
15123 New, from fileutils 4.0.37.
15124 * configure.in: Require Autoconf 2.49c. I took some time before
15125 making this decision. This is the only way out for portability
15126 issues in Bison, it would mean way too much duplicate effort to
15127 import in Bison features implemented in 2.49c since 2.13.
15128 AC_REPLACE_FUNCS and AC_CHECK_DECLS the functions above.
15129
15130 2001-02-02 Akim Demaille <akim@epita.fr>
15131
15132 * lib/malloc.c, lib/realloc.c: New, from the fileutils 4.0.37.
15133 * lib/xalloc.h, lib/xmalloc.c: Update.
15134
15135 2001-01-19 Akim Demaille <akim@epita.fr>
15136
15137 Get rid of the ad hoc handling of token_buffer in the scanner: use
15138 the obstacks.
15139
15140 * src/lex.c (token_obstack): New.
15141 (init_lex): Initialize it. No longer call...
15142 (grow_token_buffer): this. Remove it.
15143 Adjust all the places which used it to use the obstack.
15144
15145 2001-01-19 Akim Demaille <akim@epita.fr>
15146
15147 * src/lex.h: Rename all the tokens:
15148 s/\bENDFILE\b/tok_eof/g;
15149 s/\bIDENTIFIER\b/tok_identifier/g;
15150 etc.
15151 Let them be enums, not #define, to ease debugging.
15152 Adjust all the code.
15153
15154 2001-01-18 Akim Demaille <akim@epita.fr>
15155
15156 * src/lex.h (MAXTOKEN, maxtoken, grow_token_buffer): Remove, private.
15157 * src/lex.c (maxtoken, grow_token_buffer): Static.
15158
15159 2001-01-18 Akim Demaille <akim@epita.fr>
15160
15161 Since we now use obstacks, more % directives can be enabled.
15162
15163 * src/lex.c (percent_table): Also accept `%yacc',
15164 `%fixed_output_files', `%defines', `%no_parser', `%verbose', and
15165 `%debug'.
15166 Handle the actions for `%semantic_parser' and `%pure_parser' here,
15167 instead of returning a token.
15168 * src/lex.h (SEMANTIC_PARSER, PURE_PARSER): Remove, unused.
15169 * src/reader.c (read_declarations): Adjust.
15170 * src/files.c (open_files): Don't call `compute_base_names', don't
15171 compute `attrsfile' since they depend upon data which might be
15172 *in* the input file now.
15173 (output_files): Do it here.
15174 * src/output.c (output_headers): Document the fact that this patch
15175 introduces a guaranteed SEGV for semantic parsers.
15176 * doc/bison.texinfo: Document them.
15177 * tests/suite.at: Exercise these %options.
15178
15179 2000-12-20 Akim Demaille <akim@epita.fr>
15180
15181 Also handle the output file (--verbose) with obstacks.
15182
15183 * files.c (foutput): Remove.
15184 (output_obstack): New.
15185 Adjust all dependencies.
15186 * src/conflicts.c: Return a string.
15187 * src/system.h (obstack_grow_string): Rename as...
15188 (obstack_sgrow): this. Be ready to work with non literals.
15189 (obstack_fgrow4): New.
15190
15191 2000-12-20 Akim Demaille <akim@epita.fr>
15192
15193 * src/files.c (open_files): Fix the computation of short_base_name
15194 in the case of `-o foo.tab.c'.
15195
15196 2000-12-20 Akim Demaille <akim@epita.fr>
15197
15198 * src/reader.c (copy_string, copy_comment, copy_comment2, copy_at)
15199 (copy_dollar): Now that everything uses obstacks, get rid of the
15200 FILE * parameters.
15201
15202 2000-12-20 Akim Demaille <akim@epita.fr>
15203
15204 * src/files.c (open_files): Actually the `.output' file is based
15205 on the short_base_name, not base_name.
15206 * tests/suite.at (Checking output file names): Adjust.
15207
15208 2000-12-20 Akim Demaille <akim@epita.fr>
15209
15210 * src/bison.s1: Remove, we now use directly...
15211 * src/bison.simple: this.
15212 * src/Makefile.am: Use pkgdata instead of data.
15213
15214 2000-12-20 Akim Demaille <akim@epita.fr>
15215
15216 * src/files.c (guard_obstack): New.
15217 (open_files): Initialize it.
15218 (output_files): Dump it...
15219 * src/files.h: Export it.
15220 * src/reader.c (copy_guard): Use it.
15221
15222 2000-12-19 Akim Demaille <akim@epita.fr>
15223
15224 * src/files.c (outfile, defsfile, actfile): Removed as global
15225 vars.
15226 (open_files): Don't compute them.
15227 (output_files): Adjust.
15228 (base_name, short_base_name): Be global.
15229 Adjust dependencies.
15230
15231 2000-12-19 Akim Demaille <akim@epita.fr>
15232
15233 * src/files.c (strsuffix): New.
15234 (stringappend): Be just like strcat but allocate.
15235 (base_names): Eve out from open_files.
15236 Try to simplify the rather hairy computation of base_name and
15237 short_base_name.
15238 (open_files): Use it.
15239 * tests/suite.at (Checking output file names): New test.
15240
15241 2000-12-19 Akim Demaille <akim@epita.fr>
15242
15243 * src/system.h (obstack_grow_literal_string): Rename as...
15244 (obstack_grow_string): this.
15245 * src/output.c (output_parser): Recognize `%% actions' instead of
15246 `$'.
15247 * src/bison.s1: s/$/%% actions/.
15248 * src/bison.hairy: Likewise.
15249
15250 2000-12-19 Akim Demaille <akim@epita.fr>
15251
15252 * src/output.c (output_parser): Compute the `#line' lines when
15253 there are.
15254 * src/Makefile.am (bison.simple): Be a simple copy of bison.s1.
15255 Suggested by Hans Aberg.
15256
15257 2000-12-19 Akim Demaille <akim@epita.fr>
15258
15259 Let the handling of the skeleton files be local to the procedures
15260 that use it.
15261
15262 * src/files.c (xfopen, xfclose, skeleton_find, guardfile): No
15263 longer static.
15264 (fparser, open_extra_files): Remove.
15265 (open_files, output_files): Don't take care of fparser.
15266 * src/files.h: Adjust.
15267 * src/output.c (output_parser): Open and close the file to the
15268 skeleton.
15269 * src/reader.c (read_declarations): When %semantic_parser, open
15270 fguard.
15271
15272 2000-12-19 Akim Demaille <akim@epita.fr>
15273
15274 * src/file.h (BISON_SIMPLE, BISON_HAIRY): Move from here...
15275 * src/system.h (BISON_SIMPLE, BISON_HAIRY): ... to here.
15276
15277 2000-12-19 Akim Demaille <akim@epita.fr>
15278
15279 * src/files.c (open_files): Yipee! We no longer need all the code
15280 looking for `/tmp' since we have no tmp file.
15281
15282 2000-12-19 Akim Demaille <akim@epita.fr>
15283
15284 * src/system.h (EXT_TAB, EXT_OUTPUT, EXT_STYPE_H, EXT_GUARD_C):
15285 New macros.
15286 * src/files.c (open_files): Less dependency on MSDOS etc.
15287
15288 2000-12-14 Akim Demaille <akim@epita.fr>
15289
15290 * src/bison.s1 (YYLLOC_DEFAULT): New macro.
15291 Provide a default definition.
15292 Use it when executing the default @ action.
15293 * src/reader.c (reader_output_yylsp): No longer include
15294 `timestamp' and `text' in the default YYLTYPE.
15295
15296 2000-12-12 Akim Demaille <akim@epita.fr>
15297
15298 * src/reader.c (copy_definition, parse_union_decl, copy_action)
15299 (copy_guard): Quote the file names.
15300 Reported by Laurent Mascherpa.
15301
15302 2000-12-12 Akim Demaille <akim@epita.fr>
15303
15304 * src/output.c (output_headers, output_program, output): Be sure
15305 to escape special characters when outputting filenames.
15306 (ACTSTR_PROLOGUE, ACTSTR_EPILOGUE): Remove.
15307 (output_headers): Don't depend on them, Use ACTSTR.
15308
15309 2000-11-17 Akim Demaille <akim@epita.fr>
15310
15311 * lib/obstack.h: Formatting changes.
15312 (obstack_grow, obstack_grow0): Don't cast WHERE at all: it
15313 prevents type checking.
15314 (obstack_ptr_grow, obstack_ptr_grow_fast): When assigning, don't
15315 cast the value to (void *): assigning a `foo *' to a `void *'
15316 variable is valid.
15317 (obstack_int_grow, obstack_int_grow_fast): Don't cast AINT to int.
15318 * src/reader.c (parse_union_decl): Typo: use obstack_1grow to
15319 append characters.
15320
15321 2000-11-17 Akim Demaille <akim@epita.fr>
15322
15323 * tests/Makefile.am (suite.m4, regression.m4, calc.m4): Rename
15324 as...
15325 (suite.m4, regression.m4, calc.m4): these.
15326 * tests/atgeneral.m4: Update from CVS Autoconf.
15327
15328 2000-11-17 Akim Demaille <akim@epita.fr>
15329
15330 * tests/regression.m4 (%union and --defines): New test,
15331 demonstrating a current bug in the obstack implementation.
15332
15333 2000-11-17 Akim Demaille <akim@epita.fr>
15334
15335 * src/bison.s1 (_YY_DECL_VARIABLES, YY_DECL_VARIABLES): New
15336 macros.
15337 Use them to declare the variables which are global or local to
15338 `yyparse'.
15339
15340 2000-11-17 Akim Demaille <akim@epita.fr>
15341
15342 * acconfig.h: Remove, no longer used.
15343
15344 2000-11-07 Akim Demaille <akim@epita.fr>
15345
15346 * src: s/Copyright (C)/Copyright/g.
15347
15348 2000-11-07 Akim Demaille <akim@epita.fr>
15349
15350 * src/reader.c (reader): #define YYLSP_NEEDED to 1 instead of just
15351 defining.
15352 * src/bison.s1: s/#ifdef YYLSP_NEEDED/#if YYLSP_NEEDED/.
15353
15354 2000-11-07 Akim Demaille <akim@epita.fr>
15355
15356 * src/bison.s1 (YYLEX): Use #if instead of #ifdef.
15357 Merge in a single CPP if/else.
15358
15359 2000-11-07 Akim Demaille <akim@epita.fr>
15360
15361 * src/output.c (output): Remove useless variables.
15362 * lib/obstack.c (obstack_grow, obstack_grow0): Rename the second
15363 argument `data' for consistency with the prototypes.
15364 Qualify it `const'.
15365 (obstack_copy, obstack_copy0): Rename the second argument as
15366 `address' for consistency. Qualify it `const'.
15367 * lib/obstack.h (obstack_copy, obstack_copy0, obstack_grow)
15368 (obstack_grow0, obstack_ptr_grow, obstack_ptr_grow_fast): Qualify
15369 `const' their input argument (`data' or `address').
15370 Adjust the corresponding macros to include `const' in casts.
15371
15372 2000-11-03 Akim Demaille <akim@epita.fr>
15373
15374 * src/Makefile.am (INCLUDES): s/PFILE/BISON_SIMPLE/.
15375 s/PFILE1/BISON_HAIRY/.
15376 Adjust dependencies.
15377
15378 2000-11-03 Akim Demaille <akim@epita.fr>
15379
15380 For some reason, this was not applied.
15381
15382 * src/files.c [VMS]: No longer include `ssdef.h', no longer define
15383 `unlink': it's no longer used.
15384
15385 2000-11-03 Akim Demaille <akim@epita.fr>
15386
15387 * src/files.c (skeleton_find): New function, eved out of...
15388 (open_files, open_extra_files): here.
15389
15390 2000-11-03 Akim Demaille <akim@epita.fr>
15391
15392 Don't use `atexit'.
15393
15394 * src/files.c (obstack_save): New function.
15395 (done): Rename as...
15396 (output_files): this.
15397 Use `obstack_save'.
15398 * src/main.c (main): Don't use `atexit' to register `done', since
15399 it no longer has to remove tmp files, just call `output_files'
15400 when there are no errors.
15401
15402 2000-11-02 Akim Demaille <akim@epita.fr>
15403
15404 * src/files.c [VMS]: No longer include `ssdef.h', no longer define
15405 `unlink': it's no longer used.
15406 * src/files.h: Formatting changes.
15407
15408 2000-11-02 Akim Demaille <akim@epita.fr>
15409
15410 Remove the last uses of mktemp and unlink/delete.
15411
15412 * src/files.c (fdefines, ftable): Removed.
15413 (defines_ostack, table_obstack): New.
15414 Adjust dependencies of the former into uses of the latter.
15415 * src/output.c (output_short_or_char_table, output_short_table):
15416 Convert to using obstacks.
15417 * src/reader.c (copy_comment2): Accept one FILE * and two
15418 obstacks.
15419 (output_token_defines, reader_output_yylsp): Use obstacks.
15420 * src/system.h (obstack_fgrow3): New.
15421 * po/POTFILES.in: Adjust.
15422
15423 2000-11-01 Akim Demaille <akim@epita.fr>
15424
15425 Change each use of `fattrs' into a use of `attrs_obstack'.
15426
15427 * src/reader.c (copy_at): Typo: s/yylloc/yyloc/.
15428 * src/files.c (fattrs): Remove.
15429 (attrs_obstack): New.
15430 Adjust all dependencies.
15431 (done): If SEMANTIC_PARSER, dump attrs_obstack into attrsfile.
15432
15433 2000-11-01 Akim Demaille <akim@epita.fr>
15434
15435 Introduce obstacks.
15436 Change each use of `faction' into a use of `action_obstack'.
15437
15438 * lib/obstack.h, lib/obstack.c: New files.
15439 * src/files.c (faction): Remove.
15440 (action_obstack): New.
15441 Adjust all dependencies.
15442
15443 2000-10-20 Akim Demaille <akim@epita.fr>
15444
15445 * lib/quote.h (PARAMS): New macro. Use it.
15446
15447 2000-10-16 Akim Demaille <akim@epita.fr>
15448
15449 * src/output.c (output_short_or_char_table): New function.
15450 (output_short_table, output_token_translations): Use it.
15451 (goto_actions): Use output_short_table.
15452
15453 2000-10-16 Akim Demaille <akim@epita.fr>
15454
15455 * src/symtab.c (bucket_new): New function.
15456 (getsym): Use it.
15457
15458 * src/output.c (output_short_table): New argument to display the
15459 comment associated with the table.
15460 Adjust dependencies.
15461 (output_gram): Use it.
15462 (output_rule_data): Nicer output layout for YYTNAME.
15463
15464 2000-10-16 Akim Demaille <akim@epita.fr>
15465
15466 * src/lex.c (read_typename): New function.
15467 (lex): Use it.
15468 * src/reader.c (copy_dollar): Likewise.
15469
15470 2000-10-16 Akim Demaille <akim@epita.fr>
15471
15472 * src/reader.c (copy_comment2): Expect the input stream to be on
15473 the `/' which is suspected to open a comment, instead of being
15474 called after `//' or `/*' was read.
15475 (copy_comment, copy_definition, parse_union_decl, copy_action)
15476 (copy_guard): Adjust.
15477
15478 2000-10-16 Akim Demaille <akim@epita.fr>
15479
15480 * src/reader.c (parse_expect_decl): Use `skip_white_space' and
15481 `read_signed_integer'.
15482
15483 2000-10-16 Akim Demaille <akim@epita.fr>
15484
15485 * src/reader.c (copy_dollar): New function.
15486 (copy_guard, copy_action): Use it.
15487
15488 2000-10-16 Akim Demaille <akim@epita.fr>
15489
15490 * lib/quote.h, lib/quote.c, lib/quotearg.h, lib/quotearg.c:
15491 * m4/prereq.m4, m4/c-bs-a.m4, m4/mbstate.m4:
15492 New files, from Fileutils 4.0.27.
15493 * src/main.c (printable_version): Remove.
15494 * src/lex.c, src/reader.c: Use `quote'.
15495
15496 2000-10-04 Akim Demaille <akim@epita.fr>
15497
15498 * lib/error.c, lib/error.h: New files, needed by xmalloc.c.
15499
15500 2000-10-04 Akim Demaille <akim@epita.fr>
15501
15502 * doc/bison.texinfo: Various typos spotted by Neil Booth.
15503
15504 2000-10-04 Akim Demaille <akim@epita.fr>
15505
15506 When a literal string is used to define two different tokens,
15507 `bison -v' segfaults.
15508 Reported by Piotr Gackiewicz, and fixed by Neil Booth.
15509
15510 * tests/regression.m4: New file.
15511 Include the core of the sample provided by Piotr Gackiewicz.
15512 * src/reader.c (parse_token_decl): Diagnose bad cases, and proceed
15513 properly.
15514
15515 2000-10-04 Akim Demaille <akim@epita.fr>
15516
15517 * src/reader.c (parse_expect_decl): Keep `count' within the size
15518 of `buffer'.
15519 From Neil Booth.
15520
15521 2000-10-02 Paul Eggert <eggert@twinsun.com>
15522
15523 * bison.s1 (yyparse): Assign the default value
15524 unconditionally, to avoid a GCC warning and make the parser a
15525 tad smaller.
15526
15527 2000-10-02 Akim Demaille <akim@epita.fr>
15528
15529 * src/getargs.c (getargs): Don't dump `--help' on unrecognized
15530 options.
15531
15532 2000-10-02 Akim Demaille <akim@epita.fr>
15533
15534 * src/derives.c, src/print.c, src/reduce.c: To ease the
15535 translation, move some `\n' out of the translated strings.
15536
15537 2000-10-02 Akim Demaille <akim@epita.fr>
15538
15539 The location tracking mechanism is precious for parse error
15540 messages. Nevertheless, it is enabled only when `@n' is used in
15541 the grammar, which is a different issue (you can use it in error
15542 message, but not in the grammar per se). Therefore, there should
15543 be another means to enable it.
15544
15545 * src/getargs.c (getargs): Support `--locations'.
15546 (usage): Report it.
15547 * src/getargs.h (locationsflag): Export it.
15548 * src/lex.c (percent_table): Support `%locations'.
15549 * src/reader.c (yylsp_needed): Remove this variable, now replaced
15550 with `locationsflag'.
15551 * doc/bison.texinfo: Document `--locations' and `%locations'.
15552 Sort the options.
15553 * tests/calc.m4: Test it.
15554
15555 For regularity of the names, replace each
15556 (nolineflag, toknumflag, rawtokenumflag, noparserflag): with...
15557 (no_lineflag, token_tableflag, rawflag, no_parserflag): this.
15558 In addition replace each `flag' with `_flag'.
15559
15560 2000-10-02 Akim Demaille <akim@epita.fr>
15561
15562 Also test parse error messages, including with YYERROR_VERBOSE.
15563
15564 * tests/calc.m4 (calc.y): Add support for `exp = exp' (non
15565 associative).
15566 Use it to check the computations.
15567 Use it to check `nonassoc' is honored.
15568 (AT_DATA_CALC_Y): Equip `calc.y' with YYERROR_VERBOSE when passed
15569 `--yyerror-verbose'.
15570 (_AT_CHECK_CALC): Adjust to this option.
15571 (_AT_CHECK_CALC_ERROR): New macro to check parse error messages.
15572
15573 2000-10-02 Akim Demaille <akim@epita.fr>
15574
15575 Test also `--verbose', `--defines' and `--name-prefix'. Testing
15576 the latter demonstrates a flaw in the handling of non debugging
15577 parsers introduced by myself on 2000-03-16: `#define yydebug 0'
15578 was used in order to simplify:
15579
15580 #if YYDEBUG
15581 if (yydebug)
15582 {
15583 ...
15584 }
15585 #endif
15586
15587 into
15588
15589 if (yydebug)
15590 {
15591 ...
15592 }
15593
15594 unfortunately this leads to a CPP conflict when
15595 `--name-prefix=foo' is used since it produces `#define yydebug
15596 foodebug'.
15597
15598 * src/bison.s1 [!YYDEBUG]: Do not define yydebug.
15599 (YYDPRINTF): New macro.
15600 Spread its use.
15601 * tests/calc.m4 (AT_CHECK_CALC): Do require a title, build it from
15602 the bison options.
15603 Also test `--verbose', `--defines' and `--name-prefix'.
15604
15605 2000-10-02 Akim Demaille <akim@epita.fr>
15606
15607 Improve the readability of the produced parsers.
15608
15609 * src/bison.s1: Formatting changes.
15610 Improve the comment related to the `$' mark.
15611 (yydefault): Don't fall through to `yyresume': `goto' there.
15612 * src/output.c (output_parser): When the `$' is met, skip the end
15613 of its line.
15614 New variable, `number_of_dollar_signs', to check there's exactly
15615 one `$' in the parser skeleton.
15616
15617 2000-10-02 Akim Demaille <akim@epita.fr>
15618
15619 * lib/xstrdup.c: New file, from the fileutils.
15620 * src/reader.c (parse_token_decl, get_type_name, parse_type_decl)
15621 (parse_assoc_decl, parse_thong_decl, get_type): Use `xstrdup'
15622 instead of strlen + xmalloc + strcpy.
15623 * src/symtab.c (copys): Remove, use xstrdup instead.
15624
15625 2000-10-02 Akim Demaille <akim@epita.fr>
15626
15627 * src/gram.h (associativity): New enum type which replaces the
15628 former CPP macros `RIGHT_ASSOC', `LEFT_ASSOC' and `NON_ASSOC' with
15629 `right_assoc', `left_assoc' and `non_assoc'.
15630 Adjust all dependencies.
15631 * src/reader.c: Formatting changes.
15632 (LTYPESTR): Don't define it, use it as a literal in
15633 `reader_output_yylsp'.
15634 * src/symtab.h (symbol_class): New enum type which replaces the
15635 former CPP macros `SUNKNOWN', `STOKEN and `SNTERM' with
15636 `sunknown', `stoken and `snterm'.
15637
15638 2000-10-02 Akim Demaille <akim@epita.fr>
15639
15640 * src/getargs.c (fixed_outfiles): Rename as...
15641 (yaccflag): for consistency and accuracy.
15642 Adjust dependencies.
15643
15644 2000-10-02 Akim Demaille <akim@epita.fr>
15645
15646 Use the more standard files `xalloc.h' and `xmalloc.c' instead of
15647 Bison's `allocate.c' and `alloc.h'. This patch was surprisingly
15648 difficult and introduced a lot of core dump. It turns out that
15649 Bison used an implementation of `xmalloc' based on `calloc', and
15650 at various places it does depend upon the initialization to 0. I
15651 have not tried to isolate the pertinent places, and all the former
15652 calls to Bison's `xmalloc' are now using `XCALLOC'. Someday,
15653 someone should address this issue.
15654
15655 * src/allocate.c, src/alloc.h, m4/bison-decl.m4: Remove.
15656 * lib/xmalloc.c, lib/xalloc.h, m4/malloc.m4, m4/realloc.m4: New
15657 files.
15658 Adjust dependencies.
15659 * src/warshall.h: New file.
15660 Propagate.
15661
15662 2000-10-02 Akim Demaille <akim@epita.fr>
15663
15664 Various anti-`extern in *.c' changes.
15665
15666 * src/system.h: Include `assert.h'.
15667
15668 2000-10-02 Akim Demaille <akim@epita.fr>
15669
15670 * src/state.h (nstates, final_state, first_state, first_shift)
15671 (first_reduction): Move their exportation from here...
15672 * src/LR0.h: to here.
15673 Adjust dependencies.
15674 * src/getargs.c (statisticsflag): New variable.
15675 Add support for `--statistics'.
15676 Adjust dependencies.
15677
15678 Remove a lot of now useless `extern' statements in most files.
15679
15680 2000-10-02 Akim Demaille <akim@epita.fr>
15681
15682 * src/LR0.h: New file.
15683 Propagate its use.
15684
15685 2000-10-02 Akim Demaille <akim@epita.fr>
15686
15687 * src/print.h: New file.
15688 Propagate its use.
15689 * src/print.c: Formatting and ordering changes.
15690 (verbose, terse): Replace with...
15691 (print_results): this new function.
15692 Adjust dependencies.
15693
15694 2000-10-02 Akim Demaille <akim@epita.fr>
15695
15696 * src/conflicts.c (conflict_report): New function.
15697 (conflict_log, verbose_conflict_log): Replace with...
15698 (print_conflicts): this function.
15699 Adjust dependencies.
15700 * src/conflicts.h: New file.
15701 Propagate its inclusion.
15702
15703 2000-10-02 Akim Demaille <akim@epita.fr>
15704
15705 * src/nullable.h: New file.
15706 Propagate its inclusion.
15707 * src/nullable.c: Formatting changes.
15708
15709 2000-10-02 Akim Demaille <akim@epita.fr>
15710
15711 * src/reduce.h: New file.
15712 Propagate its inclusion.
15713 * src/reduce.c: Topological sort and other formatting changes.
15714 (bool, TRUE, FALSE): Move their definition to...
15715 * src/system.h: here.
15716
15717 2000-10-02 Akim Demaille <akim@epita.fr>
15718
15719 * src/files.c: Formatting changes.
15720 (tryopen, tryclose, openfiles): Rename as...
15721 (xfopen, xfclose, open_files): this.
15722 (stringappend): static.
15723 * src/files.h: Complete the list of exported symbols.
15724 Propagate its use.
15725
15726 2000-10-02 Akim Demaille <akim@epita.fr>
15727
15728 * src/reader.h: New file.
15729 Propagate its use instead of tedious list of `extern' and
15730 prototypes.
15731 * src/reader.c: Formatting changes, topological sort,
15732 s/register//.
15733
15734 2000-10-02 Akim Demaille <akim@epita.fr>
15735
15736 * src/lex.h: Prototype `lex.c' exported functions.
15737 * src/reader.c: Adjust.
15738 * src/lex.c: Formatting changes.
15739 (safegetc): Rename as...
15740 (xgetc): this.
15741
15742 2000-10-02 Akim Demaille <akim@epita.fr>
15743
15744 * src/lalr.h: New file.
15745 Propagate its inclusion instead of prototypes and `extern'.
15746 * src/lalr.c: Formatting changes, topological sorting etc.
15747
15748 2000-10-02 Akim Demaille <akim@epita.fr>
15749
15750 * src/output.c (token_actions): Introduce a temporary array,
15751 YYDEFACT, that makes it possible for this function to use
15752 output_short_table.
15753
15754 2000-10-02 Akim Demaille <akim@epita.fr>
15755
15756 `user_toknums' is output as a `short[]' in `output.c', while it is
15757 defined as a `int[]' in `reader.c'. For consistency with the
15758 other output tables, `user_toknums' is now defined as a table of
15759 shorts.
15760
15761 * src/reader.c (user_toknums): Be a short table instead of an int
15762 table.
15763 Adjust dependencies.
15764
15765 Factor the short table outputs.
15766
15767 * src/output.c (output_short_table): New function.
15768 * src/output.c (output_gram, output_stos, output_rule_data)
15769 (output_base, output_table, output_check): Use it.
15770
15771 2000-10-02 Akim Demaille <akim@epita.fr>
15772
15773 * src/output.c (output): Topological sort of the functions, in
15774 order to get rid of the `static' prototypes.
15775 No longer use `register'.
15776 * src/output.h: New file.
15777 Propagate its inclusion in files explicitly prototyping functions
15778 from output.c.
15779
15780 2000-09-21 Akim Demaille <akim@epita.fr>
15781
15782 * src/atgeneral.m4: Update from Autoconf.
15783
15784 2000-09-21 Akim Demaille <akim@epita.fr>
15785
15786 * src/closure.h: New file.
15787 * src/closure.c: Formatting changes, topological sort over the
15788 functions, use of closure.h.
15789 (initialize_closure, finalize_closure): Rename as...
15790 (new_closure, free_closure): these. Adjust dependencies.
15791 * src/LR0.c: Formatting changes, topological sort, use of
15792 cloture.h.
15793 (initialize_states): Rename as...
15794 (new_states): this.
15795 * src/Makefile.am (noinst_HEADERS): Adjust.
15796
15797 2000-09-20 Akim Demaille <akim@epita.fr>
15798
15799 * src/acconfig.h: Don't protect config.h against multiple
15800 inclusion.
15801 Don't define PARAMS.
15802 * src/system.h: Define PARAMS.
15803 Remove some of the ad-hoc CPP magic for DOS, VMS etc.: this is the
15804 purpose of config.h. system.h must not try to fix wrong
15805 definitions in config.h.
15806
15807 2000-09-20 Akim Demaille <akim@epita.fr>
15808
15809 * src/derives.h: New file.
15810 * src/main.c, src/derives.h: Use it.
15811 Formatting changes.
15812 * src/Makefile.am (noinst_HEADERS): Adjust.
15813
15814 2000-09-20 Akim Demaille <akim@epita.fr>
15815
15816 * tests/atgeneral.m4: Update from Autoconf.
15817 * tests/calc.m4 (_AT_DATA_CALC_Y, AT_DATA_CALC_Y, _AT_CHECK_CALC)
15818 (AT_CHECK_CALC): New macros.
15819 Use these macros to test bison with options `', `--raw',
15820 `--debug', `--yacc', `--yacc --debug'.
15821
15822 2000-09-19 Akim Demaille <akim@epita.fr>
15823
15824 * src/output.c: Formatting changes.
15825 * src/machine.h: Remove, leaving its contents in...
15826 * src/system.h: here.
15827 Include stdio.h.
15828 Adjust all dependencies on stdio.h and machine.h.
15829 * src/getargs.h: New file.
15830 Let all `extern' declarations about getargs.c be replaced with
15831 inclusion of `getargs.h'.
15832 * src/Makefile.am (noinst_HEADERS): Adjust.
15833
15834 * tests/calc.m4 (yyin): Be initialized in main, not on the global
15835 scope.
15836 (yyerror): Returns void, not int.
15837 * doc/bison.texinfo: Formatting changes.
15838
15839 2000-09-19 Akim Demaille <akim@epita.fr>
15840
15841 * tests/calc.m4 (calc.y): Do not assign to stdin, as it's not
15842 portable.
15843
15844 2000-09-18 Akim Demaille <akim@epita.fr>
15845
15846 * configure.in: Append WARNING_CFLAGS to CFLAGS.
15847 * src/Makefile.am (INCLUDES): Don't.
15848 Be ready to fetch headers in lib/.
15849
15850 2000-09-18 Akim Demaille <akim@epita.fr>
15851
15852 * doc/bison.texinfo: Update the copyright.
15853 ANSIfy and GNUify the examples.
15854 Remove the old menu.
15855
15856 2000-09-18 Akim Demaille <akim@epita.fr>
15857
15858 First set of tests: use the `calc' example from the documentation.
15859
15860 * src/bison.s1 (yyparse): Condition the code using `yytname' which
15861 is defined only when YYDEBUG is.
15862 * m4/atconfig.m4 (AT_CONFIG): Adjust to Autoconf 2.13.
15863 * src/files.c (tryopen, tryclose): Formatting changes.
15864 Move to the top and be static.
15865 * src/reader.c (read_signed_integer): Likewise.
15866 * tests/calc.m4: New file.
15867 * Makefile.am, suite.m4: Adjust.
15868 * m4/atconfig.m4: Set BISON_SIMPLE and BISON_HAIRY.
15869
15870 2000-09-18 Akim Demaille <akim@epita.fr>
15871
15872 Add support for an Autotest test suite for Bison.
15873
15874 * m4/m4.m4, m4/atconfig.m4: New files.
15875 * m4/Makefile.am (EXTRA_DIST): Adjust.
15876 * tests/suite.m4, tests/Makefile.am, tests/atgeneral.m4: New
15877 files.
15878 * src/getargs.c: Display a more standard --version message.
15879 * src/reader.c (reader): Formatting changes.
15880 No longer depend upon VERSION_STRING.
15881 * configure.in: No longer use `dnl'.
15882 Set up the test suite and the new directory `tests/.
15883 (VERSION_STRING): Remove.
15884
15885 2000-04-14 Akim Demaille <akim@epita.fr>
15886
15887 * src/reader.c (copy_comment2): New function, same as former
15888 `copy_comment', but outputs into two FILE *.
15889 (copy_comment): Use it.
15890 (parse_union_decl): Use it.
15891 (get_type, parse_start_decl): Use the same `invalid' message.
15892 (parse_start_decl, parse_union_decl): Use the same `multiple'
15893 message.
15894 (parse_union_decl, copy_guard, copy_action): Use the same
15895 `unmatched' message.
15896 * m4/Makefile.am (EXTRA_DIST): Add `warning.m4'.
15897
15898 2000-03-31 Akim Demaille <akim@epita.fr>
15899
15900 * src/files.c (tryopen, tryclose): Move to the top.
15901 Be static.
15902
15903 2000-03-31 Akim Demaille <akim@epita.fr>
15904
15905 * src/main.c (main): Don't call `done', exit does it.
15906
15907 2000-03-31 Akim Demaille <akim@epita.fr>
15908
15909 * allocate.c: s/return (foo)/return foo/.
15910 * lalr.c: Likewise.
15911 * LR0.c: Likewise.
15912 * output.c: Likewise.
15913 * reader.c: Likewise.
15914 * symtab.c: Likewise.
15915 * vmsgetargs.c: Likewise.
15916
15917 2000-03-31 Akim Demaille <akim@epita.fr>
15918
15919 Clean up the error reporting functions.
15920
15921 * src/report.c: New file.
15922 * src/report.h: Likewise.
15923 * src/Makefile.am: Adjust.
15924 * m4/error.m4: New file.
15925 * m4/Makefile.am: Adjust.
15926 * configure.in (jm_PREREQ_ERROR): Call it.
15927 * src/main.c (int_to_string, banner, fatal_banner, warn_banner):
15928 Remove.
15929 (fatal, fatals): Remove. All callers use complain.c::fatal.
15930 (warn, warni, warns, warnss, warnss): Remove. All callers use
15931 complain.c::complain.
15932 (toomany): Remove, use fatal instead.
15933 * src/files.c (done): No argument, use complain_message_count.
15934 * src/main.c (main): Register `done' to `atexit'.
15935
15936 * src/getargs.c (usage): More `fputs', less `fprintf'.
15937
15938 2000-03-28 Akim Demaille <akim@epita.fr>
15939
15940 * lib/: New directory.
15941 * Makefile.am (SUBDIRS): Adjust.
15942 * configure.in: Adjust.
15943 (LIBOBJS): Although not used yet, AC_SUBST it, otherwise it's
15944 useless.
15945 * src/alloca.c: Moved to lib/.
15946 * src/getopt.c: Likewise.
15947 * src/getopt1.c: Likewise.
15948 * src/getopt.h: Likewise.
15949 * src/ansi2knr.c: Likewise.
15950 * src/ansi2knr.1: Likewise.
15951 * src/Makefile.am: Adjust.
15952 * lib/Makefile.am: New file.
15953
15954 2000-03-28 Akim Demaille <akim@epita.fr>
15955
15956 * src/getargs.c (usage): Refresh the help message.
15957
15958 2000-03-17 Akim Demaille <akim@epita.fr>
15959
15960 * src/getopt1.c: Updated from textutils 2.0e
15961 * src/getopt.c: Likewise.
15962 * src/getopt.h: Likewise.
15963
15964 2000-03-17 Akim Demaille <akim@epita.fr>
15965
15966 * src/Makefile.am (bison.simple): Fix the awk program: quote only
15967 the file name, not the whole `#line LINE FILE'.
15968
15969 2000-03-17 Akim Demaille <akim@epita.fr>
15970
15971 On syntax errors, report the token on which we choked.
15972
15973 * src/bison.s1 (yyparse): In the label yyerrlab, when
15974 YYERROR_VERBOSE, add yychar in msg.
15975
15976 2000-03-17 Akim Demaille <akim@epita.fr>
15977
15978 * src/reader.c (copy_at): New function.
15979 (copy_guard): Use it.
15980 (copy_action): Use it.
15981
15982 2000-03-17 Akim Demaille <akim@epita.fr>
15983
15984 Be kind to translators, save some useless translations.
15985
15986 * src/main.c (banner): New function.
15987 (fatal_banner): Use it.
15988 (warn_banner): Use it.
15989
15990 2000-03-17 Akim Demaille <akim@epita.fr>
15991
15992 * src/reader.c (copy_definition): Use copy_string and
15993 copy_comment. Removed now unused `match', `ended',
15994 `cplus_comment'.
15995 (copy_comment, copy_string): Moved, to be visible from
15996 copy_definition.
15997
15998 2000-03-17 Akim Demaille <akim@epita.fr>
15999
16000 * src/reader.c (copy_string): Declare `static inline'. No
16001 problems with inline, since it is checked by configure.
16002 (copy_comment): Likewise.
16003
16004 2000-03-17 Akim Demaille <akim@epita.fr>
16005
16006 * src/reader.c (packsymbols): Formatting changes.
16007
16008 2000-03-17 Akim Demaille <akim@epita.fr>
16009
16010 * src/reader.c (copy_comment): New function, factored out from:
16011 (copy_action): Use it. Removed now unused `match', `ended',
16012 `cplus_comment'.
16013 (copy_guard): Likewise.
16014
16015 2000-03-17 Akim Demaille <akim@epita.fr>
16016
16017 * src/reader.c (copy_string): New function, factored out from:
16018 (copy_action): Use it.
16019 (copy_guard): Likewise.
16020
16021 2000-03-17 Akim Demaille <akim@epita.fr>
16022
16023 Change the handling of @s so that they behave exactly like $s.
16024 There is now a pseudo variable @$ (readble and writable), location
16025 of the lhs of the rule (by default ranging from the location of
16026 the first symbol of the rhs, to the location of the last symbol,
16027 or, if the rhs is empty, YYLLOC).
16028
16029 * src/bison.s1 [YYLSP_NEEDED] (yyloc): New variable, twin of
16030 yyval.
16031 (yyparse): When providing a default semantic action, provide a
16032 default location action.
16033 (after the $): No longer change `*YYLSP', just stack YYLOC the
16034 same way you stack YYVAL.
16035 * src/reader.c (read_declarations): Use warns.
16036 (copy_guard, case '@'): Also recognize `@$', expanded as `YYLOC'.
16037 (copy_action, case '@'): Likewise.
16038 Use a standard error message, to save useless work from
16039 translators.
16040
16041 2000-03-17 Akim Demaille <akim@epita.fr>
16042
16043 * src/bison.s1: Formatting and cosmetics changes.
16044 * src/reader.c: Likewise.
16045 Update the Copyright notice.
16046
16047 2000-03-17 Akim Demaille <akim@epita.fr>
16048
16049 * src/bison.s1 (#line): All set to `#line' only, since the
16050 Makefile now handles them.
16051
16052 2000-03-16 Akim Demaille <akim@epita.fr>
16053
16054 * src/output.c (output_rule_data): Output the documentation of
16055 some of the tables.
16056 (Copyright notice): Update.
16057 Formatting changes.
16058
16059 2000-03-16 Akim Demaille <akim@epita.fr>
16060
16061 * src/bison.s1 [!YYDEBUG]: Define yydebug to 0. This allows to
16062 remove most `#if YYDEBUG != 0', since `if (yydebug)' is enough.
16063 One `#if YYDEBUG' remains, since it uses variables which are
16064 defined only if `YYDEBUG != 0'.
16065
16066 2000-03-16 Akim Demaille <akim@epita.fr>
16067
16068 * src/bison.s1 (yyparse): Reorganize the definitions of the stacks
16069 and related variables so that the similarities are highlighted.
16070
16071 2000-03-16 Akim Demaille <akim@epita.fr>
16072
16073 * src/bison.s1: Properly indent CPP directives.
16074
16075 2000-03-16 Akim Demaille <akim@epita.fr>
16076
16077 * src/bison.s1: Properly indent the `alloca' CPP section.
16078
16079 2000-03-16 Akim Demaille <akim@epita.fr>
16080
16081 Do not hard code values of directories in `configure.in'.
16082 Update the `configure' tool chain.
16083
16084 * configure.in (XPFILE, XPFILE1, LOCALEDIR): Remove, handled by
16085 src/makefile.am.
16086 (VERSION_STRING): Use the third arg of AC_DEFINE_UNQUOTED.
16087 (AC_OUTPUT): Add m4/Makefile.
16088 Bump to bison 1.28a, 1.29 has never been released.
16089 * acconfig.h (XPFILE, XPFILE1, LOCALEDIR): Remove, since they are
16090 handled via src/Makefile.am.
16091 (VERSION_STRING, PROTOTYPES, ENABLE_NLS, HAVE_CATGETS,
16092 HAVE_GETTEXT, HAVE_LC_MESSAGES, HAVE_STPCPY): Remove, handled by
16093 autoheader.
16094 * Makefile.am (SUBDIRS): Add m4.
16095 (ACLOCAL_AM_FLAGS): New variable.
16096 (AUTOMAKE_OPTIONS): Add check-news.
16097 * src/Makefile.am (bison.simple): Use awk to replace #line lines with
16098 the proper line number and file name.
16099 (DEFS): Propagate the location of bison library files and of the
16100 locale files.
16101 (INCLUDES): Added `-I ..' so that one can compile with srcdir !=
16102 builddir.
16103 * acinclude.m4: Remove, replaced by the directory m4.
16104 * m4/Makefile.am (EXTRA_DIST): New variable.
16105 * m4/gettext.m4: New file, from the fileutils.
16106 * m4/lcmessage.m4: Likewise
16107 * m4/progtest.m4: Likewise.
16108 * m4/bison-decl.m4: New file, extracted from former acinclude.m4.
16109
16110 2000-03-10 Akim Demaille <akim@epita.fr>
16111
16112 * src/closure.c:
16113 Formatting changes of various comments.
16114 Respect the GNU coding standards at various places.
16115 Don't use `_()' when no translation is needed.
16116
16117 1999-12-13 Jesse Thilo <jthilo@gnu.org>
16118
16119 * src/files.c:
16120 OS/2 honors TMPDIR environment variable.
16121
16122 1999-12-13 Jesse Thilo <jthilo@gnu.org>
16123
16124 * doc/bison.texinfo: Tweaked spelling and grammar.
16125 Updated ISBN.
16126 Removed reference to price of printed copy.
16127 Mention BISON_SIMPLE and BISON_HAIRY.
16128
16129 1999-12-13 Jesse Thilo <jthilo@gnu.org>
16130
16131 * configure.in, NEWS:
16132 Bison 1.29 released.
16133
16134 1999-10-27 Jesse Thilo <jthilo@gnu.org>
16135
16136 * doc/.cvsignore, doc/Makefile.am, doc/refcard.tex:
16137 Added reference card.
16138
16139 1999-07-26 Jesse Thilo <jthilo@gnu.org>
16140
16141 * po/ru.po: Added Russian translation.
16142
16143 1999-07-26 Jesse Thilo <jthilo@gnu.org>
16144
16145 * configure.in: Added Russian translation.
16146
16147 1999-07-06 Jesse Thilo <jthilo@gnu.org>
16148
16149 * configure.in, NEWS, README:
16150 Released version 1.28.
16151
16152 1999-06-14 Jesse Thilo <jthilo@gnu.org>
16153
16154 * src/system.h:
16155 Squashed redefinition warning on some systems.
16156
16157 * src/getargs.c, src/Makefile.am, src/reader.c, src/version.c:
16158 Have configure build version string instead of relying on ANSI string
16159 concatentation.
16160
16161 1999-06-14 Jesse Thilo <jthilo@gnu.org>
16162
16163 * po/POTFILES.in: Got rid of version.c.
16164
16165 1999-06-14 Jesse Thilo <jthilo@gnu.org>
16166
16167 * acconfig.h, configure.in:
16168 Have configure build version string instead of relying on ANSI string
16169 concatentation.
16170
16171 1999-06-08 Jesse Thilo <jthilo@gnu.org>
16172
16173 * doc/bison.1:
16174 Dropped mention of `+' for long-named options.
16175
16176 1999-05-30 Jesse Thilo <jthilo@gnu.org>
16177
16178 * src/files.c: Added <unistd.h> for unlink().
16179
16180 * src/Makefile.am, src/system.h:
16181 I18n fixes.
16182
16183 1999-05-30 Jesse Thilo <jthilo@gnu.org>
16184
16185 * README: Added a FAQ list.
16186
16187 * configure.in, acconfig.h:
16188 I18n fixes.
16189
16190 1999-05-30 Jesse Thilo <jthilo@gnu.org>
16191
16192 * doc/FAQ, doc/Makefile.am:
16193 Added a FAQ list.
16194
16195 1999-05-19 Jesse Thilo <jthilo@gnu.org>
16196
16197 * src/alloc.h, src/symtab.h, src/version.c:
16198 Protected inclusion of "config.h" with HAVE_CONFIG_H.
16199
16200 1999-04-18 Jesse Thilo <jthilo@gnu.org>
16201
16202 * src/.cvsignore, src/Makefile.am:
16203 Reorganized: sources in `src', documentation in `doc'.
16204
16205 * src/lex.c (literalchar):
16206 fixed the code for escaping double quotes (thanks
16207 Jonathan Czisny.)
16208
16209 1999-04-18 Jesse Thilo <jthilo@gnu.org>
16210
16211 * po/de.po, po/es.po, po/fr.po, po/nl.po, po/POTFILES.in:
16212 Adjusted paths to reflect directory reorganization.
16213
16214 1999-04-18 Jesse Thilo <jthilo@gnu.org>
16215
16216 * doc/.cvsignore, doc/Makefile.am:
16217 Reorganized: sources in `src', documentation in `doc'.
16218
16219 1999-04-18 Jesse Thilo <jthilo@gnu.org>
16220
16221 * configure.in:
16222 Updated AC_INIT file to reflect directory reorganization.
16223
16224 * configure.in, .cvsignore, Makefile.am, POTFILES.in:
16225 Reorganized: sources in `src', documentation in `doc'.
16226
16227 1999-04-13 Jesse Thilo <jthilo@gnu.org>
16228
16229 * src/allocate.c:
16230 Don't declare calloc() and realloc() if not necessary.
16231
16232 1999-04-13 Jesse Thilo <jthilo@gnu.org>
16233
16234 * configure.in, acconfig.h, acinclude.m4:
16235 Don't declare calloc() and realloc() if not necessary.
16236
16237 1999-03-23 Jesse Thilo <jthilo@gnu.org>
16238
16239 * po/.cvsignore: Added i18n support.
16240
16241 1999-03-23 Jesse Thilo <jthilo@gnu.org>
16242
16243 * acconfig.h, configure.in, Makefile.am:
16244 Added i18n support.
16245
16246 1999-03-22 Jesse Thilo <jthilo@gnu.org>
16247
16248 * src/bison.s1: Fixed #line numbers.
16249
16250 1999-03-15 Jesse Thilo <jthilo@gnu.org>
16251
16252 * po/es.po, po/fr.po, po/nl.po, po/de.po:
16253 Added PO files from Translation Project.
16254
16255 1999-03-03 Jesse Thilo <jthilo@gnu.org>
16256
16257 * Makefile.am:
16258 Added support for non-ANSI compilers (ansi2knr).
16259
16260 1999-02-16 Jesse Thilo <jthilo@gnu.org>
16261
16262 * configure.in: Bumped version number to 1.27.
16263
16264 * Makefile.am:
16265 Added `bison.simple' to list of files removed by `make distclean'.
16266
16267 1999-02-12 Jesse Thilo <jthilo@gnu.org>
16268
16269 * src/files.c, src/files.h:
16270 Defined locations of parser files in config.h instead of Makefile.
16271
16272 1999-02-12 Jesse Thilo <jthilo@gnu.org>
16273
16274 * acconfig.h, acinclude.m4, configure.in, Makefile.am:
16275 Defined locations of parser files in config.h instead of Makefile.
16276
16277 1999-02-09 Jesse Thilo <jthilo@gnu.org>
16278
16279 * Makefile.am:
16280 Removed inappropriate use of $< macro.
16281
16282 1999-02-05 Jesse Thilo <jthilo@gnu.org>
16283
16284 * po/Makefile.in.in, po/POTFILES.in:
16285 Add `po' directory skeleton.
16286
16287 1999-01-27 Jesse Thilo <jthilo@gnu.org>
16288
16289 * README: Document help-bison list.
16290
16291 * configure.in: Add check for mkstemp().
16292
16293 1999-01-20 Jesse Thilo <jthilo@gnu.org>
16294
16295 * src/conflicts.c, src/LR0.c, src/output.c, src/reader.c:
16296 Hush a few compiler warnings.
16297
16298 * src/files.c:
16299 Add tryclose(), which verifies that fclose was successful.
16300 Hush a couple of compiler warnings.
16301
16302 1999-01-20 Jesse Thilo <jthilo@gnu.org>
16303
16304 * Makefile.am, OChangeLog:
16305 ChangeLog is now automatically generated. Include the old version as
16306 OChangeLog.
16307
16308 1999-01-14 Jesse Thilo <jthilo@gnu.org>
16309
16310 * 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:
16311 Update FSF address.
16312
16313 1999-01-14 Jesse Thilo <jthilo@gnu.org>
16314
16315 * doc/bison.texinfo: Fix formatting glitch.
16316
16317 * doc/bison.texinfo: Update FSF address.
16318
16319 1999-01-14 Jesse Thilo <jthilo@gnu.org>
16320
16321 * acconfig.h: Update FSF address.
16322
16323 1999-01-08 Jesse Thilo <jthilo@gnu.org>
16324
16325 * src/system.h:
16326 Don't define PACKAGE here, since config.h defines it.
16327
16328 1998-12-30 Jesse Thilo <jthilo@gnu.org>
16329
16330 * src/reader.c: Update copyright date.
16331
16332 * src/main.c:
16333 Ditch sprintf to statically-sized buffers in fatal/warn functions in
16334 favor of output directly to stderr (avoids buffer overruns).
16335
16336 * src/reader.c: Some checks for premature EOF.
16337
16338 * 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:
16339 Use prototypes if the compiler understands them.
16340
16341 * src/files.c: Honor TMPDIR on Unix hosts.
16342 Use prototypes if the compiler understands them.
16343
16344 * src/reader.c:
16345 Fix a couple of buffer overrun bugs.
16346 Use prototypes if the compiler understands them.
16347
16348 * src/system.h: Include unistd.h and ctype.h.
16349 Use #ifdef instead of #if for NLS symbols.
16350
16351 1998-12-30 Jesse Thilo <jthilo@gnu.org>
16352
16353 * doc/bison.texinfo:
16354 Delete comment "consider using @set for edition number, etc..." since
16355 we now are doing so.
16356
16357 1998-12-30 Jesse Thilo <jthilo@gnu.org>
16358
16359 * configure.in:
16360 Use prototypes if the compiler understands them.
16361
16362 * NEWS: Document 1.26 highlights.
16363
16364 * Makefile.am: Require Automake 1.3 or later.
16365
16366 * acconfig.h:
16367 Use prototypes if the compiler understands them.
16368
16369 1998-12-29 Jesse Thilo <jthilo@gnu.org>
16370
16371 * src/version.c:
16372 Use VERSION symbol from automake for version number.
16373
16374 1998-12-29 Jesse Thilo <jthilo@gnu.org>
16375
16376 * acconfig.h, configure.in, version.cin:
16377 Use VERSION symbol from automake for version number.
16378
16379 1998-11-28 Jesse Thilo <jthilo@gnu.org>
16380
16381 * Makefile.am:
16382 Distribute original version of simple parser (bison.s1), not built
16383 version (bison.simple).
16384
16385 1998-11-28 Jesse Thilo <jthilo@gnu.org>
16386
16387 * doc/bison.texinfo: Add info dir entry.
16388
16389 * doc/bison.texinfo:
16390 Let automake put version number into documentation.
16391
16392 1998-11-26 Jesse Thilo <jthilo@gnu.org>
16393
16394 * src/bison.cld, src/build.com, src/vmshlp.mar:
16395 Add non-RCS files from /gd/gnu/bison.
16396
16397 1998-11-26 Jesse Thilo <jthilo@gnu.org>
16398
16399 * doc/bison.1:
16400 Document the BISON_HAIRY and BISON_SIMPLE variables.
16401
16402 1998-11-25 Jesse Thilo <jthilo@gnu.org>
16403
16404 * src/version.c: Build version.c automatically.
16405
16406 * src/reader.c:
16407 Fix token numbering (used to start at 258, not 257).
16408
16409 * src/system.h: Include config.h.
16410
16411 * src/getargs.c: Update bug report address.
16412
16413 * src/alloca.c, src/getopt1.c, src/getopt.c, src/getopt.h:
16414 Get latest copies of alloca.c, getopt.c, getopt.h, getopt1.c from gnu.org.
16415
16416 1998-11-25 Jesse Thilo <jthilo@gnu.org>
16417
16418 * Makefile.am:
16419 Rename bison.simple to bison.s1 (bison.simple is then built from bison.s1).
16420
16421 * configure.in, version.cin:
16422 Build version.c automatically.
16423
16424 * AUTHORS: Add AUTHORS file.
16425
16426 * README: Update bug report address.
16427
16428 * bison.simple:
16429 Rename bison.simple to bison.s1 (bison.simple is then built from bison.s1).
16430
16431 * configure.in, Makefile.am, Makefile.in, stamp-h.in:
16432 Add automake stuff.
16433
16434 1998-11-25 Jesse Thilo <jthilo@gnu.org>
16435
16436 * doc/bison.texinfo: Clean up some formatting.
16437
16438 1998-05-05 Richard Stallman <rms@gnu.org>
16439
16440 * doc/bison.texinfo:
16441 Explain better why to make a pure parser.
16442
16443 1998-01-05 Richard Stallman <rms@gnu.org>
16444
16445 * src/files.c (openfiles):
16446 [_WIN32 && !__CYGWIN32__] Use TEMP or Temp to
16447 find a temporary directory, if possible. Do not unlink files while
16448 they are open.
16449
16450 1997-08-25 Richard Stallman <rms@gnu.org>
16451
16452 * src/reader.c (stack_offset;):
16453 Change some warni to warns.
16454
16455 * src/lex.c (literalchar): Use warns, not warni.
16456
16457 1997-06-28 Richard Stallman <rms@gnu.org>
16458
16459 * src/bison.s1: Add a Bison version comment.
16460
16461 * src/main.c (fatal, warn, berror):
16462 Use program_name.
16463
16464 1997-06-28 Richard Stallman <rms@gnu.org>
16465
16466 * Makefile.in (bison_version): New variable.
16467 (dist): Use that variable.
16468 (bison.s1): Substitute the Bison version into bison.simple.
16469
16470 * bison.simple: Add a Bison version comment.
16471
16472 1997-06-18 Richard Stallman <rms@gnu.org>
16473
16474 * src/main.c (fatal, warn, berror):
16475 Make error messages standard.
16476 (toomany): Improve error message text.
16477
16478 * 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:
16479 new.h renamed to alloc.h.
16480
16481 1997-06-18 Richard Stallman <rms@gnu.org>
16482
16483 * Makefile.in: new.h renamed to alloc.h.
16484
16485 1997-05-24 Richard Stallman <rms@gnu.org>
16486
16487 * src/lex.c (literalchar):
16488 Fix the code for escaping \, " and '.
16489
16490 (lex): Avoid trouble when there are many chars
16491 to discard in a char literal with just several chars in it.
16492
16493 1997-05-17 Richard Stallman <rms@gnu.org>
16494
16495 * src/bison.s1:
16496 Use malloc, if using alloca is troublesome.
16497 (YYSTACK_USE_ALLOCA): New flag macro.
16498 Define it for some systems and compilers.
16499 (YYSTACK_ALLOC): New macro.
16500 (yyparse): Use YYSTACK_ALLOC to allocate stack.
16501 If it was malloc'd, free it.
16502
16503 1997-05-17 Richard Stallman <rms@gnu.org>
16504
16505 * bison.simple:
16506 Use malloc, if using alloca is troublesome.
16507 (YYSTACK_USE_ALLOCA): New flag macro.
16508 Define it for some systems and compilers.
16509 (YYSTACK_ALLOC): New macro.
16510 (yyparse): Use YYSTACK_ALLOC to allocate stack.
16511 If it was malloc'd, free it.
16512
16513 1997-04-23 Richard Stallman <rms@gnu.org>
16514
16515 * src/bison.s1:
16516 (alloca) [__hpux]: Always define as __builtin_alloca.
16517
16518 1997-04-23 Richard Stallman <rms@gnu.org>
16519
16520 * bison.simple:
16521 (alloca) [__hpux]: Always define as __builtin_alloca.
16522
16523 1997-04-22 Richard Stallman <rms@gnu.org>
16524
16525 * src/bison.s1:
16526 [__hpux]: Include alloca.h (right for HPUX 10)
16527 instead of declaring alloca (right for HPUX 9).
16528
16529 * src/bison.s1 (__yy_memcpy):
16530 Declare arg `count' as unsigned int.
16531 (yyparse): Cast third arg to __yy_memcpy to unsigned int.
16532
16533 1997-04-22 Richard Stallman <rms@gnu.org>
16534
16535 * bison.simple:
16536 [__hpux]: Include alloca.h (right for HPUX 10)
16537 instead of declaring alloca (right for HPUX 9).
16538
16539 * bison.simple (__yy_memcpy):
16540 Declare arg `count' as unsigned int.
16541 (yyparse): Cast third arg to __yy_memcpy to unsigned int.
16542
16543 1997-01-03 Richard Stallman <rms@gnu.org>
16544
16545 * src/allocate.c: [__STDC__ or _MSC_VER]:
16546 Declare calloc and realloc to return void *.
16547
16548 1997-01-02 Richard Stallman <rms@gnu.org>
16549
16550 * src/system.h:
16551 [_MSC_VER]: Include stdlib.h and process.h.
16552 [_MSC_VER] (getpid): Define as macro--translate it to _getpid.
16553
16554 * src/main.c (main): Return FAILURE as a value.
16555 (printable_version): Declare arg as int, not char.
16556
16557 1997-01-02 Richard Stallman <rms@gnu.org>
16558
16559 * Makefile.in (dist):
16560 Explicitly check for symlinks, and copy them.
16561
16562 1996-12-19 Richard Stallman <rms@gnu.org>
16563
16564 * src/files.c:
16565 [_MSC_VER] (XPFILE, XPFILE1): Define, if not already defined.
16566
16567 1996-12-18 Paul Eggert <eggert@gnu.org>
16568
16569 * src/bison.s1 (yyparse):
16570 If __GNUC__ and YYPARSE_PARAM are both defined,
16571 declare yyparse to have a void * argument.
16572
16573 1996-12-18 Paul Eggert <eggert@gnu.org>
16574
16575 * bison.simple (yyparse):
16576 If __GNUC__ and YYPARSE_PARAM are both defined,
16577 declare yyparse to have a void * argument.
16578
16579 1996-12-17 Richard Stallman <rms@gnu.org>
16580
16581 * src/reduce.c (nbits): Add some casts.
16582
16583 1996-08-12 Richard Stallman <rms@gnu.org>
16584
16585 * src/bison.s1: Test _MSDOS as well as _MSDOS_.
16586
16587 1996-08-12 Richard Stallman <rms@gnu.org>
16588
16589 * bison.simple: Test _MSDOS as well as _MSDOS_.
16590
16591 1996-07-31 Richard Stallman <rms@gnu.org>
16592
16593 * src/bison.s1:
16594 [__sun && __i386]: Include alloca.h.
16595
16596 1996-07-31 Richard Stallman <rms@gnu.org>
16597
16598 * bison.simple:
16599 [__sun && __i386]: Include alloca.h.
16600
16601 1996-07-30 Richard Stallman <rms@gnu.org>
16602
16603 * src/bison.s1: Comment change.
16604
16605 * src/bison.s1: Test _MSDOS_, not MSDOS.
16606
16607 1996-07-30 Richard Stallman <rms@gnu.org>
16608
16609 * bison.simple: Comment change.
16610
16611 * bison.simple: Test _MSDOS_, not MSDOS.
16612
16613 1996-06-01 Richard Stallman <rms@gnu.org>
16614
16615 * 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:
16616 Insert `_' macro around many string constants.
16617
16618 * src/main.c:
16619 Insert `_' macro around many string constants.
16620
16621 (main): Call setlocale, bindtextdomain and textdomain.
16622
16623 * src/system.h: [HAVE_LOCALE_H]: Include locale.h.
16624 [! HAVE_LOCALE_H] (setlocale): Define as no-op.
16625 [ENABLE_NLS]: Include libintl.h.
16626 [ENABLE_NLS] (gettext): Define.
16627 [! ENABLE_NLS] (bintextdomain, textdomain, _): Consolation definitions.
16628 (N_, PACKAGE, LOCALEDIR): New macros.
16629
16630 1996-06-01 Richard Stallman <rms@gnu.org>
16631
16632 * POTFILES.in: New file.
16633
16634 * Makefile.in (allocate.o):
16635 Define target explicitly.
16636
16637 * Makefile.in (CFLAGS): Set to @CFLAGS@.
16638 (LDFLAGS): Set to @LDFLAGS@.
16639 (configure): Run autoconf only if preceding `cd' succeeds.
16640 (bison.s1): Redirect output to temporary file then move the
16641 temporary to the target, rather than redirecting directly to bison.s1.
16642 (clean): Remove config.status and config.log.
16643 (distclean): Don't remove config.status here.
16644
16645 1996-05-12 Richard Stallman <rms@gnu.org>
16646
16647 * src/bison.s1:
16648 (__yy_memcpy) [__cplusplus]: Reorder declarations of variables f and t.
16649
16650 1996-05-12 Richard Stallman <rms@gnu.org>
16651
16652 * bison.simple:
16653 (__yy_memcpy) [__cplusplus]: Reorder declarations of variables f and t.
16654
16655 1996-05-11 Richard Stallman <rms@gnu.org>
16656
16657 * src/bison.s1 (__yy_memcpy):
16658 Really reorder the args, as was supposedly done on Feb 14 1995.
16659 (yyparse): Calls changed accordingly.
16660
16661 1996-05-11 Richard Stallman <rms@gnu.org>
16662
16663 * Makefile.in (dist): Don't use $(srcdir).
16664
16665 * bison.simple (__yy_memcpy):
16666 Really reorder the args, as was supposedly done on Feb 14 1995.
16667 (yyparse): Calls changed accordingly.
16668
16669 1996-01-27 Richard Stallman <rms@gnu.org>
16670
16671 * src/output.c (output_rule_data):
16672 Test YYERROR_VERBOSE in the conditional
16673 around the definition of ttyname.
16674
16675 1995-12-29 Richard Stallman <rms@gnu.org>
16676
16677 * src/bison.s1:
16678 Fix line numbers in #line commands.
16679
16680 1995-12-29 Richard Stallman <rms@gnu.org>
16681
16682 * bison.simple:
16683 Fix line numbers in #line commands.
16684
16685 1995-12-27 Richard Stallman <rms@gnu.org>
16686
16687 * src/bison.s1 (YYPARSE_PARAM_DECL):
16688 In C++, make it always null.
16689 (YYPARSE_PARAM_ARG): New macro.
16690 (yyparse): Use YYPARSE_PARAM_ARG.
16691
16692 1995-12-27 Richard Stallman <rms@gnu.org>
16693
16694 * bison.simple (YYPARSE_PARAM_DECL):
16695 In C++, make it always null.
16696 (YYPARSE_PARAM_ARG): New macro.
16697 (yyparse): Use YYPARSE_PARAM_ARG.
16698
16699 1995-11-29 Richard Stallman <rms@gnu.org>
16700
16701 * doc/bison.texinfo:
16702 Describe literal string tokens, %raw, %no_lines, %token_table.
16703
16704 1995-11-29 Daniel Hagerty <hag@gnu.org>
16705
16706 * doc/bison.texinfo: Fixed update date
16707
16708 1995-10-16 Richard Stallman <rms@gnu.org>
16709
16710 * src/version.c: Version 1.25.
16711
16712 1995-10-16 Richard Stallman <rms@gnu.org>
16713
16714 * NEWS: *** empty log message ***
16715
16716 1995-10-16 Richard Stallman <rms@gnu.org>
16717
16718 * doc/bison.1, doc/bison.rnh:
16719 Add new options.
16720
16721 1995-10-15 Richard Stallman <rms@gnu.org>
16722
16723 * src/vmsgetargs.c, src/getargs.c:
16724 Added -n, -k, and -raw switches.
16725 (noparserflag, toknumflag, rawtoknumflag): New variables.
16726
16727 * src/symtab.h (SALIAS):
16728 New #define for adding aliases to %token.
16729 (struct bucket): Added `alias' field.
16730
16731 * src/reduce.c (reduce_grammar):
16732 Revise error message.
16733 (print_notices): Remove final `.' from error message.
16734
16735 * src/reader.c (reader_output_yylsp):
16736 New function.
16737 (readgram): Use `#if 0' around code that accepted %command
16738 inside grammar rules: The documentation doesn't allow it,
16739 and it will fail since the %command processors scan for the next %.
16740 (parse_token_decl): Extended the %token
16741 declaration to allow a multi-character symbol as an alias.
16742 (parse_thong_decl): New function.
16743 (read_declarations): Added %thong declarations.
16744 (read_declarations): Handle NOOP to deal with allowing
16745 % declarations as another means to specify the flags.
16746 (readgram): Allow %prec prior to semantics embedded in a rule.
16747 (skip_to_char, read_declarations, copy_definition)
16748 (parse_token_decl, parse_start_decl, parse_type_decl)
16749 (parse_assoc_decl, parse_union_decl, parse_expect_decl)
16750 (get_type_name, copy_guard, copy_action, readgram)
16751 (get_type, packsymbols): Revised most error messages.
16752 Changed `fatal' to `warnxxx' to avoid aborting for error.
16753 Revised and use multiple warnxxx functions to avoid using VARARGS1.
16754 (read_declarations): Improve the error message for
16755 an invalid character. Do not abort.
16756 (read_declarations, copy_guard, copy_action): Use
16757 printable_version to avoid unprintable characters in printed output.
16758 (parse_expect_decl): Error if argument to %expect exceeds 10 digits.
16759 (parse_token_decl, parse_assoc_decl, parse_type_decl, get_type):
16760 Allow the type of a non-terminal can be given
16761 more than once, as long as all specifications give the same type.
16762
16763 * src/output.c:
16764 (output_headers, output_trailers, output, output_gram)
16765 (output_rule_data): Implement noparserflag variable.
16766 Implement toknumflag variable.
16767 (output): Call reader_output_yylsp to output LTYPESTR.
16768
16769 * src/main.c (main):
16770 If reader sees an error, don't process the grammar.
16771 (fatals): Updated to not use VARARGS1.
16772 (printable_version, int_to_string, warn, warni, warns, warnss)
16773 (warnsss): New error reporting functions. Avoid abort for error.
16774
16775 * src/lex.h:
16776 Added THONG and NOOP for alias processing.
16777 Added SETOPT for the new code that allows setting options with %flags.
16778
16779 * src/lex.c:
16780 Include getopt.h. Add some extern decls.
16781 (safegetc): New function to deal with EOF gracefully.
16782 (literalchar); new function to deal with reading \ escapes.
16783 (lex): Use literalchar.
16784 (lex): Implemented "..." tokens.
16785 (literalchar, lex, parse_percent_token): Made tokenbuffer
16786 always contain the token. This includes growing the token
16787 buffer while reading an integer.
16788 (parse_percent_token): Replaced if-else statement with percent_table.
16789 (parse_percent_token): Added % declarations as another
16790 way to specify the flags -n, -l, and -r. Also added hooks for
16791 -d, -k, -y, -v, -t, -p, -b, -o, but implementation requires
16792 major changes to files.c.
16793 (lex) Retain in the incoming stream a character following
16794 an incorrect '/'.
16795 (skip_white_space, lex): Revised most error messages
16796 and changed fatal to warn to avoid aborting.
16797 (percent_table): Added %thong declarations.
16798
16799 * src/gram.h: Comment changes.
16800
16801 * src/files.c (openfiles, open_extra_files, done):
16802 Add faction flag
16803 and actfile file. Handle noparserflag. Both for -n switch.
16804
16805 * src/conflicts.c (resolve_sr_conflict):
16806 Remove use of alloca.
16807
16808 1995-06-01 Jim Meyering <meyering@gnu.org>
16809
16810 * doc/bison.texinfo: *** empty log message ***
16811
16812 1995-05-06 Richard Stallman <rms@gnu.org>
16813
16814 * src/bison.s1: Comment change.
16815
16816 1995-05-06 Richard Stallman <rms@gnu.org>
16817
16818 * bison.simple: Comment change.
16819
16820 1995-05-03 Richard Stallman <rms@gnu.org>
16821
16822 * src/version.c: Version now 1.24.
16823
16824 * src/bison.s1: Change distribution terms.
16825
16826 * src/version.c: Version now 1.23.
16827
16828 1995-05-03 Richard Stallman <rms@gnu.org>
16829
16830 * doc/bison.texinfo:
16831 Rewrite "Conditions for Using Bison".
16832 Update version to 1.24.
16833
16834 1995-05-03 Richard Stallman <rms@gnu.org>
16835
16836 * bison.simple: Change distribution terms.
16837
16838 1995-02-23 Richard Stallman <rms@gnu.org>
16839
16840 * src/files.c: Test __VMS_POSIX as well as VMS.
16841
16842 1995-02-14 Jim Meyering <meyering@gnu.org>
16843
16844 * src/bison.s1 (__yy_memcpy):
16845 Renamed from __yy_bcopy to avoid
16846 confusion. Reverse FROM and TO arguments to be consistent with
16847 those of memcpy.
16848
16849 1995-02-14 Jim Meyering <meyering@gnu.org>
16850
16851 * bison.simple (__yy_memcpy):
16852 Renamed from __yy_bcopy to avoid
16853 confusion. Reverse FROM and TO arguments to be consistent with
16854 those of memcpy.
16855
16856 1994-11-10 David J. MacKenzie <djm@gnu.org>
16857
16858 * NEWS: reformat
16859
16860 * NEWS: New file.
16861
16862 * Makefile.in (DISTFILES): Include NEWS.
16863
16864 * Makefile.in (DISTFILES):
16865 Include install-sh, not install.sh.
16866
16867 * configure.in: Update to Autoconf v2 macro names.
16868
16869 1994-10-05 David J. MacKenzie <djm@gnu.org>
16870
16871 * Makefile.in: fix typo
16872
16873 * Makefile.in (prefix, exec_prefix):
16874 Let configure set them.
16875
16876 1994-09-28 David J. MacKenzie <djm@gnu.org>
16877
16878 * Makefile.in: Set datadir to $(prefix)/share.
16879
16880 1994-09-15 Richard Stallman <rms@gnu.org>
16881
16882 * src/bison.s1:
16883 Update copyright notice and GPL version.
16884
16885 1994-09-15 Richard Stallman <rms@gnu.org>
16886
16887 * bison.simple:
16888 Update copyright notice and GPL version.
16889
16890 1994-07-12 Richard Stallman <rms@gnu.org>
16891
16892 * src/reduce.c, src/reader.c:
16893 entered into RCS
16894
16895 1994-05-05 David J. MacKenzie <djm@gnu.org>
16896
16897 * Makefile.in: entered into RCS
16898
16899 1994-03-26 Richard Stallman <rms@gnu.org>
16900
16901 * src/bison.s1: entered into RCS
16902
16903 1994-03-26 Richard Stallman <rms@gnu.org>
16904
16905 * bison.simple: entered into RCS
16906
16907 1994-03-25 Richard Stallman <rms@gnu.org>
16908
16909 * src/main.c: entered into RCS
16910
16911 1994-03-24 Richard Stallman <rms@gnu.org>
16912
16913 * src/conflicts.c: entered into RCS
16914
16915 1994-01-02 Richard Stallman <rms@gnu.org>
16916
16917 * Makefile.in: *** empty log message ***
16918
16919 1993-11-21 Richard Stallman <rms@gnu.org>
16920
16921 * src/bison.s1: *** empty log message ***
16922
16923 1993-11-21 Richard Stallman <rms@gnu.org>
16924
16925 * doc/bison.texinfo: entered into RCS
16926
16927 * doc/bison.texinfo: *** empty log message ***
16928
16929 1993-11-21 Richard Stallman <rms@gnu.org>
16930
16931 * bison.simple: *** empty log message ***
16932
16933 1993-10-25 David J. MacKenzie <djm@gnu.org>
16934
16935 * doc/bison.texinfo: *** empty log message ***
16936
16937 1993-10-19 Richard Stallman <rms@gnu.org>
16938
16939 * src/bison.s1: *** empty log message ***
16940
16941 1993-10-19 Richard Stallman <rms@gnu.org>
16942
16943 * bison.simple: *** empty log message ***
16944
16945 1993-10-14 Richard Stallman <rms@gnu.org>
16946
16947 * src/bison.s1: *** empty log message ***
16948
16949 1993-10-14 Richard Stallman <rms@gnu.org>
16950
16951 * bison.simple: *** empty log message ***
16952
16953 1993-09-14 David J. MacKenzie <djm@gnu.org>
16954
16955 * doc/bison.texinfo: *** empty log message ***
16956
16957 1993-09-13 Noah Friedman <friedman@gnu.org>
16958
16959 * Makefile.in: *** empty log message ***
16960
16961 1993-09-10 Richard Stallman <rms@gnu.org>
16962
16963 * src/conflicts.c: *** empty log message ***
16964
16965 * src/system.h: entered into RCS
16966
16967 1993-09-10 Richard Stallman <rms@gnu.org>
16968
16969 * doc/bison.1: entered into RCS
16970
16971 1993-09-06 Noah Friedman <friedman@gnu.org>
16972
16973 * src/version.c: entered into RCS
16974
16975 1993-09-06 Noah Friedman <friedman@gnu.org>
16976
16977 * Makefile.in: *** empty log message ***
16978
16979 1993-07-30 David J. MacKenzie <djm@gnu.org>
16980
16981 * Makefile.in: *** empty log message ***
16982
16983 1993-07-24 Richard Stallman <rms@gnu.org>
16984
16985 * src/bison.s1: *** empty log message ***
16986
16987 1993-07-24 Richard Stallman <rms@gnu.org>
16988
16989 * bison.simple: *** empty log message ***
16990
16991 1993-07-08 David J. MacKenzie <djm@gnu.org>
16992
16993 * Makefile.in: *** empty log message ***
16994
16995 1993-07-04 Richard Stallman <rms@gnu.org>
16996
16997 * src/bison.s1: *** empty log message ***
16998
16999 1993-07-04 Richard Stallman <rms@gnu.org>
17000
17001 * bison.simple: *** empty log message ***
17002
17003 1993-06-26 David J. MacKenzie <djm@gnu.org>
17004
17005 * src/getargs.c: entered into RCS
17006
17007 1993-06-26 David J. MacKenzie <djm@gnu.org>
17008
17009 * doc/bison.texinfo: *** empty log message ***
17010
17011 * doc/bison.1: New file.
17012
17013 1993-06-25 Richard Stallman <rms@gnu.org>
17014
17015 * src/getargs.c: New file.
17016
17017 1993-06-16 Richard Stallman <rms@gnu.org>
17018
17019 * src/bison.s1: *** empty log message ***
17020
17021 1993-06-16 Richard Stallman <rms@gnu.org>
17022
17023 * bison.simple: *** empty log message ***
17024
17025 1993-06-03 Richard Stallman <rms@gnu.org>
17026
17027 * src/bison.s1: New file.
17028
17029 1993-06-03 Richard Stallman <rms@gnu.org>
17030
17031 * doc/bison.texinfo: *** empty log message ***
17032
17033 1993-06-03 Richard Stallman <rms@gnu.org>
17034
17035 * bison.simple: New file.
17036
17037 1993-05-19 Richard Stallman <rms@gnu.org>
17038
17039 * doc/bison.texinfo: New file.
17040
17041 1993-05-07 Noah Friedman <friedman@gnu.org>
17042
17043 * Makefile.in: *** empty log message ***
17044
17045 1993-04-28 Noah Friedman <friedman@gnu.org>
17046
17047 * src/reader.c: *** empty log message ***
17048
17049 1993-04-23 Noah Friedman <friedman@gnu.org>
17050
17051 * src/alloc.h: entered into RCS
17052
17053 1993-04-20 David J. MacKenzie <djm@gnu.org>
17054
17055 * src/version.c: *** empty log message ***
17056
17057 * src/files.c, src/allocate.c:
17058 entered into RCS
17059
17060 * src/reader.c: *** empty log message ***
17061
17062 * src/lex.c: entered into RCS
17063
17064 * src/conflicts.c: New file.
17065
17066 * src/symtab.c: entered into RCS
17067
17068 * src/alloc.h: New file.
17069
17070 * src/LR0.c: entered into RCS
17071
17072 1993-04-18 Noah Friedman <friedman@gnu.org>
17073
17074 * src/reader.c: New file.
17075
17076 * src/version.c: *** empty log message ***
17077
17078 1993-04-18 Noah Friedman <friedman@gnu.org>
17079
17080 * Makefile.in: *** empty log message ***
17081
17082 1993-04-17 Noah Friedman <friedman@gnu.org>
17083
17084 * Makefile.in: *** empty log message ***
17085
17086 1993-04-15 Richard Stallman <rms@gnu.org>
17087
17088 * src/main.c, src/files.c:
17089 New file.
17090
17091 1993-04-15 Noah Friedman <friedman@gnu.org>
17092
17093 * configure.in: entered into RCS
17094
17095 * configure.in: *** empty log message ***
17096
17097 * configure.in: New file.
17098
17099 1993-04-14 Richard Stallman <rms@gnu.org>
17100
17101 * Makefile.in: New file.
17102
17103 1993-04-13 Richard Stallman <rms@gnu.org>
17104
17105 * src/version.c: New file.
17106
17107 1993-03-25 Richard Stallman <rms@gnu.org>
17108
17109 * src/output.c: entered into RCS
17110
17111 1992-09-25 Richard Stallman <rms@gnu.org>
17112
17113 * configure.bat: entered into RCS
17114
17115 1992-06-22 Richard Stallman <rms@gnu.org>
17116
17117 * src/vmsgetargs.c: entered into RCS
17118
17119 1992-06-22 Richard Stallman <rms@gnu.org>
17120
17121 * doc/bison.rnh: entered into RCS
17122
17123 1992-04-20 David J. MacKenzie <djm@gnu.org>
17124
17125 * README: entered into RCS
17126
17127 1992-01-22 Richard Stallman <rms@gnu.org>
17128
17129 * src/machine.h: entered into RCS
17130
17131 1991-12-21 Richard Stallman <rms@gnu.org>
17132
17133 * src/lalr.c, src/closure.c:
17134 entered into RCS
17135
17136 1991-12-20 Richard Stallman <rms@gnu.org>
17137
17138 * src/state.h: entered into RCS
17139
17140 1991-12-18 Richard Stallman <rms@gnu.org>
17141
17142 * src/print.c, src/nullable.c, src/derives.c:
17143 entered into RCS
17144
17145 1991-11-03 David J. MacKenzie <djm@gnu.org>
17146
17147 * src/warshall.c, src/types.h, src/symtab.h, src/lex.h, src/gram.c, src/gram.h, src/files.h:
17148 entered into RCS
17149
17150 1988-09-09 Richard Stallman <rms@gnu.org>
17151
17152 * src/bison.hairy: entered into RCS
17153
17154 1987-12-16 Richard Stallman <rms@gnu.org>
17155
17156 * REFERENCES: entered into RCS
17157
17158
17159 -----
17160
17161 Copyright (C) 1987, 1988, 1991, 1992, 1993, 1994, 1995, 1996,
17162 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free
17163 Software Foundation, Inc.
17164
17165 Copying and distribution of this file, with or without
17166 modification, are permitted provided the copyright notice and this
17167 notice are preserved.
17168
17169 $Id$