]> git.saurik.com Git - bison.git/blob - ChangeLog
Remove bogus comments.
[bison.git] / ChangeLog
1 2006-09-13 Paul Eggert <eggert@cs.ucla.edu>
2
3 Fix glr.cc and lalr1.cc's use of YYDEBUG so that there's zero
4 runtime cost when YYDEBUG is not defined, and so that some tests
5 that used to fail now work. Problem and initial suggestion by
6 Paolo Bonzini.
7 * data/c++.m4 (b4_parse_param_cons): Omit leading ','.
8 * data/glr.cc (b4_parser_class_name):
9 Initialize yycdebug_ only if YYDEBUG. Also, initialize yydebug_.
10 (debug_level, set_debug_level): Affect yydebug_, not ::yydebug.
11 (yydebug_) [YYDEBUG]: New member.
12 (yycdebug_): Now defined only if YYDEBUG.
13 * data/lalr1.cc (yydebug_, yycdebug_): Now defined only if YYDEBUG.
14 (YYCDEBUG) [!YYDEBUG]: Don't use yydebug_ and yycdebug_.
15 (b4_parser_class_name): Initialize yydebug_ and yycdebug_ only
16 if YYYDEBUG.
17 (debug_stream, set_debug_stream, debug_level, set_debug_level):
18 Define only if YYDEBUG.
19 * tests/calc.at (_AT_DATA_CALC_Y) [!YYDEBUG]: Omit call to
20 set_debug_level.
21 * tests/regression.at (_AT_DATA_DANCER_Y) [!YYDEBUG]: Likewise.
22 * tests/calc.at (AT_CHECK_CALC_GLR_CC): Uncomment calls to
23 AT_CHECK_CALC_GLR_CC that are working now.
24
25 2006-09-12 Paul Eggert <eggert@cs.ucla.edu>
26
27 * data/glr.cc (YYERROR_VERBOSE, YYTOKEN_TABLE): Remove.
28 We don't need them in glr.cc, and glr.c defines them.
29 Defining YYERROR_VERBOSE to 0 here breaks glr.c, since glr.c
30 assumes that defining it to anything is the same as defining
31 it to 1. Problem reported by Paolo Bonzini.
32
33 2006-09-12 Paolo Bonzini <bonzini@gnu.org> (tiny change)
34
35 * data/c.m4 (b4_null, b4_case): Define.
36 * src/output.c (prepare_symbols): Use b4_null.
37 (user_actions_output): Use b4_case.
38
39 2006-09-11 Paul Eggert <eggert@cs.ucla.edu>
40
41 * data/glr.c (b4_shared_declarations): Put start-header first,
42 before any #includes that we generate, so that feature-test
43 macros work. Problem reported by Michael Deutschmann in
44 <http://lists.gnu.org/archive/html/bug-bison/2006-09/msg00004.html>.
45 * data/lalr1.cc: Likewise.
46 * doc/bison.texinfo (Prologue): Document that feature-test macros
47 should be defined before any Bison declarations.
48 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Put defns
49 that depend on location.hh after, not before, Bison decls, since
50 we now include location.hh after the first user prologue.
51
52 * doc/bison.texinfo (Calc++ Parser): Fix memory leak reported by
53 Sander Brandenburg in
54 <http://lists.gnu.org/archive/html/bug-bison/2006-09/msg00002.html>.
55 Also, fix minor white space and comment issues.
56 (Prologue): Mention that it's better to define feature-test macros
57 before Bison declarations. Problem reported by Michael Deutschmann.
58
59 * README-cvs: Fix typo: "&" should be "&&". Problem reported
60 by Jim Meyering.
61 * m4/.cvsignore: Add argmatch.m4. Remove obstack.m4, strerror_r.m4.
62 This adjusts to recent gnulib changes.
63
64 2006-09-04 Joel E. Denny <jdenny@ces.clemson.edu>
65
66 Finish implementation of per-type %destructor/%printer. Discussed
67 starting at
68 <http://lists.gnu.org/archive/html/bison-patches/2006-02/msg00064.html>
69 and
70 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00091.html>.
71 * NEWS (2.3+): Add a description of this feature to the default
72 %destructor/%printer description.
73 * doc/bison.texinfo (Freeing Discarded Symbols): Likewise.
74 * src/symlist.c (symbol_list_destructor_set, symbol_list_printer_set):
75 Invoke semantic_type_destructor_set or semantic_type_printer_set when a
76 list node contains a semantic type.
77 * src/symtab.c, src/symtab.h: Extend with a table that associates
78 semantic types with their %destructor's and %printer's.
79 (semantic_type_from_uniqstr, semantic_type_get,
80 semantic_type_destructor_set, semantic_type_printer_set): New functions
81 composing the public interface of that table.
82 (symbol_destructor_get, symbol_destructor_location_get,
83 symbol_printer_get, symbol_printer_location_get): If there's no
84 per-symbol %destructor/%printer, look up the per-type before trying
85 the default.
86 * tests/actions.at (Per-type %printer and %destructor): New test case.
87 * tests/input.at (Default %printer and %destructor redeclared):
88 Extend to check that multiple occurrences of %symbol-default in a
89 single %destructor/%printer declaration is an error.
90 (Per-type %printer and %destructor redeclared, Unused values with
91 per-type %destructor): New test cases.
92
93 2006-09-04 Joel E. Denny <jdenny@ces.clemson.edu>
94
95 Require default %destructor/%printer to be declared using
96 %symbol-default instead of an empty symbol list, and start working on
97 new per-type %destructor/%printer. Discussed at
98 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00007.html>.
99 * NEWS (2.3+): Add %symbol-default to example.
100 * bison.texinfo (Freeing Discarded Symbols): Likewise.
101 (Bison Symbols): Add entry for %symbol-default.
102 * src/parse-gram.y (PERCENT_SYMBOL_DEFAULT): New token.
103 (generic_symlist, generic_symlist_item): New nonterminals for creating
104 a list in which each item is a symbol, semantic type, or
105 %symbol-default.
106 (grammar_declaration): Use generic_symlist in %destructor and %printer
107 declarations instead of symbols.1 or an empty list.
108 (symbol_declaration, precedence_declaration, symbols.1): Update actions
109 for changes to symbol_list.
110 * src/reader.c: Update for changes to symbol_list.
111 * src/scan-code.l: Likewise.
112 * src/scan-gram.l: Scan new PERCENT_SYMBOL_DEFAULT token.
113 * src/symlist.c, src/symlist.h: Extend such that a list node may
114 represent a semantic type or a %symbol-default in addition to just an
115 ordinary symbol. Add switched functions for setting %destructor's and
116 %printer's.
117 * tests/actions.at, tests/input.at: Add %symbol-default to all default
118 %destructor/%printer declarations.
119
120 2006-08-23 Joel E. Denny <jdenny@ces.clemson.edu>
121
122 Whether the default %destructor/%printer applies to a particular symbol
123 isn't a question of whether the user *declares* that symbol (in %token,
124 for example). It's a question of whether the user by any means
125 *defines* the symbol at all (by simply using a char token, for
126 example). $end is defined by Bison whereas any other token with token
127 number 0 is defined by the user. The error token is always defined by
128 Bison regardless of whether the user declares it with %token, but we
129 may one day let the user define error as a nonterminal instead.
130 * NEWS (2.3+): Say "user-defined" instead of "user-declared".
131 * doc/bison.texinfo (Freeing Discarded Symbols): Likewise, and document
132 the meaning of "user-defined".
133 * tests/actions.at (Default %printer and %destructor for user-declared
134 end token): Rename to...
135 (Default %printer and %destructor for user-defined end token): ...
136 this.
137
138 * src/symtab.c (symbol_destructor_get, symbol_printer_get): In the
139 computation of whether to apply the default, don't maintain a list of
140 every Bison-defined symbol. Instead, just check for a first character
141 of '$', which a user symbol cannot have, and check for the error token.
142
143 2006-08-21 Joel E. Denny <jdenny@ces.clemson.edu>
144
145 Don't apply the default %destructor or %printer to the error token,
146 $undefined, or $accept. This change fits the general rule that the
147 default %destructor and %printer are only for user-declared symbols,
148 and it solves several difficulties that are described in the new test
149 cases listed below.
150 * src/symtab.c (symbol_destructor_get, symbol_printer_get): Implement.
151 * tests/actions.at (Default %printer and %destructor are not for error
152 or $undefined, Default %printer and %destructor are not for $accept):
153 New test cases.
154
155 2006-08-19 Joel E. Denny <jdenny@ces.clemson.edu>
156
157 Allow %start after the first rule.
158 * src/reader.c (grammar_current_rule_begin): Don't set the start symbol
159 when parsing the first rule.
160 (check_and_convert_grammar): Search for it here after all grammar
161 declarations have been parsed. Skip midrules, which have dummy LHS
162 nonterminals.
163 * src/symtab.c (symbol_is_dummy): New function.
164 * src/symtab.h (symbol_is_dummy): Declare it.
165 * tests/input.at (%start after first rule): New test.
166
167 2006-08-18 Joel E. Denny <jdenny@ces.clemson.edu>
168
169 Redo some of the previous commit: add back the ability to use
170 non-aliased/undeclared string literals since it might be useful to
171 those declaring %token-table.
172 * src/reader.c (check_and_convert_grammar): Undo changes in previous
173 commit: don't worry about complaints from symbols_pack.
174 * src/symtab.c (symbol_new, symbol_class_set,
175 symbol_check_alias_consistency): Undo changes in previous commit: count
176 each string literal as a new symbol and token, assign it a symbol
177 number, and don't complain about non-aliased string literals.
178 (symbols_pack): Since symbol_make_alias still does not decrement symbol
179 and token counts but does still set aliased tokens to the same number,
180 symbol_pack_processor now leaves empty slots in the symbols array.
181 Remove those slots.
182 * tests/regression.at (Undeclared string literal): Remove test case
183 added in previous commit since non-aliased string literals are allowed
184 again.
185 (Characters Escapes, Web2c Actions): Undo changes in previous commit:
186 remove unnecessary string literal declarations.
187 * tests/sets.at (Firsts): Likewise.
188
189 2006-08-18 Joel E. Denny <jdenny@ces.clemson.edu>
190
191 Don't allow an undeclared string literal, but allow a string literal to
192 be used before its declaration.
193 * src/reader.c (check_and_convert_grammar): Don't invoke packgram if
194 symbols_pack complained.
195 * src/symtab.c (symbol_new): Don't count a string literal as a new
196 symbol.
197 (symbol_class_set): Don't count a string literal as a new token, and
198 don't assign it a symbol number since symbol_make_alias does that.
199 (symbol_make_alias): It's not necessary to decrement the symbol and
200 token counts anymore. Don't assume that an alias declaration occurs
201 before any uses of the identifier or string, and thus don't assert that
202 one of them has the highest symbol number so far.
203 (symbol_check_alias_consistency): Complain if there's a string literal
204 that wasn't declared as an alias.
205 (symbols_pack): Bail if symbol_check_alias_consistency failed since
206 symbol_pack asserts that every token has been assigned a symbol number
207 although undeclared string literals have not.
208 * tests/regression.at (String alias declared after use, Undeclared
209 string literal): New test cases.
210 (Characters Escapes, Web2c Actions): Declare string literals as
211 aliases.
212 * tests/sets.at (Firsts): Likewise.
213
214 2006-08-14 Joel E. Denny <jdenny@ces.clemson.edu>
215
216 In the grammar scanner, STRING_FINISH unclosed constructs and return
217 them to the parser in order to improve error messages.
218 * src/scan-gram.l (SC_ESCAPED_STRING, SC_ESCAPED_CHARACTER,
219 SC_BRACED_CODE, SC_PROLOGUE): Implement.
220 * tests/input.at (Unclosed constructs): New test case.
221 * tests/regression.at (Invalid inputs): Update now that unclosed %{ is
222 seen.
223
224 * src/scan-gram.h, src/scan-gram.l (gram_last_braced_code_loc): Remove
225 unused global.
226
227 2006-08-13 Joel E. Denny <jdenny@ces.clemson.edu>
228
229 Handle string aliases for character tokens correctly.
230 * src/symtab.c (symbol_user_token_number_set): If the token has an
231 alias, check and set its alias's user token number instead of its own,
232 which is set to indicate the alias. Previously, every occurrence of
233 the character token in the grammar overwrote that alias indicator with
234 the character code.
235 * tests/input.at (String aliases for character tokens): New test.
236
237 2006-08-12 Joel E. Denny <jdenny@ces.clemson.edu>
238
239 * src/parse-gram.y: Add `%expect 0' so we don't overlook conflicts.
240
241 2006-08-11 Paul Eggert <eggert@cs.ucla.edu>
242
243 * bootstrap: Put in need-ngettext argument to AM_GNU_GETTEXT,
244 to prevent failures when building on older platforms.
245 Check for autopoint failure.
246 Set XGETTEXT_OPTIONS to values that check for C format strings,
247 so that translators are warned about them (this also helps
248 prevent core dumps).
249
250 * lib/subpipe.c (create_subpipe): Use new gnulib pipe_safer
251 function, since it simplifies our code a bit.
252
253 * configure.ac (AC_ARG_ENABLE): Use -Wextra -Wno-sign-compare
254 rather than -W, so we don't get bogus warnings about sign comparisons.
255 Add -Wpointer-arith, since that warning is useful (it reports code
256 that does not conform to C89 and that some compilers reject).
257 * data/c.m4, data/glr.c, data/lalr1.cc, data/yacc.c: Undo latest change,
258 since it's no longer needed.
259
260 2006-08-10 Joel E. Denny <jdenny@ces.clemson.edu>
261
262 Clean up scanners a bit.
263 * src/flex-scanner.h (FLEX_NO_OBSTACK): New macro that blocks obstack
264 definitions so gcc won't warn when obstack_for_string is unused.
265 * src/scan-code.l: config.h and system.h are already #include'd by
266 scan-code-c.c, so get rid of them here.
267 * src/scan-gram.l: Likewise.
268 * src/scan-skel.l: Likewise, and use flex-scanner.h without obstack
269 definitions rather than duplicating the rest of it.
270 * src/scan-gram-c.c, scan-skel-c.c: #include "system.h".
271
272 2006-08-09 Joel E. Denny <jdenny@ces.clemson.edu>
273
274 Suppress signed/unsigned comparison warnings for yycheck.
275 * data/c.m4 (b4_safest_int_type): New macro.
276 * data/glr.c, data/lalr1.cc: Wherever you compare yycheck[i] against
277 a signed int type, cast it to b4_safest_int_type first.
278 * data/yacc.c: Likewise.
279 (b4_safest_int_type): Overwrite the one from c.m4 since b4_int_type is
280 also overwritten.
281
282 2006-08-09 Ralf Wildenhues <Ralf.Wildenhues@gmx.de> (tiny change)
283
284 * doc/bison.texinfo: Fix some typos.
285
286 2006-08-02 Paul Eggert <eggert@cs.ucla.edu>
287
288 * m4/.cvsignore: Add inttypes_h.m4,lib-ld.m4, lib-prefix.m4,
289 po.m4, stdint_h.m4, uintmax_t.m4, ulonglong.m4, warning.m4.
290
291 * bootstrap (gnulib_tool): Stop using --assume-autoconf;
292 the latest gnulib does this a different way.
293 (get_translations): Sharuzzaman Ahmat Raslan reported that the ms
294 translation was patched, so stop omitting it.
295
296 2006-07-29 Joel E. Denny <jdenny@ces.clemson.edu>
297
298 Enable declaration of default %printer/%destructor. Make the parser
299 use these for all user-declared grammar symbols for which the user does
300 not declare a specific %printer/%destructor. Thus, the parser uses it
301 for token 0 if the user declares it but not if Bison generates it as
302 $end. Discussed starting at
303 <http://lists.gnu.org/archive/html/bison-patches/2006-02/msg00064.html>,
304 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00091.html>,
305 and
306 <http://lists.gnu.org/archive/html/bison-patches/2006-07/msg00019.html>.
307 * NEWS (2.3+): Mention.
308 * doc/bison.texinfo (Actions in Mid-Rule): It's no longer impossible to
309 declare a %destructor for a mid-rule's semantic value. It's just
310 impossible to declare one specific to it.
311 (Freeing Discarded Symbols): Mention that @$ can be used in %destructor
312 code. Describe default %destructor form.
313 * src/parse-gram.y (grammar_declaration): Parse default
314 %printer/%destructor declarations.
315 * src/output.c (symbol_destructors_output): Use symbol_destructor_get
316 and symbol_destructor_location_get rather than accessing the destructor
317 and destructor_location members of struct symbol.
318 (symbol_printers_output): Likewise but for %printer's.
319 * src/reader.c (symbol_should_be_used): Likewise but for %destructor's
320 again.
321 * src/symtab.c (default_destructor, default_destructor_location,
322 default_printer, default_printer_location): New static global
323 variables to record the default %destructor and %printer.
324 (symbol_destructor_get, symbol_destructor_location_get,
325 symbol_printer_get, symbol_printer_location_get): New functions to
326 compute the appropriate %destructor and %printer for a symbol.
327 (default_destructor_set, default_printer_set): New functions to set the
328 default %destructor and %printer.
329 * src/symtab.h: Prototype all those new functions.
330 * tests/actions.at (Default %printer and %destructor): New test to
331 check that the right %printer and %destructor are called, that they're
332 not called for $end, and that $$ and @$ work correctly.
333 (Default %printer and %destructor for user-declared end token): New
334 test to check that the default %printer and %destructor are called for
335 a user-declared end token.
336 * tests/input.at (Default %printer and %destructor redeclared, Unused
337 values with default %destructor): New tests to check related grammar
338 warnings and errors.
339
340 2006-07-29 Joel E. Denny <jdenny@ces.clemson.edu>
341
342 Clean up handling of %destructor for the end token (token 0).
343 Discussed starting at
344 <http://lists.gnu.org/archive/html/bison-patches/2006-07/msg00019.html>
345 and
346 <http://lists.gnu.org/archive/html/help-bison/2006-07/msg00013.html>.
347
348 Make the skeletons consistent in how they pop the end token and invoke
349 its %destructor.
350 * data/glr.c (yyrecoverSyntaxError, yyparse): Don't pop the start
351 state, which has token number 0, since this would invoke the
352 %destructor for the end token.
353 * data/lalr1.cc (yy::parser::parse): Don't check for the final state
354 until after shifting the end token, or else it won't be popped.
355 * data/yacc.c (yyparse): Likewise.
356
357 * data/glr.c (yyparse): Clear the lookahead after shifting it even when
358 it's the end token. Upon termination, destroy an unshifted lookahead
359 even when it's the end token.
360 * data/lalr1.cc (yy::parser::parse): Likewise.
361 * data/yacc.c (yyparse): Likewise.
362
363 * src/reader.c (packgram): Don't check rule 0. This suppresses unused
364 value warnings for the end token when the user gives the end token a
365 %destructor.
366
367 * tests/actions.at (Printers and Destructors): Test all the above.
368
369 2006-07-24 Paul Eggert <eggert@cs.ucla.edu>
370
371 Update to latest gnulib and gettext versions.
372 * bootstrap (gnulib-modules): Remove hard-locale, stdio-safer.
373 Add fopen-safer.
374 (gnulib_files): Add m4/warning.m4. Don't worry about files
375 overwritten by autopoint.
376 Replace gt_INTL_SUBDIR_CORE with an empty body in m4/gettext_gl.m4.
377 Suppress "id", "ms", "tr" translations for now, since gettext 0.15
378 rejects them.
379 Don't use autoreconf; instead, invoke autopoint etc. by hand,
380 so that we can remove the intl files at a better time.
381 (intl_files_to_remove): Remove aclocal.m4, since it gets
382 rebuilt anyway. Remove m4/inttypes_h.m4, m4/inttypes.m4,
383 m4/isc-posix.m4, m4/lib-ld.m4, m4/lib-prefix.m4, m4/po.m4,
384 m4/stdint_h.m4, m4/uintmax_t.m4, m4/ulonglong.m4.
385 Add m4/inttypes-h.m4, m4/lock.m4, m4/visibility.m4.
386 Remove datarootdir hack; no longer needed.
387 * configure.ac: Use gl_WARNING_CFLAGS rather than BISON_WARNING.
388 (AM_GNU_GETTEXT_VERSION): Bump from 0.12 to 0.15.
389 * lib/.cvsignore: Remove hard-locale.c, hard-locale.h, strdup.c,
390 strdup.h.
391 * m4/.cvsignore: Remove hard-locale.m4, strdup.m4.
392 * m4/warning.m4: Remove from CVS, since we now use gnulib's version.
393
394 2006-07-20 Paul Eggert <eggert@cs.ucla.edu>
395
396 * bootstrap: Adjust to today's change to gnulib-tool by invoking
397 it with --assume-autoconf='latest-stable'.
398
399 2006-07-13 Joel E. Denny <jdenny@ces.clemson.edu>
400
401 * src/parse-gram.y (grammar_declaration): Don't confuse Doxygen (at
402 least 1.4.7 and 1.4.4) by putting a #line between `typedef union
403 YYSTYPE' and `{'.
404 * src/muscle_tab.h (muscle_grow): Replace the header comments with
405 those from muscle_tab.c since the old ones are misleading.
406
407 2006-07-13 Akim Demaille <akim@epita.fr>
408
409 Support %define "KEY" {VALUE}.
410 * src/scan-code.h, src/scan-code.l (translate_action)
411 (translate_rule_action, translate_symbol_action, translate_code):
412 Return char *, not const char *.
413 * src/parse-gram.y (declaration): Rename as...
414 (prologue_declaration): this.
415 (string_content): Remove this nonterminal, use STRING.
416 (braceless, content, content.opt): New nonterminal.
417 Use them.
418 (%define): Now accept content.opt, i.e., accept also BRACED_CODE
419 as value.
420 * src/scan-gram.l (getargs.h): Don't include it.
421
422 2006-07-12 Paul Eggert <eggert@cs.ucla.edu>
423
424 * data/lalr1.cc (YYCDEBUG): Use 'if (yydebug_) (*yycdebug_)'
425 rather than a for-loop that declares a local bool variable. This
426 should work around a compatibility problem with a Cray x1e C++
427 compiler reported by Hung Nguyen in
428 <http://lists.gnu.org/archive/html/help-bison/2006-07/msg00022.html>.
429 The for-loop was introduced in the 2004-11-17 change but I don't
430 know why it was needed.
431
432 2006-07-12 Akim Demaille <akim@epita.fr>
433
434 * data/c.m4: Comment changes.
435
436 2006-07-10 Akim Demaille <akim@lrde.epita.fr>
437
438 * src/complain.c (error_message, ERROR_MESSAGE): New.
439 To factor...
440 (fatal_at, fatal, warn_at, warn, complain_at, complain): these.
441 * src/complain.h, src/complain.c (warning_issued): Remove, unused.
442
443 2006-07-09 Paul Eggert <eggert@cs.ucla.edu>
444
445 * NEWS: Instead of %union, you can define and use your own union type
446 YYSTYPE if your grammar contains at least one <type> tag.
447 Your YYSTYPE need not be a macro; it can be a typedef.
448 * doc/bison.texinfo (Value Type, Multiple Types, Location Type):
449 (Union Decl, Decl Summary): Document this.
450 * data/glr.c (YYSTYPE): Implement this.
451 * data/glr.cc (YYSTYPE): Likewise.
452 * data/lalr1.cc (YYSTYPE): Likewise.
453 * data/yacc.c (YYSTYPE): Likewise.
454 * src/output.c (prepare): Output tag_seen_flag.
455 * src/parse-gram.y (declaration, grammar_declaration):
456 Use 'union_seen' rather than 'typed' to determine whether
457 %union has been seen, since grammars can now be typed without
458 %union.
459 (symbol_declaration, type.opt, symbol_def):
460 Keep track of whether a tag has been seen.
461 * src/reader.c (union_seen, tag_seen): New vars.
462 (typed): remove.
463 * src/reader.h (union_seen, tag_seen, typed): Likewise.
464 * src/scan-code.l (untyped_var_seen): New variable.
465 (handle_action_dollar): Adjust to above changes.
466 (handle_action_dollar, handle_action_at):
467 Improve overflow checking for outlandish numbers.
468 * tests/input.at (AT_CHECK_UNUSED_VALUES): Redo test to
469 avoid new diagnostics generated by above changes.
470 * tests/regression.at (YYSTYPE typedef): Add test to check
471 for type tags without %union.
472
473 * src/symlist.c (symbol_list_length): Return int, not unsigned
474 int, since callers expect int. This may need to get revisited
475 once we have proper integer overflow checking.
476
477 * src/scan-gram.h (gram_scanner_cursor): Remove decl, since this
478 object is now static.
479
480 * src/getargs.c (flags_argmatch): Return void, not int,
481 to pacify ./configure --enable-gcc-warnings.
482
483 * src/flex-scanner.h (STRING_FREE): Don't use FLEX_PREFIX (last_string)
484 since last_string is already defined to FLEX_PREFIX (last_string).
485
486 2006-07-09 Akim Demaille <akim@lrde.epita.fr>
487
488 Implement --warnings/-W.
489 * src/getargs.c (report_argmatch, trace_argmatch): Remove,
490 replaced by...
491 (flags_argmatch, FLAGS_ARGMATCH): this new function and macro.
492 Adjust callers.
493 * src/getargs.h, src/getargs.c (warnings, warnings_flags)
494 (warnings_args, warnings_types): New.
495 (getargs, short_options, long_options): Accept -W/--warnings.
496 Sort the options by alphabetical order, upper case letter right
497 before its lower case.
498
499 2006-07-09 Joel E. Denny <jdenny@ces.clemson.edu>
500
501 Change %merge result type clash warnings to errors. Discussed at
502 <http://lists.gnu.org/archive/html/bison-patches/2006-07/msg00026.html>.
503 * src/reader.c (record_merge_function_type): Use complain_at.
504 * tests/glr-regression.at (Missed %merge type warnings when LHS type is
505 declared later): Update test case results.
506
507 2006-07-09 Akim Demaille <akim@lrde.epita.fr>
508
509 * src/getargs.h, src/getargs.c: Swap --report and --trace handling
510 to be in alphabetical order.
511 (trace_args): Spelling fixes.
512
513 2006-07-09 Paul Eggert <eggert@cs.ucla.edu>
514
515 * data/yacc.c (YYID, yy_stack_print): Prefix local vars with "yy"
516 so they don't collide with user-defined macros.
517 (yy_stack_print): Don't assume that yytype_int16 promotes to int;
518 this was never guaranteed, and now that we're using gnulib stdint,
519 which defines int_fast16_t to long int, the problem is exposed.
520
521 2006-07-08 Paul Eggert <eggert@cs.ucla.edu>
522
523 * data/c.m4 (b4_basename): Simplify a bit, since we don't
524 need the full POSIX semantics (and weren't implementing them
525 anyway).
526
527 Adjust to Autoconf 2.60 and today's gnulib.
528 * bootstrap (gnulib_modules): Add stdint.
529 Remove special case for m4/onceonly_2_57.m4, since gnulib-tool
530 no longer copies it.
531 (intl_files_to_remove): Remove m4/longlong.m4 and m4/wchar_t.m4,
532 since stdint needs the former and wcwidth (which is now required
533 by mbswidth) needs the latter.
534 Append 'datarootdir = @datarootdir@' to po/Makefile.in.in, to
535 work around a compatibility glitch between gettext 0.14.6 and
536 Autoconf 2.60.
537 * configure.ac (AC_PREREQ): Require Autoconf 2.60.
538 Do not check for uintptr_t, since new stdint module does the right
539 thing.
540 * lib/.cvsignore: Remove alloca.c, alloca.h, alloca_.h.
541 Add stdint.h, stdint_.h, wcwidth.h.
542 * m4/.cvsignore: Remove alloca.m4, onceonly.m4.
543 Add absolute-header.m4, double-slash-root.m4, longlong.m4,
544 stdint.m4, wchar_t.m4, wcwidth.m4.
545 * src/files.c: Include <dirname.h> and <stdio-safer.h> in the
546 usual order for ../lib/*.h files.
547 (file_name_split): Use last_component, not base_name, to adjust
548 to gnulib changes.
549 * src/parse-gram.h: Include <strverscmp.h> in the usual order
550 for ../lib/*.h files.
551 (YYTYPE_INT16, YYTYPE_INT8, YYTYPE_UINT16, YYTYPE_UINT8):
552 Define unconditionally, since we now assume the stdint module.
553 * src/scan-skel.l: Include <dirname.h>.
554 (BASE_QPUTS): Use last_component, not base_name.
555 * src/system.h: Include <unlocked-io.h> in the usual order
556 for ../lib/*.h files. Include <stdint.h> unconditionally,
557 since we now use the stdint module.
558 (uintptr_t): Declare if UINTPTR_MAX is not defined, not
559 HAVE_UINTPTR_T, since we now use the stdint module.
560 (base_name): Remove decl, since files now include <dirname.h>
561 to get the decl.
562
563 2006-07-08 Akim Demaille <akim@lrde.epita.fr>
564
565 * data/c.m4 (b4_location_initial_column, b4_location_initial_line):
566 New, default to 1.
567 * data/yacc.c, data/glr.c, data/location.cc: Use them.
568 * NEWS, doc/bison.texinfo: The initial column and line are 1 by
569 default.
570 * tests/calc.at: Adjust.
571
572 2006-07-08 Akim Demaille <akim@lrde.epita.fr>
573
574 * data/c.m4 (b4_basename): New.
575 (b4_syncline): Also output the location of its invocation (from
576 the skeleton).
577 (b4_user_action, b4_define_user_action, b4_user_actions)
578 (b4_user_initial_action, b4_user_post_prologue, b4_user_start_header)
579 (b4_user_stype): New.
580 * data/yacc.c, data/glr.c, data/lalr1.cc, data/glr.cc: Use them.
581
582 2006-07-07 Joel E. Denny <jdenny@ces.clemson.edu>
583
584 In the grammar file, the first column is 1 not 0 on the first line as
585 on every other line.
586 * src/parse-gram.y (%initial-action): Initialize @$ correctly.
587 * tests/input.at (Torturing the Scanner): Update output.
588
589 * src/scan-gram.l (scanner_cursor): Declare it static.
590
591 2006-07-07 Joel E. Denny <jdenny@ces.clemson.edu>
592
593 In warnings, say "previous declaration" rather than "first
594 declaration".
595 * src/symtab.c (redeclaration): Do that here.
596 * src/reader.c (record_merge_function_type): In the case of a result
597 type clash, report the previous declaration rather than the very first
598 one in the grammar file.
599 * tests/glr-regression.at (Missed %merge type warnings when LHS type is
600 declared later): Add a third declaration to check this behavior.
601 * tests/input.at (Incompatible Aliases): Update output.
602
603 2006-06-27 Akim Demaille <akim@epita.fr>
604
605 * doc/Doxyfile.in: New.
606 * doc/Makefile.am: Use it.
607 * src/lalr.h, src/symtab.h: Initial doxygenation.
608
609 2006-06-26 Joel E. Denny <jdenny@ces.clemson.edu>
610
611 Don't miss %merge result type warnings just because the LHS types are
612 declared after the %merge. This continues the effort of the previous
613 patch.
614 * src/reader.c (get_merge_function): Don't set the merger type yet.
615 (record_merge_function_type): New function for setting the merger type
616 and checking for clashes.
617 (grammar_current_rule_merge_set): Set the location of the %merge for
618 the current rule.
619 (packgram): Invoke record_merge_function_type for each rule now that
620 all symbol type declarations have been parsed.
621 * src/reader.h (merger_list.type_declaration_location): New member
622 storing the location of the first %merge from which the type for this
623 merging function was derived.
624 * src/symlist.h (symbol_list.merger_declaration_location): New member
625 storing the location of a rule's %merge, if any.
626 * tests/glr-regression.at (Missed %merge type warnings when LHS type is
627 declared later): New test to catch the error fixed by the above patch.
628
629 2006-06-26 Joel E. Denny <jdenny@ces.clemson.edu>
630
631 Get action warnings (grammar_rule_check) right even when symbol
632 declarations appear after the rules. Discussed at
633 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00108.html>
634 and
635 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00151.html>.
636 Don't mistake the type of $$ in a midrule to be that of its parent
637 rule's $$.
638 * src/reader.c (grammar_current_rule_end): Don't invoke
639 grammar_rule_check yet since not all symbol declarations may have been
640 parsed yet.
641 (grammar_midrule_action): Likewise.
642 Don't record whether the midrule's $$ has been used yet since actions
643 haven't been translated yet.
644 Record the midrule's parent rule and its RHS index within the parent
645 rule.
646 (grammar_current_rule_action_append): Don't translate the action yet
647 since not all symbol declarations may have been parsed yet and, thus,
648 warnings about types for $$, $n, @$, and @n can't be reported yet.
649 (packgram): Translate the action and invoke grammar_rule_check now that
650 all symbol declarations have been parsed.
651 * src/scan-code.l (handle_action_dollar): Now that this is invoked
652 after parsing the entire grammar file, the symbol list here in the case
653 of a midrule is actually the midrule's empty RHS, so reference its
654 parent rule's RHS where necessary.
655 On the other hand, now that you can already know it's a midrule, you
656 aren't forced to think $$ has the same type as its parent rule's $$.
657 (handle_action_at): In the case of a midrule, reference the parent rule
658 where necessary.
659 * src/symlist.c (symbol_list_new): Initialize new midrule-related
660 members.
661 (symbol_list_length): Now that this is invoked after all rules have
662 been parsed, a NULL symbol (rather than a NULL symbol list node)
663 terminates a rule. symbol_list_print already does this correctly.
664 * src/symlist.h (symbol_list.midrule_parent_rule,
665 symbol_list.midrule_parent_rhs_index): New members so that midrules can
666 remember their relationships with their parents.
667 * tests/input.at (Type Clashes): Extend to catch the midrule $$ error
668 fixed by the above patch.
669 (_AT_UNUSED_VALUES_DECLARATIONS, AT_CHECK_UNUSED_VALUES): New m4 macros
670 implementing...
671 (Unused values): ... this old test case and...
672 (Unused values before symbol declarations): ... this new test case.
673 This one is the same as `Unused values' except that all symbol
674 declarations appear after the rules in order to catch the rest of the
675 errors fixed by the above patch.
676
677 2006-06-26 Joel E. Denny <jdenny@ces.clemson.edu>
678
679 More cleanup.
680 * src/reader.c (current_rule): Declare it static since it's no longer
681 used outside this file.
682 (grammar_current_rule_action_append): Remove redundant arguments from
683 translate_rule_action invocation.
684 * src/reader.h (current_rule): Remove this unused extern.
685 * src/scan-code.h (translate_rule_action): Remove redundant arguments.
686 * src/scan-code.l (translate_rule_action): Likewise.
687
688 2006-06-25 Joel E. Denny <jdenny@ces.clemson.edu>
689
690 Clean up yesterday's patch.
691 * parse-gram.y (rhs): Move grammar_midrule_action invocation from here
692 to...
693 * src/reader.c (grammar_current_rule_action_append): ... here for
694 consistency with grammar_current_rule_symbol_append.
695 * tests/regression.at (Braced code in declaration in rules section):
696 Make yyerror and yylex static as usual.
697
698 2006-06-24 Joel E. Denny <jdenny@ces.clemson.edu>
699
700 Fix bug that mistakes braced code in a declaration in the rules section
701 to be a rule action. Mentioned at
702 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00105.html>.
703 * src/scan-gram.l: Move midrule action detection from the start of the
704 scanning of any braced code to...
705 * src/parse-gram.y (rhs): ... the parsing of braced code as a rule
706 action. For readability, use $2 and @2 rather than the equivalent
707 global variables.
708 * tests/regression.at (Braced code in declaration in rules section):
709 New test to catch the error fixed by the above patch.
710
711 Work on code readability some.
712 * src/scan-code.l (current_rule): Get rid of this misleading and
713 redundant declaration: it's actually extern'ed in reader.h.
714 (YY_DECL, code_lex, handle_action_dollar, handle_action_at,
715 translate_action): Add a rule argument and use it instead of the global
716 current_rule.
717 (translate_rule_action): This already receives current_rule through an
718 argument, so pass it on to translate_action instead of assigning
719 current_rule to current_rule.
720 (translate_symbol_action, translate_code): Pass rule = NULL to
721 translate_action.
722
723 2006-06-23 Joel E. Denny <jdenny@ces.clemson.edu>
724
725 Rename %before-definitions to %start-header and %after-definitions to
726 %end-header. Don't use these declarations to separate pre-prologue
727 blocks from post-prologue blocks. Add new order-independent
728 declarations %before-header and %after-header as alternatives to the
729 traditional Yacc pre-prologue and post-prologue blocks. Discussed at
730 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00110.html>.
731 * NEWS (2.3+): Update for these changes.
732 * data/glr.c (b4_before_definitions): Update to...
733 (b4_start_header): ... this.
734 (b4_after_definitions): Update to...
735 (b4_end_header): ... this.
736 * data/glr.cc: Likewise.
737 * data/lalr1.cc: Likewise.
738 * data/yacc.c: Likewise.
739 * doc/bison.texinfo (The prologue): Update names, and replace remaining
740 prologue blocks with %*-header declarations.
741 (Calc++ Parser): Likewise.
742 (Bison Declaration Summary): Update names.
743 (Bison Symbols): Update description.
744 * src/parse-gram.y (PERCENT_AFTER_DEFINITIONS): Update to...
745 (PERCENT_END_HEADER): ... this.
746 (PERCENT_BEFORE_DEFINITIONS): Update to...
747 (PERCENT_START_HEADER): ... this.
748 (PERCENT_AFTER_HEADER, PERCENT_BEFORE_HEADER): New tokens.
749 (declaration): Update token names and m4 macro names.
750 When parsing %end-header and %start-header, invoke translate_code
751 before muscle_code_grow, and no longer set global booleans to remember
752 whether these declarations have been seen.
753 Parse new %after-header and %before-header.
754 * src/reader.c (before_definitions, after_definitions): Remove.
755 (prologue_augment): Accept a new bool argument to specify whether to
756 augment the pre-prologue or post-prologue.
757 * src/reader.h (before_definitions, after_definitions): Remove these
758 extern's.
759 (prologue_augment): Add new bool argument.
760 * src/scan-gram.l (PERCENT_AFTER_DEFINITIONS): Update to...
761 (PERCENT_END_HEADER): ... this.
762 (PERCENT_BEFORE_DEFINITIONS): Update to...
763 (PERCENT_START_HEADER): ... this.
764 (PERCENT_AFTER_HEADER, PERCENT_BEFORE_HEADER): New tokens.
765 * tests/actions.at (Printers and Destructors): Update names.
766
767 2006-06-22 Joel E. Denny <jdenny@ces.clemson.edu>
768
769 Add comparison operators for C++ location classes. Discussed at
770 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00092.html>.
771 * data/c++.m4 (b4_define_location_comparison): New boolean %define
772 declaration indicating whether filename_type has an operator==. If
773 filename_type is `std::string', it defaults to `1', `0' otherwise.
774 * data/location.cc: Iff b4_define_location_comparison is `1', add
775 operator== and operator!= for class position and for class location.
776
777 Some minor fixes.
778 * src/scan-action.l: Remove unused file.
779 * src/symtab.c (symbol_printer_set): Use printer_location not
780 destructor_location.
781 * src/symtab.h (struct symbol): Replace incorrect source comment for
782 printer members.
783 * tests/input.at (Incompatible Aliases): Update output with correct
784 printer location.
785
786 2006-06-20 Joel E. Denny <jdenny@ces.clemson.edu>
787
788 Don't put the pre-prologue in the header file. For the yacc.c code
789 file and the glr.c header and code files, move the pre-prologue before
790 the token definitions. Add new %before-definitions and
791 %after-definitions to declare code that will go in both the header file
792 and code file. Discussed at
793 <http://lists.gnu.org/archive/html/bison-patches/2005-12/msg00000.html>,
794 <http://lists.gnu.org/archive/html/bison-patches/2006-01/msg00016.html>,
795 and
796 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00055.html>.
797 * NEWS (2.3+): Describe these changes.
798 * data/glr.c (b4_pre_prologue): Move from within to before...
799 (b4_shared_declarations): ... this.
800 Add new b4_before_definitions before b4_token_enums.
801 Add new b4_after_definitions at the end.
802 * data/glr.cc (b4_pre_prologue): Replace with...
803 (b4_before_definitions): ... this in the header file.
804 (b4_after_definitions): New near the end of the header file.
805 * data/lalr1.cc (b4_pre_prologue): Move from the header file to the
806 code file right before including the header file.
807 (b4_before_definitions): New in the previous position of
808 b4_pre_prologue in the header file.
809 (b4_after_definitions): New near the end of the header file.
810 * data/yacc.c: Clean up some m4 quoting especially in the header file.
811 (b4_token_enums_defines): In the code file, move to right before
812 YYSTYPE for consistency with the header file.
813 (b4_before_definitions): New right before b4_token_enums_defines in
814 both the header and code file.
815 (b4_after_definitions): New right after YYLTYPE and yylloc in both the
816 header and code file.
817 * doc/bison.texinfo (Prologue): Show use of %before-definitions instead
818 of prologues for %union dependencies.
819 (Bison Declaration Summary): In %defines description, mention the
820 effect of %before-definitions and %after-definitions on the header
821 file.
822 (Calc++ Parser): Forward declare driver in a %before-definitions rather
823 than in the pre-prologue so that make check succeeds.
824 (Bison Symbols): Add entries for %before-definitions and
825 %after-definitions.
826 * src/parse-gram.y (PERCENT_BEFORE_DEFINITIONS): New token for
827 %before-definitions.
828 (PERCENT_AFTER_DEFINITIONS): New token for %after-definitions.
829 (declaration): Parse those declarations and append to
830 b4_before_definitions and b4_after_definitions, respectively.
831 * src/reader.c (before_definitions, after_definitions): New bools to
832 track whether those declarations have been seen.
833 (prologue_augment): Add to the post-prologue if %union,
834 %before-definitions, or %after-definitions has been seen.
835 * src/reader.h (before_definitions, after_definitions): New extern's.
836 * src/scan-gram.l: Scan the new declarations.
837 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Place the second
838 prologue block in a %before-definitions or a %after-definitions based
839 on whether the %union is declared.
840 * tests/regression.at (Early token definitions with --yacc, Early token
841 definitions without --yacc): Move tests for token definitions into the
842 post-prologue since token names are no longer defined in the
843 pre-prologue.
844
845 2006-06-20 Akim Demaille <akim@epita.fr>
846
847 * src/symtab.h, src/symtab.c (symbol_from_uniqstr): New.
848 (symbol_get): Use it.
849 * src/parse-gram.y: Use it.
850
851 2006-06-19 Joel E. Denny <jdenny@ces.clemson.edu>
852
853 * src/scan-gram.l: Remove unused declaration of last_string_1 so the
854 build succeeds when configured with --enable-gcc-warnings.
855
856 2006-06-19 Paul Eggert <eggert@cs.ucla.edu>
857
858 * src/parse-gram.y (char_name): New function.
859 (CHAR, STRING, string_content): For %printer, properly escape.
860 (ID): Prefer fputs to fprintf.
861 (id): Reindent to be consistent with other rules.
862 Properly quote char.
863
864 The Translation Project changed its way of publishing translations
865 to maintainers. I haven't received any responses to my request
866 for supporting the old way, or for documenting the new way. I
867 have modified 'bootstrap' to use screen scraping
868 (in this case, HTML scraping). This is unreliable and inelegant,
869 but I don't see any better way. Yuck.
870 * bootstrap (TP_URL, WGET_COMMAND): New vars.
871 (get_translations): New function, which uses HTML scraping to
872 deduce locations of latest translations.
873 Use this function to grab both bison and bison-runtime .po files.
874 Don't bother priming the pump for the runtime-po domain any more,
875 as it's now translated better than bison is.
876
877 2006-06-19 Akim Demaille <akim@epita.fr>
878
879 * src/scan-gram.l: No longer "parse" things after `%union' until
880 `{'. Rather, return a single "%union" token.
881 No longer make symbols: return strings, and leave the conversion
882 to symbols to the parser.
883 (SC_PRE_CODE, token_type): Remove.
884 * src/parse-gram.y (%union): New field `character'.
885 Sort tokens.
886 (CHAR): New token.
887 (ID, ID_COLON): Now that the scanner no longer makes them
888 identifiers, adjust all uses to invoke symbol_get.
889 (id_colon): New, wraps the conversion from string to symbol.
890 (%union): Accept a possible union_name.
891 (symbol): Now can be a char.
892 * data/c.m4 (b4_union_name): Leave a default value.
893 * data/glr.c, data/yacc.c: Use it.
894
895 2006-06-11 Joel E. Denny <jdenny@ces.clemson.edu>
896
897 For associating token numbers with token names for "yacc.c", don't use
898 #define statements unless `--yacc' is specified; always use enum
899 yytokentype. Most important discussions start at:
900 <http://lists.gnu.org/archive/html/bison-patches/2005-09/msg00053.html>,
901 <http://lists.gnu.org/archive/html/bison-patches/2005-12/msg00052.html>,
902 and
903 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00043.html>.
904 * NEWS (2.3+): Mention.
905 * data/c.m4 (b4_yacc_if): New.
906 (b4_token_enums_defines): Use b4_yacc_if to decide whether to add the
907 token #define's.
908 * doc/bison.texinfo (Bison Options): Describe the effect of `--yacc'
909 on token name definitions.
910 * src/getargs.c (usage): Capitalize `Yacc' in English.
911 * src/output.c (prepare): Define b4_yacc_flag.
912 * tests/regression.at (Early token definitions): Test that tokens names
913 are defined before the pre-prologue not just before the post-prologue.
914 Remove this test case and copy to...
915 (Early token definitions with --yacc): ... this to test #define's.
916 (Early token definitions without --yacc): ... and this to test enums.
917
918 2006-06-11 Paul Eggert <eggert@cs.ucla.edu>
919
920 * NEWS: Reword the post-2.3 change to not be so optimistic about
921 removing the old "look-ahead" spelling.
922 Update previous look-ahead/lookahead change reports.
923 * REFERENCES: look-ahead -> lookahead (since that's
924 what he actually wrote).
925 * doc/refcard.tex: look ahead -> lookahead,
926 look-ahead -> lookahead
927
928 2006-06-09 Joel E. Denny <jdenny@ces.clemson.edu>
929
930 For consistency, use `lookahead' instead of `look-ahead' or
931 `look_ahead'. Discussed starting at
932 <http://lists.gnu.org/archive/html/bison-patches/2006-01/msg00049.html>
933 and then at
934 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00017.html>.
935 * NEWS: For the next release, note the change to `--report'.
936 * TODO, doc/bison.1: Update English.
937 * doc/bison.texinfo: Update English.
938 (Understanding Your Parser, Bison Options): Document as
939 `--report=lookahead' rather than `--report=look-ahead'.
940 * src/conflicts.c: Update English in comments.
941 (lookahead_set): Rename from look_ahead_set.
942 (flush_reduce): Rename argument look_ahead_tokens to lookahead_tokens.
943 (resolve_sr_conflict): Rename local look_ahead_tokens to
944 lookahead_tokens, and update other uses.
945 (flush_shift, set_conflicts, conflicts_solve, count_sr_conflicts,
946 count_rr_conflicts, conflicts_free): Update uses.
947 * src/getargs.c (report_args): Move "lookahead" before alternate
948 spellings.
949 (report_types): Update uses.
950 (usage): For `--report' usage description, state `lookahead' spelling
951 rather than `look-ahead'.
952 * src/getargs.h (report.report_lookahead_tokens): Rename from
953 report_look_ahead_tokens.
954 * src/lalr.c: Update English in comments.
955 (compute_lookahead_tokens): Rename from compute_look_ahead_tokens.
956 (state_lookahead_tokens_count): Rename from
957 state_look_ahead_tokens_count.
958 Rename local n_look_ahead_tokens to n_lookahead_tokens.
959 (lookahead_tokens_print): Rename from look_ahead_tokens_print.
960 Rename local n_look_ahead_tokens to n_lookahead_tokens.
961 Update other uses.
962 Update English in output.
963 (add_lookback_edge, initialize_LA, lalr, lalr_free): Update uses.
964 * src/print.c: Update English in comments.
965 (lookahead_set): Rename from look_ahead_set.
966 (print_reduction): Rename argument lookahead_token from
967 look_ahead_token.
968 (print_core, state_default_rule, print_reductions, print_results):
969 Update uses.
970 * src/print_graph.c: Update English in comments.
971 (print_core): Update uses.
972 * src/state.c: Update English in comments.
973 (reductions_new): Update uses.
974 (state_rule_lookahead_tokens_print): Rename from
975 state_rule_look_ahead_tokens_print, and update other uses.
976 * src/state.h: Update English in comments.
977 (reductions.lookahead_tokens): Rename from look_ahead_tokens.
978 (state_rule_lookahead_tokens_print): Rename from
979 state_rule_look_ahead_tokens_print.
980 * src/tables.c: Update English in comments.
981 (conflict_row, action_row): Update uses.
982 * tests/glr-regression.at
983 (Incorrect lookahead during deterministic GLR,
984 Incorrect lookahead during nondeterministic GLR): Rename
985 print_look_ahead to print_lookahead.
986 * tests/torture.at: Update English in comments.
987 (AT_DATA_LOOKAHEAD_TOKENS_GRAMMAR): Rename from
988 AT_DATA_LOOK_AHEAD_TOKENS_GRAMMAR.
989 (Many lookahead tokens): Update uses.
990 * data/glr.c: Update English in comments.
991 * lalr1.cc: Likewise.
992 * yacc.c: Likewise.
993 * src/conflicts.h: Likewise.
994 * src/lalr.h: Likewise.
995 * src/main.c: Likewise.
996 * src/output.c: Likewise.
997 * src/parse-gram.c: Likewise.
998 * src/tables.h: Likewise.
999 * tests/calc.at: Likewise.
1000
1001 2006-06-08 Joel E. Denny <jdenny@ces.clemson.edu>
1002
1003 * src/flex-scanner.h (yytext): Remove stray `*/' in #define.
1004
1005 2006-06-07 Paul Eggert <eggert@cs.ucla.edu>
1006
1007 * TODO: Add request from Nelson H. F. Beebe to be able to install
1008 Bison without installing the yacc script.
1009
1010 2006-06-07 Joel E. Denny <jdenny@ces.clemson.edu>
1011
1012 * src/flex-scanner.h: For the sake of Flex 2.5.4, don't #define yyleng
1013 and yytext if they're already #define'd.
1014 * src/flex-scanner.h, src/location.h: Move #include "system.h" to...
1015 * src/scan-code-c.c: ... here.
1016 * src/scan-code.l, src/scan-gram.l: ... and here. Also #include
1017 <config.h>.
1018
1019 2006-06-07 Joel E. Denny <jdenny@ces.clemson.edu>
1020
1021 Get Bison to build again when configured with --enable-gcc-warnings.
1022 * src/location.c, src/location.h, src/main.c, src/scan-code.l: Add some
1023 missing #include's.
1024 * src/scan-code.l (handle_action_dollar, handle_action_at): Rename
1025 loc argument as it shadows a global.
1026 * src/scan-gram.l: Remove stray comma that prevents boundary_set
1027 invocation.
1028
1029 * src/.cvsignore: Add scan-code.c.
1030
1031 2006-06-07 Akim Demaille <akim@epita.fr>
1032
1033 * src/scan-gram.l: Move the "add a trailing ; to actions" code
1034 to...
1035 * src/scan-code.l: here.
1036 * tests/input.at (Torturing the Scanner): Fix another location
1037 error.
1038
1039 2006-06-07 Akim Demaille <akim@epita.fr>
1040
1041 * src/Makefile.am (BUILT_SOURCES): Fix the trailing backslash.
1042
1043 2006-06-06 Akim Demaille <akim@epita.fr>
1044
1045 Extract the parsing of user actions from the grammar scanner.
1046 As a consequence, the relation between the grammar scanner and
1047 parser is much simpler. We can also split "composite tokens" back
1048 into simple tokens.
1049 * src/gram.h (ITEM_NUMBER_MAX, RULE_NUMBER_MAX): New.
1050 * src/scan-gram.l (add_column_width, adjust_location): Move to and
1051 rename as...
1052 * src/location.h, src/location.c (add_column_width)
1053 (location_compute): these.
1054 Fix the column count: the initial column is 0.
1055 (location_print): Be robust to ending column being 0.
1056 * src/location.h (boundary_set): New.
1057 * src/main.c: Adjust to scanner_free being renamed as
1058 gram_scanner_free.
1059 * src/output.c: Include scan-code.h.
1060 * src/parse-gram.y: Include scan-gram.h and scan-code.h.
1061 Use boundary_set.
1062 (PERCENT_DESTRUCTOR, PERCENT_PRINTER, PERCENT_INITIAL_ACTION)
1063 (PERCENT_LEX_PARAM, PERCENT_PARSE_PARAM): Remove the {...} part,
1064 which is now, again, a separate token.
1065 Adjust all dependencies.
1066 Whereever actions with $ and @ are used, use translate_code.
1067 (action): Remove this nonterminal which is now useless.
1068 * src/reader.c: Include assert.h, scan-gram.h and scan-code.h.
1069 (grammar_current_rule_action_append): Use translate_code.
1070 (packgram): Bound check ruleno, itemno, and rule_length.
1071 * src/reader.h (gram_in, gram__flex_debug, scanner_cursor)
1072 (last_string, last_braced_code_loc, max_left_semantic_context)
1073 (scanner_initialize, scanner_free, scanner_last_string_free)
1074 (gram_out, gram_lineno, YY_DECL_): Move to...
1075 * src/scan-gram.h: this new file.
1076 (YY_DECL): Rename as...
1077 (GRAM_DECL): this.
1078 * src/scan-code.h, src/scan-code.l, src/scan-code-c.c: New.
1079 * src/scan-gram.l (gram_get_lineno, gram_get_in, gram_get_out):
1080 (gram_get_leng, gram_get_text, gram_set_lineno, gram_set_in):
1081 (gram_set_out, gram_get_debug, gram_set_debug, gram_lex_destroy):
1082 Move these declarations, and...
1083 (obstack_for_string, STRING_GROW, STRING_FINISH, STRING_FREE):
1084 these to...
1085 * src/flex-scanner.h: this new file.
1086 * src/scan-gram.l (rule_length, rule_length_overflow)
1087 (increment_rule_length): Remove.
1088 (last_braced_code_loc): Rename as...
1089 (gram_last_braced_code_loc): this.
1090 Adjust to the changes of the parser.
1091 Move all the handling of $ and @ into...
1092 * src/scan-code.l: here.
1093 * src/scan-gram.l (handle_dollar, handle_at): Remove.
1094 (handle_action_dollar, handle_action_at): Move to...
1095 * src/scan-code.l: here.
1096 * src/Makefile.am (bison_SOURCES): Add flex-scanner.h,
1097 scan-code.h, scan-code-c.c, scan-gram.h.
1098 (EXTRA_bison_SOURCES): Add scan-code.l.
1099 (BUILT_SOURCES): Add scan-code.c.
1100 (yacc): Be robust to white spaces.
1101
1102 * tests/conflicts.at, tests/input.at, tests/reduce.at,
1103 * tests/regression.at: Adjust the column numbers.
1104 * tests/regression.at: Adjust the error message.
1105
1106 2006-06-06 Joel E. Denny <jdenny@ces.clemson.edu>
1107
1108 * src/getargs.c (usage): Mention GLR not just LALR(1) in --help output.
1109 Use Akim's wording from
1110 <http://lists.gnu.org/archive/html/bison-patches/2006-05/msg00056.html>.
1111
1112 2006-06-06 Joel E. Denny <jdenny@ces.clemson.edu>
1113
1114 Between Bison releases, manually append `+' to the previous Bison
1115 release number, and use that as a signal to automatically print the
1116 ChangeLog's CVS Id keyword from --version. Discussed starting at
1117 <http://lists.gnu.org/archive/html/bison-patches/2006-05/msg00028.html>.
1118 * ChangeLog: Add Id header.
1119 * configure.ac (AC_INIT): Append `+' to `2.3'.
1120 * src/.cvsignore: Add revision.c.
1121 * src/Makefile.am (bison_SOURCES): Add revision.c and revision.h.
1122 (BUILT_SOURCES): Add revision.c.
1123 (revision.c): New target rule. This file defines a new global variable
1124 named revision. It initializes it with either the Id from ChangeLog
1125 or, if VERSION doesn't contain `+', with the empty string.
1126 * src/getargs.c (version): Print the value of revision.
1127 * src/revision.h: Extern revision.
1128
1129 2006-06-05 Paul Eggert <eggert@cs.ucla.edu>
1130
1131 * NEWS: Version 2.3.
1132 * configure.ac (AC_INIT): Likewise.
1133
1134 2006-05-30 Paul Eggert <eggert@cs.ucla.edu>
1135
1136 * data/glr.c (YYRECOVERING): Define to be a function-like macro
1137 with no arguments, not as an object-like macro. This is for
1138 compatibility with data/yacc.c. Problem reported by John P. Hartmann in
1139 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00059.html>.
1140 * doc/bison.texinfo (Action Features, Error Recovery, Table of Symbols):
1141 Document this.
1142
1143 2006-05-30 Joel E. Denny <jdenny@ces.clemson.edu>
1144
1145 * src/getargs.c (usage): Back out yesterday's modification of the
1146 --help output so that we don't have to wait for translation before
1147 releasing 2.3.
1148
1149 2006-05-29 Paul Eggert <eggert@cs.ucla.edu>
1150
1151 * doc/bison.texinfo (Introduction): Don't say "GLR grammar".
1152 Problem reported by Akim Demaille.
1153
1154 2006-05-29 Joel E. Denny <jdenny@ces.clemson.edu>
1155
1156 * src/getargs.c (usage): Mention GLR not just LALR(1) in --help output.
1157
1158 2006-05-26 Paul Eggert <eggert@cs.ucla.edu>
1159
1160 * data/yacc.c (yy_reduce_print): Omit trailing white space in
1161 generated source code. Problem reported by Frans Englich in
1162 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00049.html>.
1163
1164 2006-05-22 Paul Eggert <eggert@cs.ucla.edu>
1165
1166 * Makefile.maint (gzip_rsyncable, GZIP_ENV): Compute within the
1167 shell, not within 'make', so that 'make' by an ordinary builder
1168 (using GNU make) does not worry about configuring gzip. This also
1169 works around a bug reported independently by Keith Thompson and by
1170 Georg Schwarz, whereby gzip 1.2.4 --help would output usage on
1171 stderr rather than stdout, messing up the build logs.
1172
1173 2006-05-21 Joel E. Denny <jdenny@ces.clemson.edu>
1174
1175 * data/yacc.c (yyparse): Wrap the final return from yyparse inside YYID
1176 to make sure that YYID will never be unused. This fixes a 'make
1177 maintainer-check' failure caused by the recent changes to the 'Trivial
1178 grammars' test case, which caused g++ 4.1.0 to complain that YYID was
1179 not used.
1180 * data/glr.c (yyparse): Wrap yyparse's return inside YYID just in case.
1181
1182 2006-05-21 Joel E. Denny <jdenny@ces.clemson.edu>
1183
1184 * data/glr.c (yyresolveLocations): Remove bogus YYASSERT that the
1185 state before an empty RHS is always resolved here. Only the location
1186 of that state is guaranteed to be resolved, and that's enough. This
1187 fixes the remaining bug reported by Derek M. Jones in
1188 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00027.html>.
1189 * tests/glr-regression.at (Uninitialized location when reporting
1190 ambiguity): Test the above case.
1191 Also, the embedded comments in this test case claim it checks the case
1192 of an empty RHS that has inherited the initial location. However, the
1193 corresponding LHS was already resolved, so yyresolveLocations didn't
1194 actually have reason to modify it. Fix this by forcing
1195 nondeterministic operation at the beginning of the parse.
1196
1197 2006-05-20 Paul Eggert <eggert@cs.ucla.edu>
1198
1199 * data/c.m4 (b4_yy_symbol_print_generate):
1200 (b4_yy_symbol_print_generate): Use 'YYSTYPE const' rather than
1201 'const YYSTYPE', and similarly for YYLTYPE. This fixes one
1202 of the bugs reported today by Derek M Jones in
1203 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00027.html>.
1204 * doc/bison.texinfo (Value Type): Document that YYSTYPE must be
1205 defined to be a type name without parens or brackets.
1206 (Location Type): Similarly for YYLTYPE.
1207 * tests/regression.at (Trivial grammars): Put in a test for this
1208 bug that will be caught by 'make maintainer-check' (though not,
1209 alas, by 'make check' unless your compiler is picky).
1210
1211 2006-05-19 Paul Eggert <eggert@cs.ucla.edu>
1212
1213 * NEWS: Version 2.2.
1214 * configure.ac (AC_INIT): Likewise.
1215
1216 2006-05-17 Joel E. Denny <jdenny@ces.clemson.edu>
1217
1218 * data/glr.c (yyreportTree): Make room in yystates for the state
1219 preceding the RHS. This fixes the segmentation fault reported by Derek
1220 M. Jones in
1221 <http://lists.gnu.org/archive/html/help-bison/2006-05/msg00035.html>.
1222 (yyreportTree, yypdumpstack): Subtract 1 from yyrule before printing
1223 to the user. Reported for yyreportTree by Derek M. Jones later in the
1224 same thread.
1225 * THANKS: Add Derek M. Jones.
1226 Update my email address.
1227 Fix typo in Steve Murphy's name.
1228
1229 2006-05-14 Paul Eggert <eggert@cs.ucla.edu>
1230
1231 * data/glr.c (yyreportSyntaxError): Fix off-by-one error in
1232 checking against YYLAST that caused the parser to miss a potential
1233 alternative in its diagnostic.
1234 Problem reported by Maria Jose Moron Fernandez in
1235 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00024.html>.
1236 * data/lalr1.cc (yysyntax_error_): Likewise.
1237 * data/yacc.c (yysyntax_error): Likewise.
1238 * tests/regression.at (_AT_DATA_DANCER_Y): Use static array for
1239 tokens, in case we run into an older C compiler.
1240 (_AT_DATA_EXPECT2_Y, AT_CHECK_EXPECT2): New macros.
1241 Use them to check for the off-by-one error fixed above.
1242
1243 * data/yacc.c (yytnamerr): Fix typo: local var should be of type
1244 YYSIZE_T, not size_t.
1245 * tests/regression.at (Trivial grammars): New test, to catch
1246 the error fixed by the above patch.
1247
1248 2006-05-14 Akim Demaille <akim@lrde.epita.fr>
1249
1250 * doc/bison.texinfo (C++ Bison Interface): Clarify the naming
1251 scheme.
1252 Reported by Steve Murphy.
1253
1254 2006-05-14 Akim Demaille <akim@lrde.epita.fr>
1255
1256 * data/glr.cc, data/lalr1.cc: Using %defines is mandatory.
1257 * data/glr.cc: b4_location_flag is now b4_locations_flag.
1258
1259 2006-05-14 Akim Demaille <akim@lrde.epita.fr>
1260
1261 Implement --trace=m4.
1262 * src/getargs.c (trace_types, trace_args): Accept trace_m4.
1263 * src/output.c (output_skeleton): When set, pass -dV to m4.
1264
1265 Factor the handling of flags in m4.
1266 * src/output.c (prepare): Rename the muscle names debug, defines,
1267 error_verbose to debug_flag, defines_flag, error_verbose_flag.
1268 * data/c.m4: Adjust.
1269 (_b4_define_flag_if, b4_define_flag_if, b4_defines_if): New.
1270 Use b4_define_flag_if to define other b4_FLAG_if macros.
1271 (b4_location_if): As a consequence, rename as...
1272 (b4_locations_if): this, for consistency.
1273 Adjust all the skeletons.
1274
1275 2006-05-14 Akim Demaille <akim@lrde.epita.fr>
1276
1277 * etc/bench.pm: Shorten bench names.
1278
1279 2006-05-14 Akim Demaille <akim@lrde.epita.fr>
1280
1281 * src/output.h, src/output.c (error_verbose): Move to...
1282 * src/getargs.h, src/getargs.c: here.
1283 Sort the flags.
1284 Adjust dependencies.
1285
1286 2006-05-13 Paul Eggert <eggert@cs.ucla.edu>
1287
1288 * data/c.m4 (b4_copyright): Put the special exception for Bison
1289 skeletons here, so we don't have to put it in each skeleton. All
1290 uses changed. Suggested by Akim Demaille. Also, wrap the
1291 copyright notice, in case it is longer than 80 columns. Replace
1292 comma by newline after title.
1293
1294 2006-05-11 Paul Eggert <eggert@cs.ucla.edu>
1295
1296 * doc/bison.texinfo (Calc++ Scanner): The flex behavior is an
1297 incompatibility, not a bug. Mention that it wasn't fixed as of
1298 flex 2.5.33.
1299
1300 2006-05-11 Akim Demaille <akim@lrde.epita.fr>
1301
1302 * examples/extexi: Enforce the precedence of concatenation over
1303 >>.
1304 Reported by Tommy Nordgren.
1305
1306 2006-05-11 Akim Demaille <akim@lrde.epita.fr>
1307
1308 * data/lalr1.cc (yytranslate_): Rename token as t to avoid clashes
1309 with the member "token".
1310 Reported by Martin Nylin.
1311
1312 2006-05-08 Paul Eggert <eggert@cs.ucla.edu>
1313
1314 * data/glr.c: Switch to Bison 2.2 special-exception language in
1315 the copyright notice. Use more-regular format for titles and
1316 copyright notices.
1317 * data/glr.cc: Likewise.
1318 * data/location.cc: Likewise.
1319 * data/yacc.cc: Likewise.
1320 * doc/bison.texinfo (Conditions): Document this.
1321 * NEWS: likewise. Upgrade version to 2.2.
1322
1323 2006-04-27 Akim Demaille <akim@lrde.epita.fr>
1324
1325 * data/glr.cc: Remove dead code.
1326
1327 2006-04-25 Paul Eggert <eggert@cs.ucla.edu>
1328
1329 * bootstrap: Comment out the AM_CPPFLAGS line, since we don't use
1330 that variable and the line breaks the bootstrap. Problem reported
1331 by Juan M. Guerrero.
1332
1333 2006-04-24 Akim Demaille <akim@lrde.epita.fr>
1334
1335 * doc/bison.texinfo (Multiple start-symbols): New.
1336
1337 2006-04-24 Akim Demaille <akim@lrde.epita.fr>
1338
1339 * etc/README, etc/bench.pl: New.
1340
1341 2006-04-03 Akim Demaille <akim@lrde.epita.fr>
1342
1343 * src/scan-gram.l: Be robust to BRACED_CODE appearing before any
1344 rule.
1345 Reported by Mickael Labau.
1346 * tests/input.at (Torturing the Scanner): Test it.
1347
1348 2006-03-16 Paul Eggert <eggert@cs.ucla.edu>
1349
1350 * doc/bison.texinfo (Decl Summary): Don't mention yylloc twice.
1351 Problem reported by Bob Rossi.
1352
1353 2006-03-13 Paul Eggert <eggert@cs.ucla.edu>
1354
1355 * doc/bison.texinfo: Remove @shorttitlepage stuff; it wasn't used
1356 and didn't really work.
1357 For the index, use @ifnotinfo, not @iftex.
1358 Minor cleanups of spacing and terminology.
1359
1360 2006-03-12 Akim Demaille <akim@lrde.epita.fr>
1361
1362 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Fix the definition
1363 of AT_NAME_PREFIX when %name-prefix is not used.
1364
1365 2006-03-12 Akim Demaille <akim@lrde.epita.fr>
1366
1367 Apply --prefix to C++ skeletons too: they change the namespace.
1368 The test suite already exercize these cases.
1369 * data/c++.m4 (b4_namespace): New.
1370 * data/lalr1.cc, data/glr.cc, data/location.cc: Use it instead of `yy'.
1371 * data/lalr1.cc (yytnameerr_): Move its definition into the namespace.
1372 * data/yacc.c, data/glr.c: Remove a useless `[]'.
1373 * doc/bison.texinfo: Document it.
1374 (Option Cross Key): Use @multitable in all formats. It looks
1375 nicer, even in TeX outputs.
1376 (Rules): Use the same code whatever the output type is.
1377 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS)
1378 (_AT_BISON_OPTION_POPDEFS): Support AT_NAME_PREFIX.
1379 * tests/calc.at: Use it, instead of hard coding `yy'.
1380
1381 2006-03-10 Akim Demaille <akim@lrde.epita.fr>
1382
1383 * TODO: Remove dead items.
1384
1385 2006-03-10 Akim Demaille <akim@lrde.epita.fr>
1386
1387 * doc/FAQ: Remove, merged into...
1388 * doc/bison.texinfo (FAQ): this.
1389 * doc/Makefile.am (EXTRA_DIST): Adjust.
1390
1391 2006-03-10 Akim Demaille <akim@lrde.epita.fr>
1392
1393 * data/c.m4 (b4_token_enum): Always define the enum of tokens,
1394 even if empty.
1395 * data/lalrl1.cc, data/glr.cc (parser::token_type): New.
1396 * doc/bison.texinfo (Calc++ Scanner): Use it.
1397
1398 2006-03-09 Paul Eggert <eggert@cs.ucla.edu>
1399
1400 Fix two nits reported by twlevo, plus one more that I discovered.
1401
1402 * src/assoc.h (assoc_to_string): Give a name to the arg, as
1403 this is the usual Bison style.
1404 * src/location.h (location_print): Likewise.
1405
1406 * src/reader.h (token_name): Likewise.
1407
1408 2006-03-08 Paul Eggert <eggert@cs.ucla.edu>
1409
1410 Fix some nits reported by twlevo.
1411 * doc/FAQ: Remove ancient Y2K FAQ, replacing it with "secure"
1412 and "POSIX". Use more-modern syntax for URLs. Mention C++
1413 and ask for Java. Don't hardwire OS version numbers. Add
1414 copyright notice.
1415 * m4/.cvsignore: Add unistd_h.m4, for latest gnulib.
1416 * src/conflicts.c (solved_conflicts_obstack): Now static.
1417
1418 2006-03-08 Joel E. Denny <jdenny@ces.clemson.edu>
1419
1420 * doc/bison.texinfo (Introduction): Mention GLR and C++ as on the web
1421 page. Say "you can use it" not "you may use it" as on the web page;
1422 we're describing capabilities not granting permission.
1423
1424 2006-03-06 Paul Eggert <eggert@cs.ucla.edu>
1425
1426 * data/glr.c (yyresolveLocations): Rename local variables to avoid
1427 shadowing warnings. Use usual patter for iterating through RHS.
1428 * tests/glr-regression.at
1429 (Uninitialized location when reporting ambiguity):
1430 Modify yylex so that it uses its argument, rather than trying
1431 to rely on ARGSUSED (which doesn't work for gcc with warnings).
1432 const char -> char const.
1433
1434 * tests/Makefile.am ($(srcdir)/package.m4, maintainer-check-valgrind):
1435 Don't use tabs inside commands; it messes up 'ps'.
1436 Problem reported by twlevo.
1437
1438 2006-03-06 Joel E. Denny <jdenny@ces.clemson.edu>
1439
1440 * tests/glr-regression.at (Uninitialized location when reporting
1441 ambiguity): New test case.
1442 * data/glr.c (yyresolveLocations): New function, which uses
1443 YYLLOC_DEFAULT.
1444 (yyresolveValue): Invoke yyresolveLocations before reporting an
1445 ambiguity.
1446 * doc/bison.texinfo (Default Action for Locations): Note
1447 YYLLOC_DEFAULT's usage for ambiguity locations.
1448 (GLR Semantic Actions): Cross-reference those notes.
1449
1450 2006-03-04 Joel E. Denny <jdenny@ces.clemson.edu>
1451
1452 * tests/glr-regression.at (Leaked semantic values when reporting
1453 ambiguity): Remove unnecessary union and type declarations.
1454 (Leaked lookahead after nondeterministic parse syntax error): New test
1455 case.
1456 * data/glr.c (yyparse): Check for zero stacks remaining before
1457 attempting to shift the lookahead so that you don't lose it.
1458
1459 2006-03-02 Joel E. Denny <jdenny@ces.clemson.edu>
1460
1461 Avoid memory leaks by not invoking longjmp in yyreportAmbiguity.
1462 * tests/glr-regression.at (Leaked semantic values when reporting
1463 ambiguity): New test case.
1464 * data/glr.c (yyreportAmbiguity): Invoke yyyerror directly and return
1465 yyabort rather than invoking yyFail, which invokes longjmp. Remove the
1466 now unnecessary yystackp parameter.
1467 (yyresolveValue): Return yyreportAmbiguity's result. Now the necessary
1468 destructors can be called.
1469
1470 * tests/glr-regression.at: Don't invoke bison with `-t' unnecessarily
1471 in existing testcases.
1472
1473 2006-03-02 Joel E. Denny <jdenny@ces.clemson.edu>
1474
1475 Don't leak semantic values for parent RHS when a user action cuts the
1476 parser, and clean up related code a bit.
1477 * tests/glr-regression.at (Leaked merged semantic value if user action
1478 cuts parse): Rename to...
1479 (Leaked semantic values if user action cuts parse): ... this. Add check
1480 for leaked parent RHS values.
1481 * data/glr.c (yydestroyGLRState): In debugging output, distinguish
1482 between an unresolved state (non-empty chain of semantic options) and
1483 an incomplete one (signaled by an empty chain).
1484 (yyresolveStates): Document the interface. Move all manipulation of a
1485 successfully or unsuccessfully resolved yyGLRState to...
1486 (yyresolveValue): ... here so that yyresolveValue always leaves a
1487 yyGLRState with consistent data and thus is easier to understand.
1488 Remove the yyvalp and yylocp parameters since they are always just
1489 taken from the yys parameter. When reporting a discarded merged value
1490 in debugging output, note that it is incompletely merged. Document the
1491 interface.
1492 (yyresolveAction): If resolving any of the RHS states fails, destroy
1493 them all rather than leaking them. Thus, as long as user actions are
1494 written to clean up the RHS correctly, yyresolveAction always cleans up
1495 the RHS of a semantic option. Document the interface.
1496
1497 2006-02-27 Paul Eggert <eggert@cs.ucla.edu>
1498
1499 * data/glr.c (yyexpandGLRStack): Catch an off-by-one error that
1500 led to a segmentation fault in GNU Pascal. Problem reported
1501 by Waldek Hebisch.
1502
1503 2006-02-21 Joel E. Denny <jdenny@ces.clemson.edu>
1504
1505 * doc/bison.texinfo (Mid-Rule Actions): Explain how to bury a
1506 mid-rule action inside a nonterminal symbol in order to declare a
1507 destructor for its semantic value.
1508
1509 2006-02-16 Paul Eggert <eggert@cs.ucla.edu>
1510
1511 * data/yacc.c [(! defined yyoverflow || YYERROR_VERBOSE) && !
1512 YYSTACK_USE_ALLOCA && ! defined YYSTACK_ALLOC && defined
1513 __cplusplus && ! defined _STDLIB_H && !
1514 ((defined YYMALLOC || defined malloc) && (defined YYFREE ||
1515 defined free))]: Include <stdlib.h> rather than rolling our own
1516 declarations of malloc and free, to avoid problems with
1517 incompatible declarations (using 'throw') C++'s stdlib.h. This
1518 should fix Debian bug 340012
1519 <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=340012>,
1520 reported by Guillaume Melquiond.
1521
1522 2006-02-13 Paul Eggert <eggert@cs.ucla.edu>
1523
1524 * NEWS: Clarify symbols versus types in unused-value warnings.
1525
1526 * configure.ac (AC_INIT): Bump version number.
1527
1528 2006-02-13 Paul Eggert <eggert@cs.ucla.edu>
1529
1530 * NEWS: Version 2.1a.
1531 * tests/headers.at (AT_TEST_CPP_GUARD_H): Declare yyerror and yylex,
1532 since C99 requires this.
1533
1534 2006-02-11 Paul Eggert <eggert@cs.ucla.edu>
1535
1536 * m4/c-working.m4: New file.
1537 * configure.ac (BISON_TEST_FOR_WORKING_C_COMPILER): Use it.
1538
1539 2006-02-10 Paul Eggert <eggert@cs.ucla.edu>
1540
1541 * Makefile.maint: Merge from coreutils.
1542
1543 2006-02-09 Paul Eggert <eggert@cs.ucla.edu>
1544
1545 More portability fixes for problems summarized by Nelson H. F. Beebe.
1546
1547 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Catch a
1548 configuration screwup "./configure CC=/opt/SUNWspro/bin/c89
1549 CFLAGS="-xarch=generic64" CXX=/opt/SUNWspro/bin/CC
1550 LDFLAGS="-xarch=generic64" with Sun C 5.7 on Solaris 10; this
1551 messes up because C++ code is compiled in 32-bit mode but linked
1552 in 64-bit mode.
1553
1554 2006-02-08 Paul Eggert <eggert@cs.ucla.edu>
1555
1556 More portability fixes for problems summarized by Nelson H. F. Beebe.
1557
1558 * doc/bison.texinfo (Calc++ Scanner): Work around a bug in flex
1559 2.5.31. This resembles the 2005-10-10 patch to src/scan-skel.l.
1560
1561 * examples/calc++/Makefile.am (check_PROGRAMS): Renamed from
1562 nodist_PROGRAMS, since we don't need to actually compile the
1563 example if we're just doing a plain 'make'. This avoids bothering
1564 the installer unnecessarily about problems due to weird C++
1565 compilers.
1566
1567 2006-02-06 Paul Eggert <eggert@cs.ucla.edu>
1568
1569 More portability fixes for problems summarized by Nelson H. F. Beebe.
1570
1571 * tests/headers.at (AT_TEST_CPP_GUARD_H): Use #include <...> rather
1572 than #include "...", and compile with -I'.'. The old method was
1573 not portable, according to Posix and the C standard, and it does
1574 not work with Sun C 5.7, where previous #line directives affect
1575 the working directory used in later #include "..." directives.
1576
1577 2006-02-06 Juan Manuel Guerrero <juan.guerrero@gmx.de>
1578
1579 Various DJGGP specific issues in /djgpp
1580
1581 2006-02-02 Paul Eggert <eggert@cs.ucla.edu>
1582
1583 More portability fixes for problems summarized by Nelson H. F. Beebe.
1584
1585 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check that
1586 '#include <map>' works and that you can apply ++ to iterators.
1587
1588 2006-02-01 Paul Eggert <eggert@cs.ucla.edu>
1589
1590 Work around portability problems summarized by Nelson H. F. Beebe in
1591 <http://lists.gnu.org/archive/html/bug-bison/2005-09/msg00021.html>.
1592
1593 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check
1594 that '#include <string>' works.
1595
1596 * data/lalr1.cc (yytranslate_): No longer inline, to work around a
1597 porting problem to g++ 3.4.3 on Darwin 7.9.0, where g++ complained
1598 "warning: sorry: semantics of inline function static data `const
1599 unsigned char translate_table[262]' are wrong (you'll wind up with
1600 multiple copies)".
1601
1602 * lib/bbitset.h (struct bitset_vtable): Rename members not, and,
1603 or, xor to not_, and_, or_, and xor_, respectively. This works
1604 around a bug in GCC 3.4.3 on Irix 6.5, which apparently has a
1605 random system header somewhere that includes the equivalent of
1606 <iso646.h>.
1607
1608 * tests/headers.at (AT_TEST_CPP_GUARD_H): Don't assume that "$CC
1609 -E" works; it apparently doesn't work with PathScale EKO Compiler
1610 Suite Version 2.0.
1611
1612 2006-01-30 Joel E. Denny <jdenny@ces.clemson.edu>
1613
1614 During deterministic GLR operation, user actions should be able to
1615 influence the parse by changing yychar. To make this easier to fix and
1616 to make glr.c easier to evolve in general, don't maintain yytoken in
1617 parallel with yychar; just compute yytoken when needed.
1618 * tests/glr-regression.at (Incorrect lookahead during deterministic
1619 GLR): Check that setting yychar in a user action has the intended
1620 effect.
1621 * data/glr.c (yyGLRStack): Remove yytokenp member.
1622 (yyclearin): Don't set *yytokenp.
1623 (yyprocessOneStack, yyreportSyntaxError, yyrecoverSyntaxError): Examine
1624 yychar rather than *yytokenp to determine the current lookahead.
1625 Compute yytoken locally when needed.
1626 (yyparse): Likewise. Remove the local yytoken that yytokenp used to
1627 point to.
1628
1629 * doc/bison.texinfo (Bison Options): Remove stray sentence fragment
1630 after `--report' documentation.
1631
1632 2006-01-30 Paul Eggert <eggert@cs.ucla.edu>
1633
1634 * src/parse-gram.y (grammar_declaration): Location of printer
1635 symbol is @1, not list->location. Bug reported by twlevo.
1636 * tests/input.at (Incompatible Aliases): Adjust to above change.
1637
1638 2006-01-29 Paul Eggert <eggert@cs.ucla.edu>
1639
1640 * tests/input.at (AT_CHECK_UNUSED_VALUES): Remove. Instead, do
1641 all the test at once. This makes the output easier to read in the
1642 normal case.
1643
1644 Fix a longstanding bug uncovered by bro-0.9a9/src/parse.y, which I
1645 got from <http://bro-ids.org/download.html>. The bug is that
1646 when two actions appeared in succession, the second one was
1647 scanned before the first one was added to the grammar rule
1648 as a midrule action. Bison then output the incorrect warning
1649 "parse.y:905.17-906.36: warning: unused value: $3".
1650 * src/parse-gram.y (BRACED_CODE, action): These are no longer
1651 associated with a value.
1652 (rhs): Don't invoke grammar_current_rule_action_append.
1653 (action): Invoke it here instead.
1654 * src/reader.c (grammar_midrule_action): Now extern.
1655 (grammar_current_rule_action_append): Don't invoke
1656 grammar_midrule_action; that is now the scanner's job.
1657 * src/reader.h (last_string, last_braced_code_loc):
1658 (grammar_midrule_action): New decls.
1659 * src/scan-gram.l (last_string): Now extern, sigh.
1660 (last_braced_code_loc): New extern variable.
1661 (<INITIAL>"{"): Invoke grammar_midrule_action if the current
1662 rule already has an action.
1663 (<SC_BRACED_CODE>"}"): Set last_braced_code_loc before returning.
1664 * tests/input.at (AT_CHECK_UNUSED_VALUES):
1665 Add some tests to check that the above changes fixed the bug.
1666
1667 2006-01-27 Paul Eggert <eggert@cs.ucla.edu>
1668
1669 * src/reader.c (symbol_should_be_used): Renamed from symbol_typed_p.
1670 All used changed. Check whether the symbol has a destructor,
1671 not whether it is typed.
1672 * tests/input.at (AT_CHECK_UNUSED_VALUES): Add a destructor, so
1673 that the values are still reported as unused. All line numbers
1674 adjusted.
1675
1676 2006-01-23 Paul Eggert <eggert@cs.ucla.edu>
1677
1678 Work around a bug in bro 0.8, which underparenthesizes its
1679 definition of YYLLOC_DEFAULT.
1680 * data/glr.c: Change all uses of YYLLOC_DEFAULT to parenthesize
1681 their arguments.
1682 * data/lalr1.cc: Likewise.
1683 * data/yacc.cc: Likewise.
1684
1685 2006-01-22 Paul Eggert <eggert@cs.ucla.edu>
1686
1687 Work around a bug in Pike 7.0, and give the Pike folks a
1688 better way to override the usual int widths.
1689 * data/yacc.c (b4_int_type): Use yytype_uint8, etc., so that the
1690 user can override the types.
1691 (short): #undef, to work around a bug in Pike 7.0.
1692 (yytype_uint8, yytype_int8, yytype_uint16, yytype_int16): New types.
1693 (union yyalloc.yyss): Use yytype_int16 rather than short.
1694 All uses changed.
1695 (yysigned_char): Remove.
1696 * src/parse-gram.y (YYTYPE_UINT8, YYTYPE_INT8, YYTYPE_UINT16):
1697 (YYTYPE_INT16): New macros, to test the new facility in yacc.c.
1698 * tests/regression.at (Web2c Actions): Adjust to above changes.
1699
1700 * src/reader.c (check_and_convert_grammar): New function.
1701 (reader): Close the input file even if something went wrong during
1702 parsing. Minor file descriptor leak reported by twlevo.
1703
1704 * src/assoc.c (assoc_to_string): Use a default: abort (); case
1705 to pacify gcc -Wswitch-default.
1706 * src/scan-gram.l (adjust_location): Use a default: break; case
1707 to pacify gcc -Wswitch-default.
1708 * src/scan-skel.h (skel_get_lineno, skel_get_in, skel_get_out):
1709 (skel_get_leng, skel_get_text, skel_set_lineno, skel_set_in):
1710 (skel_set_out, skel_get_debug, skel_set_debug, skel_lex_destroy):
1711 Move these decls to scan-skel.l, since they don't need to be
1712 visible elsewhere.
1713 * src/scan-skel.l: Accept the above decls.
1714 (skel_lex): New decl, to pacify GCC when unpatched flex 2.5.31
1715 is used.
1716
1717 2006-01-21 Paul Eggert <eggert@cs.ucla.edu>
1718
1719 * Makefile.cfg (local-checks-to-skip): Add changelog-check,
1720 since we don't want to insist on a version number at the start
1721 of the changelog every time.
1722 * Makefile.maint: Sync from coreutils a bit better.
1723 (sc_trailing_blank): Renamed from sc_trailing_space.
1724 All uses changed.
1725 (sc_no_if_have_config_h, sc_require_config_h):
1726 (sc_prohibit_assert_without_use): New rules.
1727 (sc_obsolete_symbols): Don't catch Makefile.maint itself.
1728 (sc_dd_max_sym_length): Fix leading spaces in rule.
1729 (sc_system_h_headers): Prefix with @.
1730 (sc_useless_cpp_parens, m4-check): Output line numbers.
1731 (changelog-check): Allow version only in head.
1732 * data/c.m4: Use "defined FOO" instead of "defined (FOO)", to
1733 satisfy new Makefile.maint rule.
1734 * data/glr.c: Likewise.
1735 * data/glr.cc: Likewise.
1736 * data/lalr1.cc: Likewise.
1737 * data/yacc.c: Likewise.
1738 * lib/ebitsetv.c: Likewise.
1739 * lib/lbitset.c: Likewise.
1740 * lib/subpipe.c: Likewise.
1741 * lib/timevar.c: Likewise.
1742 * src/system.h: Likewise.
1743 * data/yacc.c (YYSTYPE): Don't generate trailing spaces in output.
1744 * djgpp/Makefile.maint: Add copyright notice.
1745 * djgpp/README.in: Likewise.
1746 * djgpp/config.bat: Likewise.
1747 * djgpp/config.site: Likewise.
1748 * djgpp/config_h.sed: Likewise.
1749 * djgpp/djunpack.bat: Likewise.
1750 * djgpp/config.sed: Fix copyright notice to match standard format.
1751 * djgpp/subpipe.h: Likewise.
1752 * lib/bitsetv-print.c: Likewise.
1753 * lib/bitsetv.c: Likewise.
1754 * lib/subpipe.h: Likewise.
1755 * lib/timevar.c: Likewise.
1756 * lib/timevar.h: Likewise.
1757 * djgpp/subpipe.c: Use standard recipe for config.h.
1758 * lib/abitset.c: Likewise.
1759 * lib/bitset.c: Likewise.
1760 * lib/bitset_stats.c: Likewise.
1761 * lib/bitsetv-print.c: Likewise.
1762 * lib/bitsetv.c: Likewise.
1763 * lib/ebitsetv.c: Likewise.
1764 * lib/get-errno.c: Likewise.
1765 * lib/lbitset.c: Likewise.
1766 * lib/subpipe.c: Likewise.
1767 * lib/timevar.c: Likewise.
1768 * lib/vbitset.c: Likewise.
1769 * tests/local.at: Likewise.
1770 * src/scan-gram.l: Don't include verify.h, since system.h does
1771 that for us.
1772 * .x-sc_require_config_h: New file.
1773 * .x-sc_unmarked_diagnostics: New file.
1774
1775 2006-01-20 Paul Eggert <eggert@cs.ucla.edu>
1776
1777 Be a bit more systematic about using 'abort'.
1778 * lib/abitset.c (abitset_test): Remove ATTRIBUTE_UNUSED; not needed.
1779 * lib/bitset.c (bitset_bytes, bitset_init, bitset_op4_cmp):
1780 Put 'default: abort ();' before some other case, to satisfy older
1781 pedantic compilers.
1782 * lib/bitset_stats.c (bitset_stats_init): Likewise.
1783 * lib/ebitset.c (ebitset_elt_find, ebitset_op3_cmp): Likewise.
1784 * lib/lbitset.c (lbitset_elt_find, lbitset_op3_cmp): Likewise.
1785 * src/conflicts.c (resolve_sr_conflict): Likewise.
1786 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str):
1787 (get_decision_str, get_orientation_str, get_node_alignment_str):
1788 (get_arrow_mode_str, get_crossing_type_str, get_view_str):
1789 (get_linestyle_str, get_arrowstyle_str): Likewise.
1790 * src/conflicts.c (resolve_sr_conflict):
1791 Use a default case rather than one for the one remaining enum
1792 value, to catch invalid enum values as well.
1793 * src/lalr.c (set_goto_map, map_goto):
1794 Prefer "assert (FOO);" to "if (!FOO) abort ();".
1795 * src/nullable.c (nullable_compute, token_definitions_output):
1796 Likewise.
1797 * src/reader.c (packgram, reader): Likewise.
1798 * src/state.c (transitions_to, state_new, state_reduction_find):
1799 Likewise.
1800 * src/symtab.c (symbol_user_token_number_set, symbol_make_alias):
1801 (symbol_pack): Likewise.
1802 * src/tables.c (conflict_row, pack_vector): Likewise.
1803 * src/scan-skel.l (QPUTS): Remove unnecessary parens.
1804 (BASE_QPUTS, "@output ".*\n): Remove unnecessary asserts.
1805 * src/system.h: Don't include <assert.h>.
1806 (assert): New macro.
1807
1808 * doc/bison.texinfo (Prologue, Rules, Actions, Union Decl, Action Decl):
1809 (Destructor Decl, Parser Function, Pure Calling):
1810 Describe rules for braces inside C code more carefully.
1811
1812 2006-01-19 Paul Eggert <eggert@cs.ucla.edu>
1813
1814 Fix some porting glitches found by Nelson H. F. Beebe.
1815 * lib/abitset.c (abitset_resize): Rewrite to avoid warnings from
1816 compilers that don't understand that abort () does not return.
1817 * src/state.c (transitions_to): Likewise.
1818 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check
1819 that '#include <cstdlib>' works.
1820 * src/system.h (INT8_MIN, INT16_MIN, INT32_MIN, INT8_MAX):
1821 (INT16_MAX, UINT8_MAX, INT32_MAX, UINT16_MAX, UINT32_MAX):
1822 #undef if ! defined __STDC_VERSION__ || __STDC_VERSION__ < 199901,
1823 for the benefit of some pre-C99 compilers.
1824
1825 * bootstrap: Undo changes to gnulib files that autoreconf made.
1826
1827 Minor fixups to get 'make maintainer-check' to work.
1828 * configure.ac: Don't use -Wnested-externs, as it's incompatible
1829 with the new verify.h implementation.
1830 * data/c.m4 (b4_yy_symbol_print_generate): YYUSE (yyoutput).
1831 * data/glr.c (YYUSE): Depend on __GNUC__ as well.
1832 * data/yacc.c (YYUSE): Likewise.
1833 * data/lalr1.cc (yysyntax_error_): YYUSE (yystate).
1834 * lib/subpipe.c (end_of_output_subpipe): The args are unused.
1835 * src/parse-gram.y (declaration): Don't pass a string constant
1836 to a function that expects char *, since GCC might complain
1837 about the constant value.
1838 * src/reader.c (symbol_typed_p): Add parens to pacify GCC.
1839 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): #undef yylloc and yylval
1840 before #defining them.
1841 * tests/glr-regression.at
1842 (Incorrectly initialized location for empty right-hand side in GLR):
1843 In yyerror, use the msg arg.
1844 (Corrupted semantic options if user action cuts parse):
1845 (Incorrect lookahead during deterministic GLR):
1846 (Incorrect lookahead during nondeterministic GLR):
1847 Don't name a local var 'index'; it shadows string.h's 'index'.
1848
1849 2006-01-19 Akim Demaille <akim@epita.fr>
1850
1851 * tests/calc.at (_AT_DATA_CALC_Y): Initialize the whole initial
1852 location, not just parts of it.
1853
1854 2006-01-18 Paul Eggert <eggert@cs.ucla.edu>
1855
1856 * NEWS: Document the fact that multiple %unions are now allowed.
1857 * doc/bison.texinfo (Union Decl): Likewise.
1858 * TODO: This feature is now implemented, so remove it from
1859 the wishlist.
1860
1861 * Makefile.maint: Merge with coreutils Makefile.maint.
1862 (CVS_LIST): Use build-aux version if available.
1863 (VERSION_REGEXP): New macro.
1864 (syntax-check-rules): Add sc_no_if_have_config_h,
1865 sc_prohibit_assert_without_use, sc_require_config_h,
1866 sc_useless_cpp_parens.
1867 (sc_obsolete_symbols): Check for O_NDELAY.
1868 (sc_dd_max_sym_length): Track coreutils.
1869 (sc_unmarked_diagnostics): Look in all files, not just *.c.
1870 (sc_useless_cpp_parens): New rule.
1871 (news-date-check): Look for version or today's date.
1872 (changelog-check): Don't require version number near head.
1873 (copyright-check): Use current year instead of hardwiring 2005.
1874 (my-distcheck): Depend on $(release_archive_dir)/$(prev-tgz).
1875 (announcement): Add --gpg-key-ID.
1876
1877 * djgpp/config.sed: Add copyright notice, and replace "filesystem"
1878 with "file system".
1879
1880 Avoid undefined behavior that addressed just before the start of an
1881 array. Problem reported by twlevo.
1882 * src/reader.c (packgram): Prepend a new sentinel before ritem.
1883 * src/lalr.c (build_relations): Rely on new sentinel.
1884 * src/gram.c (gram_free): Adjust to new sentinel.
1885
1886 2006-01-12 Joel E. Denny <jdenny@ces.clemson.edu>
1887
1888 * data/glr.c (yyGLRStateSet): Rename yylookaheadStatuses to
1889 yylookaheadNeeds. All uses updated.
1890 (yysplitStack): Rename local yynewLookaheadStatuses to
1891 yynewLookaheadNeeds.
1892 * data/glr-regression.at (Incorrect lookahead during nondeterministic
1893 GLR): In comments, change `lookahead status' to `lookahead need'.
1894
1895 2006-01-11 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
1896
1897 * data/glr.c (yysplitStack): A little stylistic rewrite.
1898
1899 2006-01-11 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
1900
1901 * data/glr.c (yyaddDeferredAction): Flesh out the comment.
1902
1903 2006-01-11 Joel E. Denny <jdenny@ces.clemson.edu>
1904
1905 * doc/bison.texinfo: Fix some typos.
1906 (GLR Semantic Actions): New subsection discussing special
1907 considerations because GLR semantic actions might be deferred.
1908 (Actions): Mention look-ahead usage of yylval.
1909 (Actions and Locations): Mention look-ahead usage of yylloc.
1910 (Special Features for Use in Actions): Add YYEOF entry and mention it
1911 in the yychar entry.
1912 In the yychar entry, remove mention of the local yychar case (pure
1913 parser) since this is irrelevant information when writing semantic
1914 actions and since it's already discussed in `Bison Symbols' where
1915 yychar is otherwise described as an external variable.
1916 In the yychar entry, don't call it the `current' look-ahead since it
1917 isn't when semantic actions are deferred.
1918 In the yychar and yyclearin entries, add note about deferred semantic
1919 actions.
1920 Add yylloc and yylval entries discussing look-ahead usage.
1921 (Look-Ahead Tokens): When discussing yychar, don't call it the
1922 `current' look-ahead, and do mention yylval and yylloc.
1923 (Error Recovery): Cross-reference `Action Features' when mentioning
1924 yyclearin.
1925 (Bison Symbols): In the yychar entry, don't call it the `current'
1926 look-ahead.
1927 In the yylloc and yylval entries, mention look-ahead usage.
1928
1929 2006-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
1930
1931 * tests/glr-regression.at: Update copyright year to 2006.
1932
1933 2006-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
1934
1935 * data/glr.c (yyGLRStateSet): Add yybool* yylookaheadStatuses member to
1936 use during nondeterministic operation to track which stacks have
1937 actually needed the current lookahead.
1938 (yyinitStateSet, yyfreeStateSet, yyremoveDeletes, yysplitStack):
1939 Allocate, deallocate, resize, and otherwise shuffle space for
1940 yylookaheadStatuses in parallel with yystates member of yyGLRStateSet.
1941 (yysplitStack, yyprocessOneStack, yyparse): Set lookahead status
1942 appropriately during nondeterministic operation.
1943 (yySemanticOption): Add int yyrawchar, YYSTYPE yyval, and YYLTYPE yyloc
1944 members to store the current lookahead to be used by the deferred
1945 user action.
1946 (yyaddDeferredAction): Add size_t yyk parameter specifying the stack
1947 from which the RHS is taken. Set the lookahead members of the new
1948 yySemanticOption according to the lookahead status for stack yyk.
1949 (yyglrShiftDefer, yyglrReduce): Pass yyk parameter on to
1950 yyaddDeferredAction.
1951 (yyresolveAction): Set yychar, yylval, and yylloc to the lookahead
1952 members of yySemanticOption before invoking yyuserAction, and then set
1953 them back to their current values afterward.
1954 (yyparse): Set yychar = YYEMPTY where yytoken = YYEMPTY.
1955 (yyreportAmbiguity): Add /*ARGSUSED*/ to pacify lint.
1956 * tests/glr-regression.at: Remove `.' from the ends of recent test case
1957 titles for consistency.
1958 (Leaked merged semantic value if user action cuts parse): In order to
1959 suppress lint warnings, use arguments in merge function, and assign
1960 char value < 128 in main.
1961 (Incorrect lookahead during deterministic GLR): New test case.
1962 (Incorrect lookahead during nondeterministic GLR): New test case.
1963
1964 2006-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
1965
1966 * data/c.m4 (b4_yy_symbol_print_generate): In yy_symbol_print, accept
1967 !yyvaluep as signal that no semantic value is available to print.
1968 * data/glr.c (yydestroyGLRState): If state is not resolved, don't try
1969 to print a semantic value.
1970
1971 2006-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
1972
1973 * tests/glr-regression.at: For consistency with my newer test cases,
1974 don't thank myself.
1975
1976 2006-01-05 Joel E. Denny <jdenny@ces.clemson.edu>
1977
1978 * data/glr.c (yyresolveValue): When merging semantic options, if at
1979 least one user action succeeds but a later one cuts the parse, then
1980 destroy the semantic value before returning rather than leaking it.
1981 (yyresolveStates): If a user action cuts the parse and thus
1982 yyresolveValue fails, ignore the (unset) semantic value rather than
1983 corrupting the yyGLRState, and empty the semantic options list since
1984 the user actions should have called all necessary destructors.
1985 Simplify code with YYCHK.
1986 * tests/glr-regression.at (Corrupted semantic options if user action
1987 cuts parse): New test case.
1988 (Undesirable destructors if user action cuts parse): New test case.
1989 Before applying any of this patch, this test case never actually failed
1990 for me... but only because the corrupted semantic options usually
1991 masked this bug.
1992 (Leaked merged semantic value if user action cuts parse): New test
1993 case.
1994
1995 2006-01-05 Akim Demaille <akim@epita.fr>
1996
1997 * src/reader.c, src/symlist.h, src/symlist.c: s/mid_rule/midrule/.
1998
1999 2006-01-04 Paul Eggert <eggert@cs.ucla.edu>
2000
2001 * data/c.m4 (b4_c_modern): New macro, with a new provision for
2002 _MSC_VER. Problem reported by Cenzato Marco.
2003 (b4_c_function_def): Use it.
2004 * data/yacc.c (YYMODERN_C): Remove. All uses replaced by
2005 b4_c_modern.
2006 (yystrlen, yystpcpy, yyparse): Use b4_c_function... macros rather
2007 than rolling our own.
2008
2009 2006-01-04 Akim Demaille <akim@epita.fr>
2010
2011 Also warn about non-used mid-rule values.
2012 * src/symlist.h, src/symlist.c (symbol_list): Add a mid_rule
2013 member.
2014 (symbol_list_new): Adjust.
2015 * src/reader.c (symbol_typed_p): New.
2016 (grammar_rule_check): Use it.
2017 (grammar_midrule_action): Bind a mid-rule LHS to its rule.
2018 Check its rule.
2019 * tests/input.at (AT_CHECK_UNUSED_VALUES): New.
2020 Use it.
2021 * tests/actions.at (Exotic Dollars): Adjust.
2022
2023 2006-01-04 Akim Demaille <akim@epita.fr>
2024
2025 * src/reader.c (grammar_midrule_action): If $$ is set in a
2026 mid-rule, move the `used' bit to its lhs.
2027 * tests/input.at (Unused values): New.
2028 * tests/actions.at (Exotic Dollars): Adjust: exp is not typed.
2029
2030 2006-01-03 Paul Eggert <eggert@cs.ucla.edu>
2031
2032 * doc/bison.texinfo (Bison Options): Say more accurately what
2033 --yacc does.
2034 * src/parse-gram.y (rules_or_grammar_declaration): Don't complain
2035 about declarations in the grammar when in Yacc mode, as POSIX does
2036 not require a diagnostic when the grammar uses extensions.
2037
2038 * src/reduce.c (reduce_grammar): Remove unnecessary cast to bool.
2039
2040 Warn about dubious constructions like "%token T T".
2041 Reported by twlevo.
2042 * src/symtab.h (struct symbol.declared): New member.
2043 * src/symtab.c (symbol_new): Initialize it to false.
2044 (symbol_class_set): New arg DECLARING, specifying whether
2045 this is a declaration that we want to warn about, if there
2046 is more than one of them. All uses changed.
2047
2048 * data/glr.c, data/glr.cc, data/lalr1.cc, data/yacc.c:
2049 Allow multiple %union directives, whose contents concatenate.
2050 * src/parse-gram.y (grammar_declaration): Likewise.
2051 Use muscle_code_grow, so that we don't need stype_line any more.
2052 All uses changed.
2053
2054 * src/muscle_tab.c (muscle_grow): Fix comment.
2055
2056 * ChangeLog, data/c.m4, data/glr.c, data/glr.cc, data/location.cc:
2057 * data/yacc.c, src/getargs.c, src/output.c, tests/cxx-type.at:
2058 Update copyright year to 2006.
2059
2060 2006-01-03 Akim Demaille <akim@epita.fr>
2061
2062 Have glr.cc pass (some of) the calc.at tests.
2063 * data/glr.cc (b4_parse_param_orig): New.
2064 (b4_parse_param): Improve its definition, and bound it more
2065 clearly in the skeleton.
2066 (b4_epilogue): Append, instead of prepending, in order to keep
2067 #line consistency.
2068 Simplify the generation of auxiliary functions: locations and
2069 purity are mandated.
2070 (b4_global_tokens_and_yystype): Honor it.
2071 * data/location.cc (c++.m4): Don't include it.
2072 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Define AT_GLR_CC_IF
2073 and AT_SKEL_CC_IF.
2074 * tests/calc.at (AT_CHECK_CALC): Rely on AT_SKEL_CC_IF instead of
2075 AT_LALR1_CC_IF.
2076 Be sure to initialize the first position's filename.
2077 (AT_CHECK_CALC_LALR1_CC): Add %location and %defines, they are
2078 mandated anyway.
2079 (AT_CHECK_CALC_GLR_CC): New.
2080 Use it to exercise glr.cc as a lalr1.cc drop-in replacement.
2081
2082 2006-01-02 Akim Demaille <akim@epita.fr>
2083
2084 * src/output.c (output_skeleton): Don't hard wire the inclusion of
2085 c.m4.
2086 * data/c++.m4, data/glr.c, data/yacc.c: Include c.m4.
2087 * data/glr.cc: Do not include stack.hh.
2088
2089 2006-01-02 Joel E. Denny <jdenny@ces.clemson.edu>
2090
2091 * data/glr.c: Reformat whitespace with tabs.
2092 (b4_lpure_formals): Remove this unused m4 macro.
2093 * tests/cxx-type.at: Reformat whitespace with tabs.
2094 (_AT_TEST_GLR_CXXTYPES): In union Node, rename node_info to nodeInfo
2095 since it's a member. Rename type to isNterm for clarity.
2096
2097 2005-12-29 Akim <akim@sulaco.local>
2098
2099 Let glr.cc catch up with symbol_value_print.
2100 * data/glr.cc (b4_yysymprint_generate): Replace by...
2101 (b4_yy_symbol_print_generate): this.
2102 (yy_symbol_print, yy_symbol_value_print): Declare them.
2103
2104 2005-12-28 Paul Eggert <eggert@cs.ucla.edu>
2105
2106 * src/location.h (boundary): Note that a line or column equal
2107 to INT_MAX indicates an overflow.
2108 * src/scan-gram.l: Include verify.h. Don't include get-errno.h.
2109 (rule_length_overflow, increment_rule_length, add_column_width):
2110 New functions.
2111 (<INITIAL>{id}, <SC_ESCAPED_STRING>"\"", <SC_ESCAPED_CHARACTER>"'"):
2112 (<SC_BRACED_CODE>"}"):
2113 Use increment_rule_length rather than incrementing it by hand.
2114 (adjust_location, handle_syncline): Diagnose overflow.
2115 (handle_action_dollar, handle_action_at):
2116 Fix bug with monstrosities like $-2147483648.
2117 Remove now-unnecessary checks.
2118 (scan_integer): Verify assumptions and remove now-unnecessary checks.
2119 (convert_ucn_to_byte): Verify assumptions.
2120 (handle_syncline): New arg LOC. All callers changed.
2121 Don't store through a value derived from char const * pointer.
2122
2123 * src/reader.c (grammar_rule_check): Rewrite slightly to avoid
2124 GCC warnings.
2125
2126 2005-12-27 Paul Eggert <eggert@cs.ucla.edu>
2127
2128 * src/reader.c (grammar_midrule_action, grammar_symbol_append):
2129 Remove unnecessary forward static decls.
2130
2131 2005-12-27 Akim Demaille <akim@epita.fr>
2132
2133 * src/reader.c (grammar_current_rule_check): Also check that $$
2134 is used.
2135 Take the rule to check as argument, hence rename as...
2136 (grammar_rule_check): this.
2137 * src/reader.h, src/reader.c (grammar_rule_begin, grammar_rule_end):
2138 Rename as...
2139 (grammar_rule_begin, grammar_rule_end): these, for consistency.
2140 (grammar_midrule_action, grammar_symbol_append): Now static.
2141 * tests/torture.at (input): Don't rely on the default action
2142 being always performed.
2143 * tests/calc.at: "Set" $$ even when the action is "cut" with
2144 YYERROR or other.
2145 * tests/actions.at (Exotic Dollars): Instead of using unused
2146 values, check that the warning is issued.
2147
2148 2005-12-22 Paul Eggert <eggert@cs.ucla.edu>
2149
2150 * NEWS: Improve wording for unused-value warnings.
2151
2152 2005-12-22 Akim Demaille <akim@epita.fr>
2153
2154 * data/lalr1.cc, data/yacc.c, data/glr.c, data/c.m4
2155 (b4_yysymprint_generate): Rename as...
2156 (b4_yy_symbol_print_generate): this.
2157 Generate yy_symbol_print instead of yysymprint.
2158 Generate also yy_symbol_value_print, and use it.
2159
2160 2005-12-22 Akim Demaille <akim@epita.fr>
2161
2162 * NEWS: Warn about unused values.
2163 * src/symlist.h, src/symlist.c (symbol_list, symbol_list_new): Add
2164 a `used' member.
2165 (symbol_list_n_get, symbol_list_n_used_set): New.
2166 (symbol_list_n_type_name_get): Use symbol_list_n_get.
2167 * src/scan-gram.l (handle_action_dollar): Flag used symbols.
2168 * src/reader.c (grammar_current_rule_check): Check that values are
2169 used.
2170 * src/symtab.c (symbol_print): Accept 0.
2171 * tests/existing.at: Remove the type information.
2172 Empty the actions.
2173 Remove useless actions (beware of mid-rule actions: perl -000
2174 -pi -e 's/\s*\{\}(?=[\n\s]*[|;])//g').
2175 * tests/actions.at (Exotic Dollars): Use unused values.
2176 * tests/calc.at: Likewise.
2177 * tests/glr-regression.at (No users destructors if stack 0 deleted):
2178 Likewise.
2179
2180 * src/gram.c (rule_useful_p, rule_never_reduced_p): Use
2181 rule_useful_p.
2182
2183 2005-12-21 Paul Eggert <eggert@cs.ucla.edu>
2184
2185 Undo 2005-12-01 tentative license wording change. The wording is
2186 still being reviewed by the lawyers, and we don't want to wait for
2187 them before publishing a test release. For now, revert to the
2188 previous wording.
2189 * NEWS: Undo 2005-12-01 change.
2190 * data/glr.c: Revert to previous license wording.
2191 * data/glr.cc: Likewise.
2192 * data/lalr1.cc: Likewise.
2193 * data/location.cc: Likewise.
2194 * data/yacc.c: Likewise.
2195
2196 * NEWS: Reword %destructor vs YYABORT etc.
2197 * data/glr.c: Use American spacing, for consistency.
2198 * data/glr.cc: Likewise.
2199 * data/lalr1.cc: Likewise.
2200 * data/yacc.c: Likewise.
2201 * data/yacc.c: Reformat comments slightly.
2202 * doc/bison.texinfo: Replace "non-" with "non" when that makes sense,
2203 for consistency. Fix some spelling errors and reword recently-included
2204 text slightly.
2205 * tests/cxx-type.at: Cast results of malloc, for C++.
2206
2207 2005-12-21 Joel E. Denny <address@hidden>
2208
2209 * tests/cxx-type.at: Construct a tree, count the parents of shared
2210 nodes, and free each node once and only once. Previously, the memory
2211 for semantic values was leaked instead.
2212
2213 2005-12-21 Joel E. Denny <address@hidden>
2214
2215 * data/glr.c (struct yyGLRStack): If pure, add yyval and yyloc members.
2216 (yylval, yylloc): If pure, #define to yystackp->yyval and
2217 yystackp->yyloc similar to yychar and yynerrs.
2218 (yyparse): If pure, remove local yylval and yylloc. Add local
2219 yystackp to accommodate pure definitions of yylval and yylloc.
2220 (b4_lex_param, b4_lyyerror_args, b4_lpure_args): If pure, change
2221 yylvalp and yyllocp to &yylval and &yylloc.
2222 (nerrs, char, lval, lloc): If pure, add #define's for b4_prefix[]
2223 namespace. Previously, nerrs and char were missing, but lval and lloc
2224 weren't necessary.
2225 (yyprocessOneStack, yyreportSyntaxError, yyrecoverSyntaxError): Remove
2226 yylvalp and yyllocp parameters since, if pure, these are now always
2227 accessible through yystackp. If not pure, they are still accessible
2228 globally.
2229 * data/glr.c, data/yacc.c (YYLLOC_DEFAULT): Change `if (N)' to
2230 `if (YYID (N))' to pacify lint.
2231
2232 2005-12-21 Akim Demaille <akim@epita.fr>
2233
2234 YYACCEPT, YYERROR, and YYABORT, as user actions, should not
2235 destroy the RHS symbols of a rule.
2236 * data/yacc.c (yylen): Initialize to 0.
2237 Keep its value to the number of items to possibly shift.
2238 In particular, a regular successful parse that ends on YYFINAL by
2239 a (internal) YYACCEPT must not have yylen != 0.
2240 (yyerrorlab, yyreturn): Pop the RHS.
2241 Reorder a bit to emphasize the `shifting' bits of code.
2242 (YYPOPSTACK): Now accept a number of items to pop.
2243 * data/lalr1.cc: Likewise.
2244 * data/glr.c: Formatting changes.
2245 Use goto instead of fall through.
2246 * doc/bison.texinfo (Destructor Decl): Complete.
2247
2248 2005-12-20 Juan Manuel Guerrero <juan.guerrero@gmx.de>
2249
2250 * Makefile.am: DJGPP specific files added to EXTRA_DIST.
2251 * djgpp/Makefile.maint: Fix PACKAGE variable computation.
2252 * djgpp/config.bat: Replace every occurence of the file name
2253 scan-gram-c.c with c-scan-gram.c. The same for scan-skel-c.c with
2254 c-scan-skel.c to conform with the 8.3 file name restriction on MSDOS.
2255 * djgpp/config.sed: Replace every occurence of the file name
2256 scan-gram-c.c with c-scan-gram.c. The same for scan-skel-c.c with
2257 c-scan-skel.c to conform with the 8.3 file name restriction on MSDOS.
2258 * djgpp/djunpack.bat: DJGPP specific file.
2259 * djgpp/fnchange.lst: DJGPP specific file.
2260 * djgpp/README.in: Add new information about how to unpack the bison
2261 source on MSDOS and other systems which have 8.3 file name restrictions
2262 using djunpack.bat and fnchange.lst.
2263
2264 2005-12-12 Paul Eggert <eggert@cs.ucla.edu>
2265
2266 * bootstrap (build_cvs_prefix): Remove; unused.
2267 (CVS_PREFIX): Adjust to yesterday's Savannah reorganization
2268 when getting gnulib.
2269
2270 2005-12-12 "Joel E. Denny" <jdenny@ces.clemson.edu>
2271
2272 * data/glr.c: Reorder typedef declarations for structs to match order
2273 of struct declarations.
2274 Rename yystack everywhere to yystackp except in yyparse where it's not
2275 a pointer.
2276 (yyglrShift): Change parameter YYSTYPE yysval to YYSTYPE* yyvalp for
2277 consistency.
2278 (yyis_table_ninf): Change 0 to YYID (0) to pacify lint.
2279 (yyreportSyntaxError): Add /*ARGSUSED*/ to pacify lint.
2280 (yyparse): Change while (yytrue) to while ( YYID (yytrue)) to pacify
2281 lint.
2282
2283 2005-12-09 Paul Eggert <eggert@cs.ucla.edu>
2284
2285 * tests/sets.at (Accept): Fix typos in regular expression used to
2286 sed out the final state number.
2287
2288 Work around portability problem on Solaris 10: flex-generated
2289 files include <stdio.h> before <config.h>, which messes up
2290 because the latter defines __EXTENSIONS__. Address the problem
2291 by creating two new little files that include <config.h> first,
2292 then include the flex-generated files. Rewrite everyone else
2293 to include <config.h> first, as well.
2294 * lib/timevar.c: Always include "config.h".
2295 * src/Makefile.am (bison_SOURCES): Replace scan-gram.l with
2296 scan-gram-c.c, and scan-skel.l with scan-skel-c.c.
2297 (EXTRA_bison_SOURCES): New macro.
2298 * src/scan-gram-c.c, src/scan-skel-c.c: New files.
2299 * src/system.h: Don't include config.h.
2300 * src/LR0.c: Include <config.h> first.
2301 * src/assoc.c: Likewise.
2302 * src/closure.c: Likewise.
2303 * src/complain.c: Likewise.
2304 * src/conflicts.c: Likewise.
2305 * src/derives.c: Likewise.
2306 * src/files.c: Likewise.
2307 * src/getargs.c: Likewise.
2308 * src/gram.c: Likewise.
2309 * src/lalr.c: Likewise.
2310 * src/location.c: Likewise.
2311 * src/main.c: Likewise.
2312 * src/muscle_tab.c: Likewise.
2313 * src/nullable.c: Likewise.
2314 * src/output.c: Likewise.
2315 * src/parse-gram.y: Likewise.
2316 * src/print.c: Likewise.
2317 * src/print_graph.c: Likewise.
2318 * src/reader.c: Likewise.
2319 * src/reduce.c: Likewise.
2320 * src/relation.c: Likewise.
2321 * src/state.c: Likewise.
2322 * src/symlist.c: Likewise.
2323 * src/symtab.c: Likewise.
2324 * src/tables.c: Likewise.
2325 * src/uniqstr.c: Likewise.
2326 * src/vcg.c: Likewise.
2327
2328 * src/parse-gram.y: Fix minor problems uncovered by lint.
2329 (current_lhs, current_lhs_location): Now static.
2330 (current_assoc): Remove unused variable.
2331
2332 Cleanups so that Bison-generated parsers have less lint.
2333 * data/c.m4 (b4_yydestruct_generate, b4_yysymprint_generate):
2334 Prepend /*ARGSUSED*/, for lint's sake.
2335 * data/glr.c (YYUSE): Properly parenthesize, and use an alternate
2336 definition if 'lint' is defined.
2337 (YYID): New macro (or function, if lint).
2338 All uses of /*CONSTCOND*/0 replaced by YYID(0).
2339 * data/yacc.c: Likewise.
2340 * data/glr.c (yyuserAction, yyuserMerge, yy_reduce_print):
2341 (yyrecoverSyntaxError): Prepend /*ARGSUSED*/.
2342 * data/glr.cc (YYLLOC_DEFAULT): Omit /*CONSTCOND*/ since this code
2343 is C++ only.
2344 * data/lalr1.cc (YYUSE): Just use a cast, since this code is C++ only.
2345 * data/yacc.c (YYSTACK_FREE) [defined YYSTACK_ALLOC]:
2346 Use YYID(0) rather than 0, for lint.
2347 (yystrlen): Rewrite to avoid lint warning about ptrdiff_t overflow.
2348 (yysyntax_error): Rewrite to avoid lint warnings about parenthesization.
2349
2350 2005-12-07 Paul Eggert <eggert@cs.ucla.edu>
2351
2352 * tests/glr-regression.at
2353 (Improper handling of embedded actions and dollar(-N) in GLR parsers):
2354 Close memory leak reported by twlevo.
2355
2356 2005-12-06 "Joel E. Denny" <jdenny@ces.clemson.edu>
2357
2358 * data/glr.c (yyprocessOneStack, yyparse): Synchronize the shift for
2359 all stacks.
2360 (yyparse): Iterate another stack in order to call user destructors.
2361 * tests/glr-regression.at (No users destructors if stack 0 deleted):
2362 New test case.
2363 (Duplicated user destructor for lookahead): This test now is expected
2364 to succeed.
2365
2366 2005-12-01 Paul Eggert <eggert@cs.ucla.edu>
2367
2368 * NEWS: Document the following change.
2369 * data/yacc.c: Say "parser skeleton" rather than "file", since
2370 it's no longer just a file.
2371 * data/glr.c: Grant a special exception for C GLR parsers, that
2372 reads like the already-existing exception for C LALR(1) parsers.
2373 * data/glr.cc: Likewise.
2374 * data/lalr1.cc: Likewise.
2375 * data/location.cc: Likewise.
2376 * data/yacc.c: Reword the "written by" statement to clarify that
2377 it was the parser skeleton, not the entire output file.
2378 * data/glr.c: Written by Paul Hilfinger.
2379 * data/glr.cc: Written by Akim Demaille.
2380 * data/lalr1.cc: Likewise.
2381
2382 2005-11-18 Paul Eggert <eggert@cs.ucla.edu>
2383
2384 * data/yacc.c (yy_reduce_print, YY_REDUCE_PRINT):
2385 Fix typos in previous change that broke 'make check'.
2386 YY_REDUCE_PRINT cannot be a pseudo-varargs macro; that isn't
2387 supported in C.
2388 * tests/calc.at (_AT_CHECK_CALC,_AT_CHECK_CALC_ERROR):
2389 Don't check NUM-STDERR-LINES, since the output format is fluctuating.
2390 We can revert this once things settle down.
2391
2392 * src/conflicts.c (conflicts_print): Don't print file name twice
2393 when %expect fails because there were no conflicts.
2394 * doc/bison.texinfo (Expect Decl): Tighten up wording in previous
2395 change.
2396 * tests/conflicts.at (%expect not enough, %expect too much):
2397 (%expect with reduce conflicts): Adjust to new behavior.
2398
2399 2005-11-18 Akim Demaille <akim@epita.fr>
2400
2401 * src/conflicts.c (conflicts_print): Unsatisfied %expectation are
2402 errors.
2403 * NEWS: Document this.
2404 * doc/bison.texinfo (Expect Decl): Likewise.
2405
2406 2005-11-16 Akim Demaille <akim@epita.fr>
2407
2408 Generalize the display of semantic values and locations in traces.
2409 * data/glr.c (yy_reduce_print): Fix indices (again).
2410 * data/c++.m4 (b4_rhs_value, b4_rhs_location): Don't expect
2411 literal integers.
2412 * data/lalr1.cc (yyreduce_print): Rename as...
2413 (yy_reduce_print): this.
2414 Display values and locations.
2415 * data/yacc.c (yy_reduce_print): Likewise.
2416 (YY_REDUCE_PRINT): Adjust to pass the required arguments.
2417 (yysymprint): Move higher to be visible from yy_reduce_print).
2418 (yyparse): Adjust.
2419 * tests/calc.at: Adjust the expected length of the traces.
2420
2421 2005-11-14 Akim Demaille <akim@epita.fr>
2422
2423 * data/glr.c (yy_reduce_print): The loop was quite wrong: type are
2424 from 1 to N, while values and location start at 0.
2425 (b4_rhs_location, b4_rhs_value): Add parens around $1 and $2.
2426
2427 2005-11-14 Akim Demaille <akim@epita.fr>
2428
2429 * data/glr.c (yy_reduce_print): Fix the $ number.
2430
2431 2005-11-14 Akim Demaille <akim@epita.fr>
2432
2433 "Use" parse parameters.
2434 * data/c.m4 (b4_parse_param_for, b4_parse_param_use): New.
2435 * data/glr.c, data/glr.cc: Use them.
2436 * data/glr.c (YYUSE): Have a C++ definition that supports
2437 non-pointer types.
2438
2439 2005-11-14 Akim Demaille <akim@epita.fr>
2440
2441 * data/glr.c (yyexpandGLRStack): Declare only if defined.
2442
2443 2005-11-14 Akim Demaille <akim@epita.fr>
2444
2445 * data/glr.cc: New.
2446 * data/m4sugar/m4sugar.m4 (m4_prepend): New.
2447
2448 2005-11-12 Akim Demaille <akim@epita.fr>
2449
2450 Let position and location be PODs.
2451 * data/location.cc (position::initialize, location::initialize): New.
2452 (position::position, location::location): Define only if
2453 b4_location_constructors is defined.
2454 * data/lalr1.cc (b4_location_constructors): Define it for backward
2455 compatibility.
2456 * doc/bison.texinfo (Initial Action Decl): Use initialize.
2457
2458 2005-11-12 Akim Demaille <akim@epita.fr>
2459
2460 * data/lalr1.cc: Move the body of the ctor and dtor into the
2461 parser file (instead of the header).
2462 Wrap the implementations in a "namespace yy".
2463
2464 2005-11-12 Akim Demaille <akim@epita.fr>
2465
2466 Have glr.c include its header file when created.
2467 * data/glr.c (b4_shared_declarations): New.
2468 Output them verbatim in the parser if !%defines, otherwise
2469 output then in the header file, and include it instead.
2470
2471 2005-11-11 Akim Demaille <akim@epita.fr>
2472
2473 * data/glr.c: Comment changes.
2474
2475 2005-11-11 Akim Demaille <akim@epita.fr>
2476
2477 When yydebug, report semantic and location values for reductions.
2478 * data/glr.c (yy_reduce_print): Report the semantic values and the
2479 locations.
2480 (YY_REDUCE_PRINT): Adjust.
2481 (yyglrReduce): Use them.
2482 (b4_rhs_value, b4_rhs_location): Remove m4_eval invocations.
2483 * data/c.m4 (b4_yysymprint_generate): Specify the const arguments.
2484 * tests/calc.at (_AT_CHECK_CALC_ERROR): Remove the reduction
2485 traces.
2486
2487 2005-11-10 Akim Demaille <akim@epita.fr>
2488
2489 * data/glr.c (yynewGLRStackItem, YY_RESERVE_GLRSTACK): New.
2490 (yyaddDeferredAction, yyglrShift, yyglrShiftDefer): Use them.
2491 (yyexpandGLRStack, YYRELOC): Define only when YYSTACKEXPANDABLE.
2492
2493 2005-11-09 Albert Chin-A-Young <china@thewrittenword.com>
2494
2495 * m4/cxx.m4, examples/Makefile.am: Don't build
2496 examples/calc++ if no C++ compiler is available. (trivial change)
2497
2498 2005-11-09 Akim Demaille <akim@epita.fr>
2499
2500 * src/scan-skel.l: Use a couple of asserts.
2501
2502 2005-11-03 Akim Demaille <akim@epita.fr>
2503
2504 In some (weird) cases, the final state number is incorrect.
2505 Reported by Alexandre Duret-Lutz.
2506 * src/LR0.c (state_list_append): Remove the computation of
2507 final_state.
2508 (save_reductions): Do it here.
2509 (get_state): Alpha conversion.
2510 (generate_states): Use a for loop.
2511 * src/gram.h (item_number_is_rule_number)
2512 (item_number_is_symbol_number): New.
2513 * src/state.c: Use assert.
2514 * src/system.h: Include assert.h.
2515 * tests/sets.at (Accept): New.
2516
2517 2005-10-30 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
2518
2519 * data/glr.c (yyfill): Adjust comment.
2520 (yyresolveAction): Initialize default location properly
2521 for empty right-hand sides.
2522 (yydoAction): Ditto.
2523 Add comment explaining apparently dead code.
2524 * tests/glr-regression.at
2525 (Incorrectly initialized location for empty right-hand side in GLR):
2526 New test.
2527
2528 2005-10-30 Paul Eggert <eggert@cs.ucla.edu>
2529
2530 * bootstrap (cleanup_gnulib): New function. Use it to clean up
2531 gnulib when interrupted. This fixes some race conditions and
2532 works around some portability problems (one noted by Paul
2533 Hilfinger).
2534
2535 2005-10-22 Akim <akim@epita.fr>
2536
2537 * Makefile.cfg: Adjust to config -> build-aux.
2538 Reported by twledo.
2539
2540 2005-10-21 Akim Demaille <akim@epita.fr>
2541
2542 * data/c.m4 (b4_yydestruct_generate, b4_yysymprint_generate): Pass
2543 the %parse-params.
2544 * data/glr.c (YY_SYMBOL_PRINT, yydestroyGLRState): Adjust.
2545 * data/yacc.c (b4_Pure_if): Rename as...
2546 (b4_yacc_pure_if): this.
2547 (YY_SYMBOL_PRINT, yyparse): Adjust.
2548 * doc/bison.texinfo: Formatting changes.
2549
2550 2005-10-21 Akim Demaille <akim@epita.fr>
2551
2552 Finish the transition config -> build-aux.
2553 * configure.ac, Makefile.am: Use build-aux.
2554 * config/prev-version, config/announce-gen, config/Makefile.am:
2555 Move to...
2556 * build-aux/prev-version, build-aux/announce-gen,
2557 * build-aux/Makefile.am: here.
2558
2559 2005-10-14 Akim Demaille <akim@epita.fr>
2560
2561 * examples/calc++/test: Use set -x only when VERBOSE.
2562
2563 2005-10-13 Paul Eggert <eggert@cs.ucla.edu>
2564
2565 * NEWS: Bison now warns if it finds a stray `$' or `@' in an action.
2566 * src/scan-gram.l (<SC_BRACED_CODE>[$@]): Implement this.
2567
2568 2005-10-13 Akim Demaille <akim@epita.fr>
2569
2570 * src/scan-skel.l: Output the base name parts of the parser and
2571 header file names.
2572 * tests/output.at (AT_CHECK_OUTPUT): Support subdirectories, and
2573 additional checks.
2574 Use this to exercise C++ outputs in subdirs.
2575 Reported by Oleg Smolsky.
2576
2577 2005-10-12 Paul Eggert <eggert@cs.ucla.edu>
2578
2579 * data/c.m4 (b4_c_function_def): Look at __C99_FUNC__, not at
2580 __STDC_VERSION__, as IBM cc 7.0 doesn't define the latter either.
2581 Problem reported by John P. Hartmann.
2582 * data/yacc.c (YYMODERN_C): Likewise. Don't define if the user has
2583 already defined it.
2584
2585 2005-10-12 Akim Demaille <akim@epita.fr>
2586
2587 * src/parse-gram.y (version_check): Exit 63 to please missing
2588 (stands for "version mismatch).
2589 * tests/input.at, doc/bison.texinfo: Adjust.
2590
2591 2005-10-10 Paul Eggert <eggert@cs.ucla.edu>
2592
2593 Work around portability problems with Visual Age C compiler
2594 (xlc and xlC_r) reported by John P. Hartmann.
2595 * data/location.cc (initial_column, initial_line): Remove.
2596 All uses replaced by 0 and 1.
2597 * src/scan-gram.l (gram_wrap): Redefine to avoid bug in flex 2.5.31
2598 that xlc complains about.
2599 * src/scan-skel.l (skel_wrap): Likewise.
2600 * data/c.m4 (b4_c_function_def): Look at __STDC_VERSION__ as well
2601 as __STDC__.
2602 * data/yacc.c (YYMODERN_C): New macro, which also looks at
2603 __STDC_VERSION__. Use it everywhere instead of looking at
2604 __STDC__ and __cplusplus.
2605
2606 2005-10-10 Akim Demaille <akim@epita.fr>
2607
2608 * examples/calc++/test: Be quiet unless VERBOSE.
2609
2610 2005-10-05 Paul Eggert <eggert@cs.ucla.edu>
2611
2612 * data/c.m4 (yydestruct, yysymprint):
2613 Use YYUSE instead of casting to void.
2614 * data/glr.c (YYUSE): New macro.
2615 (yyuserMerge, yyreportAmbiguity, yyreportSyntaxError):
2616 Use it instead of rolling our own.
2617 (YYLLOC_DEFAULT, YYCHK, YYDPRINTF, YY_SYMBOL_PRINT, YY_REDUCE_PRINT):
2618 (YYCHK1):
2619 Use /*CONSTCOND*/ to suppress lint warnings.
2620 * data/lalr1.cc (YYLLOC_DEFAULT, YY_SYMBOL_PRINT, YY_REDUCE_PRINT):
2621 (YY_STACK_PRINT): Use 'false' not '0'.
2622 (YYUSE): New macro.
2623 (yysymprint_, yydestruct_): Use it instead of rolling our own.
2624 * data/yacc.c (YYUSE): New macro.
2625 (YYCOPY, YYSTACK_RELOCATE, YYBACKUP, YYLLOC_DEFAULT):
2626 (YYDPRINTF, YY_SYMBOL_PRINT, YY_STACK_PRINT, YY_REDUCE_PRINT):
2627 (yyerrorlab): Use /*CONSTCOND*/ to suppress lint warnings.
2628
2629
2630 * data/m4sugar/m4sugar.m4 (_m4_map): New macro.
2631 (m4_map, m4_map_sep): Use it. Handle the empty list correctly.
2632
2633 2005-10-04 Paul Eggert <eggert@cs.ucla.edu>
2634
2635 Undo the parts of the unlocked-I/O change that substituted
2636 putc or puts for printf. This might hurt performance a bit,
2637 but some people prefer the printf style.
2638 * data/c.m4 (yysymprint): Prefer printf to puts and putc.
2639 * data/glr.c (YYFPUTC, YYFPUTS, YYDPUTS): Remove.
2640 All uses replaced by YYFPRINTF and YYDPRINTF.
2641 * data/yacc.c: Likewise.
2642 * lib/bitset.c (bitset_print): Likewise.
2643 * lib/bitsetv.c (bitsetv_dump, debug-bitsetv): Prefer printf to
2644 putc and puts.
2645 * lib/lbitset.c (debug_lbitset): Likewise.
2646 * src/closure.c (print_firsts, print_fderives): Likewise.
2647 * src/gram.c (grammar_dump): Likewise.
2648 * src/lalr.c (look_ahead_tokens_print): Likewise.
2649 * src/output.c (escaped_output): Likewise.
2650 (user_actions_output): Break apart two printfs.
2651 * src/parse-gram.y (%printer): Prefer printf to putc and puts.
2652 * src/reduce.c (reduce_print): Likewise.
2653 * src/state.c (state_rule_look_ahead_tokens_print): Likewise.
2654 * src/system.h: Include unlocked-io.h rathe than stdio.h.
2655
2656 * data/glr.c (yyuserMerge, yyreportAmbiguity, yyreportSyntaxError):
2657 Use assignments rather than casts-to-void to suppress
2658 unused-variable warnings. This pacifies 'lint'.
2659 * data/lalr1.cc (yysymprint_, yydestruct_): Use a call to suppress
2660 unused-variable warnings.
2661
2662 2005-10-03 Juan Manuel Guerrero <juan.guerrero@gmx.de>
2663
2664 * Makefile.am: DJGPP specific files added to EXTRA_DIST.
2665
2666 2005-10-02 Paul Eggert <eggert@cs.ucla.edu>
2667
2668 Use unlocked I/O for a minor performance improvement on hosts like
2669 GNU/Linux and Solaris that support unlocked I/O. The basic idea
2670 is to use the gnlib unlocked-io module, and to prefer putc and
2671 puts to printf when either will work (since the latter doesn't
2672 come in an unlocked flavor).
2673 * bootstrap (gnulib_modules): Add unlocked-io.
2674 * data/c.m4 (yysymprint): Prefer puts and putc to printf.
2675 * data/glr.c (YYFPUTC, YYFPUTS, YYDPUTS): New macros.
2676 Prefer them to YYFPRINTF and YYDPRINTF if either will do,
2677 and similarly for puts and putc and printf.
2678 * data/yacc.c: Likewise.
2679 * lib/bitset.c (bitset_print): Likewise.
2680 * lib/bitset.h [USE_UNLOCKED_IO]: Include unlocked-io.h.
2681 * lib/bitsetv.c (bitsetv_dump, debug-bitsetv): Prefer putc and puts
2682 to printf.
2683 * lib/lbitset.c (debug_lbitset): Likewise.
2684 * src/closure.c (print_firsts, print_fderives): Likewise.
2685 * src/gram.c (grammar_dump): Likewise.
2686 * src/lalr.c (look_ahead_tokens_print): Likewise.
2687 * src/output.c (escaped_output): Likewise.
2688 (user_actions_output): Coalesce two printfs.
2689 * src/parse-gram.y (%printer): Prefer putc and puts to printf.
2690 * src/reduce.c (reduce_print): Likewise.
2691 * src/state.c (state_rule_look_ahead_tokens_print): Likewise.
2692 * src/system.h: Include unlocked-io.h rather than stdio.h.
2693
2694 * data/lalr1.cc: Don't put an unmatched ' in a dnl comment, as
2695 this confuses xgettext.
2696
2697 2005-10-02 Akim Demaille <akim@epita.fr>
2698
2699 * bootstrap (gnulib_modules): Add strverscmp.
2700 * lib/.cvsignore: Add strverscmp.c, strverscmp.h.
2701 * m4/.cvsignore: Add strverscmp.m4.
2702 * src/parse-gram.y (%require): New token, new rule.
2703 (version_check): New.
2704 * src/scan-gram.l (%require): Adjust.
2705 * tests/input.at (AT_REQUIRE): New.
2706 Use it.
2707 * doc/bison.texinfo (Require Decl): New.
2708 (Calc++ Parser): Use %require.
2709
2710 2005-10-02 Akim Demaille <akim@epita.fr>
2711
2712 * data/location.cc: New.
2713
2714 2005-10-02 Paul Eggert <eggert@cs.ucla.edu>,
2715 Akim Demaille <akim@epita.fr>
2716
2717 Make sure -odir/foo.cc creates dir/location.hh etc.
2718 * src/files.h (spec_outfile, parser_file_name, spec_name_prefix)
2719 (spec_file_prefix, spec_verbose_file, spec_graph_file)
2720 (spec_defines_file): Now const.
2721 (dir_prefix): New.
2722 (short_base_name): Remove.
2723 * src/files.c: Adjust.
2724 (dirname.h): Include.
2725 (base_name): Don't prototype it.
2726 (finput): Remove, duplicates gram_in.
2727 (full_base_name, short_base_name): Replace by...
2728 (all_but_ext, all_but_tab_ext): these.
2729 (compute_base_names): Rename as...
2730 (compute_file_name_parts): this.
2731 Update to compute the new variables, including dir_prefix.
2732 Adjust dependencies.
2733 * src/output.c (prepare): Output them.
2734 * src/reader.c: Adjust to use gram_in, not finput.
2735 * src/scan-skel.l (@dir_prefix@): New.
2736
2737 2005-10-02 Juan Manuel Guerrero <juan.guerrero@gmx.de>
2738
2739 * lib/subpipe.c: New function end_of_output_subpipe() added
2740 to allow support for non-posix systems. This is a no-op function
2741 for posix systems.
2742
2743 * lib/subpipe.h: New function end_of_output_subpipe() added
2744 to allow support for non-posix systems. This is a no-op function
2745 for posix systems.
2746
2747 * src/output.c (output_skeleton): Use end_of_output_subpipe() to
2748 handle the lack of pipe/fork functionality on non-posix systems.
2749
2750 * djgpp/Makefile.maint: DJGPP specific file.
2751
2752 * djgpp/README.in: DJGPP specific file.
2753
2754 * djgpp/config.bat: DJGPP specific configuration file.
2755
2756 * djgpp/config.sed: DJGPP specific configuration file.
2757
2758 * djgpp/config.site: DJGPP specific configuration file.
2759
2760 * djgpp/config_h.sed: DJGPP specific configuration file.
2761
2762 * djgpp/subpipe.c: DJGPP specific replacement file for lib/subpipe.c.
2763
2764 * djgpp/subpipe.h: DJGPP specific replacement file for lib/subpipe.h.
2765
2766 2005-10-02 Akim Demaille <akim@epita.fr>
2767
2768 * data/location.cc: New, extract from...
2769 * data/lalr1.cc: here.
2770 (location.hh): Include it after the user prologue, in case the
2771 filename type is defined by the user.
2772 Forward declation location and position before the pre-prologue.
2773 (yyresult_): Rename as...
2774 (yyresult): this, it's a local variable, not an attribute.
2775 * data/Makefile.am (dist_pkgdata_DATA): Adjust.
2776
2777 2005-10-01 Akim Demaille <akim@epita.fr>
2778
2779 * examples/extexi: Restore the #line generation.
2780
2781 2005-09-30 Akim Demaille <akim@epita.fr>,
2782 Alexandre Duret-Lutz <adl@gnu.org>
2783
2784 Move the token type and YYSTYPE in the parser class.
2785 * data/lalr1.cc (stack.hh, location.hh): Include earlier.
2786 (parser::token): New, from the moved free definition of tokens.
2787 (parser::semantic_value): Now a full definition instead of an
2788 indirection to YYSTYPE.
2789 (b4_post_prologue): No longer included in the header file, but
2790 in the implementation file.
2791 * doc/bison.texi (C+ Language Interface): Update.
2792 * src/parse-gram.y: Support unary %define.
2793 * tests/actions.at: Define global_tokens_and_yystype for backward
2794 compatibility until we update the tests.
2795 * tests/calc.at: Idem.
2796 (first_line, first_column, last_line, last_column): Define for lalr1.cc
2797 to simplify the code.
2798
2799 2005-09-29 Paul Eggert <eggert@cs.ucla.edu>
2800
2801 Port to SunOS 4.1.4, which lacks strtoul and strerror.
2802 Ah, the good old days! Problem reported by Peter Klein.
2803 * bootstrap (gnulib_modules): Add strerror, strtoul.
2804 * lib/.cvsignore: Add strerror.c, strtol.c, strtoul.c
2805 * m4/.cvsignore: Add strerror.m4, strtol.m4, strtoul.m4.
2806
2807 2005-09-29 Akim Demaille <akim@epita.fr>
2808
2809 * data/c.m4 (b4_error_verbose_if): New.
2810 * data/lalr1.cc: Use it.
2811 (YYERROR_VERBOSE_IF): Remove.
2812 (yyn_, yylen_, yystate_, yynerrs_, yyerrstatus_): Remove as
2813 parser members, replaced by...
2814 (yyn, yylen, yystate, yynerss, yyerrstatus): these parser::parse
2815 local variables.
2816 (yysyntax_error_): Takes the state number as argument.
2817 (yyreduce_print_): Use the argument yyrule, not the former
2818 attribute yyn_.
2819
2820 2005-09-26 Paul Eggert <eggert@cs.ucla.edu>
2821
2822 * bootstrap (gnulib_modules): Add verify.
2823 * lib/.cvsignore: Add verify.h.
2824 * src/getargs.c: Use ARGMATCH_VERIFY rather than verify.
2825 * src/system.h (verify): Remove.
2826 Include verify.h instead.
2827 * src/tables.c (tables_generate): Use new API for 'verify'.
2828
2829 2005-09-21 Paul Eggert <eggert@cs.ucla.edu>
2830
2831 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Do not use
2832 local variables whose names begin with 'yy'.
2833 * tests/calc.at (_AT_DATA_CALC_Y): Likewise.
2834 Trivial changes from Joel E. Denny.
2835
2836 * bootstrap (gnulib_modules): Remove alloca. Bison doesn't need
2837 it itself.
2838 * src/main.c (main) [C_ALLOCA]: Don't flush alloca'ed memory; we
2839 don't use alloca any more.
2840
2841 * data/yacc.c [YYSTACK_USE_ALLOCA && !defined __GNUC__ && ! defined
2842 __BUILTIN_VA_ARG_INCR && ! defined _AIX && ! defined _MSC_VER &&
2843 defined _ALLOCA_H]: Don't include <stdlib.h>; not needed in this case.
2844 * tests/torture.at (Exploding the Stack Size with Alloca): Adjust
2845 to match yacc.c, to test more hosts.
2846
2847 2005-09-20 Paul Eggert <eggert@cs.ucla.edu>
2848
2849 * data/yacc.c (YYSIZE_T): Reindent to make it clearer. This
2850 doesn't affect behavior.
2851 (YYSTACK_ALLOC) [YYSTACK_USE_ALLOCA]: Improve support for
2852 Solaris, AIX, MSC.
2853 (_STDLIB_H): Renamed from YYINCLUDED_STDLIB_H. All uses changed.
2854 This works a bit better with glibc, if user code has already included
2855 stdlib.h.
2856 * doc/bison.texinfo (Bison Parser): Document that users can't
2857 arbitrarily use malloc and free for other purposes. Document
2858 that <alloca.h> and <malloc.h> might be included.
2859 (Table of Symbols): Under YYSTACK_USE_ALLOCA, Don't claim that the
2860 user must declare alloca.
2861
2862 * HACKING (release): Forwarn the Translation Project about
2863 stable releses.
2864
2865 2005-09-20 Akim Demaille <akim@epita.fr>
2866
2867 * data/glr.c: Use b4_token_enums, not b4_token_enums_defines.
2868
2869 2005-09-19 Paul Eggert <eggert@cs.ucla.edu>
2870
2871 * data/yacc.c (YYSIZE_MAXIMUM): New macro.
2872 (YYSTACK_ALLOC_MAXIMUM): Use it.
2873 (yysyntax_error): New function.
2874 (yyparse) [YYERROR_VERBOSE]: Don't leak memory indefinitely if
2875 multiple syntax errors are reported, and alloca is being used.
2876 Instead, reallocate buffers twice as big each time, so that
2877 we waste at most half the allocated memory. Start with a small
2878 (128-byte) buffer that will suffice in most cases anyway.
2879 Use yysyntax_error to do most of the work.
2880
2881 * doc/bison.texinfo (Error Reporting, Table of Symbols):
2882 yynerrs is the number of errors reported, not the number of
2883 errors encountered.
2884
2885 * tests/glr-regression.at (Duplicated user destructor for lookahead):
2886 Mark it as expected to fail.
2887 Cast result of malloc; problem reported by twlevo@xs4all.nl.
2888 * tests/actions.at, tests/calc.at, tests/glr-regression.at:
2889 Don't start user-code symbols with "yy", to avoid name space problems.
2890
2891 2005-09-19 Akim Demaille <akim@epita.fr>
2892
2893 Remove the traits, failed experiment.
2894 It never proved useful, and anyway because of the current
2895 definition, it was not possible to have several specialization of
2896 this traits, making it useless.
2897 * data/lalr1.cc (yy:traits): Remove.
2898 Inline its definitions in the parser class.
2899
2900 2005-09-19 Akim Demaille <akim@epita.fr>
2901
2902 * tests/atlocal.in (LIBS): Pass INTLLIBS to address failures on at
2903 least Mac OSX with a /usr/local install of gettext.
2904
2905 2005-09-19 Akim Demaille <akim@epita.fr>
2906
2907 * data/lalr1.cc (yyparse): Rename yylooka and yyilooka as yychar
2908 and yytoken for similarity with the other skeletons.
2909
2910 2005-09-19 Akim Demaille <akim@epita.fr>
2911
2912 * NEWS, configure.ac: update version number to 2.1a.
2913
2914 2005-09-16 Paul Eggert <eggert@cs.ucla.edu>
2915
2916 * NEWS: Version 2.1.
2917
2918 * NEWS: Remove notice of yytname change, since it was never in an
2919 official release.
2920 * data/glr.c (yydestroyGLRState): Rename local var to avoid shadowing
2921 diagnostic.
2922 * src/output.c (prepare): Likewise.
2923 * data/lalr1.cc (YYERROR_VERBOSE_IF): New macro.
2924 (yysyntax_error_): Use it to avoid GCC warning when YYERROR_VERBOSE
2925 is not defined. This is an awful hack, but it's enough for now.
2926 All callers changed.
2927 * tests/glr-regression-at (make_value): Args are const pointers now,
2928 to avoid GCC warning.
2929 (Duplicated user destructor for lookahead): New test. Currently
2930 skipped. It fails on my host but I'm not sure it'll always fail.
2931
2932 2005-09-16 Akim Demaille <akim@epita.fr>
2933
2934 * src/symtab.h (struct symbol): Declare the printer and destructor
2935 as const, to avoid accidental calls to free.
2936 (symbol_destructor_set, symbol_printer_set): Adjust.
2937 * src/symtab.c: Adjust.
2938
2939 2005-09-16 Akim Demaille <akim@epita.fr>
2940
2941 * data/c.m4 (b4_token_enums): New.
2942 (b4_token_defines): Rename as...
2943 (b4_token_enums_defines): this.
2944 (b4_token_defines): New, output only the #defines.
2945 * data/yacc.c, data/glr.c: Adjust.
2946 * data/lalr1.cc: Use b4_token_enums instead of b4_token_enums_defines.
2947 * data/c.m4 (b4_yydestruct_generate, b4_yysymprint_generate): Define
2948 as default values.
2949
2950 2005-09-16 Akim Demaille <akim@epita.fr>
2951
2952 * data/lalr1.cc (yylex_): Remove, inline its code.
2953 (yyreport_syntax_error_): Remove, replaced by...
2954 (yysyntax_error_): this which returns a string and leaves to the
2955 caller the call to the users' error function.
2956 (yylooka_, yyilooka_, yylval, yylloc, yyerror_range_, yyval, yyloc):
2957 Move from members of the parser object...
2958 (yylooka, yyilooka, yylval, yylloc, yyerror_range, yyval, yyloc):
2959 to local variables of the parse function.
2960
2961 2005-09-16 Akim Demaille <akim@epita.fr>
2962
2963 * doc/bison.texinfo (Calc++ Parser): Don't promote defining YYEOF
2964 since it's in Bison's name space.
2965
2966 2005-09-15 Paul Eggert <eggert@cs.ucla.edu>
2967
2968 * data/glr.c (yyresolveValue): Add default case to pacify
2969 gcc -Wswitch-default. Problem reported by twlevo@xs4all.nl.
2970
2971 * NEWS: Document when yyparse started to return 2.
2972 * doc/bison.texinfo (Parser Function): Document when yyparse
2973 returns 2.
2974
2975 * data/lalr1.cc: Revert part of previous change, as it's incompatible.
2976 (b4_filename_type): Renamed back from b4_file_name_type. All uses
2977 changed.
2978 (class position): file_name -> filename (reverting). All uses changed.
2979
2980 2005-09-14 Paul Eggert <eggert@cs.ucla.edu>
2981
2982 * examples/calc++/Makefile.am ($(calc_sources_generated)): Don't
2983 do anything if $@ exists. This reverts part of the 2005-07-07
2984 patch.
2985
2986 2005-09-11 Paul Eggert <eggert@cs.ucla.edu>
2987
2988 * Makefile.am (EXTRA_DIST): Do not distribute REFERENCES; it
2989 contains obsolete information and isn't worth distributing as a
2990 separate file anyway.
2991 * data/glr.c [defined YYSETJMP]: Don't include <setjmp.h>.
2992 (YYJMP_BUF, YYSETJMP, YYLONGJMP) [!defined YYSETJMP]: New macros.
2993 All uses of jmp_buf, setjmp, longjmp changed to use these instead.
2994 (yyparse): Abort if user code uses longjmp to throw an unexpected
2995 value.
2996
2997 2005-09-09 Paul Eggert <eggert@cs.ucla.edu>
2998
2999 * data/c.m4 (b4_identification): Define YYBISON_VERSION.
3000 Suggested by twlevo@xs4all.nl.
3001
3002 * data/glr.c (YYCHK1): Do not assume YYE is in range.
3003 This avoids a diagnostic from gcc -Wswitch-enum.
3004 Problem reported by twlevo@xs4all.nl.
3005
3006 * doc/bison.texinfo: Don't use "filename", as per GNU coding
3007 standards. Use "file name" or "file" or "name", depending on
3008 the context.
3009 (Invocation): The output of "bison hack/foo.y" goes to foo.tab.c,
3010 not to hack/foo.tab.c.
3011 (Calc++ Top Level): 2nd arg of main is not const.
3012 * data/glr.c: b4_filename -> b4_file_name.
3013 * data/lalr1.cc: Likewise. Also, b4_filename_type -> b4_file_name_type.
3014 All uses changed.
3015 (class position): filename -> file_name. All uses changed.
3016 * data/yacc.c: b4_filename -> b4_file_name.
3017 * lib/bitset.h: filename -> file_name in local vars.
3018 * lib/bitset_stats.c: Likewise.
3019 * src/files.c: Likewise.
3020 * src/scan-skel.l ("@output ".*\n): Likewise.
3021 * src/files.c (file_name_split): Renamed from filename_split.
3022 * src/muscle_tab.c (muscle_init): Output b4_file_name, not b4_filename.
3023
3024 2005-09-08 Paul Eggert <eggert@cs.ucla.edu>
3025
3026 * lib/.cvsignore: Add pipe-safer.c, stdio--.h, unistd--.h,
3027 to accommodate latest gnulib.
3028
3029 * tests/glr-regression.at (Duplicate representation of merged trees):
3030 Add casts to pacify g++. Problem reported by twlevo@xs4all.nl.
3031
3032 * bootstrap: Add comment as to why the AM_LANGINFO_CODESET hack is
3033 needed.
3034
3035 2005-08-26 Paul Eggert <eggert@cs.ucla.edu>
3036
3037 * data/glr.c (yydestroyGLRState): Renamed from yydestroyStackItem.
3038 All uses changed. Invoke user destructor after an error during a
3039 split parse (trivial change from Joel E. Denny).
3040
3041 * tests/glr-regression.at
3042 (User destructor after an error during a split parse): New test case.
3043 Problem reported by Joel E. Denny in:
3044 http://lists.gnu.org/archive/html/bison-patches/2005-08/msg00029.html
3045
3046 2005-08-25 Paul Eggert <eggert@cs.ucla.edu>
3047
3048 * README-cvs: Give URLs for recommended tools.
3049 Mention Gzip version problem, and bootstrapping issues.
3050 Remove troubleshooting section, as it's somewhat obsolete.
3051
3052 * bootstrap (no_cache): New var, to accommodate different wget
3053 variants. Use it instead of '-C off'. Problem reported by
3054 twlevo@xs4all.nl.
3055
3056 * data/glr.c (yydestroyStackItem): New function.
3057 (yyrecoverSyntaxError, yyreturn): Use it to improve quality of
3058 debugging information. Problem reported by Joel E. Denny.
3059
3060 2005-08-25 Akim Demaille <akim@epita.fr>
3061
3062 * tests/local.at (AT_COMPILE_CXX): Pass $LINKS too.
3063
3064 2005-08-24 Paul Eggert <eggert@cs.ucla.edu>
3065
3066 * data/glr.c (yyrecoverSyntaxError, yyreturn):
3067 Don't invoke destructor on unresolved entries.
3068 * tests/glr-regression.at
3069 (User destructor for unresolved GLR semantic value): New test case.
3070 Problem reported by Joel E. Denny in:
3071 http://lists.gnu.org/archive/html/bison-patches/2005-08/msg00016.html
3072
3073 2005-08-21 Paul Eggert <eggert@cs.ucla.edu>
3074
3075 * lib/.cvsignore: Remove realloc.c, strncasecmp.c, xstrdup.c.
3076 Add strnlen.c.
3077 * m4/.cvsignore: Remove codeset.m4, gettext.m4, lib-ld.m4,
3078 lib-prefix.m4, po.m4.
3079
3080 * data/glr.c (yyreturn): Use "Cleanup:" rather than "Error:"
3081 in yydestruct diagnostic, since it might not be an error.
3082 Problem reported by Joel Denny near end of
3083 <http://lists.gnu.org/archive/html/help-bison/2005-07/msg00040.html>.
3084 * data/lalr1.cc (yyerturn): Likewise.
3085 * data/yacc.c (yyreturn): Likewise.
3086 * tests/calc.at (_AT_CHECK_CALC_ERROR): Adjust to the above change.
3087
3088 * src/files.c: Remove obsolete FIXME comment.
3089
3090 * data/glr.c (YY_SYMBOL_PRINT): Append a newline, for consistency
3091 with the other templates, and to fix bogus run-on messages such
3092 as the one reported at the end of
3093 <http://lists.gnu.org/archive/html/help-bison/2005-07/msg00040.html>.
3094 All callers changed to avoid the newline.
3095 (yyprocessOneStack): Output two lines rather than one, to accommodate
3096 the above change. This changes the debug output format slightly.
3097
3098 * data/glr.c (yyresolveValue): Fix redundant parse tree problem
3099 reported by Joel E. Denny in
3100 <http://lists.gnu.org/archive/html/bison-patches/2005-08/msg00004.html>
3101 (trivial change).
3102 * tests/glr-regression.at (Duplicate representation of merged trees):
3103 New test, from Joel E. Denny in:
3104 <http://lists.gnu.org/archive/html/help-bison/2005-07/msg00013.html>.
3105 * THANKS: Add Joel E. Denny.
3106
3107 * configure.ac (AC_INIT): Bump to 2.0c.
3108
3109 2005-07-24 Paul Eggert <eggert@cs.ucla.edu>
3110
3111 * NEWS: Version 2.0b.
3112
3113 * Makefile.am (SUBDIRS): Put examples before tests, so that
3114 "make check" doesn't finish with "All 1 tests passed".
3115
3116 * tests/regression.at (Token definitions): Don't rely on
3117 AT_PARSER_CHECK for data that contains backslashes. It currently
3118 uses 'echo', and 'echo' isn't portable if its argument contains
3119 backslashes. Problem found on OpenBSD 3.4. Also, do not assume
3120 that the byte '\0xff' is not printable in the C locale; it is,
3121 under OpenBSD 3.4 (!). Luckily, '\0x80' through '\0x9e' are
3122 not printable, so use '\0x81' to test.
3123
3124 * data/glr.c (YYOPTIONAL_LOC): Define even if it's not a recent
3125 version of GCC, since the macro is used with non-GCC compilers.
3126
3127 Fix core dump reported by Pablo De Napoli in
3128 <http://lists.gnu.org/archive/html/bug-bison/2005-07/msg00053.html>.
3129 * tests/regression.at (Invalid inputs with {}): New test.
3130 * src/parse-gram.y (token_name): Translate type before using
3131 it as an index.
3132
3133 * data/glr.c (ATTRIBUTE_UNUSED): Remove, since it infringes on
3134 the user's name space. All uses changed to __attribute__
3135 ((__unused__)).
3136 (yyFail, yyMemoryExhausted, yyreportAmbiguity):
3137 Add __attribute__ ((__noreturn__)).
3138
3139 * etc/clcommit: Remove. We weren't using it, and it failed
3140 "make maintainer-distcheck".
3141 * Makefile.maint: Merge from coreutils.
3142 (CVS_LIST, CVS_LIST_EXCEPT): New macros.
3143 (syntax-check-rules): Change list of rules as described below.
3144 (sc_cast_of_alloca_return_value, sc_dd_max_sym_length):
3145 (sc_file_system, sc_obsolete_symbols, sc_prohibit_atoi_atof):
3146 (sc_prohibit_jm_in_m4, sc_root_tests, sc_tight_scope):
3147 (sc_trailing_space): New rules.
3148 (sc_xalloc_h_in_src): Remove.
3149 (sc_cast_of_argument_to_free, sc_cast_of_x_alloc_return_value):
3150 (sc_space_tab, sc_error_exit_success, sc_changelog):
3151 (sc_system_h_headers, sc_sun_os_names, sc_unmarked_diagnostics):
3152 (makefile-check, po-check, author_mark_check):
3153 (makefile_path_separator_check, copyright-check):
3154 Use grep -n, to make it easier to find violations.
3155 Use CVS_LIST and CVS_LIST_EXCEPT.
3156 (header_regexp, h_re): Remove.
3157 (dd_c): New macro.
3158 (sc_dd_max_sym_length, .re-list, news-date-check): New rules.
3159 (my-distcheck): Use more-modern GCC flags.
3160 (signatures, %.asc): Remove.
3161 (rel-files, announcement): Remove signatures.
3162 Restore old updating code, even though we don't use it, so
3163 that we're the same as coreutils.
3164 (alpha, beta, major): Depend on news-date-check.
3165 Make the upload commands.
3166
3167 * data/c.m4, data/lalr1.cc, data/yacc.c: Normalize white space.
3168 * lib/abitset.h, lib/bbitset.h, lib/bitset.h: Likewise.
3169 * lib/bitset_stats.c, lib/ebitset.h, lib/lbitset.c: Likewise.
3170 * lib/libitset.h, lib/timevar.c, lib/vbitset.h: Likewise.
3171 * src/Makefile.am, src/gram.c, src/muscle_tab.h: Likewise.
3172 * src/parse-gram.y, src/system.h, src/tables.c, src/vcg.c: Likewise.
3173 * src/vcg_defaults.h, tests/cxx-type.at, tests/existing.at: Likewise.
3174 * tests/sets.at: Likewise.
3175
3176 * data/m4sugar/m4sugar.m4: Sync from Autoconf, except that
3177 we comment out the Autoconf version number.
3178 * doc/bison.texinfo (Calc++ Scanner): Don't use atoi, as
3179 it's error-prone and "make maintainer-distcheck" rejects it.
3180
3181 * lib/subpipe.c: Include <fcntl.h> without checking for HAVE_FCNTL_H.
3182 Indent calls to "error" to pacify "make maintainer-distcheck",
3183 when the calls are not intended to be translated.
3184 * m4/subpipe.m4 (BISON_PREREQ_SUBPIPE): Don't check for fcntl.h.
3185
3186 * src/Makefile.am (DEFS): Use +=, to pacify
3187 "make maintainer-distcheck".
3188 (bison_SOURCES): Add scan-skel.h.
3189 (sc_tight_scope): New rule, from coreutils.
3190
3191 * src/files.c (src_extension, header_extension):
3192 Now static, not extern.
3193 * src/getargs.c (short_options): Likewise.
3194 * src/muscle_tab.c (muscle_table): Likewise.
3195 * src/parse-gram.y (current_class, current_type, current_prec):
3196 Likewise.
3197 * src/reader.c (grammar_end, previous_rule_end): Likewise.
3198 * src/getargs.h: Redo comments to pacify "make maintainer-distcheck".
3199 * src/main.c (main): Cast bindtextdomain and textdomain calls to
3200 void, to avoid warning when NLS is disabled.
3201 * src/output.c: Include scan-skel.h.
3202 (scan_skel): Remove decl, since scan-skel.h does this.
3203 (output_skeleton):
3204 Indent calls to "error" to pacify "make maintainer-distcheck".
3205 * src/print_graph.c: Don't include <obstack.h>, as system.h does this.
3206 * src/reader.h (gram_end, gram_lineno): New decls to pacify
3207 "make maintainer-distcheck".
3208 * src/scan-skel.l (skel_lex, skel_get_lineno, skel_get_in):
3209 (skel_get_out, skel_get_leng, skel_get_text, skel_set_lineno):
3210 (skel_set_in, skel_set_out, skel_get_debug, skel_set_debug):
3211 (skel_lex_destroy, scan_skel): Move these decls to...
3212 * src/scan-skel.h: New file.
3213 * src/uniqstr.c (uniqstr_assert):
3214 Indent calls to "error" to pacify "make maintainer-distcheck".
3215
3216 * tests/Makefile.am ($(srcdir)/package.m4): Use $(VAR),
3217 not @VAR@.
3218
3219 * tests/torture.at: Revamp to avoid misuse of atoi that
3220 "make maintainer-distcheck" complained about.
3221
3222 * examples/extexi (message): Don't print a message more than once,
3223 and omit line-number decoration that makes Emacs compile think
3224 that informative messages are worth worrying about.
3225
3226 2005-07-22 Paul Eggert <eggert@cs.ucla.edu>
3227
3228 * configure.ac: Update version number.
3229
3230 * Makefile.am (SUBDIRS): Add examples; somehow this got removed
3231 accidentally.
3232 * examples/calc++/calc++-parser.yy: Remove from CVS, as it's
3233 autogenerated by the maintainer.
3234 * examples/calc++/.cvsignore: Add *.yy.
3235
3236 * lib/bitset.c (bitset_alloc): Don't cast xcalloc result.
3237 * lib/bitset_stats.c (bitset_stats_init): Likewise.
3238 * lib/bitsetv.c (bitsetv_alloc): Likewise.
3239
3240 * po/POTFILES.in: Add lib/xalloc-die.c; remove lib/xmalloc.c.
3241
3242 * src/relation.c (relation_transpose): Rewrite to avoid bogus complaint
3243 from maintainer-distcheck about casting the argument of 'free'.
3244
3245 * NEWS: Mention recent yytname changes.
3246 * THANKS: Add Anthony Heading, twlevo@xs4all.nl.
3247
3248 * bootstrap: For translations that have not yet been upgraded to
3249 the new runtime-po domain, prime the pump by extracting the
3250 relevant strings from the obsolete translations. This code can be
3251 removed once the bison-runtime domain has been translated by each
3252 team.
3253
3254 * src/scan-gram.l (<SC_PRE_CODE>.): Don't double-quote token names,
3255 now that token names are already quoted.
3256
3257 Fix problem reported by Anthony Heading.
3258 * data/glr.c (YYTOKEN_TABLE): New macro.
3259 (yytname): Define if YYTOKEN_TABLE.
3260 * data/yacc.c (YYTOKEN_TABLE, yytname): Likewise.
3261 * data/lalr1.cc (YYTOKEN_TABLE, yytname_): Likewise.
3262 (YYERROR_VERBOSE): Define the same way the other skeletons do.
3263 * src/output.c (prepare_symbols): Output token_table_flag.
3264
3265 2005-07-21 Paul Eggert <eggert@cs.ucla.edu>
3266
3267 * data/glr.c (yyinitGLRStack, yyreturn): Don't call malloc
3268 again if the first call fails.
3269
3270 * data/glr.c (yytnamerr): New function.
3271 (yyreportSyntaxError): Use it to dequote most string literals.
3272 * data/lalr1.c (yytname_): Renamed from yyname_, for compatibility
3273 with other skeletons. All uses changed.
3274 (yytnameerr_): New function.
3275 (yyreport_syntax_error): Use it to dequote most string literals.
3276 * data/yacc.c (yytnamerr): New function.
3277 (yyerrlab): Use it to decode most string literals.
3278 * doc/bison.texinfo (Decl Summary, Calling Convention):
3279 Clarify quoting convention of yytname.
3280 * src/output.c (prepare_symbols): Quote all names. This undoes
3281 the 2005-04-17 change, which is now accomplished (mostly) via
3282 changes in the parsers as described above.
3283 * tests/regression.at (Token definitions, Web2c Actions):
3284 Undo most 2005-04-17 change here, too.
3285
3286 2005-07-20 Paul Eggert <eggert@cs.ucla.edu>
3287
3288 Fix more problems reported by twlevo@xs4all.nl.
3289 * tests/cxx-type.at: Don't pipe output of ./types through sed to
3290 remove trailing spaces. This loses the exit status of ./types,
3291 and isn't needed since ./types shouldn't be emitting trailing
3292 spaces.
3293 * data/glr.c (yyreturn): Don't pop stack if yyinitStateSet failed,
3294 as the stack isn't valid in that case.
3295
3296 * src/scan-gram.l (gram_get_lineno, gram_get_in, gram_get_out):
3297 (gram_get_leng, gram_get_text, gram_set_lineno, gram_set_in):
3298 (gram_set_out, gram_get_debug, gram_set_debug, gram_lex_destroy):
3299 Add declarations to pacify "gcc -Wmissing-prototypes" when flex 2.5.31
3300 is used.
3301 * src/scan-skel.l (skel_get_lineno, skel_get_in, skel_get_out):
3302 (skel_get_leng, skel_get_text, skel_set_lineno, skel_set_in):
3303 (skel_set_out, skel_get_debug, skel_set_debug, skel_lex_destroy):
3304 Likewise.
3305
3306 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Work even with
3307 overly-picky compilers that reject 'char *foo = "bar";'.
3308
3309 * src/symtab.c (SYMBOL_ATTR_PRINT, symbol_print): Direct output
3310 to FILE * parameter, not to stderr. This fixes a typo introduced
3311 in the 2005-07-12 change.
3312
3313 * lib/subpipe.c (create_subpipe): Rewrite slightly to avoid
3314 warnings from GCC 4.
3315
3316 * data/glr.c (yyexpandGLRStack, yyaddDeferredAction, yyexpandGLRStack):
3317 (yyglrShiftDefer, yysplitStack):
3318 Remove unused parameters b4_pure_formals. All uses changed.
3319 (yyglrShift): Remove unused parameters b4_user_formals.
3320 All uses changed.
3321 (yyglrReduce): Removed unused parameter yylocp. All uses changed.
3322
3323 2005-07-18 Paul Eggert <eggert@cs.ucla.edu>
3324
3325 Destructor cleanups and regularization among the three skeletons.
3326 * NEWS: Document the behavior changes.
3327 * data/glr.c (yyrecoverSyntaxError): Don't bother to pop the
3328 stack before failing, as the cleanup code will do it for us now.
3329 * data/lalr1.cc (yyerrlab): Likewise.
3330 * data/glr.c (yyparse): Pop everything off the stack before
3331 freeing it, so that destructors get called properly.
3332 * data/lalr1.cc (yyreturn): Likewise.
3333 * data/yacc.c (yyreturn): Pop and destroy the start symbol, too.
3334 This is more consistent.
3335 * doc/bison.texinfo (Destructor Decl): Mention more reasons
3336 why destructors might be called. 1.875 -> 2.1.
3337 (Destructor Decl, Decl Summary, Table of Symbols):
3338 Some English-language cleanups for %destructor.
3339 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
3340 Add output line for destructor of start symbol.
3341 * tests/calc.at (AT_CHECK_CALC): Add one to line counts,
3342 because of that same extra output line.
3343
3344 * NEWS: Document minor wording changes in diagnostics of
3345 Bison-generated parsers.
3346 * data/glr.c (yyMemoryExhausted): Renamed from yyStackOverflow.
3347 Remove unused formals. All uses changed.
3348 (yyreportAmbiguity): "ambiguity detected" -> "syntax is ambiguous".
3349 (yyparse): Rename yyoverflowlab to yyexhaustedlab.
3350 * data/yacc.c (yyparse): "parser stack overflow" -> "memory exhausted".
3351 Rename yyoverflowab to yyexhaustedlab.
3352 When memory exhaustion occurs during syntax-error reporting,
3353 report it separately rather than in a single diagnostic; this
3354 eases translation.
3355 * doc/bison.texinfo (Memory Management): Renamed from Stack Overflow.
3356 (Memory Exhausted): Renamed from Parser Stack Overflow.
3357 Revamp wording slightly to prefer "memory exhaustion".
3358 * tests/actions.at: "parser stack overflow" -> "memory exhausted".
3359
3360 * data/c.m4 (b4_yysymprint_generate): Use YYFPRINTF, not fprintf.
3361
3362 Add i18n support to the GLR skeleton. Partially fix the C++
3363 skeleton; a C++ expert needs to finish this. Remove debugging
3364 msgids; there's little point to having them translated, since they
3365 can be understood only by someone who can read the
3366 (English-language) source code.
3367
3368 Generate runtime-po/bison-runtime.pot automatically, so that we
3369 don't have to worry about garbage getting in that file. We'll
3370 make sure after the next official release that old msgids don't
3371 get lost. See
3372 <http://lists.gnu.org/archive/html/bison-patches/2005-07/msg00119.html>.
3373
3374 * runtime-po/Makefile.in.in, runtime-po/bison-runtime.pot: Remove.
3375 Now auto-generated.
3376 * PACKAGING: Don't claim that Gawk, GCC, Perl use this method yet.
3377 Fix typos in explanations of the runtime file.
3378 * bootstrap: Change gettext keyword from YYI18N to YY_.
3379 Use standard Makefile.in.in in runtime-po, since we'll arrange
3380 for backward-compatible bison-runtime.po files in a different way.
3381 * data/glr.c (YY_): New macro, from yacc.c.
3382 (yyuserAction, yyreportAmbiguity, yyreportSyntaxError, yyparse):
3383 Translate messages intended for users.
3384 (yyreportSyntaxError): Change "virtual memory" to "memory" to match
3385 the wording in the other skeletons. We don't know that the memory
3386 is virtual.
3387 * data/lalr1.cc (YY_): Renamed from _. All uses changed.
3388 Use same method that yacc.c uses.
3389 Don't translate debugging messages.
3390 (yy::yyreport_syntax_error): Put in a FIXME for the i18n stuff;
3391 it doesn't work (yet), and requires C++ expertise to fix.
3392 * data/yacc.c (YY_): Renamed from YY18N. All uses changed.
3393 Move defn to a more logical place, to be consistent with other
3394 skeletons.
3395 Don't translate debugging messages.
3396 Don't assume line numbers fit in unsigned int; use unsigned long fmts.
3397 * doc/bison.texinfo: Mention <libintl.h>. Change glibc cross reference
3398 to gettext cross reference. Add indexing terms. Mention YYENABLE_NLS.
3399 * runtime-po/POTFILES.in: Add data/glr.c, data/lalr1.cc.
3400
3401 Fix yyerror / yylex test glitches noted by twlevo@xs4all.nl.
3402 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Have yyerror return
3403 void, not int.
3404 * tests/glr-regression.at (Badly Collapsed GLR States):
3405 Likewise.
3406 (Improper handling of embedded actions and dollar(-N) in GLR parsers):
3407 yylex should return 0 at EOF rather than aborting.
3408
3409 Improve tests for stack overflow in GLR parser.
3410 Problem reported by twlevo@xs4all.nl.
3411 * data/glr.c (struct yyGLRStack): Remove yyerrflag member.
3412 All uses removed.
3413 (yyStackOverflow): Just longjmp, but with value 2 so that caller
3414 can handle the problem.
3415 (YYCHK1): Use goto (a la yacc.c) rather than setting a flag.
3416 (yyparse): New local variable yyresult to record the result.
3417 Use result of setjmp to set it, rather than storing itinto
3418 struct.
3419 (yyDone): Remove label.
3420 (yyacceptlab, yyabortlab, yyoverflowlab, yyreturn): New labels,
3421 to mimic yacc.c. Do not discard lookahead if it's EOF (possible
3422 if YYABORT is used).
3423 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Exit with
3424 yyparse status; put status > 1 into diagnostic.
3425 Check that status==2 works.
3426 * tests/calc.at, tests/cxx-type.at, tests/glr-regression.at:
3427 Use exit status 3 for failure to open (which shouldn't happen).
3428
3429 2005-07-17 Paul Eggert <eggert@cs.ucla.edu>
3430
3431 * tests/conflicts.at (%nonassoc and eof): Don't exit with status
3432 1 on syntax error; just let yyparse do its thing.
3433 * tests/glr-regression.at (Badly Collapsed GLR States): Likewise.
3434 * tests/torture.at (AT_DATA_STACK_TORTURE): Likewise.
3435 (Exploding the Stack Size with Alloca):
3436 (Exploding the Stack Size with Malloc):
3437 Expect exit status 2, not 1, since the parser is supposed to blow
3438 its stack. Problem reported by twlevo@xs4all.nl.
3439
3440 * data/glr.c (yyparse): Don't assume that the initial calls
3441 to YYMALLOC succeed; in that case, yyparse incorrectly returned 0.
3442 Print a stack-overflow message and fail instead.
3443 Initialize the line-number information before creating the stack,
3444 so that the stack-overflow message can report line zero safely.
3445
3446 2005-07-14 Paul Eggert <eggert@cs.ucla.edu>
3447
3448 Fix problems reported by twlevo@xs4all.nl.
3449 * data/glr.c (YYSTACKEXPANDABLE): Don't define if already defined.
3450 (yyuserMerge): Provide a default case if b4_mergers is empty.
3451 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Define YYSTACKEXPANDABLE.
3452 * tests/glr-regression.at
3453 (Improper handling of embedded actions and dollar(-N) in GLR parsers):
3454 Add casts to pacify C++ compilers.
3455 * tests/glr-regression.at (Improper merging of GLR delayed action
3456 sets): Declare yylex before using it.
3457 * tests/Makefile.am (maintainer-check-g++): Fix a stray
3458 $(GXX) that escaped the renaming of GXX to CXX. Remove bogus
3459 test for valgrind; valgrind is independent of g++.
3460 (maintainer-check-posix): Add _POSIX2_VERSION=200112, to check
3461 for compatibility with POSIX 1003.1-2001 (if running coreutils).
3462 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Port to stricter C++.
3463 Use a destructor, so that we can expand the stack. Change
3464 YYSTYPE to char * so that we can free it. Cast result of malloc.
3465
3466 2005-07-13 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
3467
3468 * data/glr.c (yyuserAction): Fix uninitialized variable that caused
3469 a valgrind failure. Problem reported by twlevo@xs4all.nl.
3470
3471 2005-07-13 Paul Eggert <eggert@cs.ucla.edu>
3472
3473 * PACKAGING: New file, suggested by Bruno Haible and taken from
3474 similar wording in gettext's PACKAGING file.
3475 * NEWS: Mention PACKAGING.
3476 * Makefile.am (EXTRA_DIST): Add PACKAGING.
3477
3478 2005-07-12 Paul Eggert <eggert@cs.ucla.edu>
3479
3480 * NEWS: Document recent i18n improvements.
3481 * bootstrap: Get runtime translations into runtime-po.
3482 Create runtime-po files automatically, if possible.
3483 * configure.ac: Invoke BISON_I18N, so that we eat our own dog food.
3484 * data/yacc.c: Rewrite inclusion of <libintl.h> so that ENABLE_NLS
3485 does not infringe on the user's name space.
3486 (YYENABLE_NLS): Renamed from ENABLE_BISON_NLS.
3487 * doc/bison.texinfo (Internationalization): Revamp the English
3488 and Texinfo syntax a bit, to try to make it clearer.
3489 (Bison Options, Option Cross Key): Mention --print-localedir.
3490 * m4/bison-i18n.m4 (BISON_I18N): Rename ENABLE_BISON_NLS to
3491 YYENABLE_NLS. Quote a bit more.
3492 * runtime-po/.cvsignore: New file.
3493 * runtime-po/Makefile.in.in (mostlyclean): Remove *.old.pot.
3494 * runtime-po/Rules-quot: Remove; now created by bootstrap.
3495 * runtime-po/quot.sed: Likewise.
3496 * runtime-po/boldquot.sed: Likewise.
3497 * runtime-po/en@quot.header: Likewise.
3498 * runtime-po/en@boldquot.header: Likewise.
3499 * runtime-po/insert-header.sin: Likewise.
3500 * runtime-po/remove-potcdate.sin: Likewise.
3501 * runtime-po/Makevars: Likewise.
3502 * runtime-po/LINGUAS: Likewise.
3503 * runtime-po/de.po: Likewise; we will rely on the translation project
3504 to maintain this, so "bootstrap" should get it.
3505 * src/getarg.c (PRINT_LOCALEDIR_OPTION): Let the C compiler determine
3506 its value.
3507 * src/main.c (main): Bind the bison-runtime domain, too.
3508
3509 2005-07-12 Bruno Haible <bruno@clisp.org>
3510
3511 * data/yacc.c: Include <libintl.h> when NLS is enabled.
3512 (YYI18N): Renamed from _. Use dgettext when NLS is enabled.
3513 * po/POTFILES.in: Remove autogenerated file src/parse-gram.c.
3514 * runtime-po: New directory.
3515 * runtime-po/Makefile.in.in: New file, copied from po/, with modified
3516 $(DOMAIN).pot-update rule, so that old messages are never dropped.
3517 * runtime-po/Rules-quot: New file, copied from po/.
3518 * runtime-po/quot.sed: Likewise.
3519 * runtime-po/boldquot.sed: Likewise.
3520 * runtime-po/en@quot.header: Likewise.
3521 * runtime-po/en@boldquot.header: Likewise.
3522 * runtime-po/insert-header.sin: Likewise.
3523 * runtime-po/remove-potcdate.sin: Likewise.
3524 * runtime-po/Makevars: New file.
3525 * runtime-po/POTFILES.in: New file.
3526 * runtime-po/LINGUAS: New file.
3527 * runtime-po/bison-runtime.pot: New file.
3528 * runtime-po/de.po: New file.
3529 * m4/bison.m4: New file.
3530 * Makefile.am (SUBDIRS): Add runtime-po.
3531 (aclocaldir, aclocal_DATA): New variables.
3532 * configure.ac: Add AC_CONFIG_FILES of runtime-po/Makefile.in.
3533 Define aclocaldir.
3534 * src/getargs.c (usage): Document --print-localedir option.
3535 (PRINT_LOCALEDIR_OPTION): New enum item.
3536 (long_options): Add --print-localedir option.
3537 (getargs): Handle --print-localedir option.
3538 * doc/bison.texinfo (Bison Parser): Remove paragraph about _().
3539 (Internationalization): New section.
3540
3541 2005-07-12 Akim Demaille <akim@epita.fr>
3542
3543 * src/symtab.h, src/symtab.c (symbol_print): Swap the arguments,
3544 for consistency with the rest of the code.
3545 * src/symlist.h, src/symlist.c (symbol_list_print): Ditto.
3546 Add separators.
3547
3548 2005-07-12 Akim Demaille <akim@epita.fr>
3549
3550 * src/parse-gram.y: Use %printer instead of YYPRINT.
3551
3552 2005-07-12 Akim Demaille <akim@epita.fr>
3553
3554 * src/symtab.h, src/symtab.c (symbol_print): New.
3555 * src/symlist.h, src/symlist.c (symbol_list_print): New.
3556 * src/symlist.c (symbol_list_n_type_name_get): Report the culprit.
3557
3558 2005-07-12 Akim Demaille <akim@epita.fr>
3559
3560 * data/glr.c (b4_syncline): Fix (swap) the definitions of
3561 b4_at_dollar and b4_dollar_dollar.
3562
3563 2005-07-11 Paul Eggert <eggert@cs.ucla.edu>
3564
3565 * doc/bison.texinfo (Mystery Conflicts): Add reference to DeRemer
3566 and Pennello's paper.
3567
3568 2005-07-09 Paul Eggert <eggert@cs.ucla.edu>
3569
3570 * data/yacc.c (yyparse): Undo previous patch. Instead,
3571 set yylsp[0] and yyvsp[0] only if the initial action
3572 sets yylloc and yylval, respectively.
3573
3574 * data/yacc.c (yyparse): In the initial action, set
3575 yylsp[0] and yyvsp[0] rather than yylloc and yylval.
3576 This avoids the use of undefined variables if the initial
3577 action does not set yylloc and/or yylval.
3578
3579 2005-07-07 Paul Eggert <eggert@cs.ucla.edu>
3580
3581 * examples/calc++/calc++-driver.cc, examples/calc++/calc++-driver.hh:
3582 * examples/calc++/calc++-scanner.ll, examples/calc++/calc++.cc:
3583 Remove from CVS. These files are automatically generated.
3584 * examples/extexi: Clarify that this file is now part of Bison,
3585 not GNU M4, and that it works with any POSIX-compatible Awk.
3586 * examples/calc++/Makefile.am (run_extexi): Remove; not used.
3587 ($(calc_extracted)): Renamed from $(calc_sources_extracted),
3588 so that we also get calc++-parser.yy. Geneate it.
3589 Use $(AWK), not gawk, since any conforming Awk will do.
3590 Put comment before action, since older 'make' can't handle comment
3591 in action.
3592 $(BUILT_SOURCES): List all built sources, not just some of them.
3593 $(MAINTAINERCLEANFILES): Remove *.stamp, and all built sources.
3594 $($(srcdir)/calc++-parser.stamp): Work even if POSIXLY_CORRECT.
3595 $($(calc_sources_generated)): Remove unnecessary test for existence
3596 of target. (This had a shell syntax error anyway; a stray "x".)
3597 (calc_extracted): List $(srcdir)/calc++-parser.yy, not
3598 calc++-parser.yy.
3599 * examples/.cvsignore, examples/calc++/.cvsignore: New files.
3600
3601 * bootstrap (gnulib_modules): Add gettext, now that it's no longer
3602 implied by the other modules.
3603
3604 2005-07-06 Akim Demaille <akim@epita.fr>
3605
3606 Bind examples/calc++ to the package.
3607 * examples/calc++/Makefile: Remove, replaced by...
3608 * examples/calc++/Makefile.am: ... this new file.
3609 * examples/calc++/test: Remove input.
3610 * examples/calc++/compile: Remove.
3611 * examples/Makefile.am: New.
3612 * configure.ac, Makefile.am: Adjust.
3613 * doc/Makefile.am (clean-local): New, for more recent texi2dvis.
3614
3615 2005-07-05 Paul Eggert <eggert@cs.ucla.edu>
3616
3617 * data/glr.c (yyFail): Drastically simplify; since the format argument
3618 never had any % directives, we can simply pass it to yyerror.
3619 (yyparse): Use "t a; a=b;" rather than "t a = b;" when a will
3620 be modified later, as that is the usual style in glr.c.
3621 Problems reported by Paul Hilfinger.
3622
3623 Rewrite GLR parser to catch more buffer overrun, storage exhaustion,
3624 and size overflow errors.
3625 * data/glr.c: Include <stdio.h> etc. after user prolog, not before,
3626 in case the user prolog sets feature-test macros like _GNU_SOURCE.
3627 (YYSIZEMAX): New macro.
3628 (yystpcpy): New function, taken from yacc.c.
3629 (struct yyGLRStack.yyspaceLeft): Now size_t, not int.
3630 (yyinitGLRStack, yyfreeGLRstack): Remove unnecessary forward decls,
3631 so that we don't have to maintain their signatures.
3632 (yyFail): Check for buffer overflow, by using vsnprintf rather
3633 than vsprintf. Allocate a bigger buffer if possible.
3634 Report an error if buffer allocation fails.
3635 (yyStackOverflow): New function.
3636 (yyinitStateSet, yyinitGLRStack): Return a boolean indicating whether
3637 the initialization was successful. It might fail if storage was
3638 exhausted.
3639 (yyexpandGLRStack): Add more checks for storage allocation failure.
3640 Use yyStackOverflow to report failures.
3641 (yymarkStackDeleted, yyglrShift, yyglrShiftDefer, yydoAction):
3642 (yysplitStack, yyprocessOneStack, yyparse, yypstack):
3643 Don't assume stack number fits in int.
3644 (yysplitStack): Check for storage allocation failure.
3645 (yysplitStack, yyprocessOneStack): Add pure_formals, so that we
3646 can print diagnostics on storage allocation failure. All callers
3647 changed.
3648 (yyresolveValue): Use yybool for boolean.
3649 (yyreportSyntaxError): Check for size-calculation overflow.
3650 This code is taken from yacc.c.
3651 (yyparse): Check for storage allocation errors when allocating
3652 the initial stack.
3653
3654 2005-07-05 Akim Demaille <akim@epita.fr>
3655
3656 Extract calc++ from the documentation.
3657 * doc/bison.texinfo (Calc++): Add the extraction marks.
3658 * examples/extexi: New, from the aborted GNU Programming 2E.
3659 Separate the different paragraph of a file with empty lines.
3660 * examples/Makefile: Use it to extract the whole calc++ example.
3661
3662 2005-06-24 Akim Demaille <akim@epita.fr>
3663
3664 * doc/bison.texinfo (C++ Parser Interface): Use defcv to define
3665 class typedefs.
3666
3667 2005-06-22 Akim Demaille <akim@epita.fr>
3668
3669 * doc/bison.texinfo (C++ Language Interface): First stab.
3670 (C++ Parsers): Remove.
3671
3672 2005-06-22 Akim Demaille <akim@epita.fr>
3673
3674 * data/lalr1.cc (yylex_): Honor %lex-param.
3675
3676 2005-06-22 Akim Demaille <akim@epita.fr>
3677
3678 Start a set of simple examples.
3679 * examples/calc++/Makefile, examples/calc++/calc++-driver.cc,
3680 * examples/calc++/calc++-driver.hh,
3681 * examples/calc++/calc++-parser.yy,
3682 * examples/calc++/calc++-scanner.ll, examples/calc++/calc++.cc,
3683 * examples/calc++/compile, examples/calc++/test: New.
3684
3685 2005-06-09 Paul Eggert <eggert@cs.ucla.edu>
3686
3687 * data/yacc.c (malloc, free) [defined __cplusplus]: Wrap inside
3688 extern "C" {}. This fixes a problem reported by Paul Hilfinger,
3689 which stems from the 2005-05-27 patch.
3690
3691 2005-06-06 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
3692
3693 * data/glr.c: Modify treatment of unused parameters to permit use
3694 of g++ (which doesn't allow __attribute__ ((unused)) for parameters).
3695
3696 2005-05-30 Paul Eggert <eggert@cs.ucla.edu>
3697
3698 Fix infringement on user name space reported by Janos Zoltan Szabo.
3699 * data/yacc.c (yyparse): strlen -> yystrlen.
3700
3701 2005-05-30 Akim Demaille <akim@epita.fr>
3702
3703 * data/lalr1.cc (_): New.
3704 Translate the various messages.
3705
3706 2005-05-27 Paul Eggert <eggert@cs.ucla.edu>
3707
3708 Fix infringement on user name space reported by Bruno Haible.
3709 * data/yacc.c (YYSIZE_T): Define first, so that later decls can use it.
3710 Prefer GCC's __SIZE_TYPE__ if available, so that we don't infringe on
3711 the user's name space.
3712 (alloca): Include <stdlib.h> to get it, if it's not built in.
3713 (YYMALLOC, YYFREE): Define only if needed.
3714 (malloc, free): Declare, but only if needed, as this infringes on
3715 the user name space.
3716
3717 2005-05-25 Paul Eggert <eggert@cs.ucla.edu>
3718
3719 Fix BeOS, FreeBSD, MacOS porting problems reported by Bruno Haible.
3720 * lib/bitset.c (bitset_print): Don't assume size_t can be printed
3721 with %d format.
3722 * lib/ebitset.c (min, max): Undef before defining.
3723 * lib/vbitset.c (min, max): Likewise.
3724 * lib/subpipe.c (create_subpipe): Save local variables in case
3725 vfork clobbers them.
3726
3727 2005-05-24 Bruno Haible <bruno@clisp.org>
3728
3729 * tests/synclines.at (AT_SYNCLINES_COMPILE): Add support for the
3730 error message syntax used by gcc-4.0.
3731
3732 2005-05-23 Paul Eggert <eggert@cs.ucla.edu>
3733
3734 * README: Mention m4 1.4.3. Remove obsolete advice about
3735 Sun Forte Developer 6 update 2, VMS, and MS-DOS.
3736
3737 * bootstrap: Remove workaround for problem I encountered with
3738 gettext 0.14.1; it seems to be fixed now.
3739
3740 2005-05-22 Paul Eggert <eggert@cs.ucla.edu>
3741
3742 * NEWS: Version 2.0a.
3743
3744 * src/files.c: Include "stdio-safer.h"; this fixes a typo in
3745 the previous change.
3746
3747 Various maintainer cleanups.
3748 * .cvsignore: Add a.exe, a.out, b.out,, conf[0-9]*, confdefs*,
3749 conftest*, for benefit of CVS commands run at the same time as
3750 "configure". Add build-aux, since "bootstrap" now creates it and
3751 its subfiles.
3752 * Makefile.cfg (move_if_change): Remove.
3753 * Makefile.maint: Remove the update stuff; we now use "bootstrap".
3754 (ftp-gnu, www-gnu, move_if_change, local_updates, update):
3755 (po_repo, do-po-update, po-update, wget_files, get-targets):
3756 (config.guess-url_prefix, config.sub-url_prefix):
3757 (ansi2knr.c-url_prefix, texinfo.tex-url_prefix):
3758 (standards.texi-url_prefix, make-stds.texi-url_prefix, taget, url):
3759 ($(get-targets), cvs-files, automake_repo, wget-update, cvs-update):
3760 Remove.
3761 * configure.ac (AC_CONFIG_AUX_DIR): Change from config to build-aux;
3762 this is now the recommended name.
3763 * config/.cvsignore: Remove config.guess, config.rpath, config.sub,
3764 depcomp, install-sh, mdate-sh, missing, mkinstalldirs, texinfo.tex,
3765 ylwrap. These files now go into build-aux.
3766 * config/move-if-change: Remove.
3767 * config/prev-version.txt: Bump from 1.75 to 2.0.
3768
3769 * bootstrap: Add stdio-safer, unistd-safer modules.
3770 Remove m4/glibc2.m4 (introduced by latest gnulib, but
3771 we don't need it).
3772 * lib/.cvsignore: Add dup-safer.c, fd-safer.c,
3773 fopen-safer.c, stdio-safer.h, unistd-safer.h.
3774 * lib/subpipe.c: Include "unistd-safer.h".
3775 (create_subpipe): Make sure all the newly-created
3776 file descriptors are > 2, so that diagnostics don't
3777 get sent down them (which might cause Bison to hang, in theory).
3778 * m4/.cvsignore: Add stdio-safer.m4, unistd-safer.m4.
3779 * src/files.c (xfopen): Use fopen_safer, not fopen.
3780
3781 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Port
3782 yesterday's yacc.c fix.
3783
3784 2005-05-21 Paul Eggert <eggert@cs.ucla.edu>
3785
3786 * data/glr.c, data/lalr1.cc: Update copyright date.
3787
3788 Fix a destructor bug reported by Wolfgang Spraul in
3789 <http://lists.gnu.org/archive/html/bug-bison/2005-05/msg00042.html>.
3790 * data/yacc.c (yyabortlab): Don't call destructor, and
3791 don't set yychar to EMPTY.
3792 (yyoverflowlab): Don't call destructor.
3793 (yyreturn): Call destructor, if yychar is neither YYEOF nor YYEMPTY.
3794 * tests/calc.at (AT_CHECK_CALC): Expect one fewer output lines,
3795 since we no longer output the message "discarding lookahead token
3796 end of input ()".
3797
3798 2005-05-20 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
3799
3800 * data/glr.c (YY_SYMBOL_PRINT): Don't print newline at end to
3801 fix a small glitch in debugging output.
3802 (yyprocessOneStack, yyrecoverSyntaxError, yyparse): Print newline
3803 after YY_SYMBOL_PRINT where needed.
3804
3805 (struct yyGLRState): Add some comments.
3806 (struct yySemanticOption): Add some comments.
3807 (union yyGLRStackItem): Add comment.
3808
3809 (yymergeOptionSets): Correct this to properly perform the union,
3810 avoiding infinite reported by Michael Rosien.
3811 Update comment.
3812
3813 * tests/glr-regression.at: Add test for GLR merging error reported
3814 by M. Rosien.
3815
3816 2005-05-13 Paul Eggert <eggert@cs.ucla.edu>
3817
3818 * COPYING, ChangeLog, GNUmakefile, HACKING, Makefile.am,
3819 Makefile.cfg, Makefile.maint, NEWS, README, README-alpha,
3820 README-cvs, TODO, bootstrap, configure.ac, data/Makefile.am,
3821 data/README, data/c.m4, data/glr.c, data/lalr1.cc, data/yacc.c,
3822 data/m4sugar/m4sugar.m4, doc/Makefile.am, doc/bison.texinfo,
3823 doc/fdl.texi, doc/gpl.texi, doc/refcard.tex, lib/Makefile.am,
3824 lib/abitset.c, lib/abitset.h, lib/bbitset.h, lib/bitset.c,
3825 lib/bitset.h, lib/bitset_stats.c, lib/bitset_stats.h,
3826 lib/bitsetv-print.c, lib/bitsetv-print.h, lib/bitsetv.c,
3827 lib/bitsetv.h, lib/ebitset.c, lib/ebitset.h, lib/get-errno.c,
3828 lib/get-errno.h, lib/lbitset.c, lib/lbitset.h, lib/libiberty.h,
3829 lib/main.c, lib/subpipe.c, lib/subpipe.h, lib/timevar.c,
3830 lib/timevar.def, lib/timevar.h, lib/vbitset.c, lib/vbitset.h,
3831 lib/yyerror.c, m4/cxx.m4, m4/m4.m4, m4/subpipe.m4, m4/timevar.m4,
3832 m4/warning.m4, src/LR0.c, src/LR0.h, src/Makefile.am, src/assoc.c,
3833 src/assoc.h, src/closure.c, src/closure.h, src/complain.c,
3834 src/complain.h, src/conflicts.c, src/conflicts.h, src/derives.c,
3835 src/derives.h, src/files.c, src/files.h, src/getargs.c,
3836 src/getargs.h, src/gram.c, src/gram.h, src/lalr.c, src/lalr.h,
3837 src/location.c, src/location.h, src/main.c, src/muscle_tab.c,
3838 src/muscle_tab.h, src/nullable.c, src/nullable.h, src/output.c,
3839 src/output.h, src/parse-gram.c, src/parse-gram.h,
3840 src/parse-gram.y, src/print.c, src/print.h, src/print_graph.c,
3841 src/print_graph.h, src/reader.c, src/reader.h, src/reduce.c,
3842 src/reduce.h, src/relation.c, src/relation.h, src/scan-gram.l,
3843 src/scan-skel.l, src/state.c, src/state.h, src/symlist.c,
3844 src/symlist.h, src/symtab.c, src/symtab.h, src/system.h,
3845 src/tables.c, src/tables.h, src/uniqstr.c, src/uniqstr.h,
3846 src/vcg.c, src/vcg.h, src/vcg_defaults.h, tests/Makefile.am,
3847 tests/actions.at, tests/c++.at, tests/calc.at, tests/conflicts.at,
3848 tests/cxx-type.at, tests/existing.at, tests/glr-regression.at,
3849 tests/headers.at, tests/input.at, tests/local.at, tests/output.at,
3850 tests/reduce.at, tests/regression.at, tests/sets.at,
3851 tests/synclines.at, tests/testsuite.at, tests/torture.at:
3852 Update FSF postal mail address.
3853
3854 2005-05-11 Paul Eggert <eggert@cs.ucla.edu>
3855
3856 * tests/local.at (AT_COMPILE_CXX): Treat LDFLAGS like AT_COMPILE does.
3857 Problem reported by Ralf Menzel.
3858
3859 2005-05-01 Paul Eggert <eggert@cs.ucla.edu>
3860
3861 * tests/actions.at: Test that stack overflow invokes destructors.
3862 From Marcus Holland-Moritz.
3863 * data/yacc.c (yyerrlab): Move the code that destroys the stack
3864 from here....
3865 (yyreturn): to here. That way, destructors are called properly
3866 even if the stack overflows, or the user calls YYACCEPT or
3867 YYABORT. Stack-overflow problem reported by Marcus Holland-Moritz.
3868 (yyoverflowlab): Destroy the lookahead.
3869
3870 2005-04-24 Paul Eggert <eggert@cs.ucla.edu>
3871
3872 * data/yacc.c (YYSTACK_ALLOC_MAXIMUM): Add more-descriptive comment.
3873
3874 2005-04-17 Paul Eggert <eggert@cs.ucla.edu>
3875
3876 * NEWS: Bison-generated C parsers no longer quote literal strings
3877 associated with tokens.
3878 * src/output.c (prepare_symbols): Don't escape strings,
3879 since users don't want to see C escapes.
3880 * tests/calc.at (AT_CHECK_CALC): Adjust to lack of quotes
3881 in diagnostics.
3882 * tests/input.at (Torturing the Scanner): Likewise.
3883 * tests/regression.at (Token definitions, Web2c Actions): Likewise.
3884
3885 2005-04-16 Paul Eggert <eggert@cs.ucla.edu>
3886
3887 * tests/torture.at (AT_INCREASE_DATA_SIZE): Skip the test if
3888 the data size is known to be too small and we can't increase it.
3889 This works around an HP-UX 11.00 glitch reported by Andrew Benham.
3890
3891 2005-04-15 Paul Eggert <eggert@cs.ucla.edu>
3892
3893 * src/parse-gram.y: Include quotearg.h.
3894 (string_as_id): Quote $1 before using it as a key, since the
3895 lexer no longer quotes it for us.
3896 (string_content): Don't strip quotes, since lexer no longer
3897 quotes it for us.
3898 * src/scan-gram.l: Include quotearg.h.
3899 ("\""): Omit quote.
3900 ("'"<SC_ESCAPED_CHARACTER>): Quote symbol before using it as
3901 a key, since the rest of the lexer doesn't quote it.
3902 * src/symtab.c (symbol_get): Don't quote symbol; caller does it now.
3903 * tests/regression.at (Token definitions): Check for backslashes
3904 in token strings.
3905
3906 * data/yacc.c (YYSTACK_ALLOC_MAXIMUM): New macro.
3907 (YYSIZE_T): Define to unsigned long int when using an older compiler.
3908 (yyparse): Revamp code to generate long syntax error message, to
3909 make it easier to translate, and to avoid problems with arithmetic
3910 overflow. Change "virtual memory" to "memory" in diagnostic, since
3911 we don't know whether the memory is virtual.
3912
3913 2005-04-13 Paul Eggert <eggert@cs.ucla.edu>
3914
3915 * NEWS: Bison-generated C parsers now use the _ macro to
3916 translate strings.
3917 * data/yacc.c (_) [!defined _]: New macro.
3918 All English strings wrapped inside this macro.
3919 * doc/bison.texinfo (Bison Parser): Document _.
3920 * po/POTFILES.in: Include src/parse-gram.c, since it now
3921 includes translateable strings that parse-gram.y doesn't.
3922
3923 2005-04-12 Paul Eggert <eggert@cs.ucla.edu>
3924
3925 * src/symtab.c (symbol_make_alias): Call symbol_type_set,
3926 reverting the 2004-10-11 change to this function.
3927 (symbol_check_alias_consistency): Don't call symbol_type_set
3928 if the type name is already correct.
3929 * tests/input.at (Typed symbol aliases): New test, from Tim Van Holder.
3930
3931 2005-03-25 Paul Eggert <eggert@cs.ucla.edu>
3932
3933 * tests/regression.at (Token definitions): Don't use a token named
3934 c, as that generates a "#define c ..." that runs afoul of buggy
3935 stdlib.h that uses the identifier c as a member of struct
3936 drand48_data. Problem reported by Horst Wente.
3937
3938 2005-03-21 Paul Eggert <eggert@cs.ucla.edu>
3939
3940 * bootstrap: Change translation URL from
3941 http://www2.iro.umontreal.ca/~gnutra/po/maint/bison/ to
3942 http://www.iro.umontreal.ca/translation/maint/bison/ to avoid
3943 redirection glitches. Problem reported by twlevo@xs4all.nl.
3944
3945 2005-03-20 Paul Eggert <eggert@cs.ucla.edu>
3946
3947 * tests/local.at (AT_COMPILE, AT_COMPILE_CXX): Don't put options
3948 after operands; POSIX says this isn't portable for the c99 command.
3949
3950 2005-03-18 Paul Eggert <eggert@cs.ucla.edu>
3951
3952 * tests/glr-regression.at (glr-regr2a.y): Try to dump core
3953 immediately if a data overrun has occurred; this may help us track
3954 down what may be a spurious failure on MacOS.
3955
3956 2005-03-17 Paul Eggert <eggert@cs.ucla.edu>
3957
3958 Respond to problems reported by twlevo@xs4all.nl.
3959
3960 * bootstrap: Use "trap - 0" rather than the unportable "trap 0".
3961
3962 * src/vcg.h: Comment fix.
3963 * src/vcg_defaults.h: Parenthesize macro bodies to make them safe.
3964 (G_CMAX): Change to -1 instead of INT_MAX.
3965
3966 * data/yacc.c (yyparse): Omit spaces before #line.
3967
3968 2005-03-15 Paul Eggert <eggert@cs.ucla.edu>
3969
3970 * src/tables.c (state_number_to_vector_number): Put it inside an
3971 "#if 0", since it's not currently used. Problem reported by
3972 Roland McGrath.
3973
3974 2005-03-06 Paul Eggert <eggert@cs.ucla.edu>
3975
3976 * src/output.c (escaped_output): Renamed from
3977 escaped_file_name_output, since we now use it for symbol tags as
3978 well. All uses changed.
3979 (symbol_destructors_output, symbol_printers_output):
3980 Escape symbol tags too.
3981 Problem reported by Matyas Forstner in
3982 <http://lists.gnu.org/archive/html/bug-bison/2005-03/msg00009.html>.
3983
3984 * src/muscle_tab.c (muscle_code_grow): Don't quote numbers; it's
3985 not needed.
3986 * src/output.c (user_actions_output, token_definitions_output,
3987 symbol_destructors_output, symbol_printers_output): Likewise.
3988 * src/reader.c (prologue_augment): Likewise.
3989 * src/scan-gram.l (handle_action_dollar, handle_action_at): Likewise.
3990
3991 * src/vcg.c (output_edge): Don't quote linestyle arg.
3992 Problem reported by twlevo@xs4all.nl.
3993
3994 2005-02-28 Paul Eggert <eggert@cs.ucla.edu>
3995
3996 * doc/bison.texinfo (Semantic Tokens): Fix scoping problem in
3997 example, reported by Derek M Jones. Also, make the example even
3998 more outrageous, to better illustrate how bad the problem is.
3999
4000 2005-02-24 Paul Eggert <eggert@cs.ucla.edu>
4001
4002 * doc/bison.texinfo (Mfcalc Symtab): Correct the prototype for
4003 putsym. Typo reported by Sebastian Piping.
4004
4005 2005-02-23 Paul Eggert <eggert@cs.ucla.edu>
4006
4007 * doc/bison.texinfo (Language and Grammar): some -> same
4008 (Epilogue): int he -> in the
4009 Typos reported by Sebastian Piping via Justin Pence.
4010
4011 2005-02-07 Paul Eggert <eggert@cs.ucla.edu>
4012
4013 * tests/glr-regression.at (Improper handling of embedded actions
4014 and dollar(-N) in GLR parsers): Renamed from "Improper handling of
4015 embedded actions and $-N in GLR parsers", work around an Autoconf bug
4016 with dollar signs in test names.
4017 * tests/input.at (Invalid dollar-n): Renamed from "Invalid \$n",
4018 for a similar reason.
4019
4020 2005-01-28 Paul Eggert <eggert@cs.ucla.edu>
4021
4022 * src/vcg.c (output_graph): G_VIEW -> normal_view in case someone
4023 wants to redefine G_VIEW.
4024
4025 2005-01-27 Paul Eggert <eggert@cs.ucla.edu>
4026
4027 * src/vcg.c (get_view_str): Remove case for normal_view.
4028 Problem reported by twlevo@xs4all.nl.
4029
4030 2005-01-24 Paul Eggert <eggert@cs.ucla.edu>
4031
4032 * configure.ac (O0CFLAGS, O0CXXFLAGS): Fix quoting bug.
4033 Problem reported by twlevo@xs4all.nl.
4034
4035 * doc/bison.texinfo: Change @dircategory from "GNU programming
4036 tools" to "Software development". Requested by Richard Stallman
4037 via Karl Berry.
4038
4039 2005-01-23 Paul Eggert <eggert@cs.ucla.edu>
4040
4041 * tests/c++.at (AT_CHECK_DOXYGEN): Don't use options after operands.
4042 Problem reported by twlevo@xs4all.nl.
4043
4044 2005-01-21 Paul Eggert <eggert@cs.ucla.edu>
4045
4046 * data/yacc.c (YYCOPY, yystpcpy, yyparse): Remove "register"
4047 keyword; it's not needed with modern compilers, and it doesn't
4048 affect correctness with older compilers. Suggested by
4049 twlevo@xs4all.nl.
4050
4051 2005-01-17 Paul Eggert <eggert@cs.ucla.edu>
4052
4053 * data/glr.c (yyuserAction): Add "default: break;" case to pacify
4054 gcc -Wswitch-default.
4055 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Likewise.
4056 * data/yacc.c (yyparse): Likewise.
4057
4058 2005-01-12 Paul Eggert <eggert@cs.ucla.edu>
4059
4060 * src/system.h (OUTPUT_EXT, TAB_EXT): Define only if not defined
4061 already. Let config.h define any nonstandard values.
4062
4063 2005-01-10 Paul Eggert <eggert@cs.ucla.edu>
4064
4065 * tests/calc.at (_AT_DATA_CALC_Y): Use alarm (100), not alarm (10),
4066 for the benefit of slower hosts. Problem reported by
4067 Nelson H. F. Beebe.
4068
4069 2005-01-07 Paul Eggert <eggert@cs.ucla.edu>
4070
4071 * data/yacc.c (yyparse): Pacify non-GCC compilers about yyerrorlab
4072 being defined and not used.
4073 * data/lalr1.cc (yyparse): Likewise.
4074 Use "if (false)" rather than "if (0)".
4075
4076 2005-01-05 Paul Eggert <eggert@cs.ucla.edu>
4077
4078 * TODO: Mention that we should allow NUL bytes in tokens.
4079
4080 2005-01-02 Paul Eggert <eggert@cs.ucla.edu>
4081
4082 * src/scan-skel.l (<<EOF>>): Don't close standard output.
4083 Problem reported by Hans Aberg.
4084
4085 2005-01-01 Paul Eggert <eggert@cs.ucla.edu>
4086
4087 * src/getargs.c (version): Happy new year; update overall
4088 program copyright date from 2004 to 2005.
4089
4090 * src/scan-skel.l ("@output ".*\n): Don't close standard output.
4091 Problem reported by Hans Aberg.
4092 * tests/output.at (AT_CHECK_OUTPUT): New arg SHELLIO.
4093 (Output file names.): Add a test for the case when standard output
4094 is closed.
4095
4096 2004-12-26 Paul Eggert <eggert@cs.ucla.edu>
4097
4098 * doc/bison.texinfo (@copying): Update FDL version number to 1.2,
4099 to fix an oversight in the Bison 2.0 manual.
4100
4101 2004-12-25 Paul Eggert <eggert@cs.ucla.edu>
4102
4103 * NEWS: Version 2.0. Reformat the existing news items since
4104 1.875, so that related items are grouped together.
4105 * configure.ac (AC_INIT): Bump version to 2.0.
4106 * src/parse-gram.c, src/parse-gram.h: Regenerate with 2.0.
4107
4108 * tests/torture.at (Exploding the Stack Size with Alloca): Set
4109 YYSTACK_USE_ALLOCA to 1 if __GNUC__ or alloca are defined;
4110 otherwise, we're not testing alloca. Unfortunately there's no
4111 simple way to consult HAVE_ALLOCA here.
4112
4113 * data/lalr1.cc (yydestruct_): Pacify unused variable warning
4114 for yymsg, too.
4115
4116 * src/LR0.c (new_itemsets): Use memset rather than zeroing by
4117 hand. This avoids a warning about comparing int to size_t when
4118 GCC warnings are enabled.
4119
4120 2004-12-22 Paul Eggert <eggert@cs.ucla.edu>
4121
4122 * NEWS: Bison-generated parsers no longer default to using the
4123 alloca function (when available) to extend the parser stack, due
4124 to widespread problems in unchecked stack-overflow detection.
4125 * data/glr.c (YYMAXDEPTH): Remove undef when zero. It's the user's
4126 responsibility to set it to a positive value. This lets the user
4127 specify a value that is not a preprocessor constant.
4128 * data/yacc.c (YYMAXDEPTH): Likewise.
4129 (YYSTACK_ALLOC): Define only if YYSTACK_USE_ALLOCA is nonzero.
4130 * doc/bison.texinfo (Stack Overflow): YYMAXDEPTH no longer needs
4131 to be a compile-time constant. However, explain the constraints on it.
4132 Also, explain the constraints on YYINITDEPTH.
4133 (Table of Symbols): Explain that alloca is no longer the default.
4134 Explain the user's responsibility if they define YYSTACK_USE_ALLOCA
4135 to 1.
4136
4137 * doc/bison.texinfo (Location Default Action): Mention that n must
4138 be zero when k is zero. Suggested by Frank Heckenbach.
4139
4140 2004-12-22 Akim Demaille <akim@epita.fr>
4141
4142 * data/lalr1.cc (parser::token_number_type, parser::rhs_number_type)
4143 (parser::state_type, parser::semantic_type, parser::location_type):
4144 Private, not public.
4145 (parser::parse): Return ints, not bool.
4146 Returning a bool introduces a problem: 0 corresponds to false, and
4147 it seems weird to return false on success. Returning true changes
4148 the conventions for yyparse.
4149 Alternatively we could return void and send an exception.
4150 There is no clear consensus (yet?).
4151 (state_stack, semantic_stack, location_stack): Rename as...
4152 (state_stack_type, semantic_stack_type, location_stack_type): these.
4153 Private, not public.
4154 * tests/c++.at: New.
4155 * tests/testsuite.at, tests/Makefile.am: Adjust.
4156
4157 2004-12-21 Akim Demaille <akim@epita.fr>
4158
4159 * data/lalr1.cc (parser::parse): Return a bool instead of an int.
4160
4161 2004-12-21 Akim Demaille <akim@epita.fr>
4162
4163 Don't impose std::string for filenames.
4164
4165 * data/lalr1.cc (b4_filename_type): New.
4166 (position::filename): Use it.
4167 (parser.hh): Move the inclusion of stack.hh and location.hh below
4168 the user code, so that needed headers for the filename type can be
4169 included first.
4170 Forward declare them before the user code.
4171 * tests/Makefile.am (check-local, installcheck-local): Pass
4172 TESTSUITEFLAGS to the TESTSUITE.
4173
4174 2004-12-20 Akim Demaille <akim@epita.fr>
4175
4176 Use more STL like names: my_class instead of MyClass.
4177
4178 * data/lalr1.cc (LocationStack, LocationType, RhsNumberType)
4179 (SemanticStack, SemanticType, StateStack, StateType)
4180 (TokenNumberType, Stack, Slice, Traits, Parser::location)
4181 (Parser::value): Rename as...
4182 (location_stack, location_type, rhs_number_type, semantic_stack)
4183 (semantic_type, state_stack, state_type, token_number_type, stack)
4184 (slice, traits, parser::yylloc, parser::yylval): these.
4185
4186 * tests/calc.at, tests/regression.at, tests/actions.at: Adjust.
4187
4188 2004-12-19 Paul Eggert <eggert@cs.ucla.edu>
4189
4190 * data/glr.c (YYLLOC_DEFAULT): Use GNU spacing conventions.
4191 * data/yacc.c (YYLLOC_DEFAULT): Likewise.
4192
4193 2004-12-17 Paul Eggert <eggert@cs.ucla.edu>
4194
4195 Remove uses of 'short int' and 'unsigned short int'. This raises
4196 some arbitrary limits. It uses more memory but nowadays that's
4197 not much of an issue.
4198
4199 This change does not affect the generated parsers; that's a different
4200 task, as some users will want to conserve memory there.
4201
4202 Ideally we should use size_t to represent all object counts, and
4203 something like ptrdiff_t to represent signed differences of object
4204 counts; but that will require more code-cleanup than I have the
4205 time to do right now.
4206
4207 * src/LR0.c (allocate_itemsets, new_itemsets, save_reductions):
4208 Use size_t, not int or short int, to count objects.
4209 * src/closure.c (nritemset, closure): Likewise.
4210 * src/closure.h (nritemset, closure): Likewise.
4211 * src/nullable.c (nullable_compute): Likewise.
4212 * src/print.c (print_core): Likewise.
4213 * src/print_graph.c (print_core): Likewise.
4214 * src/state.c (state_compare, state_hash): Likewise.
4215 * src/state.h (struct state): Likewise.
4216 * src/tables.c (default_goto, goto_actions): Likewise.
4217
4218 * src/gram.h (rule_number, rule): Use int, not short int.
4219 * src/output.c (prepare_rules): Likewise.
4220 * src/state.h (state_number, STATE_NUMBER_MAXIMUM, transitions,
4221 errs, reductions): Likewise.
4222 * src/symtab.h (symbol_number, SYMBOL_NUMBER_MAXIMUM, struct symbol):
4223 Likewise.
4224 * src/tables.c (vector_number, tally, action_number,
4225 ACTION_NUMBER_MINIMUM): Likewise.
4226 * src/output.c (muscle_insert_short_int_table): Remove.
4227
4228 2004-12-17 Akim Demaille <akim@epita.fr>
4229
4230 * data/lalr1.cc: Extensive Doxygenation.
4231 (error_): Rename as...
4232 (error): this, since it is visible to the user.
4233 Adjust callers.
4234 (Parser::message): Now an automatic variable from...
4235 (Parser::yyreport_syntax_error_): here.
4236 * tests/actions.at, tests/calc.at, tests/regression.at: Adjust to
4237 Parser::error.
4238 * tests/input.at: Escape $.
4239
4240 2004-12-16 Paul Eggert <eggert@cs.ucla.edu>
4241
4242 * data/glr.c (b4_lhs_value, b4_rhs_value, b4_rhs-location):
4243 Parenthesize rhs to avoid obscure problems with mistakes like
4244 "foo$$bar = foo$1bar;". Problem reported by twlevo at xs4all.
4245 * data/lalr1.cc (b4_lhs_value, b4_rhs_value, b4_lhs_location,
4246 b4_rhs_location): Likewise.
4247 * data/yacc.c (b4_lhs_value, b4_rhs_value, b4_lhs_location,
4248 b4_rhs_location): Likewise.
4249
4250 2004-12-16 Akim Demaille <akim@epita.fr>
4251
4252 * data/lalr1.cc (yyreport_syntax_error_): Catch up with glr.c and
4253 yacc.c: be sure to stay within yycheck_.
4254 * tests/actions.at: Re-enable C++ tests.
4255
4256 2004-12-16 Akim Demaille <akim@epita.fr>
4257
4258 * src/print_graph.c (print_graph): Remove layoutalgorithm uses for
4259 real.
4260
4261 2004-12-16 Akim Demaille <akim@epita.fr>
4262
4263 Use #define to handle the %name-prefix.
4264
4265 * data/glr.c, data/yacc.c: Comment changes.
4266 * data/lalr1.cc (yylex): Use #define to select the name of yylex,
4267 so that one can refer to yylex in the parser file, and have it
4268 renamed, as is the case with other skeletons.
4269
4270 2004-12-16 Akim Demaille <akim@epita.fr>
4271
4272 Move lalr1.cc internals into yy*.
4273
4274 * data/lalr1.cc (semantic_stack_, location_stack_, state_stack_)
4275 (semantic_stack_, location_stack_, pact_, pact_ninf_, defact_)
4276 (pgoto_, defgoto_, table_, table_ninf_, check_, stos_, r1_, r2_)
4277 (name_, rhs_, prhs_, rline_, token_number_, eof_, last_, nnts_)
4278 (empty_, final_, terror_, errcode_, ntokens_)
4279 (user_token_number_max_, undef_token_, n_, len_, state_, nerrs_)
4280 (looka_, ilooka_, error_range_, nerrs_):
4281 Rename as...
4282 (yysemantic_stack_, yylocation_stack_, yystate_stack_)
4283 (yysemantic_stack_, yylocation_stack_, yypact_, yypact_ninf_)
4284 (yydefact_, yypgoto_, yydefgoto_, yytable_, yytable_ninf_)
4285 (yycheck_, yystos_, yyr1_, yyr2_, yyname_, yyrhs_, yyprhs_)
4286 (yyrline_, yytoken_number_, yyeof_, yylast_, yynnts_, yyempty_)
4287 (yyfinal_, yyterror_, yyerrcode_, yyntokens_)
4288 (yyuser_token_number_max_, yyundef_token_, yyn_, yylen_, yystate_)
4289 (yynerrs_, yylooka_, yyilooka_, yyerror_range_, yynerrs_):
4290 these.
4291
4292 2004-12-15 Paul Eggert <eggert@cs.ucla.edu>
4293
4294 Fix some problems reported by twlevo at xs4all.
4295 * src/symtab.c (symbol_new): Report an error if the input grammar
4296 contains too many symbols. This is better than calling abort() later.
4297 * src/vcg.h (enum layoutalgorithm): Remove. All uses removed.
4298 (struct node, struct graph):
4299 Rename member expand to stretch. All uses changed.
4300 (struct graph): Remove member layoutalgorithm. All uses removed.
4301 * src/vcg.c (get_layoutalgorithm_str): Remove. All uses removed.
4302 * src/vcg_defaults.h (G_STRETCH): Renamed from G_EXPAND.
4303 All uses changed.
4304 (N_STRETCH): Rename from N_EXPAND. All uses changed.
4305
4306 2004-12-15 Akim Demaille <akim@epita.fr>
4307
4308 * data/lalr1.cc: Normalize /** \brief ... */ to ///.
4309 Add more Doxygen comments.
4310 (symprint_, stack_print_, reduce_print_, destruct_, pop)
4311 (report_syntax_error_, translate_): Rename as...
4312 (yysymprint_, yystack_print_, yyreduce_print_, yydestruct_)
4313 (yypop_, yyreport_syntax_error_, yytranslate_): this.
4314
4315 2004-12-15 Akim Demaille <akim@epita.fr>
4316
4317 * data/lalr1.cc (lex_): Rename as...
4318 (yylex_): this.
4319 Move the trace here.
4320 Take the %name-prefix into account.
4321 Reported by Alexandre Duret-Lutz.
4322
4323 2004-12-15 Akim Demaille <akim@epita.fr>
4324
4325 Simplify the C++ parser constructor.
4326
4327 * data/lalr1.cc (debug_): Rename as...
4328 (yydebug_): so that the parser's internals are always in the yy*
4329 pseudo namespace.
4330 Adjust uses.
4331 (b4_parse_param_decl): Remove the leading comma as it is now only
4332 called as unique argument list.
4333 (Parser::Parser): Remove the constructor accepting a location and
4334 an initial debugging level.
4335 Remove from the other ctor the argument for the debugging level.
4336 (debug_level_type, debug_level, set_debug_level): New.
4337
4338 * tests/actions.at, tests/calc.at, tests/regression.at: Adjust
4339 constructor calls.
4340
4341 2004-12-15 Akim Demaille <akim@epita.fr>
4342
4343 Remove b4_root related material: failure experiment
4344 (which goal was to allow to derive from a class).
4345
4346 * data/lalr1.cc (b4_root, b4_param, b4_constructor): Remove
4347 definitions and uses.
4348
4349 2004-12-14 Paul Eggert <eggert@cs.ucla.edu>
4350
4351 * data/glr.c (struct yyGLRStack): yyerror_range now has 3 items,
4352 not 2, since it's not portable to subtract 1 from the start of an
4353 array. The new item 0 is never set or used. All uses changed.
4354
4355 (yyrecoverSyntaxError): Use YYLLOC_DEFAULT instead of assuming
4356 the default definition of YYLLOC_DEFAULT. Problem reported
4357 by Frank Heckenbach.
4358
4359 2004-12-12 Paul Eggert <eggert@cs.ucla.edu>
4360
4361 * data/glr.c (YYRHSLOC): Don't have two definitions, one for
4362 the normal case and one for the error case. Just use the
4363 first one uniformly. Problem reported by Frank Heckenbach.
4364 (YYLLOC_DEFAULT): Use the conventions of yacc.c, so we can
4365 use exactly the same macro in both places.
4366 (yyerror_range): Now of type yyGLRStackItem, not YYLTYPE,
4367 so that the normal-case YYRHSLOC works for the error case too.
4368 All uses changed.
4369 * data/yacc.c (YYRHSLOC): New macro, taken from glr.c.
4370 (YYLLOC_DEFAULT): Use the same macro as glr.c.
4371 * doc/bison.texinfo (Location Default Action): Don't claim that
4372 we have an array of locations. Use the same macro for both glr
4373 and lalr parsers. Mention YYRHSLOC. Mention what happens when
4374 the index is 0.
4375
4376 2004-12-10 Paul Eggert <eggert@cs.ucla.edu>
4377
4378 * HACKING: Update email addresses to send announcements to.
4379
4380 * configure.ac (AC_INIT): Bump version to 1.875f.
4381
4382 2004-12-10 Paul Eggert <eggert@cs.ucla.edu>
4383
4384 * NEWS: Version 1.875e.
4385 * src/parse-gram.c, src/parse-gram.h: Regenerate with 1.875e.
4386
4387 * src/scan-skel.l: Include "complain.h", for "fatal".
4388
4389 * src/relation.h (relation_print, relation_digraph):
4390 Relation sizes are of type relation_node, not size_t (this is
4391 merely a doc fix, since the two types are equivalent).
4392 (relation_transpose): Relation sizes are of type relation_node,
4393 not int.
4394 * src/relation.c: Likewise.
4395 (top, infinity): Now of type relation_node, not int.
4396 (traverse, relation_transpose): Use relation_node, not int.
4397
4398 * data/glr.c (yyuserAction, yyrecoverSyntaxError): Mark args
4399 with ATTRIBUTE_UNUSED if they're not used, to avoid GCC warning.
4400 (yyparse): Remove unused local introduced in 2004-10-25 patch.
4401
4402 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): New arg
4403 specifying whether the test should be skipped. Use it tp
4404 specify that the [%defines %skeleton "lalr1.cc"] tests currently
4405 fail on some hosts, and should be skipped.
4406
4407 2004-12-08 Paul Eggert <eggert@cs.ucla.edu>
4408
4409 * src/system.h (CALLOC, MALLOC, REALLOC): Remove. All callers
4410 changed to use xcalloc, xnmalloc, xnrealloc, respectively,
4411 unless otherwise specified below.
4412
4413 * src/LR0.c (allocate_itemsets): Use xnmalloc, not xcalloc,
4414 to allocate kernel_base, kernel_items, kernel_size, since
4415 they needn't be initialized to 0.
4416 (allocate_storgae): Likewise, for shiftset, redset, shift_symbol.
4417 * src/closure.c (new_closure): Likewise, for itemset.
4418 * src/derives.c (derives_compute): Likewise, for delts, derives, q.
4419 * src/lalr.c (set_goto_map): Likewise, for temp_map.
4420 (initialize_F): Likewise, for reads, edge, reads[i], includes[i].
4421 (build_relations): Likewise for edge, states1, includes.
4422 * src/nullable.c (nullable_compute): Likewise, for squeue, relts.
4423 * src/reader.c (packgram): Likewise, for ritem, rules.
4424 * src/reduce.c (nonterminals_reduce): Likewise for nontermmap.
4425 * src/relation.c (relation_digraph): Likewise for VERTICES.
4426 (relation_transpose): Likewise for new_R, end_R.
4427 * src/symtab.c (symbols_token_translations_init): Likewise for
4428 token_translations.
4429 * src/tables.c (save_row): Likewise for froms, tos, conflict_tos.
4430 (token_actions): Likewise for yydefact, actrow, conflrow,
4431 conflict_list.
4432 (save_column): Likewise for froms[symno], tos[symno].
4433 (goto_actions): Likewise for state_count.
4434 (pack_table): Likewise for base, pos, check.
4435 (tables_generate): Likewise for width.
4436
4437 * src/LR0.c (set_states): Don't reuse kernel_size and kernel_base
4438 for initial core. Just have a separate core, so we needn't worry
4439 about whether kernel_size and kernel_base are initialized.
4440
4441 * src/LR0.c (shift_symbol, redset, shiftset, kernel_base,
4442 kernel_size, kernel_items): Remove unnecessary initialization.
4443 * src/conflicts.c (conflicts): Likewise.
4444 * src/derives.c (derives): Likewise.
4445 * src/muscle_tablc (muscle_insert): Likewise.
4446 * src/relation.c (relation_digraph): Likewise.
4447 * src/tables.c (froms, tos, conflict_tos, tally, width, actrow, order,
4448 conflrow, conflict_table, conflict_list, table, check):
4449 Likewise.
4450
4451 * src/closure.c (new_closure): Arg is of type unsigned int, not int.
4452 This is because all callers pass unsigned int.
4453 * src/closure.h (new_closure): Likewise.
4454
4455 * src/lalr.c (initialize_F): Initialize reads[i] in all cases.
4456 (build_relations): Initialize includes[i] in all cases.
4457 * src/reader.c (packgram): Always initialize rules[ruleno].prec
4458 and rules[ruleno].precsym. Initialize members in order.
4459 * src/relation.c (relation_transpose): Always initialize new_R[i]
4460 and end_R[i].
4461 * src/table.c (conflict_row): Initialize 0 at end of conflict_list.
4462
4463 * src/output.c (prepare_actions): Pass 0 instead of conflict_list[0];
4464 conflict_list[0] was always 0, but now it isn't initialized.
4465
4466 * src/table.c (table_grow): When conflict_table grew, the grown
4467 area wasn't cleared. Fix this.
4468
4469 * lib/.cvsignore: Add strdup.c, strdup.h.
4470 * m4/.cvsignore: Add strdup.m4.
4471
4472 2004-12-07 Paul Eggert <eggert@cs.ucla.edu>
4473
4474 * src/lalr.h (GOTO_NUMBER_MAXIMUM): New macro.
4475 * src/lalr.c (set_goto_map): Don't allow ngotos to equal
4476 GOTO_NUMBER_MAXIMUM, since we occasionally compute
4477 ngotos + 1 without checking for overflow.
4478 (build_relations): Use END_NODE, not -1, to denote end of edges.
4479 * src/lalr.c (set_goto_map, map_goto, initialize_F, add_loopback_edge,
4480 build_relations): Use goto_number, not int, for goto numbers.
4481 * src/tables.c (save_column, default_goto): Likewise.
4482
4483 2004-11-23 Akim Demaille <akim@epita.fr>
4484
4485 * data/lalr1.cc (YYSTYPE): Define it as is done for C, instead
4486 of #defining from yystype.
4487 Don't typedef yystype, C++ does not need it.
4488 This lets it possible to forward declare it as union.
4489
4490 2004-11-23 Paul Eggert <eggert@cs.ucla.edu>
4491
4492 * bootstrap (gnulib_modules): Add extensions.
4493 Problem reported by Jim Meyering.
4494
4495 2004-11-22 Paul Eggert <eggert@cs.ucla.edu>
4496
4497 * src/LR0.c, src/closure.c, src/derives.c, src/gram.c,
4498 src/lalr.c, src/nullable.c, src/relation.c, src/scan-skel.l,
4499 src/system.h, src/tables.c: XFREE -> free, to accommodate
4500 recent change to gnulib xalloc.h.
4501 Problem reported by Jim Meyering.
4502
4503 2004-11-17 Akim Demaille <akim@epita.fr>
4504
4505 * data/lalr1.cc (symprint_): Use cdebug_ to avoid warnings.
4506
4507 2004-11-17 Akim Demaille <akim@epita.fr>,
4508 Alexandre Duret-Lutz <adl@gnu.org>
4509
4510 * data/lalr1.cc (Parser::yycdebug_): New, a pointer, to allow
4511 changes.
4512 (YYCDEBUG): Adjust.
4513 Use it instead of cdebug_.
4514 (Parser::debug_stream, Parser::set_debug_stream): New.
4515 (Parser::symprint_): Define cdebug_ for temporary backward
4516 compatibility.
4517 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Use
4518 debug_stream ().
4519
4520 2004-11-17 Akim Demaille <akim@epita.fr>
4521
4522 * data/lalr1.cc (Parser:print_): Remove, use %printer instead.
4523 * tests/regression.at (_AT_DATA_DANCER_Y): Adjust.
4524 * tests/calc.at (_AT_DATA_CALC_Y): Ditto.
4525 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise.
4526
4527 2004-10-27 Paul Eggert <eggert@cs.ucla.edu>
4528
4529 * data/glr.c (yyloc_default): Remove; not used.
4530 Problem reported by Frank Heckenbach.
4531
4532 2004-10-25 Akim Demaille <akim@epita.fr>
4533
4534 * data/glr.c (YYRHSLOC): Move its definition next to its uses.
4535 Introduce another definition to address simple location arrays.
4536 (yyGLRStack): New member: yyerror_range.
4537 (yyrecoverSyntaxError, yyparse): Update it.
4538 (yyrecoverSyntaxError): Use it when shifting the error token to
4539 have an accurate range, equivalent to the one computed by both
4540 yacc.c and lalr1.cc.
4541 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Change its yylex so
4542 that column numbers start at column 0, as per GNU Coding
4543 Standards, the others tests, and the doc.
4544 (_AT_RESOLVED_GLR_OUTPUT_WITH_LOC, _AT_AMBIG_GLR_OUTPUT_WITH_LOC):
4545 Adjust to the above change (first column is 0).
4546 And adjust the location of the "<error>", now covering the whole
4547 line.
4548
4549 2004-10-22 Akim Demaille <akim@epita.fr>
4550 and Paul Eggert <eggert@cs.ucla.edu>
4551
4552 Remove some arbitrary limits on goto numbers and relations.
4553 * src/lalr.c (goto_map, ngotos, from_state, to_state): Omit
4554 initial values, since they're never used.
4555 (set_goto_map): ngotos is now unsigned, so test for overflow
4556 by seeing whether it wraps around to zero.
4557 * src/lalr.h (goto_number): Now size_t, not short int.
4558 (GOTO_NUMBER_MAXIMUM): Remove.
4559 * src/relation.c (relation_print, traverse, relation_transpose):
4560 Check for END_NODE rather than looking at sign.
4561 * src/relation.h (END_NODE): New macro.
4562 (relation_node): Now size_t, not short int.
4563
4564 2004-10-22 Paul Eggert <eggert@cs.ucla.edu>
4565
4566 * doc/bison.texinfo (Language and Grammar): In example, "int" is a
4567 keyword, not an identifier. Problem reported by Baron Schwartz in
4568 <http://lists.gnu.org/archive/html/bug-bison/2004-10/msg00017.html>.
4569
4570 2004-10-11 Akim Demaille <akim@epita.fr>
4571
4572 * src/symtab.c (symbol_check_alias_consistency): Also check
4573 type names, destructors, and printers.
4574 Reported by Alexandre Duret-Lutz.
4575 Recode the handling of associativity and precedence in terms
4576 of symbol_precedence_set.
4577 Accept no redeclaration at all, not even equal to the previous
4578 value.
4579 (redeclaration): New.
4580 Use it to factor redeclaration complaints.
4581 (symbol_make_alias): Don't set the type of the alias, let
4582 symbol_check_alias_consistency do it as for other features.
4583 * src/symtab.h (symbol): Add new member prec_location, and
4584 type_location.
4585 * src/symtab.c (symbol_precedence_set, symbol_type_set): Set them.
4586 * tests/input.at (Incompatible Aliases): New.
4587
4588 2004-10-09 Paul Eggert <eggert@cs.ucla.edu>
4589
4590 .cvsignore fixes to accommodate gnulib changes,
4591 and the practice of naming build directories "_build".
4592 * .cvsignore: Add "_*". Sort.
4593 * lib/.cvsignore: Add getopt_.h, xalloc-die.c.
4594 * m4/.cvsignore: Add "*_gl.m4".
4595
4596 2004-10-06 Akim Demaille <akim@epita.fr>
4597
4598 * src/parse-gram.y (add_param): Fix the truncation of trailing
4599 spaces.
4600
4601 2004-10-05 Akim Demaille <akim@epita.fr>
4602
4603 In Bison 1.875's yacc.c, YYLLOC_DEFAULT was called regardless
4604 whether the reducion was empty or not. This leaves room to
4605 improve the use of YYLLOC_DEFAULT in such a case.
4606 lalr1.cc is still experimental, so changing this is acceptable.
4607 And finally, there are probably not many users who changed the
4608 handling of locations in GLR, so changing is admissible too.
4609
4610 * data/glr.c, data/lalr1.cc, data/yacc.c (YYLLOC_DEFAULT): On an
4611 empty reduction, set @$ to an empty location ending the previously
4612 stacked symbol.
4613 Adjust uses to make sure the code is triggered on empty
4614 reductions.
4615 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust the
4616 expected output: empty reductions have empty locations.
4617
4618 2004-09-29 Akim Demaille <akim@epita.fr>
4619
4620 * data/lalr1.cc: Move towards a more standard C++ coding style
4621 for templates: Class < T > -> Class<T>.
4622
4623 2004-09-29 Akim Demaille <akim@epita.fr>
4624
4625 * data/lalr1.cc: Reinstall the former ctor, for sake of
4626 compatibility, but warn it will be removed.
4627 Move towards a more standard C++ coding style (i.e., type *var ->
4628 type* var).
4629
4630 2004-09-27 Paul Eggert <eggert@cs.ucla.edu>
4631
4632 * src/parse-gram.y (add_param): Rewrite to avoid strchr,
4633 since it's less likely to work if NULs are involved in the future.
4634
4635 2004-09-27 Akim Demaille <akim@epita.fr>
4636
4637 * data/yacc.c (YY_LOCATION_PRINT): Fix its default declaration.
4638
4639 2004-09-27 Akim Demaille <akim@epita.fr>
4640
4641 * data/lalr1.cc (b4_parse_param_decl_1): New.
4642 (b4_parse_param_decl): Use it to have different names between attribute
4643 and argument names.
4644 (b4_cc_constructor_call): Likewise.
4645
4646 2004-09-24 Akim Demaille <akim@epita.fr>
4647
4648 * src/parse-gram.y (add_param): Strip the leading and trailing
4649 blanks from a formal argument declaration.
4650 (YY_LOCATION_PRINT): New.
4651
4652 2004-09-24 Akim Demaille <akim@epita.fr>
4653
4654 * data/c.m4 (b4_yysymprint_generate): Move the YYINPUT invocation
4655 after the location.
4656
4657 2004-09-24 Akim Demaille <akim@epita.fr>
4658
4659 * doc/bison.texinfo (Table of Symbols): Sort.
4660
4661 2004-09-21 Akim Demaille <akim@epita.fr>
4662
4663 * data/yacc.c, data/glr.c (b4_at_dollar, b4_dollar_dollar): Remove
4664 the useless parentheses.
4665 Suggested by Paul Eggert.
4666
4667 2004-09-20 Akim Demaille <akim@epita.fr>
4668
4669 Let the initial-action act on the look-ahead, and use it for the
4670 "initial push" (corresponding to an hypothetical beginning-of-file).
4671 And let lalr1.cc honor %initial-action.
4672
4673 * doc/bison.texinfo (Initial Action Decl): Clarify, and add an
4674 example.
4675 * data/lalr1.cc (Parser::initlocation_): Remove, bad experiment.
4676 (Parser::Parser): Remove the ctor that used to initialize it.
4677 (Parser::parse): Like in the other skeletons, issue the "starting
4678 parse" message before any action.
4679 Honor %initial-action.
4680 Initialize the stacks with the lookahead.
4681 * data/yacc.c: Let $$ and @$ in %initial-action designate the
4682 look-ahead.
4683 Push them in the stacks.
4684 * tests/actions.at, tests/calc.at: Adjust the C++ ctor invocations.
4685
4686 2004-09-20 Akim Demaille <akim@epita.fr>
4687
4688 * doc/bison.texinfo (Initial Action Decl): New.
4689
4690 2004-09-20 Akim Demaille <akim@epita.fr>
4691
4692 * data/yacc.c (YY_LOCATION_PRINT): Use YYLTYPE_IS_TRIVIAL as a
4693 clearer criterion to define it.
4694 (parse): Initialize the initial location when YYLTYPE_IS_TRIVIAL.
4695 When reducing on an empty RHS, use the latest stacked location as
4696 location.
4697 yylloc is not always available.
4698 * data/glr.c: Likewise.
4699 Also, honor initial-actions.
4700
4701 2004-09-20 Akim Demaille <akim@epita.fr>
4702
4703 * data/yacc.c (YY_LOCATION_PRINT): New.
4704 Define when we know YYLTYPE's structure, i.e., when the default
4705 YYLLOC_DEFAULT is used.
4706 * data/c.m4 (b4_yysymprint_generate): Use it.
4707 * data/lalr1.cc (YYLLOC_DEFAULT): Stop relying on the initial
4708 value of the result.
4709 (error_start_): Replace with...
4710 (error_range_): this location array.
4711 This allows to replace code relying on the implementation of
4712 locations by portable code.
4713 * data/yacc.c (yylerrsp): Replace with...
4714 (yyerror_range): this.
4715 Every time a token is popped, update yyerror_range[0], to have an
4716 accurate location for the error token.
4717 * data/glr.c (YY_LOCATION_PRINT): New.
4718 (yyprocessOneStack): Fix an invocation of YY_SYMBOL_PRINT:
4719 deference a pointer.
4720 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): No longer
4721 report the location in %printers.
4722
4723 * src/scan-skel.l: Instead of abort, report error messages to ease
4724 understanding skeleton scanning failures.
4725
4726 2004-09-16 Akim Demaille <akim@epita.fr>
4727
4728 * data/lalr1.cc (Stack::Iterator, Stack::ConstIterator): Rename as...
4729 (iterator, const_iterator): these, to be more in the C++ spirit.
4730 Also, return reverse iterators so that when displaying the stack
4731 we display its bottom first.
4732 (Parser::stack_print_, Parser::reduce_print_): Match the messages
4733 from yacc.c.
4734 We should probably use vector here though.
4735
4736 2004-09-16 Akim Demaille <akim@epita.fr>
4737
4738 Have more complete shift traces.
4739
4740 * data/yacc.c, data/lalr1.c, data/glr.c: Use YY_SYMBOL_PRINT
4741 to report Shifts instead of ad hoc YYDPRINTF invocations,
4742 including for the error token.
4743 * data/lalr1.cc (symprint_): Output the location.
4744 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): In C++, don't
4745 output the location within the %printer.
4746 Activate GLR tests, at least to make sure they compile properly.
4747 They still don't pass though.
4748 * tests/calc.at: Adjust expect verbose output, since now "Entering
4749 state..." is on a different line than the "Shifting" message.
4750
4751 2004-09-08 Akim Demaille <akim@epita.fr>
4752
4753 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Move the
4754 Bison directive from the Bison file to the invocation of this
4755 macro, so that these directives are passed to
4756 AT_BISON_OPTION_PUSHDEFS to get correct help macros.
4757 Use these helping macros (e.g., AT_LOC, AT_VAL and so forth).
4758 Move the AT_SETUP/AT_CLEANUP outside, to report as test title
4759 the extra Bison directives instead of the whole series.
4760 Change the grammar so that there are recoverable errors, and
4761 unrecoverable errors. Now we can have the parser give up before
4762 consuming the whole input. As a result we now can observe that
4763 the lookahead is freed when needed.
4764 Change the parser source to parse argv[1] instead of a hard coded
4765 string.
4766 Simplify yylex, and give a value and location to EOF.
4767 Simplify some invocations of AT_CHECK_PRINTER_AND_DESTRUCTOR that
4768 passed directives already coded in the file.
4769 Add some tests to check the location of "error".
4770 For some tests, the C++ parser is correct, and not yacc.c.
4771 For other tests, they provide different, but unsatisfying, values,
4772 so keep the C++ value so that at least one parser is "correct"
4773 according to the test suite.
4774 (Actions after errors): Remove, this is subsumed by the
4775 AT_CHECK_PRINTER_AND_DESTRUCTOR series.
4776
4777 2004-09-06 Akim Demaille <akim@epita.fr>
4778
4779 * data/lalr1.cc: Adjust the indentation of the labels.
4780 (Parser::pop): New.
4781 Use it.
4782
4783 2004-09-06 Akim Demaille <akim@epita.fr>
4784
4785 * data/yacc.cc, data/glr.cc (yydestruct): Accept an additional
4786 argument, an informative message.
4787 Call YY_SYMBOL_PRINT.
4788 Adjust all callers: integrate the associated YY_SYMBOL_PRINT.
4789 * data/lalr1.cc (destruct_): Likewise.
4790 In addition, no longer depend on b4_yysymprint_generate and
4791 b4_yydestruct_generate to generate these functions, do it "by
4792 hand".
4793
4794 2004-09-03 Akim Demaille <akim@epita.fr>
4795
4796 * data/glr.c, data/lalr1.cc, data/yacc.c: When YYABORT was
4797 invoked, yydestruct the lookahead.
4798 * tests/calc.at (Calculator $1): Update the expected lengths of
4799 traces: there is an added line for the discarded lookahead.
4800 * doc/bison.texinfo (Destructor Decl): Some rewording.
4801 Define "discarded" symbols.
4802
4803 2004-09-02 Akim Demaille <akim@epita.fr>
4804
4805 * data/lalr1.cc (translate_, destruct_): No reason to be static.
4806
4807 2004-09-02 Akim Demaille <akim@epita.fr>
4808
4809 * data/glr.c, yacc.c (YYDSYMPRINT): Remove, not used.
4810 (YYDSYMPRINTF): Rename as...
4811 (YY_SYMBOL_PRINT): this.
4812 * data/lalr1.cc (YY_SYMBOL_PRINT): New, modeled after the previous
4813 two.
4814 Use it instead of direct symprint_ calls.
4815 (yybackup): Tweak the "Now at end of input" case to match yacc.c's
4816 one.
4817
4818 2004-09-02 Akim Demaille <akim@epita.fr>
4819
4820 * data/lalr1.cc (b4_yysymprint_generate): New.
4821 (symprint_): New member function, defined when YYDEBUG.
4822 Use it consistently instead of token/nterm debugging output by
4823 hand.
4824 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust
4825 %printer calls to use cdebug_ when using lalr1.cc.
4826
4827 2004-08-30 Florian Krohm <florian@edamail.fishkill.ibm.com>
4828
4829 * data/glr.c: Guard the declarations of yypstack and yypdumpstack
4830 with #ifdef YYDEBUG.
4831
4832 2004-08-26 Akim Demaille <akim@epita.fr>
4833
4834 * doc/bison.texinfo (Implementing Loops): Rename as...
4835 (Implementing Gotos/Loops): this.
4836
4837 2004-08-13 Paul Eggert <eggert@cs.ucla.edu>
4838
4839 Adjust to latest gnulib.
4840 * bootstrap (gnulib_modules): Add xalloc-die.
4841 Set LC_ALL=C so that file names sort consistently.
4842 Prefer the gnulib copies of gettext.m4, glibc21.m4,
4843 inttypes_h.m4, lib-ld.m4, lib-prefix.m4, po.m4, stdint_h.m4,
4844 uintmax_t.m4, ulonglong.m4.
4845 (intl_files_to_remove): Add gettext.m4, lib-ld.m4, lib-prefix.m4,
4846 po.m4 since we are now using _gl.m4 instead.
4847
4848 2004-08-10 Florian Krohm <florian@edamail.fishkill.ibm.com>
4849
4850 * src/scan-action.l: Remove. Scanning of semantic actions is
4851 handled in scan-gram.l.
4852
4853 2004-08-07 Florian Krohm <florian@edamail.fishkill.ibm.com>
4854
4855 * src/scan-gram.l (handle_syncline): Use uniqstr_new not xstrdup.
4856
4857 * src/location.h (struct): The file member is a uniqstr.
4858 (equal_boundaries): Use UNIQSTR_EQ for comparison.
4859
4860 2004-07-22 Paul Eggert <eggert@cs.ucla.edu>
4861
4862 Fix bug with non-%union parsers that have printers or destructors,
4863 which led to a Bison core dump. Reported by Peter Fales in
4864 <http://lists.gnu.org/archive/html/bug-bison/2004-07/msg00014.html>.
4865
4866 * data/c.m4 (b4_symbol_actions): Don't assume %union was used.
4867 * data/lalr1.cc (yystype) [defined YYSTYPE]: Define to YYSTYPE,
4868 not to our own type.
4869 * src/output.c (symbol_destructors_output, symbol_printers_output):
4870 Don't assume %union.
4871 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR,
4872 AT_CHECK_PRINTER_AND_DESTRUCTOR): New argument
4873 UNION-FLAG. All callers changed.
4874 (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Don't assume %union.
4875 Use type char, not unsigned int, when declaring an array of char;
4876 this lets us remove a cast.
4877 (Printers and Destructors): Add non-%union test cases.
4878
4879 2004-06-21 Paul Eggert <eggert@cs.ucla.edu>
4880
4881 * doc/bison.texinfo: Minor editorial changes, mostly to the new
4882 GLR writeups. E.g., avoid frenchspacing and the future tense,
4883 change "lookahead" to "look-ahead", and change "wrt" to "with
4884 respect to".
4885
4886 2004-06-21 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
4887
4888 * doc/bison.texinfo (Merging GLR Parses, Compiler Requirements):
4889 New sections, split off from the GLR Parsers section. Put the new
4890 Simple GLR Parser near the start of the GLR section, for clarity.
4891 Rewrite connective text.
4892
4893 2004-06-21 Frank Heckenbach <frank@g-n-u.de>
4894
4895 * doc/bison.texinfo (Simple GLR Parsers): New section.
4896
4897 2004-06-21 Paul Eggert <eggert@cs.ucla.edu>
4898
4899 * NEWS, TODO, doc/bison.texinfo:
4900 Use "look-ahead" instead of "lookahead", to be consistent.
4901 * REFERENCES: Fix incorrect reference to DeRemer and Pennello,
4902 while we're fixing "look-ahead".
4903 * src/conflicts.c (shift_set): Renamed from shiftset.
4904 (look_ahead_set): Renamed from lookaheadset.
4905 * src/print.c: Likewise.
4906 * src/getargs.c (report_args): Add "look-ahead" as the new canonical
4907 name for "lookahead".
4908 (report_types, usage): Likewise.
4909 * src/getargs.h (report_look_ahead_tokens): Renamed from
4910 report_lookaheads.
4911 * src/lalr.c (compute_look_ahead_tokens): Renamed from
4912 compute_lookaheads.
4913 (state_look_ahead_tokens_count): Renamed from state_lookaheads_count.
4914 (look_ahead_tokens_print): Renamed from lookaheads_print.
4915 * src/state.c (state_rule_look_ahead_tokens_print): Renamed from
4916 state_rule_lookaheads_print.
4917 * src/state.h: Likewise.
4918 (reductions.look_ahead_tokens): Renamed from lookaheads.
4919 * tests/torture.at (AT_DATA_LOOK_AHEAD_TOKENS_GRAMMAR): Renamed from
4920 AT_DATA_LOOKAHEADS_GRAMMAR.
4921
4922 2004-06-03 Paul Eggert <eggert@cs.ucla.edu>
4923
4924 * README: Update location of patched M4 distribution.
4925
4926 2004-05-30 Albert Chin-A-Young <china@thewrittenword.com>
4927
4928 Don't assume the C++ compiler takes the same arguments as the C compiler
4929 (trivial change).
4930 * configure.ac (O0CXXFLAGS): New var.
4931 * tests/atlocal.in (CXXFLAGS): Use it.
4932
4933 2004-05-29 Paul Eggert <eggert@cs.ucla.edu>
4934
4935 Fix some "make check" problems with C++ reported by
4936 Albert Chin-A-Young for Tru64 C++ in this thread:
4937 http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00049.html
4938
4939 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check for std::cerr.
4940 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
4941 Output to a .cc file for C++, not to a .c file.
4942 * tests/calc.at (AT_CHECK_CALC): Likewise.
4943 * tests/regression.at (AT_CHECK_DANCER): Likewise.
4944 * tests/local.at (AT_COMPILE_CXX): Default to OUTPUT.cc, not OUTPUT.c.
4945
4946 2004-05-28 Albert Chin-A-Young <china@thewrittenword.com>
4947
4948 * tests/calc.at, tests/actions.at: Workaround for SGI
4949 C++ compiler. (trivial change)
4950
4951 2004-05-27 Paul Eggert <eggert@cs.ucla.edu>
4952
4953 Spent a few hours checking out which prerequisite versions the
4954 current sources actually require. I went all the way back to
4955 Gettext 0.10.40, Automake 1.4, and Autoconf 2.57 and investigated
4956 a seemingly endless set of combinations of versions more recent
4957 than that. The bottom line is that the current sources require
4958 fairly recent versions of the build tools, and it'll be some work
4959 to change this.
4960 * configure.ac (AC_PREREQ): Increase from 2.58 to 2.59.
4961 (AM_INIT_AUTOMAKE): Increase from 1.7 to 1.8.
4962 (AM_GNU_GETTEXT_VERSION): Increase from 0.11.5 to 0.12.
4963 Add comments explaining why those particular versions are
4964 currently needed.
4965
4966 * src/parse-gram.y (lloc_default): Rewrite to avoid compiler bug
4967 in SGI MIPSpro 7.4.1m. Problem reported by Albert Chin-A-Young in
4968 <http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00037.html>.
4969
4970 * configure.ac (AC_PREREQ): Bump to 2.58, since 2.57 doesn't work
4971 (it fails with a Autoconf-without-aclocal-m4 diagnostic).
4972
4973 2004-05-26 Paul Eggert <eggert@cs.ucla.edu>
4974
4975 * configure.ac (AM_GNU_GETTEXT_VERSION): Lower it from 0.14.1 to
4976 0.11.5. Suggested by Bruno Haible.
4977 * bootstrap: Remove gettext version checking.
4978
4979 * doc/bison.texinfo (Decl Summary): Also mention that %union
4980 can depend on prerequisite types. Problem reported by Tim
4981 Van Holder.
4982
4983 2004-05-25 Paul Eggert <eggert@cs.ucla.edu>
4984
4985 * README: Mention GNU m4 1.4 bugs and Akim's patched version.
4986 * README-alpha: Don't tell people not to package this.
4987
4988 * bootstrap: Don't assume $(...) works; use `...` instead.
4989 Problem reported by Paul Hilfinger. Also, diagnose non-GNU
4990 gettext better.
4991
4992 * doc/bison.texinfo (Decl Summary, Bison Options): Clarify what's
4993 put into the -d output file, and mention what to do if YYSTYPE is
4994 defined as a macro.
4995
4996 2004-05-24 Paul Eggert <eggert@cs.ucla.edu>
4997
4998 Undo change made earlier today: it caused autopoint to not bring
4999 in ABOUT-NLS. Ouch. Instead, substitute our own diagnostic for
5000 autopoint's.
5001
5002 * bootstrap: Check that gettext version matches what's in
5003 configure.ac. Warn users to ignore robots.txt ERROR 404.
5004 * bootstrap: Undo today's earlier change (logged below).
5005 * configure.ac (AM_GNU_GETTEXT_VERSION): Likewise.
5006
5007 The gettext version checking is causing more trouble than it's
5008 curing; remove it. Problem reported by Paul Hilfinger.
5009
5010 * bootstrap: Issue a warning that one can expect a message
5011 'AM_GNU_GETTEXT is used, but not AM_GNU_GETTEXT_VERSION'.
5012 * configure.ac (AM_GNU_GETTEXT_VERSION): Remove.
5013
5014 2004-05-23 Paul Eggert <eggert@cs.ucla.edu>
5015
5016 Ensure that the C++ compiler used for testing actually works on a
5017 simple test program; if not, skip the C++-related tests. Problem
5018 reported by Vin Shelton in:
5019 http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00026.html
5020
5021 * m4/cxx.m4: New file.
5022 * configure.ac (BISON_TEST_FOR_WORKING_CXX_COMPILER): Add.
5023 * tests/atlocal.in (BISON_CXX_WORKS): Add.
5024 * tests/local.at (AT_COMPILE_CXX): Use it.
5025
5026 2004-05-21 Paul Eggert <eggert@cs.ucla.edu>
5027
5028 * data/glr.c (yylloc): Output this macro even if locations are not
5029 being generated, as the GLR parser needs it even in that case.
5030 Problem reported by Troy A. Johnson
5031 <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=195946>.
5032
5033 * configure.ac (AC_INIT): Update to 1.875e.
5034
5035 2004-05-21 Paul Eggert <eggert@cs.ucla.edu>
5036
5037 * NEWS: Version 1.875d.
5038 * configure.ac (AC_INIT): Likewise.
5039 * src/parse-gram.c, src/parse-gram.h: Regenerate with 1.875d.
5040
5041 * configure.ac (--enable-gcc-warnings): Do not enable -Wshadow,
5042 -Wmissing-prototypes, or -Wstrict-prototypes for C++. The current
5043 lalr1.cc runs afoul of the first, and the last two are no longer
5044 supported by GCC 3.4.0.
5045 * README: Mention GNU m4 1.4 or later; mention m4 patches.
5046 * HACKING: Use ./bootstrap, not "make update" to import foreign files.
5047
5048 2004-05-06 Paul Eggert <eggert@cs.ucla.edu>
5049
5050 * src/muscle_tab.c (hash_muscle): Accept and return size_t, not
5051 unsigned int, for compatibility with latest gnulib hash module.
5052 * src/state.c (state_hash, state_hasher): Likewise.
5053 * src/symtab.c (hash_symbol, hash_symbol_hasher): Likewise.
5054 * src/uniqstr.c (hash_uniqstr): Likewise.
5055
5056 2004-05-03 Paul Eggert <eggert@cs.ucla.edu>
5057
5058 * NEWS: Unescaped newlines are no longer allowed in char & strings.
5059
5060 * src/scan-gram.l (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER,
5061 SC_CHARACTER,SC_STRING>): Reject unescaped newlines in
5062 character and string literals.
5063 (unexpected_end): New function.
5064 (unexpected_eof): Use it.
5065 (unexpected_newline): New function.
5066 (<INITIAL,SC_AFTER_IDENTIFIER,SC_PRE_CODE>): Coalesce duplicate
5067 actions.
5068
5069 * NEWS: Document %expect-rr.
5070
5071 * bootstrap (--gnulib-srcdir=*, --cvs-user=*):
5072 Fix typo by replacing $1 with $option.
5073 Remove more 'intl'-related files.
5074 Don't DEFUN AM_INTL_SUBDIR twice.
5075
5076 * lib/.cvsignore: Add strndup.h. Remove memchr.c, memcmp.c,
5077 memrchr.c, strcasecmp.c, strchr.c, strrchr.c, strspn.c, strtol.c,
5078 strtoul.c.
5079 * m4/.cvsignore: Add exitfail.m4, extensions.m4, gnulib.m4,
5080 hard-locale.m4, mbstate_t.m4, strerror_r.m4, strndup.m4,
5081 xstrndup.m4. Remove glibc21.m4, intdiv0.m4, inttypes-pri.m4,
5082 inttypes.m4, inttypes_h.m4, isc-posix.m4, lcmessage.m4,
5083 stdint_h.m4, uintmax_t.m4, ulonglong.m4.
5084 * src/.cvsignore: Add *.output.
5085
5086 * src/parse-gram.y: Put copyright notice inside %{ %} so it
5087 gets copied to the output file.
5088
5089 2004-04-28 Paul Eggert <eggert@twinsun.com>
5090
5091 Get files from the gnulib and po repositories, instead of relying
5092 on them being in our CVS. Upgrade to latest versions of gnulib
5093 and Automake.
5094
5095 * Makefile.am (SUBDIRS): Remove m4; Automake now does m4.
5096 * bootstrap: Bootstrap from gnulib and po repositories.
5097 Much of this code was stolen from GNU diff and GNU tar's bootstrap.
5098 * README-cvs: Document these changes. Remove version numbers from
5099 mentions of build tools, since they change so often. Mention Flex.
5100
5101 * configure.ac (AC_CONFIG_MACRO_DIR): Add, with m4 as arg.
5102 (gl_USE_SYSTEM_EXTENSIONS): Add.
5103 (AC_GNU_SOURCE, AC_AIX, AC_MINIX):
5104 Remove; no longer needed, as gl_USE_SYSTEM_EXTENSIONS
5105 does this for us.
5106 (AC_ISC_POSIX): Remove; we no longer support this
5107 ancient OS, as it gets in the way of latest Autoconf & gnulib.
5108 (AC_HEADER_STDC): Remove: we now assume C89 or better.
5109 (AC_CHECK_HEADERS_ONCE): Use instead of AC_CHECK_HEADERS.
5110 Do not check for C89 headers, except for locale.h which is used
5111 by the Yacc library and must port to K&R hosts.
5112 (AC_CHECK_FUNCS_ONCE): Use instead of AC_CHECK_FUNCS.
5113 Do not check for C89 functions, except for setlocale which is
5114 used by the Yacc library.
5115 (AC_CHECK_DECLS, AC_REPLACE_FUNCS): Remove; no longer needed.
5116 (gl_DIRNAME, gl_ERROR, gl_FUNC_ALLOCA, gl_FUNC_MEMCHR,
5117 gl_FUNC_MEMRCHR, gl_FUNC_STPCPY, gl_FUNC_STRNLEN, gl_FUNC_STRTOL,
5118 gl_GETOPT, gl_HASH, gl_MBSWIDTH, gl_OBSTACK, gl_QUOTE,
5119 gl_QUOTEARG, gl_XALLOC, jm_FUNC_GLIBC_UNLOCKED_IO, jm_FUNC_MALLOC,
5120 AM_GNU_GETTEXT): Remove; now done by:
5121 (GNULIB_AUTOCONF_SNIPPET): Add. "bootstrap" builds this for us.
5122 (AC_CONFIG_FILES): Remove m4/Makefile, as Automake now does this
5123 for us.
5124
5125 * lib/Makefile.am: Include gnulib.mk, built for us by "bootstrap".
5126 (BUILT_SOURCES, EXTRA_DIST, MOSTLYCLEANFILES):
5127 Define to empty, as gnulib.mk will do the rest for us.
5128 ($(libbison_a_OBJECTS), stdbool.h): Remove, as gnulib.mk does this
5129 for us.
5130 (libbison_a_SOURCES): Define to $(lib_SOURCES) now.
5131 (lib_SOURCES): New symbol, containing only the non-gnulib libs.
5132
5133 * src/files.c: Include gnulib's xstrndup.h.
5134
5135 * src/system.h (MALLOC): Use xnmalloc, for better overflow checking.
5136 (REALLOC): Use xnrealloc, for likewise.
5137 (xstrndup, stpcpy): Remove decls, as gnulib does this for us now.
5138 (strnlen, memrchr): Remove decls; functions no longer used.
5139 Include <stpcpy.h>.
5140
5141 * config/depcomp, config/install-sh, lib/alloca.c, lib/argmatch.c,
5142 lib/argmatch.h, lib/basename.c, lib/dirname.c, lib/dirname.h,
5143 lib/error.c, lib/error.h, lib/getopt.c, lib/getopt.h,
5144 lib/getopt1.c, lib/gettext.h, lib/hash.c, lib/hash.h,
5145 lib/malloc.c, lib/mbswidth.c, lib/mbswidth.h, lib/memchr.c,
5146 lib/memcmp.c, lib/memrchr.c, lib/obstack.c, lib/obstack.h,
5147 lib/quote.c, lib/quote.h, lib/quotearg.c, lib/quotearg.h,
5148 lib/realloc.c, lib/stdbool_.h, lib/stpcpy.c, lib/strcasecmp.c,
5149 lib/strchr.c, lib/strncasecmp.c, lib/strnlen.c, lib/strrchr.c,
5150 lib/strspn.c, lib/strtol.c, lib/strtoul.c, lib/unlocked-io.h,
5151 lib/xalloc.h, lib/xmalloc.c, lib/xstrdup.c, lib/xstrndup.c,
5152 m4/Makefile.am, m4/alloca.m4, m4/dirname.m4, m4/dos.m4,
5153 m4/error.m4, m4/getopt.m4, m4/hash.m4, m4/malloc.m4,
5154 m4/mbrtowc.m4, m4/mbswidth.m4, m4/memchr.m4, m4/memcmp.m4,
5155 m4/memrchr.m4, m4/obstack.m4, m4/onceonly.m4, m4/prereq.m4,
5156 m4/quote.m4, m4/quotearg.m4, m4/realloc.m4, m4/stdbool.m4,
5157 m4/stpcpy.m4, m4/strnlen.m4, m4/strtol.m4, m4/strtoul.m4,
5158 m4/unlocked-io.m4, m4/xalloc.m4, po/LINGUAS, po/Makefile.in.in,
5159 po/Makevars, po/da.po, po/de.po, po/es.po, po/et.po, po/fr.po,
5160 po/hr.po, po/id.po, po/it.po, po/ja.po, po/ms.po, po/nl.po,
5161 po/pt_BR.po, po/ro.po, po/ru.po, po/sv.po, po/tr.po:
5162 Remove, as these files are now generated automatically
5163 by bootstrap or automake.
5164
5165 * po/ChangeLog: Remove: all but one entry was a duplicate
5166 of this file, and I moved that 2000-11-02 entry here.
5167
5168 * config/.cvsignore: Add Makefile, depcomp, install-sh.
5169 * lib/.cvsignore: Add alloca.c, alloca.h, alloca_.h, argmatch.c,
5170 argmatch.h, basename.c, dirname.c, dirname.h, error.c, error.h,
5171 exit.h, exitfail.c, exitfail.h, getopt.c, getopt.h, getopt1.c,
5172 getopt_int.h, gettext.h, gnulib.mk, hard-locale.c, hard-locale.h,
5173 hash.c, hash.h, malloc.c, mbswidth.c, mbswidth.h, memchr.c,
5174 memcmp.c, memrchr.c, obstack.c, obstack.h, quote.c, quote.h,
5175 quotearg.c, quotearg.h, realloc.c, stdbool_.h, stpcpy.c, stpcpy.h,
5176 strcasecmp.c, strchr.c, stripslash.c, strncasecmp.c, strndup.c,
5177 strnlen.c, strrchr.c, strspn.c, strtol.c, strtoul.c,
5178 unlocked-io.h, xalloc.h, xmalloc.c, xstrdup.c, xstrndup.c,
5179 xstrndup.h.
5180 * m4/.cvsignore: Remove Makefile, Makefile.in. Add alloca.m4,
5181 dirname.m4, dos.m4, error.m4, getopt.m4, hash.m4, mbrtowc.m4,
5182 mbswidth.m4, obstack.m4, onceonly.m4, quote.m4, quotearg.m4,
5183 stdbool.m4, stpcpy.m4, strnlen.m4, unlocked-io.m4, xalloc.m4.
5184 * po/.cvsignore: Add *.po, LINGUAS, Makefile.in.in, Makevars.
5185 * src/.cvsignore: Remove *_.c.
5186
5187
5188 * Makefile.maint (GZIP_ENV): Don't use --rsyncable if gzip doesn't
5189 support it. (The latest stable gzip doesn't.)
5190
5191 2004-04-27 Paul Eggert <eggert@twinsun.com>
5192
5193 * data/lalr1.cc (Parser::stos_) [! YYDEBUG]: Define even in this
5194 case, as stos_ is now used by destructors due to the 2004-02-09
5195 change.
5196
5197 Remove more K&R C support.
5198 * lib/libiberty.y (PARAMS): Remove. All uses removed.
5199 * lib/subpipe.c (errno): Remove decl.
5200 Include <stdlib.h> unconditionally.
5201 (EXIT_FAILURE): Remove macro.
5202 * src/complain.c (vfprintf, strerror): Remove.
5203 * src/system.h: Include limits.h, stdlib.h, string.h, locale.h
5204 unconditionally.
5205 (EXIT_FAILURE, EXIT_SUCCESS, setlocale): Remove defns.
5206 Use latest Autoconf recommendations for including inttypes.h, stdint.h.
5207 (strchr, strspn, memchr): Remove decls.
5208 * tests/calc.at (_AT_DATA_CALC_Y): Include stdlib.h, string.h
5209 unconditionally. Do not declare perror.
5210 * tests/conflicts.at (%nonassoc and eof): Include stdlib.h
5211 unconditionally.
5212
5213 * src/complain.c (_): Remove useless defn, as system.h defines this.
5214
5215 * lib/bitset.h (__INT_TO_PTR): Remove; workaround no longer needed
5216 with latest obstack.h.
5217 * lib/ebitset.c (ebitset_elt_alloc): Don't bother to cast args
5218 to procedure types, as obstack.h now does that for us.
5219 * lib/lbitset.c (lbitset_elt_alloc): Likewise.
5220
5221 * lib/subpipe.h [HAVE_SYS_TYPES_H]: Include <sys/types.h>,
5222 so that this include file can stand alone.
5223 * lib/subpipe.c: Do not include <sys/types.h>, as subpipe.h
5224 does this now. Include subpipe.h first after config.h, to
5225 test whether it can stand alone.
5226
5227 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Don't
5228 declare yyerror when using lalr.cc, as GCC 3.4.0 warns about the
5229 unused declaration.
5230
5231 * tests/synclines.at (%union synch line): Put a dummy member in
5232 the union, because empty unions aren't allowed in C. Caught
5233 by GCC 3.4.0.
5234
5235 2004-04-13 Jim Meyering <jim@meyering.net>
5236
5237 * src/conflicts.c (conflicts_print): Correct format string typo:
5238 use `%%' to produce literal `%'. (trivial change)
5239
5240 2004-03-30 Paul Eggert <eggert@twinsun.com>
5241
5242 * src/getargs.c (version): Update copyright year to 2004.
5243
5244 * data/c.m4 (b4_int_type): Use 'short int' rather than
5245 'short', and similarly for 'long', 'unsigned', etc.
5246 * data/glr.c (YYTRANSLATE, yyconfl, yySymbol, yyItemNum,
5247 yygetLRActions, yyprocessOneStack, yyrecoverSyntaxError,
5248 yy_yypstack, yydumpstack): Likewise.
5249 * data/lalr1.cc (user_token_number_max_, user_token_number_max_,
5250 translate_, seq_, [], pop, Slice, range_, operator+, operator+=):
5251 Likewise.
5252 * data/yacc.c (b4_int_type, yyss, YYSTACK_BYTES, yysigned_char,
5253 yy_stack_print, yyparse): Likewise.
5254 * doc/bison.texinfo (Prologue, Multiple Types): Likewise.
5255 * lib/bbitset.h (bitset_word, BITSET_WORD_BITS): Likewise.
5256 * lib/bitset.c (bitset_print): Likewise.
5257 * lib/bitset_stats.c (bitste_log_histogram_print): Likewise.
5258 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
5259 * lib/bitsetv.c (bitsetv_dump): Likewise.
5260 * lib/ebitset.c (EBITSET_ELT_BITS, ebitset_elt_alloc): Likewise.
5261 * lib/lbitset.c (LBITSET_ELT_BITS, lbitset_elt_alloc, debug_lbitset):
5262 Likewise.
5263 * src/LR0.c (allocate_itemsets): Likewise.
5264 * src/gram.h (rule_number, rule): Likewise.
5265 * src/lalr.h (goto_number): Likewise.
5266 * src/nullable.c (nullable_compute): Likewise.
5267 * src/output.c (prepare_rules): Likewise.
5268 * src/relation.c (relation_print, relation_digraph): Likewise.
5269 * src/relation.h (relation_node): Likewise.
5270 * src/state.h (state_number, transitions, errs, reductions,
5271 struct state): Likewise.
5272 * src/symtab.h (symbol_number, struct symbol): Likewise.
5273 * src/tables.c (vector_number, tally, action_number,
5274 default_goto, goto_actions): Likewise.
5275 * tests/existing.at (GNU Cim Grammar): Likewise.
5276 * tests/regression.at (Web2c Actions): Likewise.
5277
5278 * src/output.c (muscle_insert_short_int_table): Renamed from
5279 muscle_insert_short_table. All uses changed.
5280
5281 2004-03-25 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
5282
5283 * src/parse-gram.y: Define PERCENT_EXPECT_RR.
5284 (declaration): Replace expected_conflicts with expected_sr_conflicts.
5285 Add %expect-rr rule.
5286
5287 * src/scan-gram.l: Recognize %expect-rr.
5288
5289 * src/conflicts.h (expected_sr_conflicts): Rename from
5290 expected_conflicts.
5291 (expected_rr_conflicts): Declare.
5292
5293 * src/conflicts.c (expected_sr_conflicts): Rename from
5294 expected_conflicts.
5295 (expected_rr_conflicts): Define.
5296 (conflicts_print): Check r/r conflicts against expected_rr_conflicts
5297 for GLR parsers.
5298 Use expected_sr_conflicts in place of expected_conflicts.
5299 Warn if expected_rr_conflicts used in non-GLR parser.
5300
5301 * doc/bison.texinfo: Add documentation for %expect-rr.
5302
5303 2004-03-08 Paul Eggert <eggert@gnu.org>
5304
5305 Add support for hex token numbers. Suggested by Odd Arild Olsen in
5306 <http://lists.gnu.org/archive/html/bison-patches/2004-03/msg00000.html>.
5307
5308 * NEWS: Document hexadecimal tokens, no NUL bytes, %destructor
5309 in lalr1.cc.
5310 * doc/bison.texinfo (Token Decl): Add hexadecimal token numbers.
5311 * src/scan-gram.l (scan_integer): New function.
5312 ({int}): Use it.
5313 (0[xX][0-9abcdefABCDEF]+): New pattern, to support hex numbers.
5314 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>, \\x[0-9abcdefABCDEF]+,
5315 handle_action_dollar, handle_action_at, convert_ucn_to_byte):
5316 Say "long int", not "long", for uniformity with GNU style.
5317
5318 2004-02-25 Paul Eggert <eggert@twinsun.com>
5319
5320 * tests/local.at (AT_COMPILE, AT_COMPILE_CXX): Ignore stdout from
5321 compilers. This fixes a problem with Intel's C++ compiler being
5322 chatty, reported by Guido Trentalancia in
5323 <http://lists.gnu.org/archive/html/bug-bison/2004-02/msg00030.html>.
5324
5325 2004-02-09 Alexandre Duret-Lutz <adl@gnu.org>
5326
5327 Support %destructor and merge error locations in lalr1.cc.
5328
5329 * data/lalr1.cc (b4_cxx_destruct_def): New macro.
5330 (Parser::stos_): Define unconditionally.
5331 (Parser::destruct_): New method. Generate its body with
5332 b4_yydestruct_generate.
5333 (Parser::error_start_): New attribute.
5334 (Parser::parse) <yyerrlab, yyerrlab1>: Call destruct_ on erroneous
5335 token which are discarded.
5336 (Parser::parse) <yyerrlab, yyerrorlab, yyerrlab1>: Update
5337 error_start_ when erroneous token are discarded.
5338 (Parser::parse) <yyerrlab1>: Compute the location of the error
5339 token so that it covers all the discarded tokens.
5340 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust so
5341 it can be called with `%skeleton "lalr1.cc"', and do that.
5342
5343 2004-02-02 Paul Eggert <eggert@twinsun.com>
5344
5345 * src/Makefile.am (AM_CPPFLAGS): New macro. It mentions
5346 $(top_srcdir)/lib and ../lib. This fixes a bug reported
5347 by Paul Hilfinger; the old INCLUDES value didn't mention ../lib.
5348 There's no need to mention top_builddir since Automake does that
5349 for us.
5350 (INCLUDES): Remove, as Automake says it's obsolescent.
5351 Contents migrated into AM_CPPFLAGS as described above.
5352 * lib/Makefile.am (INCLUDES): Remove; obsolescent.
5353
5354 2004-01-14 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
5355
5356 * data/glr.c (yytokenName): Bullet-proof against YYEMPTY token.
5357 (yyreportSyntaxError): Handle case where lookahead token is
5358 YYEMPTY.
5359
5360 2004-01-13 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
5361
5362 * data/glr.c: Put casts on uses of YYREALLOC and YYMALLOC so that
5363 resulting parsers are compilable with C++.
5364
5365 2003-12-23 Paul Eggert <eggert@twinsun.com>
5366
5367 * config/depcomp, config/install-sh: Sync with Automake 1.8.
5368 * src/output.c (output_skeleton): Rename local var.
5369 * tests/input.at (Torturing the Scanner): Don't use \x0 or \0 in
5370 Bison tokens, as this runs afoul of the 2003-10-07 change that
5371 disallowed NUL bytes in character constants or string literals.
5372
5373 * tests/local.at: Require Autoconf 2.59's Autotest.
5374 * tests/testsuite.at: Don't include local.at, since we now assume
5375 Autoconf 2.59 or later. Autoconf 2.59 had some problems with
5376 including it.
5377 * tests/Makefile.am ($(TESTSUITE)): Remove warning about ignoring
5378 multiple inclusion warnings.
5379
5380 2003-12-02 Akim Demaille <akim@epita.fr>
5381
5382 * doc/bison.texinfo (How Can I Reset the Parser): More about start
5383 conditions.
5384 From Bruno Haible.
5385
5386 2003-11-18 Alexandre Duret-Lutz <adl@gnu.org>
5387
5388 * doc/bison.texinfo (Bison Options): Escape `@' in `$@'.
5389
5390 2003-10-07 Paul Eggert <eggert@twinsun.com>
5391
5392 * tests/Makefile.am (clean-local): Don't run 'testsuite --clean'
5393 if testsuite doesn't exist.
5394
5395 * doc/bison.texinfo (Symbols): NUL bytes are not allowed in string
5396 literals, unfortunately.
5397 * src/scan-gram.l (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>):
5398 Complain about NUL bytes in character constants or string literals.
5399
5400 2003-10-05 Paul Eggert <eggert@twinsun.com>
5401
5402 * NEWS: Don't document %no-default-prec, as it's still
5403 too experimental.
5404 * doc/bison.texinfo: Document %no-default-prec only if
5405 the defaultprec flag is set. Normally it's not.
5406
5407 2003-10-04 Paul Eggert <eggert@twinsun.com>
5408
5409 * data/glr.c (b4_rhs_value, b4_rhs_location): Yield a
5410 non-modifiable lvalue, instead of a modifiable one.
5411 * doc/bison.texinfo (Actions): Document that $$ can
5412 be assigned to. Do not claim that $$ and $N are
5413 array element references: user code should not rely on this.
5414
5415 2003-10-01 Paul Eggert <eggert@twinsun.com>
5416
5417 * src/parse-gram.h (PERCENT_NO_DEFAULT_PREC): New token.
5418 (grammar_declaration): Use it.
5419 * src/scan-gram.l: New token %no-default-prec.
5420 * tests/conflicts.at: Revamp tests to use %no-default-prec.
5421 * NEWS, doc/bison.texinfo: Document the above.
5422
5423 2003-10-01 Akim Demaille <akim@epita.fr>
5424
5425 VCG no longer supports long_straight_phase.
5426
5427 * src/vcg.c, src/vcg.h: Remove the handling of long_straight_phase.
5428 * src/print_graph.c (print_graph): Adjust.
5429
5430 2003-09-30 Frank Heckenbach <frank@g-n-u.de>
5431 and Paul Eggert <eggert@twinsun.com>
5432
5433 * doc/bison.texinfo (Decl Summary, Contextual Precedence,
5434 Table of Symbols): Document %default-prec.
5435 * src/parse-gram.y (PERCENT_DEFAULT_PREC): New token.
5436 (grammar_declaration): Set default_prec on %default-prec.
5437 * src/scan-gram.l (%default-prec): New token.
5438 * src/reader.h (default_prec): New flag.
5439 * src/reader.c: Likewise.
5440 (packgram): Handle it.
5441 * tests/conflicts.at (%default-prec without %prec,
5442 %default-prec with %prec, %default-prec 1): New tests.
5443
5444 2003-09-30 Paul Eggert <eggert@twinsun.com>
5445
5446 * tests/testsuite.at: Include local.at, not input.at, fixing
5447 a typo in the 2003-08-25 patch.
5448
5449 2003-08-27 Akim Demaille <akim@epita.fr>
5450
5451 * data/lalr1.cc (yyparse) [__GNUC__]: "Use" yyerrorlab to pacify
5452 GCC warnings.
5453
5454 2003-08-26 Akim Demaille <akim@epita.fr>
5455
5456 * config/announce-gen (print_changelog_deltas): Neutralize "<#" as
5457 "<\#" to avoid magic from Gnus when posting parts of this script.
5458
5459 2003-08-26 Akim Demaille <akim@epita.fr>
5460
5461 * data/lalr1.cc (Parser::report_syntax_error_): New, extracted from
5462 (Parser::parse): here.
5463 Adjust: nerrs and errstatus is now replaced by...
5464 (Parser::nerrs_, Parser::errstatus_): New.
5465
5466 2003-08-25 Akim Demaille <akim@epita.fr>
5467
5468 * config/announce-gen, Makefile.cfg: New.
5469 * Makefile.am: Adjust.
5470 * GNUmakefile, Makefile.maint: Update from CVS Autoconf, but
5471 keeping local WGET and WGETFLAGS modifications from Paul Eggert.
5472
5473 2003-08-25 Akim Demaille <akim@epita.fr>
5474
5475 When reducing initial empty rules, Bison parser read an initial
5476 location that is not defined. This results in garbage, and that
5477 affects Bison's own parser. Therefore we need (i) to extend Bison
5478 to support a means to initialize this location, and (ii) to use
5479 this CVS Bison to fix CVS Bison's parser.
5480
5481 * src/reader.h, reader.c (epilogue_augment): Remove, replace
5482 with...
5483 * src/muscle_tab.h, src/muscle_tab.c (muscle_code_grow): this.
5484 * src/parse-gram.y: Adjust.
5485 (%initial-action): New.
5486 (%error-verbose): Since we require CVS Bison, there is no reason
5487 not to use it.
5488 * src/scan-gram.l: Adjust.
5489 * src/Makefile.am (YACC): New, to make sure we use our own parser.
5490 * data/yacc.c (yyparse): Use b4_initial_action.
5491
5492 2003-08-25 Akim Demaille <akim@epita.fr>
5493
5494 * doc/bison.texinfo: Don't promote stdout for error messages.
5495
5496 2003-08-25 Akim Demaille <akim@epita.fr>
5497
5498 * data/lalr1.cc (Parser::reduce_print_): Remove unused yyi.
5499 From Alexandre Duret-Lutz.
5500
5501 2003-08-25 Akim Demaille <akim@epita.fr>
5502
5503 Version 1.875c.
5504
5505 2003-08-25 Akim Demaille <akim@epita.fr>
5506
5507 * data/lalr1.cc (Parser::stack_print_, YY_STACK_PRINT): New.
5508 Use them.
5509
5510 2003-08-25 Akim Demaille <akim@epita.fr>
5511
5512 * data/lalr1.cc (Parser::reduce_print_): New.
5513 Use it.
5514
5515 2003-08-25 Akim Demaille <akim@epita.fr>
5516
5517 Have lalr1.cc catch with Paul Eggert's patch to fix the infinite
5518 error recovery loops. This patch is based on
5519 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00000.html>.
5520 Also, augment the similarity between lalr1.cc and yacc.c.
5521 Note: the locations of error recovery rules are not correct yet.
5522
5523 * data/lalr1.cc: Comment changes to augment the similarity between
5524 lalr1.cc and yacc.c.
5525 (YYERROR): Goto to yyerrorlab, not yyerrlab1.
5526 (yyerrlab1): Remove, but where it used to be (now the bottom part of
5527 yyerrlab), when hitting EOF, pop the whole stack here instead of
5528 merely falling thru the default error handling mechanism.
5529 (yyerrorlab): New label, with the old contents of YYERROR,
5530 plus the following change: pop the stack of rhs corresponding
5531 to the production that invoked YYERROR. That is how Yacc
5532 behaves (required by POSIX).
5533 * tests/calc.at (AT_CHECK_CALC_LALR1_CC): No longer expected to
5534 fail.
5535
5536 2003-08-25 Akim Demaille <akim@epita.fr>
5537
5538 Tune local.at so that people can "autom4te -l autotest calc.at -o
5539 calc" for instance, to extract a sub test suite.
5540
5541 * tests/testsuite.at: Move the initialization, Autotest version
5542 requirement, and AT_TESTED invocation into...
5543 * tests/local.at: here.
5544 * tests/testsuite.at: Include it for compatibility with Autoconf
5545 2.57.
5546 * tests/Makefile.am ($(TESTSUITE)): Report that the warning should
5547 be ignore.
5548
5549 2003-08-04 Paul Eggert <eggert@twinsun.com>
5550
5551 Rework code slightly to avoid gcc -Wtraditional warnings.
5552 * data/glr.c (yyuserMerge): Return void, not YYSTYPE.
5553 The returned value is now stored in *YY0. All callers changed.
5554 * src/output.c (merge_output): Adjust to the above change.
5555
5556 2003-07-26 Paul Eggert <eggert@twinsun.com>
5557
5558 * data/glr.c (YYASSERT): New macro.
5559 (yyfillin, yydoAction, yyglrReduce, yysplitStack,
5560 yyresolveStates, yyprocessOneStack):
5561 Use `YYASSERT (FOO);' rather than `if (! (FOO)) abort ();'.
5562 Derived from a suggestion by Frank Heckenbach.
5563
5564 2003-07-25 Paul Eggert <eggert@twinsun.com>
5565
5566 * data/glr.c (yyglrReduce): Don't use C89 string concatenation,
5567 for portability to K&R C (after ansi2knr, presumably). See
5568 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00041.html>
5569 by Frank Heckenbach, though I have omitted the structure-initialization
5570 part of his glr-knr.diff patch since I recall that the Portable
5571 C Compiler didn't require that change.
5572
5573 Let the user specify how to allocate and free memory.
5574 Derived from a suggestion by Frank Heckenbach in
5575 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00041.html>.
5576 * data/glr.c (YYFREE, YYMALLOC, YYREALLOC): New macros.
5577 All uses of free, malloc, realloc changed to use these macros,
5578 and unnecessary casts removed.
5579 * data/yacc.c (YYFREE, YYMALLOC): Likewise.
5580
5581 2003-07-06 Matthias Mann <MatthiasMann@gmx.de>
5582
5583 * data/lalr1.cc (operator<<(std::ostream&, const Position&)):
5584 use s.empty() rather than s == "" to test for empty string; see
5585 <http://lists.gnu.org/archive/html/bison-patches/2003-07/msg00003.html>
5586 (trivial change)
5587
5588 2003-06-25 Akim Demaille <akim@epita.fr>
5589
5590 * config/depcomp, config/install-sh: Update from masters.
5591
5592 2003-06-20 Paul Eggert <eggert@twinsun.com>
5593
5594 * data/glr.c (YYLLOC_DEFAULT): Parenthesize arguments as needed,
5595 and return properly parenthesized result.
5596 * data/lalar1.cc (YYLLOC_DEFAULT): Likewise.
5597 * data/yacc.c (YYLLOC_DEFAULT): Likewise.
5598 Remove unnecessary parentheses from uses.
5599 * doc/bison.texinfo (Location Default Action): Describe the
5600 conventions for parentheses.
5601
5602 2003-06-19 Paul Eggert <eggert@twinsun.com>
5603
5604 * data/glr.c (yyremoveDeletes, yy_reduce_print, yyglrReduce,
5605 yyreportTree): Do not assume that size_t is the same width as int,
5606 when printing sizes. Print sizes using an unsigned format.
5607 Problem reported by Frank Heckenbach in
5608 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00035.html>.
5609
5610 Port to Forte Developer 7 C compiler.
5611 * data/glr.c (struct YYLTYPE): If locations are not being used,
5612 declare a single dummy member, as empty structs do not conform
5613 to the C standard.
5614 (YYERROR, YYBACKUP): Do not use "do { ...; return foo; } while (0)";
5615 the Forte Developer 7 C compiler complains that end-of-loop
5616 code is not reached.
5617
5618 2003-06-17 Paul Eggert <eggert@twinsun.com>
5619
5620 * lib/libiberty.h (PARAMS): Spell argument as Args, not as X, to
5621 avoid warnings from picky compilers about redefinition of PARAMS.
5622
5623 2003-06-17 Paul Eggert <eggert@twinsun.com>
5624
5625 Version 1.875b.
5626
5627 * NEWS: Document 1.875b.
5628
5629 * lib/bbitset.h: Do not include config.h; that's the includer's job.
5630 Do not include <sys/types.h>; shouldn't be needed on a C89 host.
5631 * lib/bitset.h (bitset_compatible_p): Indent as per GNU standard.
5632 Don't use 'index' in comments, as it's a builtin fn on some hosts.
5633 * lib/bitset_stats.c: Include gettext.h unconditionally, as
5634 per recent gettext manual's suggestion.
5635 * lib/ebitset.c (ebitset_resize, ebitset_unused_clear):
5636 Use prototypes, not old-style definitions.
5637 * lib/lbitset.c (lbitset_unused_clear): Likewise.
5638 * lib/vbitset.c (vbitset_resize, vbitset_ones, vbitset_zero,
5639 vbitset_empty_p, vbitset_copy1, vbitset_not, vbitset_equal_p,
5640 vbitset_subset_p, vbitset_disjoint_p, vbitset_and, vbitset_and_cmp,
5641 vbitset_andn, vbitset_andn_cmp, vbitset_or, vbitset_or_cmp,
5642 vbitset_xor, vbitset_xor_cmp, vbitset_and_or, vbitset_and_or_cmp,
5643 vbitset_andn_or, vbitset_andn_or_cmp, vbitset_or_and,
5644 vbitset_or_and_cmp, vbitset_copy): Likewise.
5645
5646 * lib/libiberty.h: Do not include config.h; that's the includer's job.
5647 Do not include <stdlib.h>.
5648 (PARAMS): Define unconditionally for C89.
5649 (ATTRIBUTE_NORETURN): Remove.
5650 (ATTRIBUTE_UNUSED): Define unconditionally.
5651
5652 Upgrade to 2003-06-08 libbitset, submitted by Michael Hayes in:
5653 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00005.html>
5654 * lib/Makefile.am (bitsets_sources): Add vbitset.c, vbitset.h.
5655 * lib/vbitset.c, lib/vbitset.h: New files.
5656 * lib/abitset.c, lib/bbitset.h, lib/bitset.c, lib/bitset.h,
5657 lib/bitset_stats.c, lib/ebitset.c, lib/lbitset.c: Import
5658 from libbitset.
5659
5660 * doc/bison.texinfo (How Can I Reset the Parser): Renamed from
5661 `How Can I Reset @code{yyparse}', since texinfo does not allow
5662 arbitrary @ in node names.
5663
5664 * m4/Makefile.am (EXTRA_DIST): Add the following files, which
5665 shouldn't be needed according to the gettext 0.12.1 documentation
5666 but which seem to be needed anyway: codeset.m4 glibc21.m4
5667 intdiv0.m4 inttypes-pri.m4 inttypes.m4 inttypes_h.m4 isc-posix.m4
5668 lcmessage.m4 nls.m4 po.m4 stdint_h.m4 uintmax_t.m4 ulonglong.m4.
5669 * po/Makefile.in.in: Upgrade to gettext 0.12.1 version.
5670
5671 * lib/.cvsignore: Add stdbool.h.
5672 * m4/.cvsignore: Add nls.m4, po.m4.
5673
5674 Upgrade to CVS gnulib.
5675 * stdbool_.h: File renamed from stdbool.h.in.
5676 * configure.ac (AM_STDBOOL_H): Invoke this instead of
5677 AC_HEADER_STDBOOL.
5678 (AM_GNU_GETTEXT): Put brackets around args, as latest manual suggests.
5679 (AM_GNU_GETTEXT_VERSION): Update to 0.12.1.
5680 * lib/Makefile.am (EXTRA_DIST): Add stdbool_.h.
5681 (MOSTLYCLEANFILES): New var.
5682 ($(libbison_a_OBJECTS)): Depend on $(STDBOOL_H).
5683 (stdbool.h): New rule.
5684 * lib/dirname.c, lib/dirname.h, lib/hash.c, lib/hash.h,
5685 lib/malloc.c, lib/obstack.h, lib/quote.c, lib/realloc.c,
5686 lib/strcasecmp.c, lib/xalloc.h, m4/alloca.m4, m4/onceonly.m4,
5687 m4/quote.m4: Upgrade to today's gnulib.
5688
5689 * tests/calc.at (AT_CHECK_CALC): New option EXPECTED-TO-FAIL.
5690 (AT_CHECK_CALC_LALR1_CC): Use it, since the C++ LALR parser fails
5691 the tests right now.
5692 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Ensure yylex and
5693 yyerror are declared before use; C99 requires this.
5694
5695 2003-06-09 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
5696
5697 * data/glr.c (YYERROR): Update definition to reset yyerrState to 0
5698 first.
5699 (yyrecoverSyntaxError): Correct the logic for setting and testing
5700 yyerrState.
5701 Correct comment on handling EOF.
5702 Allow states with only a default reduction, rather than failing
5703 (I can't quite reconstruct why these were not allowed before).
5704
5705 Fixes to avoid problem that $-N rules in GLR parsers can cause
5706 buffer overruns, corrupting state.
5707
5708 * src/output.c (prepare_rules): Output max_left_semantic_context
5709 definition.
5710 * src/reader.h (max_left_semantic_context): New variable declaration.
5711 * src/scan-gram.l (max_left_semantic_context): Define.
5712 (handle_action_dollar): Update max_left_semantic_context.
5713 * data/glr.c (YYMAXLEFT): New definition.
5714 (yydoAction): Increase size of yyrhsVals by YYMAXLEFT.
5715 (yyresolveAction): Ditto.
5716
5717 Fixes to problems with location handling in GLR parsers reported by
5718 Frank Heckenbach (2003/06/05).
5719
5720 * data/glr.c (YYLTYPE): Make trivial if locations not used.
5721 (YYRHSLOC): Add parentheses, and define only if locations used.
5722 (YYLLOC_DEFAULT): Add parentheses, and give trivial definition if
5723 locations not used.
5724 (yyuserAction): Use YYLLOC_DEFAULT to set *yylocp.
5725 (yydoAction): Remove redundant initialization of *yyvalp and *yylocp.
5726
5727 * tests/cxx-type.at: Exercise location information; update tests
5728 to differentiate output with and without locations.
5729 Remove forward declarations of yylex and yyerror---caused errors
5730 because default YYLTYPE not yet defined.
5731 Change semantic actions to compute strings, rather than printing
5732 them directly (to test proper passing of semantics values). Change
5733 output to prefix notation and update test data and expected results.
5734 (yylex): Track locations.
5735 (stmtMerge): Return value rather than printing, and include arguments
5736 in value.
5737
5738 2003-06-03 Paul Eggert <eggert@twinsun.com>
5739
5740 Avoid warnings generated by GCC 2.95.4 when Bison is
5741 configured with --enable-gcc-warnings.
5742 * data/lalr1.cc (yy::]b4_parser_class_name[::parse,
5743 yy::]b4_parser_class_name[::translate_,
5744 yy::Stack::operator[] (unsigned),
5745 yy::Stack::operator[] (unsigned) const,
5746 yy::Slice::operator[] (unsigned),
5747 yy::Slice::operator[] (unsigned) const):
5748 Rename local vars to avoid warnings.
5749 * tests/glr-regression.at (Improper handling of embedded actions
5750 and $-N in GLR parsers): Remove unused local variable from yylex.
5751 * tests/regression.at (_AT_DATA_DANCER_Y): Declare yylex to take
5752 (void) as arg when not pure, since we now assume C89 when building
5753 Bison. Pacify GCC by using parameter.
5754
5755 2003-06-02 Paul Eggert <eggert@twinsun.com>
5756
5757 * data/lalr1.cc (yy::Position::lines, yy::Position::columns,
5758 yy::Location::lines, yy::Location::columns): Rename arguments
5759 to avoid shadowing; this removes a warning generated by GCC 3.3.
5760
5761 2003-06-01 Paul Eggert <eggert@twinsun.com>
5762
5763 Don't pass C-only warning optins (e.g., -Wmissing-declarations)
5764 to g++, as GCC 3.3 complains if you do it.
5765 * configure.ac (WARNING_CXXFLAGS): New subst. Set it to
5766 everything that WARNING_CFLAGS has, except omit warnings
5767 not suitable for C++.
5768 (AC_PROG_CXX): Use this instead of AC_CHECK_PROGS([CXX], [g++]).
5769 * tests/atlocal.in (CXXFLAGS): New var.
5770 * tests/local.at (AT_COMPILE_CXX): Use it instead of CFLAGS.
5771
5772 Fix a GLR parser bug I reported in February; see
5773 <http://lists.gnu.org/archive/html/bison-patches/2003-02/msg00008.html>.
5774 The problem was that GLR parsers did not conform to the C standard,
5775 because actions like { $1 = $2 + $3; } expanded to expressions
5776 that invoked YYFILL in separate subexpressions, and YYFILL assigned
5777 to a local variable. The C standard says that expressions
5778 like (var = f ()) + (var = f ()) have undefined behavior.
5779 Another problem was that GCC sometimes issues warnings that
5780 yyfill and its parameters are unused.
5781
5782 * data/glr.c (yyfillin): Renamed from the old yyfill. Mark
5783 as possibly unused.
5784 (yyfill): New function.
5785 (YYFILL): Use it.
5786 (yyuserAction): Change type of yynormal to bool, so that it matches
5787 the new yyfill signature. Mark it as possibly unused.
5788
5789
5790 Follow up on a bug I reported in February, where a Bison-generated
5791 parser can loop. Provide a test case and a fix for yacc.c. I
5792 don't have a fix for lalr1.cc or for glr.c, unfortunately.
5793 The original bug report is in:
5794 <http://lists.gnu.org/archive/html/bison-patches/2003-02/msg00044.html>
5795
5796 * data/yacc.c (YYERROR): Now just 'goto yyerrorlab', since the
5797 macro's size was becoming unwieldy.
5798 (yyerrlab): Do not discard an empty lookahead symbol, as this
5799 might destroy garbage.
5800 (yyerrorlab): New label, with the old contents of YYERROR,
5801 plus the following change: pop the stack of rhs corresponding
5802 to the production that invoked YYERROR. That is how Yacc
5803 behaves, and POSIX requires this behavior.
5804 (yyerrlab1): Use YYPOPSTACK instead of its definiens.
5805 * tests/calc.at (_AT_DATA_CALC_Y): Include unistd.h if available.
5806 Define 'alarm' to do nothing if unistd.h is not available.
5807 Add a new rule "exp: '-' error;" to test the above change to
5808 data/yacc.c. Use 'alarm' to abort any test taking longer than
5809 10 seconds, as it's probably looping.
5810 (AT_CHECK_CALC): Test recovery from error in new grammar rule.
5811 Also, the new yacc.c generates two fewer diagnostics for an
5812 existing test.
5813
5814 2003-05-24 Paul Eggert <eggert@twinsun.com>
5815
5816 * data/glr.c (YYSTACKEXPANDABLE): Do not evaluate
5817 YYSTYPE_IS_TRIVIAL or YYSTYPE_IS_TRIVIAL unless they are defined.
5818 This fixes a problem reported by John Bowman when the Compaq/HP
5819 Alpha cxx compiler happy (e.g. using cxx -D__USE_STD_IOSTREAM
5820 -ansi -Wall -gall).
5821 * data/yacc.c (union yyalloc): Likewise.
5822 (YYCOPY): Do not evaluate __GNUC__ unless it is defined.
5823
5824 Switch from 'int' to 'bool' where that makes sense.
5825
5826 * lib/abitset.c (abitset_test, abitset_empty_p, abitset_equal_p,
5827 abitset_subset_p, abitset_disjoint_p, abitset_and_cmp,
5828 abitset_andn_cmp, abitset_or_cmp, abitset_xor_cmp, abitset_and_or,
5829 abitset_and_or_cmp, abitset_andn_or_cmp, abitset_or_and_cmp):
5830 Return or accept bool, not int. All callers changed.
5831 * lib/bbitset.h: (bitset_toggle_, bitset_copy_, bitset_and_or_cmp_,
5832 bitset_andn_or_cmp_, bitset_or_and_cmp_): Likewise.
5833 * lib/bitset.c (bitset_only_set_p, bitset_print, bitset_toggle_,
5834 bitset_copy_, bitset_op4_cmp, bitset_and_or_cmp_, bitset_andn_or_cmp_,
5835 bitset_or_and_cmp_): Likewise.
5836 * lib/bitset.h (bitset_test, bitset_only_set_p): Likewise.
5837 * lib/bitset_stats.c (bitset_stats_print, bitset_stats_toggle,
5838 bitset_stats_test, bitset_stats_empty_p, bitset_stats_disjoint_p,
5839 bitset_stats_equal_p, bitset_stats_subset_p, bitset_stats_and_cmp,
5840 bitset_stats_andn_cmp, bitset_stats_or_cmp, bitset_stats_xor_cmp,
5841 bitset_stats_and_or_cmp, bitset_stats_andn_or_cmp,
5842 bitset_stats_or_and_cmp): Likewise.
5843 * lib/ebitset.c (ebitset_elt_zero_p, ebitset_equal_p, ebitset_copy_cmp,
5844 ebitset_test, ebitset_empty_p, ebitset_subset_p, ebitset_disjoint_p,
5845 ebitset_op3_cmp, ebitset_and_cmp, ebitset_andn_cmp, ebitset_or_cmp,
5846 ebitset_xor_cmp): Likewise.
5847 * lib/lbitset.c (lbitset_elt_zero_p, lbitset_equal_p, lbitset_copy_cmp,
5848 lbitset_test, lbitset_empty_p, lbitset_subset_p, lbitset_disjoint_p,
5849 lbitset_op3_cmp, lbitset_and_cmp, lbitset_andn_cmp, lbitset_or_cmp,
5850 lbitset_xor_cmp): Likewise.
5851 * lib/bbitset.h: Include <stdbool.h>.
5852 (struct bitset_vtable): The following members now return bool, not
5853 int: toggle, test, empty_p, disjoint_p, equal_p, subset_p,
5854 and_cmp, andn_cmp, or_cmp, xor_cmp, and_or_cmp, andn_or_cmp,
5855 or_and_cmp).
5856 * src/conflicts.c (count_rr_conflicts): Likewise.
5857 * lib/bitset_stats.h (bitset_stats_enabled): Now bool, not int.
5858 All uses changed.
5859 * lib/ebitset.c (ebitset_obstack_init): Likewise.
5860 * lib/lbitset.c (lbitset_obstack_init): Likewise.
5861 * src/getargs.c (debug_flag, defines_flag, locations_flag,
5862 no_lines_flag, no_parser_flag, token_table_flag, yacc_flag,
5863 graph_flag): Likewise.
5864 * src/getargs.h (debug_flag, defines_flag, locations_flag,
5865 no_lines_flag, no_parser_flag, token_table_flag, yacc_flag,
5866 graph_flag): Likewise.
5867 * src/output.c (error_verbose): Likewise.
5868 * src/output.h (error_verbose): Likewise.
5869 * src/reader.c (start_flag, typed): Likewise.
5870 * src/reader.h (typed): Likewise.
5871 * src/getargs.c (LOCATIONS_OPTION): New constant.
5872 (long_options, getargs): Use it.
5873 * src/lalr.c (build_relations): Use bool, not int.
5874 * src/nullable.c (nullable_compute): Likewise.
5875 * src/print.c (print_reductions): Likewise.
5876 * src/tables.c (action_row, pack_vector): Likewise.
5877 * src/muscle_tab.h (MUSCLE_INSERT_BOOL): New macro.
5878 * src/output.c (prepare): Use it.
5879 * src/output.c (token_definitions_output,
5880 symbol_destructors_output, symbol_destructors_output): Use string,
5881 not boolean integer, to keep track of whether to output separator.
5882 * src/print_graph.c (print_core): Likewise.
5883 * src/state.c (state_rule_lookaheads_print): Likewise.
5884
5885 * config/install-sh: Sync from automake 1.7.5.
5886
5887 2003-05-14 Paul Eggert <eggert@twinsun.com>
5888
5889 * src/parse-gram.y (rules_or_grammar_declaration): Require a
5890 semicolon after a grammar declaration, in the interest of possible
5891 future changes to the Bison input language.
5892 Do not allow a stray semicolon at the start of the grammar.
5893 (rhses.1): Allow one or more semicolons after any rule, including
5894 just before "|" as required by POSIX.
5895 * tests/input.at (Torturing the Scanner): Add tests for ";|" in a
5896 grammar.
5897
5898 2003-05-14 Alexandre Duret-Lutz <adl@gnu.org>
5899
5900 %parse-param support for lalr1.cc.
5901
5902 * data/lalr1.cc (b4_parse_param_decl, b4_parse_param_cons,
5903 b4_cc_constructor_calls, b4_cc_constructor_call,
5904 b4_parse_param_vars, b4_cc_var_decls, b4_cc_var_decl): New m4
5905 definitions.
5906 (yy::b4_parser_class_name::b4_parser_class_name): Take extra
5907 parse-param arguments.
5908 (yy::b4_parser_class_name): Declare instance variables to
5909 hold parse-param arguments.
5910 * tests/calc.at: s/value/semantic_value/ because value clashes
5911 with a member of yy::b4_parser_class_name. Adjust C++ code
5912 to handle %parse-param. Enable %parse-param test in C++.
5913
5914 2003-05-12 Paul Eggert <eggert@twinsun.com>
5915
5916 * doc/bison.texinfo (How Can I Reset @code{yyparse}): Reword the
5917 English a bit. Fix fclose typo. Change "const char" to "char
5918 const", and use ANSI C rather than K&R for "main". Suggest
5919 YY_FLUSH_BUFFER over yyrestart (as that is what Flex recommends)
5920 and suggest yy_switch_to_buffer.
5921
5922 2003-05-05 Paul Eggert <eggert@twinsun.com>
5923
5924 * lib/bitset.h (__INT_TO_PTR): Define to a value that presumes
5925 C89. This avoids a diagnostic on compilers that define __STDC__
5926 to 0, fixing a problem with Tru64 cc reported by Martin Mokrejs in
5927 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00041.html>.
5928
5929 2003-05-03 Paul Eggert <eggert@twinsun.com>
5930
5931 * lib/bitset.h (BITSET_FOR_EACH, BITSET_FOR_EACH_REVERSE):
5932 Do not overrun array bounds.
5933 This should fix a bug reported today by Olatunji Oluwabukunmi in
5934 <http://lists.gnu.org/archive/html/bug-bison/2003-05/msg00004.html>.
5935
5936 2003-04-29 Akim Demaille <akim@epita.fr>
5937
5938 * src/gram.h, src/gram.c (pure_parser, glr_parser): Move to...
5939 * src/getargs.c, src/getargs.h: here, as bool, not int.
5940 (nondeterministic_parser): New.
5941 * src/parse-gram.y, src/scan-gram.l: Support
5942 %nondeterministic-parser.
5943 * src/output.c (prepare): Use nondeterministic_parser instead
5944 of glr_parser where appropriate.
5945 * src/tables.c (conflict_row, action_row, save_row)
5946 (token_actions, token_actions, pack_vector): Ditto.
5947
5948 2003-04-29 Akim Demaille <akim@epita.fr>
5949
5950 * doc/bison.texinfo (C++ Parsers, Implementing Loops): New.
5951
5952 2003-04-29 Akim Demaille <akim@epita.fr>
5953
5954 * tests/calc.at: Also test yacc.c and glr.c (but not lalr1.cc yet)
5955 with %pure-parser and %locations to exercise the patch from Yakov
5956 Markovitch below.
5957
5958 2003-04-28 Tim Van Holder <tim.van.holder@pandora.be>
5959
5960 * data/yacc.c: (b4_lex_param): Corrected for the case where
5961 %lex-param is provided and %pure-parser isn't.
5962
5963 2003-04-27 Paul Eggert <eggert@twinsun.com>
5964
5965 Avoid gcc -Wundef warnings reported by Gerald Pfeifer in
5966 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00044.html>.
5967 * data/yacc.c (YYSTACK_ALLOC): Don't evaluate YYSTACK_USE_ALLOCA
5968 if it is not defined.
5969 (YYMAXDEPTH): Don't evaluate YYMAXDEPTH if it is not defined.
5970
5971 2003-04-26 Paul Eggert <eggert@twinsun.com>
5972
5973 * data/lalr1.cc (yy::Parser::pact_ninf_, yy::Parser::table_ninf_):
5974 Declare to be of type suitable for the ninf value itself, not of
5975 type suitable for the corresponding table, since the latter might
5976 be unsigned but the ninf value might be negative. This fixes a
5977 bug reported by Alexandre Duret-Lutz in
5978 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00017.html>.
5979
5980 * configure.ac (AC_FUNC_ERROR_AT_LINE): Remove, since gl_ERROR
5981 invokes it. We shouldn't invoke it twice because it will attempt
5982 to put error.o in the archive twice. This fixes a glitch reported
5983 by Martin Mokrejs in
5984 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00041.html>.
5985
5986 2003-04-21 Paul Eggert <eggert@twinsun.com>
5987
5988 * m4/error.m4: Update from Bruno Haible's 2003-04-14 patch
5989 to gnulib.
5990
5991 2003-04-21 Yakov Markovitch <Markovitch@iso.ru>
5992
5993 * data/glr.c (yyexpandGLRStack) [!YYSTACKEXPANDABLE]:
5994 Fix obvious typo that results in uncompilable GLR parsers
5995 when both %pure-parser and %locations are used. (trivial change)
5996
5997 2003-04-17 Paul Eggert <eggert@twinsun.com>
5998
5999 * src/scan-gram.l: Add %option nounput, since we no longer use unput.
6000 (unexpected_eof): Renamed from unexpected_end_of_file, for brevity.
6001 Do not insert the expected token via unput, as this runs afoul
6002 of a POSIX-compatibility bug in flex 2.5.31.
6003 All uses changed to BEGIN the parent state,
6004 since we no longer insert the expected token via unput.
6005 * tests/regression.at (Invalid inputs): Remove cascaded diagnostic
6006 that is no longer emitted after the above change.
6007
6008 * src/conflicts.c (set_conflicts): Resolve all conflicts, not just
6009 the first one. This change is from Paul Hilfinger, and it fixes
6010 regression reported by Werner Lemberg in
6011 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00026.html>.
6012
6013 (resolve_sr_conflict): Don't invoke state_errs_set
6014 unless one or more tokens have been explicitly made errors.
6015 Otherwise, the above change causes Bison to abort.
6016
6017 * tests/existing.at (GNU pic Grammar): New test case, taken from
6018 Lemberg's email.
6019
6020 2003-03-31 Akim Demaille <akim@epita.fr>
6021
6022 * doc/Makefile.am (AM_MAKEINFOFLAGS): Don't split the info file.
6023
6024 2003-03-31 Akim Demaille <akim@epita.fr>
6025
6026 * src/output.c (prepare_symbols): Avoid trailing spaces in the
6027 output.
6028
6029 2003-03-31 Akim Demaille <akim@epita.fr>
6030
6031 * doc/bison.texinfo (Strings are Destroyed): s/losses/loses/.
6032 From Paul Hilfinger.
6033
6034 2003-03-29 Akim Demaille <akim@epita.fr>
6035
6036 * m4/error.m4: Do not put under dynamic conditions some code which
6037 expansion is under static control.
6038
6039 2003-03-29 Akim Demaille <akim@epita.fr>
6040
6041 * doc/bison.texinfo (How Can I Reset @code{yyparse}): New.
6042
6043 2003-03-29 Akim Demaille <akim@epita.fr>
6044
6045 * doc/bison.texinfo (Strings are Destroyed): New.
6046
6047 2003-03-13 Paul Eggert <eggert@twinsun.com>
6048
6049 * .cvsignore: Add configure.lineno.
6050 * src/.cvsignore: Add yacc.
6051 * tests/.cvsignore: Add testsuite.log.
6052 * doc/fdl.texi: Sync with latest FSF version.
6053
6054 2003-03-12 Paul Eggert <eggert@twinsun.com>
6055
6056 * scan-gram.l (YY_USER_INIT): Initialize code_start, too.
6057 (<INITIAL><<EOF>>, <SC_PRE_CODE><<EOF>>): Set *loc to the scanner
6058 cursor, instead of leaving it undefined. This fixes a bug
6059 reported by Tim Van Holder in
6060 <http://lists.gnu.org/archive/html/bug-bison/2003-03/msg00023.html>.
6061 * tests/input.at (Torturing the Scanner): Test the scanner on
6062 an empty input file, which was Tim Van Holder's test case.
6063
6064 * m4/timevar.m4 (BISON_PREREQ_TIMEVAR): When checking whether
6065 <sys/resource.h> can be included, include sys/time.h and
6066 sys/times.h first, if available. This works around the SunOS
6067 4.1.4 porting bug reported by Bruce Becker in
6068 <http://lists.gnu.org/archive/html/bug-bison/2003-03/msg00018.html>.
6069
6070 * m4/subpipe.m4 (BISON_PREREQ_SUBPIPE): Don't
6071 AC_CHECK_HEADERS([sys/wait.h]), as this interferes with
6072 AC_HEADER_SYS_WAIT.
6073
6074 Merge changes from gnulib. This was prompted because the CVS
6075 snapshot didn't build on Solaris 7 due to strnlen problems.
6076
6077 These changes need to be merged back into gnulib:
6078 * lib/hash.c: Include <stdbool.h> unconditionally.
6079 * m4/onceonly.m4 (m4_quote): New macro.
6080 (AC_CHECK_HEADERS_ONCE, AC_CHECK_FUNCS_ONCE, AC_CHECK_DECLS_ONCE):
6081 Quote AC_FOREACH variable-expansions properly.
6082 The 2003-01-03 obstack.h change also needs merging.
6083 {end of changes requiring merging}
6084
6085 * lib/stdbool.h.in, m4/alloca.m4, m4/dirname.m4, m4/dos.m4,
6086 m4/getopt.m4, m4/hash.m4, m4/malloc.m4, m4/memchr.m4,
6087 m4/memrchr.m4, m4/obstack.m4, m4/onceonly.m4, m4/quote.m4,
6088 m4/quotearg.m4, m4/realloc.m4, m4/stpcpy.m4, m4/strnlen.m4,
6089 m4/strtol.m4, m4/strtoul.m4, m4/unlocked-io.m4, m4/xalloc.m4:
6090 New files, imported from gnulib.
6091 * m4/Makefile.am (EXTRA_DIST): Add the new m4/*.m4 files mentioned
6092 above.
6093
6094 * lib/mbswidth.c, m4/error.m4, m4/mbrtowc.m4, m4/mbswidth.m4,
6095 m4/memcmp.m4, m4/prereq.m4, m4/stdbool.m4: Update to current
6096 gnulib sources.
6097
6098 * configure.ac (gl_DIRNAME, gl_GETOPT, gl_HASH, gl_QUOTE, gl_XALLOC):
6099 Add.
6100 (gl_ERROR): New, replacing jm_PREREQ_ERROR.
6101 (gl_FUNC_ALLOCA): New, replacing AC_FUNC_ALLOCA.
6102 (gl_FUNC_STPCPY): New, replacing AC_REPLACE_FUNCS(stpcpy).
6103 (gl_FUNC_STRNLEN): New, replacing AC_FUNC_STRNLEN.
6104 (gl_MBSWIDTH): New, replacing jm_PREREQ_MBSWIDTH.
6105 (gl_OBSTACK): New, replacing AC_FUNC_OBSTACK.
6106 (gl_QUOTEARG): New, replacing jm_PREREQ_QUOTEARG.
6107 (jm_FUNC_GLIBC_UNLOCKED_IO, gl_FUNC_STPCPY, gl_FUNC_STRTOL): New.
6108 (jm_FUNC_MALLOC): New, replacing AC_FUNC_MALLOC.
6109 (jm_FUNC_REALLOC): New, replacing AC_FUNC_REALLOC.
6110 (jm_PREREQ_ARGMATCH): Remove.
6111 (AC_REPLACE_FUNCS): Remove memchr, memrchr, stpcpy, strtol, strtoul.
6112 * lib/Makefile.am (libbison_a_SOURCES): Add argmatch.c, argmatch.h.
6113
6114 * src/system.h: Include <stdbool.h> unconditionally.
6115
6116 * lib/bbitset.h: Include <limits.h> unconditionally. We have been
6117 assuming at least C89 in the bitset code for some time now.
6118
6119 2003-03-03 Akim Demaille <akim@epita.fr>
6120
6121 * ro.po: New.
6122
6123 2003-03-02 Akim Demaille <akim@epita.fr>
6124
6125 * doc/bison.texinfo (Table of Symbols): Reactivate the
6126 documentation for %lex-param, and %parse-param.
6127
6128 2003-03-02 Akim Demaille <akim@epita.fr>
6129
6130 * data/yacc.c, data/glr.c, data/lal1.cc: Use similar code to
6131 generate verbose error messages.
6132 Use the number of tokens as an upper bound in yytname, as it
6133 cannot be a non terminal.
6134
6135 2003-03-02 Akim Demaille <akim@epita.fr>
6136
6137 * tests/regression.at (_AT_DATA_DANCER_Y): Fix the expected error
6138 message.
6139
6140 2003-03-02 Akim Demaille <akim@epita.fr>
6141
6142 * tests/regression.at (_AT_DATA_DANCER_Y, AT_CHECK_DANCER): New.
6143 Use them to exercise yycheck overrun.
6144 Based on Andrew Suffield's grammar.
6145
6146 2003-03-02 Akim Demaille <akim@epita.fr>
6147
6148 Create tests/local.at for Bison generic testing macros.
6149
6150 * tests/calc.at (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): Move to...
6151 * tests/local.at (AT_BISON_OPTION_PUSHDEFS, AT_BISON_OPTION_POPDEFS):
6152 This new file.
6153 * tests/calc.at (AT_CHECK_CALC): Adjust.
6154 * tests/testsuite.at (AT_DATA_GRAMMAR_PROLOGUE, AT_DATA_GRAMMAR)
6155 (AT_COMPILE, AT_COMPILE_CXX, AT_PARSER_CHECK): Move to...
6156 * tests/local.at: here.
6157 (AT_COMPILE_CXX): Tags the tests using it as c++.
6158 Ignore the test if CXX is not functional.
6159
6160 2003-03-01 Paul Eggert <eggert@twinsun.com>
6161
6162 * src/scan-gram.l (code_start): Initialize it to scanner_cursor,
6163 not loc->end, since loc->end might contain garbage and this leads
6164 to undefined behavior on some platforms.
6165 (id_loc, token_start): Use (IF_LINTed) initial values that do not
6166 depend on *loc, so that the reader doesn't give the the false
6167 impression that *loc is initialized.
6168 (<INITIAL>"%%"): Do not bother setting code_start, since its value
6169 does not survive the return.
6170
6171 2003-03-01 Akim Demaille <akim@epita.fr>
6172
6173 * src/scan-gram.l (code_start): Always initialize it when entering
6174 into yylex, as SC_EPILOGUE is activated *before* the corresponding
6175 yylex invocation. An alternative would be making it static, but
6176 then it starts with the second %%'s beginning, instead of its end.
6177
6178 2003-02-28 Paul Eggert <eggert@twinsun.com>
6179
6180 * lib/mbswidth.c: Include <wchar.h> before "mbswidth.h", to work
6181 around a UnixWare 7.1.1 porting bug reported by John Hughes in
6182 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00030.html>.
6183
6184 2003-02-26 Paul Eggert <eggert@twinsun.com>
6185
6186 * README: Mention compiler bug in Sun Forte Developer 6 update 2.
6187 Remove Sequent/Pyramid discussion (nobody uses them any more).
6188 Merge VMS and MS-DOS discussion; these ports may well be dead
6189 but let's keep mentioning them for now. Put <> around email
6190 addresses. Add copyright notice.
6191
6192 2003-02-24 Paul Eggert <eggert@twinsun.com>
6193
6194 * data/glr.c (yy_reduce_print): yylineno -> yylno,
6195 to avoid collision with flex use of yylineno.
6196 Problem reported by Bruce Lilly in
6197 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00016.html>.
6198 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Likewise.
6199 * data/yacc.c (yy_reduce_print): Likewise.
6200
6201 * config/depcomp: Sync with Automake 1.7.3.
6202
6203 2003-02-21 Akim Demaille <akim@epita.fr>
6204
6205 * data/lalr1.cc: Use temporary variables instead of casts to
6206 change integer types.
6207 Suggested by Paul Eggert.
6208
6209 2003-02-21 Akim Demaille <akim@epita.fr>
6210
6211 * doc/bison.texinfo: Use "location" consistently to refer to @n,
6212 to avoid confusions with lalr1.cc's notion of Position.
6213 Suggested by Paul Eggert.
6214
6215 2003-02-20 Akim Demaille <akim@epita.fr>
6216
6217 * data/lalr1.cc (position.hh): Make sure "columns" never pushes
6218 before initial_columns.
6219 (location.hh): Use consistent variable names when defining the
6220 operator<<.
6221 Use "last" so that we subtract from Positions, not from unsigned.
6222
6223 2003-02-20 Akim Demaille <akim@epita.fr>
6224
6225 * data/lalr1.cc (position.hh): New subfile, including the extended
6226 and Doxygen'ed documentation of class Position.
6227 (location.hh): Use it.
6228 Document a` la Doxygen.
6229 With the help of Benoit Perrot.
6230
6231 2003-02-20 Akim Demaille <akim@epita.fr>
6232
6233 * tests/calc.at (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): Define
6234 AT_YACC_IF.
6235 Redefine AT_YYERROR_SEES_LOC_IF using it.
6236 (_AT_DATA_CALC_Y): Don't declare yyerror when lalr1.cc, as it is
6237 not defined.
6238 Don't use the location in yy::Parser::error_ and
6239 yy::Parser::print_ when not %locations.
6240 Activate more lalr1.cc tests.
6241
6242 2003-02-19 Akim Demaille <akim@epita.fr>
6243
6244 * data/lalr1.cc: When displaying a line number, be sure to make it
6245 an int.
6246
6247 2003-02-19 Akim Demaille <akim@epita.fr>
6248
6249 * data/lalr1.cc (b4_stack_depth_init, yy::Parser::initdepth_):
6250 Remove, useless.
6251 (YYABORT, YYACCEPT, YYERROR): New.
6252 * tests/calc.at: Renable the lalr1.cc test.
6253
6254 2003-02-19 Akim Demaille <akim@epita.fr>
6255
6256 * tests/calc.at (AT_CHECK_CALC): Check different scenarios of
6257 error recovery, mixing with/without pops and discarding of the
6258 lookahead.
6259 Exercise YYERROR.
6260 Disable the lalr1.cc tests as currently it doesn't support YYERROR.
6261
6262 2003-02-17 Paul Eggert <eggert@twinsun.com>
6263
6264 * tests/atlocal.in (LDFLAGS, LIBS): New vars.
6265 * tests/testsuite.at (AT_COMPILE): Use them.
6266 This fixes the testsuite problem reported by Robert Lentz in
6267 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00011.html>.
6268
6269 2003-02-12 Paul Eggert <eggert@twinsun.com>
6270
6271 * data/yacc.c (yyerrlab) [YYERROR_VERBOSE]:
6272 Avoid subscript error in yycheck. Bug reported by Andrew Suffield in
6273 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00003.html>.
6274 * data/glr.c (yyreportSyntaxError) [YYERROR_VERBOSE]: Likewise.
6275 Check for malloc failure, for consistency with yacc.c.
6276 (yytname_size): Remove, for consistency with yacc.c.
6277
6278 The bug still remains in data/lalr1.cc, as I didn't have time
6279 to fix it there.
6280
6281 2003-02-06 Akim Demaille <akim@epita.fr>
6282
6283 * configure.ac (GXX): Rename as...
6284 (CXX): this, to keep the original Autoconf semantics.
6285 Require 2.57.
6286 * data/lalr1.cc: Fix b4_copyright invocations.
6287 If YYDEBUG is not defined, don't depend upon name_ being defined.
6288 (location.hh): Include string and iostream.
6289 (Position::filename): New member.
6290 (Position::Position ()): New.
6291 (operator<< (Position)): New.
6292 (operator- (Position, int)): New.
6293 (Location::first, Location::last): Rename as...
6294 (Location::begin, Location::end): these, to mock the conventional
6295 iterator names.
6296 (operator<< (Location)): New.
6297 * tests/atlocal.in (CXX): New.
6298 * tests/testsuite.at (AT_COMPILE_CXX): New.
6299 * tests/calc.at (_AT_DATA_CALC_Y): Adjust yyerror to report the
6300 locations in a more synthetic way.
6301 (AT_CHECK_PUSHDEFS): AT_YYERROR_SEES_LOC_IF is positive if
6302 lalr1.cc is used.
6303 Adjust the C locations to match those from Emacs: first column is
6304 column 0.
6305 Change all the expected results.
6306 Conform to the GCS: simplify the locations when applicable.
6307 (LOC, VAL, YYLLOC_FORMAL, YYLLOC_ARG, USE_YYLLOC, LEX_FORMALS)
6308 (LEX_ARGS, USE_LEX_ARGS, LEX_PRE_FORMALS, LEX_PRE_ARGS): Replace
6309 these CPP macros with the m4 macros new defined by...
6310 (AT_CHECK_PUSHDEFS): this, i.e.:
6311 (AT_LALR1_CC_IF, AT_PURE_LEX_IF, AT_LOC, AT_VAL, AT_LEX_FORMALS)
6312 (AT_LEX_ARGS, AT_USE_LEX_ARGS, AT_LEX_PRE_FORMALS, AT_LEX_PRE_ARGS)
6313 New macros.
6314 (AT_CHECK_POPDEFS): Undefine them.
6315 (AT_CHECK_CALC_LALR1_CC): New.
6316 Use it for the first lalr1.cc test.
6317
6318 2003-02-04 Akim Demaille <akim@epita.fr>
6319
6320 * data/lalr1.cc (YYLLOC_DEFAULT): Fix its definition: be based on
6321 Location as is defined.
6322
6323 2003-02-04 Akim Demaille <akim@epita.fr>
6324
6325 * data/lalr1.cc: If YYDEBUG is not defined, don't depend upon
6326 name_ being defined.
6327
6328 2003-02-03 Paul Eggert <eggert@twinsun.com>
6329
6330 * src/gram.h (start_symbol): Remove unused decl.
6331
6332 Use more-consistent naming conventions for local vars.
6333
6334 * src/derives.c (derives_compute): Change type of local var from
6335 int to rule_number.
6336 * src/gram.c (grammar_rules_partial_print): Likewise.
6337 * src/print.c (print_core): Likewise.
6338 * src/reduce.c (reduce_grammar_tables): Likewise.
6339
6340 * src/gram.c (grammar_dump): Change name of item_number *
6341 local var from r to rp.
6342 * src/nullable.c (nullable_compute): Likewise.
6343
6344 * src/gram.h (ISTOKEN, ISVAR): Use i, not s, for int var.
6345
6346 * src/gram.h (symbol_number_as_item_number): Use sym, not s,
6347 for symbol or symbol_number var.
6348 * src/reader.c (grammar_start_symbol_set): Likewise.
6349 * src/reader.h (grammar_start_symbol_set, grammar_symbol_append):
6350 Likewise.
6351 * src/state.c (transitions_to): Likewise.
6352 * src/state.h: Likewise.
6353 * src/tables.c (symbol_number_to_vector_number): Likewise.
6354
6355 * src/muscle_tab.h (MUSCLE_OBSTACK_SGROW): Use p, not s, for
6356 char * var.
6357
6358 * src/parse-gram.y (lloc_default): Use loc, not r, for YYLTYPE
6359 var.
6360
6361 * src/scan-gram.l (no_cr_read): Use bytes_read, not s, for size
6362 var.
6363
6364 * src/system.h (xstrndup, strchr, strspn, strnlen, memchr, memrchr):
6365 Use str, not s, for char * var. Use ch, not c, for character var.
6366 Use size for size var.
6367
6368 * src/uniqstr.c (uniqstr_new, uniqstr_assert): Use str, not s, for
6369 char * var.
6370 (uniqstr_print, uniqst_print_processor): Use ustr, not s, for
6371 uniqstr var.
6372 * src/uniqstr.h: Likewise.
6373
6374 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str,
6375 get_layoutalgorithm_str, get_decision_str, get_orientation_str,
6376 get_node_alignment_str, get_arrow_mode_str, get_crossing_type_str,
6377 get_view_str, get_linestyle_str, get_arrowstyle_str): Rename
6378 param to have same name as that of enum, so that we don't use
6379 "s" to stand for a non-state.
6380
6381 2003-02-02 Akim Demaille <akim@epita.fr>
6382
6383 * src/scan-skel.l: Scan more than one inert character per yylex
6384 invocation.
6385
6386 2003-02-01 Paul Eggert <eggert@twinsun.com>
6387
6388 Version 1.875a.
6389
6390 * po/LINGUAS: Add ms.
6391
6392 2003-01-30 Akim Demaille <akim@epita.fr>
6393
6394 * doc/Makefile.am (CLEANFILES): Add bison.fns for distcheck.
6395
6396 2003-01-29 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
6397
6398 * tests/cxx-type.at: Correct apparent typo in Bison input: $$ instead
6399 of $1.
6400
6401 Changes in response to error report by S. Eken: GLR mode does not
6402 handle negative $ indices or $ indices in embedded rules correctly.
6403 See <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00076.html>.
6404
6405 * data/glr.c (b4_rhs_value): Change to use YYFILL macro.
6406 (b4_rhs_location): Ditto.
6407 (yyfill): New function to copy from stack tree into array
6408 incrementally.
6409 (yyuserAction): Modify to allow incremental move of semantic values
6410 to rhs array when in GLR mode.
6411 Define YYFILL to use in user-defined actions to fill semantic array
6412 as needed.
6413 Remove dummy use of yystack, as there is now a guaranteed use.
6414 (yydoAction): Modify to allow incremental move of semantic values
6415 to rhs array when in GLR mode.
6416 (yyresolveAction): Ditto.
6417 (yyglrShiftDefer): Update comment.
6418 (yyresolveStates): Use X == NULL for pointers, not !X.
6419 (yyglrReduce): Ditto.
6420 (yydoAction): Ditto
6421
6422 * tests/glr-regr1.at: Rename to ...
6423 * tests/glr-regression.at: Add new regression test for the problems
6424 described above (adapted from S. Eken).
6425 Update copyright notice.
6426 * tests/testsuite.at: Rename glr-regr1.at to glr-regression.at.
6427 * tests/Makefile.am: Ditto.
6428
6429 2003-01-28 Paul Eggert <eggert@twinsun.com>
6430
6431 * data/lalr1.cc: Do not use @output_header_name@ unless
6432 b4_defines_flag is set. This fixes two bugs reported by
6433 Tim Van Holder in
6434 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00071.html>
6435 and <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00073.html>.
6436
6437 2003-01-21 Paul Eggert <eggert@twinsun.com>
6438
6439 * data/yacc.c (YYERROR): Move code from yyerrlab1 to here, so that
6440 we don't need to worry about yyerrlab1 being reported as an
6441 "unused label" by non-GCC C compilers. The downside is that if
6442 locations are used then a couple of statements are duplicated each
6443 time YYERROR is invoked, but the upside is that the warnings
6444 should vanish.
6445 (yyerrlab1): Move code to YERROR.
6446 (yyerrlab2): Remove. Change uses back to yyerrlab1.
6447 This reverts some of the 2002-12-27 change.
6448
6449 2003-01-17 Paul Eggert <eggert@twinsun.com>
6450
6451 * src/output.c (symbol_printers_output): Fix typo that led
6452 to core dump. Problem reported by Antonio Rus in
6453 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00058.html>.
6454
6455 2003-01-13 Akim Demaille <akim@epita.fr>,
6456 Quoc Peyrot <chojin@lrde.epita.fr>,
6457 Robert Anisko <anisko_r@lrde.epita.fr>
6458
6459 * data/lalr1.cc (parse::yyerrlab1): When popping the stack, stop
6460 when the stacks contain one element, as the loop would otherwise
6461 free the last state, and then use the top state (the one we just
6462 popped). This means that the initial elements will not be freed
6463 explicitly, as is the case in yacc.c; it is not a problem, as
6464 these elements have fake values.
6465
6466 2003-01-11 Paul Eggert <eggert@twinsun.com>
6467
6468 * NEWS: %expect-violations are now just warnings, reverting
6469 to Bison 1.30 and 1.75 behavior. This fixes the GCC 3.2
6470 bootstrapping problem reported by Matthias Klose; see
6471 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00053.html>.
6472 * src/conflicts.c (conflicts_print): Likewise.
6473 * tests/conflicts.at (%expect not enough, %expect too much,
6474 %expect with reduce conflicts): Likewise.
6475 * doc/bison.texinfo (Expect Decl): Document this. Also mention
6476 that the warning is enabled if the number of conflicts changes
6477 (not necessarily increases).
6478
6479 * src/getargs.c (version): Update copyright year.
6480
6481 2003-01-09 Akim Demaille <akim@epita.fr>
6482
6483 * src/Makefile.am, lib/Makefile.am: Use $(VAR) instead of @VAR@.
6484
6485 2003-01-08 Paul Eggert <eggert@twinsun.com>
6486
6487 * Makefile.maint (WGETFLAGS):
6488 New macro, containing "-C off" to disable proxy caches.
6489 All uses of $(WGET) changed to $(WGET) $(WGETFLAGS).
6490 (rel-check): Use $(WGET) instead of wget.
6491
6492 2003-01-06 Paul Eggert <eggert@twinsun.com>
6493
6494 * doc/bison.texinfo (Generalized LR Parsing): Add a reference to
6495 the GLR paper of Scott, Johnstone and Hussain.
6496
6497 2003-01-04 Paul Eggert <eggert@twinsun.com>
6498
6499 * configure.ac (AC_ARG_ENABLE): Add --disable-yacc.
6500 (YACC_SCRIPT, YACC_LIBRARY): New vars to AC_SUBST.
6501 * lib/Makefile.am (lib_LIBRARIES): liby.a -> @YACC_LIBRARY@.
6502 (EXTRA_LIBRARIES): New var, for liby.a.
6503 * src/Makefile.am (bin_SCRIPTS): yacc -> @YACC_SCRIPT@.
6504 (EXTRA_SCRIPTS): New var, for yacc.
6505
6506 * data/yacc.c (yyerrlab1): Omit attribute if __cplusplus is defined,
6507 since GNU C++ (as of 3.2.1) does not allow attributes on labels.
6508 Problem reported by Nelson H. F. Beebe.
6509
6510 2003-01-03 Paul Eggert <eggert@twinsun.com>
6511
6512 * lib/obstack.h (__INT_TO_PTR) [__STDC__]: Cast result to
6513 (void *) to avoid diagnostic with native c89 on SGI IRIX 6.5
6514 when compiling Bison 1.875's `bitset bset = obstack_alloc
6515 (bobstack, bytes);'. Problem reported by Nelson H. F. Beebe.
6516
6517 * src/scan-skel.l (QPUTS): Omit redundant `;' from macro definition.
6518 ([^@\n]): Renamed from [^@\n]+ so that the token buffer does not
6519 grow to a huge size with typical invocation.
6520
6521 * lib/hash.c (_Bool, bool, false, true, __bool_true_false_are_defined):
6522 Use the pattern recommended by Autoconf 2.57, except also protect
6523 against double-definition.
6524 * src/system.h: Likewise.
6525 Portability issues reported by Nelson H. F. Beebe.
6526
6527 * data/glr.c (yybool): Renamed from bool, to avoid collisions in C.
6528 All uses changed. Provide a definition in both C and C++.
6529 (yytrue, yyfalse): Define even if defined (__cplusplus).
6530
6531 * lib/bitset_stats.c (bitset_stats_list): Remove unused var.
6532 Reported by Nelson H. F. Beebe.
6533
6534 * src/scan-skel.l ("@oline@"): Output lineno+1, not lineno.
6535
6536 2003-01-02 Paul Eggert <eggert@twinsun.com>
6537
6538 * data/yacc.c (yyerrlab1): Append `;' after attribute, to
6539 pacify the buggy "smart preprocessor" in MacOS 10.2.3.
6540 Bug reported by Nelson H. F. Beebe.
6541
6542 2003-01-01 Paul Eggert <eggert@twinsun.com>
6543
6544 * Version 1.875.
6545
6546 2002-12-30 Paul Eggert <eggert@twinsun.com>
6547
6548 * src/scan-gram.l (<INITIAL,SC_AFTER_IDENTIFIER,SC_PRE_CODE>","):
6549 Moved here from...
6550 (<INITIAL>","): Here. This causes stray "," to be treated
6551 more uniformly.
6552
6553 * src/scan-gram.l (<SC_BRACED_CODE>"}"): Output ";" before the
6554 last brace in braced code when not in Yacc mode, for compatibility
6555 with Bison 1.35. This resurrects the 2001-12-15 patch to
6556 src/reader.c.
6557
6558 * src/reader.h (YYDECL): Use YYSTYPE, not its deprecated alias
6559 yystype. This follows up the 2002-12-24 YYSTYPE bug fix.
6560
6561 2002-12-28 Paul Eggert <eggert@twinsun.com>
6562
6563 * src/symtab.c (symbol_make_alias): Set type of SYMVAL to be
6564 that of SYM's type. This fixes Debian bug 168069, reported by
6565 Thomas Olsson.
6566
6567 2002-12-28 Paul Eggert <eggert@twinsun.com>
6568
6569 Version 1.75f.
6570
6571 Switch back to the Yacc style of conflict reports, undoing some
6572 of the 2002-07-30 change.
6573 * doc/bison.texinfo (Understanding): Use Yacc style for
6574 conflict reports. Also, use new way of locating rules.
6575 * src/conflicts.c (conflict_report):
6576 Renamed from conflict_report_yacc, removing the old
6577 'conflict_report'. Translate the entire conflict report at once,
6578 so that we don't assume that "," has the same interpretation in
6579 all languages.
6580 (conflicts_output): Use Yacc-style conflict report for each state,
6581 instead of our more-complicated style.
6582 (conflicts_print): Use Yacc-style conflict report, except print
6583 the input file name when not emulating Yacc.
6584 * tests/conflicts.at (Unresolved SR Conflicts, Defaulted
6585 Conflicted Reduction, %expect not enough, %expect too much,
6586 %expect with reduce conflicts): Switch to Yacc-style conflict reports.
6587 * tests/existing.at (GNU Cim Grammar): Likewise.
6588 * tests/glr-regr1.at (Badly Collapsed GLR States): Likewise.
6589
6590 * src/complain.c (warn_at, warn, complain_at, complain, fatal_at,
6591 fatal): Don't invoke fflush; it's not needed and it might even be
6592 harmful for stdout, as stdout might not be open.
6593 * src/reduce.c (reduce_print): Likewise.
6594
6595 2002-12-27 Paul Eggert <eggert@twinsun.com>
6596
6597 Fix a bug where error locations were not being recorded correctly.
6598 This problem was originally reported by Paul Hilfinger in
6599 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00086.html>.
6600
6601 * data/yacc.c (yyparse): New local var yylerrsp, to record the
6602 top of the location stack's error locations.
6603 (yyerrlab): Set it. When discarding a token, push its location
6604 onto yylerrsp so that we don't lose track of the error's end.
6605 (yyerrlab1): Now is only the target of YYERROR, so that we can
6606 properly record the location of the action that failed. For GCC
6607 2.93 and later, insert an __attribute__ ((__unused__)) to avoid
6608 GCC warning about yyerrlab1 being unused if YYERROR is unused.
6609 (yyerrlab2): New label, which yyerrlab now falls through to.
6610 Compute the error's location by applying YYLLOC_DEFAULT to
6611 the locations of all the symbols that went into the error.
6612 * doc/bison.texinfo (Location Default Action): Mention that
6613 YYLLOC_DEFAULT is also invoked for syntax errors.
6614 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
6615 Error locations include the locations of all the tokens that were
6616 discarded, not just the last token.
6617
6618 2002-12-26 Paul Eggert <eggert@twinsun.com>
6619
6620 * src/files.c: Include quote.h.
6621 (compute_output_file_names): Warn if we detect conflicting
6622 outputs to the same file. This should catch the misunderstanding
6623 exemplified by Debian Bug 165349, reported by Bruce Stephens..
6624
6625 * src/conflicts.c (conflicts_print): If the user specifies
6626 "%expect N", report an error if there are any reduce/reduce
6627 conflicts. This is what the manual says should happen.
6628 This fixes Debian bug 130890, reported by Anthony DeRobertis.
6629 * tests/conflicts.at (%expect with reduce conflicts): New test.
6630
6631 Don't use m4_include on relative file names, as it doesn't work as
6632 desired if there happens to be a file with that name under ".".
6633
6634 * m4sugar/version.m4: Remove; it was included but it wasn't used.
6635 * data/Makefile.am (dist_m4sugar_DATA): Remove m4sugar/version.m4.
6636 * data/m4sugar/m4sugar.m4: Don't include m4sugar/version.m4.
6637 * data/glr.c, data/lalr1.cc, data/yacc.c: Don't include c.m4.
6638 * src/output.c (output_skeleton): Use full path names when
6639 specifying a file to include; don't rely on include path, as
6640 it's unreliable when the working file contains a file with
6641 that name.
6642
6643 2002-12-25 Paul Eggert <eggert@twinsun.com>
6644
6645 Remove obsolete references to bison.simple and bison.hairy.
6646 Problem mentioned by Aubin Mahe in
6647 <http://lists.gnu.org/archive/html/help-bison/2002-12/msg00010.html>.
6648 * data/glr.c: Comment fix.
6649 * doc/bison.1: Remove references. Also, mention "yacc".
6650
6651 * src/getargs.c (getargs) [MSDOS]: Don't assume optarg != NULL
6652 with -g option.
6653
6654 * src/parse-gram.y (declaration): Use enum "report_states" rather
6655 than its numeric value 1.
6656
6657 * src/scan-skel.l ("@output ".*\n): Close any old yyout before
6658 opening a new one. This fixes Debian bug 165349, reported by
6659 Bruce Stephens.
6660
6661 2002-12-24 Paul Eggert <eggert@twinsun.com>
6662
6663 Version 1.75e.
6664
6665 * Makefile.maint (cvs-update): Don't assume that the shell
6666 supports $(...), as Solaris sh doesn't.
6667
6668 * src/parse-gram.y (lloc_default): Remove test for empty
6669 nonterminals at the end, since it didn't change the result.
6670
6671 2002-12-24 Paul Eggert <eggert@twinsun.com>
6672
6673 If the user does not define YYSTYPE as a macro, Bison now declares it
6674 using typedef instead of defining it as a macro. POSIX requires this.
6675 For consistency, YYLTYPE is also declared instead of defined.
6676
6677 %union directives can now have a tag before the `{', e.g., the
6678 directive `%union foo {...}' now generates the C code
6679 `typedef union foo { ... } YYSTYPE;'; this is for Yacc compatibility.
6680 The default union tag is `YYSTYPE', for compatibility with Solaris 9
6681 Yacc. For consistency, YYLTYPE's struct tag is now `YYLTYPE'
6682 instead of `yyltype'.
6683
6684 `yystype' and `yyltype' are now obsolescent macros instead of being
6685 typedefs or tags; they are no longer documented and will be
6686 withdrawn in a future release.
6687
6688 * data/glr.c (b4_location_type): Remove.
6689 (YYSTYPE): Renamed from yystype.
6690 (YYSTYPE_IS_DECLARED): New macro, used to prevent double-typedef.
6691 (struct YYLTYPE): Renamed from struct yyltype.
6692 (YYLTYPE): Renamed from yyltype.
6693 (yyltype, yystype): New (and obsolescent) macros,
6694 for backward compatibility.
6695 * data/yacc.c: Likewise.
6696
6697 * data/yacc.c (YYSTYPE): Declare as union YYSTYPE if the user
6698 does not specify a union tag. This is for compatibility with
6699 Solaris 9 yacc.
6700
6701 * src/parse-gram.y (add_param): 2nd arg is now char * not char
6702 const *, since it is now modified by stripping surrounding { }.
6703 (current_braced_code): Remove.
6704 (PERCENT_DESTRUCTOR, PERCENT_PRINTER, PERCENT_UNION,
6705 PERCENT_LEX_PARAM, PERCENT_PARSE_PARAM): Change names to include
6706 trailing " {...}". Now of type <chars>.
6707 (grammar_declaration): Adjust to bundled tokens.
6708 (code_content): Remove; stripping is now done by add_param.
6709 (print_token_value): Print contents of bundled tokens.
6710 (token_name): New function.
6711
6712 * src/reader.h (braced_code, current_braced_code): Remove.
6713 (token_name): New decl.
6714
6715 * src/scan-gram.l (handle_dollar, handle_at): Now takes int
6716 token_type, not braced_code code_kind. All uses changed.
6717 (SC_PRE_CODE): New state, for scanning after a keyword that
6718 has (or usually has) an immediately-following braced code.
6719 (token_type): New local var, to keep track of which token type
6720 to return when scanning braced code.
6721 (<INITIAL>"%destructor", <INITIAL>"%lex-param",
6722 <INITIAL>"%parse-param", <INITIAL>"%printer",
6723 <INITIAL>"%union"): Set token type and BEGIN SC_PRE_CODE
6724 instead of returning a token type immediately.
6725 (<INITIAL>"{"): Set token type.
6726 (<SC_BRACED_CODE>"}"): Use it.
6727 (handle_action_dollar, handle_action_at): Now returns bool
6728 indicating success. Fail if ! current_rule; this prevents a core dump.
6729 (handle_symbol_code_dollar, handle_symbol_code_at):
6730 Remove; merge body into caller.
6731 (handle_dollar, handle_at): Complain in invalid contexts.
6732
6733 * NEWS, doc/bison.texinfo: Document the above.
6734 * NEWS: Fix years and program names in copyright notice.
6735
6736 2002-12-17 Paul Eggert <eggert@twinsun.com>
6737
6738 * NEWS, doc/bison.texinfo (Parser Function, Pure Calling, Error
6739 Reporting, Table of Symbols): Omit mentions of %lex-param and
6740 %parse-param from the documentation for now.
6741
6742 2002-12-15 Paul Eggert <eggert@twinsun.com>
6743
6744 Undo most of the 2002-11-12 yychar -> yytoken patch, as it broke
6745 GCC 3.2.1 (which depends on yychar == YYEMPTY when there is no
6746 lookahead symbol, and which sets yychar in parser actions) and it
6747 disagreed with the Bison documentation. Bug
6748 reported by Andrew Walrond.
6749
6750 * data/yacc.c (YYTRANSLATE): Don't check for negative argument,
6751 as the caller now does that.
6752 (yyclearin, YYBACKUP, yyparse): Use yychar, not yytoken.
6753 (YYEMPTY): Parenthesize right hand side, since others use it.
6754 (yyparse): Don't assume that our generated code is the only code
6755 that sets yychar.
6756
6757 2002-12-13 Paul Eggert <eggert@twinsun.com>
6758
6759 Version 1.75d.
6760
6761 POSIX requires a "yacc" command.
6762 * src/Makefile.am (bin_SCRIPTS): New macro, for yacc.
6763 (MOSTLYCLEANFILES): Add yacc.
6764 (yacc): New rule.
6765 * doc/bison.texinfo (Invocation, Bison Options): Mention yacc
6766 as an alias for bison y.
6767
6768 * po/LINGUAS: Add da.
6769
6770 * src/getargs.c (__GNU_LIBRARY__) [lint]: Define to work around
6771 problem with latest <getopt.h>.
6772 (HACK_FOR___GNU_LIBRARY___PROTOTYPE): New macro.
6773
6774 * doc/fdl.texi: Upgrade to 1.2.
6775 * lib/alloca.c, lib/error.c, lib/getopt.c, lib/getopt.h
6776 lib/getopt1.c, lib/gettext.h, lib/memrchr.c, lib/obstack.c,
6777 lib/obstack.h, lib/strnlen.c, lib/unlocked-io.h: Sync with
6778 gnulib.
6779 * config/install-sh: Sync with autotools.
6780
6781 Fix a bad interaction with flex 2.5.23 reported by Bruce Lilly in
6782 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00114.html>.
6783 * data/yacc.c (YYLTYPE, struct yyltype): Do not define unless
6784 locations are requested.
6785 (union yyalloc): Do not depend on YYLTYPE_IS_TRIVIAL unless
6786 locations are requested.
6787
6788 2002-12-12 Paul Eggert <eggert@twinsun.com>
6789
6790 Remove unportable casts and storage allocation tricks.
6791 While we're at it, remove almost all casts, since they
6792 usually aren't needed and are a sign of trouble.
6793
6794 * configure.ac (AC_CHECK_TYPES): Check for uintptr_t.
6795
6796 * src/derives.c (derives_compute): Do not subtract NTOKENS from
6797 the pointer DSET returned by malloc; this isn't portable.
6798 Instead, always use DSET[i - NTOKENS] rather than DSET[i].
6799 Similarly for DERIVES.
6800 * src/lalr.c (set_goto_map): Likewise, for GOTO_MAP and TEMP_MAP.
6801 * src/nullable.c (nullable_compute): Likewise, for RSETS and NULLABLE.
6802 * src/reduce.c (reduce_grammar_tables): Likewise, for nontermmap
6803
6804 * src/derives.c (derives_compute): Do not bother invoking
6805 int_of_rule_number, since rule numbers are integers.
6806
6807 * src/files.c (concat2, tr, compute_base_name): Use xmalloc (N)
6808 rather than XMALLOC (char, N).
6809
6810 * src/files.c (filename_split): Rewrite to avoid cast.
6811
6812 * src/gram.h (symbol_number_as_item_number,
6813 item_number_as_symbol_number, rule_number_as_item_number,
6814 item_number_as_rule_number):
6815 Now inline functions rather than macros, to avoid casts.
6816 * src/state.h (state_number_as_int): Likewise.
6817 * src/tables.c (state_number_to_vector_number,
6818 symbol_number_to_vector_number): Likewise.
6819
6820 * src/gram.h (int_of_rule_number): Remove; no longer used.
6821
6822 * src/lalr.c (add_lookback_edge): Use malloc rather than calloc,
6823 since the resulting storage is always stored into.
6824
6825 * src/main.c (alloca) [C_ALLOCA]: Add decl here, the only place
6826 where it's needed.
6827
6828 * src/muscle_tab.c (muscle_m4_output):
6829 Now inline. Return bool, not int.
6830 * src/state.c (state_compare): Likewise.
6831 * src/symtab.c (symbol_check_defined,
6832 symbol_check_alias_consistency, symbol_pack, symbol_translation,
6833 hash_compare_symbol, hash_symbol):
6834 Likewise.
6835 * src/uniqstr.c (uniqstr_print): Likewise.
6836 * src/muscle_tab.c (muscle_m4_output_processor):
6837 New function, to avoid casts.
6838 * src/state.c (state_comparator, stage_hasher): Likewise.
6839 * src/symtab.c (symbol_check_defined_processor,
6840 symbol_check_alias_consistency_processor, symbol_pack_processor,
6841 symbol_translation_processor, hash_symbol_comparator,
6842 hash_symbol_hasher): Likewise.
6843 * src/uniqstr.c (uniqstr_print_processor): Likewise.
6844 * src/muscle_tab.c (muscles_m4_output):
6845 Use new functions instead of casting old functions unportably.
6846 * src/state.c (state_hash_new): Likewise.
6847 * src/symtab.c (symbols_new, symbols_do, symbols_check_defined,
6848 symbols_token_translations_init):
6849 Likewise.
6850 * src/uniqstr.c (uniqstrs_new, hash_initialize, uniqstrs_do): Likewise.
6851
6852 * src/output.c (GENERATE_MUSCLE_INSERT_TABLE): Use long local
6853 var instead of casting to long, to avoid casts.
6854 (prepare_states): Use MALLOC rather than alloca, so that we don't
6855 have to worry about alloca.
6856 * src/state.c (state_hash_lookup): Likewise.
6857
6858 * src/scan-gram.l (<SC_ESCAPED_CHARACTER>"'"): Use unsigned char
6859 local var instead of casting to unsigned char, to avoid casts.
6860
6861 * src/state.c (TRANSITIONS_ALLOC, ERRS_ALLOC, REDUCTIONS_ALLOC,
6862 STATE_ALLOC): Remove.
6863 (transitions_new, errs_new, reductions_new, state_new): Use malloc
6864 rather than calloc, and use offsetof to avoid allocating slightly
6865 too much storage.
6866 (state_new): Initialize all members.
6867
6868 * src/state.c (state_hash): Use unsigned accumulator, not signed.
6869
6870 * src/symtab.c (symbol_free): Remove; unused.
6871 (symbol_get): Remove cast in lhs of assignment.
6872 (symbols_do): Now static. Accept generic arguments, not
6873 hashing-related ones.
6874
6875 * src/symtab.h: (NUMBER_UNDEFINED): Remove unnecessary cast.
6876 (symbol_processor): Remove.
6877 (symbols_do): Remove decl; now static.
6878
6879 * src/system.h (alloca): Remove; decl no longer needed.
6880 (<stddef.h>): Include, for offsetof.
6881 (<inttypes.>, <stdint.h>): Include if available.
6882 (uintptr_t): New type, if system lacks it.
6883 (CALLOC, MALLOC, REALLOC): New macros.
6884 All uses of XCALLOC, XMALLOC, and XREALLOC changed to use these
6885 new macros.
6886
6887 * src/tables.c (table_size): Now int, to pacify GCC.
6888 (table_grow, table_ninf_remap): Use signed table size.
6889 (save_row): Don't bother initializing locals when not needed.
6890 (default_goto, goto_actions, pack_vector): Remove unnecessary casts.
6891 * src/uniqstr.c (hash_compare_uniqstr): Likewise.
6892
6893 * src/vcg.h: Correct misspellings.
6894
6895 * src/vcg_defaults.h (G_CMAX): Now INT_MAX.
6896
6897
6898 * src/getargs.c (getargs): Don't assume EOF == -1.
6899
6900 2002-12-09 Paul Eggert <eggert@twinsun.com>
6901
6902 Change identifier spellings to avoid collisions with names
6903 that are reserved by POSIX.
6904
6905 Don't use names ending in _t, since POSIX reserves them.
6906 For consistency, remove _e and _s endings -- they're weren't
6907 needed to remove ambiguity. All uses changed.
6908 * src/uniqstr.h (uniqstr): Renamed from uniqstr_t, which in
6909 turn was just renamed from struniq_t.
6910 * src/uniqstr.c (uniqstr_processor): Renamed from struniq_processor,
6911 which in turn was just renamed from struniq_processor_t.
6912 (hash_compare_uniqstr): Renamed from hash_compare_struniq, which
6913 in turn was renamed from hash_compare_struniq_t.
6914 * src/LR0.c (struct state_list): Renamed from struct state_list_s.
6915 (state_list): Renamed from state_list_t.
6916 * src/assoc.h (assoc): Renamed from assoc_t.
6917 * src/conflicts.c (enum conflict_resolution): Renamed from
6918 enum conflict_resolution_e.
6919 * src/derives.c (struct rule_list): Renamed from struct rule_list_s.
6920 (rule_list): Renamed from rule_list_t.
6921 * src/getargs.h (enum trace): Renamed from enum trace_e.
6922 (enum report): Renamed from enum report_e.
6923 * src/gram.h (item_number): Renamed from item_number_t.
6924 (rule_number): Renamed from rule_number_t.
6925 (struct rule_s): Remove the "rule_s" part; not used.
6926 (rule): Renamed from rule_t.
6927 (rule_filter): Renamed from rule_filter_t.
6928 * src/lalr.c (struct goto_list): Renamed from struct goto_list_s.
6929 (goto_list): Renamed from goto_list_t.
6930 * src/lalr.h (goto_number): Renamed from goto_number_t.
6931 * src/location.h (location): Renamed from location_t.
6932 * src/muscle_tab.c (muscle_entry): Renamed from muscle_entry_t,
6933 and moved here from:
6934 * src/muscle_tab.h (muscle_entry_t): here.
6935 * src/nullable.c (struct rule_list): Renamed from struct rule_list_s.
6936 (rule_list): Renamed from rule_list_t.
6937 * src/print_graph.c (static_graph): Renamed from graph.
6938 * src/reader.h (braced_code): Renamed from braced_code_t.
6939 Remove brace_code_e tag.
6940 * src/relation.h (relation_node): Renamed from relation_node_t.
6941 (relation_nodes): Renamed from relation_nodes_t.
6942 (relation): Renamed from relation_t.
6943 * src/state.h (state_number): Renamed from state_number_t.
6944 (struct state): Renamed from struct state_s.
6945 (state): Renamed from state_t.
6946 (transitions): Renamed from transitions_t. Unused (and
6947 misspelled) transtion_s tag removed.
6948 (errs): Renamed from errs_t. Unused errs_s tag removed.
6949 (reductions): Renamed from reductions_t. Unused tag
6950 reductions_s removed.
6951 * src/symlist.h (symbol_list): Renamed from symbol_list_t.
6952 (struct symbol_list): Renamed from struct symbol_list_s.
6953 * src/symtab.h (symbol_number): Renamed from symbol_number_t.
6954 (struct symbol): Renamed from struct symbol_s.
6955 (symbol): Renamed from symbol_t.
6956 * src/tables.c (vector_number): Renamed from vector_number_t.
6957 (action_number): Renamed from action_t.
6958 * src/tables.h (base_number): Renamed from base_t.
6959 * src/vcg.h (enum color): Renamed from enum color_e.
6960 (enum textmode): Renamed from enum textmode_e.
6961 (enum shape): Renamed from enum shape_e.
6962 (struct colorentry): Renamed from struct colorentry_s.
6963 (struct classname): Renamed from struct classname_s.
6964 (struct infoname): Renamed from struct infoname_s.
6965 (enum layoutalgorithm): Renamed from enum layoutalgorithm_e.
6966 (enum decision): Renamed from enum decision_e.
6967 (enum orientation): Renamed from enum orientation_e.
6968 (enum alignment): Renamed from enum alignment_e.
6969 (enum arrow_mode): Renamed from enum arrow_mode_e.
6970 (enum crossing_type): Renamed from enum crossing_type_e.
6971 (enum view): Renamed from enum view_e.
6972 (struct node): Renamed from struct node_s.
6973 (node): Renamed from node_t.
6974 (enum linestyle): Renamed from enum linestyle_e.
6975 (enum arrowstyle): Renamed from enum arrowstyle_e.
6976 (struct edge): Renamed from struct edge.
6977 (edge): Renamed from edge_t.
6978 (struct graph): Renamed from struct graph_s.
6979 (graph): Renamed from graph_t.
6980 * tests/calc.at (_AT_DATA_CALC_Y, Simple LALR Calculator):
6981 Rename value_t -> value.
6982 * tests/input.at (Torturing the Scanner): Rename value_t -> value,
6983 value_t_as_yystype -> value_as_yystype.
6984
6985 Don't include <errno.h> in the mainstream code, since it
6986 reserves E[A-Z0-9]* and we want to use symbols like 'EQUALS'.
6987 * lib/get-errno.c, lib/get-errno.h: New files.
6988 * lib/Makefile.am (libbison_a_SOURCES): Add get-errno.h,
6989 get-errno.c.
6990 * src/files.c (xfopen, xfclose): Use get_errno instead of errno.
6991 * src/output.c (output_skeleton): Likewise.
6992 * src/scan-gram.l (<INITIAL>{int}): Use set_errno and get_errno
6993 instead of errno.
6994 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>\\x[0-9abcdefABCDEF]+):
6995 Likewise.
6996 (handle_action_dollar, handle_action_at): Likewise.
6997 * src/system.h: Do not include <errno.h>.
6998 (TAB_EXT): Renamed from EXT_TAB.
6999 (OUTPUT_EXT): Renamed from EXT_OUTPUT.
7000
7001 Avoid str[a-z]*, since <string.h> reserves that name space.
7002 Change all instances of "struniq" in names to "uniqstr", and
7003 likewise for "STRUNIQ" and "UNIQSTR".
7004 * src/uniqstr.c: Renamed from src/struniq.c.
7005 * src/uniqstr.h: Renamed from src/struniq.h.
7006 * src/Makefile.am (bison_SOURCES): Adjust to these renamings.
7007 * src/files.c (strsuffix): Remove; unused.
7008 (concat2): Renamed from stringappend. Now static.
7009 * src/files.h (strsuffix, stringappend): Remove; unused.
7010 * src/parse-gram.y (<chars>): Renamed from <string>.
7011 (<uniqstr>): Renamed from <struniq>.
7012 * src/scan-gram.l (obstack_for_string): Renamed from string_obstack.
7013 * src/vcg.h (struct node_s.expand): Renamed from struct node_s.stretch.
7014 (struct graph_s.expand): Renamed from struct graph_s.stretch.
7015 * src/vcg_defaults.h (G_EXPAND): Renamed from G_STRETCH.
7016 (G_LONG_STRAIGHT_PHASE): Renamed from G_STRAIGHT_PHASE.
7017 (N_EXPAND): Renamed from N_STRETCH.
7018
7019 Avoid *_MAX and *_MIN, since <limits.h> reserves that name space.
7020 * data/yacc.c (YYSTACK_GAP_MAXIMUM): Renamed from YYSTACK_GAP_MAX.
7021 * src/gram.h (ITEM_NUMBER_MAX, ITEM_NUMBER_MIN, RULE_NUMBER_MAX):
7022 Remove; unused.
7023 * src/lalr.h (GOTO_NUMBER_MAXIMUM): Renamed from GOTO_NUMBER_MAX.
7024 * src/state.h (STATE_NUMBER_MAXIMUM): Renamed from STATE_NUMBER_MAX.
7025 * src/symtab.h (SYMBOL_NUMBER_MAXIMUM): Renamed from SYMBOL_NUMBER_MAX.
7026 * src/tables.c (VECTOR_NUMBER_MAX, VECTOR_NUMBER_MIN): Remove; unused.
7027 (BASE_MAXIMUM): Renamed from BASE_MAX.
7028 (BASE_MINIMUM): Renamed from BASE_MIN.
7029 (ACTION_MAX): Remove; unused.
7030 (ACTION_NUMBER_MINIMUM): Renamed from ACTION_MIN.
7031 Unnecessary casts removed from above defines.
7032
7033
7034 Fix misspelling in names.
7035 * src/vcg.h (enum_alignment_e): Renamed from enum_alignement_e.
7036 * src/vcg_defaults.h (G_NODE_ALIGNMENT): Renamed from
7037 G_NODE_ALIGNEMENT.
7038
7039
7040 * lib/timevar.c (timevar_report): Renamed from time_report,
7041 for consistency with other names.
7042 * lib/timevar.h (timevar_report): New decl.
7043 * src/system.h (time_report): Remove; decl is now in lib/timevar.h.
7044
7045
7046 Sort include-file uses.
7047
7048 Reorder all include files under src to be in the order "system.h".
7049 then the ../lib include files in angle brackets (alphabetized),
7050 then the . include files in double-quotes (alphabetized). Fix
7051 dependency breakages encountered in this process, as follows:
7052 * src/closure.h, src/derives.h, src/state.h: Include "gram.h".
7053 * src/complain.c: Don't include stdlib.h, string.h _LIBC stuff.
7054 * src/state.h: Include "symtab.h".
7055
7056 2002-12-08 Paul Eggert <eggert@twinsun.com>
7057
7058 * data/glr.c, data/lalr1.cc, data/yacc.c: Do not use __file__,
7059 since this causes problems when __file__ contains character
7060 sequences like "@" that are treated specially by src/scan-skel.l.
7061 Instead, just use the file's basename. This fixes the bug
7062 reported by Martin Mokrejs in
7063 <http://lists.gnu.org/archive/html/bug-bison/2002-12/msg00007.html>.
7064
7065 2002-12-06 Paul Eggert <eggert@twinsun.com>
7066
7067 Add support for rules that do not have trailing semicolons, as
7068 POSIX requires. Improve the quality of locations in Bison
7069 diagnostics.
7070
7071 * src/location.c: Include <quotearg.h>.
7072 (empty_location): Now const.
7073 (location_print): New function. Follow the recommendation of the
7074 GNU Coding Standards for locations that span file boundaries.
7075 * src/location.h: Do not include <quotearg.h>; no longer needed.
7076 (boundary): New type.
7077 (location_t): Use it. This allows locations to span file boundaries.
7078 All member uses changed: file -> start.file or end.file (as needed),
7079 first_line -> start.line, first_column -> start.column,
7080 last_line -> end.line, last_column -> end.column.
7081 (equal_boundaries): New function.
7082 (LOCATION_RESET, LOCATION_STEP): Remove.
7083 (LOCATION_PRINT): Remove. All callers changed to use location_print.
7084 (empty_location): Now const.
7085 (location_print): New decl.
7086 * src/parse-gram.y (lloc_default): New function, which handles
7087 empty locations more accurately.
7088 (YYLLOC_DEFAULT): Use it.
7089 (%token COLON): Remove.
7090 (%token ID_COLON): New token.
7091 (rules): Use it.
7092 (declarations, rules): Remove trailing semicolon.
7093 (declaration, rules_or_grammar_declaration):
7094 Allow empty (";") declaration.
7095 (symbol_def): Remove empty actions; no longer needed.
7096 (rules_or_grammar_declaration): Remove trailing semicolon.
7097 (semi_colon.opt): Remove.
7098 * src/reader.h: Include location.h.
7099 (scanner_cursor): New decl.
7100 * src/reduce.c (nonterminals_reduce): Use warn_at rather than
7101 rolling our own.
7102 * src/scan-gram.l (YY_USER_INIT): Initialize scanner_cursor instead
7103 of *loc.
7104 (STEP): Remove. No longer needed, now that adjust_location does
7105 the work. All uses removed.
7106 (scanner_cursor): New var.
7107 (adjust_location): Renamed from extend_location. It now sets
7108 *loc and adjusts the scanner cursor. All uses changed.
7109 Don't bother testing for CR.
7110 (handle_syncline): Remove location arg; now updates scanner cursor.
7111 All callers changed.
7112 (unexpected_end_of_file): Now accepts start boundary of token or
7113 comment, not location. All callers changed. Update scanner cursor,
7114 not the location.
7115 (SC_AFTER_IDENTIFIER): New state.
7116 (context_state): Renamed from c_context. All uses changed.
7117 (id_loc, code_start, token_start): New local vars.
7118 (<INITIAL,SC_AFTER_IDENTIFIER>): New initial context. Move all
7119 processing of Yacc white space and equivalents here.
7120 (<INITIAL>{id}): Save id_loc. Begin state SC_AFTER_IDENTIFIER
7121 instead of returning ID immediately, since we need to search for
7122 a subsequent colon.
7123 (<INITIAL>"'", "\""): Save token_start.
7124 (<INITIAL>"%{", "{", "%%"): Save code_start.
7125 (<SC_AFTER_IDENTIFIER>): New state, looking for a colon.
7126 (<SC_YACC_COMMENT>, <SC_COMMENT>, <SC_LINE_COMMENT>):
7127 BEGIN context_state at end, not INITIAL.
7128 (<SC_ESCAPED_STRING>"\"", <SC_ESCAPED_CHARACTER>"'",
7129 <SC_BRACED_CODE>"}", <SC_PROLOGUE>"%}", <SC_EPILOGUE><<EOF>>):
7130 Return correct token start.
7131 (<SC_BRACED_CODE,SC_PROLOGUE,SC_EPILOGUE>): Save start boundary when
7132 the start of a character, string or multiline comment is found.
7133 * tests/conflicts.at (S/R in initial, Defaulted Conflicted
7134 Reduction): Adjust reported locations to match the more-precise
7135 results now expected.
7136 * tests/input.at (Invalid $n, Invalid @n, Type Clashes): Likewise.
7137 * tests/reduce.at (Useless Rules, Reduced Automaton,
7138 Underivable Rules): Likewise.
7139 * tests/regression.at (Invalid inputs): No longer `expecting ";"
7140 or "|"' now that so many other tokens are allowed by the new grammar.
7141
7142 * src/complain.h (current_file): Remove duplicate decl;
7143 current_file is now owned by files.h.
7144 * src/complain.c, src/scan-gram.l: Include files.h.
7145
7146 2002-12-06 Paul Eggert <eggert@twinsun.com>
7147
7148 * data/glr.c (yy_reduce_print): Don't assume that yyrline[yyrule]
7149 promotes to int; it might be unsigned int.
7150 * data/yacc.c (yy_reduce_print): Likewise.
7151
7152 * doc/bison.texinfo (Table of Symbols): YYERROR_VERBOSE should
7153 be #defined in the prologue, not in the Bison declarations.
7154 This fixes Debian Bug 102878, reported by Shaul Karl.
7155
7156 2002-12-02 Paul Eggert <eggert@twinsun.com>
7157
7158 * configure.ac (AC_REPLACE_FUNCS): Add strtoul.
7159 * lib/strtoul.c: New file, from gnulib.
7160 This fixes a porting bug reported by Peter Klein in
7161 <http://lists.gnu.org/archive/html/bug-bison/2002-12/msg00000.html>.
7162
7163 2002-11-30 Paul Eggert <eggert@twinsun.com>
7164
7165 * src/scan-gram.l (no_cr_read, extend_location): Move to epilogue,
7166 and put only a forward declaration in the prologue. This is for
7167 consistency with the other scanner helper functions.
7168
7169 Type clashes now generate warnings, not errors, since it
7170 appears that POSIX may allow some grammars with type clashes.
7171 * src/reader.c (grammar_current_rule_check): Warn about
7172 type clashes instead of complaining.
7173 * tests/input.at (Type Clashes): Expect warnings, not complaints.
7174
7175 Add Yacc library, since POSIX requires it.
7176 * doc/bison.texinfo (Yacc Library): New node. Regenerate top menu.
7177 * lib/Makefile.am (lib_LIBRARIES, liby_a_SOURCES): New macros.
7178 * lib/main.c, lib/yyerror.c: New files.
7179
7180 gram_error can be static; it need not be extern.
7181 * src/reader.h (gram_error): Remove decl.
7182 * src/parse-gram.y (gram_error): Now static. Add static decl.
7183 (print_token_value): Omit parameter names from forward decl,
7184 for consistency.
7185
7186 2002-11-29 Paul Eggert <eggert@twinsun.com>
7187
7188 * doc/bison.texinfo: Emphasize that yylex and yyerror must
7189 be declared before being used. E.g., one should typically
7190 declare them in the prologue. Use GNU coding style in examples.
7191 Put "const" consistently after the type it modifies. Mention
7192 that C99 supports "inline". Mention that yyerror traditionally
7193 returns "int".
7194
7195 %parse-param and %lex-param now take just one argument, the
7196 declaration; the argument name is deduced from the declaration.
7197
7198 * doc/bison.texinfo (Parser Function, Pure Calling, Error
7199 Reporting, Table of Symbols): Document this.
7200 * src/parse-gram.y (add_param): New function.
7201 (COMMA): Remove.
7202 (declaration): Implement new rule for %parse-param and %lex-param.
7203 * src/scan-gram.l: "," now elicits a warning, rather than being
7204 a token; this is more compatible with byacc.
7205 * tests/calc.at (Simple LALR Calculator): Adopt new convention.
7206
7207 2002-11-27 Paul Eggert <eggert@twinsun.com>
7208
7209 Rename identifiers to avoid real and potential collisions.
7210
7211 * data/c.m4 (b4_yysymprint_generate): yyout -> yyoutput,
7212 to avoid collision with lex macro described by Bruce Lilly in
7213 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00114.html>.
7214 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise.
7215 * doc/bison.texinfo (Prologue, Tracing): yyprint -> print_token_value.
7216 * src/parse-gram.y (print_token_value): Renamed from yyprint.
7217 All uses changed.
7218 (YYPARSE_PARAM, YYLEX_PARAM, yycontrol): Remove. All uses changed.
7219 The name "yycontrol" violates the name space rules, and this stuff
7220 wasn't being used anyway.
7221 (input): Remove action; this stuff wasn't being used.
7222 (gram_error): Rename local variable yylloc -> loc.
7223 * src/reader.h (struct gram_control_s, gram_control_t): Remove.
7224 (YY_DECL): Don't use "yy" at start of local variables.
7225 All uses changed, e.g., yylloc -> loc.
7226 * src/scan-gram.l (STEP): Renamed from YY_STEP. All uses changed.
7227 (STRING_GROW): Renamed from YY_OBS_GROW. All uses changed.
7228 (STRING_FINISH): Renamed from YY_OBS_FINISH. All uses changed.
7229 (STRING_FREE): Renamed from YY_OBS_FREE. All uses changed.
7230
7231 * src/parse-gram.y (gram_error): loc is now const *.
7232 * src/reader.h (gram_error): Likewise.
7233
7234 2002-11-24 Paul Eggert <eggert@twinsun.com>
7235
7236 Version 1.75c.
7237
7238 * tests/actions.at (Actions after errors): Use an output format
7239 more similar to that of the Printers and Destructors test.
7240 Test the position of the ';' token too.
7241 (Printers and Destructors): Likewise.
7242 (Printers and Destructors: %glr-parser): Remove for now, to avoid
7243 unnecessarily alarming people when the test fails.
7244
7245 * data/yacc.c (yyerrlab1): Move this label down, so that the
7246 parser does not discard the lookahead token if the user code
7247 invokes YYERROR. This change is required for POSIX conformance.
7248
7249 * lib/error.c: Sync with gnulib.
7250
7251 2002-11-22 Paul Eggert <eggert@twinsun.com>
7252
7253 * lib/quotearg.c, lib/quotearg.h: Sync with gnulib.
7254 * lib/mbswidth.c, lib/mbswidth.h: Likewise.
7255 * lib/xmalloc.c: Likewise.
7256
7257 2002-11-20 Paul Eggert <eggert@twinsun.com>
7258
7259 * lib/argmatch.c, lib/argmatch.h: Sync with gnulib.
7260
7261 2002-11-20 Paul Eggert <eggert@twinsun.com>
7262
7263 Avoid use of <assert.h>, as the GNU Coding Standards hint that one
7264 should use `if (! x) abort ();' rather than `assert (x);', and
7265 anyway it's one less thing to worry about configuring.
7266
7267 * data/glr.c, lib/hash.c, src/system.h: Do not include <assert.h>.
7268 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise,
7269 and replace all instances of assert with abort.
7270 * tests/calc.at (_AT_DATA_CALC_Y): Likewise.
7271 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Likewise.
7272
7273 * data/glr.c (yydoAction, yyglrReduce, yysplitStack, yyresolveStates,
7274 yyresolveAction, yyprocessOneStack): Use abort rather than assert.
7275 * lib/hash.c (hash_lookup, hash_get_first, hash_get_next,
7276 hash_find_entry, hash_rehash, hash_insert): Likewise.
7277 * src/conflicts.c (resolve_sr_conflict): Likewise.
7278 * src/lalr.c (set_goto_map, map_goto): Likewise.
7279 * src/nullable.c (nullable_compute): Likewise.
7280 * src/output.c (prepare_rules, token_definitions_output): Likewise.
7281 * src/reader.c (packgram, reader): Likewise.
7282 * src/state.c (state_new, state_free, state_transitions_set,
7283 state_reduction_find): Likewise.
7284 * src/symtab.c (symbol_user_token_number_set, symbol_make_alias,
7285 symbol_pack): Likewise.
7286 * src/tables.c (conflict_row, pack_vector): Likewise.
7287 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str,
7288 get_layoutalgorithm_str, get_decision_str, get_orientation_str,
7289 get_node_alignement_str, get_arrow_mode_str, get_crossing_type_str,
7290 get_view_str, get_linestyle_str, get_arrowstyle_str): Likewise.
7291
7292 * lib/argmatch.h (ARRAY_CARDINALITY): Do not bother to #undef.
7293 (ARGMATCH_CONSTRAINT): New macro.
7294 (ARGMATCH_ASSERT): Use it.
7295
7296 * src/system.h (verify): New macro.
7297 * src/getargs.c (trace_argmatch, report_argmatch): Use verify
7298 rather than assert.
7299 * src/tables.c (tables_generate): Likewise.
7300
7301 * src/struniq.c (struniq_assert): Now returns void, and aborts
7302 if the assertion is false.
7303 (struniq_assert_p): Remove.
7304 * src/struniq.h: Likewise.
7305
7306 2002-11-18 Paul Eggert <eggert@twinsun.com>
7307
7308 * data/glr.c (yygetLRActions): Replace `yyindex' with
7309 `yytable[yyindex]' to fix typo introduced in my 2002-11-09 patch.
7310 This fixes the regression with Sun ONE Studio 7 cc that I reported in
7311 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00077.html>.
7312
7313 2002-11-18 Akim Demaille <akim@epita.fr>
7314
7315 * doc/bison.texinfo (Tracing): `yyprint' shouldn't prepend a
7316 space.
7317 From Tim Van Holder.
7318
7319 2002-11-17 Paul Eggert <eggert@twinsun.com>
7320
7321 Pacify Sun ONE Studio 7 lint. Also, rename "ParseError"
7322 to "SyntaxError" for consistency with my 2002-11-15 change.
7323
7324 * data/glr.c (YYDPRINTF, YYDSYMPRINT, YYDSYMPRINTF) [!YYDEBUG]: Do
7325 not define to {}, since this breaks the common use of `YYDPRINTF
7326 ((...));' if a single statement is desired (e.g. before `else').
7327 Work around GCC warnings by surrounding corresponding calls with
7328 {} if needed.
7329 (yyhasResolvedValue): Remove unused function.
7330 (yymergeOptionSets, yyresolvStack): Use `continue;' for empty
7331 loop body.
7332 (yyreportSyntaxError): Renamed from yyreportParseError.
7333 (yyrecoverSyntaxError): Renamed from yyrecoverParseError.
7334 All uses changed.
7335 * tests/calc.at (_AT_DATA_CALC_Y): Make vars static instead of
7336 extern when possible. Remove unused initializations.
7337
7338 2002-11-16 Akim Demaille <akim@epita.fr>
7339
7340 Augment the similarity between GLR and LALR traces.
7341
7342 * data/yacc.c (yy_stack_print, YY_STACK_PRINT, yy_reduce_print)
7343 (YY_REDUCE_PRINT): New.
7344 (yyparse): Use them.
7345 * data/glr.c (yy_reduce_print): Use YYFPRINTF, no need for
7346 YYDPRINT here.
7347 (yyglrReduce, yyrecoverParseError, yyparse): Don't report the
7348 state reached after the reduction/recovery, since...
7349 (yyparse, yyprocessOneStack): Report the state we are entering in.
7350
7351 2002-11-16 Akim Demaille <akim@epita.fr>
7352
7353 * src/getargs.h, src/getargs.c (trace_e, trace_args, trace_types):
7354 Add support for --trace=skeleton.
7355 * src/scan-skel.l: %option debug.
7356 Scan strings of non-@ or \n instead of character by character.
7357 (scan_skel): Handle trace_skeleton.
7358 (QPUTS): New.
7359 (@output_parser_name@, @output_header_name@): ``Restore'' their
7360 support (used to be M4 macros).
7361 * data/yacc.c: Quote larger chunks, a la glr.c.
7362 * data/lalr1.cc: Likewise.
7363 The header guards are no longer available, so use some other
7364 string than `YYLSP_NEEDED'.
7365
7366 2002-11-16 Akim Demaille <akim@epita.fr>
7367
7368 Make the ``Printers and Destructors'' test more verbose, taking
7369 `yacc.c''s behavior as (possibly wrong) reference.
7370
7371 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Use printf
7372 instead of fprint on stdout.
7373 Set and report the last_line of the symbols.
7374 Consistently display values and locations.
7375
7376 2002-11-16 Paul Eggert <eggert@twinsun.com>
7377
7378 * data/yacc.c: Avoid over-quoting of __line__ and __file__.
7379
7380 2002-11-15 Paul Eggert <eggert@twinsun.com>
7381
7382 * tests/actions.at (Actions after errors): New test case.
7383
7384 * data/glr.c, data/lalr1.cc, data/yacc.cc, doc/bison.texinfo,
7385 src/conflicts.c, src/parse-gram.y, src/tables.c, src/tables.h,
7386 tests/action.at, tests/calc.at, tests/conflicts.at,
7387 tests/cxx-type.at, tests/regression.at:
7388 "parse error" -> "syntax error" for POSIX compatibility.
7389 "parsing stack overflow..." -> "parser stack overflow" so
7390 that code matches Bison documentation.
7391
7392 2002-11-15 Akim Demaille <akim@epita.fr>
7393
7394 * src/parse-gram.y (declaration): Have %parse-param and %lex-param
7395 take two BRACED_CODE, not two string_content.
7396 Free the scanner's obstack when we are done.
7397 (code_content): New.
7398 * tests/calc.at: Adjust.
7399 * doc/bison.texinfo: Adjust.
7400 Also, make sure to include the `,' for these declarations.
7401
7402 2002-11-15 Tim Van Holder <tim.van.holder@pandora.be>
7403
7404 * m4/prereq.m4: Removed the commented jm_PREREQ_HASH
7405 definition; avoids potential autoreconf problems.
7406
7407 2002-11-15 Akim Demaille <akim@epita.fr>
7408
7409 Always check the value returned by yyparse.
7410
7411 * tests/calc.at (_AT_DATA_CALC_Y): Have `main' exit with the value
7412 returned by yyparse.
7413 (_AT_CHECK_CALC_ERROR): Take the expected exit value as argument.
7414 Adjust calls.
7415 * tests/glr-regr1.at (glr-regr1.y): Have `main' exit with the value
7416 returned by yyparse.
7417
7418 2002-11-14 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
7419
7420 * data/glr.c (yyFail): Always set yyerrflag. Corrects regression
7421 on input.at test.
7422
7423 2002-11-14 Paul Eggert <eggert@twinsun.com>
7424
7425 * src/output.c (output_skeleton): Call xfopen instead of
7426 duplicating xfopen's body.
7427
7428 Fix bugs reported by Nelson H. F. Beebe in
7429 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00078.html>.
7430
7431 * tests/headers.at (AT_TEST_CPP_GUARD_H): Don't assume that
7432 "$CC -E foo.h" is allowed, as this doesn't work with the Portland
7433 Group compiler. Instead, use "$CC -E bar.c". Include the .h
7434 file twice in the grammar, as an extra check.
7435
7436 * tests/input.at (Torturing the Scanner): Surround the
7437 backslash-newline tests with "#if 0", to make it less likely that
7438 we'll run into compiler bugs. Bring back solitary \ inside
7439 comment, but add a closing comment to work around HP C bug. Don't
7440 test backslash-newline in C character constant.
7441
7442 2002-11-14 Akim Demaille <akim@epita.fr>
7443
7444 * tests/synclines.at (AT_SYNCLINES_COMPILE): Ignore the exit
7445 status of the compiler.
7446 Calling `exit 1' is no longer needed.
7447 Reported by Nelson H. F. Beebe.
7448
7449 2002-11-14 Akim Demaille <akim@epita.fr>
7450
7451 * tests/atlocal.in (CPPFLAGS): We have config.h.
7452 * tests/testsuite.at (AT_DATA_GRAMMAR_PROLOGUE, AT_DATA_GRAMMAR):
7453 New.
7454 * tests/actions.at, tests/calc.at, tests/conflicts.at,
7455 * tests/cxx-type.at, tests/glr-regr1.at, tests/headers.at,
7456 * tests/regression.at, tests/torture.at: Use them for all the
7457 grammars that are to be compiled.
7458 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Rename as...
7459 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): this.
7460 * doc/bison.texinfo (GLR Parsers): Document `inline'.
7461
7462 2002-11-14 Akim Demaille <akim@epita.fr>
7463
7464 * doc/bison.texinfo: Various formatting changes (alignments in
7465 samples, additional @group/@end group, GCS in samples.
7466 Use @deffn instead of simple @table to define the directives,
7467 macros, variables etc.
7468
7469 2002-11-13 Paul Eggert <eggert@twinsun.com>
7470
7471 Fix some bugs reported by Albert Chin-A-Young in
7472 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00066.html>.
7473
7474 * tests/input.at (Torturing the Scanner): Don't invoke "cc a.c b.c
7475 -o c"; the HP C compiler chatters during compilation.
7476 Instead, invoke "cc -c a.c -o a.o; cc -c b.c -o b.o; cc a.o b.o -o c".
7477 * tests/headers.at (export YYLTYPE): Likewise.
7478
7479 * tests/input.at (Torturing the Scanner): Remove lines containing
7480 solitary backslashes, as they tickle a bug in the HP C compiler.
7481
7482 * tests/glr-regr1.at (Badly Collapsed GLR States): Avoid //
7483 comments, since they're not portable. Use GNU coding style.
7484
7485 2002-11-13 Akim Demaille <akim@epita.fr>
7486
7487 * data/yacc.c: Leave bigger chunks of quoted text.
7488 (YYDSYMPRINTF): New.
7489 Use it to report symbol activities.
7490 * data/glr.c (YYDSYMPRINTF): New.
7491 Use it.
7492
7493 2002-11-12 Paul Eggert <eggert@twinsun.com>
7494
7495 Version 1.75b.
7496
7497 * data/glr.c (yydoAction): Return YYRESULTTAG, not int.
7498 (yyglrReduce): Return yyok, not 0.
7499 This should avoid the enumerated-type warnings reported
7500 by Nelson H. F. Beebe in
7501 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00057.html>.
7502
7503 * lib/bbitset.h (BITSET_INLINE): Remove.
7504 * lib/bitset.h [! BITSET_INLINE]: Remove.
7505 (bitset_set, bitset_reset, bitset_test): Rename local vars
7506 to avoid shadowing warnings by GCC.
7507
7508 * data/glr.c (inline): Remove #define. It's the user's
7509 responsibility to #define it away, just like 'const'.
7510 This fixes one of the bugs reported by Nelson H. F. Beebe in
7511 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00058.html>.
7512
7513 * Makefile.maint (po-check): Scan .l and .y files instead of the
7514 .c and the .h files that they generate. This fixes the bug
7515 reported by Tim Van Holder in:
7516 <http://lists.gnu.org/archive/html/bison-patches/2002-11/msg00062.html>
7517 Look for N_ as well as for _. Try to avoid matching #define for
7518 N_ and _.
7519 * po/POTFILES.in: Remove src/parse-gram.c, src/scan-gram.c,
7520 src/system.h. Add src/parse-gram.y, src/scan-gram.l.
7521 * src/scan-gram.l: Revamp regular expressions so that " and '
7522 do not confuse xgettext.
7523
7524 * src/struniq.h (struniq_new): Do not declare the return type
7525 to be 'const'; this violates the C standard.
7526 * src/struniq.c (struniq_new): Likewise.
7527
7528 2002-11-12 Albert Chin-A-Young <china@thewrittenword.com>
7529
7530 * src/Makefile.am (LDADD): Link $(LIBINTL) last to avoid the
7531 duplicate definition of optind on Tru64 UNIX 4.0D with the Compaq
7532 linker.
7533
7534 2002-11-12 Akim Demaille <akim@epita.fr>
7535
7536 * Makefile.maint: Sync with Autoconf:
7537 (local_updates): New.
7538
7539 2002-11-12 Akim Demaille <akim@epita.fr>
7540
7541 * po/POTFILES.in (src/lalr.c, src/state.c): Remove
7542
7543 2002-11-12 Akim Demaille <akim@epita.fr>
7544
7545 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Display the
7546 locations.
7547
7548 2002-11-12 Akim Demaille <akim@epita.fr>
7549
7550 * data/c.m4 (b4_yysymprint_generate): Pass *yyvaluep to YYPRINT,
7551 not yyvalue.
7552
7553 2002-11-12 Akim Demaille <akim@epita.fr>
7554
7555 * tests/actions.at (AT_CHECK_PRINTER_AND_DESTRUCTOR): New.
7556 Use it to test the GLR parser.
7557
7558 2002-11-12 Akim Demaille <akim@epita.fr>
7559
7560 * tests/regression.at (input.y): s/YYEOF/MYEOF/, as the skeleton
7561 defines it.
7562 * data/glr.c (yystos): New.
7563 (b4_yysymprint_generate, b4_yydestruct_generate): Invoke.
7564 (YYDSYMPRINT): New.
7565 (yyval): Don't define it, it is handled via M4.
7566 (yyrecoverParseError): Free verbosely the discarded symbols.
7567 * data/yacc.c (yysymprint): Remove, rather...
7568 (b4_yysymprint_generate): invoke.
7569 * data/c.m4 (b4_yysymprint_generate): New.
7570 Accept pointers as arguments, as opposed to the version from
7571 yacc.c.
7572 (b4_yydestruct_generate): Likewise.
7573 * tests/cations.at (Printers and Destructors): Use Bison directives
7574 instead of CPP macros.
7575 Don't rely on internal details.
7576
7577 2002-11-12 Akim Demaille <akim@epita.fr>
7578
7579 * data/c.m4 (b4_yydestruct_generate, b4_symbol_actions): New.
7580 * data/yacc.c: Rename yychar1 as yytoken, as in glr.c.
7581 Don't work on yychar (i.e., do set it to YYEMPTY, don't match
7582 it against YYEMPTY and so forth), work on yytoken (i.e., set
7583 it to YYEMPTY etc.).
7584 (yydestruct): Replace with a b4_yydestruct_generate invocation.
7585 (b4_symbol_actions): Remove.
7586 * data/glr.c (YYTRANSLATE): As for yacc.c, if negative, it stands
7587 for 0, end-of-input.
7588
7589 2002-11-12 Akim Demaille <akim@epita.fr>
7590
7591 * doc/bison.texinfo (Destructor Decl): New.
7592
7593 2002-11-12 Akim Demaille <akim@epita.fr>
7594
7595 * src/tables.c (tables_generate): Use free for pointers that
7596 cannot be NULL, not XFREE.
7597 (pack_vector): Use assert, not fatal, for bound violations.
7598 * src/state.c (state_new): Likewise.
7599 * src/reader.c (reader): Likewise.
7600 * src/lalr.c (set_goto_map): Likewise.
7601 * src/location.h (LOCATION_PRINT): If first_line is 0, just issue
7602 the file name.
7603
7604 2002-11-12 Akim Demaille <akim@epita.fr>
7605
7606 * src/scan-gram.l, src/reader.h (scanner_last_string_free):
7607 Restore.
7608 * src/scan-gram.l (last_string): Is global to the file, not to
7609 yylex.
7610 * src/parse-gram.y (input): Don't append the epilogue here,
7611 (epilogue.opt): do it here, and free the scanner's obstack.
7612 * src/reader.c (epilogue_set): Rename as...
7613 (epilogue_augment): this.
7614 * data/c.m4 (b4_epilogue): Defaults to empty.
7615
7616 2002-11-12 Akim Demaille <akim@epita.fr>
7617
7618 * src/getargs.c (long_options): Remove duplicates.
7619 * src/vmsgetargs.c, src/build.com, src/bison.cld, src/vmshlp.mar:
7620 Remove.
7621 * doc/bison.rnh: Remove.
7622 * doc/bison.texinfo (VMS Invocation): Remove.
7623
7624 2002-11-12 Akim Demaille <akim@epita.fr>
7625
7626 * src/struniq.h, src/struniq.c (struniq_t): Is const.
7627 (STRUNIQ_EQ, struniq_assert, struniq_assert_p): New.
7628
7629 Use struniq for symbols.
7630
7631 * src/symtab.h (symbol_t): The tag member is a struniq.
7632 (symbol_type_set): Adjust.
7633 * src/symtab.c (symbol_new): Takes a struniq.
7634 (symbol_free): Don't free the tag member.
7635 (hash_compare_symbol_t, hash_symbol_t): Rename as...
7636 (hash_compare_symbol, hash_symbol): these.
7637 Use the fact that tags as struniqs.
7638 (symbol_get): Use struniq_new.
7639 * src/symlist.h, src/symlist.c (symbol_list_n_type_name_get):
7640 Returns a strniq.
7641 * src/reader.h (merger_list, grammar_currentmerge_set): The name
7642 and type members are struniqs.
7643 * src/reader.c (get_merge_function)
7644 (grammar_current_rule_merge_set): Adjust.
7645 (TYPE, current_type): Are struniq.
7646
7647 Use struniq for file names.
7648
7649 * src/files.h, src/files.c (infile): Split into...
7650 (grammar_file, current_file): these.
7651 * src/scan-gram.c (YY_USER_INIT, handle_syncline): Adjust.
7652 * src/reduce.c (reduce_print): Likewise.
7653 * src/getargs.c (getargs): Likewise.
7654 * src/complain.h, src/complain.c: Likewise.
7655 * src/main.c (main): Call struniqs_new early enough to use it for
7656 file names.
7657 Don't free the input file name.
7658
7659 2002-11-12 Akim Demaille <akim@epita.fr>
7660
7661 * src/symtab.c (symbol_free): Remove dead deactivated code:
7662 type_name are properly removed.
7663 Don't use XFREE to free items that cannot be NULL.
7664 * src/struniq.h, src/struniq.c: New.
7665 * src/main.c (main): Initialize/free struniqs.
7666 * src/parse-gram.y (%union): Add astruniq member.
7667 (yyprint): Adjust.
7668 * src/scan-gram.l (<{tag}>): Return a struniq.
7669 Free the obstack bit that used to store it.
7670 * src/symtab.h (symbol_t): The 'type_name' member is a struniq.
7671
7672 2002-11-11 Paul Eggert <eggert@twinsun.com>
7673
7674 Revamp to fix many (but not all) of the C- and M4-related quoting
7675 problems. Among other things, this fixes the Bison bug reported
7676 by Jan Hubicka when processing the Bash grammar; see:
7677 <http://lists.gnu.org/archive/html/bison-patches/2002-11/msg00039.html>
7678
7679 Use new @ escapes consistently. Represent brackets with @{ and @}
7680 rather than @<:@ and @:>@, since this works a bit better with dumb
7681 editors like vi. Represent @ with @@, since @ is now consistently
7682 an escape. Use @oline@ and @ofile@ rather than __oline__ and
7683 __ofile__, to avoid unexpected expansions. Similarly, use @output
7684 rather than #output.
7685
7686 * data/c.m4 (b4_copyright): Omit file name from comment, since
7687 the file name could contain "*/".
7688 (b4_synclines_flag): Don't quote the 2nd argument; it should already
7689 be quoted. All uses changed.
7690
7691 * data/glr.c: Use new @ escapes consistently.
7692 (b4_input_suffix, b4_output_parser_suffix, b4_output_parser_name,
7693 b4_output_header_suffix, b4_output_header_name, b4_header_guard):
7694 Remove, since they couldn't handle arbitrary characters in file
7695 names.
7696 * data/lalr1.cc: Likewise.
7697 * data/yacc.c: Likewise.
7698
7699 * src/files.c (output_infix): Remove; all uses removed.
7700 * src/files.h: Likewise.
7701
7702 * data/glr.c: Remove use of "#ifdef b4_header_guard", since it
7703 mishandled funny characters in file names, and anyway it isn't
7704 needed any more.
7705 * data/yacc.c: Likewise.
7706 * data/lalr1.cc: Use YYSLP_NEEDED instead of b4_header_guard.
7707
7708 * data/glr.c (YYSTYPE_IS_TRIVIAL): Define when the .h file would.
7709 * data/yacc.c: Likewise.
7710
7711 * src/muscle_tab.c: Include quotearg.h, since we need to quote C
7712 strings now.
7713 (muscle_init): Quote filename as a C string.
7714 * src/muscle_tab.h (MUSCLE_GROW_STRING_PAIR): Remove; unused.
7715 (MUSCLE_OBSTACK_SGROW, MUSCLE_INSERT_C_STRING): New macros.
7716 * src/output.c (escaped_file_name_output): New function.
7717 (prepare_symbols): Quote tokens for M4.
7718 (prepare): Don't insert output_infix, output_prefix,
7719 output_parser_name, output_header_name; this is now down by scan-skel.
7720 Insert skeleton as a C string.
7721
7722 * src/output.c (user_actions_output, symbol_destructors_output,
7723 symbol_printers_output): Quote filenames for C and M4.
7724 * src/reader.c (prologue_augment, epilogue_set): Likewise.
7725
7726 * src/scan-gram.l (<SC_CHARACTER>): Don't worry about any backslash
7727 escapes other than \\ and \'; this simplifies the code.
7728 (<SC_STRING>): Likewise, for \\ and \".
7729 (<SC_COMMENT,SC_LINE_COMMENT,SC_STRING,SC_CHARACTER,SC_BRACED_CODE,
7730 SC_PROLOGUE,SC_EPILOGUE>): Escape $ and @, too.
7731 Use new escapes @{ and @} for [ and ].
7732
7733 * src/scan-skel.l (yylineno, yyoutname): Remove static vars, replacing
7734 them with auto vars.
7735 Switch to new escape scheme, where @ is the escape character uniformly.
7736 Abort if a stray escape character is found. Avoid unbounded input
7737 buffer when parsing non-escaped text.
7738
7739 * tests/input.at (Torturing the Scanner): Add tests that @oline@,
7740 __oline__, #output, $@, and @{ do not have unintended meanings.
7741
7742 2002-11-09 Paul Eggert <eggert@twinsun.com>
7743
7744 Fix the test failure due to GCC warnings described in
7745 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00000.html>.
7746 * data/glr.c (yyis_pact_ninf, yyis_table_ninf): New macros, which
7747 evaluate to 0 if it's impossible for NINF to be in the respective
7748 table.
7749 (yygetLRActions, yyrecoverParseError): Use them.
7750
7751 * src/scan-gram.l (unexpected_end_of_file): Fix bug: columns were
7752 counted in the token inserted at end of file. Now takes
7753 location_t *, not location_t, so that the location can be
7754 adjusted. All uses changed.
7755
7756 * tests/regression.at (Invalid inputs): Adjust wording in
7757 diagnostic to match the new behavior.
7758
7759 * tests/torture.at (AT_DATA_TRIANGULAR_GRAMMAR,
7760 AT_DATA_HORIZONTAL_GRAMMAR, AT_DATA_LOOKAHEADS_GRAMMAR,
7761 AT_DATA_STACK_TORTURE): Replace `assert (x);' with `if (! (x))
7762 abort ();'. This reduces the runtime of the "Many lookaheads"
7763 test from 27.6 to 2.7 minutes on a 440 MHz Ultrasparc III running
7764 GCC 3.2.
7765
7766 2002-11-07 Paul Eggert <eggert@twinsun.com>
7767
7768 * src/parse-gram.y (CHARACTER): Remove unused token.
7769 All uses removed.
7770
7771 * src/scan-gram.l: Remove stack option. We no longer use the
7772 stack, since the stack was never deeper than 1; instead, use the
7773 new auto var c_context to record the stacked value.
7774
7775 Remove nounput option. At an unexpected end of file, we now unput
7776 the minimal input necessary to end cleanly; this simplifies the
7777 code.
7778
7779 Avoid unbounded token sizes where this is easy.
7780
7781 (unexpected_end_of_file): New function.
7782 Use it to systematize the error message on unexpected EOF.
7783 (last-string): Now auto, not static.
7784 (YY_OBS_FREE): Remove unnecessary do while (0) wrapper.
7785 (scanner_last_string_free): Remove; not used.
7786 (percent_percent_count): Move decl to just before use.
7787 (SC_ESCAPED_CHARACTER): Return ID at unexpected end of file,
7788 not the (never otherwised-used) CHARACTER.
7789
7790 2002-11-07 Akim Demaille <akim@epita.fr>
7791
7792 Let yyerror always receive the msg as last argument, so that
7793 yyerror can be variadic.
7794
7795 * data/yacc.c (b4_yyerror_args): New.
7796 Use it when calling yyerror.
7797 * data/glr.c (b4_yyerror_args, b4_lyyerror_args): New.
7798 Use it when calling yyerror.
7799 * doc/bison.texinfo (Error Reporting): Adjust.
7800 * tests/calc.at (_AT_DATA_CALC_Y): Adjust.
7801 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Adjust.
7802
7803 2002-11-06 Akim Demaille <akim@epita.fr>
7804
7805 #line should have quoted strings.
7806 Ideally, this should be done by m4_quotearg.
7807
7808 * src/scan-skel.l: Include quotearg.h.
7809 Quote __ofile__.
7810 * src/output.c (symbol_printers_output)
7811 (symbol_destructors_output): Quote the file name.
7812
7813 2002-11-06 Akim Demaille <akim@epita.fr>
7814
7815 * tests/regression.at (Invalid inputs): Adjust to the recent
7816 messages.
7817
7818 2002-11-06 Akim Demaille <akim@epita.fr>
7819
7820 Restore --no-lines.
7821 Reported by Jim Kent.
7822
7823 * data/c.m4 (b4_syncline): New.
7824 * data/glr.c, data/yacc.c, data/lalr1.cc: Use it.
7825 * src/reader.c (prologue_augment, epilogue_set): Use b4_syncline.
7826 * src/output.c (user_actions_output): Likewise.
7827 (prepare): Define 'b4_synclines_flag'.
7828 * src/muscle_tab.c (muscle_init): Don't define b4_linef.
7829
7830 2002-11-06 Akim Demaille <akim@epita.fr>
7831
7832 * src/main.c (main): Free `infile'.
7833 * src/scan-gram.l (handle_syncline): New.
7834 Recognize `#line'.
7835 * src/output.c (user_actions_output, symbol_destructors_output)
7836 (symbol_printers_output): Use the location's file name, not
7837 infile.
7838 * src/reader.c (prologue_augment, epilogue_set): Likewise.
7839
7840 2002-11-05 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
7841
7842 * src/tables.c (matching_state): Don't allow states to match if
7843 either has GLR conflict entries.
7844
7845 2002-11-05 Paul Eggert <eggert@twinsun.com>
7846
7847 * src/scan-gram.l: Use more accurate diagnostics, e.g.
7848 "integer out of range" rather than "invalid value".
7849 * tests/input.at (Invalid $n, Invalid @n): Change expected wording
7850 accordingly.
7851
7852 Scan <% and %> digraphs in C code as POSIX 1003.1-2001 requires.
7853 Also, remove one static variable in the scanner.
7854
7855 * src/scan-gram.l (braces_level): Now auto, not static.
7856 Initialize to zero if the compiler is being picky.
7857 (INITIAL): Clear braces_level instead of incrementing it.
7858 (SC_BRACED_CODE): Treat <% and %> as { and } when inside C code,
7859 as POSIX 1003.1-2001 requires.
7860 * src/system.h (IF_LINT): New macro, taken from coreutils.
7861 * configure.ac: Define "lint" if --enable-gcc-warnings.
7862
7863 2002-11-05 Akim Demaille <akim@epita.fr>
7864
7865 * src/scan-gram.l: When it starts with `%', complain about the
7866 whole directive, not just that `invalid character: %'.
7867
7868 2002-11-04 Akim Demaille <akim@epita.fr>
7869
7870 * Makefile.maint: Update from Autoconf.
7871 (update, cvs-update, po-update, do-po-update): New.
7872
7873 2002-11-04 Akim Demaille <akim@epita.fr>
7874
7875 * tests/glr-regr1.at (Badly Collapsed GLR States): Prototype yylex
7876 and yyerror.
7877 Have yyerror `use' its arguments.
7878 * tests/calc.at (AT_CHECK_PUSHDEFS): AT_YYERROR_SEES_LOC_IF
7879 returns true when location & yacc & pure & parse-param.
7880 (_AT_DATA_CALC_Y): Let yyerror ``use'' its arguments.
7881
7882 2002-11-04 Akim Demaille <akim@epita.fr>
7883
7884 * src/location.h (LOCATION_PRINT): Use quotearg slot 3 to avoid
7885 clashes.
7886 * src/scan-gram.l: Use [\'] instead of ['] to pacify
7887 font-lock-mode.
7888 Use complain_at.
7889 Use quote, not quote_n since LOCATION_PRINT no longer uses the
7890 slot 0.
7891
7892 2002-11-03 Paul Eggert <eggert@twinsun.com>
7893
7894 * src/reader.c (get_merge_function, grammar_current_rule_check):
7895 Use consistent diagnostics for reporting type name clashes.
7896 Quote the types with <>, for consistency with Yacc.
7897 * tests/input.at (Type Clashes): Adjust to diagnostic changes.
7898
7899 2002-11-03 Akim Demaille <akim@epita.fr>
7900
7901 * data/c.m4 (b4_identification, b4_user_args, b4_parse_param):
7902 New.
7903 * data/yacc.m4 (b4_pure_args, b4_Pure_args): New.
7904 (b4_parse_param): Remove.
7905 Use b4_identification.
7906 Propagate b4_pure_args where needed to pass them to yyerror.
7907 * data/glr.m4 (b4_parse_param): Remove.
7908 (b4_user_formals, b4_pure_args, b4_pure_formals, b4_lpure_args)
7909 (b4_lpure_formals): New.
7910 Use b4_identification.
7911 (YY_USER_FORMALS, YY_USER_ARGS): Remove, replaced by
7912 b4_user_formals and b4_user_args.
7913 (yyexpandGLRStack, yyFail, yyaddDeferredAction, yyglrShiftDefer)
7914 (yyreportAmbiguity): When using a pure parser, also need
7915 the location, and the parse-params.
7916 Adjust callers.
7917 (yyuserAction, yyglrShift, yyreportParseError, yyrecoverParseError):
7918 When using a pure parser, also need the parse-params.
7919 Adjust callers.
7920 * tests/calc.at: Test pure (%pure-parser) and absolutely pure
7921 (%pure-parser + %parse-param) LALR and GLR parsers.
7922 (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): New, define AT_PARAM_IF,
7923 AT_LOCATION_IF, AT_PURE_IF, AT_GLR_IF, AAT_PURE_AND_LOC_IF,
7924 AT_GLR_OR_PARAM_IF, AT_YYERROR_ARG_LOC_IF, AT_YYERROR_SEES_LOC_IF.
7925 (_AT_DATA_CALC_Y): Equip for purity of yyerror.
7926 (_AT_CHECK_CALC_ERROR): Use AT_YYERROR_SEES_LOC_IF.
7927 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Equip for yyerror purity.
7928 * doc/bison.texinfo: Untabify the whole file.
7929 (Parser Function): Document %parse-param, deprecate YYPARSE_PARAM.
7930 (Pure Calling): Document %lex-param, deprecate YYLEX_PARAM.
7931 (Error Reporting): Adjust to these new directives.
7932 Document %error-verbose, deprecate YYERROR_VERBOSE.
7933
7934 2002-11-03 Akim Demaille <akim@epita.fr>
7935
7936 * tests/calc.at: Change all the AT_CHECK_CALC_LALR and
7937 AT_CHECK_CALC_GLR invocations to use % directives, instead of
7938 command line options.
7939 * tests/cxx-type.at: Formatting changes.
7940
7941 2002-11-03 Paul Eggert <eggert@twinsun.com>
7942
7943 * src/scan-gram.l: Revamp to fix POSIX incompatibilities,
7944 to count columns correctly, and to check for invalid inputs.
7945
7946 Use mbsnwidth to count columns correctly. Account for tabs, too.
7947 Include mbswidth.h.
7948 (YY_USER_ACTION): Invoke extend_location rather than LOCATION_COLUMNS.
7949 (extend_location): New function.
7950 (YY_LINES): Remove.
7951
7952 Handle CRLF in C code rather than in Lex code.
7953 (YY_INPUT): New macro.
7954 (no_cr_read): New function.
7955
7956 Scan UCNs, even though we don't fully handle them yet.
7957 (convert_ucn_to_byte): New function.
7958
7959 Handle backslash-newline correctly in C code.
7960 (SC_LINE_COMMENT, SC_YACC_COMMENT): New states.
7961 (eols, blanks): Remove. YY_USER_ACTION now counts newlines etc.;
7962 all uses changed.
7963 (tag, splice): New EREs. Do not allow NUL or newline in tags.
7964 Use {splice} wherever C allows backslash-newline.
7965 YY_STEP after space, newline, vertical-tab.
7966 ("/*"): BEGIN SC_YACC_COMMENT, not yy_push_state (SC_COMMENT).
7967
7968 (letter, id): Don't assume ASCII; e.g., spell out a-z.
7969
7970 ({int}, handle_action_dollar, handle_action_at): Check for integer
7971 overflow.
7972
7973 (YY_STEP): Omit trailing semicolon, so that it's more like C.
7974
7975 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>): Allow \0 and \00
7976 as well as \000. Check for UCHAR_MAX, not 255.
7977 Allow \x with an arbitrary positive number of digits, as in C.
7978 Check for overflow here.
7979 Allow \? and UCNs, for compatibility with C.
7980
7981 (handle_symbol_code_dollar): Use quote_n slot 1 to avoid collision
7982 with quote slot used by complain_at.
7983
7984 * tests/input.at: Add tests for backslash-newline, m4 quotes
7985 in symbols, long literals, and funny escapes in strings.
7986
7987 * configure.ac (jm_PREREQ_MBSWIDTH): Add.
7988 * lib/Makefile.am (libbison_a_SOURCES): Add mbswidth.h, mbswidth.c.
7989 * lib/mbswidth.h, lib/mbswidth.c: New files, from GNU gettext.
7990 * m4/Makefile.am (EXTRA_DIST): Add mbswidth.m4.
7991 * m4/mbswidth.m4: New file, from GNU coreutils.
7992
7993 * doc/bison.texinfo (Grammar Outline): Document // comments.
7994 (Symbols): Document that trigraphs have no special meaning in Bison,
7995 nor is backslash-newline allowed.
7996 (Actions): Document that trigraphs have no special meaning.
7997
7998 * src/location.h (LOCATION_COLUMNS, LOCATION_LINES): Remove;
7999 no longer used.
8000
8001 2002-11-02 Paul Eggert <eggert@twinsun.com>
8002
8003 * src/reader.c: Don't include quote.h; not needed.
8004 (get_merge_function): Reword warning to be consistent with
8005 type clash diagnostic in grammar_current_rule_check.
8006
8007 * lib/quotearg.c (quotearg_buffer_restyled): Fix off-by-two
8008 bug in trigraph handling.
8009
8010 * src/output.c (prepare_symbols): When printing token names,
8011 escape "[" as "@<:@" and likewise for "]".
8012
8013 * src/system.h (errno): Remove declaration, as we are now
8014 assuming C89 or better, and C89 guarantees errno.
8015
8016 2002-10-30 Paul Eggert <eggert@twinsun.com>
8017
8018 * lib/bitset_stats.c (bitset_stats_read, bitset_stats_write):
8019 Check for close failures.
8020 * src/files.h (xfclose): Return void, not int, since it always
8021 returned zero.
8022 * src/files.c (xfclose): Likewise. Report I/O error if ferror
8023 indicates one.
8024 * src/output.c (output_skeleton): Use xfclose rather than fclose
8025 and ferror. xfclose now checks ferror.
8026
8027 * data/glr.c (YYLEFTMOST_STATE): Remove.
8028 (yyreportTree): Use a stack-based leftmost state. This avoids
8029 our continuing battles with bogus warnings about initializers.
8030
8031 2002-10-30 Akim Demaille <akim@epita.fr>
8032
8033 * src/system.h: Don't use #ifdef/#ifndef on HAVE_ values, only
8034 #if.
8035
8036 2002-10-29 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
8037
8038 * tests/glr-regr1.at: New test for reported regressions.
8039 * tests/testsuite.at: Add glr-regr1.at test.
8040 * tests/Makefile.am: Add glr-regr1.at test.
8041
8042 2002-10-24 Paul Eggert <eggert@twinsun.com>
8043
8044 Version 1.75a.
8045
8046 * tests/calc.at (_AT_DATA_CALC_Y): Remove unused strcat declaration.
8047 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Include stdlib.h, since
8048 we use malloc. Don't assume 'A' through 'Z' are contiguous.
8049 Don't assume strdup exists; POSIX says its an XSI extension.
8050 Check for buffer overflow on input.
8051
8052 2002-10-24 Akim Demaille <akim@epita.fr>
8053
8054 * src/output.c (output_skeleton): Don't disable M4sugar comments
8055 too soon: it results in comments being expanded.
8056 * data/yacc.c, data/glr.c, data/lalr1.cc: Do it right before the
8057 first output.
8058
8059 2002-10-24 Akim Demaille <akim@epita.fr>
8060
8061 * data/yacc.c (m4_int_type): New.
8062 * data/c.m4 (m4_int_type): Don't use yysigned_char, but `signed
8063 char' as only yacc.c wants K&R portability.
8064 * data/glr.c (yysigned_char): Remove.
8065 * data/lalr1.cc: Rename the trailing b4_name as b4_parser_class_name.
8066 Reported by Quoc Peyrot.
8067
8068 2002-10-23 Paul Eggert <eggert@twinsun.com>
8069
8070 * src/main.c (main): With --trace=time, report times even if a
8071 non-fatal error occurs. Formerly, the times were reported in some
8072 such cases but not in others.
8073 * src/reader.c (reader): Just return if a complaint has been issued,
8074 instead of exiting, so that 'main' can report times.
8075
8076 2002-10-22 Akim Demaille <akim@epita.fr>
8077
8078 * src/system.h: Include sys/types.
8079 Reported by Bert Deknuydt.
8080
8081 2002-10-23 Paul Eggert <eggert@twinsun.com>
8082
8083 * configure.ac (AC_PROG_LEX): Use instead of AM_PROG_LEX.
8084 Suggested by Art Haas.
8085
8086 2002-10-22 Paul Eggert <eggert@twinsun.com>
8087
8088 * src/complain.c (exit) [! (STDC_HEADERS || _LIBC)]: Remove exit
8089 decl; not needed any more.
8090 * src/main.c (main): Use return to exit, undoing yesterday's change.
8091 The last OS that we could find where this wouldn't work is
8092 SunOS 3.5, and that's too old to worry about now.
8093
8094 * data/glr.c (struct yyltype): Define members even when not
8095 doing locations. This is more consistent with yacc.c, and it
8096 works around the following bug reports:
8097 http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00106.html
8098 http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00111.html
8099
8100 * doc/bison.texinfo: Minor spelling and typographical fixes. Use
8101 @acronym consistently. Standardize on "Yacc" instead of "YACC",
8102 "Algol" instead of "ALGOL". Give a bit more history about BNF.
8103
8104 2002-10-22 Akim Demaille <akim@epita.fr>
8105
8106 * data/README: New.
8107
8108 2002-10-21 Paul Eggert <eggert@twinsun.com>
8109
8110 Be consistent about 'bool'; the old code used an enum in one
8111 module and an int in another, and this violates the C standard.
8112 * m4/stdbool.m4: New file, from coreutils 4.5.3.
8113 * configure.ac (AC_HEADER_STDBOOL): Add.
8114 * m4/Makefile.am (EXTRA_DIST): Add stdbool.m4.
8115 * src/muscle_tab.c (hash_compare_muscles): (a ? FALSE : TRUE) -> (! a)
8116 * src/symtab.c (hash_compare_symbol_t): Likewise.
8117 * src/system.h (bool, false, true): Use a definition consistent
8118 with ../lib/hash.c. All uses changed.
8119
8120 * src/complain.c (warning_issued): Renamed from warn_message_count,
8121 so that we needn't worry about integer overflow (!).
8122 Now of type bool. All uses changed.
8123 (complaint_issued): Renamed from complain_message_count; likewise.
8124
8125 * src/main.c (main): Use exit to exit with failure.
8126
8127 * src/complain.c (fatal_at, fatal): Use EXIT_FAILURE and EXIT_SUCCESS
8128 rather than 1 and 0.
8129 * src/main.c (main): Likewise.
8130 * src/getargs.c (getargs): Likewise.
8131 * src/reader.c (reader): Likewise.
8132
8133 * src/getarg.c (getargs): Remove duplicate code for
8134 "Try `bison --help'".
8135
8136 * src/files.c (xfopen, xfclose): Use EXIT_FAILURE rather than 2.
8137 What was that "2" for?
8138
8139 * src/complain.h (fatal, fatal_at): Add __attribute__((__noreturn__)).
8140 * src/getargs.c (usage): Likewise.
8141
8142 * src/getargs.c (getargs): When there are too few operands, report
8143 the last one. When there are too many, report the first extra
8144 one. This is how diffutils does it.
8145
8146 2002-10-20 Paul Eggert <eggert@twinsun.com>
8147
8148 Remove K&R vestiges.
8149 * configure.ac (AC_C_CONST, AM_C_PROTOTYPES): Remove.
8150 * src/complain.c (VA_START): Remove. Assume prototypes.
8151 (vfprintf) [! (HAVE_VPRINTF || defined vfprintf)]: New macro.
8152 (private_strerror, warn_at, warn, complain_at, complain, fatal_at,
8153 fatal): Assume prototypes.
8154 * src/complain.h: Assume prototypes.
8155 * src/system.h (PARAMS): Remove.
8156 Include <limits.h> unconditionally, since it's guaranteeed even
8157 for a freestanding C89 compiler.
8158 (SHRT_MIN, SHRT_MAX): Remove, since C89 guarantees them.
8159 * src/vmsgetargs.c (getargs, cli_present, cli_get_value): Prototype.
8160
8161 2002-10-20 Akim Demaille <akim@epita.fr>
8162
8163 * src/muscle_tab.c (muscle_grow): Remove trailing debugging code.
8164 * data/glr.c (YY_USER_FORMALS, YY_USER_ARGS): New.
8165 (yyuserAction, yydoAction, yyglrReduce, yyresolveValue)
8166 (yyresolveStates, yyresolveAction, yyresolveStack)
8167 (yyprocessOneStack): Use them.
8168 (yy_reduce_print): New.
8169 * tests/calc.at (_AT_DATA_CALC_Y): Exercise %parse-param.
8170
8171 2002-10-20 Akim Demaille <akim@epita.fr>
8172
8173 * data/c.m4 (b4_c_ansi_args): Recognize functions with no
8174 arguments and output `void'.
8175 (b4_c_function): Rename as...
8176 (b4_c_function_def): this.
8177 (b4_c_function_decl, b4_c_ansi_function_def)
8178 (b4_c_ansi_function_decl): New.
8179 Change the interpretation of the arguments: before `int, foo', now
8180 `int foo, foo'.
8181 * data/yacc.c (yyparse): Prototype and define thanks to these.
8182 Adjust b4_c_function_def uses.
8183 * data/glr.c (yyparse): Likewise, but ANSI only.
8184
8185 2002-10-20 Akim Demaille <akim@epita.fr>
8186
8187 * src/output.c (prepare): Move the definition of `tokens_number',
8188 `nterms_number', `undef_token_number', `user_token_number_max'
8189 to...
8190 (prepare_tokens): Here.
8191 (prepare_tokens): Rename as...
8192 (prepare_symbols): this.
8193 (prepare): Move the definition of `rules_number' to...
8194 (prepare_rules): here.
8195 (prepare): Move the definition of `last', `final_state_number',
8196 `states_number' to...
8197 (prepare_states): here.
8198 * data/yacc.c, data/lalr1.cc, data/glr.c: Normalize `>' into `<'.
8199
8200 2002-10-20 Akim Demaille <akim@epita.fr>
8201
8202 * src/tables.h, src/tables.c, src/output.c: Comment changes.
8203
8204 2002-10-20 Akim Demaille <akim@epita.fr>
8205
8206 * data/yacc.c, data/yacc.c (b4_location_if, b4_pure_if): Move to...
8207 * data/c.m4: here.
8208
8209 2002-10-20 Akim Demaille <akim@epita.fr>
8210
8211 * src/output.c (prepare): Use MUSCLE_INSERT_STRING.
8212 * src/muscle_tab.c (muscle_pair_list_grow): Rename `val as
8213 `pair'.
8214 (muscle_init): Move the `b4_ltype', `b4_maxdepth', `b4_initdepth',
8215 `name' to...
8216 * data/glr.c, data/lalr1.cc, data/yacc.c (b4_location_type)
8217 (b4_stack_depth_init, b4_stack_depth_max, b4_parser_class_name):
8218 These.
8219
8220 2002-10-19 Paul Eggert <eggert@twinsun.com>
8221
8222 Do not create a temporary file, as that involves security and
8223 cleanup headaches. Instead, use a pair of pipes.
8224 Derived from a suggestion by Florian Krohm.
8225 * lib/subpipe.c, lib/subpipe.h, m4/subpipe.m4: New files.
8226 * lib/mkstemp.c, lib/readpipe.c, lib/tempname.c, m4/mkstemp.m4: Remove.
8227 * configure.ac (UTILS_FUNC_MKSTEMP, jm_PREREQ_TEMPNAME): Remove.
8228 (BISON_PREREQ_SUBPIPE): Add.
8229 * lib/Makefile.am (libbison_a_SOURCES): Remove readpipe.c.
8230 Add subpipe.h, subpipe.c.
8231 * m4/Makefile.am (EXTRA_DIST): Remove mkstemp.m4. Add subpipe.m4.
8232 * po/POTFILES.in: Add lib/subpipe.c.
8233 * src/output.c: Include "subpipe.h".
8234 (m4_invoke): Remove decl.
8235 (scan_skel): New decl.
8236 (output_skeleton): Use pipe rather than temporary file for m4 input.
8237 Check that m4sugar.m4 is readable, to avoid deadlock.
8238 Check for pipe I/O error.
8239 * src/scan-skel.l (readpipe): Remove decl.
8240 (scan_skel): New function, to be used in place of m4_invoke.
8241 Read from stream rather than file.
8242
8243 * lib/timevar.c (TICKS_TO_MSEC, CLOCKS_TO_MSEC): Do not cast to
8244 float, as this generates a warning on Solaris 8 + GCC 3.2 with
8245 --enable-gcc-warnings. Instead, divide into 1.0 rather than 1;
8246 this generates a more-accurate value anyway.
8247
8248 * lib/timevar.c (timervar_accumulate): Rename locals to
8249 avoid confusion with similarly-named more-global.
8250 * src/muscle_tab.c (muscle_pair_list_grow): Likewise.
8251
8252 * src/output.c (prepare): Use xstrdup to convert char const *
8253 to char *, to avoid GCC warning.
8254
8255 2002-10-19 Akim Demaille <akim@epita.fr>
8256
8257 * tests/calc.at (_AT_DATA_CALC_Y): Define VAL, LOC, LEX_FORMALS,
8258 LEX_PRE_FORMALS, LEX_ARGS, LEX_PRE_ARGS, USE_LEX_ARGS.
8259 Use them to have `calc.y' ready for %pure-parser.
8260 * data/yacc.c (YYLEX): Pass a yylex return type to
8261 b4_c_function_call.
8262
8263 2002-10-19 Akim Demaille <akim@epita.fr>
8264
8265 Prototype support of %lex-param and %parse-param.
8266
8267 * src/parse-gram.y: Add the definition of the %lex-param and
8268 %parse-param tokens, plus their rules.
8269 Drop the `_' version of %glr-parser.
8270 Add the "," token.
8271 * src/scan-gram.l (INITIAL): Scan them.
8272 * src/muscle_tab.c: Comment changes.
8273 (muscle_insert, muscle_find): Rename `pair' as `probe'.
8274 * src/muscle_tab.h (MUSCLE_INSERT_PREFIX): Remove unused.
8275 (muscle_entry_s): The `value' member is no longer const.
8276 Adjust all dependencies.
8277 * src/muscle_tab.c (muscle_init): Adjust: use
8278 MUSCLE_INSERT_STRING.
8279 Initialize the obstack earlier.
8280 * src/muscle_tab.h, src/muscle_tab.c (muscle_grow)
8281 (muscle_pair_list_grow): New.
8282 * data/c.m4 (b4_c_function_call, b4_c_args): New.
8283 * data/yacc.c (YYLEX): Use b4_c_function_call to honor %lex-param.
8284 * tests/calc.at: Use %locations, not --locations.
8285 (AT_CHECK_CALC_GLR): Use %glr-parser, not %glr_parser.
8286
8287 2002-10-19 Akim Demaille <akim@epita.fr>
8288
8289 * src/getargs.c (usage): Take status as argument and exit
8290 accordingly.
8291 Report the traditional `Try ... --help' message when status != 0.
8292 (usage, version): Don't take a FILE * as arg, it is pointless.
8293 (getargs): When there is an incorrect number of arguments, make it
8294 an error, and report it GNUlically thanks to `usage ()'.
8295
8296 2002-10-18 Paul Eggert <eggert@twinsun.com>
8297
8298 * data/glr.c (yyreportParseError): Don't assume that sprintf
8299 yields the length of the printed string, as this is not true
8300 on SunOS 4.1.4. Reported by Peter Klein.
8301
8302 * tests/calc.at (_AT_DATA_CALC_Y): #undef memcmp and realloc.
8303 * tests/conflicts.at (%nonassoc and eof): Likewise.
8304 Fixes SunOS 4.1.4 test failure reported by Peter Klein.
8305
8306 2002-10-17 Akim Demaille <akim@epita.fr>
8307
8308 * src/getargs.h (trace_e): Add trace_scan, and trace_parse.
8309 * src/getargs.c (trace_types, trace_args): Adjust.
8310 * src/reader.c (grammar_current_rule_prec_set)
8311 (grammar_current_rule_dprec_set, grammar_current_rule_merge_set):
8312 Standardize error messages.
8313 And s/@prec/%prec/!
8314 (reader): Use trace_flag to enable scanner/parser debugging,
8315 instead of an adhoc scheme.
8316 * src/scan-gram.l: Remove trailing debugging code.
8317
8318 2002-10-16 Paul Eggert <eggert@twinsun.com>
8319
8320 * src/muscle_tab.h (MUSCLE_TAB_H_): Was misspelled as
8321 MUSCLE_TAB_H.
8322
8323 * NEWS: Officially drop support for building Bison with K&R C,
8324 since it didn't work anyway and it's not worth worrying about.
8325 * Makefile.maint (wget_files): Remove ansi2knr.c.
8326 (ansi2knr.c-url_prefix): Remove.
8327 * lib/.cvsignore: Remove ansi2knr, ansi2knr.*.
8328 * lib/Makefile.am (AUTOMAKE_OPTIONS): Remove.
8329 * src/Makefile.am (AUTOMAKE_OPTIONS): Remove.
8330
8331 2002-10-15 Paul Eggert <eggert@twinsun.com>
8332
8333 Stop using the "enum_" trick for K&R-style function definitions;
8334 it confused me, and I was the author! Instead, assume that people
8335 who want to use K&R C compilers (when using these modules in GCC,
8336 perhaps?) will run ansi2knr.
8337
8338 * lib/bbitset.h: (enum_bitset_ops, enum_bitset_type): Remove.
8339 All uses of "enum_" changed to "enum ".
8340 * lib/ebitset.c (enum_ebitset_find_mode): Likewise.
8341 * lib/lbitset.c (enum_lbitset_find_mode): Likewise.
8342
8343 * lib/abitset.c (abitset_and, abitset_and_cmp, abitset_and_or,
8344 abitset_and_or_cmp, abitset_andn, abitset_andn_cmp,
8345 abitset_andn_or, abitset_andn_or_cmp, abitset_bytes, abitset_copy,
8346 abitset_copy1, abitset_disjoint_p, abitset_empty_p,
8347 abitset_equal_p, abitset_init, abitset_list, abitset_list_reverse,
8348 abitset_not, abitset_ones, abitset_or, abitset_or_and,
8349 abitset_or_and_cmp, abitset_or_cmp, abitset_reset, abitset_set,
8350 abitset_size, abitset_small_list, abitset_subset_p, abitset_test,
8351 abitset_unused_clear, abitset_xor, abitset_xor_cmp, abitset_zero):
8352 Use function prototypes; this removes the need for declaring
8353 static functions simply to provide their prototypes.
8354 * lib/bitset.c (bitset_alloc, bitset_and_or_, bitset_and_or_cmp_,
8355 bitset_andn_or_, bitset_andn_or_cmp_, bitset_bytes, bitset_copy_,
8356 bitset_count_, bitset_create, bitset_dump, bitset_first,
8357 bitset_free, bitset_init, bitset_last, bitset_next,
8358 bitset_obstack_alloc, bitset_obstack_free, bitset_only_set_p,
8359 bitset_op4_cmp, bitset_or_and_, bitset_or_and_cmp_, bitset_prev,
8360 bitset_print, bitset_release_memory, bitset_toggle_,
8361 bitset_type_choose, bitset_type_get, bitset_type_name_get,
8362 debug_bitset): Likewise.
8363 * lib/bitset.h (bitset_set, bitset_reset, bitset_test): Likewise.
8364 * lib/bitset_stats.c (bitset_log_histogram_print,
8365 bitset_percent_histogram_print, bitset_stats_and,
8366 bitset_stats_and_cmp, bitset_stats_and_or,
8367 bitset_stats_and_or_cmp, bitset_stats_andn, bitset_stats_andn_cmp,
8368 bitset_stats_andn_or, bitset_stats_andn_or_cmp, bitset_stats_copy,
8369 bitset_stats_count, bitset_stats_disable, bitset_stats_disjoint_p,
8370 bitset_stats_dump, bitset_stats_empty_p, bitset_stats_enable,
8371 bitset_stats_equal_p, bitset_stats_free, bitset_stats_init,
8372 bitset_stats_list, bitset_stats_list_reverse, bitset_stats_not,
8373 bitset_stats_ones, bitset_stats_or, bitset_stats_or_and,
8374 bitset_stats_or_and_cmp, bitset_stats_or_cmp, bitset_stats_print,
8375 bitset_stats_print_1, bitset_stats_read, bitset_stats_reset,
8376 bitset_stats_set, bitset_stats_size, bitset_stats_subset_p,
8377 bitset_stats_test, bitset_stats_toggle, bitset_stats_type_get,
8378 bitset_stats_write, bitset_stats_xor, bitset_stats_xor_cmp,
8379 bitset_stats_zero): Likewise.
8380 * lib/bitsetv.c (bitsetv_alloc, bitsetv_create, bitsetv_free,
8381 bitsetv_zero, bitsetv_ones, bitsetv_transitive_closure,
8382 bitsetv_dump, debug_bitsetv): Likewise.
8383 * lib/ebitset.c (ebitset_and, ebitset_and_cmp, ebitset_andn,
8384 ebitset_andn_cmp, ebitset_bytes, ebitset_copy, ebitset_copy_,
8385 ebitset_copy_cmp, ebitset_disjoint_p, ebitset_elt_add,
8386 ebitset_elt_alloc, ebitset_elt_calloc, ebitset_elt_find,
8387 ebitset_elt_free, ebitset_elt_last, ebitset_elt_remove,
8388 ebitset_elt_zero_p, ebitset_elts_grow, ebitset_empty_p,
8389 ebitset_equal_p, ebitset_free, ebitset_init, ebitset_list,
8390 ebitset_list_reverse, ebitset_not, ebitset_ones, ebitset_op3_cmp,
8391 ebitset_or, ebitset_or_cmp, ebitset_release_memory, ebitset_reset,
8392 ebitset_set, ebitset_size, ebitset_subset_p, ebitset_test,
8393 ebitset_weed, ebitset_xor, ebitset_xor_cmp, ebitset_zero):
8394 Likewise.
8395 * lib/lbitset.c (debug_lbitset, lbitset_and, lbitset_and_cmp,
8396 lbitset_andn, lbitset_andn_cmp, lbitset_bytes, lbitset_copy,
8397 lbitset_copy_cmp, lbitset_disjoint_p, lbitset_elt_alloc,
8398 lbitset_elt_calloc, lbitset_elt_find, lbitset_elt_free,
8399 lbitset_elt_link, lbitset_elt_unlink, lbitset_elt_zero_p,
8400 lbitset_empty_p, lbitset_equal_p, lbitset_free, lbitset_init,
8401 lbitset_list, lbitset_list_reverse, lbitset_not, lbitset_ones,
8402 lbitset_op3_cmp, lbitset_or, lbitset_or_cmp, lbitset_prune,
8403 lbitset_release_memory, lbitset_reset, lbitset_set, lbitset_size,
8404 lbitset_subset_p, lbitset_test, lbitset_weed, lbitset_xor,
8405 lbitset_xor_cmp, lbitset_zero): Likewise.
8406
8407 2002-10-14 Akim Demaille <akim@epita.fr>
8408
8409 Version 1.75.
8410
8411 2002-10-14 Akim Demaille <akim@epita.fr>
8412
8413 * tests/Makefile.am (maintainer-check-posix): New.
8414
8415 2002-10-14 Akim Demaille <akim@epita.fr>
8416
8417 * data/glr.c [YYDEBUG] (YYLEFTMOST_STATE): Initialize the yyloc
8418 member.
8419
8420 2002-10-14 Akim Demaille <akim@epita.fr>
8421
8422 * src/tables.c (table_ninf_remap): base -> tab.
8423 Reported by Matt Rosing.
8424
8425 2002-10-14 Paul Eggert <eggert@twinsun.com>
8426
8427 * tests/action.at, tests/calc.at, tests/conflicts.at,
8428 tests/cxx-type.at, tests/headers.at, tests/input.at,
8429 tests/regression.at, tests/synclines.at, tests/torture.at:
8430 Say "bison -o foo.c foo.y", not "bison foo.y -o foo.c",
8431 so that the tests still work even if POSIXLY_CORRECT is set.
8432 * doc/bison.texinfo (Rpcalc Compile, Invocation): Likewise.
8433
8434 * data/c.m4 (b4_int_type): Use yysigned_char instead of signed char,
8435 for portability to K&R hosts. Fix typo: signed char is guaranteed
8436 only to 127, not to 128.
8437 * data/glr.c (yysigned_char): New type.
8438 * data/yacc.c (yysigned_char): Likewise.
8439 * tests/regression.at (Web2c Actions): signed char -> yysigned_char.
8440
8441 2002-10-13 Paul Eggert <eggert@twinsun.com>
8442
8443 * data/yacc.c (yyparse): Rewrite to avoid "comparison is always
8444 true due to limited range of data type" warning from GCC.
8445
8446 * data/c.m4 (b4_token_defines): Protect against double-inclusion
8447 by wrapping enum yytokentype's definition inside #ifndef
8448 YYTOKENTYPE. This undoes a bug I introduced on 2002-10-12.
8449
8450 2002-10-13 Akim Demaille <akim@epita.fr>
8451
8452 * data/glr.c (yyglrShiftDefer, yyaddDeferredAction, yydoAction):
8453 Un yy- yyrhs to avoid the name clash with the global YYRHS.
8454
8455 2002-10-13 Akim Demaille <akim@epita.fr>
8456
8457 * Makefile.maint: Update from Autoconf 2.54.
8458 * m4/strerror_r.m4 (AC_FUNC_STRERROR_R): Remove, shipped with 2.54.
8459
8460 2002-10-13 Akim Demaille <akim@epita.fr>
8461
8462 * src/print.c (print_state): Separate the list of solved conflicts
8463 from the other items.
8464 * tests/conflicts.at (Resolved SR Conflicts): Adjust.
8465
8466 2002-10-13 Akim Demaille <akim@epita.fr>
8467
8468 Let nondeterministic skeletons be usable with deterministic
8469 tables.
8470
8471 With the patch, GAWK compiled by GCC without -O2 passes its test
8472 suite using a GLR parser driven by LALR tables. It fails with -O2
8473 because `struct stat' gives two different answers on my machine:
8474 88 (definition of an auto var) and later 96 (memset on this var).
8475 Hence the stack is badly corrumpted. The headers inclusion is to
8476 blame: if I move the awk.h inclusion before GLR's system header
8477 inclusion, the two struct stat have the same size.
8478
8479 * src/tables.c (pack_table): Always create conflict_table.
8480 (token_actions): Always create conflict_list.
8481 * data/glr.c (YYFLAG): Remove, unused.
8482
8483 2002-10-13 Akim Demaille <akim@epita.fr>
8484
8485 * configure.ac (AC_GNU_SOURCE): Use it instead of hand written code.
8486 (O0FLAGS): New.
8487 (VALGRIND, GXX): New.
8488 * tests/atlocal.in (CFLAGS): Use O0FLAGS.
8489 * tests/bison.in: Run $PREBISON a pre-command.
8490 * tests/Makefile.am (maintainer-check, maintainer-check-valgrind)
8491 (maintainer-check-g++): New.
8492 * Makefile.am (maintainer-check): New.
8493
8494 2002-10-13 Akim Demaille <akim@epita.fr>
8495
8496 * data/glr.c: Formatting changes.
8497 Tweak some trace messages to match yacc.c's.
8498
8499 2002-10-13 Akim Demaille <akim@epita.fr>
8500
8501 GLR parsers sometimes raise parse errors instead of performing the
8502 default reduction.
8503 Reported by Charles-Henry de Boysson.
8504
8505 * tests/calc.at (_AT_CHECK_CALC, _AT_CHECK_CALC_ERROR): Don't
8506 check the length of the traces when %glr.
8507 (_AT_CHECK_CALC_ERROR): Also skip `^Stack' lines, coming from
8508 GLR's traces.
8509 (AT_CHECK_CALC_LALR, AT_CHECK_CALC_GLR): New.
8510 Test GLR parsers.
8511 * data/glr.c (YYLEFTMOST_STATE): Fix its value.
8512 (yyltype): Remove the yy prefix from the member names.
8513 (yytable): Complete its comment.
8514 (yygetLRActions): Map error action number from YYTABLE from
8515 YYTABLE_NINF to 0.
8516 (yyisErrorAction): No longer compare YYACTION to YYPACT_NINF
8517 (which was a bug: it should have been YYTABEL_NINF, and yet it was
8518 not satisfying as we could compare an YYACTION computed from
8519 YYDEFACT to YYTABLE_NINF although they are unrelated): 0 is the
8520 only value for error actions.
8521 (yyreportParseError): In verbose parse error messages, don't issue
8522 `error' in the list of expected tokens.
8523 * data/yacc.c (yyparse) <yybackup>: Rewrite the decoding of the
8524 next action to perform to match glr.c's decoding.
8525 (yytable): Complete its comment.
8526
8527 2002-10-13 Paul Eggert <eggert@twinsun.com>
8528
8529 Fix problem reported by Henrik Grubbstroem in
8530 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00098.html>:
8531 "nonterm: { $$ = 123; } { $$ = $1; };" was wrongly rejected,
8532 because the Bison parser reads the second action before reducing
8533 the first one.
8534 * src/scan-gram.l (rule_length): New static var.
8535 Use it to keep track of the rule length in the scanner, since
8536 we can't expect the parser to be in lock-step sync with the scanner.
8537 (handle_action_dollar, handle_action_at): Use this var.
8538 * tests/actions.at (Exotic Dollars): Test for the problem.
8539
8540 2002-10-12 Paul Eggert <eggert@twinsun.com>
8541
8542 * lib/timevar.c [! IN_GCC && HAVE_SYS_TIME_H]: Include <sys/time.h>.
8543 * m4/timevar.m4 (BISON_PREREQ_TIMEVAR): Check for <sys/time.h>.
8544 Include <sys/time.h> when checking for clock_t and struct tms.
8545 Use same include order as source.
8546 This is for the SunOS 4.1.4 porting bug reported by Peter Klein in
8547 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00016.html>.
8548
8549 * lib/timevar.c: Update copyright date and clarify comments.
8550 (get_time) [IN_GCC]: Keep the GCC version for reference.
8551
8552 * lib/timevar.c, lib/timevar.h, lib/timevar.def: Import
8553 GCC version as of today, then merge Bison's changes.
8554 Change "GCC" to "Bison" in copyright notice. timevar.def's
8555 author is Akim, so change that too.
8556
8557 * src/reader.c (grammar_current_rule_check):
8558 Don't worry about the default action if $$ is untyped.
8559 Prevents bogus warnings reported by Jim Gifford in
8560 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00015.html>.
8561
8562 * data/c.m4 (b4_token_enum): Do not define YYTOKENTYPE.
8563 * data/glr.c, data/lalr1.cc, data/yacc.c:
8564 Output token definitions before the first part of user declarations.
8565 Fixes compatibility problem reported by Jim Gifford for kbd in
8566 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00014.html>.
8567
8568 2002-10-11 Paul Eggert <eggert@twinsun.com>
8569
8570 * data/yacc.c (yyreport_parse_error): Remove, putting its body into...
8571 (yyparse): here. This undoes some of the 2002-07-25 change.
8572 Compatibility problem reported by Ralf S. Engelschall with
8573 OSSP cfg <http://www.ossp.org/pkg/lib/cfg/>.
8574
8575 2002-10-11 Akim Demaille <akim@epita.fr>
8576
8577 * tests/regression.at Characters Escapes): New.
8578 * src/scan-gram.l (SC_ESCAPED_CHARACTER): Accept \' in strings and
8579 characters.
8580 Reported by Jan Nieuwenhuizen.
8581
8582 2002-10-11 Akim Demaille <akim@epita.fr>
8583
8584 * po/id.po: New.
8585
8586 2002-10-10 Paul Eggert <eggert@twinsun.com>
8587
8588 Portability fixes for bitsets; this also avoids several GCC
8589 warnings.
8590
8591 * lib/abitset.c: Include <stddef.h>, for offsetof.
8592 * lib/lbitset.c: Likewise.
8593
8594 * lib/abitset.c (abitset_bytes): Return a size that is aligned
8595 properly for vectors of objects. Do not assume that adding a
8596 header size to a multiple of a word size yields a value that is
8597 properly aligned for the whole union.
8598 * lib/bitsetv.c (bitsetv_alloc): Likewise.
8599
8600 * lib/bitset_stats.c (bitset_stats_bytes): Adjust to new,
8601 unique names for structures.
8602 * lib/ebitset.c (ebitset_bytes): Likewise.
8603 * lib/lbitset.c (lbitset_bytes): Likewise.
8604
8605 * lib/abitset.c (abitset_ones, abitset_zero, abitset_empty_p,
8606 abitset_copy1, abitset_not, abitset_equal_p, abitset_subset_p,
8607 abitset_disjoint_p, abitset_and, abitset_and_cmp, abitset_andn,
8608 abitset_andn_cmp, abitset_or, abitset_or_cmp, abitset_xor,
8609 abitset_xor_cmp, abitset_and_or, abitset_and_or_cmp,
8610 abitset_andn_or, abitset_andn_or_cmp, abitset_or_and,
8611 abitset_or_and_cmp, abitset_copy): Supply prototype decls,
8612 to improve the type-checking that GCC can do.
8613 * lib/bitset.c (bitset_op4_cmp): Likewise.
8614 * lib/bitset_stats.c (bitset_stats_count,
8615 bitset_stats_empty_p, bitset_stats_ones, bitset_stats_zero,
8616 bitset_stats_copy, bitset_stats_disjoint_p,
8617 bitset_stats_equal_p, bitset_stats_not, bitset_stats_subset_p,
8618 bitset_stats_and, bitset_stats_and_cmp, bitset_stats_andn,
8619 bitset_stats_andn_cmp, bitset_stats_or, bitset_stats_or_cmp,
8620 bitset_stats_xor, bitset_stats_xor_cmp, bitset_stats_and_or,
8621 bitset_stats_and_or_cmp, bitset_stats_andn_or,
8622 bitset_stats_andn_or_cmp, bitset_stats_or_and,
8623 bitset_stats_or_and_cmp): Likewise.
8624 * lib/lbitset.c (lbitset_and, lbitset_and_cmp, lbitset_andn,
8625 lbitset_andn_cmp, lbitset_or, lbitset_or_cmp, lbitset_xor,
8626 lbitset_xor_cmp, lbitset_empty_p, lbitset_ones, lbitset_not,
8627 lbitset_subset_p, lbitset_disjoint_p, debug_lbitset): Likewise.
8628
8629 * lib/abitset.h: Include bitset.h, not bbitset.h.
8630 * lib/ebitset.h: Likewise.
8631 * lib/lbitset.h: Likewise.
8632
8633 * lib/bbitset.h: (enum_bitset_ops, enum_bitset_type): New types.
8634 All instances of parameters of type enum bitset_opts are now of
8635 type enum_bitset_opts, to conform to the C Standard, and similarly
8636 for enum_bitset_type.
8637 * lib/ebitset.c (enum_ebitset_find_mode): Likewise.
8638 * lib/lbitset.c (enum_lbitset_find_mode): Likewise.
8639
8640 Do not use "struct bitset_struct" to mean different things in
8641 different modules. Not only is this confusing, it violates
8642 the C Standard, which requires that structure types in different
8643 modules must be compatible if one is to be passed to the other.
8644 * lib/bbitset.h (bitset): Now points to a union, not to a struct.
8645 All instances of "struct bitset_struct *" replaced with "bitset".
8646 * lib/bitset.h (struct bitset_struct): Remove, replacing with....
8647 (union bitset_union, struct abitset_struct, struct ebitset_struct,
8648 struct lbitset_struct, struct bitset_stats_struct): New types.
8649 All uses of struct bitset_struct changed to union bitset_union,
8650 etc.
8651 * lib/abitset.c (struct abitset_struct, abitset,
8652 struct bitset_struct): Remove.
8653 * lib/bitset_stats.c (struct bitset_stats_struct, bitset_stats,
8654 struct bitset_struct): Remove.
8655 * lib/ebitset.c (struct ebitset_struct, ebitset, struct
8656 bitset_struct): Remove.
8657 * lib/lbitset.c (struct lbitset_struct, lbitset, bitset_struct):
8658 Likewise.
8659
8660 Do not call a function of type T using a call that assumes the
8661 function is of a different type U. Standard C requires that a
8662 function must be called with a type that is compatible with its
8663 definition.
8664 * lib/bbitset.h (bitset_and_or_, bitset_andn_or_, bitset_or_and_):
8665 New decls.
8666 * lib/bitset.c (bitset_and_or_, bitset_andn_or_, bitset_or_and_):
8667 New functions.
8668 * lib/ebitset.c (PFV): Remove.
8669 * lib/lbitset.c (PFV): Likewise.
8670 * lib/ebitset.c (ebitset_and, ebitset_andn, ebitset_or,
8671 ebitset_xor, ebitset_copy, ebitset_ones, ebitset_empty_p): New
8672 decls.
8673 (ebitset_and, ebitset_andn, ebitset_or, ebitset_xor): New functions.
8674 (ebitset_vtable): Use them.
8675 * lib/lbitset.c (lbitset_and, lbitset_andn, lbitset_or,
8676 lbitset_xor): New functions.
8677 (lbitset_vtable): Use them.
8678
8679 * lib/bitset.h (bitset_next, bitset_prev, bitset_only_set_p):
8680 Declare.
8681
8682 * lib/bitsetv.c (bitsetv_alloc): Add a cast to (void *) to avoid a
8683 GCC warning.
8684 * lib/lbitset.c (LBITSET_CURRENT1): Likewise.
8685 Use offsetof, for simplicity.
8686
8687 2002-10-06 Paul Eggert <eggert@twinsun.com>
8688
8689 * lib/bitset.h (bitset_reset): Do not assume that bitset_word is
8690 the same width as int. This reapplies a hunk of the 2002-08-12 patch
8691 <http://lists.gnu.org/archive/html/bison-patches/2002-08/msg00007.html>,
8692 which was inadvertently undone by the 2002-09-30 patch.
8693 * lib/lbitset.c (debug_lbitset): Do not assume that bitset_word is
8694 the same width as int.
8695
8696 2002-10-04 Paul Eggert <eggert@twinsun.com>
8697
8698 Version 1.50.
8699
8700 * configure.ac (AC_INIT), NEWS: Increment version number.
8701
8702 * doc/bison.texinfo: Minor spelling, grammar, and white space
8703 fixes.
8704 (Symbols): Mention that any negative value returned from yylex
8705 signifies end-of-input. Warn about negative chars. Mention
8706 the portable Standard C character set.
8707
8708 The GNU coding standard says CFLAGS and YFLAGS are reserved
8709 for the installer to set.
8710 * lib/Makefile.am (AM_CFLAGS): Renamed from CFLAGS.
8711 * src/Makefile.am (AM_CFLAGS): Likewise.
8712 (AM_YFLAGS): Renamed from YFLAGS.
8713
8714 Fix some MAX and MIN problems.
8715 * src/gram.h (ITEM_NUMBER_MIN): MIN_MAX -> INT_MIN.
8716 * src/lalr.h (GOTO_NUMBER_MAX): INT_MAX -> SHRT_MAX.
8717 * src/symtab.h (SYMBOL_NUMBER_MAX): New macro.
8718 * src/reader.c (reader): Use it.
8719
8720 * tests/regression.at (Braces parsing): Use grep, not fgrep, as
8721 POSIX 1003.1-2001 has removed fgrep.
8722
8723 2002-10-04 Michael Hayes <m.hayes@elec.canterbury.ac.nz>
8724
8725 * lib/bbitset.h (BITSET_WINDEX_MAX): Redefine so that it cannot be
8726 interpreted as signed.
8727 * lib/ebitset.c (ebitset_list): Fix bug.
8728
8729 2002-10-01 Paul Eggert <eggert@twinsun.com>
8730
8731 More fixes for 64-bit hosts and large bitsets.
8732
8733 * lib/abitset.c (struct abitset_struct.n_bits, abitset_small_list,
8734 abitset_size, abitset_list, abitset_list_reverse, abitset_list):
8735 Use bitset_bindex, not int or unsigned int or size_t, to count bits.
8736 * lib/bbitset.h (struct bitset_vtable.size, struct bitset_vtable.count,
8737 struct bitset_vtable.list, struct bitset_vtable.list_reverse,
8738 bitset_count_, bitset_next, bitset_prev, bitset_first, bitset_last,
8739 bitset_count_): Likewise.
8740 * lib/bitset.h (bitset_iterator.num, bitset_iterator.i,
8741 bitset_first, bitset_last): Likewise.
8742 * lib/bitset_stats.c (bitset_stats_size, bitset_stats_list,
8743 bitset_stats_list_reverse, bitset_stats_size,
8744 bitset_stats_count, bitset_stats_list, bitset_stat_list_reverse):
8745 Likewise.
8746 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
8747 * lib/bitsetv.c (bitsetv_alloc, bitsetv_create, bitsetv_free,
8748 bitsetv_zero, bitsetv_ones, bitsetv_transitive_closure,
8749 bitsetv_reflexive_transitive_closure): Likewise.
8750 * lib/bitsetv.h (bitsetv_alloc, bitsetv_create): Likewise.
8751 * lib/ebitset.c (ebitset_size, ebitset_list, ebitset_list_reverse):
8752 Likewise.
8753 * lib/lbitset.c (lbitset_size, lbitset_list, lbitset_list_merge):
8754 Likewise.
8755
8756 * lib/abitset.c (abitset_ones, abitset_zero, abitset_bytes):
8757 Use size_t, not unsigned int, to count bytes.
8758 * lib/abitset.h (abitset_bytes): Likewise.
8759 * lib/bitset.c (bitset_bytes, bitset_alloc, bitset_obstack_alloc):
8760 Likewise.
8761 * lib/bitset.h (bitset_bytes): Likewise.
8762 * lib/bitset_stats.c (bitset_stats_bytes, bitset_stats_init): Likewise.
8763 * lib/bitset_stats.h (bitset_stats_bytes): Likewise.
8764 * lib/bitsetv.c (bitsetv_alloc): Likewise.
8765 * lib/ebitset.c (ebitset_bytes): Likewise.
8766 * lib/ebitset.h (ebitset_bytes): Likewise.
8767 * lib/lbitset.c (lbitset_bytes): Likewise.
8768 * lib/lbitset.h (lbitset_bytes): Likewise.
8769
8770 * lib/abitset.c (abitset_empty_p, abitset_not, abitset_equal_p,
8771 abitset_subset_p, abitset_disjoint_p, abitset_and,
8772 abitset_and_cmp, abitset_andn, abitset_andn_cmp, abitset_or,
8773 abitset_or_cmp, abitset_xor, abitset_xor_cmp, abitset_and_or,
8774 abitset_and_or_cmp, abitset_andn_or, abitset_andn_or_cmp,
8775 abitset_or_and, abitset_or_and_cmp):
8776 Use bitset_windex instead of unsigned int.
8777 * lib/bitsetv.c (bitsetv_dump, debug_bitsetv): Likewise.
8778 * lib/ebitset.c (struct ebitset_struct.size, ebitset_elts_grow,
8779 ebitset_elt_add, ebitset_elt_remove, ebitset_weed,
8780 ebitset_elt_find, ebitset_list_reverse, ebitset_list, ebitset_init):
8781 Likewise.
8782 * lib/lbitset.c (lbitset_ones, lbitset_not): Likewise.
8783
8784 * lib/bitset.c (bitset_print):
8785 Use proper printf formats for widths of integer types.
8786 * lib/bitset_stats.c (bitset_percent_histogram_print,
8787 bitset_log_histogram_print, bitset_stats_print_1): Likewise.
8788 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
8789 * lib/bitsetv.c (bitsetv_dump, debug_bitsetv): Likewise.
8790 * lib/lbitset.c (lbitset_bytes): Likewise.
8791
8792 * lib/bbitset.h (BITSET_BINDEX_MAX, BITSET_WINDEX_MAX,
8793 BITSET_SIZE_MAX): New macros.
8794 (BITSET_INDEX_MAX): Remove. It wasn't right, since it assumed that
8795 sizeof (bitset_word) == sizeof (bitset_windex). All uses changed
8796 to BITSET_WINDEX_MAX.
8797
8798 * lib/bitset.c (bitset_next, bitset_prev, bitset_first,
8799 bitset_last): Return BITSET_BINDEX_MAX (not -1) for no value,
8800 since we now return the bitset_bindex type (not int).
8801
8802 * lib/bitsetv.c (bitsetv_alloc): Check for arithmetic overflow
8803 when computing sizes.
8804 * lib/ebitset.c (ebitset_elts_grow): Likewise.
8805
8806 * lib/lbitset.c (lbitset_elt_find): Simplify windex calculation
8807 and avoid cast to unsigned.
8808
8809 2002-09-30 Akim Demaille <akim@epita.fr>
8810
8811 * lib/abitset.c, lib/bbitset.h, lib/bitset.c, lib/bitset.h,
8812 * lib/bitset_stats.c, lib/bitsetv.c, lib/ebitset.c, lib/lbitset.c:
8813 Updates from Michael Hayes.
8814
8815 2002-09-30 Art Haas <ahaas@neosoft.com>
8816
8817 * configure.ac: Update AC_OUTPUT and AM_CONFIG_HEADER
8818 invocations.
8819 * tests/cxx-type.at (declarator): Don't rely on NDEBUG being not
8820 defined.
8821
8822 2002-09-27 Akim Demaille <akim@epita.fr>
8823
8824 Version 1.49c.
8825
8826 2002-09-27 Akim Demaille <akim@epita.fr>
8827
8828 * configure.ac (AM_INIT_AUTOMAKE): We _need_ 1.7.
8829 (Because of AC_LIBSOURCE).
8830
8831 2002-09-27 Akim Demaille <akim@epita.fr>
8832
8833 Playing with Autoscan.
8834
8835 * configure.ac: Remove the old LIBOBJ tweaks.
8836 (AC_REPLACE_FUNCS): Add strrchr and strtol.
8837 * lib/strrchr.c: New.
8838 * lib/strtol.c: New, from the Coreutils 4.5.1.
8839
8840 2002-09-27 Akim Demaille <akim@epita.fr>
8841
8842 Playing with Autoscan.
8843
8844 * m4/prereq.m4 (jm_PREREQ_ARGMATCH, jm_FUNC_ARGMATCH): New.
8845 * lib/Makefile.am (libbison_a_SOURCES): No longer include
8846 argmatch.c and argmatch.h, since they are AC_LIBSOURCE'd.
8847 * lib/strcasecmp.c, lib/strncasecmp.c, lib/memcmp.c: New, from the
8848 Coreutils 4.5.1.
8849
8850 2002-09-24 Akim Demaille <akim@epita.fr>
8851
8852 * doc/bison.texinfo (Stack Overflow): xref to Recursion.
8853 (Frequently Asked Questions, Parser Stack Overflow): New.
8854
8855 2002-09-13 Akim Demaille <akim@epita.fr>
8856
8857 Playing with autoscan.
8858
8859 * src/reader.c (get_merge_function): Use xstrdup, not strdup.
8860 * src/files.c (skeleton_find): Remove, unused.
8861 * m4/memcmp.m4: New, from the Coreutils 4.5.1.
8862 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Run jm_FUNC_MEMCMP.
8863
8864 2002-09-13 Akim Demaille <akim@epita.fr>
8865
8866 * configure.ac (AM_INIT_AUTOMAKE): Require Automake 1.6.3.
8867 * Makefile.am (AUTOMAKE_OPTIONS): Don't.
8868
8869 2002-09-13 Akim Demaille <akim@epita.fr>
8870
8871 * configure.ac: Require 2.54.
8872 s/jm_FUNC_MALLOC/AC_FUNC_MALLOC/.
8873 s/jm_FUNC_REALLOC/AC_FUNC_REALLOC/.
8874 * m4/c-bs-a.m4, m4/malloc.m4, m4/mbstate_t.m4, m4/realloc.m4:
8875 Remove, provided by Autoconf macros.
8876
8877 2002-09-12 Akim Demaille <akim@epita.fr>
8878
8879 * m4/prereq.m4: Update, from Coreutils 4.5.1.
8880
8881 2002-09-12 Akim Demaille <akim@epita.fr>
8882
8883 * m4/prereq.m4: Update, from Fileutils 4.1.5.
8884 * configure.ac (jm_PREREQ_TEMPNAME): Invoke it.
8885 Reported by Martin Mokrejs.
8886
8887 2002-09-10 Akim Demaille <akim@epita.fr>
8888
8889 * src/parse-gram.y: Associate a human readable string to each
8890 token type.
8891 * tests/regression.at (Invalid inputs): Adjust.
8892
8893 2002-09-10 Gary V. Vaughan <gary@gnu.org>
8894
8895 * tests/Makefile.am ($(srcdir)/package.m4): Bison now ships
8896 with an Autoconf-2.5x style configure.ac.
8897
8898 2002-09-06 Paul Eggert <eggert@twinsun.com>
8899
8900 * doc/bison.texinfo (Conditions): Make explicit that the GPL
8901 exception applies only to yacc.c. This is a modification of a
8902 patch originally suggested by Akim Demaille.
8903
8904 2002-09-06 Akim Demaille <akim@epita.fr>
8905
8906 * data/c.m4 (b4_copyright): Move the GPL exception comment from
8907 here to...
8908 * data/yacc.c: here.
8909
8910 * data/lalr1.cc (struct yyltype): Don't define it, since we use
8911 LocationType.
8912 (b4_ltype): Default to yy::Location from location.hh.
8913
8914 2002-09-04 Jim Meyering <jim@meyering.net>
8915
8916 * data/yacc.c: Guard the declaration of yytoknum also with
8917 `#ifdef YYPRINT', so it is declared only when used.
8918
8919 2002-09-04 Akim Demaille <akim@epita.fr>
8920
8921 * configure.in: Rename as...
8922 * configure.ac: this.
8923 Bump to 1.49c.
8924
8925 2002-09-04 Akim Demaille <akim@epita.fr>
8926
8927 * src/assoc.c, src/closure.c, src/gram.c, src/injections.c,
8928 * src/lalr.c, src/LR0.c, src/relation.c, src/tables.c: Don't
8929 translate maintainer only messages.
8930
8931 2002-08-12 Paul Eggert <eggert@twinsun.com>
8932
8933 Version 1.49b.
8934
8935 * Makefile.am (SUBDIRS): Remove intl.
8936 (DISTCLEANFILES): Remove.
8937 * NEWS: Mention that GNU M4 is now required. Clarify what is
8938 meant by "larger grammars". Mention the pt_BR translation.
8939 * configure.in (AC_CHECK_DECLS): Add getenv, getopt.
8940 (AM_GNU_GETTEXT_VERSION): New macro, replacing GETTEXT_VERSION var.
8941 Bump version from 0.11.2 to 0.11.5.
8942 (BISON_PREREQ_STAGE): Remove.
8943 (AM_GNU_GETTEXT): Use external gettext.
8944 (AC_OUTPUT): Remove intl/Makefile.
8945
8946 * config/depcomp, config/install-sh: Sync with Automake 1.6.3.
8947
8948 * data/glr.c: Include string.h, for strlen.
8949 (yyreportParseError): Use size_t for yysize.
8950 (yy_yypstack): No longer nested inside yypstates, as nested
8951 functions are not portable. Do not assume size_t is the
8952 same width as int.
8953 (yypstates): Do not assume that ptrdiff_t is the same width
8954 as int, and similarly for yyposn and YYINDEX.
8955
8956 * data/yacc.c: Fix comment about `$$ = $1': it can copy garbage.
8957
8958 * lib/Makefile.am (INCLUDES): Do not include from the intl
8959 directory, which has been removed.
8960 * src/Makefile.am (INCLUDES): Likewise.
8961
8962 * lib/Makefile.am (libbison_a_SOURCES): Add unlocked-io.h.
8963 (bitsets_sources, additional_bitsets_sources, timevars_sources):
8964 New vars.
8965
8966 * lib/Makefile.am (libbison_a_SOURCES): Avoid +=, a GNU make extension.
8967 * tests/Makefile.am (EXTRA_DIST): Likewise.
8968
8969 * lib/abitset.c (abitset_reverse_list, ebitset_reverse_list):
8970 Do not assume that bitset_windex is the same width as unsigned.
8971
8972 * lib/abitset.c (abitset_unused_clear): Do not assume that
8973 bitset_word is the same width as int.
8974 * lib/bbitset.h (BITSET_INDEX_MAX, BITSET_MSB): Likewise.
8975 * lib/bitset.h (bitset_set, bitset_reset): Likewise.
8976 * lib/bitset_stats.c (bitset_stats_set, bitset_stats_reset): Likewise.
8977 * lib/ebitset.c (ebitset_set, ebitset_reset): Likewise.
8978 * lib/lbitset.c (lbitset_set, lbitset_reset): Likewise.
8979
8980 * lib/abitset.c (abitset_op1): Use -1, not ~0, as memset arg (for
8981 portability to one's complement hosts!).
8982 * lib/ebitset.c (ebitset_op1): Likewise.
8983 * lib/lbitset.c (lbitset_op1): Likewise.
8984
8985 * lib/argmatch.c, lib/quotearg.c, quotearg.h: Sync with GNU tar.
8986 * lib/argmatch.h, lib/basename.c, lib/dirname.c, lib/dirname.h,
8987 lib/hash.c, lib/hash.h, lib/strnlen.c, lib/xmalloc.c:
8988 Sync with fileutils.
8989 * lib/error.c, lib/getopt.c, lib/getopt.h, lib/getopt1.c,
8990 lib/gettext.h: Sync with diffutils.
8991
8992 * lib/memrchr.c, lib/mkstemp.c, lib/strchr.c, lib/strnlen.c,
8993 lib/strspn.c, lib/tempname.c: Use GPL, not LGPL.
8994
8995 * lib/obstack.c, lib/obstack.h: Sync with fileutils, except use
8996 PROTOTYPES to check for prototypes, and "defined __STDC__" to
8997 check for void *.
8998
8999 * lib/bbitset.h (BITSET_WORD_BITS): Now of type unsigned, not
9000 size_t; the old version tried to do this but casted improperly.
9001 (bitset_bindex, bitset_windex): Now size_t, not unsigned long.
9002 (bitset_test): Now returns int, not unsigned long.
9003
9004 * lib/bitset_stats.c: Include "gettext.h".
9005 (_): New macro.
9006 (bitset_stats_set, bitset_stats_reset, bitset_stats_test): Don't
9007 name locals "index", as it generates unnecessary warnings on some
9008 hosts that have an "index" function.
9009
9010 * lib/bitset_stats.c (bitset_stats_print_1, bitset_stats_print,
9011 bitset_stats_read, bitset_stats_write): Wrap strings in _() if
9012 they need translation.
9013 * src/LR0.c (state_list_append, new_itemsets, get_state,
9014 append_states, generate_states): Likewise.
9015 * src/assoc.c (assoc_to_string): Likewise.
9016 * src/closure.c (print_closure, set_firsts, closure): Likewise.
9017 * src/gram.c (grammar_dump): Likewise.
9018 * src/injections.c (injections_compute): Likewise.
9019 * src/lalr.c (lookaheads_print): Likewise.
9020 * src/relation.c (relation_transpose): Likewise.
9021 * src/scan-gram.l: Likewise.
9022 * src/tables.c (table_grow, pack_vector): Likewise.
9023
9024 * m4/Makefile.am (EXTRA_DIST): Remove codeset.m4,
9025 glibc21.m4, isc-posix.m4 lcmessage.m4, stage.m4.
9026 * m4/malloc.m4, m4/realloc.m4: Sync with diffutils.
9027 * m4/mbstate_t.m4: Sync with fileutils.
9028 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): AC_MBSTATE_T -> AC_TYPE_MBSTATE_T.
9029
9030 * po/LINGUAS: Add pt_BR.
9031 * po/POTFILES.in: Add src/assoc.c, src/closure.c, src/gram.c,
9032 src/main.c, src/relation.c, src/state.c, lib/bitset_stats.c,
9033 lib/timevar.c.
9034 Use src/parse-gram.y instead of src/parse-gram.c, as the gettext
9035 manual recommends.
9036 Similarly, use src/scan-gram.l instead of src/scan-gram.c.
9037
9038 * src/complain.c (strerror_r): Remove decl; not needed.
9039 (strerror): Use same pattern as ../lib/error.c.
9040
9041 * src/files.c, src/files.h (compute_header_macro): Remove; unused.
9042
9043 * src/gram.c (grammar_dump): Do not assume ptrdiff_t fits in int.
9044
9045 * src/main.c (main): Cast result of bindtextdomain and textdomain
9046 to void, to avoid a GCC warning when --disable-nls is in effect.
9047
9048 * src/scan-gram.l: Use strings rather than escapes when possible,
9049 to minimize the number of warnings from xgettext.
9050 (handle_action_dollar, handle_action_at): Don't use isdigit,
9051 as it mishandles negative chars and it may not work as expected
9052 outside the C locale.
9053
9054 * src/symtab.c (symbol_get): Don't cast LHS of an assignment;
9055 this is a GCC extension and is not portable to other compilers.
9056
9057 * src/system.h (alloca): Use same pattern as ../lib/error.c.
9058 Do not include <ctype.h>; no longer needed.
9059 Do not include <malloc.h>; no longer needed (and generates
9060 warnings on OpenBSD 3.0).
9061
9062 * tests/cxx-type.at (yylex): Do not pass signed char to isupper;
9063 it's not portable.
9064
9065 * tests/regression.at: Do not use 'cc -c input.c -o input';
9066 Sun C rejects this. Instead, use 'cc -c input.c -o input.o'.
9067
9068 * tests/synclines.at (AC_SYNCLINES_COMPILE): Accept any nonzero
9069 exit status as failure, not just exit status 1. Sun C exits
9070 with status 2 sometimes.
9071
9072 * tests/torture.at (AT_INCREASE_DATA_SIZE): New macro.
9073 Use it for the two large tests.
9074
9075 2002-08-02 Akim Demaille <akim@epita.fr>
9076
9077 * src/conflicts.c (conflicts_output): Don't output rules never
9078 reduced here, since anyway that computation doesn't work.
9079 * src/gram.h, src/gram.h (rule_filter_t, rule_useful_p)
9080 (rule_useless_p, rule_never_reduced_p): New.
9081 (grammar_rules_partial_print): Use a filter instead of a range.
9082 Display the title only if needed.
9083 (grammar_rules_print): Adjust.
9084 (grammar_rules_never_reduced_report): New.
9085 * src/tables.c (action_row): Move the computation of rules never
9086 reduced to...
9087 (token_actions): here.
9088 * src/main.c (main): Make the parser before making the report, so
9089 that rules never reduced are computed.
9090 Call grammar_rules_never_reduced_report.
9091 * src/print.c (print_results): Report rules never reduced.
9092 * tests/conflicts.at, tests/reduce.at: Adjust.
9093
9094 2002-08-01 Akim Demaille <akim@epita.fr>
9095
9096 Instead of attaching lookaheads and duplicating the rules being
9097 reduced by a state, attach the lookaheads to the reductions.
9098
9099 * src/state.h (state_t): Remove the `lookaheads',
9100 `lookaheads_rule' member.
9101 (reductions_t): Add a `lookaheads' member.
9102 Use a regular array for the `rules'.
9103 * src/state.c (reductions_new): Initialize the lookaheads member
9104 to 0.
9105 (state_rule_lookaheads_print): Adjust.
9106 * src/state.h, src/state.c (state_reductions_find): New.
9107 * src/conflicts.c (resolve_sr_conflict, set_conflicts)
9108 (count_rr_conflicts): Adjust.
9109 * src/lalr.c (LArule): Remove.
9110 (add_lookback_edge): Adjust.
9111 (state_lookaheads_count): New.
9112 (states_lookaheads_initialize): Merge into...
9113 (initialize_LA): this.
9114 (lalr_free): Adjust.
9115 * src/main.c (main): Don't free nullable and derives too early: it
9116 is used by --verbose.
9117 * src/print.c, src/print_graph.c, src/tables.c: Adjust.
9118
9119 2002-08-01 Akim Demaille <akim@epita.fr>
9120
9121 * src/derives.h, src/derives.c (derives): A `rule_t***' instead of
9122 `rule_number_t**'.
9123 (set_derives, free_derives): Rename as...
9124 (derives_compute, derives_free): this.
9125 Adjust all dependencies.
9126 * src/nullable.c (set_nullable, free_nullable): Rename as...
9127 (nullable_compute, nullable_free): these.
9128 (rule_list_t): Store rule_t *, not rule_number_t.
9129 * src/state.c (state_rule_lookaheads_print): Directly compare rule
9130 pointers, instead of their numbers.
9131 * src/main.c (main): Call nullable_free, and derives_free earlier,
9132 as they were lo longer used.
9133
9134 2002-08-01 Akim Demaille <akim@epita.fr>
9135
9136 * lib/timevar.c (get_time): Include children time.
9137 * src/lalr.h (LA, LArule): Don't export them: used with the
9138 state_t.
9139 * src/lalr.c (LA, LArule): Static.
9140 * src/lalr.h, src/lalr.c (lalr_free): New.
9141 * src/main.c (main): Call it.
9142 * src/tables.c (pack_vector): Check whether loc is >= to the
9143 table_size, not >.
9144 (pack_tables): Don't free froms, tos, conflict_tos, and pos...
9145 (tables_generate): do it, since that's also it which allocates
9146 them.
9147 Don't free LA and LArule, main does.
9148
9149 2002-07-31 Akim Demaille <akim@epita.fr>
9150
9151 Separate parser tables computation and output.
9152
9153 * src/output.c (nvectors, base_t, base, base_ninf, conflict_table)
9154 (conflict_list, conflict_list_cnt, table, check, table_ninf)
9155 (yydefgoto, yydefact, high): Move to...
9156 * src/tables.h, src/tables.c: here.
9157 * src/output.c (vector_number_t, VECTOR_NUMBER_MAX)
9158 (VECTOR_NUMBER_MIN, state_number_to_vector_number)
9159 (symbol_number_to_vector_number, nvectors, BASE_MAX, BASE_MIN)
9160 (froms, tos, conflict_tos, tally, width, action_t, ACTION_MAX)
9161 (ACTION_MIN, actrow, order, nentries, pos, conflrow)
9162 (conflict_list_free, table_size, lowzero, table_grow, conflict_row)
9163 (action_row, save_row, token_actions, save_column, default_goto)
9164 (goto_actions, sort_actions, matching_state, pack_vector)
9165 (table_ninf_remap, pack_table, prepare_actions): Move to...
9166 * src/tables.c: here.
9167 * src/tables.h, src/tables.c(tables_generate, tables_free): New.
9168 * src/output.c (token_actions, output_base, output_conflicts)
9169 (output_check): Merge into...
9170 (prepare_actions): this.
9171 (actions_output): Rename as...
9172 (user_actions_output): this.
9173 * src/main.c (main): Call tables_generate and tables_free.
9174
9175 2002-07-31 Akim Demaille <akim@epita.fr>
9176
9177 Steal GCC's --time-report support.
9178
9179 * lib/timevar.c, lib/timevar.h, lib/timevar.def: New,
9180 stolen/adjusted from GCC.
9181 * m4/stage.m4: Remove time related checks.
9182 * m4/timevar.m4: New.
9183 * configure.in: Adjust.
9184 * src/system.h: Adjust to using timevar.h.
9185 * src/getargs.h, src/getargs.c: Support trace_time for
9186 --trace=time.
9187 * src/main.c (stage): Remove.
9188 (main): Replace `stage' invocations with timevar calls.
9189 * src/output.c: Insert pertinent timevar calls.
9190
9191 2002-07-31 Akim Demaille <akim@epita.fr>
9192
9193 Let --trace have arguments.
9194
9195 * src/getargs.h (enum trace_e): New.
9196 * src/getargs.c (trace_args, trace_types, trace_argmatch): New.
9197 (long_options, short_options): --trace/-T takes an optional
9198 argument.
9199 Change all the uses of trace_flag to reflect the new flags.
9200 * tests/sets.at (Firsts, Nullable, Broken Closure): Use --trace=sets.
9201
9202 Strengthen `stage' portability.
9203
9204 * m4/stage.m4 (BISON_PREREQ_STAGE): New.
9205 * configure.in: Use it.
9206 Don't check for malloc.h and sys/times.h.
9207 * src/system.h: Include them when appropriate.
9208 * src/main.c (stage): Compile only when mallinfo, struct mallinfo,
9209 times and struct tms are available.
9210
9211 2002-07-30 Akim Demaille <akim@epita.fr>
9212
9213 In verbose parse error message, don't report `error' as an
9214 expected token.
9215 * tests/actions.at (Printers and Destructors): Adjust.
9216 * tests/calc.at (Calculator $1): Adjust.
9217 * data/yacc.c, data/glr.c, data/lalr1.c: When making the verbose
9218 error message, do not report the parser accepts the error token in
9219 that state.
9220
9221 2002-07-30 Akim Demaille <akim@epita.fr>
9222
9223 Normalize conflict related messages.
9224
9225 * src/complain.h, src/complain.c (warn, complain): New.
9226 * src/conflicts.c (conflicts_print): Use them.
9227 (conflict_report_yacc): New, extracted from...
9228 (conflicts_print): here.
9229 * tests/conflicts.at, tests/existing.at: Adjust.
9230
9231 2002-07-30 Akim Demaille <akim@epita.fr>
9232
9233 Report rules which are never reduced by the parser: those hidden
9234 by conflicts.
9235
9236 * src/LR0.c (save_reductions): Don't make the final state too
9237 different: save its reduction (accept) instead of having a state
9238 without any action (no shift or goto, no reduce).
9239 Note: the final state is now a ``regular'' state, i.e., the
9240 parsers now contain `reduce 0' as default reduction.
9241 Nevertheless, since they decide to `accept' when yystate =
9242 final_state, they still will not reduce rule 0.
9243 * src/print.c (print_actions, print_reduction): Adjust.
9244 * src/output.c (action_row): Track reduced rules.
9245 (token_actions): Report rules never reduced.
9246 * tests/conflicts.at, tests/regression.at: Adjust.
9247
9248 2002-07-30 Akim Demaille <akim@epita.fr>
9249
9250 `stage' was accidently included in a previous patch.
9251 Initiate its autoconfiscation.
9252
9253 * configure.in: Look for malloc.h and sys/times.h.
9254 * src/main.c (stage): Adjust.
9255 Report only when trace_flag.
9256
9257 2002-07-29 Akim Demaille <akim@epita.fr>
9258
9259 * src/state.h, src/state.c (transitions_t): Holds state_t*'s, not
9260 state_number_t.
9261 (errs_t): symbol_t*, not symbol_number_t.
9262 (reductions_t): rule_t*, not rule_number_t.
9263 (FOR_EACH_SHIFT): New.
9264 * src/LR0.c, src/conflicts.c, src/lalr.c, src/output.c
9265 * src/print.c, src/print_graph.c: Adjust.
9266
9267 2002-07-29 Akim Demaille <akim@epita.fr>
9268
9269 Use $accept and $end, as BYacc and BTYacc do, instead of $axiom and $.
9270
9271 * src/symtab.h, src/symtab.c (eoftoken, axiom): Rename as...
9272 (endtoken, accept): these.
9273 * src/reader.c (reader): Set endtoken's default tag to "$end".
9274 Set undeftoken's tag to "$undefined" instead of "$undefined.".
9275 * doc/bison.texinfo (Table of Symbols): Mention $accept and $end.
9276 Adjust.
9277
9278 2002-07-29 Akim Demaille <akim@epita.fr>
9279
9280 * src/reduce.c (reduce_grammar): When the language is empty,
9281 complain about the start symbol, not the axiom.
9282 Use its location.
9283 * tests/reduce.at (Empty Language): New.
9284
9285 2002-07-26 Akim Demaille <akim@epita.fr>
9286
9287 * src/reader.h, src/reader.c (gram_error): ... can't get
9288 yycontrol without making too strong assumptions on the parser
9289 itself.
9290 * src/output.c (prepare_tokens): Use the real 0th value of
9291 token_translations instead of `0'.
9292 * src/parse-gram.y (yyerror): Don't rely on yycontrol being
9293 visible here.
9294 * data/yacc.c (yyreport_parse_error): Rename yylocation as yylloc
9295 for the time being: %locations ought to provide it to yyerror.
9296
9297 2002-07-25 Akim Demaille <akim@epita.fr>
9298
9299 * src/output.c (prepare_tokens): Go up to ntokens, not ntokens + 1.
9300 * doc/bison.texinfo (Decl Summary): s/$illegal/$undefined./.
9301 * tests/regression.at (Web2c Actions): Adjust.
9302
9303 2002-07-25 Akim Demaille <akim@epita.fr>
9304
9305 Stop storing rules from 1 to nrules + 1.
9306
9307 * src/LR0.c, src/closure.c, src/derives.c, src/gram.c, src/lalr.c
9308 * src/nullable.c, src/output.c, src/print.c, src/reader.c
9309 * src/reduce.c: Allocate and free from &rules[0], not &rules[1].
9310 Iterate from 0 to nrules.
9311 Use rule_number_as_item_number and item_number_as_rule_number.
9312 Adjust to `derive' now containing possibly 0.
9313 * src/gram.h (rule_number_as_item_number, item_number_as_rule_number):
9314 Handle the `- 1' part in rule numbers from/to item numbers.
9315 * src/conflicts.c (log_resolution): Fix the message which reversed
9316 shift and reduce.
9317 * src/output.c (action_row): Initialize default_rule to -1.
9318 (token_actions): Adjust.
9319 * tests/sets.at (Nullable, Firsts): Fix the previously bogus
9320 expected output.
9321 * tests/conflicts.at (Resolved SR Conflicts): Likewise.
9322
9323 2002-07-25 Akim Demaille <akim@epita.fr>
9324
9325 * data/c.m4 (b4_c_function, b4_c_ansi_args, b4_c_ansi_arg)
9326 (b4_c_knr_arg_names, b4_c_knr_arg_name, b4_c_knr_arg_decls)
9327 (b4_c_knr_arg_decl): New.
9328 * data/yacc.c: Use it to define yysymprint, yydestruct, and
9329 yyreport_parse_error.
9330
9331 2002-07-25 Akim Demaille <akim@epita.fr>
9332
9333 * data/yacc.c (yyreport_parse_error): New, extracted from...
9334 (yyparse): here.
9335 (yydestruct, yysymprint): Move above yyparse.
9336 Be K&R compliant.
9337
9338 2002-07-25 Akim Demaille <akim@epita.fr>
9339
9340 * data/c.m4 (b4_ints_in, b4_int_type, b4_int_type_for): New,
9341 replace...
9342 (b4_sint_type, b4_uint_type): these.
9343 * data/yacc.c, data/glr.c, data/lalr1.cc: Use b4_int_type_for.
9344 * tests/regression.at (Web2c Actions): Adjust.
9345
9346 2002-07-25 Akim Demaille <akim@epita.fr>
9347
9348 * src/gram.h (TIEM_NUMBER_MAX): New.
9349 (item_number_of_rule_number, rule_number_of_item_number): Rename
9350 as...
9351 (rule_number_as_item_number, item_number_as_rule_number): these.
9352 Adjust dependencies.
9353 * src/output.c (vector_number_t, VECTOR_NUMBER_MAX)
9354 (VECTOR_NUMBER_MIN, state_number_to_vector_number)
9355 (symbol_number_to_vector_number): New.
9356 (order): Of vector_number_t* type.
9357 (base_t, BASE_MAX, BASE_MIN): New.
9358 (froms, tos, width, pos, check): Of base_t type.
9359 (action_number_t, ACTION_MIN, ACTION_MAX): New.
9360 (actrow): Of action_number_t type.
9361 (conflrow): Of unsigned int type.
9362 (table_ninf, base_ninf): New.
9363 (GENERATE_MUSCLE_INSERT_TABLE): Also output the `*_min' value.
9364 (muscle_insert_int_table, muscle_insert_base_table)
9365 (muscle_insert_rule_number_table): New.
9366 (prepare_tokens): Output `toknum' as int_table.
9367 (action_row): Returns a rule_number_t.
9368 Use ACTION_MIN, not SHRT_MIN.
9369 (token_actions): yydefact is rule_number_t*.
9370 (table_ninf_remap): New.
9371 (pack_table): Use it for `base' and `table'.
9372 * data/yacc.c, data/glr.c, data/lalr1.cc (YYFLAG): Remove,
9373 replaced with...
9374 (YYPACT_NINF, YYTABLE_NINF): these.
9375 (yypact, yytable): Compute their types instead of hard-coded
9376 `short'.
9377 * tests/regression.at (Web2c Actions): Adjust.
9378
9379 2002-07-19 Akim Demaille <akim@epita.fr>
9380
9381 * src/scan-gram.l (id): Can start with an underscore.
9382
9383 2002-07-16 Akim Demaille <akim@epita.fr>
9384
9385 * src/assoc.c, src/asssoc.h (assoc_t, assoc_to_string): New.
9386 Adjust all former `associativity' dependencies.
9387 * src/symtab.c (symbol_new): Default associativity is `undef', not
9388 `right'.
9389 (symbol_check_alias_consistence): Adjust.
9390
9391 2002-07-09 Akim Demaille <akim@epita.fr>
9392
9393 * doc/bison.texinfo: Properly set the ``header'' part.
9394 Use @dircategory ``GNU programming tools'' as per Texinfo's
9395 documentation.
9396 Use @copying.
9397
9398 2002-07-09 Akim Demaille <akim@epita.fr>
9399
9400 * lib/quotearg.h: Protect against multiple inclusions.
9401 * src/location.h (location_t): Add a `file' member.
9402 (LOCATION_RESET, LOCATION_PRINT): Adjust.
9403 * src/complain.c (warn_at, complain_at, fatal_at): Drop
9404 `error_one_per_line' support.
9405
9406 2002-07-09 Akim Demaille <akim@epita.fr>
9407
9408 * src/complain.h, src/complain.c (warn, complain): Remove, unused.
9409 * src/reader.c (lineno): Remove.
9410 Adjust all dependencies.
9411 (get_merge_function): Take a location and use complain_at.
9412 * src/symtab.h, src/symtab.c (symbol_make_alias): Likewise.
9413 * tests/regression.at (Invalid inputs, Mixing %token styles):
9414 Adjust.
9415
9416 2002-07-09 Akim Demaille <akim@epita.fr>
9417
9418 * src/parse-gram.y (rules_or_grammar_declaration): Add an error
9419 recovery rule, and forbid extensions when --yacc.
9420 (gram_error): Use complain_at.
9421 * src/reader.c (reader): Exit if there were parse errors.
9422
9423 2002-07-09 Akim Demaille <akim@epita.fr>
9424
9425 * tests/synclines.at (AT_SYNCLINES_COMPILE): New.
9426 (AT_TEST_SYNCLINE): Adjust to unusual GCC outputs.
9427 Reported by R Blake <blakers@mac.com>.
9428
9429 2002-07-09 Akim Demaille <akim@epita.fr>
9430
9431 * data/yacc.c: Output the copyright notive in the header.
9432
9433 2002-07-03 Akim Demaille <akim@epita.fr>
9434
9435 * src/output.c (froms, tos): Are state_number_t.
9436 (save_column): sp, sp1, and sp2 are state_number_t.
9437 (prepare): Rename `final' as `final_state_number', `nnts' as
9438 `nterms_number', `nrules' as `rules_number', `nstates' as
9439 `states_number', and `ntokens' as `tokens_number'. Remove `nsym',
9440 unused.
9441 * data/yacc.c, data/glr.c, data/lalr1.cc: Adjust.
9442 * data/lalr1.cc (nsym_): Remove, unused.
9443
9444 2002-07-03 Akim Demaille <akim@epita.fr>
9445
9446 * src/lalr.h, src/lalr.c (goto_number_t): New.
9447 * src/lalr.c (goto_list_t): New.
9448 Propagate them.
9449 * src/nullable.c (rule_list_t): New.
9450 Propagate.
9451 * src/types.h: Remove.
9452
9453 2002-07-03 Akim Demaille <akim@epita.fr>
9454
9455 * src/closure.c (print_fderives): Use rule_rhs_print.
9456 * src/derives.c (print_derives): Use rule_rhs_print.
9457 (rule_list_t): New, replaces `shorts'.
9458 (set_derives): Add comments.
9459 * tests/sets.at (Nullable, Firsts): Adjust.
9460
9461 2002-07-03 Akim Demaille <akim@epita.fr>
9462
9463 * src/output.c (prepare_actions): Free `tally' and `width'.
9464 (prepare_actions): Allocate and free `order'.
9465 * src/symtab.c (symbols_free): Free `symbols'.
9466 * src/scan-gram.l (scanner_free): Clear Flex's scanners memory.
9467 * src/output.c (m4_invoke): Move to...
9468 * src/scan-skel.l: here.
9469 (<<EOF>>): Close yyout, and free its name.
9470
9471 2002-07-03 Akim Demaille <akim@epita.fr>
9472
9473 Fix some memory leaks, and fix a bug: state 0 was examined twice.
9474
9475 * src/LR0.c (new_state): Merge into...
9476 (state_list_append): this.
9477 (new_states): Merge into...
9478 (generate_states): here.
9479 (set_states): Don't ensure a proper `errs' state member here, do it...
9480 * src/conflicts.c (conflicts_solve): here.
9481 * src/state.h, src/state.c: Comment changes.
9482 (state_t): Rename member `shifts' as `transitions'.
9483 Adjust all dependencies.
9484 (errs_new): For consistency, also take the values as argument.
9485 (errs_dup): Remove.
9486 (state_errs_set): New.
9487 (state_reductions_set, state_transitions_set): Assert that no
9488 previous value was assigned.
9489 (state_free): New.
9490 (states_free): Use it.
9491 * src/conflicts.c (resolve_sr_conflict): Don't use an `errs_t' as
9492 temporary storage: use `errs' and `nerrs' as elsewhere.
9493 (set_conflicts): Allocate and free this `errs'.
9494
9495 2002-07-02 Akim Demaille <akim@epita.fr>
9496
9497 * lib/libiberty.h: New.
9498 * lib: Update the bitset implementation from upstream.
9499 * src/closure.c, src/lalr.c, src/output.c, src/print_graph.c,
9500 * src/state.c: Use BITSET_FOR_EACH, not BITSET_EXECUTE.
9501 * src/main.c: Adjust bitset stats calls.
9502
9503 2002-07-01 Paul Eggert <eggert@twinsun.com>
9504
9505 * src/scan-gram.l (<SC_ESCAPED_CHARACTER>): Convert to unsigned
9506 char, so that negative chars don't collide with $.
9507
9508 2002-06-30 Akim Demaille <akim@epita.fr>
9509
9510 Have the GLR tests be `warning' checked, and fix the warnings.
9511
9512 * data/glr.c (YYFPRINTF): Always define it, not only when YYDEBUG
9513 (yyuserAction, yyreportAmbiguity): `Use' all the arguments.
9514 (yyremoveDeletes): `yyi' and `yyj' are size_t.
9515 Use YYFPRINTF when under if (YYDEBUG) to avoid empty `if' bodies.
9516 (yyaddDeferredAction): static.
9517 (yyglrReduce): yyi, yyk, amd yyposn are size_t.
9518 (yyreportParseError): yyprefix is const.
9519 yytokenp is used only when verbose.
9520 (yy__GNUC__): Replace with __GNUC__.
9521 (yypdumpstack): yyi is size_t.
9522 (yypreference): Un-yy local variables and arguments, to avoid
9523 clashes with `yyr1'. Anyway, we are not in the user name space.
9524 (yytname_size): be an int, as is compared with ints.
9525 * tests/testsuite.at (AT_COMPILE, AT_PARSER_CHECK): New.
9526 Use them.
9527 * tests/cxx-gram.at: Use quotation to protect $1.
9528 Use AT_COMPILE to enable warnings hunts.
9529 Prototype yylex and yyerror.
9530 `Use' argc.
9531 Include `string.h', not `strings.h'.
9532 Produce and prototype stmtMerge only when used.
9533 yylex takes a location.
9534
9535 2002-06-30 Akim Demaille <akim@epita.fr>
9536
9537 We spend a lot of time in quotearg, in particular when --verbose.
9538
9539 * src/symtab.c (symbol_get): Store a quoted version of the key.
9540 (symbol_tag_get, symbol_tag_get_n, symbol_tag_print): Remove.
9541 Adjust all callers.
9542
9543 2002-06-30 Akim Demaille <akim@epita.fr>
9544
9545 * src/state.h (reductions_t): Rename member `nreds' as num.
9546 (errs_t): Rename members `nerrs' and `errs' as `num' and `symbols'.
9547 * src/state.c (ERRS_ALLOC, REDUCTIONS_ALLOC): Use the correct types.
9548
9549 2002-06-30 Akim Demaille <akim@epita.fr>
9550
9551 * src/state.h, src/state.c (shift_t, SHIFT_SYMBOL, SHIFT_IS_SHIFT)
9552 (SHIFT_IS_GOTO, SHIFT_IS_ERROR, SHIFT_DISABLE, SHIFT_IS_DISABLED)
9553 (shifts_to): Rename as...
9554 (transition_t, TRANSITION_SYMBOL, TRANSITION_IS_TRANSITION)
9555 (TRANSITION_IS_GOTO, TRANSITION_IS_ERROR, TRANSITION_DISABLE)
9556 (TRANSITION_IS_DISABLED, transitions_to): these.
9557
9558 2002-06-30 Akim Demaille <akim@epita.fr>
9559
9560 * src/print.c (print_shifts, print_gotos): Merge into...
9561 (print_transitions): this.
9562 (print_transitions, print_errs, print_reductions): Align the
9563 lookaheads columns.
9564 (print_core, print_transitions, print_errs, print_state,
9565 print_grammar): Output empty lines separator before, not after.
9566 (state_default_rule_compute): Rename as...
9567 (state_default_rule): this.
9568 * tests/conflicts.at (Defaulted Conflicted Reduction),
9569 (Unresolved SR Conflicts, Resolved SR Conflicts): Adjust.
9570 * tests/regression.at (Rule Line Numbers, Web2c Report): Adjust.
9571
9572 2002-06-30 Akim Demaille <akim@epita.fr>
9573
9574 Display items as we display rules.
9575
9576 * src/gram.h, src/gram.c (rule_lhs_print): New.
9577 * src/gram.c (grammar_rules_partial_print): Use it.
9578 * src/print.c (print_core): Likewise.
9579 * tests/conflicts.at (Defaulted Conflicted Reduction),
9580 (Unresolved SR Conflicts): Adjust.
9581 (Unresolved SR Conflicts): Adjust and rename as...
9582 (Resolved SR Conflicts): this, as was meant.
9583 * tests/regression.at (Web2c Report): Adjust.
9584
9585 2002-06-30 Akim Demaille <akim@epita.fr>
9586
9587 * src/print.c (state_default_rule_compute): New, extracted from...
9588 (print_reductions): here.
9589 Pessimize, but clarify the code.
9590 * tests/conflicts.at (Defaulted Conflicted Reduction): New.
9591
9592 2002-06-30 Akim Demaille <akim@epita.fr>
9593
9594 * src/output.c (action_row): Let default_rule be always a rule
9595 number.
9596
9597 2002-06-30 Akim Demaille <akim@epita.fr>
9598
9599 * src/closure.c (print_firsts, print_fderives, closure):
9600 Use BITSET_EXECUTE.
9601 * src/lalr.c (lookaheads_print): Likewise.
9602 * src/state.c (state_rule_lookaheads_print): Likewise.
9603 * src/print_graph.c (print_core): Likewise.
9604 * src/print.c (print_reductions): Likewise.
9605 * src/output.c (action_row): Likewise.
9606 Use SHIFT_IS_DISABLED, SHIFT_IS_SHIFT and SHIFT_SYMBOL.
9607
9608 2002-06-30 Akim Demaille <akim@epita.fr>
9609
9610 * src/print_graph.c: Use report_flag.
9611
9612 2002-06-30 Akim Demaille <akim@epita.fr>
9613
9614 * src/lalr.c (traverse, digraph, matrix_print, transpose): Move
9615 to...
9616 * src/relation.h, src/relation.c (traverse, relation_digraph)
9617 (relation_print, relation_transpose): New.
9618
9619 2002-06-30 Akim Demaille <akim@epita.fr>
9620
9621 * src/state.h, src/state.c (shifts_to): New.
9622 * src/lalr.c (build_relations): Use it.
9623
9624 2002-06-30 Akim Demaille <akim@epita.fr>
9625
9626 * src/gram.h (rule_number_t, RULE_NUMBER_MAX, int_of_rule_number)
9627 (item_number_of_rule_number, rule_number_of_item_number): New.
9628 * src/LR0.c, src/closure.c, src/derives.c, src/derives.h,
9629 * src/gram.c, src/lalr.c, src/nullable.c, src/output.c, src/print.c,
9630 * src/print_graph.c, src/reader.c, src/reduce.c, src/reduce.h:
9631 Propagate their use.
9632 Much remains to be done, in particular wrt `shorts' from types.h.
9633
9634 2002-06-30 Akim Demaille <akim@epita.fr>
9635
9636 * src/symtab.c (symbol_new): Initialize the `printer' member.
9637
9638 2002-06-30 Akim Demaille <akim@epita.fr>
9639
9640 * src/LR0.c (save_reductions): Remove, replaced by...
9641 * src/state.h, src/state.c (state_reductions_set): New.
9642 (reductions, errs): Rename as...
9643 (reductions_t, errs_t): these.
9644 Adjust all dependencies.
9645
9646 2002-06-30 Akim Demaille <akim@epita.fr>
9647
9648 * src/LR0.c (state_list_t, state_list_append): New.
9649 (first_state, last_state): Now symbol_list_t.
9650 (this_state): Remove.
9651 (new_itemsets, append_states, save_reductions): Take a state_t as
9652 argument.
9653 (set_states, generate_states): Adjust.
9654 (save_shifts): Remove, replaced by...
9655 * src/state.h, src/state.c (state_shifts_set): New.
9656 (shifts): Rename as...
9657 (shifts_t): this.
9658 Adjust all dependencies.
9659 * src/state.h (state_t): Remove the `next' member.
9660
9661 2002-06-30 Akim Demaille <akim@epita.fr>
9662
9663 * src/vcg.c (quote): Use slot 2, since we often pass symbol tag
9664 escaped in slot 0.
9665
9666 2002-06-30 Akim Demaille <akim@epita.fr>
9667
9668 Use hash.h for the state hash table.
9669
9670 * src/LR0.c (STATE_HASH_SIZE, state_hash): Remove.
9671 (allocate_storage): Use state_hash_new.
9672 (free_storage): Use state_hash_free.
9673 (new_state, get_state): Adjust.
9674 * src/lalr.h, src/lalr.c (states): Move to...
9675 * src/states.h (state_t): Remove the `link' member, no longer
9676 used.
9677 * src/states.h, src/states.c: here.
9678 (state_hash_new, state_hash_free, state_hash_lookup)
9679 (state_hash_insert, states_free): New.
9680 * src/states.c (state_table, state_compare, state_hash): New.
9681 * src/output.c (output_actions): Do not free states now, since we
9682 still need to know the final_state number in `prepare', called
9683 afterwards. Do it...
9684 * src/main.c (main): here: call states_free after `output'.
9685
9686 2002-06-30 Akim Demaille <akim@epita.fr>
9687
9688 * src/state.h, src/state.c (state_new): New, extracted from...
9689 * src/LR0.c (new_state): here.
9690 * src/state.h (STATE_ALLOC): Move to...
9691 * src/state.c: here.
9692 * src/LR0.h, src/LR0.c (nstates, final_state): Move to...
9693 * src/state.h, src/state.c: here.
9694
9695 2002-06-30 Akim Demaille <akim@epita.fr>
9696
9697 * src/reader.c (gensym): Rename as...
9698 * src/symtab.h, src/symtab.c (dummy_symbol_get): this.
9699 (getsym): Rename as...
9700 (symbol_get): this.
9701
9702 2002-06-30 Akim Demaille <akim@epita.fr>
9703
9704 * src/state.h (state_number_t, STATE_NUMBER_MAX): New.
9705 * src/LR0.c, src/LR0.h, src/conflicts.c, src/lalr.c, src/lalr.h,
9706 * src/output.c, src/print.c, src/print_graph.c: Propagate.
9707 * src/LR0.h, src/LR0.h (final_state): Is a state_t*.
9708
9709 2002-06-30 Akim Demaille <akim@epita.fr>
9710
9711 Make the test suite pass with warnings checked.
9712
9713 * tests/actions.at (Printers and Destructors): Improve.
9714 Avoid unsigned vs. signed issues.
9715 * tests/calc.at: Don't exercise the scanner here, do it...
9716 * tests/input.at (Torturing the Scanner): here.
9717
9718 2002-06-28 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
9719
9720 * data/glr.c: Correct typo in Emacs-mode directive. Slightly
9721 reorganize first lines parallel to yacc.c.
9722
9723 2002-06-28 Akim Demaille <akim@epita.fr>
9724
9725 * data/c.m4 (b4_copyright, b4_sint_type, b4_uint_type, b4_token_define)
9726 (b4_token_enum, b4_token_defines): New, factored from...
9727 * data/lalr1.cc, data/yacc.c, glr.c: here.
9728
9729 2002-06-28 Akim Demaille <akim@epita.fr>
9730
9731 * data/yacc.c (yydestruct, yysymprint): Pacify GCC warnings for
9732 unused variables.
9733 * src/output.c (merger_output): static.
9734
9735 2002-06-28 Akim Demaille <akim@epita.fr>
9736
9737 * src/reader.h: s/grammer_current_rule_merge_set/grammar_.../.
9738 * src/conflicts.c (conflicts_total_count): `i' is unsigned, to
9739 pacify GCC.
9740 * src/output.c (save_row): Initialize all the variables to pacify GCC.
9741
9742 2002-06-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
9743
9744 Accumulated changelog for new GLR parsing features.
9745
9746 * src/conflicts.c (count_total_conflicts): Change name to
9747 conflicts_total_count.
9748 * src/conflicts.h: Ditto.
9749 * src/output.c (token_actions): Use the new name.
9750 (output_conflicts): Change conflp => conflict_list_heads, and
9751 confl => conflict_list for better readability.
9752 * data/glr.c: Use the new names.
9753 * NEWS: Add self to GLR announcement.
9754
9755 * src/reader.c (free_merger_functions): Cleanup: XFREE->free.
9756
9757 * doc/bison.texinfo (GLR Parsers): Make corrections suggested by
9758 Akim Demaille.
9759
9760 * data/bison.glr: Change name to glr.c
9761 * data/glr.c: Renamed from bison.glr.
9762 * data/Makefile.am: Add glr.c
9763
9764 * src/getargs.c:
9765
9766 * src/symlist.h: Add dprec and merger fields to symbol_list_s.
9767 * src/symlist.c (symbol_list_new): Initialize dprec and merger fields.
9768
9769 Originally 2002-06-16 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
9770
9771 * data/bison.glr: Be sure to restore the
9772 current #line when returning to the skeleton contents after having
9773 exposed the input file's #line.
9774
9775 Originally 2002-06-13 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
9776
9777 * data/bison.glr: Bring up to date with changes to bison.simple.
9778
9779 Originally 2002-06-03 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
9780
9781 * data/bison.glr: Correct definitions that use b4_prefix.
9782 Various reformatting.
9783 (GLRStack): Make yychar (in YYPURE case) and yytokenp as part of stack.
9784 (yyreportParseError, yyrecoverParseError, yyprocessOneStack): remove
9785 yytokenp argument; now part of stack.
9786 (yychar): Define to behave as documented.
9787 (yyclearin): Ditto.
9788
9789 Originally 2002-05-14 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
9790
9791 * src/reader.h: Add declaration for free_merger_functions.
9792
9793 * src/reader.c (merge_functions): New variable.
9794 (get_merge_function): New function.
9795 (free_merger_functions): New function.
9796 (readgram): Check for %prec that is not followed by a symbol.
9797 Handle %dprec and %merge declarations.
9798 (packgram): Initialize dprec and merger fields in rules array.
9799
9800 * src/output.c (conflict_tos, conflrow, conflict_table, conflict_list,
9801 conflict_list_cnt, conflict_list_free): New variables.
9802 (table_grow): Also grow conflict_table.
9803 (prepare_rules): Output dprec and merger tables.
9804 (conflict_row): New function.
9805 (action_row): Output conflict lists for GLR parser. Don't use
9806 default reduction in conflicted states for GLR parser so that there
9807 are spaces for the conflict lists.
9808 (save_row): Also save conflict information.
9809 (token_actions): Allocate conflict list.
9810 (merger_output): New function.
9811 (pack_vector): Pack conflict table, too.
9812 (output_conflicts): New function to output yyconflp and yyconfl.
9813 (output_check): Allocate conflict_tos.
9814 (output_actions): Output conflict tables, also.
9815 (output_skeleton): Output b4_mergers definition.
9816 (prepare): Output b4_max_rhs_length definition.
9817 Use 'bison.glr' as default skeleton for GLR parsers.
9818
9819 * src/gram.c (glr_parser): New flag.
9820 (grammar_free): Call free_merger_functions.
9821
9822 * src/conflicts.c (count_rr_conflicts): Augment to optionally count
9823 all pairs of conflicting reductions, rather than just all tokens
9824 causing conflicts. Needed to size conflict tables.
9825 (conflicts_output): Modify call to count_rr_conflicts for new
9826 interface.
9827 (conflicts_print): Ditto.
9828 (count_total_conflicts): New function.
9829
9830 * src/reader.h (merger_list): New type.
9831 (merge_functions): New variable.
9832
9833 * src/lex.h (tok_dprec, tok_merge): New token types.
9834
9835 * src/gram.h (rule_s): Add dprec and merger fields.
9836 (glr_parser): New flag.
9837
9838 * src/conflicts.h (count_total_conflicts): New function.
9839
9840 * src/options.c (option_table): Add %dprec, %merge, and %glr-parser.
9841
9842 * doc/bison.texinfo (Generalized LR Parsing): New section.
9843 (GLR Parsers): New section.
9844 (Language and Grammar): Mention GLR parsing.
9845 (Table of Symbols): Add %dprec, %glr-parser, %merge, GLR
9846 Correct typo ("tge" -> "the").
9847
9848 * data/bison.glr: New skeleton for GLR parsing.
9849
9850 * tests/cxx-gram.at: New tests for GLR parsing.
9851
9852 * tests/testsuite.at: Include cxx-gram.at.
9853
9854 * tests/Makefile.am: Add cxx-gram.at.
9855
9856 * src/parse-gram.y:
9857
9858 * src/scan-gram.l: Add %dprec, %glr-parser, %merge.
9859
9860 * src/parse-gram.y: Grammar for %dprec, %merge, %glr-parser.
9861
9862 2002-06-27 Akim Demaille <akim@epita.fr>
9863
9864 * src/options.h, src/options.c: Remove.
9865 * src/getargs.c (short_options, long_options): New.
9866
9867 2002-06-27 Akim Demaille <akim@epita.fr>
9868
9869 * data/bison.simple, data/bison.c++: Rename as...
9870 * data/yacc.c, data/lalr1.cc: these.
9871 * doc/bison.texinfo (Environment Variables): Remove.
9872
9873 2002-06-25 Raja R Harinath <harinath@cs.umn.edu>
9874
9875 * src/getargs.c (report_argmatch): Initialize strtok().
9876
9877 2002-06-20 Akim Demaille <akim@epita.fr>
9878
9879 * data/bison.simple (b4_symbol_actions): New, replaces...
9880 (b4_symbol_destructor, b4_symbol_printer): these.
9881 (yysymprint): Be sure to call YYPRINT only for tokens, and using
9882 user token numbers.
9883
9884 2002-06-20 Akim Demaille <akim@epita.fr>
9885
9886 * data/bison.simple (yydestructor): Rename as...
9887 (yydestruct): this.
9888
9889 2002-06-20 Akim Demaille <akim@epita.fr>
9890
9891 * src/symtab.h, src/symtab.c (symbol_type_set)
9892 (symbol_destructor_set, symbol_precedence_set): The location is
9893 the last argument.
9894 Adjust all callers.
9895
9896 2002-06-20 Akim Demaille <akim@epita.fr>
9897
9898 * src/parse-gram.y (YYPRINT, yyprint): Don't mess with the parser
9899 internals.
9900 * src/reader.h, src/reader.c (grammar_current_rule_prec_set):
9901 Takes a location.
9902 * src/symtab.h, src/symtab.c (symbol_class_set)
9903 (symbol_user_token_number_set): Likewise.
9904 Adjust all callers.
9905 Promote complain_at.
9906 * tests/input.at (Type Clashes): Adjust.
9907
9908 2002-06-20 Akim Demaille <akim@epita.fr>
9909
9910 * data/bison.simple (YYLEX): Fix the declaration when
9911 %pure-parser.
9912
9913 2002-06-20 Akim Demaille <akim@epita.fr>
9914
9915 * data/bison.simple (yysymprint): Don't print the token number,
9916 just its name.
9917 * tests/actions.at (Destructors): Rename as...
9918 (Printers and Destructors): this.
9919 Also exercise %printer.
9920
9921 2002-06-20 Akim Demaille <akim@epita.fr>
9922
9923 * data/bison.simple (YYDSYMPRINT): New.
9924 Use it to remove many of the #if YYDEBUG/if (yydebug).
9925
9926 2002-06-20 Akim Demaille <akim@epita.fr>
9927
9928 * src/symtab.h, src/symtab.c (symbol_t): printer and
9929 printer_location are new members.
9930 (symbol_printer_set): New.
9931 * src/parse-gram.y (PERCENT_PRINTER): New token.
9932 Handle its associated rule.
9933 * src/scan-gram.l: Adjust.
9934 (handle_destructor_at, handle_destructor_dollar): Rename as...
9935 (handle_symbol_code_at, handle_symbol_code_dollar): these.
9936 * src/output.c (symbol_printers_output): New.
9937 (output_skeleton): Call it.
9938 * data/bison.simple (yysymprint): New. Cannot be named yyprint
9939 since there are already many grammar files with a user `yyprint'.
9940 Replace the calls to YYPRINT to calls to yysymprint.
9941 * tests/calc.at: Adjust.
9942 * tests/torture.at (AT_DATA_STACK_TORTURE): Remove YYPRINT: it was
9943 taking advantage of parser very internal details (stack size!).
9944
9945 2002-06-20 Akim Demaille <akim@epita.fr>
9946
9947 * src/scan-gram.l: Complete the scanner with the missing patterns
9948 to pacify Flex.
9949 Use `quote' and `symbol_tag_get' where appropriate.
9950
9951 2002-06-19 Akim Demaille <akim@epita.fr>
9952
9953 * tests/actions.at (Destructors): Augment to test locations.
9954 * data/bison.simple (yydestructor): Pass it the current location
9955 if locations are enabled.
9956 Prototype only when __STDC__ or C++.
9957 Change the argument names to move into the yy name space: there is
9958 user code here.
9959
9960 2002-06-19 Akim Demaille <akim@epita.fr>
9961
9962 * data/bison.simple (b4_pure_if): New.
9963 Use it instead of #ifdef YYPURE.
9964
9965 2002-06-19 Akim Demaille <akim@epita.fr>
9966
9967 * data/bison.simple (b4_location_if): New.
9968 Use it instead of #ifdef YYLSP_NEEDED.
9969
9970 2002-06-19 Akim Demaille <akim@epita.fr>
9971
9972 Prepare @$ in %destructor, but currently don't bind it in the
9973 skeleton, as %location use is not cleaned up yet.
9974
9975 * src/scan-gram.l (handle_dollar, handle_destructor_at)
9976 (handle_action_at): New.
9977 (handle_at, handle_action_dollar, handle_destructor_dollar): Take
9978 a braced_code_t and a location as additional arguments.
9979 (handle_destructor_dollar): Instead of requiring `b4_eval', just
9980 unquote one when outputting `b4_dollar_dollar'.
9981 Adjust callers.
9982 * data/bison.simple (b4_eval): Remove.
9983 (b4_symbol_destructor): Adjust.
9984 * tests/input.at (Invalid @n): Adjust.
9985
9986 2002-06-19 Zack Weinberg <zack@codesourcery.com>
9987
9988 * doc/bison.texinfo: Document ability to have multiple
9989 prologue sections.
9990
9991 2002-06-18 Akim Demaille <akim@epita.fr>
9992
9993 * src/files.c (compute_base_names): When computing the output file
9994 names from the input file name, strip the directory part.
9995
9996 2002-06-18 Akim Demaille <akim@epita.fr>
9997
9998 * data/bison.simple.new: Comment changes.
9999 Reported by Andreas Schwab.
10000
10001 2002-06-18 Matt Kraai <kraai@alumni.cmu.edu>
10002
10003 * data/bison.simple (yyoverflowlab): #ifndef yyoverflow, so that
10004 there are no `label `yyoverflowlab' defined but not used' warnings
10005 when yyoverflow is defined.
10006
10007 2002-06-18 Akim Demaille <akim@epita.fr>
10008
10009 * src/symtab.h, src/symtab.c (symbol_t): destructor_location is a
10010 new member.
10011 (symbol_destructor_set): Adjust.
10012 * src/output.c (symbol_destructors_output): Output the destructor
10013 locations.
10014 Output the symbol name.
10015 * data/bison.simple (b4_symbol_destructor): Adjust.
10016
10017 2002-06-18 Cris Bailiff <c.bailiff@awayweb.com>
10018 and Akim Demaille <akim@epita.fr>
10019
10020 * data/bison.simple.new (yyerrlab1): Be sure to pop and destroy
10021 what's left on the stack when the error recovery hits EOF.
10022 * tests/actions.at (Destructors): Complete to exercise this case.
10023
10024 2002-06-17 Akim Demaille <akim@epita.fr>
10025
10026 * data/m4sugar/m4sugar.m4 (m4_map): Recognize when the list of
10027 arguments is really empty, not only equal to `[]'.
10028 * src/symtab.h, src/symtab.c (symbol_t): `destructor' is a new
10029 member.
10030 (symbol_destructor_set): New.
10031 * src/output.c (symbol_destructors_output): New.
10032 * src/reader.h (brace_code_t, current_braced_code): New.
10033 * src/scan-gram.l (BRACED_CODE): Use it to branch on...
10034 (handle_dollar): Rename as...
10035 (handle_action_dollar): this.
10036 (handle_destructor_dollar): New.
10037 * src/parse-gram.y (PERCENT_DESTRUCTOR): New.
10038 (grammar_declaration): Use it.
10039 * data/bison.simple (yystos): Is always defined.
10040 (yydestructor): New.
10041 * tests/actions.at (Destructors): New.
10042 * tests/calc.at (_AT_CHECK_CALC_ERROR): Don't rely on egrep.
10043
10044 2002-06-17 Akim Demaille <akim@epita.fr>
10045
10046 * src/symlist.h, src/symlist.c (symbol_list_length): New.
10047 * src/scan-gram.l (handle_dollar, handle_at): Compute the
10048 rule_length only when needed.
10049 * src/output.c (actions_output, token_definitions_output): Output
10050 the full M4 block.
10051 * src/symtab.c: Don't access directly to the symbol tag, use
10052 symbol_tag_get.
10053 * src/parse-gram.y: Use symbol_list_free.
10054
10055 2002-06-17 Akim Demaille <akim@epita.fr>
10056
10057 * src/reader.h, src/reader.c (symbol_list, symbol_list_new)
10058 (symbol_list_prepend, get_type_name): Move to...
10059 * src/symlist.h, src/symlist.c (symbol_list_t, symbol_list_new)
10060 (symbol_list_prepend, symbol_list_n_type_name_get): here.
10061 Adjust all callers.
10062 (symbol_list_free): New.
10063 * src/scan-gram.l (handle_dollar): Takes a location.
10064 * tests/input.at (Invalid $n): Adjust.
10065
10066 2002-06-17 Akim Demaille <akim@epita.fr>
10067
10068 * src/reader.h, src/reader.c (symbol_list_new): Export it.
10069 (symbol_list_prepend): New.
10070 * src/parse-gram.y (%union): `list' is a new member.
10071 (symbols.1): New, replaces...
10072 (terms_to_prec.1, nterms_to_type.1): these.
10073 * src/symtab.h, src/symtab.c (symbol_type_set, symbol_precedence_set)
10074 Take a location as additional argument.
10075 Adjust all callers.
10076
10077 2002-06-15 Akim Demaille <akim@epita.fr>
10078
10079 * src/parse-gram.y: Move %token in the declaration section so that
10080 we don't depend upon CVS Bison.
10081
10082 2002-06-15 Akim Demaille <akim@epita.fr>
10083
10084 * src/state.h, src/state.c (state_rule_lookaheads_print): New.
10085 * src/print.c (print_core): Use it.
10086
10087 2002-06-15 Akim Demaille <akim@epita.fr>
10088
10089 * src/conflicts.c (log_resolution): Accept the rule involved in
10090 the sr conflicts instead of the lookahead number that points to
10091 that rule.
10092 (flush_reduce): Accept the current lookahead vector as argument,
10093 instead of the index in LA.
10094 (resolve_sr_conflict): Accept the current number of lookahead
10095 bitset to consider for the STATE, instead of the index in LA.
10096 (set_conflicts): Adjust.
10097 * src/lalr.c, src/lalr.h, src/state.h: Comment changes.
10098
10099 2002-06-15 Akim Demaille <akim@epita.fr>
10100
10101 * src/state.h (state_t): Replace the `lookaheadsp' member, a
10102 short, with `lookaheads' (bitsetv), `lookaheads_rule' (rule_t**).
10103 Adjust all dependencies.
10104 * src/lalr.c (initialize_lookaheads): Split into...
10105 (states_lookaheads_count, states_lookaheads_initialize): these.
10106 (lalr): Adjust.
10107
10108 2002-06-15 Akim Demaille <akim@epita.fr>
10109
10110 * src/gram.h, src/gram.c (grammar_rules_partial_print): New, eved
10111 out of...
10112 (grammar_rules_print): here.
10113 * src/reduce.c (reduce_output): Use it.
10114 * tests/reduce.at (Useless Rules, Reduced Automaton)
10115 (Underivable Rules): Adjust.
10116
10117 2002-06-15 Akim Demaille <akim@epita.fr>
10118
10119 Copy BYacc's nice way to report the grammar.
10120
10121 * src/gram.h, src/gram.c (grammar_rhs_print, grammar_rules_print):
10122 New.
10123 Don't print the rules' location, it is confusing and useless.
10124 (rule_print): Use grammar_rhs_print.
10125 * src/print.c (print_grammar): Use grammar_rules_print.
10126
10127 2002-06-15 Akim Demaille <akim@epita.fr>
10128
10129 Complete and rationalize `useless thing' warnings.
10130
10131 * src/symtab.h, src/symtab.c (symbol_tag_get, symbol_tag_get_n)
10132 (symbol_tag_print): New.
10133 Use them everywhere in place of accessing directly the tag member.
10134 * src/gram.h, src/gram.c (rule_print): New.
10135 Use it where a rule used to be printed `by hand'.
10136 * src/reduce.c (nonterminals_reduce): Report the use nonterminals.
10137 (reduce_grammar_tables): Report the useless rules.
10138 (reduce_print): Useless things are a warning, not an error.
10139 Report it as such.
10140 * tests/reduce.at (Useless Nonterminals, Useless Rules):
10141 (Reduced Automaton, Underivable Rules): Adjust.
10142 * tests/regression.at (Web2c Report, Web2c Report): Adjust.
10143 * tests/conflicts.at (Unresolved SR Conflicts)
10144 (Solved SR Conflicts): Adjust.
10145
10146 2002-06-15 Akim Demaille <akim@epita.fr>
10147
10148 Let symbols have a location.
10149
10150 * src/symtab.h, src/symtab.c (symbol_t): Location is a new member.
10151 (getsym): Adjust.
10152 Adjust all callers.
10153 * src/complain.h, src/complain.c (complain_at, fatal_at, warn_at):
10154 Use location_t, not int.
10155 * src/symtab.c (symbol_check_defined): Take advantage of the
10156 location.
10157 * tests/regression.at (Invalid inputs): Adjust.
10158
10159 2002-06-15 Akim Demaille <akim@epita.fr>
10160
10161 * src/parse-gram.y (YYLLOC_DEFAULT, current_lhs_location): New.
10162 (input): Don't try to initialize yylloc here, do it in the
10163 scanner.
10164 * src/scan-gram.l (YY_USER_INIT): Initialize yylloc.
10165 * src/gram.h (rule_t): Change line and action_line into location
10166 and action_location, of location_t type.
10167 Adjust all dependencies.
10168 * src/location.h, src/location.c (empty_location): New.
10169 * src/reader.h, src/reader.c (grammar_start_symbol_set)
10170 (grammar_symbol_append, grammar_rule_begin, grammar_rule_end)
10171 (grammar_current_rule_symbol_append)
10172 (grammar_current_rule_action_append): Expect a location as argument.
10173 * src/reader.c (grammar_midrule_action): Adjust to attach an
10174 action's location as dummy symbol location.
10175 * src/symtab.h, src/symtab.c (startsymbol_location): New.
10176 * tests/regression.at (Web2c Report, Rule Line Numbers): Adjust
10177 the line numbers.
10178
10179 2002-06-14 Akim Demaille <akim@epita.fr>
10180
10181 Grammar declarations may be found in the grammar section.
10182
10183 * src/parse-gram.y (rules_or_grammar_declaration): New.
10184 (declarations): Each declaration may end with a semicolon, not
10185 just...
10186 (grammar_declaration): `"%union"'.
10187 (grammar): Branch to rules_or_grammar_declaration.
10188
10189 2002-06-14 Akim Demaille <akim@epita.fr>
10190
10191 * src/main.c (main): Invoke scanner_free.
10192
10193 2002-06-14 Akim Demaille <akim@epita.fr>
10194
10195 * src/output.c (m4_invoke): Extracted from...
10196 (output_skeleton): here.
10197 Free tempfile.
10198
10199 2002-06-14 Akim Demaille <akim@epita.fr>
10200
10201 * src/parse-gram.y (directives, directive, gram)
10202 (grammar_directives, precedence_directives, precedence_directive):
10203 Rename as...
10204 (declarations, declaration, grammar, grammar_declaration)
10205 (precedence_declaration, precedence_declarator): these.
10206 (symbol_declaration): New.
10207
10208 2002-06-14 Akim Demaille <akim@epita.fr>
10209
10210 * src/files.c (action_obstack): Remove, unused.
10211 (output_obstack): Remove it, and all its dependencies, as it is no
10212 longer needed.
10213 * src/reader.c (epilogue_set): Build the epilogue in the
10214 muscle_obstack.
10215 * src/output.h, src/output.c (muscle_obstack): Move to...
10216 * src/muscle_tab.h, src/muscle_tab.h: here.
10217 (muscle_init): Initialize muscle_obstack.
10218 (muscle_free): New.
10219 * src/main.c (main): Call it.
10220
10221 2002-06-14 Akim Demaille <akim@epita.fr>
10222
10223 * src/location.h: New, extracted from...
10224 * src/reader.h: here.
10225 * src/Makefile.am (noinst_HEADERS): Merge into
10226 (bison_SOURCES): this.
10227 Add location.h.
10228 * src/parse-gram.y: Use location_t instead of Bison's.
10229 * src/reader.h, src/reader.c (prologue_augment, epilogue_set):
10230 Use location_t instead of ints.
10231
10232 2002-06-14 Akim Demaille <akim@epita.fr>
10233
10234 * data/bison.simple, data/bison.c++: Be sure to restore the
10235 current #line when returning to the skeleton contents after having
10236 exposed the input file's #line.
10237
10238 2002-06-12 Akim Demaille <akim@epita.fr>
10239
10240 * src/scan-gram.l (SC_BRACED_CODE): Don't use `<.*>', it is too
10241 eager.
10242 * tests/actions.at (Exotic Dollars): New.
10243
10244 2002-06-12 Akim Demaille <akim@epita.fr>
10245
10246 * src/scan-gram.l (SC_PROLOGUE): Don't eat characters amongst
10247 ['"/] too eagerly.
10248 * tests/input.at (Torturing the Scanner): New.
10249
10250 2002-06-11 Akim Demaille <akim@epita.fr>
10251
10252 * src/scan-gram.l (YY_OBS_INIT): Remove, replace with...
10253 [SC_COMMENT,SC_STRING,SC_CHARACTER,SC_BRACED_CODE,SC_PROLOGUE]
10254 [SC_EPILOGUE]: Output the quadrigraphs only when not in a comment.
10255 * src/reader.h, src/scan-gram.l (scanner_initialize): this.
10256 * src/reader.c (reader): Use it.
10257
10258 2002-06-11 Akim Demaille <akim@epita.fr>
10259
10260 * src/scan-gram.l (YY_OBS_FINISH): Don't set yylval.
10261 Adjust all callers.
10262 (scanner_last_string_free): New.
10263
10264 2002-06-11 Akim Demaille <akim@epita.fr>
10265
10266 * src/scan-gram.l (YY_INIT, YY_GROW, YY_FINISH): Rename as...
10267 (YY_OBS_INIT, YY_OBS_GROW, YY_OBS_FINISH): these.
10268 (last_string, YY_OBS_FREE): New.
10269 Use them when returning an ID.
10270
10271 2002-06-11 Akim Demaille <akim@epita.fr>
10272
10273 Have Bison grammars parsed by a Bison grammar.
10274
10275 * src/reader.c, src/reader.h (prologue_augment): New.
10276 * src/reader.c (copy_definition): Remove.
10277
10278 * src/reader.h, src/reader.c (gram_start_symbol_set, prologue_augment)
10279 (grammar_symbol_append, grammar_rule_begin, grammar_midrule_action)
10280 (grammar_current_rule_prec_set, grammar_current_rule_check)
10281 (grammar_current_rule_symbol_append)
10282 (grammar_current_rule_action_append): Export.
10283 * src/parse-gram.y (symbol_list_new, symbol_list_symbol_append_
10284 (symbol_list_action_append): Remove.
10285 Hook the routines from reader.
10286 * src/scan-gram.l: In INITIAL, characters and strings are tokens.
10287 * src/system.h (ATTRIBUTE_NORETURN, ATTRIBUTE_UNUSED): Now.
10288
10289 * src/reader.c (read_declarations): Remove, unused.
10290
10291 * src/parse-gram.y: Handle the epilogue.
10292 * src/reader.h, src/reader.c (gram_start_symbol_set): Rename as...
10293 (grammar_start_symbol_set): this.
10294 * src/scan-gram.l: Be sure to ``use'' yycontrol to keep GCC quiet.
10295 * src/reader.c (readgram): Remove, unused.
10296 (reader): Adjust to insert eoftoken and axiom where appropriate.
10297
10298 * src/reader.c (copy_dollar): Replace with...
10299 * src/scan-gram.h (handle_dollar): this.
10300 * src/parse-gram.y: Remove `%thong'.
10301
10302 * src/reader.c (copy_at): Replace with...
10303 * src/scan-gram.h (handle_at): this.
10304
10305 * src/complain.h, src/complain.c (warn_at, complain_at, fatal_at):
10306 New.
10307
10308 * src/scan-gram.l (YY_LINES): Keep lineno synchronized for the
10309 time being.
10310
10311 * src/reader.h, src/reader.c (grammar_rule_end): New.
10312
10313 * src/parse.y (current_type, current_class): New.
10314 Implement `%nterm', `%token' support.
10315 Merge `%term' into `%token'.
10316 (string_as_id): New.
10317 * src/symtab.h, src/symtab.c (symbol_make_alias): Don't pass the
10318 type name.
10319
10320 * src/parse-gram.y: Be sure to handle properly the beginning of
10321 rules.
10322
10323 * src/parse-gram.y: Handle %type.
10324 * src/reader.c (grammar_rule_end): Call grammar_current_rule_check.
10325
10326 * src/parse-gram.y: More directives support.
10327 * src/options.c: No longer handle source directives.
10328
10329 * src/parse-gram.y: Fix %output.
10330
10331 * src/parse-gram.y: Handle %union.
10332 Use the prologue locations.
10333 * src/reader.c (parse_union_decl): Remove.
10334
10335 * src/reader.h, src/reader.c (epilogue_set): New.
10336 * src/parse-gram.y: Use it.
10337
10338 * data/bison.simple, data/bison.c++: b4_stype is now either not
10339 defined, then default to int, or to the contents of %union,
10340 without `union' itself.
10341 Adjust.
10342 * src/muscle_tab.c (muscle_init): Don't predefine `stype'.
10343
10344 * src/output.c (actions_output): Don't output braces, as they are
10345 already handled by the scanner.
10346
10347 * src/scan-gram.l (SC_CHARACTER): Set the user_token_number of
10348 characters to themselves.
10349
10350 * tests/reduce.at (Reduced Automaton): End the grammars with %% so
10351 that the epilogue has a proper #line.
10352
10353 * src/parse-gram.y: Handle precedence/associativity.
10354
10355 * src/symtab.c (symbol_precedence_set): Requires the symbol to be
10356 a terminal.
10357 * src/scan-gram.l (SC_BRACED_CODE): Catch strings and characters.
10358 * tests/calc.at: Do not use `%token "foo"' as it makes not sense
10359 at all to define terminals that cannot be emitted.
10360
10361 * src/scan-gram.l: Escape M4 characters.
10362
10363 * src/scan-gram.l: Working properly with escapes in user
10364 strings/characters.
10365
10366 * tests/torture.at (AT_DATA_TRIANGULAR_GRAMMAR)
10367 (AT_DATA_HORIZONTAL_GRAMMAR): Respect the `%token ID NUM STRING'
10368 grammar.
10369 Use more modest sizes, as for the time being the parser does not
10370 release memory, and therefore the process swallows a huge amount
10371 of memory.
10372
10373 * tests/torture.at (AT_DATA_LOOKAHEADS_GRAMMAR): Adjust to the
10374 stricter %token grammar.
10375
10376 * src/symtab.h (associativity): Add `undef_assoc'.
10377 (symbol_precedence_set): Do nothing when passed an undef_assoc.
10378 * src/symtab.c (symbol_check_alias_consistence): Adjust.
10379
10380 * tests/regression.at (Invalid %directive): Remove, as it is now
10381 meaningless.
10382 (Invalid inputs): Adjust to the new error messages.
10383 (Token definitions): The new grammar doesn't allow too many
10384 eccentricities.
10385
10386 * src/lex.h, src/lex.c: Remove.
10387 * src/reader.c (lastprec, skip_to_char, read_signed_integer)
10388 (copy_character, copy_string2, copy_string, copy_identifier)
10389 (copy_comment, parse_token_decl, parse_type_decl, parse_assoc_decl)
10390 (parse_muscle_decl, parse_dquoted_param, parse_skel_decl)
10391 (parse_action): Remove.
10392 * po/POTFILES.in: Adjust.
10393
10394 2002-06-11 Akim Demaille <akim@epita.fr>
10395
10396 * src/reader.c (parse_action): Don't store directly into the
10397 rule's action member: return the action as a string.
10398 Don't require `rule_length' as an argument: compute it.
10399 (grammar_current_rule_symbol_append)
10400 (grammar_current_rule_action_append): New, eved out from
10401 (readgram): here.
10402 Remove `action_flag', `rulelength', unused now.
10403
10404 2002-06-11 Akim Demaille <akim@epita.fr>
10405
10406 * src/reader.c (grammar_current_rule_prec_set).
10407 (grammar_current_rule_check): New, eved out from...
10408 (readgram): here.
10409 Remove `xaction', `first_rhs': useless.
10410 * tests/input.at (Type clashes): New.
10411 * tests/existing.at (GNU Cim Grammar): Adjust.
10412
10413 2002-06-11 Akim Demaille <akim@epita.fr>
10414
10415 * src/reader.c (grammar_midrule_action): New, Eved out from
10416 (readgram): here.
10417
10418 2002-06-11 Akim Demaille <akim@epita.fr>
10419
10420 * src/reader.c (grammar_rule_begin, previous_rule, current_rule):
10421 New.
10422 (readgram): Use them as replacement of inlined code, crule and
10423 crule1.
10424
10425 2002-06-11 Akim Demaille <akim@epita.fr>
10426
10427 * src/reader.c (grammar_end, grammar_symbol_append): New.
10428 (readgram): Use them.
10429 Make the use of `p' as local as possible.
10430
10431 2002-06-10 Akim Demaille <akim@epita.fr>
10432
10433 GCJ's parser requires the tokens to be defined before the prologue.
10434
10435 * data/bison.simple: Output the token definition before the user's
10436 prologue.
10437 * tests/regression.at (Braces parsing, Duplicate string)
10438 (Mixing %token styles): Check the output from bison.
10439 (Early token definitions): New.
10440
10441 2002-06-10 Akim Demaille <akim@epita.fr>
10442
10443 * src/symtab.c (symbol_user_token_number_set): Don't complain when
10444 assigning twice the same user number to a token, so that we can
10445 use it in...
10446 * src/lex.c (lex): here.
10447 Also use `symbol_class_set' instead of hand written code.
10448 * src/reader.c (parse_assoc_decl): Likewise.
10449
10450 2002-06-10 Akim Demaille <akim@epita.fr>
10451
10452 * src/symtab.c, src/symtab.c (symbol_class_set)
10453 (symbol_user_token_number_set): New.
10454 * src/reader.c (parse_token_decl): Use them.
10455 Use a switch instead of ifs.
10456 Use a single argument.
10457
10458 2002-06-10 Akim Demaille <akim@epita.fr>
10459
10460 Remove `%thong' support as it is undocumented, unused, duplicates
10461 `%token's job, and creates useless e-mail traffic with people who
10462 want to know what it is, why it is undocumented, unused, and
10463 duplicates `%token's job.
10464
10465 * src/reader.c (parse_thong_decl): Remove.
10466 * src/options.c (option_table): Remove "thong".
10467 * src/lex.h (tok_thong): Remove.
10468
10469 2002-06-10 Akim Demaille <akim@epita.fr>
10470
10471 * src/symtab.c, src/symtab.c (symbol_type_set)
10472 (symbol_precedence_set): New.
10473 * src/reader.c (parse_type_decl, parse_assoc_decl): Use them.
10474 (value_components_used): Remove, unused.
10475
10476 2002-06-09 Akim Demaille <akim@epita.fr>
10477
10478 Move symbols handling code out of the reader.
10479
10480 * src/reader.h, src/reader.c (errtoken, undeftoken, eoftoken)
10481 (axiom): Move to...
10482 * src/symtab.h, src/symtab.c: here.
10483
10484 * src/gram.c (start_symbol): Remove: use startsymbol->number.
10485 * src/reader.c (startval): Rename as...
10486 * src/symtab.h, src/symtab.c (startsymbol): this.
10487 * src/reader.c: Adjust.
10488
10489 * src/reader.c (symbol_check_defined, symbol_make_alias)
10490 (symbol_check_alias_consistence, symbol_pack, symbol_translation)
10491 (token_translations_init)
10492 Move to...
10493 * src/symtab.c: here.
10494 * src/reader.c (packsymbols): Move to...
10495 * src/symtab.h, src/symtab.c (symbols_pack): here.
10496 * src/symtab.h, src/symtab.c (symbol_make_alias): Takes SYMVAL as
10497 argument.
10498
10499 2002-06-03 Akim Demaille <akim@epita.fr>
10500
10501 * src/muscle_tab.c (muscle_insert, muscle_find): Declarations,
10502 then statements.
10503
10504 2002-06-03 Akim Demaille <akim@epita.fr>
10505
10506 * src/muscle_tab.c (muscle_find, muscle_insert): Don't initialize
10507 structs with non literals.
10508 * src/scan-skel.l: never-interactive.
10509 * src/conflicts.c (enum conflict_resolution_e): No trailing
10510 comma.
10511 * src/getargs.c (usage): Split long literal strings.
10512 Reported by Hans Aberg.
10513
10514 2002-05-28 Akim Demaille <akim@epita.fr>
10515
10516 * data/bison.c++: Use C++ ostreams.
10517 (cdebug_): New member.
10518
10519 2002-05-28 Akim Demaille <akim@epita.fr>
10520
10521 * src/output.c (output_skeleton): Be sure to allocate enough room
10522 for `/' _and_ for `\0' in full_skeleton.
10523
10524 2002-05-28 Akim Demaille <akim@epita.fr>
10525
10526 * data/bison.c++: Catch up with bison.simple:
10527 2002-05-24 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
10528 and Paul Eggert <eggert@twinsun.com>: `error' handing.
10529 2002-05-26 Akim Demaille <akim@epita.fr>: stos_, token_number_,
10530 and popping traces.
10531
10532 2002-05-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
10533
10534 * src/output.c (output_skeleton): Put an explicit path in front of
10535 the skeleton file name, rather than relying on the -I directory,
10536 to partially alleviate effects of having a skeleton file lying around
10537 in the current directory.
10538
10539 2002-05-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
10540
10541 * src/conflicts.c (log_resolution): Correct typo:
10542 obstack_printf should be obstack_fgrow1.
10543
10544 2002-05-26 Akim Demaille <akim@epita.fr>
10545
10546 * src/state.h (state_t): `solved_conflicts' is a new member.
10547 * src/LR0.c (new_state): Set it to 0.
10548 * src/conflicts.h, src/conflicts.c (print_conflicts)
10549 (free_conflicts, solve_conflicts): Rename as...
10550 (conflicts_print, conflicts_free, conflicts_solve): these.
10551 Adjust callers.
10552 * src/conflicts.c (enum conflict_resolution_e)
10553 (solved_conflicts_obstack): New, used by...
10554 (log_resolution): this.
10555 Adjust to attach the conflict resolution to each state.
10556 Complete the description with the precedence/associativity
10557 information.
10558 (resolve_sr_conflict): Adjust.
10559 * src/print.c (print_state): Output its solved_conflicts.
10560 * tests/conflicts.at (Unresolved SR Conflicts)
10561 (Solved SR Conflicts): Exercise --report=all.
10562
10563 2002-05-26 Akim Demaille <akim@epita.fr>
10564
10565 * src/LR0.c, src/derives.c, src/gram.c, src/gram.h, src/lalr.c,
10566 * src/nullable.c, src/output.c, src/print.c, src/print_graph.c,
10567 * src/reader.c, src/reduce.c, src/state.h, src/symtab.h
10568 (token_number_t, item_number_as_token_number)
10569 (token_number_as_item_number, muscle_insert_token_number_table):
10570 Rename as...
10571 (symbol_number_t, item_number_as_symbol_number)
10572 (symbol_number_as_item_number, muscle_insert_symbol_number_table):
10573 these, since it is more appropriate.
10574
10575 2002-05-26 Akim Demaille <akim@epita.fr>
10576
10577 * tests/calc.at (AT_CHECK_CALC): Adjust: there are now additional
10578 `Error:' lines.
10579 * data/bison.simple (yystos) [YYDEBUG]: New.
10580 (yyparse) [YYDEBUG]: Display the symbols which are popped during
10581 error recovery.
10582 * tests/regression.at (Web2c Actions): Adjust: yystos is output now.
10583
10584 2002-05-25 Akim Demaille <akim@epita.fr>
10585
10586 * doc/bison.texinfo (Debugging): Split into...
10587 (Tracing): this new section, its former contents, and...
10588 (Understanding): this new section.
10589 * src/getargs.h, src/getargs.c (verbose_flag): Remove, replaced
10590 by...
10591 (report_flag): this.
10592 Adjust all dependencies.
10593 (report_args, report_types, report_argmatch): New.
10594 (usage, getargs): Report/support -r, --report.
10595 * src/options.h
10596 (struct option_table_struct): Rename as..,
10597 (struct option_table_s): this.
10598 Rename the `set_flag' member to `flag' to match with getopt_long's
10599 struct.
10600 * src/options.c (option_table): Split verbose into an entry for
10601 %verbose, and another for --verbose.
10602 Support --report/-r, so remove -r from the obsolete --raw.
10603 * src/print.c: Attach full item sets and lookaheads reports to
10604 report_flag instead of trace_flag.
10605 * lib/argmatch.h, lib/argmatch.c: New, from Fileutils 4.1.
10606
10607 2002-05-24 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
10608 and Paul Eggert <eggert@twinsun.com>
10609
10610 * data/bison.simple (yyparse): Correct error handling to conform to
10611 POSIX and yacc. Specifically, after syntax error is discovered,
10612 do not reduce further before shifting the error token.
10613 Clean up the code a bit by removing the labels yyerrdefault,
10614 yyerrhandle, yyerrpop.
10615 * NEWS: Document the above.
10616
10617 2002-05-20 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
10618
10619 * data/bison.simple (yyr1): Don't use yy_token_number_type as element
10620 type; it isn't always big enough, since it doesn't necessarily
10621 include non-terminals.
10622 (yytranslate): Expand definition of yy_token_number_type, so that
10623 the latter can be removed.
10624 (yy_token_number_type): Remove, only one use.
10625 * data/bison.c++ (r1_): Parallel change to yyr1 in bison.simple---
10626 don't use TokenNumberType as element type.
10627
10628 * tests/regression.at: Modify expected output to agree with change
10629 to yyr1 and yytranslate.
10630
10631 2002-05-13 Florian Krohm <florian@edamail.fishkill.ibm.com>
10632
10633 * src/reader.c (parse_action): Use copy_character instead of
10634 obstack_1grow.
10635
10636 2002-05-13 Akim Demaille <akim@epita.fr>
10637
10638 * tests/regression.at (Token definitions): Prototype yylex and
10639 yyerror.
10640
10641 2002-05-12 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
10642
10643 * src/scan-skel.l: Correct off-by-one error in handling of __oline__.
10644 * data/bison.simple (b4_sint_type, b4_uint_type): Correct to reflect
10645 32-bit arithmetic.
10646 * data/bison.c++ (b4_sint_type, b4_uint_type): Ditto.
10647
10648 2002-05-07 Akim Demaille <akim@epita.fr>
10649
10650 * tests/synclines.at: Be sure to prototype yylex and yyerror to
10651 avoid GCC warnings.
10652
10653 2002-05-07 Akim Demaille <akim@epita.fr>
10654
10655 Kill GCC warnings.
10656
10657 * src/reduce.c (nonterminals_reduce): Don't loop over RITEM: loop
10658 over the RHS of each rule.
10659 * src/gram.h, src/gram.c (nritems): Is `unsigned int', not int.
10660 * src/state.h (state_t): Member `nitems' is unsigned short.
10661 * src/LR0.c (get_state): Adjust.
10662 * src/reader.c (packgram): Likewise.
10663 * src/output.c (GENERATE_MUSCLE_INSERT_TABLE): `max' is of type
10664 `Type'.
10665 (muscle_insert_int_table): Remove, unused.
10666 (prepare_rules): Remove `max'.
10667
10668 2002-05-06 Akim Demaille <akim@epita.fr>
10669
10670 * src/closure.c (print_firsts): Display of the symbol tags.
10671 (bitmatrix_print): Move to...
10672 * lib/bitsetv-print.h, lib/bitsetv-print.c (bitsetv_matrix_dump):
10673 here.
10674 * tests/sets.at (Nullable, Broken Closure, Firsts): Adjust.
10675
10676 2002-05-06 Akim Demaille <akim@epita.fr>
10677
10678 * src/muscle_tab.c (muscle_m4_output): Must return TRUE for
10679 hash_do_for_each.
10680
10681 2002-05-06 Akim Demaille <akim@epita.fr>
10682
10683 * src/LR0.c (new_state, get_state): Instead of using the global
10684 `kernel_size' and `kernel_base', have two new arguments:
10685 `core_size' and `core'.
10686 Adjust callers.
10687
10688 2002-05-06 Akim Demaille <akim@epita.fr>
10689
10690 * src/reader.c (packgram): No longer end `ritem' with a 0
10691 sentinel: it is not used.
10692
10693 2002-05-05 Akim Demaille <akim@epita.fr>
10694
10695 New experimental feature: display the lookaheads in the report and
10696 graph.
10697
10698 * src/print (print_core): When --trace-flag, display the rules
10699 lookaheads.
10700 * src/print_graph.c (print_core): Likewise.
10701 Swap the arguments.
10702 Adjust caller.
10703
10704 2002-05-05 Akim Demaille <akim@epita.fr>
10705
10706 * tests/torture.at (Many lookaheads): New test.
10707
10708 2002-05-05 Akim Demaille <akim@epita.fr>
10709
10710 * src/output.c (GENERATE_OUTPUT_TABLE): Replace with...
10711 (GENERATE_MUSCLE_INSERT_TABLE): this.
10712 (output_int_table, output_unsigned_int_table, output_short_table)
10713 (output_token_number_table, output_item_number_table): Replace with...
10714 (muscle_insert_int_table, muscle_insert_unsigned_int_table)
10715 (muscle_insert_short_table, muscle_insert_token_number_table)
10716 (muscle_insert_item_number_table): these.
10717 Adjust all callers.
10718 (prepare_tokens): Don't free `translations', since...
10719 * src/reader.h, src/reader.c (grammar_free): do it.
10720 Move to...
10721 * src/gram.h, src/gram.c (grammar_free): here.
10722 * data/bison.simple, data/bison.c++: b4_token_number_max is now
10723 b4_translate_max.
10724
10725 2002-05-05 Akim Demaille <akim@epita.fr>
10726
10727 * src/output.c (output_unsigned_int_table): New.
10728 (prepare_rules): `i' is unsigned.
10729 `prhs', `rline', `r2' are unsigned int.
10730 Rename muscle `rhs_number_max' as `rhs_max'.
10731 Output muscles `prhs_max', `rline_max', and `r2_max'.
10732 Free rline and r1.
10733 * data/bison.simple, data/bison.c++: Adjust to use these muscles
10734 to compute types instead of constant types.
10735 * tests/regression.at (Web2c Actions): Adjust.
10736
10737 2002-05-04 Akim Demaille <akim@epita.fr>
10738
10739 * src/symtab.h (SALIAS, SUNDEF): Rename as...
10740 (USER_NUMBER_ALIAS, USER_NUMBER_UNDEFINED): these.
10741 Adjust dependencies.
10742 * src/output.c (token_definitions_output): Be sure not to output a
10743 `#define 'a'' when fed with `%token 'a' "a"'.
10744 * tests/regression.at (Token definitions): New.
10745
10746 2002-05-03 Paul Eggert <eggert@twinsun.com>
10747
10748 * data/bison.simple (b4_token_defines): Also define YYTOKENTYPE
10749 for K&R C.
10750
10751 2002-05-03 gettextize <bug-gnu-gettext@gnu.org>
10752
10753 * Makefile.am (SUBDIRS): Remove intl.
10754 (EXTRA_DIST): Add config/config.rpath.
10755
10756 2002-05-03 Akim Demaille <akim@epita.fr>
10757
10758 * data/bison.simple (m4_if): Don't output empty enums.
10759 And actually, output valid enum definitions :(.
10760
10761 2002-05-03 Akim Demaille <akim@epita.fr>
10762
10763 * configure.bat: Remove, completely obsolete.
10764 * Makefile.am (EXTRA_DIST): Adjust.
10765 Don't distribute config.rpath...
10766 * config/Makefile.am (EXTRA_DIST): Do it.
10767
10768 2002-05-03 Akim Demaille <akim@epita.fr>
10769
10770 * configure.in (GETTEXT_VERSION): New.
10771 Suggested by Bruno Haible for the forthcoming Gettext 0.10.3.
10772
10773 2002-05-03 Akim Demaille <akim@epita.fr>
10774
10775 * data/bison.simple (b4_token_enum): New.
10776 (b4_token_defines): Use it to output tokens both as #define and
10777 enums.
10778 Suggested by Paul Eggert.
10779 * src/output.c (token_definitions_output): Don't output spurious
10780 white spaces.
10781
10782 2002-05-03 Akim Demaille <akim@epita.fr>
10783
10784 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
10785
10786 2002-05-02 Robert Anisko <robert@lrde.epita.fr>
10787
10788 * data/bison.c++: Adapt expansion of $s and @s to the C++ parser.
10789 Update the stack class, give a try to deque as the default container.
10790
10791 2002-05-02 Akim Demaille <akim@epita.fr>
10792
10793 * data/bison.simple (yyparse): Do not implement @$ = @1.
10794 (YYLLOC_DEFAULT): Adjust to do it.
10795 * doc/bison.texinfo (Location Default Action): Fix.
10796
10797 2002-05-02 Akim Demaille <akim@epita.fr>
10798
10799 * src/reader.c (parse_braces): Merge into...
10800 (parse_action): this.
10801
10802 2002-05-02 Akim Demaille <akim@epita.fr>
10803
10804 * configure.in (ALL_LINGUAS): Remove.
10805 * po/LINGUAS, hr.po: New.
10806
10807 2002-05-02 Akim Demaille <akim@epita.fr>
10808
10809 Remove the so called hairy (semantic) parsers.
10810
10811 * src/system.h (EXT_GUARD_C, EXT_STYPE_H): Remove.
10812 * src/gram.h, src/gram.c (semantic_parser): Remove.
10813 (rule_t): Remove the guard and guard_line members.
10814 * src/lex.h (token_t): remove tok_guard.
10815 * src/options.c (option_table): Remove %guard and %semantic_parser
10816 support.
10817 * src/output.c, src/output.h (guards_output): Remove.
10818 (prepare): Adjust.
10819 (token_definitions_output): Don't output the `T'
10820 tokens (???).
10821 (output_skeleton): Don't output the guards.
10822 * src/files.c, src/files.c (attrsfile): Remove.
10823 * src/reader.c (symbol_list): Remove the guard and guard_line
10824 members.
10825 Adjust dependencies.
10826 (parse_guard): Remove.
10827 * data/bison.hairy: Remove.
10828 * doc/bison.texinfo (Environment Variables): Remove occurrences of
10829 BISON_HAIRY.
10830
10831 2002-05-02 Akim Demaille <akim@epita.fr>
10832
10833 * src/reader.c (copy_at, copy_dollarm parse_braces, parse_action)
10834 (parse_guard): Rename the formal argument `stack_offset' as
10835 `rule_length', which is more readable.
10836 Adjust callers.
10837 (copy_at, copy_dollar): Instead of outputting the hard coded
10838 values of $$, $n and so forth, output invocation to b4_lhs_value,
10839 b4_lhs_location, b4_rhs_value, and b4_rhs_location.
10840 Note: this patch partially drops `semantic-parser' support: it
10841 always does `rule_length - n', where semantic parsers ought to
10842 always use `-n'.
10843 * data/bison.simple, data/bison.c++ (b4_lhs_value)
10844 (b4_lhs_location, b4_rhs_value, and b4_rhs_location: New.
10845
10846 2002-05-02 Akim Demaille <akim@epita.fr>
10847
10848 * configure.in (AC_INIT): Bump to 1.49b.
10849 (AM_INIT_AUTOMAKE): Short invocation.
10850
10851 2002-05-02 Akim Demaille <akim@epita.fr>
10852
10853 Version 1.49a.
10854
10855 2002-05-01 Akim Demaille <akim@epita.fr>
10856
10857 * src/skeleton.h: Remove.
10858
10859 2002-05-01 Akim Demaille <akim@epita.fr>
10860
10861 * src/skeleton.h: Fix the #endif.
10862 Reported by Magnus Fromreide.
10863
10864 2002-04-26 Paul Eggert <eggert@twinsun.com>
10865
10866 * data/bison.simple (YYSTYPE_IS_TRIVIAL, YYLTYPE_IS_TRIVIAL):
10867 Define if we define YYSTYPE and YYLTYPE, respectively.
10868 (YYCOPY): Fix [] quoting problem in the non-GCC case.
10869
10870 2002-04-25 Robert Anisko <robert@lrde.epita.fr>
10871
10872 * src/scan-skel.l: Postprocess quadrigraphs.
10873
10874 * src/reader.c (copy_character): New function, used to output
10875 single characters while replacing `[' and `]' with quadrigraphs, to
10876 avoid troubles with M4 quotes.
10877 (copy_comment): Output characters with copy_character.
10878 (read_additionnal_code): Likewise.
10879 (copy_string2): Likewise.
10880 (copy_definition): Likewise.
10881
10882 * tests/calc.at: Exercise M4 quoting.
10883
10884 2002-04-25 Akim Demaille <akim@epita.fr>
10885
10886 * tests/sets.at (AT_EXTRACT_SETS): Sed portability issue: no space
10887 between `!' and the command.
10888 Reported by Paul Eggert.
10889
10890 2002-04-24 Robert Anisko <robert@lrde.epita.fr>
10891
10892 * tests/calc.at: Exercise prologue splitting.
10893
10894 * data/bison.simple, data/bison.c++: Use `b4_pre_prologue' and
10895 `b4_post_prologue' instead of `b4_prologue'.
10896
10897 * src/output.c (prepare): Add the `pre_prologue' and `post_prologue'
10898 muscles.
10899 (output): Free pre_prologue_obstack and post_prologue_obstack.
10900 * src/files.h, src/files.c (attrs_obstack): Remove.
10901 (pre_prologue_obstack, post_prologue_obstack): New.
10902 * src/reader.c (copy_definition): Add a parameter to specify the
10903 obstack to fill, instead of using attrs_obstack unconditionally.
10904 (read_declarations): Pass pre_prologue_obstack to copy_definition if
10905 `%union' has not yet been seen, pass post_prologue_obstack otherwise.
10906
10907 2002-04-23 Paul Eggert <eggert@twinsun.com>
10908
10909 * data/bison.simple: Remove unnecessary commentary and white
10910 space differences from 1_29-branch.
10911 Depend on YYERROR_VERBOSE, not defined (YYERROR_VERBOSE).
10912
10913 (union yyalloc, YYSTACK_GAP_MAX, YYSTACK_BYTES, YYCOPY,
10914 YYSTACK_RELOCATE): Do not define if yyoverflow is defined, or
10915 if this is a C++ parser and YYSTYPE or YYLTYPE has nontrivial
10916 constructors or destructors.
10917
10918 (yyparse) [! defined YYSTACK_RELOCATE]: Do not relocate the stack.
10919
10920 2002-04-23 Akim Demaille <akim@epita.fr>
10921
10922 * tests/sets.at (AT_EXTRACT_SETS): Don't use 8 char long sed labels.
10923 * tests/synclines.at (AT_TEST_SYNCLINE): Be robust to GCC's
10924 location with columns.
10925 * tests/conflicts.at (%nonassoc and eof): Don't use `error.h'.
10926 All reported by Paul Eggert.
10927
10928 2002-04-22 Akim Demaille <akim@epita.fr>
10929
10930 * src/reduce.c (dump_grammar): Move to...
10931 * src/gram.h, src/gram.c (grammar_dump): here.
10932 Be sure to separate long item numbers.
10933 Don't read the members of a rule's prec if its nil.
10934
10935 2002-04-22 Akim Demaille <akim@epita.fr>
10936
10937 * src/output.c (table_size, table_grow): New.
10938 (MAXTABLE): Remove, replace uses with table_size.
10939 (pack_vector): Instead of dying when the table is too big, grow it.
10940
10941 2002-04-22 Akim Demaille <akim@epita.fr>
10942
10943 * data/bison.simple (yyr1): Its type is that of a token number.
10944 * data/bison.c++ (r1_): Likewise.
10945 * tests/regression.at (Web2c Actions): Adjust.
10946
10947 2002-04-22 Akim Demaille <akim@epita.fr>
10948
10949 * src/reader.c (token_translations_init): 256 is now the default
10950 value for the error token, i.e., it will be assigned another
10951 number if the user assigned 256 to one of her tokens.
10952 (reader): Don't force 256 to error.
10953 * doc/bison.texinfo (Symbols): Adjust.
10954 * tests/torture.at (AT_DATA_HORIZONTAL_GRAMMAR)
10955 (AT_DATA_TRIANGULAR_GRAMMAR): Number the tokens as 1, 2, 3
10956 etc. instead of 10, 20, 30 (which was used to `jump' over error
10957 (256) and undefined (2)).
10958
10959 2002-04-22 Akim Demaille <akim@epita.fr>
10960
10961 Propagate more token_number_t.
10962
10963 * src/gram.h (token_number_as_item_number)
10964 (item_number_as_token_number): New.
10965 * src/output.c (GENERATE_OUTPUT_TABLE): New.
10966 Use it to create output_item_number_table and
10967 output_token_number_table.
10968 * src/LR0.c, src/derives.c, src/gram.c, src/gram.h, src/lalr.c,
10969 * src/lex.c, src/nullable.c, src/output.c, src/print.c,
10970 * src/print_graph.c, src/reader.c, src/reduce.c, src/state.h,
10971 * src/symtab.c, src/symtab.h: Use token_number_t instead of shorts.
10972
10973 2002-04-22 Akim Demaille <akim@epita.fr>
10974
10975 * src/output.h, src/output.c (get_lines_number): Remove.
10976
10977 2002-04-19 Akim Demaille <akim@epita.fr>
10978
10979 * doc/bison.texinfo (Actions): Make clear that `|' is not the same
10980 as Lex/Flex'.
10981 (Debugging): More details about enabling the debugging features.
10982 (Table of Symbols): Describe $$, $n, @$, and @n.
10983 Suggested by Tim Josling.
10984
10985 2002-04-19 Akim Demaille <akim@epita.fr>
10986
10987 * doc/bison.texinfo: Remove the uses of the obsolete @refill.
10988
10989 2002-04-10 Akim Demaille <akim@epita.fr>
10990
10991 * src/system.h: Rely on HAVE_LIMITS_H.
10992 Suggested by Paul Eggert.
10993
10994 2002-04-09 Akim Demaille <akim@epita.fr>
10995
10996 * tests/calc.at (_AT_CHECK_CALC_ERROR): Receive as argument the
10997 full stderr, and strip it according to the bison options, instead
10998 of composing the error message from different bits.
10999 This makes it easier to check for several error messages.
11000 Adjust all the invocations.
11001 Add an invocation exercising the error token.
11002 Add an invocation demonstrating a stupid error message.
11003 (_AT_DATA_CALC_Y): Follow the GCS: initial column is 1, not 0.
11004 Adjust the tests.
11005 Error message are for stderr, not stdout.
11006
11007 2002-04-09 Akim Demaille <akim@epita.fr>
11008
11009 * src/gram.h, src/gram.c (error_token_number): Remove, use
11010 errtoken->number.
11011 * src/reader.c (reader): Don't specify the user token number (2)
11012 for $undefined, as it uselessly prevents using it.
11013 * src/gram.h (token_number_t): Move to...
11014 * src/symtab.h: here.
11015 (state_t.number): Is a token_number_t.
11016 * src/print.c, src/reader.c: Use undeftoken->number instead of
11017 hard coded 2.
11018 (Even though this 2 is not the same as above: the number of the
11019 undeftoken remains being 2, it is its user token number which
11020 might not be 2).
11021 * src/output.c (prepare_tokens): Rename the `maxtok' muscle with
11022 `user_token_number_max'.
11023 Output `undef_token_number'.
11024 * data/bison.simple, data/bison.c++: Use them.
11025 Be sure to map invalid yylex return values to
11026 `undef_token_number'. This saves us from gratuitous SEGV.
11027
11028 * tests/conflicts.at (Solved SR Conflicts)
11029 (Unresolved SR Conflicts): Adjust.
11030 * tests/regression.at (Web2c Actions): Adjust.
11031
11032 2002-04-08 Akim Demaille <akim@epita.fr>
11033
11034 * data/bison.c++: s/b4_item_number_max/b4_rhs_number_max/.
11035 Adding #line.
11036 Remove the duplicate `typedefs'.
11037 (RhsNumberType): Fix the declaration and various other typos.
11038 Use __ofile__.
11039 * data/bison.simple: Use __ofile__.
11040 * src/scan-skel.l: Handle __ofile__.
11041
11042 2002-04-08 Akim Demaille <akim@epita.fr>
11043
11044 * src/gram.h (item_number_t): New, the type of item numbers in
11045 RITEM. Note that it must be able to code symbol numbers as
11046 positive number, and the negation of rule numbers as negative
11047 numbers.
11048 Adjust all dependencies (pretty many).
11049 * src/reduce.c (rule): Remove this `short *' pointer: use
11050 item_number_t.
11051 * src/system.h (MINSHORT, MAXSHORT): Remove.
11052 Include `limits.h'.
11053 Adjust dependencies to using SHRT_MAX and SHRT_MIN.
11054 (shortcpy): Remove.
11055 (MAXTABLE): Move to...
11056 * src/output.c (MAXTABLE): here.
11057 (prepare_rules): Use output_int_table to output rhs.
11058 * data/bison.simple, data/bison.c++: Adjust.
11059 * tests/torture.at (Big triangle): Move the limit from 254 to
11060 500.
11061 * tests/regression.at (Web2c Actions): Ajust.
11062
11063 Trying with bigger grammars shows various phenomena: at 3000 (28Mb
11064 of grammar file) bison is killed by my system, at 2000 (12Mb) bison
11065 passes, but produces negative #line number, once fixed, GCC is
11066 killed while compiling 14Mb, at 1500 (6.7 Mb of grammar, 8.2Mb of
11067 C), it passes.
11068 * src/state.h (state_h): Code input lines on ints, not shorts.
11069
11070 2002-04-08 Akim Demaille <akim@epita.fr>
11071
11072 * src/reduce.c (reduce_grammar): First reduce the nonterminals,
11073 and then the grammar.
11074
11075 2002-04-08 Akim Demaille <akim@epita.fr>
11076
11077 * src/system.h: No longer using strndup.
11078
11079 2002-04-07 Akim Demaille <akim@epita.fr>
11080
11081 * src/muscle_tab.h (MUSCLE_INSERT_LONG_INT): New.
11082 * src/output.c (output_table_data): Return the longest number.
11083 (prepare_tokens): Output `token_number_max').
11084 * data/bison.simple, data/bison.c++ (b4_sint_type, b4_uint_type):
11085 New.
11086 Use them to define yy_token_number_type/TokenNumberType.
11087 Use this type for yytranslate.
11088 * tests/torture.at (Big triangle): Push the limit from 124 to
11089 253.
11090 * tests/regression.at (Web2c Actions): Adjust.
11091
11092 2002-04-07 Akim Demaille <akim@epita.fr>
11093
11094 * tests/torture.at (Big triangle): New.
11095 (GNU AWK Grammar, GNU Cim Grammar): Move to...
11096 * tests/existing.at: here.
11097
11098 2002-04-07 Akim Demaille <akim@epita.fr>
11099
11100 * src/gram.h, src/gram.c (nitems): Remove, it is an alias of
11101 nritems.
11102 Adjust dependencies.
11103
11104 2002-04-07 Akim Demaille <akim@epita.fr>
11105
11106 * src/reader.c: Normalize increments to prefix form.
11107
11108 2002-04-07 Akim Demaille <akim@epita.fr>
11109
11110 * src/reader.c, symtab.c: Remove debugging code.
11111
11112 2002-04-07 Akim Demaille <akim@epita.fr>
11113
11114 Rename all the `bucket's as `symbol_t'.
11115
11116 * src/gram.c, src/gram.h, src/lex.c, src/lex.h, src/output.c,
11117 * src/reader.c, src/reader.h, src/reduce.c, src/state.h,
11118 * src/symtab.c, src/symtab.h (bucket): Rename as...
11119 (symbol_t): this.
11120 (symbol_list_new, bucket_check_defined, bucket_make_alias)
11121 (bucket_check_alias_consistence, bucket_pack, bucket_translation)
11122 (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
11123 (buckets_new, buckets_free, buckets_do): Rename as...
11124 (symbol_list_new, symbol_check_defined, symbol_make_alias)
11125 (symbol_check_alias_consistence, symbol_pack, symbol_translation)
11126 (symbol_new, symbol_free, hash_compare_symbol_t, hash_symbol_t)
11127 (symbols_new, symbols_free, symbols_do): these.
11128
11129 2002-04-07 Akim Demaille <akim@epita.fr>
11130
11131 Use lib/hash for the symbol table.
11132
11133 * src/gram.c (ntokens): Initialize to 1, to reserve a slot for
11134 EOF.
11135 * src/lex.c (lex): Set the `number' member of new terminals.
11136 * src/reader.c (bucket_check_defined, bucket_make_alias)
11137 (bucket_check_alias_consistence, bucket_translation): New.
11138 (reader, grammar_free, readgram, token_translations_init)
11139 (packsymbols): Adjust.
11140 (reader): Number the predefined tokens.
11141 * src/reduce.c (inaccessable_symbols): Just use hard coded numbers
11142 for predefined tokens.
11143 * src/symtab.h (bucket): Remove all the hash table related
11144 members.
11145 * src/symtab.c (symtab): Replace by...
11146 (bucket_table): this.
11147 (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
11148 (buckets_new, buckets_do): New.
11149
11150 2002-04-07 Akim Demaille <akim@epita.fr>
11151
11152 * src/gram.c (nitems, nrules, nsyms, ntokens, nvars, nritems)
11153 (start_symbol, max_user_token_number, semantic_parser)
11154 (error_token_number): Initialize.
11155 * src/reader.c (grammar, start_flag, startval, typed, lastprec):
11156 Initialize.
11157 (reader): Don't.
11158 (errtoken, eoftoken, undeftoken, axiom): Extern.
11159
11160 2002-04-07 Akim Demaille <akim@epita.fr>
11161
11162 * src/gram.h (rule_s): prec and precsym are now pointers
11163 to the bucket giving the priority/associativity.
11164 Member `associativity' removed: useless.
11165 * src/reduce.c, src/conflicts.c: Adjust.
11166
11167 2002-04-07 Akim Demaille <akim@epita.fr>
11168
11169 * src/lalr.c, src/LR0.c, src/closure.c, src/gram.c, src/reduce.c:
11170 Properly escape the symbols' TAG when outputting them.
11171
11172 2002-04-07 Akim Demaille <akim@epita.fr>
11173
11174 * src/lalr.h (LA): Is a bitsetv, not bitset*.
11175
11176 2002-04-07 Akim Demaille <akim@epita.fr>
11177
11178 * src/lalr.h, src/lalr.c (LAruleno): Replace with...
11179 (LArule): this, which is an array to rule_t*.
11180 * src/print.c, src/conflicts.c: Adjust.
11181
11182 2002-04-07 Akim Demaille <akim@epita.fr>
11183
11184 * src/gram.h (rule_t): Rename `number' as `user_number'.
11185 `number' is a new member.
11186 Adjust dependencies.
11187 * src/reduce.c (reduce_grammar_tables): Renumber rule_t.number.
11188
11189 2002-04-07 Akim Demaille <akim@epita.fr>
11190
11191 As a result of the previous patch, it is no longer needed
11192 to reorder ritem itself.
11193
11194 * src/reduce.c (reduce_grammar_tables): Don't sort RITEM.
11195
11196 2002-04-07 Akim Demaille <akim@epita.fr>
11197
11198 Be sure never to walk through RITEMS, but use only data related to
11199 the rules themselves. RITEMS should be banished.
11200
11201 * src/output.c (output_token_translations): Rename as...
11202 (prepare_tokens): this.
11203 In addition to `translate', prepare the muscles `tname' and
11204 `toknum', which were handled by...
11205 (output_rule_data): this.
11206 Remove, and move the remainder of its outputs into...
11207 (prepare_rules): this new routines, which also merges content from
11208 (output_gram): this.
11209 (prepare_rules): Be sure never to walk through RITEMS.
11210 (output_stos): Rename as...
11211 (prepare_stos): this.
11212 (output): Always invoke prepare_states, after all, just don't use it
11213 in the output if you don't need it.
11214
11215 2002-04-07 Akim Demaille <akim@epita.fr>
11216
11217 * src/LR0.c (new_state): Display `nstates' as the name of the
11218 newly created state.
11219 Adjust to initialize first_state and last_state if needed.
11220 Be sure to distinguish the initial from the final state.
11221 (new_states): Create the itemset of the initial state, and use
11222 new_state.
11223 * src/closure.c (closure): Now that the initial state has its
11224 items properly set, there is no need for a special case when
11225 creating `ruleset'.
11226
11227 As a result, now the rule 0, reducing to $axiom, is visible in the
11228 outputs. Adjust the test suite.
11229
11230 * tests/conflicts.at (Solved SR Conflicts)
11231 (Unresolved SR Conflicts): Adjust.
11232 * tests/regression.at (Web2c Report, Rule Line Numbers): Idem.
11233 * tests/conflicts.at (S/R in initial): New.
11234
11235 2002-04-07 Akim Demaille <akim@epita.fr>
11236
11237 * src/LR0.c (allocate_itemsets): Don't loop over ritem: loop over
11238 the RHS of the rules.
11239 * src/output.c (output_gram): Likewise.
11240
11241 2002-04-07 Akim Demaille <akim@epita.fr>
11242
11243 * src/gram.h (rule_t): `lhs' is now a pointer to the symbol's
11244 bucket.
11245 Adjust all dependencies.
11246 * src/reduce.c (nonterminals_reduce): Don't forget to renumber the
11247 `number' of the buckets too.
11248 * src/gram.h: Include `symtab.h'.
11249 (associativity): Move to...
11250 * src/symtab.h: here.
11251 No longer include `gram.h'.
11252
11253 2002-04-07 Akim Demaille <akim@epita.fr>
11254
11255 * src/gram.h, src/gram.c (rules_rhs_length): New.
11256 (ritem_longest_rhs): Use it.
11257 * src/gram.h (rule_t): `number' is a new member.
11258 * src/reader.c (packgram): Set it.
11259 * src/reduce.c (reduce_grammar_tables): Move the useless rules at
11260 the end of `rules', and count them out of `nrules'.
11261 (reduce_output, dump_grammar): Adjust.
11262 * src/print.c (print_grammar): It is no longer needed to check for
11263 the usefulness of a rule, as useless rules are beyond `nrules + 1'.
11264 * tests/reduce.at (Reduced Automaton): New test.
11265
11266 2002-04-07 Akim Demaille <akim@epita.fr>
11267
11268 * src/reduce.c (inaccessable_symbols): Fix a buglet: because of a
11269 lacking `+ 1' to nrules, Bison reported as useless a token if it
11270 was used solely to set the precedence of the last rule...
11271
11272 2002-04-07 Akim Demaille <akim@epita.fr>
11273
11274 * data/bison.c++, data/bison.simple: Don't output the current file
11275 name in #line, to avoid useless diffs between two identical
11276 outputs under different names.
11277
11278 2002-04-07 Akim Demaille <akim@epita.fr>
11279
11280 * src/closure.c, src/print.c, src/reader.c, src/reduce.c:
11281 Normalize loops to using `< nrules + 1', not `<= nrules'.
11282
11283 2002-04-07 Akim Demaille <akim@epita.fr>
11284
11285 * TODO: Update.
11286
11287 2002-04-07 Akim Demaille <akim@epita.fr>
11288
11289 * src/output.c, src/reader.c, src/symtab.c, src/symtab.h: Rename
11290 bucket.value as bucket.number.
11291
11292 2002-04-07 Akim Demaille <akim@epita.fr>
11293
11294 * src/closure.c, src/derives.c, src/gram.h, src/lalr.c,
11295 * src/nullable.c, src/output.c, src/print.c, src/print_graph.c,
11296 * src/reader.c, src/reduce.c: Let rule_t.rhs point directly to the
11297 RHS, instead of being an index in RITEMS.
11298
11299 2002-04-04 Paul Eggert <eggert@twinsun.com>
11300
11301 * doc/bison.texinfo: Update copyright date.
11302 (Rpcalc Lexer, Symbols, Token Decl): Don't assume ASCII.
11303 (Symbols): Warn about running Bison in one character set,
11304 but compiling and/or running in an incompatible one.
11305 Warn about character code 256, too.
11306
11307 2002-04-03 Paul Eggert <eggert@twinsun.com>
11308
11309 * src/bison.data (YYSTACK_ALLOC): Depend on whether
11310 YYERROR_VERBOSE is nonzero, not whether it is defined.
11311
11312 Merge changes from bison-1_29-branch.
11313
11314 2002-03-20 Paul Eggert <eggert@twinsun.com>
11315
11316 Merge fixes from Debian bison_1.34-1.diff.
11317
11318 * configure.in (AC_PREREQ): 2.53.
11319
11320 2002-03-20 Akim Demaille <akim@epita.fr>
11321
11322 * src/conflicts.c (log_resolution): Argument `resolution' is const.
11323
11324 2002-03-19 Paul Eggert <eggert@twinsun.com>
11325
11326 * src/bison.simple (YYCOPY): New macro.
11327 (YYSTACK_RELOCATE): Use it.
11328 Remove Type arg; no longer needed. All callers changed.
11329 (yymemcpy): Remove; no longer needed.
11330
11331 * Makefile.am (AUTOMAKE_OPTIONS): 1.6.
11332 * doc/Makefile.am (AUTOMAKE_OPTIONS): Remove.
11333
11334 2002-03-19 Akim Demaille <akim@epita.fr>
11335
11336 Test and fix the #line outputs.
11337
11338 * tests/atlocal.at (GCC): New.
11339 * tests/synclines.at (AT_TEST_SYNCLINE): New macro.
11340 (Prologue synch line, %union synch line, Postprologue synch line)
11341 (Action synch line, Epilogue synch line): New tests.
11342 * src/reader.c (parse_union_decl): Define the muscle stype_line.
11343 * data/bison.simple, data/bison.c++: Use it.
11344
11345 2002-03-19 Akim Demaille <akim@epita.fr>
11346
11347 * tests/regression.at (%nonassoc and eof, Unresolved SR Conflicts)
11348 (Solved SR Conflicts, %expect not enough, %expect right)
11349 (%expect too much): Move to...
11350 * tests/conflicts.at: this new file.
11351
11352 2002-03-19 Akim Demaille <akim@epita.fr>
11353
11354 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
11355 * data/bison.simple, data/bison.c++: Handle the `#define' part, so
11356 that we can move to enums for instance.
11357 * src/output.c (token_definitions_output): Output a list of
11358 `token-name, token-number' instead of the #define.
11359 (output_skeleton): Name this list `b4_tokens', not `b4_tokendefs'.
11360
11361 2002-03-14 Akim Demaille <akim@epita.fr>
11362
11363 Use Gettext 0.11.1.
11364
11365 2002-03-09 Robert Anisko <robert@lrde.epita.fr>
11366
11367 * data/bison.c++: Make the user able to add members to the generated
11368 parser by subclassing.
11369
11370 2002-03-05 Robert Anisko <robert@lrde.epita.fr>
11371
11372 * src/reader.c (read_additionnal_code): `c' should be an integer, not
11373 a character.
11374 Reported by Nicolas Tisserand and Nicolas Burrus.
11375
11376 2002-03-04 Robert Anisko <robert@lrde.epita.fr>
11377
11378 * src/reader.c: Warn about lacking semi-colons, do not complain.
11379
11380 2002-03-04 Robert Anisko <robert@lrde.epita.fr>
11381
11382 * data/bison.c++: Remove a debug line.
11383
11384 2002-03-04 Robert Anisko <robert@lrde.epita.fr>
11385
11386 * data/bison.c++: Unmerge value as yylval and value as yyval. Unmerge
11387 location as yylloc and location as yyloc. Use YYLLOC_DEFAULT, and
11388 provide a default implementation.
11389
11390 2002-03-04 Akim Demaille <akim@epita.fr>
11391
11392 * tests/input.at (Invalid $n, Invalid @n): Add the ending `;'.
11393 * tests/output.at (AT_CHECK_OUTPUT): Likewise.
11394 * tests/headers.at (AT_TEST_CPP_GUARD_H): Ditto.
11395 * tests/semantic.at (Parsing Guards): Similarly.
11396 * src/reader.at (readgram): Complain if the last rule is not ended
11397 with a semi-colon.
11398
11399 2002-03-04 Akim Demaille <akim@epita.fr>
11400
11401 * src/warshall.h, src/warshall.c (bitmatrix_print): Move to...
11402 * src/closure.c: here.
11403 (set_firsts): Use bitsetv_reflexive_transitive_closure instead of
11404 RTC.
11405 * src/warshall.h, src/warshall.c: Remove.
11406 * tests/sets.at (Broken Closure): Adjust.
11407
11408 2002-03-04 Akim Demaille <akim@epita.fr>
11409
11410 * src/output.c (output_skeleton): tempdir is const.
11411 bytes_read is unused.
11412
11413 2002-03-04 Akim Demaille <akim@epita.fr>
11414
11415 * lib/bbitset.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
11416 * lib/bitsetv.h, lib/ebitset.c, lib/lbitset.c, lib/sbitset.c:
11417 Update.
11418 From Michael Hayes.
11419
11420 2002-03-04 Akim Demaille <akim@epita.fr>
11421
11422 * src/closure.c (closure): `r' is unused.
11423
11424 2002-03-04 Akim Demaille <akim@epita.fr>
11425
11426 * tests/sets.at (Broken Closure): Add the ending `;'.
11427 * src/reader.at (readgram): Complain if a rule is not ended with a
11428 semi-colon.
11429
11430 2002-03-04 Akim Demaille <akim@epita.fr>
11431
11432 * src/conflicts.c (set_conflicts): Use bitset_disjoint_p.
11433 (count_sr_conflicts): Use bitset_count.
11434 * src/reduce.c (inaccessable_symbols): Ditto.
11435 (bits_size): Remove.
11436 * src/warshall.h, src/warshall.c: Convert to bitsetv.
11437
11438 2002-03-04 Akim Demaille <akim@epita.fr>
11439
11440 * src/closure.c, src/conflicts.c, src/lalr.c, src/print.c,
11441 * src/reduce.c: Remove the `bitset_zero's following the
11442 `bitset_create's, as now it is performed by the latter.
11443
11444 2002-03-04 Akim Demaille <akim@epita.fr>
11445
11446 * lib/bitset.c, lib/bitset.h, lib/bitsetv.c, lib/bitsetv.h,
11447 * lib/ebitset.c, lib/ebitset.h, lib/lbitset.c, lib/lbitset.h,
11448 * lib/sbitset.c, lib/sbitset.h, lib/bbitset.h: Update from the
11449 latest sources from Michael.
11450
11451 2002-03-04 Akim Demaille <akim@epita.fr>
11452
11453 * src/output.c (output): Don't free the grammar.
11454 * src/reader.c (grammar_free): New.
11455 * src/main.c (main): Call it and don't free symtab here.
11456
11457 2002-03-04 Akim Demaille <akim@epita.fr>
11458
11459 * src/lex.c (parse_percent_token): Be sure to 0-end token_buffer
11460 before returning.
11461 Reported by Benoit Perrot.
11462
11463 2002-03-04 Akim Demaille <akim@epita.fr>
11464
11465 Use bitset operations when possible, not loops over bits.
11466
11467 * src/conflicts.c (set_conflicts, count_sr_conflicts): Use
11468 bitset_or.
11469 * src/print.c (print_reductions): Use bitset_and, bitset_andn.
11470 * src/reduce.c (useless_nonterminals): Formatting changes.
11471 * src/warshall.c (TC): Use bitset_or.
11472
11473 2002-03-04 Akim Demaille <akim@epita.fr>
11474
11475 * src/lalr.h, src/lalr.c (tokensetsize): Remove, unused.
11476 * src/system.h (BITS_PER_WORD, WORDSIZE, SETBIT, RESETBIT, BITISSET):
11477 Ditto.
11478
11479 2002-03-04 Akim Demaille <akim@epita.fr>
11480
11481 * src/lalr.c (F): Now a bitset*.
11482 Adjust all dependencies.
11483
11484 2002-03-04 Akim Demaille <akim@epita.fr>
11485
11486 * src/conflicts.c (shiftset, lookaheadset): Now bitset.
11487 Adjust all dependencies.
11488
11489 2002-03-04 Akim Demaille <akim@epita.fr>
11490
11491 * src/L0.c, src/LR0.h (nstates): Be size_t.
11492 Adjust comparisons (signed vs unsigned).
11493 * src/conflics.c, src/lalr.c, src/lalr.h, src/output.c (LA): Now a
11494 bitset*.
11495 Adjust all dependencies.
11496
11497 2002-03-04 Akim Demaille <akim@epita.fr>
11498
11499 * src/closure.c (firsts): Now, also a bitset.
11500 Adjust all dependencies.
11501 (varsetsize): Remove, now unused.
11502 * src/warshall.h, src/warshall.c: Now work on arrays of bitsets.
11503
11504 2002-03-04 Akim Demaille <akim@epita.fr>
11505
11506 * src/print.c: Convert to use bitset.h, not hand coded iterations
11507 over ints.
11508
11509 2002-03-04 Akim Demaille <akim@epita.fr>
11510
11511 * src/reduce.c: Convert to use bitset.h, not hand coded BSet.
11512
11513 2002-03-04 Akim Demaille <akim@epita.fr>
11514
11515 * src/closure.c (ruleset): Be a bitset.
11516 (rulesetsize): Remove.
11517
11518 2002-03-04 Akim Demaille <akim@epita.fr>
11519
11520 * lib/bitset-int.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
11521 * lib/bitsetv.h, lib/ebitset.c, lib/ebitset.h, lib/lbitset.c,
11522 * lib/lbitset.h, lib/sbitset.c, lib/sbitset.h: New.
11523 * src/closure.c (fderives): Be an array of bitsets.
11524
11525 2002-02-28 Robert Anisko <robert@lrde.epita.fr>
11526
11527 * data/bison.c++: Merge the two generated headers. Insert a copyright
11528 notice in each output file.
11529
11530 2002-02-28 Akim Demaille <akim@epita.fr>
11531
11532 * data/bison.c++: Copy the prologue of bison.simple to fetch
11533 useful M4 definitions, such as b4_header_guard.
11534
11535 2002-02-25 Akim Demaille <akim@epita.fr>
11536
11537 * src/getargs.c (version): Give the name of the authors, and use a
11538 translator friendly scheme for the bgr
11539 copyright notice.
11540
11541 2002-02-25 Akim Demaille <akim@epita.fr>
11542
11543 * src/output.c (header_output): Remove, now handled completely via
11544 M4.
11545
11546 2002-02-25 Akim Demaille <akim@epita.fr>
11547
11548 * m4/m4.m4: New, from CVS Autoconf.
11549 * configure.in: Invoke it.
11550 * src/output.c (output_skeleton): Use its result instead of the
11551 hard coded name.
11552
11553 2002-02-25 Akim Demaille <akim@epita.fr>
11554
11555 * lib/tempname.c, lib/mkstemp.c, m4/mkstemp.m4: New, stolen from
11556 Fileutils 4.1.5.
11557 * configure.in: Invoke UTILS_FUNC_MKSTEMP.
11558 * src/output.c (output_skeleton): Use mkstemp to create a real
11559 temporary file.
11560 Move the filling of `skeleton' and its muscle to...
11561 (prepare): here.
11562 (output): Move the definition of the prologue muscle to...
11563 (prepare): here.
11564 * src/system.h (DEFAULT_TMPDIR): New.
11565
11566 2002-02-14 Paul Eggert <eggert@twinsun.com>
11567
11568 Remove the support for C++ namespace cleanliness; it was
11569 causing more problems than it was curing, since it didn't work
11570 properly on some nonstandard C++ compilers. This can wait
11571 for a proper C++ parser.
11572
11573 * NEWS: Document this.
11574 * doc/bison.texinfo (Bison Parser, Debugging): Remove special mention
11575 of C++, as it's treated like C now.
11576 * src/bison.simple (YYSTD): Remove.
11577 (YYSIZE_T, YYFPRINTF, YYPARSE_PARAM_ARG, YYPARSE_PARAM_DECL):
11578 Treat C++ just like Standard C instead of trying to support
11579 namespace cleanliness.
11580
11581 2002-02-14 Akim Demaille <akim@epita.fr>
11582
11583 * tests/regression.at (else): Adjust to Andreas' change.
11584
11585 2002-02-14 Akim Demaille <akim@epita.fr>
11586
11587 * lib/Makefile.am (EXTRA_DIST): Ship strnlen.c.
11588
11589 2002-02-13 Andreas Schwab <schwab@suse.de>
11590
11591 * src/output.c (output_rule_data): Don't output NULL, it might
11592 not be defined yet.
11593
11594 2002-02-11 Robert Anisko <robert@lrde.epita.fr>
11595
11596 * data/bison.c++ (YYDEBUG, YYERROR_VERBOSE): After the prologue.
11597 (Copyright notice): Update.
11598
11599 2002-02-11 Akim Demaille <akim@epita.fr>
11600
11601 * tests/regression.at (%nonassoc and eof): Don't include
11602 nonportable headers.
11603
11604 2002-02-08 Robert Anisko <robert@lrde.epita.fr>
11605
11606 * data/bison.c++: Correct error recovery. Make the user able to
11607 initialize the starting location.
11608
11609 2002-02-07 Akim Demaille <akim@epita.fr>
11610
11611 * tests/input.at: New.
11612
11613 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
11614
11615 * data/bison.c++: Replace some direct m4 expansions by constants. Be
11616 more consistent when naming methods and variables. Put preprocessor
11617 directives around tables only needed for debugging.
11618
11619 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
11620
11621 * data/bison.c++ (yy::b4_name::print_): New method, replaces yyprint in
11622 C++ parsers.
11623 (yy::b4_name::parse): Use print_.
11624
11625 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
11626
11627 * data/bison.c++ (yy::b4_name::parse): Error recovery is back.
11628
11629 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
11630
11631 * data/bison.c++ (yy::b4_name::error_): New method, replaces yyerror in
11632 C++ parsers.
11633 (yy::b4_name::parse): Build verbose error messages, and use error_.
11634
11635 2002-02-06 Robert Anisko <robert@lrde.epita.fr>
11636
11637 * data/bison.c++: Fix m4 quoting in comments.
11638
11639 2002-02-06 Robert Anisko <robert@lrde.epita.fr>
11640
11641 * data/bison.c++: Adjust the parser code. Fix some muscles that were
11642 not expanded by m4.
11643
11644 2002-02-05 Akim Demaille <akim@epita.fr>
11645
11646 * data/bison.c++: Adjust to the M4 back end.
11647 More is certainly needed.
11648
11649 2002-02-05 Akim Demaille <akim@epita.fr>
11650
11651 Give a try to M4 as a back end.
11652
11653 * lib/readpipe.c: New, from wdiff.
11654 * src/Makefile.am (DEFS): Define PKGDATADIR, not BISON_SIMPLE and
11655 BISON_HAIRY.
11656 * src/system.h (BISON_HAIRY, BISON_SIMPLE): Remove the DOS and VMS
11657 specific values. Now it is m4 that performs the lookup.
11658 * src/parse-skel.y: Remove.
11659 * src/muscle_tab.c, src/muscle_tab.h (muscles_m4_output): New.
11660 * src/output.c (actions_output, guards_output)
11661 (token_definitions_output): No longer keeps track of the output
11662 line number, hence remove the second argument.
11663 (guards_output): Check against the guard member of a rule, not the
11664 action member.
11665 Adjust callers.
11666 (output_skeleton): Don't look for the skeleton location, let m4 do
11667 that.
11668 Create `/tmp/muscles.m4'. This is temporary, a proper temporary
11669 file will be used.
11670 Invoke `m4' on m4sugar.m4, muscles.m4, and the skeleton.
11671 (prepare): Given that for the time being changesyntax is not
11672 usable in M4, rename the muscles using `-' to `_'.
11673 Define `defines_flag', `output_parser_name' and `output_header_name'.
11674 * src/output.h (actions_output, guards_output)
11675 (token_definitions_output): Adjust prototypes.
11676 * src/scan-skel.l: Instead of scanning the skeletons, it now
11677 processes the output of m4: `__oline__' and `#output'.
11678 * data/bison.simple: Adjust to be used by M4(sugar).
11679 * tests/Makefile.am: Use check_SCRIPTS to make sure `bison' is up
11680 to date.
11681 * tests/bison.in: Use the secrete envvar `BISON_PKGDATADIR'
11682 instead of the dead `BISON_SIMPLE' and `BISON_HAIRY'.
11683 * data/m4sugar/m4sugar.m4, data/m4sugar/version.m4: New,
11684 shamelessly stolen from CVS Autoconf.
11685
11686 2002-02-05 Akim Demaille <akim@epita.fr>
11687
11688 * lib/hash.c, lib/hash.h: Replace with Fileutils 4.1's version.
11689 * configure.in: Check for the declarations of free and malloc.
11690 * src/muscle_tab.c: Adjust.
11691
11692 2002-02-05 Akim Demaille <akim@epita.fr>
11693
11694 * src/muscle_tab.c (muscle_init): Don't default to NULL muscle
11695 which have no values.
11696
11697 2002-02-05 Akim Demaille <akim@epita.fr>
11698
11699 * src/bison.simple, src/bison.hairy, src/bison.c++: Move to...
11700 * data/: here.
11701
11702 2002-01-29 Paul Eggert <eggert@twinsun.com>
11703
11704 * src/bison.simple (YYSIZE_T): Do not define merely because
11705 YYSTACK_USE_ALLOCA is nonzero or alloca or _ALLOCA_H are defined.
11706 On some platforms, <alloca.h> does not declare YYSTD (size_t).
11707
11708 2002-01-27 Akim Demaille <akim@epita.fr>
11709
11710 Fix `%nonassoc and eof'.
11711
11712 * src/state.c (errs_dup): Aaaah! The failure was due to bytes
11713 which were not properly copied! Replace
11714 memcpy (res->errs, src->errs, src->nerrs);
11715 with
11716 memcpy (res->errs, src->errs, src->nerrs * sizeof (src->errs[0]));
11717 !!!
11718 * tests/regression.at (%nonassoc and eof): Adjust to newest
11719 Autotest: `.' is not in the PATH.
11720
11721 2002-01-27 Akim Demaille <akim@epita.fr>
11722
11723 * tests/sets.at (AT_EXTRACT_SETS): New.
11724 (Nullable): Use it.
11725 (Firsts): New.
11726
11727 2002-01-26 Akim Demaille <akim@epita.fr>
11728
11729 * tests/actions.at, tests/calc.at, tests/headers.at,
11730 * tests/torture.at: Adjust to the newest Autotest which no longer
11731 forces `.' in the PATH.
11732
11733 2002-01-25 Akim Demaille <akim@epita.fr>
11734
11735 * tests/regression.at (%nonassoc and eof): New.
11736 Suggested by Robert Anisko.
11737
11738 2002-01-24 Akim Demaille <akim@epita.fr>
11739
11740 Bison dumps core when trying to complain about broken input files.
11741 Reported by Cris van Pelt.
11742
11743 * src/lex.c (parse_percent_token): Be sure to set token_buffer.
11744 * tests/regression.at (Invalid input: 1, Invalid input: 2): Merge
11745 into...
11746 (Invalid inputs): Strengthen: exercise parse_percent_token.
11747
11748 2002-01-24 Robert Anisko <robert.anisko@epita.fr>
11749
11750 * src/Makefile.am: Add bison.c++.
11751 * src/bison.c++: New skeleton.
11752
11753 2002-01-21 Paolo Bonzini <bonzini@gnu.org>
11754
11755 * po/it.po: New.
11756
11757 2002-01-21 Kees Zeelenberg <kzlg@users.sourceforge.net>
11758
11759 * src/files.c (skeleton_find) [MSDOS]: Fix cp definition.
11760
11761 2002-01-20 Marc Autret <marc@gnu.org>
11762
11763 * src/files.c (compute_output_file_names): Fix
11764
11765 2002-01-20 Marc Autret <marc@gnu.org>
11766
11767 * tests/output.at: New test.
11768 * src/files.c (compute_base_names): Don't map extensions when
11769 the YACC flag is set, use defaults.
11770 Reported by Evgeny Stambulchik.
11771
11772 2002-01-20 Marc Autret <marc@gnu.org>
11773
11774 * src/system.h: Need to define __attribute__ away for non-GCC
11775 compilers as well (i.e., the vendor C compiler).
11776 Suggested by Albert Chin-A-Young.
11777
11778 2002-01-11 Tim Van Holder <tim.van.holder@pandora.be>
11779
11780 * lib/hash.h, lib/hash.c: Renamed __P to PARAMS and used the
11781 canonical definition.
11782 * src/system.h: Use the canonical definition for PARAMS (avoids
11783 a conflict with the macro from lib/hash.h).
11784
11785 2002-01-11 Akim Demaille <akim@epita.fr>
11786
11787 * configure.in: Use AC_FUNC_STRNLEN.
11788 Fixes the failures observed on AIX 4.3 by H.Merijn Brand.
11789
11790 2002-01-09 Akim Demaille <akim@epita.fr>
11791
11792 * src/files.c, src/files.h (output_infix): New.
11793 (tab_extension): Remove.
11794 (compute_base_names): Compute the former, drop the latter.
11795 * src/output.c (prepare): Insert the muscles `output-infix', and
11796 `output-suffix'.
11797 * src/parse-skel.y (string, string.1): New.
11798 (section.header): Use it.
11799 (section.yacc): Remove.
11800 (prefix): Remove too.
11801 * src/scan-skel.l: Adjust.
11802 * src/bison.simple, src/bison.hairy: Adjust.
11803
11804 2002-01-09 Akim Demaille <akim@epita.fr>
11805
11806 * configure.in (WERROR_CFLAGS): Compute it.
11807 * src/Makefile.am (CFLAGS): Pass it.
11808 * tests/atlocal.in (CFLAGS): Idem.
11809 * src/files.c: Fix a few warnings.
11810 (get_extension_index): Remove, unused.
11811
11812 2002-01-08 Akim Demaille <akim@epita.fr>
11813
11814 * src/getargs.c (AS_FILE_NAME): New.
11815 (getargs): Use it to convert DOSish file names.
11816 * src/files.c (base_name): Rename as full_base_name to avoid
11817 clashes with `base_name ()'.
11818 (filename_split): New.
11819 (compute_base_names): N-th rewrite, using filename_split.
11820
11821 2002-01-08 Akim Demaille <akim@epita.fr>
11822
11823 * lib/basename.c, lib/dirname.h, lib/dirname.c, lib/memrchr.c:
11824 New, stolen from the Fileutils 4.1.
11825 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
11826 * configure.in: Check for the presence of memrchr, and of its
11827 prototype.
11828
11829 2002-01-07 Tim Van Holder <tim.van.holder@pandora.be>
11830
11831 * lib/hash.h (__P): Added definition for this macro.
11832 * src/Makefile.am: Add parse-skel.c and scan-skel.c to
11833 BUILT_SOURCES, to ensure they are generated first.
11834 * src/parse-skel.y: Use YYERROR_VERBOSE instead of
11835 %error-verbose to allow bootstrapping with bison 1.30x.
11836
11837 2002-01-06 Akim Demaille <akim@epita.fr>
11838
11839 * src/reader.c (parse_braces): Don't fetch the next char, the
11840 convention is to fetch on entry.
11841 * tests/torture.at (GNU Cim Grammar): Reintroduce their weird
11842 'switch' without a following semicolon.
11843 * tests/regression.at (braces parsing): New.
11844
11845 2002-01-06 Akim Demaille <akim@epita.fr>
11846
11847 Bison is dead wrong in its RR conflict reports.
11848
11849 * tests/torture.at (GNU Cim Grammar): New.
11850 * src/conflicts.c (count_rr_conflicts): Fix.
11851
11852 2002-01-06 Akim Demaille <akim@epita.fr>
11853
11854 Creating package.m4 from configure.ac causes too many problems.
11855
11856 * tests/Makefile.am (package.m4): Create it by hand,
11857 AC_CONFIG_TESTDIR no longer does in the most recent CVS Autoconf.
11858
11859 2002-01-06 Akim Demaille <akim@epita.fr>
11860
11861 * src/Makefile.am (bison_SOURCES): Add parse-skel.h and
11862 skeleton.h.
11863
11864 2002-01-04 Paul Eggert <eggert@twinsun.com>
11865
11866 * doc/bison.texinfo (Debugging):
11867 Remove YYSTDERR; it's no longer defined or used.
11868 Also, s/cstdio.h/cstdio/.
11869
11870 2002-01-03 Akim Demaille <akim@epita.fr>
11871
11872 * tests/bison.in, tests/atlocal.in: Adjust to CVS Autoconf.
11873
11874 2002-01-03 Akim Demaille <akim@epita.fr>
11875
11876 * src/parse-skel.y (process_skeleton): Don't bind the parser's
11877 tracing code to --trace, wait for a better --trace option, with
11878 args.
11879
11880 2002-01-03 Akim Demaille <akim@epita.fr>
11881
11882 * src/bison.simple (YYSTDERR): Remove, replace `stderr'.
11883 The ISO C++ standard is extremely clear about it: stderr is
11884 considered a macro, not a regular symbol (see table 94 `Header
11885 <cstdio> synopsis', [lib.c.files] 27.8.2 C Library files).
11886 Therefore std:: does not apply to it. It still does with fprintf.
11887 Also, s/cstdio.h/cstdio/.
11888
11889 2002-01-03 Akim Demaille <akim@epita.fr>
11890
11891 * lib/quotearg.c: Use `#include "..."' instead of `#include <...>'
11892 for non system headers.
11893
11894 2002-01-02 Akim Demaille <akim@epita.fr>
11895
11896 Equip the skeleton chain with location tracking, runtime trace,
11897 pure parser and scanner.
11898
11899 * src/parse-skel.y: Request a pure parser, locations, and prefix
11900 renaming.
11901 (%union): Having several members with the same type does not help
11902 type mismatches, simplify.
11903 (YYPRINT, yyprint): New.
11904 (yyerror): ``Rename'' (there is a #define yyerror skel_error) as...
11905 (skel_error): this.
11906 Handle locations.
11907 * src/scan-skel.l: Adjust to these changes.
11908 * src/skeleton.h (LOCATION_RESET, LOCATION_LINES, LOCATION_STEP)
11909 (LOCATION_PRINT, skel_control_t): New.
11910
11911 2001-12-30 Akim Demaille <akim@epita.fr>
11912
11913 * src/parse-skel.y: Get rid of the shift/reduce conflict:
11914 replace `gb' with BLANKS.
11915 * src/scan-skel.l: Adjust.
11916
11917 2001-12-30 Akim Demaille <akim@epita.fr>
11918
11919 * src/system.h: We don't need nor want bcopy.
11920 Throw away MS-DOS crap: we don't need getpid.
11921 * configure.in: We don't need strndup. It was even causing
11922 problems: because Flex includes the headers *before* us,
11923 _GNU_SOURCE is not defined by config.h, and therefore strndup was
11924 not visible.
11925 * lib/xstrndup.c: New.
11926 * src/scan-skel.l: Use it.
11927 Be sure to initialize yylval.muscle member when scanning a MUSCLE.
11928 * src/parse-skel.y: Use %directives instead of #defines.
11929
11930 2001-12-30 Akim Demaille <akim@epita.fr>
11931
11932 * src/skeleton.h: New.
11933 * src/output.c (output_parser, output_master_parser): Remove, dead
11934 code.
11935 * src/output.h (get_lines_number, actions_output, guards_output)
11936 (token_definitions_output): Prototype them.
11937 * src/parse-skel.y: Add the license notice.
11938 Include output.h and skeleton.h.
11939 (process_skeleton): Returns void, and takes a single parameter.
11940 * src/scan-skel.l: Add the license notice.
11941 Include skeleton.h.
11942 Don't use %option yylineno: it seems that then Flex imagines
11943 REJECT has been used, and therefore it won't reallocate its
11944 buffers (which makes no other sense to me than a bug). It results
11945 in warnings for `unused: yy_flex_realloc'.
11946
11947 2001-12-30 Robert Anisko <robert.anisko@epita.fr>
11948
11949 * src/muscle_tab.h (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
11950 (MUSCLE_INSERT_PREFIX): ...to there.
11951 * src/output.c (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
11952 (MUSCLE_INSERT_PREFIX): Move from here...
11953
11954 * src/bison.hairy: Add a section directive. Put braces around muscle
11955 names. This parser skeleton is still broken, but Bison should not
11956 choke on a bad muscle 'syntax'.
11957 * src/bison.simple: Add a section directive. Put braces around muscle
11958 names.
11959
11960 * src/files.h (strsuffix, stringappend): Add declarations.
11961 (tab_extension): Add declaration.
11962 (short_base_name): Add declaration.
11963
11964 * src/files.c (strsuffix, stringappend): No longer static. These
11965 functions are used in the skeleton parser.
11966 (tab_extension): New.
11967 (compute_base_names): Use the computations done in this function
11968 to guess if the generated parsers should have '.tab' in their
11969 names.
11970 (short_base_name): No longer static.
11971
11972 * src/output.c (output_skeleton): New.
11973 (output): Disable call to output_master_parser, and give a try to
11974 a new skeleton handling system.
11975 (guards_output, actions_output): No longer static.
11976 (token_definitions_output, get_lines_number): No longer static.
11977
11978 * configure.in: Use AM_PROG_LEX and AC_PROG_YACC.
11979
11980 * src/Makefile.am (bison_SOURCES): Add scan-skel.l and
11981 parse-skel.y.
11982
11983 * src/parse-skel.y: New file.
11984 * src/scan-skel.l: New file.
11985
11986 2001-12-29 Akim Demaille <akim@epita.fr>
11987
11988 %name-prefix is broken.
11989
11990 * src/files.c (spec_name_prefix): Initialize to NULL, not to "yy".
11991 Adjust all dependencies.
11992 * tests/headers.at (export YYLTYPE): Strengthen this test: use
11993 %name-prefix.
11994
11995 Renaming yylval but not yylloc is not consistent. Now we do.
11996
11997 * src/bison.simple: Prefix yylloc if used.
11998 * doc/bison.texinfo (Decl Summary): Document that.
11999
12000 2001-12-29 Akim Demaille <akim@epita.fr>
12001
12002 * doc/bison.texinfo: Promote `%long-directive' over
12003 `%long_directive'.
12004 Remove all references to fixed-output-files, yacc is enough.
12005
12006 2001-12-29 Akim Demaille <akim@epita.fr>
12007
12008 * src/bison.simple: Define YYDEBUG and YYERROR_VERBOSE *after* the
12009 user prologue. These are defaults.
12010 * tests/actions.at (Mid-rule actions): Make sure the user can
12011 define YYDEBUG and YYERROR_VERBOSE.
12012
12013 2001-12-29 Akim Demaille <akim@epita.fr>
12014
12015 * src/output.c (header_output): Don't forget to export YYLTYPE and
12016 yylloc.
12017 * tests/headers.at (export YYLTYPE): New, make sure it does.
12018 * tests/regression.at (%union and --defines, Invalid CPP headers):
12019 Move to...
12020 * tests/headers.at: here.
12021
12022 2001-12-29 Akim Demaille <akim@epita.fr>
12023
12024 * src/gram.h (rule_s): Member `assoc' is of type `associativity'.
12025
12026 2001-12-29 Akim Demaille <akim@epita.fr>
12027
12028 * tests/actions.at (Mid-rule actions): Output on a single line
12029 instead of several.
12030
12031 2001-12-29 Akim Demaille <akim@epita.fr>
12032
12033 * doc/bison.texinfo: Formatting changes.
12034
12035 2001-12-29 Akim Demaille <akim@epita.fr>
12036
12037 Don't store the token defs in a muscle, just be ready to output it
12038 on command. Now possible via `symbols'. Fixes a memory leak.
12039
12040 * src/output.c (token_definitions_output): New.
12041 (output_parser, header_output): Use it.
12042 * src/reader.c (symbols_save): Remove.
12043
12044 2001-12-29 Akim Demaille <akim@epita.fr>
12045
12046 * src/bison.simple: Do not provide a default for YYSTYPE and
12047 YYLTYPE before the user's prologue. Otherwise it's hardly... a
12048 default.
12049
12050 2001-12-29 Akim Demaille <akim@epita.fr>
12051
12052 Mid-rule actions are simply... ignored!
12053
12054 * src/reader.c (readgram): Be sure to attach mid-rule actions to
12055 the empty-rule associated to the dummy symbol, not to the host
12056 rule.
12057 * tests/actions.at (Mid-rule actions): New.
12058
12059 2001-12-29 Akim Demaille <akim@epita.fr>
12060
12061 Memory leak.
12062
12063 * src/reader.c (reader): Free grammar.
12064
12065 2001-12-29 Akim Demaille <akim@epita.fr>
12066
12067 Memory leak.
12068
12069 * src/LR0.c (new_itemsets): Don't allocate `shift_symbol' here,
12070 since it allocates it for each state, although only one is needed.
12071 (allocate_storage): Do it here.
12072
12073 2001-12-29 Akim Demaille <akim@epita.fr>
12074
12075 * src/options.h, src/options.c (create_long_option_table): Rename
12076 as...
12077 (long_option_table_new): this, with a clearer prototype.
12078 (percent_table): Remove, unused,
12079 * src/getargs.c (getargs): Adjust.
12080
12081 2001-12-29 Akim Demaille <akim@epita.fr>
12082
12083 * src/LR0.c, src/conflicts.c, src/lalr.c, src/lalr.h, src/output.c
12084 * src/print.c, src/print_graph.c, src/state.h: Rename state_table
12085 as states.
12086
12087 2001-12-29 Akim Demaille <akim@epita.fr>
12088
12089 * src/lalr.c (build_relations): Rename `states' as `states1'.
12090 Sorry, I don't understand exactly what it is, no better name...
12091
12092 2001-12-29 Akim Demaille <akim@epita.fr>
12093
12094 * src/closure.c, src/conflicts.c, src/derives.c, src/gram.c
12095 * src/gram.h, src/lalr.c, src/nullable.c, src/output.c, src/print.c
12096 * src/print_graph.c, src/reader.c, src/reduce.c: Rename rule_table
12097 as rules.
12098
12099 2001-12-29 Akim Demaille <akim@epita.fr>
12100
12101 * src/gram.c (rprec, rprecsym, rassoc): Remove, unused since long
12102 ago.
12103
12104 2001-12-29 Akim Demaille <akim@epita.fr>
12105
12106 * src/reader.c, src/reader.h (user_toknums): Remove.
12107 Adjust all users to use symbols[i]->user_token_number.
12108
12109 2001-12-29 Akim Demaille <akim@epita.fr>
12110
12111 * src/gram.c, src/gram.h (sprec, sassoc): Remove.
12112 Adjust all users to use symbols[i]->prec or ->assoc.
12113
12114 2001-12-29 Akim Demaille <akim@epita.fr>
12115
12116 * src/reader.c, src/reader.h (tags): Remove.
12117 Adjust all users to use symbols[i]->tag.
12118
12119 2001-12-29 Akim Demaille <akim@epita.fr>
12120
12121 * src/gram.h, src/gram.c (symbols): New, similar to state_table
12122 and rule_table.
12123 * src/reader.c (packsymbols): Fill this table.
12124 Drop sprec.
12125 * src/conflicts.c (resolve_sr_conflict): Adjust.
12126 * src/reduce.c (reduce_grammar): Adjust: just sort symbols, a
12127 single table.
12128 Use symbols[i]->tag instead of tags[i].
12129
12130 2001-12-29 Akim Demaille <akim@epita.fr>
12131
12132 * tests/calc.at (_AT_DATA_CALC_Y): Also use %union.
12133 In addition, put a comment in there, to replace...
12134 * tests/regression.at (%union and C comments): Remove.
12135
12136 2001-12-29 Akim Demaille <akim@epita.fr>
12137
12138 * tests/regression.at (Web2c Actions): Blindly move the actual
12139 output as expected output. The contents *seem* right to me, but I
12140 can't pretend reading perfectly parser tables... Nonetheless, all
12141 the other tests pass correctly, the table look OK, even though the
12142 presence of `$axiom' is to be noted: AFAICS it is useless (but
12143 harmless).
12144
12145 2001-12-29 Akim Demaille <akim@epita.fr>
12146
12147 * src/reader.c (readgram): Don't add the rule 0 if there were no
12148 rules read. In other words, add it _after_ having performed
12149 grammar sanity checks.
12150 Fixes the `tests/regression.at (Invalid input: 1)' Failure.
12151
12152 2001-12-29 Akim Demaille <akim@epita.fr>
12153
12154 * tests/regression.at (Web2c Report): Catch up: the rule 0 is now
12155 visible, and some states have now a different number.
12156
12157 2001-12-29 Akim Demaille <akim@epita.fr>
12158
12159 * src/reader.c (readgram): Bind the initial rule's lineno to that
12160 of the first rule.
12161 * tests/regression.at (Rule Line Numbers, Unresolved SR Conflicts):
12162 (Solved SR Conflicts): Adjust rule 0's line number.
12163
12164 2001-12-29 Akim Demaille <akim@epita.fr>
12165
12166 Fix the `GAWK Grammar' failure.
12167
12168 * src/LR0.c (final_state): Initialize to -1 so that we do compute
12169 the reductions of the first state which was mistakenly confused
12170 with the final state because precisely final_state was initialized
12171 to 0.
12172 * tests/sets.at (Nullable): Adjust: state 0 does have lookaheads,
12173 now noticed by Bison.
12174 * tests/regression.at (Rule Line Numbers): Adjust: state 0 does
12175 have a reduction on $default.
12176
12177 2001-12-29 Akim Demaille <akim@epita.fr>
12178
12179 * src/gram.c (ritem_print): Be sure to subtract 1 when displaying
12180 rule line numbers.
12181 * src/closure.c (print_closure): Likewise.
12182 * src/derives.c (print_derives): Likewise.
12183 * tests/sets.at (Nullable): Adjust: the rule numbers are correct
12184 now.
12185
12186 2001-12-29 Akim Demaille <akim@epita.fr>
12187
12188 * src/lalr.c (lookaheads_print): New.
12189 (lalr): Call it when --trace-flag.
12190 * tests/sets.at (Nullable): Adjust: when tracing, the lookaheads
12191 are dumped.
12192
12193 2001-12-29 Akim Demaille <akim@epita.fr>
12194
12195 * src/derives.c (print_derives): Be sure to use `>= 0', not `> 0',
12196 when walking through ritem, even via rule->rhs.
12197 * src/reduce.c (dump_grammar, useful_production, reduce_output)
12198 (useful_production, useless_nonterminals): Likewise.
12199 (reduce_grammar_tables): Likewise, plus update nritems.
12200 * src/nullable.c (set_nullable): Likewise.
12201 * src/lalr.c (build_relations): Likewise.
12202 * tests/sets.at (Nullable): Adjust.
12203 Fortunately, now, the $axiom is no longer nullable.
12204
12205 2001-12-29 Akim Demaille <akim@epita.fr>
12206
12207 * src/LR0.c (generate_states): Use nritems, not nitems, nor using
12208 the 0-sentinel.
12209 * src/gram.c (ritem_longest_rhs): Likewise.
12210 * src/reduce.c (nonterminals_reduce): Likewise.
12211 * src/print_graph.c (print_graph): Likewise.
12212 * src/output.c (output_rule_data): Likewise.
12213 * src/nullable.c (set_nullable): Likewise.
12214
12215 2001-12-29 Akim Demaille <akim@epita.fr>
12216
12217 * src/output.c: Comment changes.
12218
12219 2001-12-27 Paul Eggert <eggert@twinsun.com>
12220
12221 * src/bison.simple (YYSTACK_ALLOC, YYSIZE_T): Remove special
12222 cases for non-GNU systems like AIX, HP-UX, SGI, Sun, and
12223 Sparc, as they were causing more porting problems than the
12224 (minor) performance improvement was worth.
12225
12226 Also, catch up with 1.31's YYSTD.
12227
12228 2001-12-27 Akim Demaille <akim@epita.fr>
12229
12230 * src/output.c (output_gram): Rely on nritems, not the
12231 0-sentinel. See below.
12232 Use -1 as separator, not 0.
12233 * src/bison.simple (yyparse): Subtract 1 to the rule numbers.
12234 Rely on -1 as separator in yyrhs, instead of 0.
12235 * tests/calc.at (AT_CHECK_CALC): Now, the parsers no longer issue
12236 twice `Now at end of input', therefore there are two lines less to
12237 expect.
12238
12239 2001-12-27 Akim Demaille <akim@epita.fr>
12240
12241 * tests/regression.at (Unresolved SR Conflicts):
12242 (Solved SR Conflicts, Rule Line Numbers): Adjust to the changes
12243 below.
12244
12245 2001-12-27 Akim Demaille <akim@epita.fr>
12246
12247 * src/LR0.c (new_state): Recognize the final state by the fact it
12248 is reached by eoftoken.
12249 (insert_start_shifting_state, insert_eof_shifting_state)
12250 (insert_accepting_state, augment_automaton): Remove, since now
12251 these states are automatically computed from the initial state.
12252 (generate_states): Adjust.
12253 * src/print.c: When reporting a rule number to the user, substract
12254 1, so that the axiom rule is rule 0, and the first user rule is 1.
12255 * src/reduce.c: Likewise.
12256 * src/print_graph.c (print_core): For the time being, just as for
12257 the report, depend upon --trace-flags to dump the full set of
12258 items.
12259 * src/reader.c (readgram): Once the grammar read, insert the rule
12260 0: `$axiom: START-SYMBOL $'.
12261 * tests/set.at: Adjust: rule 0 is now displayed, and since the
12262 number of the states has changed (the final state is no longer
12263 necessarily the last), catch up.
12264
12265 2001-12-27 Akim Demaille <akim@epita.fr>
12266
12267 Try to make the use of the eoftoken valid. Given that its value
12268 is 0 which was also used as a sentinel in ritem, (i) make sure >= 0
12269 is used instead of > 0 where appropriate, (ii), depend upon nritems
12270 instead of the 0-sentinel.
12271
12272 * src/gram.h, src/gram.c (nritems): New.
12273 Expected to be duplication of nitems, but for the time being...
12274 * src/reader.c (packgram): Assert nritems and nitems are equal.
12275 * src/LR0.c (allocate_itemsets, new_itemsets): Adjust.
12276 * src/closure.c (print_closure, print_fderives): Likewise.
12277 * src/gram.c (ritem_print): Likewise.
12278 * src/print.c (print_core, print_grammar): Likewise.
12279 * src/print_graph.c: Likewise.
12280
12281 2001-12-27 Akim Demaille <akim@epita.fr>
12282
12283 * src/main.c (main): If there are complains after grammar
12284 reductions, then output the report anyway if requested, then die.
12285 * src/symtab.c (bucket_new): Initialize `value' to -1, not 0.
12286 * src/reader.c (eoftoken): New.
12287 (parse_token_decl): If the token being defined has value `0', it
12288 is the eoftoken.
12289 (packsymbols): No longer hack `tags' to insert `$' by hand.
12290 Be sure to preserve the value of the eoftoken.
12291 (reader): Make sure eoftoken is defined.
12292 Initialize nsyms to 0: now eoftoken is created just like the others.
12293 * src/print.c (print_grammar): Don't special case the eof token.
12294 * src/regression.at: Adjust: `$' has value 0, not -1, which was a
12295 lie anyway, albeit pleasant.
12296 * tests/calc.at: Exercise error messages with eoftoken.
12297 Change the grammar so that empty input is invalid.
12298 Adjust expectations.
12299 When yyungeting, be sure to use a valid yylloc: use last_yylloc.
12300
12301 2001-12-27 Akim Demaille <akim@epita.fr>
12302
12303 * configure.in: Check the protos of strchr ans strspn.
12304 Replace strchr if needed.
12305 * src/system.h: Provide the protos of strchr, strspn and memchr if
12306 missing.
12307 * lib/strchr.c: New.
12308 * src/reader.c (symbols_save): Use strchr.
12309
12310 2001-12-27 Akim Demaille <akim@epita.fr>
12311
12312 * src/print.c, src/print_graph.c (escape): New.
12313 Use it to quote the TAGS outputs.
12314 * src/print_graph.c (print_state): Now errors are in red, and
12315 reductions in green.
12316 Prefer high to wide: output the state number on a line of its own.
12317
12318 2001-12-27 Akim Demaille <akim@epita.fr>
12319
12320 * src/state.h, src/state.c (reductions_new): New.
12321 * src/LR0.c (set_state_table): Let all the states have a
12322 `reductions', even if reduced to 0.
12323 (save_reductions): Adjust.
12324 * src/lalr.c (initialize_LA, initialize_lookaheads): Adjust.
12325 * src/print.c (print_reductions, print_actions): Adjust.
12326 * src/output.c (action_row): Adjust.
12327
12328 2001-12-27 Akim Demaille <akim@epita.fr>
12329
12330 * src/state.h, src/state.c (errs_new, errs_dup): New.
12331 * src/LR0.c (set_state_table): Let all the states have an errs,
12332 even if reduced to 0.
12333 * src/print.c (print_errs, print_reductions): Adjust.
12334 * src/output.c (output_actions, action_row): Adjust.
12335 * src/conflicts.c (resolve_sr_conflict): Adjust.
12336
12337 2001-12-27 Akim Demaille <akim@epita.fr>
12338
12339 * src/lalr.c (set_goto_map, initialize_F): Use SHIFT_SYMBOL.
12340
12341 2001-12-27 Akim Demaille <akim@epita.fr>
12342
12343 * src/conflicts.c, src/conflicts.h (print_reductions): Move to...
12344 * src/print.c: here.
12345 (lookaheadset, shiftset): New, used as additional storage by
12346 print_reductions.
12347 (print_results): Adjust.
12348 (print_shifts, print_gotos, print_errs): New, extracted from...
12349 (print_actions): here.
12350 * src/print_graph.c (print_actions): Remove dead code.
12351
12352 2001-12-27 Akim Demaille <akim@epita.fr>
12353
12354 * src/reader.c (copy_dollar, copy_at): Better checking of `n' in
12355 `$n' and `@n'.
12356
12357 2001-12-27 Akim Demaille <akim@epita.fr>
12358
12359 * src/lalr.c (add_lookback_edge): Use state_t instead of ints.
12360 (build_relations): Adjust.
12361
12362 2001-12-27 Akim Demaille <akim@epita.fr>
12363
12364 * src/lalr.c (set_goto_map): Remove a wrong but benign loop
12365 duplication.
12366
12367 2001-12-27 Akim Demaille <akim@epita.fr>
12368
12369 * src/reader.c (packgram): Catch nitems overflows.
12370
12371 2001-12-27 Akim Demaille <akim@epita.fr>
12372
12373 * src/files.c, src/files.h (guard_obstack): Remove.
12374 * src/output.c (output): Adjust.
12375 * src/reader.c (parse_braces): New, factoring...
12376 (copy_action, copy_guard): these two which are renamed as...
12377 (parse_action, parse_guard): these.
12378 As a voluntary consequence, using braces around guards is now
12379 mandatory.
12380
12381 2001-12-27 Akim Demaille <akim@epita.fr>
12382
12383 * src/gram.h (rule_t): `guard' and `guard_line' are new members.
12384 * src/reader.c (symbol_list): `guard' and `guard_line' are new
12385 members.
12386 (symbol_list_new): Adjust.
12387 (copy_action): action_line is the first line, not the last.
12388 (copy_guard): Just as for actions, store the `action' only, not
12389 the switch/case/break flesh.
12390 Don't parse the user action that might follow the guard, let...
12391 (readgram): do it, i.e., now, there can be an action after a
12392 guard.
12393 In other words the guard is just explicitly optional.
12394 (packgram): Adjust.
12395 * src/output.c (guards_output): New.
12396 (output_parser): Call it when needed.
12397 (output): Also free the guard and attrs obstacks.
12398 * src/files.c, src/files.h (obstack_save): Remove.
12399 (output_files): Remove.
12400 As a result, if one needs the former `.act' file, using an
12401 appropriate skeleton which requires actions and guards is now
12402 required.
12403 * src/main.c (main): Adjust.
12404 * tests/semantic.at: New.
12405 * tests/regression.at: Use `input.y' as input file name.
12406 Avoid 8+3 problems by requiring input.c when the test needs the
12407 parser.
12408
12409 2001-12-27 Akim Demaille <akim@epita.fr>
12410
12411 * src/reader.c (symbol_list_new): Be sure to initialize all the
12412 fields.
12413
12414 2001-12-27 Akim Demaille <akim@epita.fr>
12415
12416 All the hacks using a final pseudo state are now useless.
12417
12418 * src/LR0.c (set_state_table): state_table holds exactly nstates.
12419 * src/lalr.c (nLA): New.
12420 (initialize_LA, compute_lookaheads, initialize_lookaheads): Use it
12421 instead of lookaheadsp from the pseudo state (nstate + 1).
12422
12423 2001-12-27 Akim Demaille <akim@epita.fr>
12424
12425 * src/output.c (action_row, token_actions): Use a state_t instead
12426 of a integer, and nlookaheads instead of the following state's
12427 lookaheadsp.
12428
12429 2001-12-27 Akim Demaille <akim@epita.fr>
12430
12431 * src/conflicts.c (log_resolution, flush_shift)
12432 (resolve_sr_conflict, set_conflicts, solve_conflicts)
12433 (count_sr_conflicts, count_rr_conflicts, conflicts_output)
12434 (conflicts_print, print_reductions): Use a state_t instead of an
12435 integer when referring to a state.
12436 As much as possible, depend upon nlookaheads, instead of the
12437 `lookaheadsp' member of the following state (since lookaheads of
12438 successive states are successive, the difference between state n + 1
12439 and n served as the number of lookaheads for state n).
12440 * src/lalr.c (add_lookback_edge): Likewise.
12441 * src/print.c (print_core, print_actions, print_state)
12442 (print_results): Likewise.
12443 * src/print_graph.c (print_core, print_actions, print_state)
12444 (print_graph): Likewise.
12445 * src/conflicts.h: Adjust.
12446
12447 2001-12-27 Akim Demaille <akim@epita.fr>
12448
12449 * src/bison.hairy: Formatting/comment changes.
12450 ANSIfy.
12451 Remove `register' indications.
12452 Add plenty of `static'.
12453
12454 2001-12-27 Akim Demaille <akim@epita.fr>
12455
12456 * src/output.c (prepare): Drop the muscle `ntbase' which
12457 duplicates ntokens.
12458 * src/bison.simple: Formatting/comment changes.
12459 Use YYNTOKENS only, which is documented, but not YYNTBASE, which
12460 is an undocumented synonym.
12461
12462 2001-12-22 Akim Demaille <akim@epita.fr>
12463
12464 * src/output.c (output_table_data): Change the prototype to use
12465 `int' for array ranges: some invocations do pass an int, not a
12466 short.
12467 Reported by Wayne Green.
12468
12469 2001-12-22 Akim Demaille <akim@epita.fr>
12470
12471 Some actions of web2c.y are improperly triggered.
12472 Reported by Mike Castle.
12473
12474 * src/lalr.c (traverse): s/F (i)[k] = F (j)[k]/F (j)[k] = F (i)[k]/.
12475 * tests/regression.at (Web2c): Rename as...
12476 (Web2c Report): this.
12477 (Web2c Actions): New.
12478
12479 2001-12-22 Akim Demaille <akim@epita.fr>
12480
12481 Reductions in web2c.y are improperly reported.
12482 Reported by Mike Castle.
12483
12484 * src/conflicts.c (print_reductions): Fix.
12485 * tests/regression.at (Web2c): New.
12486
12487 2001-12-18 Akim Demaille <akim@epita.fr>
12488
12489 Some host fail on `assert (!"foo")', which expands to
12490 ((!"foo") ? (void)0 : __assert("!"foo."", __FILE__, __LINE__))
12491 Reported by Nelson Beebee.
12492
12493 * src/output.c, src/vcg.c: Replace `assert (!"it succeeded")' with
12494 `#define it_succeeded 0' and `assert (it_succeeded)'.
12495
12496 2001-12-17 Marc Autret <autret_m@epita.fr>
12497
12498 * src/bison.simple: Don't hard code the skeleton line and filename.
12499 * src/output.c (output_parser): Rename 'line' as 'output_line'.
12500 New line counter 'skeleton_line' (skeleton-line muscle).
12501
12502 2001-12-17 Paul Eggert <eggert@twinsun.com>
12503
12504 * NEWS, doc/bison.texinfo, doc/bison.1, doc/bison.rnh: Document that
12505 YYDEBUG must be defined to a nonzero value.
12506
12507 * src/bison.simple (yytname): Do not assume that the user defines
12508 YYDEBUG to a properly parenthesized expression.
12509
12510 2001-12-17 Akim Demaille <akim@epita.fr>
12511
12512 * src/state.h (state_t): Rename lookaheads as lookaheadsp.
12513 nlookaheads is a new member.
12514 Adjust all users.
12515 * src/lalr.h (nlookaheads): Remove this orphan declaration.
12516 * src/lalr.c (initialize_lookaheads): Set nlookaheads for each
12517 state.
12518
12519 2001-12-17 Akim Demaille <akim@epita.fr>
12520
12521 * src/files.h, src/files.c (open_files, close_files): Remove.
12522 * src/main.c (main): Don't open/close files, nor invoke lex_free,
12523 let...
12524 * src/reader.c (reader): Do it.
12525
12526 2001-12-17 Akim Demaille <akim@epita.fr>
12527
12528 * src/conflicts.c (print_reductions): Formatting changes.
12529
12530 2001-12-17 Akim Demaille <akim@epita.fr>
12531
12532 * src/conflicts.c (flush_shift): Also adjust lookaheadset.
12533 (flush_reduce): New.
12534 (resolve_sr_conflict): Adjust.
12535
12536 2001-12-17 Akim Demaille <akim@epita.fr>
12537
12538 * src/output.c (output_obstack): Be static and rename as...
12539 (format_obstack): this, to avoid any confusion with files.c's
12540 output_obstack.
12541 * src/reader.h (muscle_obstack): Move to...
12542 * src/output.h: here, since it's defined in output.c.
12543
12544 2001-12-17 Akim Demaille <akim@epita.fr>
12545
12546 * src/output.c (action_row, save_column, default_goto)
12547 (sort_actions, matching_state, pack_vector): Better variable
12548 locality.
12549
12550 2001-12-17 Akim Demaille <akim@epita.fr>
12551
12552 * src/output.c: Various formatting changes.
12553
12554 2001-12-17 Akim Demaille <akim@epita.fr>
12555
12556 * src/files.c (output_files): Free the output_obstack.
12557 * src/main.c (main): Call print and print_graph conditionally.
12558 * src/print.c (print): Work unconditionally.
12559 * src/print_graph.c (print_graph): Work unconditionally.
12560 * src/conflicts.c (log_resolution): Output only if verbose_flag.
12561
12562 2001-12-16 Marc Autret <autret_m@epita.fr>
12563
12564 * src/output.c (actions_output): Fix. When we use %no-lines,
12565 there is one less line per action.
12566
12567 2001-12-16 Marc Autret <autret_m@epita.fr>
12568
12569 * src/bison.simple: Remove a useless #line directive.
12570 s/#line %%line %%skeleton/#line %%line "%%parser-file-name"/'.
12571 * src/output.c (get_lines_number): New.
12572 (output_parser): Adjust, now takes care about the lines of a
12573 output muscles.
12574 Fix line numbering.
12575 (actions_output): Computes the number of lines taken by actions.
12576 (output_master_parser): Insert new skeleton which is the name of
12577 the output parser file name.
12578
12579 2001-12-15 Marc Autret <autret_m@epita.fr>
12580
12581 * src/bison.simple [YYERROR_VERBOSE]: Restore backward compatibility.
12582
12583 2001-12-15 Marc Autret <autret_m@epita.fr>
12584
12585 * src/output.c (output_gram): Keep track of the hairy one.
12586
12587 2001-12-15 Akim Demaille <akim@epita.fr>
12588
12589 Make `make distcheck' work.
12590
12591 * lib/Makefile.am (INCLUDES): Add top_srcdir/intl, since hash uses
12592 system.h which uses libgettext.h.
12593
12594 2001-12-15 Akim Demaille <akim@epita.fr>
12595
12596 * src/nullable.c (set_nullable): Useless rules must be skipped,
12597 otherwise, since we range over their symbols, we might look at a
12598 nonterminal which no longer ``exists'', i.e., it is not counted in
12599 `nvars', hence we overflow our arrays.
12600
12601 2001-12-15 Akim Demaille <akim@epita.fr>
12602
12603 The header can also be produced directly, without any obstack!
12604 Yahoo!
12605
12606 * src/files.c, src/files.h (defines_obstack): Remove.
12607 (compute_header_macro): Global.
12608 (defines_obstack_save): Remove.
12609 * src/reader.c (parse_union_decl): No longer output to
12610 defines_obstack: its content can be found in the `stype' muscle
12611 anyway.
12612 (output_token_translations): Merge into...
12613 (symbols_output): this.
12614 Rename as...
12615 (symbols_save): this.
12616 (reader): Adjust.
12617 * src/output.c (header_output): New.
12618 (output): Call it.
12619
12620 2001-12-15 Akim Demaille <akim@epita.fr>
12621
12622 * src/reader.c (parse_union_decl): Instead of handling two obstack
12623 simultaneously, use one to define the `stype' muscle, and use the
12624 value of the latter to fill defines_obstack.
12625 (copy_comment): Remove.
12626 (copy_comment2): Work for a single obstack.
12627 Rename as...
12628 (copy_comment): this.
12629
12630 2001-12-15 Akim Demaille <akim@epita.fr>
12631
12632 * src/lex.c, src/lex.h (xgetc): No longer static.
12633 * src/reader.c (parse_union_decl): Revamp.
12634
12635 2001-12-15 Akim Demaille <akim@epita.fr>
12636
12637 Still making progress in separating Bison into (i) input, (ii)
12638 process, (iii) output: now we can directly output the parser file
12639 without using table_obstack at all.
12640
12641 * src/files.c, src/files.h (table_obstack): Bye bye.
12642 (parser_file_name): New.
12643 * src/files.c (compute_output_file_names): Compute it.
12644 * src/output.c (actions_output, output_parser)
12645 (output_master_parser): To a file instead of an obstack.
12646
12647 2001-12-15 Akim Demaille <akim@epita.fr>
12648
12649 Attach actions to rules, instead of pre-outputting them to
12650 actions_obstack.
12651
12652 * src/gram.h (rule_t): action and action_line are new members.
12653 * src/reader.c (symbol_list): Likewise.
12654 (copy_action): Save the actions within the rule.
12655 (packgram): Save them in rule_table.
12656 * src/output.c (actions_output): New.
12657 (output_parser): Use it on `%%actions'.
12658 (output_rule_data): Don't free rule_table.
12659 (output): Do it.
12660 (prepare): Don't save the `action' muscle.
12661 * src/bison.simple: s/%%action/%%actions/.
12662
12663 2001-12-15 Akim Demaille <akim@epita.fr>
12664
12665 * src/reader.c (copy_action): When --yacc, don't append a `;'
12666 to the user action: let it fail if lacking.
12667 Suggested by Arnold Robbins and Tom Tromey.
12668
12669 2001-12-14 Akim Demaille <akim@epita.fr>
12670
12671 * src/lex.c (literalchar): Simply return the char you decoded, non
12672 longer mess around with obstacks and int pointers.
12673 Adjust all callers.
12674
12675 2001-12-14 Akim Demaille <akim@epita.fr>
12676
12677 * src/lex.c (literalchar): Don't escape the special characters,
12678 just decode them, and keep them as char (before, eol was output as
12679 the 2 char string `\n' etc.).
12680 * src/output.c (output_rule_data): Use quotearg to output the
12681 token strings.
12682
12683 2001-12-13 Paul Eggert <eggert@twinsun.com>
12684
12685 * src/bison.simple (YYSIZE_T, YYSTACK_ALLOC, YYSTACK_FREE):
12686 Do not infringe on the global user namespace when using C++.
12687 (YYFPRINTF, YYSTDERR): New macros, needed for the above.
12688 All uses of `fprintf' and `stderr' changed.
12689
12690 * doc/bison.texinfo: Document YYFPRINTF, YYSTDERR.
12691
12692 2001-12-13 Akim Demaille <akim@epita.fr>
12693
12694 The computation of nullable is broken: it doesn't handle empty
12695 RHS's properly.
12696
12697 * tests/torture.at (GNU AWK Grammar): New.
12698 * tests/sets.at (Nullable): New.
12699 * src/nullable.c (set_nullable): Instead of blindly looping over
12700 `ritems', loop over the rules, and then over their rhs's.
12701
12702 Work around Autotest bugs.
12703
12704 * src/warshall.c (bitmatrix_print): Don't use `+--+' as table
12705 frame, because Autotest understand lines starting with a `+' as
12706 traces from the shell. Then, they are not processed properly.
12707 Admittedly an Autotest bug, but we don't have time to wait for
12708 Autotest to catch up.
12709 * tests/regression.at (Broken Closure): Adjust to the new table
12710 frames.
12711 Move to...
12712 * tests/sets.at: here.
12713
12714 2001-12-13 Akim Demaille <akim@epita.fr>
12715
12716 * src/closure.c (closure): Use nrules instead of playing tricks
12717 with BITS_PER_WORD.
12718
12719 2001-12-13 Akim Demaille <akim@epita.fr>
12720
12721 * src/print.c (print_actions): Output the handling of `$' as the
12722 traces do: shifting the token EOF. Before EOF was treated as a
12723 nonterminal.
12724 * tests/regression.at: Adjust some tests.
12725 * src/print_graph.c (print_core): Complete the set of items via
12726 closure. The next-to-final and final states are still unsatisfying,
12727 but that's to be addressed elsewhere.
12728 No longer output the rule numbers, but do output the state number.
12729 A single loop for the shifts + gotos is enough, but picked a
12730 distinct color for each.
12731 (print_graph): Initialize and finalize closure.
12732
12733 2001-12-13 Akim Demaille <akim@epita.fr>
12734
12735 * src/reader.c (readgram): Remove dead code, an strip useless
12736 braces.
12737 (get_type): Remove, unused.
12738
12739 2001-12-12 Akim Demaille <akim@epita.fr>
12740
12741 * src/complain.h, src/complain.c: Remove error_one_per_line, rely
12742 on that of lib/error.c.
12743
12744 2001-12-12 Akim Demaille <akim@epita.fr>
12745
12746 Some hosts don't like `/' in includes.
12747
12748 * src/system.h: Include libgettext.h without qualifying the path.
12749 * src/Makefile.am (INCLUDES): Add $(top_srcdir)/intl, remove
12750 $(top_srcdir).
12751
12752 2001-12-11 Marc Autret <autret_m@epita.fr>
12753
12754 * src/output.c (output_parser): Remove useless muscle.
12755
12756 2001-12-11 Marc Autret <autret_m@epita.fr>
12757
12758 * src/bison.simple: Remove #line just before %%epilogue. It
12759 is now handled in ...
12760 * src/reader.c (read_additionnal_code): Add the output of a
12761 #line for the epilogue.
12762
12763 2001-12-10 Marc Autret <autret_m@epita.fr>
12764
12765 * src/reader.c (copy_definition): Re-use CPP-outed code which
12766 replace precedent remove.
12767 * src/bison.simple: Remove #line before %%prologue because
12768 %%input-line is wrong at this time.
12769
12770 2001-12-10 Marc Autret <autret_m@epita.fr>
12771
12772 * src/reader.c (symbols_output): Clean up.
12773 * src/output.c (output_gram, output): Clean up.
12774
12775 2001-12-10 Akim Demaille <akim@epita.fr>
12776
12777 * src/lalr.c (initialize_lookaheads): New. Extracted from...
12778 * src/LR0.c (set_state_table): here.
12779 * src/lalr.c (lalr): Call it.
12780
12781 2001-12-10 Akim Demaille <akim@epita.fr>
12782
12783 * src/state.h (shifts): Remove the `number' member: shifts are
12784 attached to state, hence no longer need to be labelled with a
12785 state number.
12786
12787 2001-12-10 Akim Demaille <akim@epita.fr>
12788
12789 Now that states have a complete set of members, the linked list of
12790 shifts is useless: just fill directly the state's shifts member.
12791
12792 * src/state.h (shifts): Remove the `next' member.
12793 * src/LR0.c (first_state, last_state): Remove.
12794 Adjust the callers.
12795 (augment_automaton): Don't look for the shifts that must be added
12796 a shift on EOF: it is those of the state we looked for! But now,
12797 since shifts are attached, it is no longer needed to looking
12798 merely by its id: its number.
12799
12800 2001-12-10 Akim Demaille <akim@epita.fr>
12801
12802 * src/LR0.c (augment_automaton): Better variable locality.
12803 Remove an impossible branch: if there is a state corresponding to
12804 the start symbol being shifted, then there is shift for the start
12805 symbol from the initial state.
12806
12807 2001-12-10 Akim Demaille <akim@epita.fr>
12808
12809 * src/LR0.c (augment_automaton): Call `insert_eof_shifting_state'
12810 only when appropriate: when insert_start_shifting_state' is not
12811 invoked.
12812 * tests/regression.at (Rule Line Numbers): Adjust.
12813
12814 2001-12-10 Akim Demaille <akim@epita.fr>
12815
12816 * src/LR0.c (augment_automaton): Now that all states have shifts,
12817 merge the two cases addition shifts to the initial state.
12818
12819 2001-12-10 Akim Demaille <akim@epita.fr>
12820
12821 * src/lalr.c (set_state_table): Move to...
12822 * src/LR0.c: here.
12823 * src/lalr.c (lalr): Don't call it...
12824 * src/LR0.c (generate_states): do it.
12825 * src/LR0.h (first_state): Remove, only the table is used.
12826
12827 2001-12-10 Akim Demaille <akim@epita.fr>
12828
12829 * src/LR0.h (first_shift, first_reduction): Remove.
12830 * src/lalr.c: Don't use first_shift: find shifts through the
12831 states.
12832
12833 2001-12-10 Akim Demaille <akim@epita.fr>
12834
12835 * src/LR0.c: Attach shifts to states as soon as they are
12836 computed.
12837 * src/lalr.c (set_state_table): Instead of assigning shifts to
12838 state, just assert that the mapping was properly done.
12839
12840 2001-12-10 Akim Demaille <akim@epita.fr>
12841
12842 * src/LR0.c (insert_start_shift): Rename as...
12843 (insert_start_shifting_state): this.
12844 (insert_eof_shifting_state, insert_accepting_state): New.
12845 (augment_automaton): Adjust.
12846 Better locality of the variables.
12847 When looking if the start_symbol is shifted from the initial
12848 state, using `while (... symbol != start_symbol ...)' sounds
12849 better than `while (... symbol < start_symbol ...)': If fail
12850 to see how the order between symbols could be relevant!
12851
12852 2001-12-10 Akim Demaille <akim@epita.fr>
12853
12854 * src/getargs.h: Don't declare `spec_name_prefix' and
12855 `spec_file_prefix', declared by src/files.h.
12856 * src/files.c, src/files.h: Default for spec_name_prefix is "yy".
12857 * src/muscle_tab.c (muscle_init): Default prefix to NULL.
12858 * src/output.c (prepare): Adjust.
12859 * src/reader.c (symbols_output): Likewise.
12860 * src/vmsgetargs.c: Vaguely adjust, but who cares?
12861
12862 2001-12-10 Akim Demaille <akim@epita.fr>
12863
12864 * src/muscle_tab.c (muscle_init): NULL is a better default than
12865 `"0"'.
12866
12867 2001-12-10 Akim Demaille <akim@epita.fr>
12868
12869 * src/reader.c (reader): Calling symbols_output once is enough.
12870
12871 2001-12-10 Akim Demaille <akim@epita.fr>
12872
12873 Now that states have a complete set of members, the linked list of
12874 reductions is useless: just fill directly the state's reductions
12875 member.
12876
12877 * src/state.h (struct reductions): Remove member `number' and
12878 `next'.
12879 * src/LR0.c (first_reduction, last_reduction): Remove.
12880 (save_reductions): Don't link the new reductions, store them in
12881 this_state.
12882 * src/lalr.c (set_state_table): No need to attach reductions to
12883 states, it's already done.
12884 * src/output.c (output_actions): No longer free the shifts, then
12885 the reductions, then the states: free all the states and their
12886 members.
12887
12888 2001-12-10 Akim Demaille <akim@epita.fr>
12889
12890 * src/options.c (OPTN, DRTV, BOTH): New.
12891 (option_table): Use them.
12892
12893 * src/muscle_tab.c: Don't include xalloc.h and string.h: that's
12894 the job of system.h.
12895 * src/options.c: Don't include stdio.h and xalloc.h for the same
12896 reasons.
12897
12898 2001-12-10 Akim Demaille <akim@epita.fr>
12899
12900 * src/output.c (output, prepare): Make sure the values of the
12901 muscles `action' and `prologue' are 0-terminated.
12902
12903 2001-12-10 Akim Demaille <akim@epita.fr>
12904
12905 Clean up GCC warnings.
12906
12907 * src/reader.c (copy_action): `buf' is not used.
12908 (parse_skel_decl): Be static.
12909 * src/muscle_tab.c (mhash1, mhash2, muscle_insert): Preserve `const'.
12910 * src/options.h (create_long_option_table): Have a real prototype.
12911 * lib/hash.c, lib/hash.h (hash_insert, hash_insert_at, hash_delete)
12912 (hash_delete_at): Return const void *.
12913 Adjust casts to preserve the const.
12914
12915 2001-12-10 Akim Demaille <akim@epita.fr>
12916
12917 * configure.in: Require 2.52g.
12918 M4 is not needed, but AUTOM4TE is.
12919 * m4/m4.m4: Remove.
12920 * tests/Makefile.am: Adjust.
12921
12922 2001-12-10 Akim Demaille <akim@epita.fr>
12923
12924 One structure for states is enough, even though theoretically
12925 there are LR(0) states and LALR(1) states.
12926
12927 * src/lalr.h (state_t): Remove.
12928 (state_table): Be state_t **, not state_t *.
12929 * src/state.h (core, CORE_ALLOC): Rename as...
12930 (state_t, STATE_ALLOC): this.
12931 Add the LALR(1) members: shifts, reductions, errs.
12932 * src/LR0.c (state_table): Rename as...
12933 (state_hash): this, to avoid name clashes with the global
12934 `state_table'.
12935 * src/print_graph.c, src/LR0.c, src/LR0.h, src/conflicts.c
12936 * src/lalr.c, src/lalr.h, src/output.c, src/print.c: Adjust.
12937
12938 2001-12-10 Akim Demaille <akim@epita.fr>
12939
12940 Bison dumps core on bash.y.
12941 Reported by Pascal Bart.
12942
12943 * src/warshall.c (bitmatrix_print): New.
12944 (TC): Use it.
12945 When performing a transitive closure R(i, j) && R(j, k) => R(i, k),
12946 j must be the outer loop.
12947 * tests/regression.at (Broken Closure): New.
12948
12949 2001-12-05 Akim Demaille <akim@epita.fr>
12950
12951 * tests/atlocal.in (CPPFLAGS): Do not leave a space between -I and
12952 its argument.
12953 Reported by Peter Hamorsky.
12954
12955 2001-12-05 Akim Demaille <akim@epita.fr>
12956
12957 * src/conflicts.c (err_table): Remove.
12958 (resolve_sr_conflict): Adjust.
12959 * src/lalr.h (state_t.reduction_table, state_t.shift_table):
12960 Rename as...
12961 (state_t.reductions, state_t.shifts): this.
12962
12963 2001-12-05 Akim Demaille <akim@epita.fr>
12964
12965 * src/reduce.c (reduce_grammar_tables): No longer disable the
12966 removal of useless rules via CPP but via `if (0)', so that the
12967 compiler still check the code is valid.
12968 For instance, it should have noticed `rline' no longer exists: use
12969 the `line' member of rule_t.
12970 * src/gram.c (dummy, rline): Remove, unused.
12971
12972 2001-12-05 Akim Demaille <akim@epita.fr>
12973
12974 * src/output.c (pack_vector): Use assert, not berror.
12975 * src/main.c (berror): Remove, unused.
12976
12977 2001-12-05 Akim Demaille <akim@epita.fr>
12978
12979 New experimental feature: if --verbose --trace output all the
12980 items of a state, not only its kernel.
12981
12982 * src/print.c (print_core): If `trace_flag', then invoke closure
12983 before outputting the items of the state (print_core is no longer
12984 a correct name them).
12985 (print_results): Invoke new_closure/free_closure if needed.
12986
12987 2001-12-05 Akim Demaille <akim@epita.fr>
12988
12989 * src/LR0.c (new_itemsets): Use nshifts only, not shiftcount.
12990 * src/closure.c, src/closure.h (itemsetsize): Rename as...
12991 (nitemset): for consistency with the rest of the project.
12992
12993 2001-12-05 Akim Demaille <akim@epita.fr>
12994
12995 * src/closure.c (print_closure): Improve.
12996 (closure): Use it for printing input and output.
12997
12998 2001-12-05 Akim Demaille <akim@epita.fr>
12999
13000 * src/closure.c (FIRSTS, FDERIVES): Adjust to reality: they are
13001 indexed by nonterminals.
13002
13003 2001-12-05 Akim Demaille <akim@epita.fr>
13004
13005 * src/warshall.c (TC, RTC): De-obsfucate (source reduced to 22% of
13006 what it was!).
13007 * src/warshall.h: Remove accidental duplication of the content.
13008
13009 2001-12-05 Akim Demaille <akim@epita.fr>
13010
13011 * src/closure.c (set_fderives): De-obfuscate.
13012
13013 2001-12-05 Akim Demaille <akim@epita.fr>
13014
13015 * src/closure.c (print_firsts, print_fderives): De-obfuscate.
13016
13017 2001-12-05 Akim Demaille <akim@epita.fr>
13018
13019 * src/closure.c (set_firsts): De-obfuscate.
13020
13021 2001-12-05 Akim Demaille <akim@epita.fr>
13022
13023 * src/output.c (action_row): De-obfuscate
13024 using the good o' techniques: arrays not pointers, variable
13025 locality, BITISSET, RESETBIT etc.
13026
13027 2001-12-05 Akim Demaille <akim@epita.fr>
13028
13029 Pessimize the code to simplify it: from now on, all the states
13030 have a valid SHIFTS, which NSHIFTS is possibly 0.
13031
13032 * src/LR0.c (shifts_new): Be global and move to..
13033 * src/state.c, src/state.h: here.
13034 * src/conflicts, src/lalr.c, src/output.c, src/print.c,
13035 * src/print_graph: Adjust.
13036
13037 2001-12-05 Akim Demaille <akim@epita.fr>
13038
13039 * src/state.h (SHIFT_DISABLE, SHIFT_IS_DISABLED): New.
13040 * src/conflicts.c: Use it.
13041 Restore a few missing `if (!SHIFT_IS_DISABLED)' which were
13042 incorrectly ``simplified''.
13043
13044 2001-12-05 Akim Demaille <akim@epita.fr>
13045
13046 * src/conflicts.c (flush_shift, resolve_sr_conflict): De-obfuscate
13047 using the good o' techniques: arrays not pointers, variable
13048 locality, BITISSET, RESETBIT etc.
13049
13050 2001-12-05 Akim Demaille <akim@epita.fr>
13051
13052 * src/state.h (SHIFT_SYMBOL): New.
13053 * src/conflicts.c: Use it to deobfuscate.
13054
13055 2001-12-05 Akim Demaille <akim@epita.fr>
13056
13057 * src/conflicts.c (count_sr_conflicts, count_rr_conflicts)
13058 (print_reductions): De-obfuscate using the good o' techniques:
13059 arrays not pointers, variable locality, BITISSET.
13060
13061 2001-12-05 Akim Demaille <akim@epita.fr>
13062
13063 * src/conflicts.c (print_reductions): Arrays, not pointers.
13064 Use BITISSET.
13065
13066 2001-12-05 Akim Demaille <akim@epita.fr>
13067
13068 * src/conflicts.c (print_reductions): Pessimize, but clarify.
13069
13070 2001-12-05 Akim Demaille <akim@epita.fr>
13071
13072 * src/conflicts.c (print_reductions): Improve variable locality.
13073
13074 2001-12-05 Akim Demaille <akim@epita.fr>
13075
13076 * src/conflicts.c (print_reductions): Pessimize, but clarify.
13077
13078 2001-12-05 Akim Demaille <akim@epita.fr>
13079
13080 * src/conflicts.c (print_reductions): Improve variable locality.
13081
13082 2001-12-05 Akim Demaille <akim@epita.fr>
13083
13084 * src/state.h (SHIFT_IS_ERROR, SHIFT_IS_GOTO, SHIFT_IS_SHIFT): New.
13085 * src/lalr.c: Use them.
13086
13087 2001-12-05 Akim Demaille <akim@epita.fr>
13088
13089 * src/LR0.c (augment_automaton): Formatting changes.
13090 Better variable locality.
13091
13092 2001-12-05 Akim Demaille <akim@epita.fr>
13093
13094 * src/lalr.c (matrix_print): New.
13095 (transpose): Use it.
13096 Use arrays instead of pointers.
13097
13098 2001-12-05 Akim Demaille <akim@epita.fr>
13099
13100 * src/lalr.c (maxrhs): Move to...
13101 * src/gram.c, src/gram.h (ritem_longest_rhs): here.
13102 * src/lalr.c (build_relations): Adjust.
13103
13104 2001-12-05 Akim Demaille <akim@epita.fr>
13105
13106 * src/lalr.c (transpose): Free the memory allocated to the
13107 argument, as it is replaced by the results by the unique caller.
13108 (build_relations): Merely invoke transpose: it handles the memory
13109 deallocation.
13110 Improve variable locality.
13111 Avoid variables used as mere abbreviations.
13112 (compute_lookaheads): Use arrays instead of pointers.
13113
13114 2001-12-05 Akim Demaille <akim@epita.fr>
13115
13116 * src/lalr.c (initialize_F): Improve variable locality.
13117 Avoid variables used as mere abbreviations.
13118
13119 2001-12-05 Akim Demaille <akim@epita.fr>
13120
13121 * src/derives.c (print_derives): Display the ruleno.
13122 * src/lalr.c (initialize_F, transpose): Better variable locality
13123 to improve readability.
13124 Avoid variables used as mere abbreviations.
13125
13126 2001-12-05 Akim Demaille <akim@epita.fr>
13127
13128 * src/lalr.c (traverse): Use arrays instead of pointers.
13129
13130 2001-12-05 Akim Demaille <akim@epita.fr>
13131
13132 * src/nullable.c (set_nullable): Use a for loop to de-obfuscate
13133 the handling of squeue.
13134 `symbol >= 0' is wrong now, use `rule_table[ruleno].useful'.
13135
13136 2001-12-05 Akim Demaille <akim@epita.fr>
13137
13138 Because useless nonterminals are now kept alive (instead of being
13139 `destroyed'), we now sometimes examine them, and store information
13140 related to them. Hence we need to know their number, and adjust
13141 memory allocations.
13142
13143 * src/reduce.c, src/reduce.h (nuseless_nonterminals): No longer
13144 static.
13145 * src/LR0.c (allocate_itemsets): The memory allocated to
13146 `symbol_count' was used for two different purpose: once to count
13147 the number of occurrences of each symbol, and later reassigned to
13148 `shift_symbol', containing the symbol that can be shifted from a
13149 given state.
13150 Deobfuscate, i.e., allocate, use and free `symbol_count' here
13151 only, and...
13152 (new_itemsets): Allocate `shift_symbol' here.
13153 (allocate_itemsets): symbol_count includes useless nonterminals.
13154 Make room for them.
13155 (free_storage): Use `free', not `XFREE', for pointers that cannot
13156 be null.
13157
13158 2001-12-05 Akim Demaille <akim@epita.fr>
13159
13160 * src/nullable.c (set_nullable): Deobfuscate the handling of
13161 ritem.
13162 `symbol >= 0' is wrong now, use `rule_table[ruleno].useful'.
13163
13164 2001-12-05 Akim Demaille <akim@epita.fr>
13165
13166 * src/gram.c, src/gram.h (ritem_print): New.
13167 * src/gram.c (dummy): Remove, now there is actual code in gram.c.
13168 (This useless function was defined only to work around VMS linkers
13169 that can't handle compilation units with variables only).
13170 * src/reduce.c (dump_grammar): Use it to trace the construction of
13171 ritem.
13172
13173 2001-12-04 Paul Eggert <eggert@twinsun.com>
13174
13175 * src/bison.simple (union yyalloc): Change member names
13176 to be the same as the stack names.
13177 (yyparse): yyptr is now union yyalloc *, not char *.
13178 (YYSTACK_RELOCATE): Likewise. This avoids a GCC warning,
13179 and may generate better code on some machines.
13180 (yystpcpy): Use prototype if __STDC__ is defined, not just
13181 if __cplusplus is defined.
13182
13183 2001-11-30 Akim Demaille <akim@epita.fr>
13184
13185 * configure.in (WARNING_CFLAGS): Add -Werror when possible.
13186 (CFLAGS): Do not include the WARNING_CFLAGS here, since GNU
13187 Gettext doesn't compile cleanly, and dies with -Werror.
13188 * src/Makefile.am, lib/Makefile.am, tests/atlocal.in (CFLAGS):
13189 Include WARNING_CFLAGS here.
13190 * lib/xstrdup.c: Include xalloc.h, so that xstrdup be declared
13191 before being defined.
13192
13193 2001-11-27 Paul Eggert <eggert@twinsun.com>
13194
13195 * lib/quotearg.h (quotearg_n, quotearg_n_style):
13196 First arg is int, not unsigned.
13197 * lib/quotearg.c (quotearg_n, quotearg_n_style): Likewise.
13198 (SIZE_MAX, UINT_MAX): New macros.
13199 (quotearg_n_options): Abort if N is negative.
13200 Avoid overflow check on hosts where size_t is 64 bits and int
13201 is 32 bits, as overflow is impossible there.
13202 Fix off-by-one typo that caused unnecessary reallocation.
13203
13204 2001-11-29 Paul Eggert <eggert@twinsun.com>
13205
13206 Name space cleanup in generated parser.
13207
13208 * doc/bison.texinfo (Bison Parser): Discuss system headers
13209 and their effect on the user name space.
13210
13211 * src/bison.simple:
13212 (YYSTACK_ALLOC, YYSTACK_FREE, union yyalloc, YYSTACK_GAP_MAX,
13213 YYSTACK_BYTES, YYSTACK_RELOCATE): Do not define unless necessary,
13214 i.e. unless ! defined (yyoverflow) || defined (YYERROR_VERBOSE).
13215
13216 (YYSIZE_T): New macro. Use it instead of size_t, to avoid infringing
13217 on user names when possible.
13218
13219 (YYSTACK_USE_ALLOCA): Do not define; just use any existing defn.
13220 Simplify test for whather <alloca.h> exists.
13221
13222 (<stdlib.h>): Include if we will use malloc, and if standard C or C++.
13223
13224 (<stdio.h>): Include if YYDEBUG.
13225
13226 (yymemcpy): Renamed from __yy_memcpy. Do not define unless
13227 ! defined (yyoverflow) && ! defined (yymemcpy).
13228
13229 (yymemcpy, yyparse): Rename local variables as needed so that
13230 they all begin with 'yy'.
13231
13232 (yystrlen, yystpcpy): New functions.
13233
13234 (YY_DECL_NON_LSP_VARIABLES): Renamed from _YY_DECL_VARIABLES.
13235 All uses changed.
13236
13237 (yyparse): size_t -> YYSIZE_T. Use yystrlen and yystpcpy
13238 instead of relying on string.h functions. Use YYSTACK_ALLOC
13239 and YYSTACK_FREE instead of malloc and free.
13240
13241 2001-11-30 Akim Demaille <akim@epita.fr>
13242
13243 * src/bison.simple (YYSTYPE, YYLTYPE): Move their definitions
13244 before their first uses.
13245 (YYBISON, YYPURE): Move to the top of the output.
13246
13247 2001-11-30 Akim Demaille <akim@epita.fr>
13248
13249 * tests/reduce.at (Useless Nonterminals): Fix.
13250
13251 2001-11-30 Akim Demaille <akim@epita.fr>
13252
13253 * src/bison.simple (YYSTACK_FREE): Use `do {;} while (0)' as empty
13254 if body instead of `;' to pacify GCC's warnings.
13255
13256 2001-11-30 Akim Demaille <akim@epita.fr>
13257
13258 Instead of mapping the LHS of unused rules to -1, keep the LHS
13259 valid, but flag the rules as invalid.
13260
13261 * src/gram.h (rule_t): `useful' is a new member.
13262 * src/print.c (print_grammar): Adjust.
13263 * src/derives.c (set_derives): Likewise.
13264 * src/reader.c (packgram, reduce_output): Likewise.
13265 * src/reduce.c (reduce_grammar_tables): Likewise.
13266 * tests/reduce.at (Underivable Rules, Useless Rules): New.
13267
13268 2001-11-30 Akim Demaille <akim@epita.fr>
13269
13270 * src/reduce.c (reduce_output): Formatting changes.
13271 * src/print.c (print_results, print_grammar): Likewise.
13272 * tests/regression.at (Rule Line Numbers)
13273 (Solved SR Conflicts, Unresolved SR Conflicts): Adjust.
13274
13275 2001-11-30 Akim Demaille <akim@epita.fr>
13276
13277 * src/reduce.c (nonterminals_reduce): Instead of throwing away
13278 useless nonterminals, move them at the end of the symbol arrays.
13279 (reduce_output): Adjust.
13280 * tests/reduce.at (Useless Nonterminals): Adjust.
13281
13282 2001-11-30 Akim Demaille <akim@epita.fr>
13283
13284 * src/reduce.c: Various comment/formatting changes.
13285 (nonterminals_reduce): New, extracted from...
13286 (reduce_grammar_tables): here.
13287 (reduce_grammar): Call nonterminals_reduce.
13288
13289 2001-11-29 Paul Eggert <eggert@twinsun.com>
13290
13291 * src/bison.simple (YYSTACK_REALLOC): Remove.
13292 (YYSTACK_ALLOC): Resurrect this macro, with its old meaning.
13293 (YYSTACK_FREE, YYSTACK_GAP_MAX, YYSTACK_BYTES, YYSTACK_RELOCATE):
13294 New macros.
13295 (union yyalloc): New type.
13296 (__yy_memcpy): Last arg is size_t, not unsigned int, to remove
13297 an arbitrary restriction on hosts where size_t is wider than int.
13298
13299 (yyparse): Don't dump core if alloca or malloc fails; instead, report
13300 a parser stack overflow. Allocate just one block of memory for all
13301 three stacks, instead of allocating three blocks; this typically is
13302 faster and reduces fragmentation.
13303
13304 Do not limit the number of items in the stack to a value that fits
13305 in 'int', as this is an arbitrary limit on hosts with 64-bit
13306 size_t and 32-bit int.
13307
13308 2001-11-29 Marc Autret <autret_m@epita.fr>
13309
13310 * tests/calc.at [AT_DATA_CALC_Y]: Use %error-verbose instead
13311 of defining YYERROR_VERBOSE.
13312 [AT_DATA]: $4 is now out of C declarations in the prologue.
13313
13314 2001-11-28 Marc Autret <autret_m@epita.fr>
13315
13316 * src/reader.c (parse_dquoted_param): New.
13317 (parse_skel_decl): Use it.
13318 * src/lex.h: Add its prototype.
13319 * src/lex.c (literalchar): Become not static.
13320
13321 2001-11-28 Marc Autret <autret_m@epita.fr>
13322
13323 * src/output.h: And put its extern declaration here.
13324 * src/output.c (error_verbose): Define here.
13325 (prepare): Echo name modification.
13326 * src/getargs.h: Clean its extern declaration.
13327 * src/getargs.c (error_verbose_flag): Remove.
13328 (getargs): Remove case 'e'.
13329 * src/options.c (option_table): 'error-verbose' is now seen as simple
13330 percent option.
13331 Include output.h.
13332
13333 * src/reader.c (read_declarations): Remove case tok_include.
13334 (parse_include_decl): Remove.
13335 * src/lex.h (token_t): Remove tok_include.
13336 * src/options.c (option_table): 'include' is now a simple command line
13337 option.
13338
13339 2001-11-28 Marc Autret <autret_m@epita.fr>
13340
13341 * src/bison.simple: Adjust muscle names.
13342 * src/muscle_tab.c (muscle_init): Also rename the muscles.
13343 * src/output.c (prepare): s/_/-/ for the muscles names.
13344 (output_parser): When scanning for a muscle, allow '-' instead of '_'.
13345
13346 2001-11-28 Marc Autret <autret_m@epita.fr>
13347
13348 * src/bison.simple: Fix debug.
13349 [YYERROR_VERBOSE]: Re-integrate as an internal macro.
13350
13351 2001-11-28 Akim Demaille <akim@epita.fr>
13352
13353 * src/LR0.c (shifts_new): New.
13354 (save_shifts, insert_start_shift, augment_automaton): Use it.
13355
13356 2001-11-28 Akim Demaille <akim@epita.fr>
13357
13358 * src/closure.c (closure): `b' and `ruleno' denote the same value:
13359 keep ruleno only.
13360
13361 2001-11-28 Akim Demaille <akim@epita.fr>
13362
13363 * src/closure.c (closure): Instead of looping over word in array
13364 then bits in words, loop over bits in array.
13365
13366 2001-11-28 Akim Demaille <akim@epita.fr>
13367
13368 * src/closure.c (closure): No longer optimize the special case
13369 where all the bits of `ruleset[r]' are set to 0, to make the code
13370 clearer.
13371
13372 2001-11-28 Akim Demaille <akim@epita.fr>
13373
13374 * src/closure.c (closure): `r' and `c' are new variables, used to
13375 de-obfuscate accesses to RULESET and CORE.
13376
13377 2001-11-28 Akim Demaille <akim@epita.fr>
13378
13379 * src/reduce.c (reduce_print): Use ngettext.
13380 (dump_grammar): Improve the trace accuracy.
13381
13382 2001-11-28 Akim Demaille <akim@epita.fr>
13383
13384 * src/reduce.c (dump_grammar): Don't translate trace messages.
13385
13386 2001-11-28 Akim Demaille <akim@epita.fr>
13387
13388 * tests/reduce.at (Useless Terminals, Useless Nonterminals): New.
13389 * src/reduce.c (reduce_grammar_tables): Do not free useless tags,
13390 as all tags are free'ed afterwards.
13391 From Enrico Scholz.
13392
13393 2001-11-27 Paul Eggert <eggert@twinsun.com>
13394
13395 * src/bison.simple (YYSTACK_REALLOC): Fix typo that caused us to
13396 use alloca when we didn't want to, and vice versa.
13397
13398 2001-11-27 Marc Autret <autret_m@epita.fr>
13399
13400 * src/muscle_tab.c (muscle_init): Remove 'verbose' muscle
13401 initialization.
13402 * src/output.c (prepare): Remove its update.
13403
13404 2001-11-27 Marc Autret <autret_m@epita.fr>
13405
13406 * tests/torture.at [AT_DATA]: Remove YYERROR_VERBOSE definition.
13407 Use %error-verbose.
13408
13409 2001-11-27 Marc Autret <autret_m@epita.fr>
13410
13411 * src/bison.simple: Remove YYERROR_VERBOSE using.
13412 Use %%error_verbose.
13413 (yyparse): Likewise.
13414 * src/output.c (prepare): Give its final value.
13415 * src/muscle_tab.c (muscle_init): Init new muscle 'error_verbose'.
13416 * src/getargs.h: Add its extern declaration.
13417 * src/getargs.c (error_verbose_flag): New int.
13418 (getargs): Update to catch new case.
13419 * src/options.c (option_table): 'error-verbose' is a new option.
13420 (shortopts): Update.
13421
13422 2001-11-27 Akim Demaille <akim@epita.fr>
13423
13424 * src/system.h: Use intl/libgettext.h.
13425 * src/Makefile.am (INCLUDES): Add -I $(top_srcdir).
13426
13427 2001-11-27 Akim Demaille <akim@epita.fr>
13428
13429 * tests/torture.at (Exploding the Stack Size with Malloc):
13430 s/YYSTACK_USE_ALLOCA_ALLOCA/YYSTACK_USE_ALLOCA/.
13431
13432 2001-11-27 Akim Demaille <akim@epita.fr>
13433
13434 * src/files.c: Include error.h.
13435 Reported by Hans Aberg.
13436
13437 2001-11-26 Marc Autret <autret_m@epita.fr>
13438
13439 * src/reader.c (parse_include_decl): New, not yet implemented.
13440 (read_declarations): Add case tok_include.
13441 * src/getargs.h (include): Add its extern definition.
13442 * src/getargs.c (include): New const char *.
13443 (getargs): Add case '-I'.
13444 * src/options.c (option_table): Add include as command line and
13445 percent option.
13446 * src/lex.h (token_t): Add tok_include.
13447
13448 2001-11-26 Akim Demaille <akim@epita.fr>
13449
13450 * src/reader.c (readgram): Make sure rules for mid-rule actions
13451 have a lineno equal to that of their host rule.
13452 Reported by Hans Aberg.
13453 * tests/regression.at (Rule Line Numbers): New.
13454
13455 2001-11-26 Akim Demaille <akim@epita.fr>
13456
13457 * src/LR0.c (allocate_itemsets): kernel_size contains ints, not
13458 size_ts.
13459
13460 2001-11-26 Akim Demaille <akim@epita.fr>
13461
13462 * src/complain.c, src/complain.h (error): Remove, provided by
13463 lib/error.[ch].
13464
13465 2001-11-26 Akim Demaille <akim@epita.fr>
13466
13467 * src/reader.c (read_declarations): Don't abort on tok_illegal,
13468 issue an error message.
13469 * tests/regression.at (Invalid %directive): New.
13470 Reported by Hans Aberg.
13471
13472 2001-11-26 Akim Demaille <akim@epita.fr>
13473
13474 * configure.in: Invoke AC_FUNC_OBSTACK and AC_FUNC_ERROR_AT_LINE.
13475 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
13476
13477 2001-11-26 Akim Demaille <akim@epita.fr>
13478
13479 * src/conflicts.c (conflicts_print): Don't complain at all when
13480 there are no reduce/reduce conflicts, and as many shift/reduce
13481 conflicts as expected.
13482 * tests/regression.at (%expect right): Adjust.
13483
13484 2001-11-23 Akim Demaille <akim@epita.fr>
13485
13486 * lib/alloca.c: Update, from fileutils.
13487
13488 2001-11-23 Akim Demaille <akim@epita.fr>
13489
13490 * lib/Makefile.am (libbison_a_LIBADD): Add @ALLOCA@.
13491
13492 2001-11-23 Akim Demaille <akim@epita.fr>
13493
13494 * src/system.h: Include alloca.h.
13495 * src/main.c (main) [C_ALLOCA]: Call alloca (0).
13496
13497 2001-11-23 Akim Demaille <akim@epita.fr>
13498
13499 * src/print_graph.c (print_actions): Remove `rule', unused.
13500 * src/LR0.c (kernel_size): Contain `int' instead of `size_t' to
13501 pacify GCC's signed < unsigned warnings.
13502 * src/closure.c (itemsetsize): Likewise.
13503 * src/reader.c (symbol_list_new): Static.
13504
13505 2001-11-23 Akim Demaille <akim@epita.fr>
13506
13507 Attaching lineno to buckets is stupid, since only one copy of each
13508 symbol is kept, only the line of the first occurrence is kept too.
13509
13510 * src/symtab.h, src/symtab.c (bucket): Remove the line member.
13511 * src/reader.c (rline_allocated): Remove, unused.
13512 (symbol_list): Have a `line' member.
13513 (symbol_list_new): New.
13514 (readgram): Use it.
13515 * src/print.c (print_grammar): Output the rule line numbers.
13516 * tests/regression.at (Solved SR Conflicts)
13517 (Unresolved SR Conflicts): Adjust.
13518 Reported by Hans Aberg.
13519
13520 2001-11-22 Marc Autret <autret_m@epita.fr>
13521
13522 * src/bison.simple [YYERROR_VERBOSE]: Force its value to be 1 or 0.
13523
13524 2001-11-22 Marc Autret <autret_m@epita.fr>
13525
13526 * src/muscle_tab.c (muscle_init): Remove initialization of
13527 skeleton muscle.
13528 * src/output.c (output_master_parser): Do it here.
13529
13530 2001-11-20 Akim Demaille <akim@epita.fr>
13531
13532 * po/sv.po: New.
13533 * configure.in (ALL_LINGUAS): Adjust.
13534 * po/POTFILE.in: Remove `nullable.c' and `derives.c' which no
13535 longer contains strings to translate.
13536
13537 2001-11-19 Akim Demaille <akim@epita.fr>
13538
13539 * src/conflicts.c (conflicts_print): Add a missing \n.
13540
13541 2001-11-19 Akim Demaille <akim@epita.fr>
13542
13543 * src/nullable.c (nullable_print): New.
13544 (set_nullable): Call it when tracing.
13545 Better locality of variables.
13546
13547 2001-11-19 Akim Demaille <akim@epita.fr>
13548
13549 * src/print.c (print_actions): Better locality of variables.
13550
13551 2001-11-19 Akim Demaille <akim@epita.fr>
13552
13553 * src/derives.c (print_derives): Fix and enrich.
13554 * src/closure.c (print_fderives): Likewise.
13555
13556 2001-11-19 Akim Demaille <akim@epita.fr>
13557
13558 * src/closure.c (itemsetend): Remove, replaced with...
13559 (itemsetsize): new.
13560
13561 2001-11-19 Akim Demaille <akim@epita.fr>
13562
13563 * src/LR0.c (kernel_end): Remove, replaced with...
13564 (kernel_size): new.
13565
13566 2001-11-19 Akim Demaille <akim@epita.fr>
13567
13568 * src/conflicts.c (set_conflicts): Use arrays instead of pointers
13569 to clarify.
13570
13571 2001-11-19 Akim Demaille <akim@epita.fr>
13572
13573 * src/closure.c (closure): Use arrays instead of pointers to clarify.
13574
13575 2001-11-19 Akim Demaille <akim@epita.fr>
13576
13577 * src/closure.c, src/derives.c, src/nullable.c: Adjust various
13578 trace messages.
13579 * src/LR0.c: Likewise.
13580 (allocate_itemsets): Use arrays instead of pointers to clarify.
13581
13582 2001-11-19 Akim Demaille <akim@epita.fr>
13583
13584 * src/getargs.c (statistics_flag): Replace with...
13585 (trace_flag): New.
13586 (longopts): Accept --trace instead of --statistics.
13587 * src/getargs.h, src/options.c: Adjust.
13588 * src/LR0.c, src/closure.c, src/derives.c, src/nullable.c,
13589 * src/reduce.c: Use trace_flags instead of the CPP conditional TRACE.
13590
13591 2001-11-19 Akim Demaille <akim@epita.fr>
13592
13593 * src/LR0.c (new_itemsets, get_state): Use more arrays and fewer
13594 pointers to clarify the code.
13595 (save_reductions, save_shifts): Factor common parts of alternatives.
13596
13597 2001-11-19 Akim Demaille <akim@epita.fr>
13598
13599 * src/LR0.c (new_state, get_state): Complete TRACE code.
13600 * src/closure.c: Include `reader.h' to get `tags', needed by the
13601 trace code.
13602 Rename the conditional DEBUG as TRACE.
13603 Output consistently TRACEs to stderr, not stdout.
13604 * src/derives.c: Likewise.
13605 * src/reduce.c: (inaccessable_symbols): Using if is better style
13606 than goto.
13607 Use `#if TRACE' instead of `#if 0' for tracing code.
13608
13609 2001-11-19 Akim Demaille <akim@epita.fr>
13610
13611 * src/system.h (LIST_FREE, shortcpy): New.
13612 * src/LR0.c: Use them.
13613 * src/output.c (free_itemsets, free_reductions, free_shifts):
13614 Remove, replaced by LIST_FREE.
13615
13616 2001-11-19 Akim Demaille <akim@epita.fr>
13617
13618 * src/state.h (CORE_ALLOC, SHIFTS_ALLOC, ERRS_ALLOC)
13619 (REDUCTIONS_ALLOC): New.
13620 * src/LR0.c, src/conflicts.c: Use them to de-obfuscate memory
13621 allocation.
13622
13623 2001-11-19 Akim Demaille <akim@epita.fr>
13624
13625 * src/LR0.c (new_state): Complete trace code.
13626 * src/nullable.c (set_nullable): Don't translate traces.
13627
13628 2001-11-19 Akim Demaille <akim@epita.fr>
13629
13630 * src/print_graph.c (print_core): Better locality of variables.
13631 * src/print.c (print_core): Likewise.
13632
13633 2001-11-19 Akim Demaille <akim@epita.fr>
13634
13635 * src/vcg.c: You do the output, so you are responsible of the
13636 handling of VCG syntax, in particular: use quotearg.
13637 * src/print_graph.c: Don't.
13638 (print_actions): Don't output the actions as part of the nodes,
13639 since that's the job of the edges.
13640 (print_state): Don't output by hand: fill the node description,
13641 and ask for its output.
13642
13643 2001-11-19 Akim Demaille <akim@epita.fr>
13644
13645 * src/bison.simple (yyparse): When verbosely reporting an error,
13646 no longer put additional quotes around token names.
13647 * tests/calc.at: Adjust.
13648
13649 2001-11-19 Akim Demaille <akim@epita.fr>
13650
13651 * src/symtab.h, src/symtab.c: `line' is a new member of `bucket'.
13652 * src/reader.c (record_rule_lines, rline, rline_allocated): Remove.
13653 * src/output.c: Adjust.
13654
13655 2001-11-19 Akim Demaille <akim@epita.fr>
13656
13657 * src/gram.h (rprec, rprecsym, rassoc): Remove, now part of...
13658 (rule_t): this.
13659 * src/conflicts.c, src/reader.c, src/reduce.c: Adjust.
13660
13661 2001-11-19 Akim Demaille <akim@epita.fr>
13662
13663 * src/gram.h (rule_t): New.
13664 (rule_table): New.
13665 (rrhs, rlhs): Remove, part of state_t.
13666 * src/print_graph.c, src/closure.c, src/conflicts.c, src/derives.c,
13667 * src/lalr.c, src/nullable.c, src/output.c, src/print.c,
13668 * src/reader.c, src/reduce.c: Adjust.
13669
13670 2001-11-19 Akim Demaille <akim@epita.fr>
13671
13672 * src/reader.c (symbols_output): New, extracted from...
13673 (packsymbols): Here.
13674 (reader): Call it.
13675
13676 2001-11-19 Akim Demaille <akim@epita.fr>
13677
13678 * src/lalr.c (set_maxrhs, maxrhs): Remove, replaced with...
13679 (maxrhs): this new function.
13680
13681 2001-11-19 Akim Demaille <akim@epita.fr>
13682
13683 * src/lalr.c (F): New macro to access the variable F.
13684 Adjust.
13685
13686 2001-11-19 Akim Demaille <akim@epita.fr>
13687
13688 * src/lalr.h (LA): New macro to access the variable LA.
13689 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
13690 * src/lalr.c: Adjust.
13691
13692 2001-11-19 Akim Demaille <akim@epita.fr>
13693
13694 * src/lalr.c (initialize_LA): Only initialize LA. Let...
13695 (set_state_table): handle the `lookaheads' members.
13696
13697 2001-11-19 Akim Demaille <akim@epita.fr>
13698
13699 * src/lalr.h (lookaheads): Removed array, whose contents is now
13700 a member of...
13701 (state_t): this structure.
13702 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
13703 Adjust.
13704
13705 2001-11-19 Akim Demaille <akim@epita.fr>
13706
13707 * src/lalr.h (consistent): Removed array, whose contents is now
13708 a member of...
13709 (state_t): this structure.
13710 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
13711 Adjust.
13712
13713 2001-11-19 Akim Demaille <akim@epita.fr>
13714
13715 * src/lalr.h (reduction_table, shift_table): Removed arrays, whose
13716 contents are now members of...
13717 (state_t): this structure.
13718 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
13719 Adjust.
13720
13721 2001-11-19 Akim Demaille <akim@epita.fr>
13722
13723 * src/lalr.h (state_t): New.
13724 (state_table): Be a state_t * instead of a core **.
13725 (accessing_symbol): Remove, part of state_t.
13726 * src/lalr.c: Adjust.
13727 (set_accessing_symbol): Merge into...
13728 (set_state_table): this.
13729 * src/print_graph.c, src/conflicts.c: Adjust.
13730
13731 2001-11-14 Akim Demaille <akim@epita.fr>
13732
13733 * tests/calc.at, tests/output.at, tests/regression.at,
13734 * tests/testsuite.at, tests/torture.at: Rely on Autotest 2.52g:
13735 now the tests are run in private dirs, therefore AC_CLEANUP and
13736 family can be simplified to 0-ary.
13737 * tests/atlocal.in: Now that we run `elsewhere' than in tests/,
13738 use abs. path to find config.h.
13739 * tests/calc.at (AT_CHECK_CALC): Don't try to check the compiler's
13740 stderr, there can be way too much random noise.
13741 Instead pass -Werror to GCC and rely on the exit status.
13742 Reported by Wolfram Wagner.
13743
13744 2001-11-14 Akim Demaille <akim@epita.fr>
13745
13746 * src/bison.simple (yyparse): Let yyls1, yyss1 and yyvs1 be
13747 defined only if yyoverflow is defined, to avoid `warning: unused
13748 variable `yyvs1''.
13749 Reported by The Test Suite.
13750
13751 2001-11-14 Akim Demaille <akim@epita.fr>
13752
13753 * src/print.c: Include reduce.h.
13754 Reported by Hans Aberg.
13755
13756 2001-11-14 Akim Demaille <akim@epita.fr>
13757
13758 * src/lex.c, src/lex.h (token_buffer, unlexed_token_buffer):
13759 Revert a previous patch: these are really const.
13760 * src/conflicts.c (conflict_report): Additional useless pair of
13761 braces to pacify GCC's warnings for `if () if () {} else {}'.
13762 * src/lex.c (parse_percent_token): Replace equal_offset with
13763 arg_offset.
13764 arg is const.
13765 Be sure to strdup `arg' when used, since there is no reason for
13766 token_buffer not to change.
13767
13768 2001-11-14 Akim Demaille <akim@epita.fr>
13769
13770 * src/system.h (EXIT_SUCCESS, EXIT_FAILURE): Ensure a proper
13771 definition.
13772 * src/main.c (main): Use them.
13773 Suggested by Hans Aberg.
13774
13775 2001-11-12 Akim Demaille <akim@epita.fr>
13776
13777 * src/system.h (ngettext): Now that we use ngettext, be sure to
13778 provide a default definition when NLS are not used.
13779
13780 2001-11-12 Akim Demaille <akim@epita.fr>
13781
13782 * doc/bison.texinfo: Use `$' as shell prompt, not `%'.
13783 Use @kbd to denote user input.
13784 (Language and Grammar): ANSIfy the example.
13785 Adjust its layout for info/notinfo.
13786 (Location Tracking Calc): Output error messages to stderr.
13787 Output locations in a more GNUtically correct way.
13788 Fix a couple of Englishos.
13789 Adjust @group/@end group pairs.
13790
13791 2001-11-12 Akim Demaille <akim@epita.fr>
13792
13793 %expect was not functioning at all.
13794
13795 * src/conflicts.c (expected_conflicts): Set to -1.
13796 (conflict_report): Use ngettext.
13797 (conflicts_print): Check %expect and make its violation an error.
13798 * doc/bison.texinfo (Expect Decl): Adjust.
13799 * configure.in (AM_GNU_GETTEXT): Ask for ngettext.
13800 * tests/regression.at (%expect not enough, %expect right)
13801 (%expect too much): New.
13802
13803 2001-11-12 Akim Demaille <akim@epita.fr>
13804
13805 * tests/regression.at (Conflicts): Rename as...
13806 (Unresolved SR Conflicts): this.
13807 (Solved SR Conflicts): New.
13808
13809 2001-11-12 Akim Demaille <akim@epita.fr>
13810
13811 * src/reduce.c (print_results): Rename as...
13812 (reduce_output): This.
13813 Output to OUT, passed as argument, instead of output_obstack.
13814 (dump_grammar): Likewise.
13815 (reduce_free): New.
13816 Also free V1.
13817 (reduce_grammar): No longer call reduce_output, since...
13818 * src/print.c (print_results): do it.
13819 * src/main.c (main): Call reduce_free;
13820
13821 2001-11-12 Akim Demaille <akim@epita.fr>
13822
13823 * src/conflicts.c (print_reductions): Accept OUT as argument.
13824 Output to it, not to output_obstack.
13825 * src/print.c (print_actions): Adjust.
13826
13827 2001-11-12 Akim Demaille <akim@epita.fr>
13828
13829 * src/conflicts.c (count_sr_conflicts, count_rr_conflicts): Return
13830 the result instead of using...
13831 (src_total, rrc_total, src_count, rrc_count): Remove.
13832 (any_conflicts): Remove.
13833 (print_conflicts): Split into...
13834 (conflicts_print, conflicts_output): New.
13835 * src/conflicts.h: Adjust.
13836 * src/main.c (main): Invoke both conflicts_output and conflicts_print.
13837 * src/print.c (print_grammar): Issue `\n' between two rules.
13838 * tests/regression.at (Conflicts): New.
13839 Reported by Tom Lane.
13840
13841 2001-11-12 Akim Demaille <akim@epita.fr>
13842
13843 * tests/regression.at (Invalid input): Remove, duplicate with
13844 ``Invalid input: 1''.
13845
13846 2001-11-12 Akim Demaille <akim@epita.fr>
13847
13848 * tests/torture.at (AT_DATA_STACK_TORTURE)
13849 (Exploding the Stack Size with Alloca)
13850 (Exploding the Stack Size with Malloc): New.
13851
13852 2001-11-12 Akim Demaille <akim@epita.fr>
13853
13854 * src/bison.simple (YYSTACK_REALLOC): New.
13855 (yyparse) [!yyoverflow]: Use it and free the old stack.
13856 Reported by Per Allansson.
13857
13858 2001-11-12 Pascal Bart <pascal.bart@epita.fr>
13859
13860 * src/bison.simple: Define type yystype instead of YYSTYPE, and
13861 define CPP macro, which substitute YYSTYPE by yystype.
13862 * src/reader.c (parse_union_decl): Output yystype/YYSTYPE as we do
13863 with yyltype/YYLTYPE. This allows inclusion of the generated
13864 header within the parser if the compiler, such as GGC, accepts
13865 multiple equivalent #defines.
13866 From Akim.
13867
13868 2001-11-05 Akim Demaille <akim@epita.fr>
13869
13870 * src/reader.c (symbols_output): New, extracted from...
13871 (packsymbols): here.
13872 (reader): Adjust.
13873
13874 2001-11-05 Akim Demaille <akim@epita.fr>
13875
13876 * src/lex.c (parse_percent_token): s/quotearg/quote/.
13877
13878 2001-11-05 Akim Demaille <akim@epita.fr>
13879
13880 * tests/regression.at (AT_TEST_CPP_GUARD_H): Adjust the clean up
13881 pattern.
13882
13883 2001-11-05 Akim Demaille <akim@epita.fr>
13884
13885 * src/options.h (struct option_table_struct): set_flags is void*.
13886 * src/options.c (longopts): Support `--output' and `%output'.
13887 (usage): Adjust.
13888 * src/lex.h (tok_setopt): Remove, replaced with...
13889 (tok_intopt, tok_stropt): these new guys.
13890 * src/lex.c (getopt.h): Not needed.
13891 (token_buffer, unlexed_token_buffer): Not const.
13892 (percent_table): Promote `-' over `_' in directive names.
13893 Active `%name-prefix', `file-prefix', and `output'.
13894 (parse_percent_token): Accept possible arguments to directives.
13895 Promote `-' over `_' in directive names.
13896
13897 2001-11-04 Akim Demaille <akim@epita.fr>
13898
13899 * doc/bison.texinfo (Decl Summary): Split the list into
13900 `directives for grammars' and `directives for bison'.
13901 Sort'em.
13902 Add description of `%name-prefix', `file-prefix', and `output'.
13903 Promote `-' over `_' in directive names.
13904 (Bison Options): s/%locactions/%locations/. Nice Freudian slip.
13905 Simplify the description of `--name-prefix'.
13906 Promote `-' over `_' in directive names.
13907 Promote `--output' over `--output-file'.
13908 Fix the description of `--defines'.
13909 * tests/output.at: Exercise %file-prefix and %output.
13910
13911 2001-11-02 Akim Demaille <akim@epita.fr>
13912
13913 * doc/refcard.tex: Update.
13914
13915 2001-11-02 Akim Demaille <akim@epita.fr>
13916
13917 * src/symtab.h (SUNDEF): New.
13918 * src/symtab.c (bucket_new): Init user_token_number to SUNDEF to
13919 stand for `uninitialized', instead of 0.
13920 * src/reader.c (packsymbols, parse_thong_decl): Adjust.
13921 * src/lex.c (lex): Adjust.
13922
13923 * tests/calc.at (_AT_DATA_CALC_Y): Declare a token for EOF.
13924 Number it 0.
13925 Let yylex return it instead of a plain 0.
13926 Reported by Dick Streefland.
13927
13928 2001-11-02 Akim Demaille <akim@epita.fr>
13929
13930 * tests/regression.at (Mixing %token styles): New test.
13931
13932 2001-11-02 Akim Demaille <akim@epita.fr>
13933
13934 * src/reader.c (parse_thong_decl): Formatting changes.
13935 (token_translations_init): New, extracted from...
13936 (packsymbols): Here.
13937 Adjust.
13938
13939 2001-11-01 Akim Demaille <akim@epita.fr>
13940
13941 * tests/regression.at (AT_TEST_CPP_GUARD_H): New.
13942 Check that `9foo.y' produces correct cpp guards.
13943 * src/files.c (compute_header_macro): Prepend `BISON_' to CPP
13944 guards.
13945 Reported by Wwp.
13946
13947 2001-11-01 Akim Demaille <akim@epita.fr>
13948
13949 * tests/regression.at (Invalid input: 2): New.
13950 * src/lex.c (unlexed_token_buffer): New.
13951 (lex, unlex): Adjust: when unlexing, be sure to save token_buffer
13952 too.
13953 Reported by Wwp.
13954
13955 2001-11-01 Akim Demaille <akim@epita.fr>
13956
13957 * tests/calc.at: Catch up with 1.30.
13958 * configure.in: Bump to 1.49a.
13959 Adjust to newer Autotest.
13960
13961 2001-10-19 Pascal Bart <pascal.bart@epita.fr>
13962
13963 * src/conflicts.c: Move global variables rrc_total and src_total ...
13964 (print_conflicts): here.
13965 * src/output.c (output): Free global variable user_toknums.
13966 * src/lex.c (token_obstack): Become static.
13967
13968 2001-10-18 Akim Demaille <akim@epita.fr>
13969
13970 * tests/atlocal.in (GCC): Add.
13971 * tests/calc.at: s/m4_match/m4_bmatch/.
13972 s/m4_patsubst/m4_bpatsubst/.
13973 (AT_CHECK_CALC): Check the compiler's stderr only if it's GCC.
13974 * configure.in: AC_SUBST(GCC).
13975
13976 2001-10-14 Marc Autret <autret_m@epita.fr>
13977
13978 * src/options.c (create_long_option_table): Fix.
13979
13980 2001-10-10 Akim Demaille <akim@epita.fr>
13981
13982 * src/bison.simple: Be sure to set YYSTACK_USE_ALLOCA.
13983
13984 2001-10-04 Akim Demaille <akim@epita.fr>
13985
13986 * src/reader.c (parse_union_decl): Push the caracters in
13987 union_obstack, not attrs_obstack.
13988
13989 2001-10-04 Akim Demaille <akim@epita.fr>
13990
13991 Merge in the branch 1.29.
13992
13993 * src/reader.c (packsymbols): Use a temporary obstack for
13994 `%%tokendef', since output_stack is already used elsewhere.
13995
13996 2001-10-02 Akim Demaille <akim@epita.fr>
13997
13998 Bump 1.29d.
13999
14000 2001-10-02 Akim Demaille <akim@epita.fr>
14001
14002 Version 1.29c.
14003
14004 2001-10-02 Akim Demaille <akim@epita.fr>
14005
14006 * tests/regression.at (Invalid CPP headers): New.
14007 From Alexander Belopolsky.
14008 * src/files.c (compute_header_macro): Map non alnum chars to `_'.
14009
14010 2001-10-02 Akim Demaille <akim@epita.fr>
14011
14012 * tests/regression.at (Invalid input): New.
14013 * src/lex.c (lex): Be sure to set `token_buffer' in any case.
14014 Reported by Shura.
14015
14016 2001-10-02 Akim Demaille <akim@epita.fr>
14017
14018 * tests/calc.at: Now that --debug works, the tests must be adjusted.
14019
14020 2001-10-02 Akim Demaille <akim@epita.fr>
14021
14022 * src/output.c (output_parser): Assert `skeleton'.
14023 * src/files.c (skeleton_find): Look harder for skeletons on DOSish
14024 systems.
14025 From Shura.
14026
14027 2001-10-01 Marc Autret <autret_m@epita.fr>
14028
14029 * src/lex.h: Echo modifications.
14030 * src/lex.c (unlex): Parameter is now token_t.
14031 From Hans Aberg.
14032
14033 2001-10-01 Marc Autret <autret_m@epita.fr>
14034
14035 * src/main.c: Include lex.h.
14036 From Hans Aberg.
14037
14038 2001-09-29 Akim Demaille <akim@epita.fr>
14039
14040 * src/getargs.c (longopts): `--debug' is `-t', not `-d'.
14041
14042 2001-09-28 Akim Demaille <akim@epita.fr>
14043
14044 * tests/testsuite.at: Update to newer Autotest.
14045 * tests/Makefile.am (EXTRA_DIST): bison is not to be shipped.
14046
14047 2001-09-27 Akim Demaille <akim@epita.fr>
14048
14049 Position independent wrapper.
14050
14051 * tests/bison: Remove.
14052 * tests/bison.in: New.
14053 * configure.in: Adjust.
14054
14055 2001-09-27 Paul Eggert <eggert@twinsun.com>
14056
14057 Port quotearg fixes from tar 1.13.24.
14058
14059 * lib/quotearg.c: BSD/OS 4.1 wchar.h requires FILE and struct
14060 tm to be declared.
14061 (HAVE_MBSINIT): Undef if !HAVE_MBRTOWC.
14062 (mbsinit): Define to 1 if !defined mbsinit && !HAVE_MBSINIT.
14063
14064 * m4/Makefile.am (EXTRA_DIST): Add mbrtowc.m4.
14065 * m4/mbrtowc.m4: New file.
14066 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Check for mbsinit and stddef.h.
14067 Use jm_FUNC_MBRTOWC instead of AC_CHECK_FUNCS(mbrtowc).
14068
14069 2001-09-27 Akim Demaille <akim@epita.fr>
14070
14071 Bump to 1.29c.
14072
14073 2001-09-27 Akim Demaille <akim@epita.fr>
14074
14075 Version 1.29b.
14076
14077 2001-09-25 Akim Demaille <akim@epita.fr>
14078
14079 * src/system.h: Include `xalloc.h'.
14080 Remove it from the C files.
14081 * src/files.c (output_files): Free the obstacks.
14082 * src/lex.c (init_lex): Rename as...
14083 (lex_init): this.
14084 (lex_free): New.
14085 * src/main.c (main): Use it.
14086
14087 2001-09-24 Marc Autret <autret_m@epita.fr>
14088
14089 * src/vcg.c (open_edge, close_edge, open_node, close_node): Change
14090 to output informations in fout (FILE*).
14091 (open_graph, close_graph): Likewise.
14092 (output_graph, output_edge, output_node): Likewise.
14093 * src/vcg.h: Update function prototypes.
14094 * src/print_graph.c (print_graph): Open output graph file.
14095 (print_actions): Adjust.
14096 * src/files.h: Remove extern declaration.
14097 * src/files.c: Remove graph_obstack declaration.
14098 (open_files): Remove graph_obstack initialization.
14099 (output_files): Remove graph_obstack saving.
14100
14101 2001-09-24 Marc Autret <autret_m@epita.fr>
14102
14103 * src/files.c (compute_output_file_names): Fix.
14104
14105 2001-09-24 Marc Autret <autret_m@epita.fr>,
14106 Akim Demaille <akim@epita.fr>
14107
14108 * src/reader.c (reader): Remove call to free_symtab ().
14109 * src/main.c (main): Call it here.
14110 Include symtab.h.
14111 * src/conflicts.c (initialize_conflicts): Rename as...
14112 (solve_conflicts): this.
14113 * src/print.c (print_core, print_actions, print_state)
14114 (print_grammar): Dump to a file instead a `output_obstack'.
14115 (print_results): Dump `output_obstack', and then proceed with the
14116 FILE *.
14117 * src/files.c (compute_output_file_names, close_files): New.
14118 (output_files): Adjust.
14119 * src/main.c (main): Adjust.
14120
14121 2001-09-23 Marc Autret <autret_m@epita.fr>
14122
14123 * src/files.c (compute_header_macro): Computes header macro name
14124 from spec_defines_file when given.
14125
14126 2001-09-23 Marc Autret <autret_m@epita.fr>
14127
14128 * src/files.c (output_files): Add default extensions.
14129
14130 2001-09-22 Akim Demaille <akim@epita.fr>
14131
14132 * src/conflicts.c (finalize_conflicts): Rename as...
14133 (free_conflicts): this.
14134
14135 2001-09-22 Akim Demaille <akim@epita.fr>
14136
14137 * src/gram.c (gram_free): Rename back as...
14138 (dummy): this.
14139 (output_token_translations): Free `token_translations'.
14140 * src/symtab.c (free_symtab): Free the tag field.
14141
14142 2001-09-22 Akim Demaille <akim@epita.fr>
14143
14144 Remove `translations' as it is always set to true.
14145
14146 * src/gram.h: Adjust.
14147 * src/reader.c (packsymbols, parse_token_decl): Adjust
14148 * src/print.c (print_grammar): Adjust.
14149 * src/output.c (output_token_translations): Adjust.
14150 * src/lex.c (lex): Adjust.
14151 * src/gram.c: Be sure the set pointers to NULL.
14152 (dummy): Rename as...
14153 (gram_free): this.
14154
14155 2001-09-22 Akim Demaille <akim@epita.fr>
14156
14157 * configure.in: Invoke AM_LIB_DMALLOC.
14158 * src/system.h: Use dmalloc.
14159 * src/LR0.c: Be sure to have pointers initialized to NULL.
14160 (allocate_itemsets): Allocate kernel_items only if needed.
14161
14162 2001-09-22 Akim Demaille <akim@epita.fr>
14163
14164 * configure.in: Bump to 1.29b.
14165 * tests/Makefile.am (DISTCLEANFILES): Add package.m4.
14166 * tests/calc.at (_AT_DATA_CALC_Y): #undef malloc so that we don't
14167 need xmalloc.c in calc.y.
14168 From Pascal Bart.
14169
14170 2001-09-21 Akim Demaille <akim@epita.fr>
14171
14172 Version 1.29a.
14173 * Makefile.maint, config/config.guess, config/config.sub,
14174 * config/missing: Update from masters.
14175 * tests/Makefile.am ($(srcdir)/$(TESTSUITE)): No longer depend
14176 upon package.m4.
14177 * configure.in (ALL_LINGUAS): Add `tr'.
14178
14179 2001-09-21 Akim Demaille <akim@epita.fr>
14180
14181 * tests/Makefile.am (package.m4): Move to...
14182 ($(srcdir)/$(TESTSUITE)): here.
14183
14184 2001-09-20 Akim Demaille <akim@epita.fr>
14185
14186 * src/complain.c: No longer try to be standalone: use system.h.
14187 Don't assume __STDC__ is defined to 1. Just test if it is defined.
14188 * src/complain.h: Likewise.
14189 * src/reduce.c (useless_nonterminals, inaccessable_symbols):
14190 Remove the unused variable `n'.
14191 From Albert Chin-A-Young.
14192
14193 2001-09-18 Marc Autret <autret_m@epita.fr>
14194
14195 * doc/bison.1: Update.
14196 * doc/bison.texinfo (Bison Options): Update --defines and --graph
14197 descriptions.
14198 (Option Cross Key): Update.
14199 Add --graph.
14200
14201 2001-09-18 Marc Autret <autret_m@epita.fr>
14202
14203 * tests/regression.at: New test (comment in %union).
14204
14205 2001-09-18 Marc Autret <autret_m@epita.fr>
14206
14207 * src/reader.c (parse_union_decl): Do not output '/'. Let copy_comment
14208 do that.
14209 Reported by Keith Browne.
14210
14211 2001-09-18 Marc Autret <autret_m@epita.fr>
14212
14213 * tests/output.at: Add tests for --defines and --graph.
14214
14215 2001-09-18 Marc Autret <autret_m@epita.fr>
14216
14217 * tests/output.at: Removes tests of %{header,src}_extension features.
14218
14219 2001-09-18 Akim Demaille <akim@epita.fr>
14220
14221 * tests/Makefile.am (package.m4): New.
14222 * tests/calc.at (_AT_CHECK_CALC): Just run `calc input'.
14223 (_AT_CHECK_CALC_ERROR): Likewise.
14224 Factor the `, ' part of verbose error messages.
14225
14226 2001-09-18 Marc Autret <autret_m@epita.fr>
14227
14228 * src/getargs.c (longopts): Declare --defines and --graph as options
14229 with optional arguments.
14230 * src/files.h: Add extern declarations.
14231 * src/files.c (spec_graph_file, spec_defines_file): New.
14232 (output_files): Update.
14233 Remove CPP-outed code.
14234
14235 2001-09-18 Marc Autret <autret_m@epita.fr>
14236
14237 Turn off %{source,header}_extension feature.
14238
14239 * src/files.c (compute_exts_from_gf): Update.
14240 (compute_exts_from_src): Update.
14241 (output_files): CPP-out useless code.
14242 * src/files.h: Remove {header,source}_extension extern declarations.
14243 * src/reader.c (parse_dquoted_param): CPP-out.
14244 (parse_header_extension_decl): Remove.
14245 (parse_source_extension_decl): Remove.
14246 (read_declarations): Remove cases tok_{hdrext,srcext}.
14247 * src/lex.c (percent_table): Remove {header,source}_extension entries.
14248 * src/lex.h (token_t): Remove tok_hdrext and tok_srcext.
14249
14250 2001-09-10 Akim Demaille <akim@epita.fr>
14251
14252 * tests/output.at (AT_CHECK_BISON_FLAGS, AT_CHECK_BISON_PERCENT):
14253 (AT_CHECK_BISON_PERCENT_FLAGS): Merge into...
14254 (AT_CHECK_OUTPUT): this.
14255 Merely check ls' exit status, its output is useless.
14256
14257 2001-09-10 Akim Demaille <akim@epita.fr>
14258
14259 * tests/calc.at: Use m4_match.
14260 (_AT_DATA_CALC_Y): Check `yyin != NULL', not `stdin != NULL'.
14261
14262 2001-09-10 Marc Autret <autret_m@epita.fr>,
14263 Akim Demaille <akim@epita.fr>
14264
14265 * src/vcg.h (graph_s): color, textcolor, bordercolor are now
14266 enum color_e.
14267 * src/print_graph.c (print_graph): Initalize graph.layoutalgorithm
14268 to `normal'.
14269 * src/reader.c (parse_token_decl): Initialize token with tok_eof.
14270 * src/lex.h: Adjust prototype.
14271 (token_t): Add `tok_undef'.
14272 * src/lex.c (struct percent_table_struct): Retval is now a token_t.
14273 (parse_percent_token): Now returns token_t.
14274 Add default statement in switch.
14275 (lex): Separate `c' as an input variable, from the token_t result
14276 part.
14277 (unlexed): Is a token_t.
14278
14279 2001-09-10 Akim Demaille <akim@epita.fr>
14280
14281 * configure.in: Bump to 1.29a.
14282
14283 2001-09-07 Akim Demaille <akim@epita.fr>
14284
14285 Version 1.29.
14286
14287 2001-08-30 Akim Demaille <akim@epita.fr>
14288
14289 * tests/atgeneral.m4, tests/atconfig.in, tests/suite.at: Remove.
14290 * m4/atconfig.m4: Remove.
14291 * tests/testsuite.at, tests/atlocal.in, tests/output.at,
14292 * tests/bison: New.
14293 * tests/regression.at, tests/calc.at: Use m4_define, AT_BANNER,
14294 m4_if, m4_patsubst, and m4_regexp.
14295 * tests/calc.at (_AT_CHECK_CALC, _AT_CHECK_CALC_ERROR): Use an
14296 `input' file instead of echo.
14297
14298 2001-08-29 Akim Demaille <akim@epita.fr>
14299
14300 Bump to 1.28e.
14301
14302 2001-08-29 Akim Demaille <akim@epita.fr>
14303
14304 Version 1.28d.
14305
14306 2001-08-29 Paul Eggert <eggert@twinsun.com>
14307
14308 * src/bison.simple (yyparse): Don't take the address of an
14309 item before the start of an array, as that doesn't conform to
14310 the C Standard.
14311
14312 2001-08-29 Robert Anisko <anisko_r@epita.fr>
14313
14314 * doc/bison.texinfo (Location Tracking Calc): New node.
14315
14316 2001-08-29 Paul Eggert <eggert@twinsun.com>
14317
14318 * src/output.c (output): Do not define const, as this now
14319 causes more problems than it cures.
14320
14321 2001-08-29 Akim Demaille <akim@epita.fr>
14322
14323 * doc/bison.texinfo: Modernize `@node' and `@top' use: just name
14324 the nodes.
14325 Be sure to tag the `detailmenu'.
14326
14327 2001-08-29 Akim Demaille <akim@epita.fr>
14328
14329 * Makefile.maint (do-po-update): Wget refuses to overwrite files:
14330 download in a tmp dir.
14331
14332 2001-08-28 Marc Autret <autret_m@epita.fr>
14333
14334 * config/depcomp: New file.
14335
14336 2001-08-28 Marc Autret <autret_m@epita.fr>
14337
14338 * doc/bison.1 (mandoc): Adjust.
14339 From Juan Manuel Guerrero.
14340
14341 2001-08-28 Marc Autret <autret_m@epita.fr>
14342
14343 * src/print_graph.c (print_state): Fix.
14344
14345 2001-08-27 Marc Autret <autret_m@epita.fr>
14346
14347 * src/vcg.h (classname_s, infoname_s, node_s): Constify the
14348 char * members.
14349 Echo modifications to the functions prototypes.
14350 * src/vcg.c (add_classname, add_infoname): Adjust arguments.
14351
14352 2001-08-27 Marc Autret <autret_m@epita.fr>
14353
14354 * src/vcg.c: Include `xalloc.h'.
14355 (add_colorentry): New.
14356 (add_classname): New.
14357 (add_infoname): New.
14358 * src/vcg.h: Add new prototypes.
14359
14360 2001-08-27 Akim Demaille <akim@epita.fr>
14361
14362 * Makefile.maint: Sync. again with CVS Autoconf.
14363
14364 2001-08-27 Akim Demaille <akim@epita.fr>
14365
14366 * Makefile.maint: Formatting changes.
14367 (po-update, cvs-update, update): New targets.
14368 (AMTAR): Remove.
14369
14370 2001-08-27 Akim Demaille <akim@epita.fr>
14371
14372 * Makefile.am (AUTOMAKE_OPTIONS): 1.5.
14373 * Makefile.maint: Sync. with CVS Autoconf.
14374
14375 2001-08-27 Marc Autret <autret_m@epita.fr>
14376
14377 * src/vcg.h (struct infoname_s): New.
14378 (struct colorentry_s): New.
14379 (graph_s): New fields {vertical,horizontal}_order in structure.
14380 Add `infoname' field.
14381 Add `colorentry' field;
14382 * src/vcg_defaults.h (G_VERTICAL_ORDER): New.
14383 (G_HORIZONTAL_ORDER): New.
14384 (G_INFONAME): New.
14385 (G_COLORENTRY): New.
14386 * src/vcg.c (output_graph): Add output of {vertical,horizontal}_order.
14387 Add output of `infoname'.
14388 Add output of `colorentry'.
14389
14390 2001-08-27 Marc Autret <autret_m@epita.fr>
14391
14392 * src/reader.c (parse_dquoted_param): Rename variable `index' to `i'.
14393 This one shadowed a global parameter.
14394
14395 2001-08-24 Marc Autret <autret_m@epita.fr>
14396
14397 * src/print_graph.c (node_output_size): Declared POSIX `size_t' type,
14398 instead of `unsigned'.
14399 (print_state): Do not call obstack_object_size () in obstack_grow ()
14400 to avoid macro variables shadowing.
14401
14402 2001-08-23 Marc Autret <autret_m@epita.fr>
14403
14404 * src/lex.c (percent_table): Typo: s/naem/name/.
14405 Add graph option.
14406 Normalize new options declarations.
14407
14408 2001-08-20 Pascal Bart <pascal.bart@epita.fr>
14409
14410 * tests/suite.at: Exercise %header_extension and %source_extension.
14411
14412 2001-08-16 Marc Autret <autret_m@epita.fr>
14413
14414 * src/reader.c (parse_dquoted_param): New.
14415 (parse_header_extension_decl): Use it.
14416 (parse_source_extension_decl): Likewise.
14417
14418 2001-08-16 Marc Autret <autret_m@epita.fr>
14419
14420 * src/vcg.c: Remove includes of `complain.h' and `xalloc.h'.
14421 (get_xxxx_str): Use assert () instead of complain ().
14422 Remove return invokations in default cases.
14423 (get_decision_str): Modify default behaviour. Remove second argument.
14424 Echo modifications on calls.
14425 (output_graph): Fix.
14426
14427 2001-08-16 Marc Autret <autret_m@epita.fr>
14428
14429 * src/getargs.c (usage): Update with ``-g, --graph''.
14430
14431 2001-08-16 Marc Autret <autret_m@epita.fr>
14432
14433 * doc/bison.texinfo (Bison Options): Add items `-g', `--graph'.
14434 (Option Cross Key): Likewise.
14435 * doc/bison.1: Update.
14436
14437 2001-09-25 Pascal Bart <pascal.bart@epita.fr>
14438
14439 * src/output.c (output_master_parser): Don't finish action_obstack.
14440 (output_parser): Don't care about the muscle action, here.
14441 (prepare): Copy the action_obstack in the action muscle.
14442 (output): Free action_obstack.
14443
14444 2001-09-23 Pascal Bart <pascal.bart@epita.fr>
14445
14446 * src/reader.c (parse_union_decl): Add new obstack union_obstack. Which
14447 will contain `%union' declaration.
14448 (parse_union_decl): Delete #line directive output.
14449 (parse_union_decl): Substitute /attrs_obstack/union_obstack for all
14450 informations about %union.
14451 (parse_union_decl): Copy the union_obstack in the muscle stype.
14452 * src/bison.simple: Add new #line directive.
14453 Add typdef %%stype YYSTYPE.
14454
14455 2001-09-23 Pascal Bart <pascal.bart@epita.fr>
14456
14457 * src/bison.simple: Add new `#line' directive.
14458
14459 2001-09-22 Pascal Bart <pascal.bart@epita.fr>
14460
14461 * src/bison.simple: New `#line' directive.
14462 * src/output.c (output_parser): Support new dynamic muscle input_line.
14463
14464 2001-09-22 Marc Autret <autret_m@epita.fr>
14465
14466 * src/output.c (output_master_parser): New.
14467 (output_parser): Be more re-entrant.
14468
14469 2001-09-21 Marc Autret <autret_m@epita.fr>
14470
14471 * src/reader.c (copy_definition, parse_union_decl): Update and use
14472 `linef' muscle.
14473 (copy_action): Likewise.
14474 Use obstack_1grow ().
14475 * src/muscle_tab.c (muscle_init): Add muscle `linef'.
14476
14477 2001-09-21 Marc Autret <autret_m@epita.fr>
14478
14479 * src/options.c (option_table): Adjust.
14480 * src/lex.c (parse_percent_token): Fix.
14481
14482 2001-09-20 Pascal Bart <pascal.bart@epita.fr>
14483
14484 * src/options.c (symtab.h): Include it, need by lex.h.
14485
14486 2001-09-20 Pascal Bart <pascal.bart@epita.fr>
14487
14488 * src/lex.c (parse_percent_token): Change type of variable `tx', which
14489 is now an option_table_struct*.
14490 (option_strcmp): New function option_strcmp.
14491 (parse_percent_token): Call option_strcmp.
14492 * src/getargs.c (xalloc.h, options.h): Include it.
14493 (getargs): Call create_long_option_table.
14494 (getargs): Free longopts at the end of the function.
14495 (shortopts): Move in options.c.
14496 * src/options.c (create_long_option_table): New function. Convert
14497 information from option_table to option structure.
14498 * src/reader.c (options.h): Include it.
14499
14500 * src/Makefile.am: Adjust.
14501 * src/options.c (option_table): Create from longopts and percent_table.
14502 * src/getargs.c (longopts): Delete.
14503 * src/lex.c (struct percent_table_struct): Delete.
14504 (percent_table): Delete.
14505 (options.h): Include it.
14506 * src/options.c: Create.
14507 * src/options.h: Create.
14508 Declare enum opt_access_e.
14509 Define struct option_table_struct.
14510
14511 2001-09-20 Marc Autret <autret_m@epita.fr>
14512
14513 * doc/bison.texinfo: Adjust terminologies about prologue and epilogue
14514 sections of Bison.
14515
14516 2001-09-19 Pascal Bart <pascal.bart@epita.fr>
14517
14518 * src/bison.simple: s/%%filename/%%skeleton.
14519 * src/muscle_tab.c (getargs.h): Include it.
14520 (muscle_init): Insert new muscle skeleton.
14521
14522 2001-09-18 Pascal Bart <pascal.bart@epita.fr>
14523
14524 * src/output.c (output_parser): Delete unused variable actions_dumped.
14525
14526 2001-09-07 Pascal Bart <pascal.bart@epita.fr>
14527
14528 * src/output.c (output): Delete call to reader_output_yylsp.
14529 * src/reader.c (reader): Likewise.
14530 * src/reader.h: Delete declaration of reader_output_yylsp.
14531
14532 2001-09-02 Marc Autret <autret_m@epita.fr>
14533
14534 * src/reader.c: Include muscle_tab.h.
14535 (parse_union_decl): Update.
14536 (parse_macro_decl): Rename parse_muscle_decl.
14537 Update to use renamed functions and variable.
14538 (read_declarations, copy_action, read_additionnal_code, : Updated
14539 with correct variables and functions names.
14540 (packsymbols, reader): Likewise.
14541
14542 * src/reader.h (muscle_obstack): Extern declaration update.
14543
14544 * src/output.c: Include muscle_tab.h
14545 In all functions using macro_insert, change by using muscle_insert ().
14546 (macro_obstack): Rename muscle_obstack.
14547 Echo modifications in the whole file.
14548 (MACRO_INSERT_INT): Rename MUSCLE_INSERT_INT.
14549 (MACRO_INSERT_STRING): Rename MUSCLE_INSERT_STRING.
14550 (MACRO_INSERT_PREFIX): Rename MUSCLE_INSERT_PREFIX.
14551
14552 * src/muscle_tab.h: Update double inclusion macros.
14553 (macro_entry_s): Rename muscle_entry_s.
14554 Update prototypes.
14555
14556 * src/muscle_tab.c: Include muscle_tab.h.
14557 Rename macro_tabble to muscle_table.
14558 (mhash1, mhash2, mcmp): Use muscle_entry.
14559 (macro_init): Rename muscle_init. Update.
14560 (macro_insert): Rename muscle_insert. Update.
14561 (macro_find): Rename muscle_find. Update.
14562
14563 * src/main.c: Include muscle_tab.h.
14564 (main): Call muscle_init ().
14565 * src/Makefile.am (bison_SOURCES): Echo modifications.
14566
14567 2001-09-02 Marc Autret <autret_m@epita.fr>
14568
14569 Now the files macro_tab.[ch] are named muscle_tab.[ch].
14570
14571 * src/muscle_tab.c, src/muscle_tab.h: Add files.
14572
14573 2001-09-02 Marc Autret <autret_m@epita.fr>
14574
14575 * src/macrotab.c, src/macrotab.h: Remove.
14576
14577 2001-09-01 Pascal Bart <pascal.bart@epita.fr>
14578
14579 * src/reader.c (copy_guard): Use muscle to specify the `#line'
14580 filename.
14581
14582 2001-09-01 Marc Autret <autret_m@epita.fr>
14583
14584 * tests/calc.at (exp): Now, YYERROR_VERBOSE need to be set
14585 to an explicit value to activate the feature. We do it here.
14586
14587 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
14588
14589 * src/output.c (prepare): Delete the `filename' muscule insertion.
14590 * src/reader.c (copy_action): Use `filename' muscule with `#line'.
14591 (parse_union_decl): Likewise.
14592 * src/macrotab.c (macro_init): Initialize filename by infile.
14593
14594 2001-08-31 Marc Autret <autret_m@epita.fr>
14595
14596 * src/bison.simple (YYLSP_NEEDED): New definition.
14597 * src/output.c (prepare): Add macro insertion of `locations_flag'
14598
14599 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
14600
14601 * src/output.c (prepare): Delete insertion of previous muscles,
14602 and insert the `prefix' muscles.
14603 * src/macrotab.c (macro_init): Likewise.
14604 (macro_init): Initialization prefix directive by `yy'.
14605 * src/bison.simple: Substitute all %%yylex, %%yychar, %%yylval,
14606 %%yydebug, %%yyerror, %%yynerrs and %%yyparse by yylex, yychar,
14607 yylval, yydebug, yyerror, yynerrs and yyparse.
14608 New directive `#define' to substitute yydebug, ... with option
14609 name_prefix.
14610
14611 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
14612
14613 * src/main.c (main): Standardize.
14614 * src/output.c (output_table_data, output_parser): Likewise.
14615 * src/macrotab.h, src/macrotab.c, src/bison.simple: Likewise.
14616
14617 2001-08-31 Pascal Bart <pascal.bart@epita.fr>, Marc Autret <autret_m@epita.fr>
14618
14619 * src/reader.c (read_additionnal_code): Rename %%user_code to
14620 %%epilogue.
14621 * src/output.c (output): Rename %%declarations to %%prologue.
14622 * src/bison.simple: Echo modifications.
14623
14624 2001-08-31 Marc Autret <autret_m@epita.fr>
14625
14626 * src/reader.c (readgram): CleanUp.
14627 (output_token_defines): Likewise.
14628 (packsymbols): Likewise.
14629 (reader): Likewise.
14630 * src/output.c (output): CPP-out useless code.
14631
14632 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
14633
14634 * src/reader.c (reader): Delete obsolete call to function
14635 output_trailers and output_headers.
14636 * src/output.h: Remove obsolete functions prototypes of output_headers
14637 and output_trailers.
14638
14639 2001-08-30 Pascal Bart <pascal.bart@epita.fr>
14640
14641 * src/main.c: Include macrotab.h.
14642 * src/macrotab.h (macro_entry_s): Constify fields.
14643 Adjust functions prototypes.
14644 * src/macrotab.c (macro_insert): Constify key and value.
14645 (macro_find): Constify key.
14646 (macro_insert): Include 'xalloc.h'
14647 (macro_insert): Use XMALLOC.
14648 (macro_find): Constify return value.
14649 * src/output.c (output_table_data): Rename table to table_data.
14650 (output_parser): Constify macro_key, macro_value.
14651
14652 2001-08-30 Marc Autret <autret_m@epita.fr>
14653
14654 * src/reader.c (parse_skel_decl): New.
14655 (read_declarations): Add case `tok_skel', call parse_skel_decl ().
14656 * src/lex.h (token_t): New token `tok_skel'.
14657 * src/lex.c (percent_table): Add skeleton option entry.
14658 Standardize.
14659
14660 2001-08-29 Marc Autret <autret_m@epita.fr>
14661
14662 * src/bison.simple: Add %%user_code directive at the end.
14663 * src/reader.c (read_additionnal_code): New.
14664 (reader): Use it.
14665 * src/output.c (output_program): Remove.
14666 (output): Update.
14667
14668 2001-08-28 Marc Autret <autret_m@epita.fr>
14669
14670 * src/output.c (output_actions): Clean up.
14671 (output_gram): CPP-out useless code.
14672 * src/reader.c (reader): Clean up, CPP-out useless code.
14673
14674 2001-08-28 Pascal Bart <pascal.bart@epita.fr>
14675
14676 * src/output.c (output): Copy attrs_obstack in the '%%definitions'
14677 directive.
14678 * src/bison.simple: Add `%%definitions'.
14679
14680 2001-08-28 Marc Autret <autret_m@epita.fr>
14681
14682 * config/depcomp: New file.
14683
14684 2001-08-27 Paul Eggert <eggert@twinsun.com>
14685
14686 * src/bison.simple (yyparse): Don't take the address of an
14687 item before the start of an array, as that doesn't conform to
14688 the C Standard.
14689
14690 2001-08-27 Robert Anisko <robert.anisko@epita.fr>
14691
14692 * src/output.c (output): Remove the initialization of the macro
14693 obstack. It was done too late here.
14694
14695 * src/reader.c (parse_macro_decl): Fix. Use of the macro obstack was
14696 completely wrong.
14697 (reader): Initialize the macro obstack here, since we need it to grow
14698 '%define' directives.
14699
14700 * src/reader.h: Declare the macro obstack as extern.
14701
14702 2001-08-27 Robert Anisko <robert.anisko@epita.fr>
14703
14704 * src/output.c (output_parser): Fix. Store single '%' characters in
14705 the output obstack instead of throwing them away.
14706
14707 2001-08-27 Akim Demaille <akim@epita.fr>
14708
14709 * Makefile.am (AUTOMAKE_OPTIONS): 1.5.
14710
14711 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
14712
14713 * lib/Makefile.am: Adjust.
14714
14715 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
14716
14717 * src/bison.simple: Update and add '%%' directives.
14718
14719 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
14720
14721 * src/reader.c (reader): Remove calls to 'output_headers' and
14722 'output_trailers'. Remove some C output.
14723 (readgram): Disable a piece of code that was writing a default
14724 definition for 'YYSTYPE'.
14725 (reader_output_yylsp): Remove.
14726 (packsymbols): Output token defintions to a macro.
14727 (copy_definition): Disable C output.
14728
14729 * src/reader.c (parse_macro_decl): New function used to parse macro
14730 declarations.
14731 (copy_string2): Put the body of copy_string into this new function.
14732 Add a parameter to let the caller choose whether he wants to copy the
14733 string delimiters or not.
14734 (copy_string): Be a simple call to copy_string2 with the last argument
14735 bound to true.
14736 (read_declarations): Add case for macro definition.
14737 (copy_identifier): New.
14738 (parse_macro_decl): Read macro identifiers using copy_identifier
14739 rather than lex.
14740
14741 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
14742
14743 * src/output.c (prepare): Add prefixed names.
14744 (output_parser): Output semantic actions.
14745 (output_parser): Fix bug on '%%line' directives.
14746
14747 * src/output.c (output_headers): Remove. The C code printed by this
14748 function should now be in the skeletons.
14749 (output_trailers): Remove.
14750 (output): Disable call to 'reader_output_yylsp'.
14751 (output_rule_data): Do not output tables to the table obstack.
14752
14753 * src/output.c: Remove some C dedicated output.
14754 Improve the use of macro and output obstacks.
14755 (output_defines): Remove.
14756
14757 * src/output.c (output_token_translations): Associate 'translate'
14758 table with a macro. No output to the table obstack.
14759 (output_gram): Same for 'rhs' and 'prhs'.
14760 (output_stos): Same for 'stos'.
14761 (output_rule_data): Same for 'r1' and 'r2'.
14762 (token_actions): Same for 'defact'.
14763 (goto_actions): Same for 'defgoto'.
14764 (output_base): Same for 'pact' and 'pgoto'.
14765 (output_table): Same for 'table'.
14766 (output_check): Same for 'check'.
14767
14768 * src/output.c (output_table_data): New function.
14769 (output_short_table): Remove.
14770 (output_short_or_char_table): Remove.
14771
14772 * src/output.c (output_parser): Replace most of the skeleton copy code
14773 with something new. Skeletons are now processed character by character
14774 rather than line by line, and Bison looks for '%%' macros. This is the
14775 first step in making Bison's output process (a lot) more flexible.
14776 (output_parser): Use the macro table.
14777
14778 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
14779
14780 * src/main.c (main): Initialize the macro table.
14781
14782 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
14783
14784 * src/lex.c (percent_table): Add tok_define.
14785 * src/lex.h: Add tok_define.
14786
14787 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
14788
14789 * src/macrotab.c: New file.
14790 * src/macrotab.h: New file.
14791 * src/Makefile.am: Update.
14792
14793 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
14794
14795 * lib/hash.c: New file.
14796 * lib/hash.h: New file.
14797 * lib/Makefile.am: Update.
14798
14799 2001-08-15 Akim Demaille <akim@epita.fr>
14800
14801 Version 1.28c.
14802
14803 2001-08-15 Marc Autret <autret_m@epita.fr>
14804
14805 * src/reader.c (readgram): Indent output macro YYSTYPE.
14806 (packsymbols): Likewise.
14807 (output_token_defines): Likewise.
14808 * src/files.c: Standardize.
14809 (compute_header_macro): New.
14810 (defines_obstack_save): New. Use compute_header_macro.
14811 (output_files): Update. Use defines_obstack_save.
14812
14813 2001-08-15 Akim Demaille <akim@epita.fr>
14814
14815 * doc/bison.texinfo (Table of Symbols): Document
14816 YYSTACK_USE_ALLOCA.
14817
14818 2001-08-15 Akim Demaille <akim@epita.fr>
14819
14820 * missing: Update from CVS Automake.
14821 * config/config.guess, config/config.sub, config/texinfo.tex:
14822 Update from gnu.org.
14823
14824 2001-08-15 Akim Demaille <akim@epita.fr>
14825
14826 * Makefile.maint: Sync with CVS Autoconf.
14827
14828 2001-08-14 Pascal Bart <pascal.bart@epita.fr>
14829
14830 * doc/bison.texinfo: Include GNU Free Documentation License from
14831 `fdl.texi'.
14832 * doc/fdl.texi: Add to package.
14833
14834 2001-08-14 Marc Autret <autret_m@epita.fr>
14835
14836 Turn on %{source,header}_extension features.
14837
14838 * src/lex.c (percent_table): Un-CPP out header_extension and
14839 source_extension.
14840 * src/files.c (compute_exts_from_gf): Compare pointers with NULL.
14841 (compute_exts_from_src): Remove conditions. It restores priorities
14842 between options.
14843
14844 2001-08-14 Marc Autret <autret_m@epita.fr>
14845
14846 * src/files.c (compute_base_names): Add extensions computing when
14847 `--file-prefix' used.
14848 Standardize function calls.
14849
14850 2001-08-13 Marc Autret <autret_m@epita.fr>
14851
14852 * src/bison.simple (YYSTACK_USE_ALLOCA): Changed to allow users
14853 defining it (defined but null disables alloca).
14854
14855 2001-08-13 Marc Autret <autret_m@epita.fr>
14856
14857 * src/bison.simple (_yy_memcpy): CPP reformat.
14858
14859 2001-08-13 Pascal Bart <pascal.bart@epita.fr>
14860
14861 * tests/atconfig.in (CPPFLAGS): Fix.
14862
14863 2001-08-10 Pascal Bart <pascal.bart@epita.fr>
14864
14865 * doc/bison.texinfo: Include GNU General Public License from
14866 `gpl.texi'.
14867 * doc/gpl.texi: Add to package.
14868
14869 2001-08-10 Marc Autret <autret_m@epita.fr>
14870
14871 * src/print_graph.h: Fix.
14872 * src/reader.c (read_declarations): Use parse_header_extension_decl ().
14873
14874 2001-08-10 Akim Demaille <akim@epita.fr>
14875
14876 * src/system.h: Provide default declarations for stpcpy, strndup,
14877 and strnlen.
14878
14879 2001-08-10 Robert Anisko <anisko_r@epita.fr>
14880
14881 * doc/bison.texinfo (Locations): Update @$ stuff.
14882
14883 2001-08-09 Robert Anisko <anisko_r@epita.fr>
14884
14885 * src/bison.simple (YYLLOC_DEFAULT): Update.
14886 (yyparse): Adjust.
14887
14888 2001-08-08 Marc Autret <autret_m@epita.fr>
14889
14890 * doc/bison.texinfo: Change @samp{$<@dots{}>} to
14891 @samp{$<@dots{}>@var{n}} in Section Actions in Mid-Rule.
14892 Reported by Fabrice Bauzac.
14893
14894 2001-08-08 Marc Autret <autret_m@epita.fr>
14895
14896 * src/vcg_default.h: Use NULL instead of 0 to initialize pointers.
14897 * src/vcg.c (output_node): Fix.
14898 * src/vcg.h: Cleanup.
14899 * src/print_graph.c: Add comments.
14900 (node_output_size): New global variable. Simplify the formatting of
14901 the VCG graph output.
14902 (print_actions): Unused code is now used. It notifies the final state
14903 and no action states in the VCG graph. It also give the reduce actions.
14904 The `shift and goto' edges are red and the `go to state' edges are
14905 blue.
14906 Get the current node name and node_obstack by argument.
14907 (node_obstack): New variable.
14908 (print_state): Manage node_obstack.
14909 (print_core): Use node_obstack given by argument.
14910 A node is not only computed here but in print_actions also.
14911 (print_graph): CPP out useless code instead of commenting it.
14912
14913 2001-08-07 Pascal Bart <pascal.bart@epita.fr>
14914
14915 * tests/atconfig.in (CPPFLAGS): Fix.
14916
14917 2001-08-07 Akim Demaille <akim@epita.fr>
14918
14919 * src/print_graph.c (quote): New.
14920 (print_core): Use it.
14921
14922 2001-08-06 Akim Demaille <akim@epita.fr>, Marc Autret <autret_m@epita.fr>
14923
14924 * src/vcg.c (complain.h): Include it.
14925 Unepitaize `return' invocations.
14926 [NDEBUG] (main): Remove.
14927 * src/vcg.h (node_t, edge_t, graph_t): Constify the char * members.
14928 * src/files.c (open_files): Initialize graph_obstack.
14929 * src/print_graph.c (print_actions): CPP out useless code.
14930 (print_core): Don't output the last `\n' in labels.
14931 Use `quote'.
14932 * src/files.c (output_files): Output the VCG file.
14933 * src/main.c (main): Invoke print_graph ();
14934
14935 2001-08-06 Marc Autret <autret_m@epita.fr>
14936
14937 Automaton VCG graph output.
14938 Using option ``-g'' or long option ``--graph'', you can generate
14939 a gram_filename.vcg file containing a VCG description of the LALR (1)
14940 automaton of your grammar.
14941
14942 * src/main.c: Call to print_graph() function.
14943 * src/getargs.h: Update.
14944 * src/getargs.c (options): Update to catch `-g' and `--graph' options.
14945 (graph_flag): New flag.
14946 (longopts): Update.
14947 (getargs): Add case `g'.
14948 * src/files.c (graph_obstack): New obstack struct.
14949 (open_files): Initialize new obstack.
14950 (output_files): Saves graph_obstack if required.
14951 * src/files.h (graph_obstack): New extern declaration.
14952 * src/Makefile.am: Add new source files.
14953
14954 2001-08-06 Marc Autret <autret_m@epita.fr>
14955
14956 * src/print_graph.c, src/print_graph.h (graph): New.
14957 * src/vcg.h: New file.
14958 * src/vcg.c: New file, VCG graph handling.
14959
14960 2001-08-06 Marc Autret <autret_m@epita.fr>
14961
14962 Add of %source_extension and %header_extension which specify
14963 the source or/and the header output file extension.
14964
14965 * src/files.c (compute_base_names): Remove initialisation of
14966 src_extension and header_extension.
14967 (compute_exts_from_gf): Update.
14968 (compute_exts_from_src): Update.
14969 (output_files): Update.
14970 * src/reader.c (parse_header_extension_decl): New.
14971 (parse_source_extension_decl): New.
14972 (read_declarations): New case statements for the new tokens.
14973 * src/lex.c (percent_table): Add entries for %source_extension
14974 and %header_extension.
14975 * src/lex.h (token_e): New tokens tok_hdrext and tok_srcext.
14976
14977 2001-08-06 Marc Autret <autret_m@epita.fr>
14978
14979 * configure.in: Bump to 1.28c.
14980 * doc/bison.texinfo: Texinfo thingies.
14981
14982 2001-08-04 Pascal Bart <pascal.bart@epita.fr>
14983
14984 * tests/atconfig.in (CPPFLAGS): Add.
14985 * tests/calc.at (AT_CHECK): Use CPPFLAGS.
14986
14987 2001-08-03 Akim Demaille <akim@epita.fr>
14988
14989 Version 1.28b.
14990
14991 2001-08-03 Akim Demaille <akim@epita.fr>
14992
14993 * tests/Makefile.am (check-local): Ship testsuite.
14994 * tests/calc.at (_AT_DATA_CALC_Y): Prototype all the functions.
14995 Include `string.h'.
14996
14997 2001-08-03 Akim Demaille <akim@epita.fr>
14998
14999 * configure.in: Try using -Wformat when compiling.
15000
15001 2001-08-03 Akim Demaille <akim@epita.fr>
15002
15003 * configure.in: Bump to 1.28b.
15004
15005 2001-08-03 Akim Demaille <akim@epita.fr>
15006
15007 * src/complain.c: Adjust strerror_r portability issues.
15008
15009 2001-08-03 Akim Demaille <akim@epita.fr>
15010
15011 Version 1.28a.
15012
15013 2001-08-03 Akim Demaille <akim@epita.fr>
15014
15015 * src/getargs.c, src/getarg.h (skeleton)): Constify.
15016 * src/lex.c (literalchar): Avoid name clashes on `buf'.
15017 * src/getargs.c: Include complain.h.
15018 * src/files.c, src/files.h (skeleton_find): Avoid name clashes.
15019 * lib/quotearg.c, lib/quotearg.h: Update from fileutils 4.1.
15020
15021 2001-08-03 Akim Demaille <akim@epita.fr>
15022
15023 * src/reader.c (readgram): Display hidden chars in error messages.
15024
15025 2001-08-03 Akim Demaille <akim@epita.fr>
15026
15027 Update to gettext 0.10.39.
15028
15029 2001-08-03 Akim Demaille <akim@epita.fr>
15030
15031 * lib/strspn.c: New.
15032
15033 2001-08-01 Marc Autret <autret_m@epita.fr>
15034
15035 * doc/bison.texinfo: Update.
15036 * doc/bison.1 (mandoc): Update.
15037 * src/system.h (EXT_GUARD_C, EXT_STYPE_H): Remove .c and .h.
15038 * src/files.c: Support output files extensions computing.
15039 (src_extension): New static variable.
15040 (header_extension): New static variable.
15041 (tr): New function.
15042 (get_extension_index): New function, gets the index of an extension
15043 filename in a string.
15044 (compute_exts_from_gf): New function, computes extensions from the
15045 grammar file extension.
15046 (compute_exts_from_src): New functions, computes extensions from the
15047 C source file extension, file given by ``-o'' option.
15048 (compute_base_names): Update.
15049 (output_files): Update.
15050
15051 2001-08-01 Robert Anisko <anisko_r@epita.fr>
15052
15053 * doc/bison.texi: Document @$.
15054 (Locations): New section.
15055
15056 2001-07-18 Akim Demaille <akim@epita.fr>
15057
15058 * Makefile.maint, GNUmakefile: New, from Autoconf 2.52.
15059 * config/prev-version.txt, config/move-if-change: New.
15060 * Makefile.am: Adjust.
15061
15062 2001-07-08 Pascal Bart <pascal.bart@epita.fr>
15063
15064 * src/bison.simple (yyparse): Suppress warning `comparaison
15065 between signed and unsigned'.
15066
15067 2001-07-05 Pascal Bart <pascal.bart@epita.fr>
15068
15069 * src/getargs.h (raw_flag): Remove.
15070 * src/getargs.c: Die on `-r'/`--raw'.
15071 * src/lex.c (parse_percent_token): Die on `%raw'.
15072 * src/reader.c (output_token_defines): Suppress call to `raw_flag'.
15073 * tests/calc.at: Suppress test with option `--raw'.
15074
15075 2001-07-14 Akim Demaille <akim@epita.fr>
15076
15077 * config/: New.
15078 * configure.in: Require Autoconf 2.50.
15079 Update to gettext 0.10.38.
15080
15081 2001-03-16 Akim Demaille <akim@epita.fr>
15082
15083 * doc/bison.texinfo: ANSIfy the examples.
15084
15085 2001-03-16 Akim Demaille <akim@epita.fr>
15086
15087 * getargs.c (skeleton): New variable.
15088 (longopts): --skeleton is a new option.
15089 (shortopts, getargs): -S is a new option.
15090 * getargs.h: Declare skeleton.
15091 * output.c (output_parser): Use it.
15092
15093 2001-03-16 Akim Demaille <akim@epita.fr>
15094
15095 * m4/strerror_r.m4: New.
15096 * m4/error.m4: Run AC_FUNC_STRERROR_R.
15097 * lib/error.h, lib/error.c: Update.
15098
15099 2001-03-16 Akim Demaille <akim@epita.fr>
15100
15101 * src/getargs.c (longopts): Clean up.
15102
15103 2001-02-21 Akim Demaille <akim@epita.fr>
15104
15105 * src/reader.c (gensym): `gensym_count' is your own.
15106 Use a static buf to create the symbol name, as token_buffer is no
15107 longer a buffer.
15108
15109 2001-02-08 Akim Demaille <akim@epita.fr>
15110
15111 * src/conflicts.c (conflict_report): Be sure not to append to res
15112 between two calls, which could happen if both first sprintf were
15113 skipped, but not the first cp += strlen.
15114
15115 2001-02-08 Akim Demaille <akim@epita.fr>
15116
15117 * lib/memchr.c, lib/stpcpy.c, lib/strndup.c, lib/strnlen.c:
15118 New, from fileutils 4.0.37.
15119 * configure.in: Require Autoconf 2.49c. I took some time before
15120 making this decision. This is the only way out for portability
15121 issues in Bison, it would mean way too much duplicate effort to
15122 import in Bison features implemented in 2.49c since 2.13.
15123 AC_REPLACE_FUNCS and AC_CHECK_DECLS the functions above.
15124
15125 2001-02-02 Akim Demaille <akim@epita.fr>
15126
15127 * lib/malloc.c, lib/realloc.c: New, from the fileutils 4.0.37.
15128 * lib/xalloc.h, lib/xmalloc.c: Update.
15129
15130 2001-01-19 Akim Demaille <akim@epita.fr>
15131
15132 Get rid of the ad hoc handling of token_buffer in the scanner: use
15133 the obstacks.
15134
15135 * src/lex.c (token_obstack): New.
15136 (init_lex): Initialize it. No longer call...
15137 (grow_token_buffer): this. Remove it.
15138 Adjust all the places which used it to use the obstack.
15139
15140 2001-01-19 Akim Demaille <akim@epita.fr>
15141
15142 * src/lex.h: Rename all the tokens:
15143 s/\bENDFILE\b/tok_eof/g;
15144 s/\bIDENTIFIER\b/tok_identifier/g;
15145 etc.
15146 Let them be enums, not #define, to ease debugging.
15147 Adjust all the code.
15148
15149 2001-01-18 Akim Demaille <akim@epita.fr>
15150
15151 * src/lex.h (MAXTOKEN, maxtoken, grow_token_buffer): Remove, private.
15152 * src/lex.c (maxtoken, grow_token_buffer): Static.
15153
15154 2001-01-18 Akim Demaille <akim@epita.fr>
15155
15156 Since we now use obstacks, more % directives can be enabled.
15157
15158 * src/lex.c (percent_table): Also accept `%yacc',
15159 `%fixed_output_files', `%defines', `%no_parser', `%verbose', and
15160 `%debug'.
15161 Handle the actions for `%semantic_parser' and `%pure_parser' here,
15162 instead of returning a token.
15163 * src/lex.h (SEMANTIC_PARSER, PURE_PARSER): Remove, unused.
15164 * src/reader.c (read_declarations): Adjust.
15165 * src/files.c (open_files): Don't call `compute_base_names', don't
15166 compute `attrsfile' since they depend upon data which might be
15167 *in* the input file now.
15168 (output_files): Do it here.
15169 * src/output.c (output_headers): Document the fact that this patch
15170 introduces a guaranteed SEGV for semantic parsers.
15171 * doc/bison.texinfo: Document them.
15172 * tests/suite.at: Exercise these %options.
15173
15174 2000-12-20 Akim Demaille <akim@epita.fr>
15175
15176 Also handle the output file (--verbose) with obstacks.
15177
15178 * files.c (foutput): Remove.
15179 (output_obstack): New.
15180 Adjust all dependencies.
15181 * src/conflicts.c: Return a string.
15182 * src/system.h (obstack_grow_string): Rename as...
15183 (obstack_sgrow): this. Be ready to work with non literals.
15184 (obstack_fgrow4): New.
15185
15186 2000-12-20 Akim Demaille <akim@epita.fr>
15187
15188 * src/files.c (open_files): Fix the computation of short_base_name
15189 in the case of `-o foo.tab.c'.
15190
15191 2000-12-20 Akim Demaille <akim@epita.fr>
15192
15193 * src/reader.c (copy_string, copy_comment, copy_comment2, copy_at)
15194 (copy_dollar): Now that everything uses obstacks, get rid of the
15195 FILE * parameters.
15196
15197 2000-12-20 Akim Demaille <akim@epita.fr>
15198
15199 * src/files.c (open_files): Actually the `.output' file is based
15200 on the short_base_name, not base_name.
15201 * tests/suite.at (Checking output file names): Adjust.
15202
15203 2000-12-20 Akim Demaille <akim@epita.fr>
15204
15205 * src/bison.s1: Remove, we now use directly...
15206 * src/bison.simple: this.
15207 * src/Makefile.am: Use pkgdata instead of data.
15208
15209 2000-12-20 Akim Demaille <akim@epita.fr>
15210
15211 * src/files.c (guard_obstack): New.
15212 (open_files): Initialize it.
15213 (output_files): Dump it...
15214 * src/files.h: Export it.
15215 * src/reader.c (copy_guard): Use it.
15216
15217 2000-12-19 Akim Demaille <akim@epita.fr>
15218
15219 * src/files.c (outfile, defsfile, actfile): Removed as global
15220 vars.
15221 (open_files): Don't compute them.
15222 (output_files): Adjust.
15223 (base_name, short_base_name): Be global.
15224 Adjust dependencies.
15225
15226 2000-12-19 Akim Demaille <akim@epita.fr>
15227
15228 * src/files.c (strsuffix): New.
15229 (stringappend): Be just like strcat but allocate.
15230 (base_names): Eve out from open_files.
15231 Try to simplify the rather hairy computation of base_name and
15232 short_base_name.
15233 (open_files): Use it.
15234 * tests/suite.at (Checking output file names): New test.
15235
15236 2000-12-19 Akim Demaille <akim@epita.fr>
15237
15238 * src/system.h (obstack_grow_literal_string): Rename as...
15239 (obstack_grow_string): this.
15240 * src/output.c (output_parser): Recognize `%% actions' instead of
15241 `$'.
15242 * src/bison.s1: s/$/%% actions/.
15243 * src/bison.hairy: Likewise.
15244
15245 2000-12-19 Akim Demaille <akim@epita.fr>
15246
15247 * src/output.c (output_parser): Compute the `#line' lines when
15248 there are.
15249 * src/Makefile.am (bison.simple): Be a simple copy of bison.s1.
15250 Suggested by Hans Aberg.
15251
15252 2000-12-19 Akim Demaille <akim@epita.fr>
15253
15254 Let the handling of the skeleton files be local to the procedures
15255 that use it.
15256
15257 * src/files.c (xfopen, xfclose, skeleton_find, guardfile): No
15258 longer static.
15259 (fparser, open_extra_files): Remove.
15260 (open_files, output_files): Don't take care of fparser.
15261 * src/files.h: Adjust.
15262 * src/output.c (output_parser): Open and close the file to the
15263 skeleton.
15264 * src/reader.c (read_declarations): When %semantic_parser, open
15265 fguard.
15266
15267 2000-12-19 Akim Demaille <akim@epita.fr>
15268
15269 * src/file.h (BISON_SIMPLE, BISON_HAIRY): Move from here...
15270 * src/system.h (BISON_SIMPLE, BISON_HAIRY): ... to here.
15271
15272 2000-12-19 Akim Demaille <akim@epita.fr>
15273
15274 * src/files.c (open_files): Yipee! We no longer need all the code
15275 looking for `/tmp' since we have no tmp file.
15276
15277 2000-12-19 Akim Demaille <akim@epita.fr>
15278
15279 * src/system.h (EXT_TAB, EXT_OUTPUT, EXT_STYPE_H, EXT_GUARD_C):
15280 New macros.
15281 * src/files.c (open_files): Less dependency on MSDOS etc.
15282
15283 2000-12-14 Akim Demaille <akim@epita.fr>
15284
15285 * src/bison.s1 (YYLLOC_DEFAULT): New macro.
15286 Provide a default definition.
15287 Use it when executing the default @ action.
15288 * src/reader.c (reader_output_yylsp): No longer include
15289 `timestamp' and `text' in the default YYLTYPE.
15290
15291 2000-12-12 Akim Demaille <akim@epita.fr>
15292
15293 * src/reader.c (copy_definition, parse_union_decl, copy_action)
15294 (copy_guard): Quote the file names.
15295 Reported by Laurent Mascherpa.
15296
15297 2000-12-12 Akim Demaille <akim@epita.fr>
15298
15299 * src/output.c (output_headers, output_program, output): Be sure
15300 to escape special characters when outputting filenames.
15301 (ACTSTR_PROLOGUE, ACTSTR_EPILOGUE): Remove.
15302 (output_headers): Don't depend on them, Use ACTSTR.
15303
15304 2000-11-17 Akim Demaille <akim@epita.fr>
15305
15306 * lib/obstack.h: Formatting changes.
15307 (obstack_grow, obstack_grow0): Don't cast WHERE at all: it
15308 prevents type checking.
15309 (obstack_ptr_grow, obstack_ptr_grow_fast): When assigning, don't
15310 cast the value to (void *): assigning a `foo *' to a `void *'
15311 variable is valid.
15312 (obstack_int_grow, obstack_int_grow_fast): Don't cast AINT to int.
15313 * src/reader.c (parse_union_decl): Typo: use obstack_1grow to
15314 append characters.
15315
15316 2000-11-17 Akim Demaille <akim@epita.fr>
15317
15318 * tests/Makefile.am (suite.m4, regression.m4, calc.m4): Rename
15319 as...
15320 (suite.m4, regression.m4, calc.m4): these.
15321 * tests/atgeneral.m4: Update from CVS Autoconf.
15322
15323 2000-11-17 Akim Demaille <akim@epita.fr>
15324
15325 * tests/regression.m4 (%union and --defines): New test,
15326 demonstrating a current bug in the obstack implementation.
15327
15328 2000-11-17 Akim Demaille <akim@epita.fr>
15329
15330 * src/bison.s1 (_YY_DECL_VARIABLES, YY_DECL_VARIABLES): New
15331 macros.
15332 Use them to declare the variables which are global or local to
15333 `yyparse'.
15334
15335 2000-11-17 Akim Demaille <akim@epita.fr>
15336
15337 * acconfig.h: Remove, no longer used.
15338
15339 2000-11-07 Akim Demaille <akim@epita.fr>
15340
15341 * src: s/Copyright (C)/Copyright/g.
15342
15343 2000-11-07 Akim Demaille <akim@epita.fr>
15344
15345 * src/reader.c (reader): #define YYLSP_NEEDED to 1 instead of just
15346 defining.
15347 * src/bison.s1: s/#ifdef YYLSP_NEEDED/#if YYLSP_NEEDED/.
15348
15349 2000-11-07 Akim Demaille <akim@epita.fr>
15350
15351 * src/bison.s1 (YYLEX): Use #if instead of #ifdef.
15352 Merge in a single CPP if/else.
15353
15354 2000-11-07 Akim Demaille <akim@epita.fr>
15355
15356 * src/output.c (output): Remove useless variables.
15357 * lib/obstack.c (obstack_grow, obstack_grow0): Rename the second
15358 argument `data' for consistency with the prototypes.
15359 Qualify it `const'.
15360 (obstack_copy, obstack_copy0): Rename the second argument as
15361 `address' for consistency. Qualify it `const'.
15362 * lib/obstack.h (obstack_copy, obstack_copy0, obstack_grow)
15363 (obstack_grow0, obstack_ptr_grow, obstack_ptr_grow_fast): Qualify
15364 `const' their input argument (`data' or `address').
15365 Adjust the corresponding macros to include `const' in casts.
15366
15367 2000-11-03 Akim Demaille <akim@epita.fr>
15368
15369 * src/Makefile.am (INCLUDES): s/PFILE/BISON_SIMPLE/.
15370 s/PFILE1/BISON_HAIRY/.
15371 Adjust dependencies.
15372
15373 2000-11-03 Akim Demaille <akim@epita.fr>
15374
15375 For some reason, this was not applied.
15376
15377 * src/files.c [VMS]: No longer include `ssdef.h', no longer define
15378 `unlink': it's no longer used.
15379
15380 2000-11-03 Akim Demaille <akim@epita.fr>
15381
15382 * src/files.c (skeleton_find): New function, eved out of...
15383 (open_files, open_extra_files): here.
15384
15385 2000-11-03 Akim Demaille <akim@epita.fr>
15386
15387 Don't use `atexit'.
15388
15389 * src/files.c (obstack_save): New function.
15390 (done): Rename as...
15391 (output_files): this.
15392 Use `obstack_save'.
15393 * src/main.c (main): Don't use `atexit' to register `done', since
15394 it no longer has to remove tmp files, just call `output_files'
15395 when there are no errors.
15396
15397 2000-11-02 Akim Demaille <akim@epita.fr>
15398
15399 * src/files.c [VMS]: No longer include `ssdef.h', no longer define
15400 `unlink': it's no longer used.
15401 * src/files.h: Formatting changes.
15402
15403 2000-11-02 Akim Demaille <akim@epita.fr>
15404
15405 Remove the last uses of mktemp and unlink/delete.
15406
15407 * src/files.c (fdefines, ftable): Removed.
15408 (defines_ostack, table_obstack): New.
15409 Adjust dependencies of the former into uses of the latter.
15410 * src/output.c (output_short_or_char_table, output_short_table):
15411 Convert to using obstacks.
15412 * src/reader.c (copy_comment2): Accept one FILE * and two
15413 obstacks.
15414 (output_token_defines, reader_output_yylsp): Use obstacks.
15415 * src/system.h (obstack_fgrow3): New.
15416 * po/POTFILES.in: Adjust.
15417
15418 2000-11-01 Akim Demaille <akim@epita.fr>
15419
15420 Change each use of `fattrs' into a use of `attrs_obstack'.
15421
15422 * src/reader.c (copy_at): Typo: s/yylloc/yyloc/.
15423 * src/files.c (fattrs): Remove.
15424 (attrs_obstack): New.
15425 Adjust all dependencies.
15426 (done): If SEMANTIC_PARSER, dump attrs_obstack into attrsfile.
15427
15428 2000-11-01 Akim Demaille <akim@epita.fr>
15429
15430 Introduce obstacks.
15431 Change each use of `faction' into a use of `action_obstack'.
15432
15433 * lib/obstack.h, lib/obstack.c: New files.
15434 * src/files.c (faction): Remove.
15435 (action_obstack): New.
15436 Adjust all dependencies.
15437
15438 2000-10-20 Akim Demaille <akim@epita.fr>
15439
15440 * lib/quote.h (PARAMS): New macro. Use it.
15441
15442 2000-10-16 Akim Demaille <akim@epita.fr>
15443
15444 * src/output.c (output_short_or_char_table): New function.
15445 (output_short_table, output_token_translations): Use it.
15446 (goto_actions): Use output_short_table.
15447
15448 2000-10-16 Akim Demaille <akim@epita.fr>
15449
15450 * src/symtab.c (bucket_new): New function.
15451 (getsym): Use it.
15452
15453 * src/output.c (output_short_table): New argument to display the
15454 comment associated with the table.
15455 Adjust dependencies.
15456 (output_gram): Use it.
15457 (output_rule_data): Nicer output layout for YYTNAME.
15458
15459 2000-10-16 Akim Demaille <akim@epita.fr>
15460
15461 * src/lex.c (read_typename): New function.
15462 (lex): Use it.
15463 * src/reader.c (copy_dollar): Likewise.
15464
15465 2000-10-16 Akim Demaille <akim@epita.fr>
15466
15467 * src/reader.c (copy_comment2): Expect the input stream to be on
15468 the `/' which is suspected to open a comment, instead of being
15469 called after `//' or `/*' was read.
15470 (copy_comment, copy_definition, parse_union_decl, copy_action)
15471 (copy_guard): Adjust.
15472
15473 2000-10-16 Akim Demaille <akim@epita.fr>
15474
15475 * src/reader.c (parse_expect_decl): Use `skip_white_space' and
15476 `read_signed_integer'.
15477
15478 2000-10-16 Akim Demaille <akim@epita.fr>
15479
15480 * src/reader.c (copy_dollar): New function.
15481 (copy_guard, copy_action): Use it.
15482
15483 2000-10-16 Akim Demaille <akim@epita.fr>
15484
15485 * lib/quote.h, lib/quote.c, lib/quotearg.h, lib/quotearg.c:
15486 * m4/prereq.m4, m4/c-bs-a.m4, m4/mbstate.m4:
15487 New files, from Fileutils 4.0.27.
15488 * src/main.c (printable_version): Remove.
15489 * src/lex.c, src/reader.c: Use `quote'.
15490
15491 2000-10-04 Akim Demaille <akim@epita.fr>
15492
15493 * lib/error.c, lib/error.h: New files, needed by xmalloc.c.
15494
15495 2000-10-04 Akim Demaille <akim@epita.fr>
15496
15497 * doc/bison.texinfo: Various typos spotted by Neil Booth.
15498
15499 2000-10-04 Akim Demaille <akim@epita.fr>
15500
15501 When a literal string is used to define two different tokens,
15502 `bison -v' segfaults.
15503 Reported by Piotr Gackiewicz, and fixed by Neil Booth.
15504
15505 * tests/regression.m4: New file.
15506 Include the core of the sample provided by Piotr Gackiewicz.
15507 * src/reader.c (parse_token_decl): Diagnose bad cases, and proceed
15508 properly.
15509
15510 2000-10-04 Akim Demaille <akim@epita.fr>
15511
15512 * src/reader.c (parse_expect_decl): Keep `count' within the size
15513 of `buffer'.
15514 From Neil Booth.
15515
15516 2000-10-02 Paul Eggert <eggert@twinsun.com>
15517
15518 * bison.s1 (yyparse): Assign the default value
15519 unconditionally, to avoid a GCC warning and make the parser a
15520 tad smaller.
15521
15522 2000-10-02 Akim Demaille <akim@epita.fr>
15523
15524 * src/getargs.c (getargs): Don't dump `--help' on unrecognized
15525 options.
15526
15527 2000-10-02 Akim Demaille <akim@epita.fr>
15528
15529 * src/derives.c, src/print.c, src/reduce.c: To ease the
15530 translation, move some `\n' out of the translated strings.
15531
15532 2000-10-02 Akim Demaille <akim@epita.fr>
15533
15534 The location tracking mechanism is precious for parse error
15535 messages. Nevertheless, it is enabled only when `@n' is used in
15536 the grammar, which is a different issue (you can use it in error
15537 message, but not in the grammar per se). Therefore, there should
15538 be another means to enable it.
15539
15540 * src/getargs.c (getargs): Support `--locations'.
15541 (usage): Report it.
15542 * src/getargs.h (locationsflag): Export it.
15543 * src/lex.c (percent_table): Support `%locations'.
15544 * src/reader.c (yylsp_needed): Remove this variable, now replaced
15545 with `locationsflag'.
15546 * doc/bison.texinfo: Document `--locations' and `%locations'.
15547 Sort the options.
15548 * tests/calc.m4: Test it.
15549
15550 For regularity of the names, replace each
15551 (nolineflag, toknumflag, rawtokenumflag, noparserflag): with...
15552 (no_lineflag, token_tableflag, rawflag, no_parserflag): this.
15553 In addition replace each `flag' with `_flag'.
15554
15555 2000-10-02 Akim Demaille <akim@epita.fr>
15556
15557 Also test parse error messages, including with YYERROR_VERBOSE.
15558
15559 * tests/calc.m4 (calc.y): Add support for `exp = exp' (non
15560 associative).
15561 Use it to check the computations.
15562 Use it to check `nonassoc' is honored.
15563 (AT_DATA_CALC_Y): Equip `calc.y' with YYERROR_VERBOSE when passed
15564 `--yyerror-verbose'.
15565 (_AT_CHECK_CALC): Adjust to this option.
15566 (_AT_CHECK_CALC_ERROR): New macro to check parse error messages.
15567
15568 2000-10-02 Akim Demaille <akim@epita.fr>
15569
15570 Test also `--verbose', `--defines' and `--name-prefix'. Testing
15571 the latter demonstrates a flaw in the handling of non debugging
15572 parsers introduced by myself on 2000-03-16: `#define yydebug 0'
15573 was used in order to simplify:
15574
15575 #if YYDEBUG
15576 if (yydebug)
15577 {
15578 ...
15579 }
15580 #endif
15581
15582 into
15583
15584 if (yydebug)
15585 {
15586 ...
15587 }
15588
15589 unfortunately this leads to a CPP conflict when
15590 `--name-prefix=foo' is used since it produces `#define yydebug
15591 foodebug'.
15592
15593 * src/bison.s1 [!YYDEBUG]: Do not define yydebug.
15594 (YYDPRINTF): New macro.
15595 Spread its use.
15596 * tests/calc.m4 (AT_CHECK_CALC): Do require a title, build it from
15597 the bison options.
15598 Also test `--verbose', `--defines' and `--name-prefix'.
15599
15600 2000-10-02 Akim Demaille <akim@epita.fr>
15601
15602 Improve the readability of the produced parsers.
15603
15604 * src/bison.s1: Formatting changes.
15605 Improve the comment related to the `$' mark.
15606 (yydefault): Don't fall through to `yyresume': `goto' there.
15607 * src/output.c (output_parser): When the `$' is met, skip the end
15608 of its line.
15609 New variable, `number_of_dollar_signs', to check there's exactly
15610 one `$' in the parser skeleton.
15611
15612 2000-10-02 Akim Demaille <akim@epita.fr>
15613
15614 * lib/xstrdup.c: New file, from the fileutils.
15615 * src/reader.c (parse_token_decl, get_type_name, parse_type_decl)
15616 (parse_assoc_decl, parse_thong_decl, get_type): Use `xstrdup'
15617 instead of strlen + xmalloc + strcpy.
15618 * src/symtab.c (copys): Remove, use xstrdup instead.
15619
15620 2000-10-02 Akim Demaille <akim@epita.fr>
15621
15622 * src/gram.h (associativity): New enum type which replaces the
15623 former CPP macros `RIGHT_ASSOC', `LEFT_ASSOC' and `NON_ASSOC' with
15624 `right_assoc', `left_assoc' and `non_assoc'.
15625 Adjust all dependencies.
15626 * src/reader.c: Formatting changes.
15627 (LTYPESTR): Don't define it, use it as a literal in
15628 `reader_output_yylsp'.
15629 * src/symtab.h (symbol_class): New enum type which replaces the
15630 former CPP macros `SUNKNOWN', `STOKEN and `SNTERM' with
15631 `sunknown', `stoken and `snterm'.
15632
15633 2000-10-02 Akim Demaille <akim@epita.fr>
15634
15635 * src/getargs.c (fixed_outfiles): Rename as...
15636 (yaccflag): for consistency and accuracy.
15637 Adjust dependencies.
15638
15639 2000-10-02 Akim Demaille <akim@epita.fr>
15640
15641 Use the more standard files `xalloc.h' and `xmalloc.c' instead of
15642 Bison's `allocate.c' and `alloc.h'. This patch was surprisingly
15643 difficult and introduced a lot of core dump. It turns out that
15644 Bison used an implementation of `xmalloc' based on `calloc', and
15645 at various places it does depend upon the initialization to 0. I
15646 have not tried to isolate the pertinent places, and all the former
15647 calls to Bison's `xmalloc' are now using `XCALLOC'. Someday,
15648 someone should address this issue.
15649
15650 * src/allocate.c, src/alloc.h, m4/bison-decl.m4: Remove.
15651 * lib/xmalloc.c, lib/xalloc.h, m4/malloc.m4, m4/realloc.m4: New
15652 files.
15653 Adjust dependencies.
15654 * src/warshall.h: New file.
15655 Propagate.
15656
15657 2000-10-02 Akim Demaille <akim@epita.fr>
15658
15659 Various anti-`extern in *.c' changes.
15660
15661 * src/system.h: Include `assert.h'.
15662
15663 2000-10-02 Akim Demaille <akim@epita.fr>
15664
15665 * src/state.h (nstates, final_state, first_state, first_shift)
15666 (first_reduction): Move their exportation from here...
15667 * src/LR0.h: to here.
15668 Adjust dependencies.
15669 * src/getargs.c (statisticsflag): New variable.
15670 Add support for `--statistics'.
15671 Adjust dependencies.
15672
15673 Remove a lot of now useless `extern' statements in most files.
15674
15675 2000-10-02 Akim Demaille <akim@epita.fr>
15676
15677 * src/LR0.h: New file.
15678 Propagate its use.
15679
15680 2000-10-02 Akim Demaille <akim@epita.fr>
15681
15682 * src/print.h: New file.
15683 Propagate its use.
15684 * src/print.c: Formatting and ordering changes.
15685 (verbose, terse): Replace with...
15686 (print_results): this new function.
15687 Adjust dependencies.
15688
15689 2000-10-02 Akim Demaille <akim@epita.fr>
15690
15691 * src/conflicts.c (conflict_report): New function.
15692 (conflict_log, verbose_conflict_log): Replace with...
15693 (print_conflicts): this function.
15694 Adjust dependencies.
15695 * src/conflicts.h: New file.
15696 Propagate its inclusion.
15697
15698 2000-10-02 Akim Demaille <akim@epita.fr>
15699
15700 * src/nullable.h: New file.
15701 Propagate its inclusion.
15702 * src/nullable.c: Formatting changes.
15703
15704 2000-10-02 Akim Demaille <akim@epita.fr>
15705
15706 * src/reduce.h: New file.
15707 Propagate its inclusion.
15708 * src/reduce.c: Topological sort and other formatting changes.
15709 (bool, TRUE, FALSE): Move their definition to...
15710 * src/system.h: here.
15711
15712 2000-10-02 Akim Demaille <akim@epita.fr>
15713
15714 * src/files.c: Formatting changes.
15715 (tryopen, tryclose, openfiles): Rename as...
15716 (xfopen, xfclose, open_files): this.
15717 (stringappend): static.
15718 * src/files.h: Complete the list of exported symbols.
15719 Propagate its use.
15720
15721 2000-10-02 Akim Demaille <akim@epita.fr>
15722
15723 * src/reader.h: New file.
15724 Propagate its use instead of tedious list of `extern' and
15725 prototypes.
15726 * src/reader.c: Formatting changes, topological sort,
15727 s/register//.
15728
15729 2000-10-02 Akim Demaille <akim@epita.fr>
15730
15731 * src/lex.h: Prototype `lex.c' exported functions.
15732 * src/reader.c: Adjust.
15733 * src/lex.c: Formatting changes.
15734 (safegetc): Rename as...
15735 (xgetc): this.
15736
15737 2000-10-02 Akim Demaille <akim@epita.fr>
15738
15739 * src/lalr.h: New file.
15740 Propagate its inclusion instead of prototypes and `extern'.
15741 * src/lalr.c: Formatting changes, topological sorting etc.
15742
15743 2000-10-02 Akim Demaille <akim@epita.fr>
15744
15745 * src/output.c (token_actions): Introduce a temporary array,
15746 YYDEFACT, that makes it possible for this function to use
15747 output_short_table.
15748
15749 2000-10-02 Akim Demaille <akim@epita.fr>
15750
15751 `user_toknums' is output as a `short[]' in `output.c', while it is
15752 defined as a `int[]' in `reader.c'. For consistency with the
15753 other output tables, `user_toknums' is now defined as a table of
15754 shorts.
15755
15756 * src/reader.c (user_toknums): Be a short table instead of an int
15757 table.
15758 Adjust dependencies.
15759
15760 Factor the short table outputs.
15761
15762 * src/output.c (output_short_table): New function.
15763 * src/output.c (output_gram, output_stos, output_rule_data)
15764 (output_base, output_table, output_check): Use it.
15765
15766 2000-10-02 Akim Demaille <akim@epita.fr>
15767
15768 * src/output.c (output): Topological sort of the functions, in
15769 order to get rid of the `static' prototypes.
15770 No longer use `register'.
15771 * src/output.h: New file.
15772 Propagate its inclusion in files explicitly prototyping functions
15773 from output.c.
15774
15775 2000-09-21 Akim Demaille <akim@epita.fr>
15776
15777 * src/atgeneral.m4: Update from Autoconf.
15778
15779 2000-09-21 Akim Demaille <akim@epita.fr>
15780
15781 * src/closure.h: New file.
15782 * src/closure.c: Formatting changes, topological sort over the
15783 functions, use of closure.h.
15784 (initialize_closure, finalize_closure): Rename as...
15785 (new_closure, free_closure): these. Adjust dependencies.
15786 * src/LR0.c: Formatting changes, topological sort, use of
15787 cloture.h.
15788 (initialize_states): Rename as...
15789 (new_states): this.
15790 * src/Makefile.am (noinst_HEADERS): Adjust.
15791
15792 2000-09-20 Akim Demaille <akim@epita.fr>
15793
15794 * src/acconfig.h: Don't protect config.h against multiple
15795 inclusion.
15796 Don't define PARAMS.
15797 * src/system.h: Define PARAMS.
15798 Remove some of the ad-hoc CPP magic for DOS, VMS etc.: this is the
15799 purpose of config.h. system.h must not try to fix wrong
15800 definitions in config.h.
15801
15802 2000-09-20 Akim Demaille <akim@epita.fr>
15803
15804 * src/derives.h: New file.
15805 * src/main.c, src/derives.h: Use it.
15806 Formatting changes.
15807 * src/Makefile.am (noinst_HEADERS): Adjust.
15808
15809 2000-09-20 Akim Demaille <akim@epita.fr>
15810
15811 * tests/atgeneral.m4: Update from Autoconf.
15812 * tests/calc.m4 (_AT_DATA_CALC_Y, AT_DATA_CALC_Y, _AT_CHECK_CALC)
15813 (AT_CHECK_CALC): New macros.
15814 Use these macros to test bison with options `', `--raw',
15815 `--debug', `--yacc', `--yacc --debug'.
15816
15817 2000-09-19 Akim Demaille <akim@epita.fr>
15818
15819 * src/output.c: Formatting changes.
15820 * src/machine.h: Remove, leaving its contents in...
15821 * src/system.h: here.
15822 Include stdio.h.
15823 Adjust all dependencies on stdio.h and machine.h.
15824 * src/getargs.h: New file.
15825 Let all `extern' declarations about getargs.c be replaced with
15826 inclusion of `getargs.h'.
15827 * src/Makefile.am (noinst_HEADERS): Adjust.
15828
15829 * tests/calc.m4 (yyin): Be initialized in main, not on the global
15830 scope.
15831 (yyerror): Returns void, not int.
15832 * doc/bison.texinfo: Formatting changes.
15833
15834 2000-09-19 Akim Demaille <akim@epita.fr>
15835
15836 * tests/calc.m4 (calc.y): Do not assign to stdin, as it's not
15837 portable.
15838
15839 2000-09-18 Akim Demaille <akim@epita.fr>
15840
15841 * configure.in: Append WARNING_CFLAGS to CFLAGS.
15842 * src/Makefile.am (INCLUDES): Don't.
15843 Be ready to fetch headers in lib/.
15844
15845 2000-09-18 Akim Demaille <akim@epita.fr>
15846
15847 * doc/bison.texinfo: Update the copyright.
15848 ANSIfy and GNUify the examples.
15849 Remove the old menu.
15850
15851 2000-09-18 Akim Demaille <akim@epita.fr>
15852
15853 First set of tests: use the `calc' example from the documentation.
15854
15855 * src/bison.s1 (yyparse): Condition the code using `yytname' which
15856 is defined only when YYDEBUG is.
15857 * m4/atconfig.m4 (AT_CONFIG): Adjust to Autoconf 2.13.
15858 * src/files.c (tryopen, tryclose): Formatting changes.
15859 Move to the top and be static.
15860 * src/reader.c (read_signed_integer): Likewise.
15861 * tests/calc.m4: New file.
15862 * Makefile.am, suite.m4: Adjust.
15863 * m4/atconfig.m4: Set BISON_SIMPLE and BISON_HAIRY.
15864
15865 2000-09-18 Akim Demaille <akim@epita.fr>
15866
15867 Add support for an Autotest test suite for Bison.
15868
15869 * m4/m4.m4, m4/atconfig.m4: New files.
15870 * m4/Makefile.am (EXTRA_DIST): Adjust.
15871 * tests/suite.m4, tests/Makefile.am, tests/atgeneral.m4: New
15872 files.
15873 * src/getargs.c: Display a more standard --version message.
15874 * src/reader.c (reader): Formatting changes.
15875 No longer depend upon VERSION_STRING.
15876 * configure.in: No longer use `dnl'.
15877 Set up the test suite and the new directory `tests/.
15878 (VERSION_STRING): Remove.
15879
15880 2000-04-14 Akim Demaille <akim@epita.fr>
15881
15882 * src/reader.c (copy_comment2): New function, same as former
15883 `copy_comment', but outputs into two FILE *.
15884 (copy_comment): Use it.
15885 (parse_union_decl): Use it.
15886 (get_type, parse_start_decl): Use the same `invalid' message.
15887 (parse_start_decl, parse_union_decl): Use the same `multiple'
15888 message.
15889 (parse_union_decl, copy_guard, copy_action): Use the same
15890 `unmatched' message.
15891 * m4/Makefile.am (EXTRA_DIST): Add `warning.m4'.
15892
15893 2000-03-31 Akim Demaille <akim@epita.fr>
15894
15895 * src/files.c (tryopen, tryclose): Move to the top.
15896 Be static.
15897
15898 2000-03-31 Akim Demaille <akim@epita.fr>
15899
15900 * src/main.c (main): Don't call `done', exit does it.
15901
15902 2000-03-31 Akim Demaille <akim@epita.fr>
15903
15904 * allocate.c: s/return (foo)/return foo/.
15905 * lalr.c: Likewise.
15906 * LR0.c: Likewise.
15907 * output.c: Likewise.
15908 * reader.c: Likewise.
15909 * symtab.c: Likewise.
15910 * vmsgetargs.c: Likewise.
15911
15912 2000-03-31 Akim Demaille <akim@epita.fr>
15913
15914 Clean up the error reporting functions.
15915
15916 * src/report.c: New file.
15917 * src/report.h: Likewise.
15918 * src/Makefile.am: Adjust.
15919 * m4/error.m4: New file.
15920 * m4/Makefile.am: Adjust.
15921 * configure.in (jm_PREREQ_ERROR): Call it.
15922 * src/main.c (int_to_string, banner, fatal_banner, warn_banner):
15923 Remove.
15924 (fatal, fatals): Remove. All callers use complain.c::fatal.
15925 (warn, warni, warns, warnss, warnss): Remove. All callers use
15926 complain.c::complain.
15927 (toomany): Remove, use fatal instead.
15928 * src/files.c (done): No argument, use complain_message_count.
15929 * src/main.c (main): Register `done' to `atexit'.
15930
15931 * src/getargs.c (usage): More `fputs', less `fprintf'.
15932
15933 2000-03-28 Akim Demaille <akim@epita.fr>
15934
15935 * lib/: New directory.
15936 * Makefile.am (SUBDIRS): Adjust.
15937 * configure.in: Adjust.
15938 (LIBOBJS): Although not used yet, AC_SUBST it, otherwise it's
15939 useless.
15940 * src/alloca.c: Moved to lib/.
15941 * src/getopt.c: Likewise.
15942 * src/getopt1.c: Likewise.
15943 * src/getopt.h: Likewise.
15944 * src/ansi2knr.c: Likewise.
15945 * src/ansi2knr.1: Likewise.
15946 * src/Makefile.am: Adjust.
15947 * lib/Makefile.am: New file.
15948
15949 2000-03-28 Akim Demaille <akim@epita.fr>
15950
15951 * src/getargs.c (usage): Refresh the help message.
15952
15953 2000-03-17 Akim Demaille <akim@epita.fr>
15954
15955 * src/getopt1.c: Updated from textutils 2.0e
15956 * src/getopt.c: Likewise.
15957 * src/getopt.h: Likewise.
15958
15959 2000-03-17 Akim Demaille <akim@epita.fr>
15960
15961 * src/Makefile.am (bison.simple): Fix the awk program: quote only
15962 the file name, not the whole `#line LINE FILE'.
15963
15964 2000-03-17 Akim Demaille <akim@epita.fr>
15965
15966 On syntax errors, report the token on which we choked.
15967
15968 * src/bison.s1 (yyparse): In the label yyerrlab, when
15969 YYERROR_VERBOSE, add yychar in msg.
15970
15971 2000-03-17 Akim Demaille <akim@epita.fr>
15972
15973 * src/reader.c (copy_at): New function.
15974 (copy_guard): Use it.
15975 (copy_action): Use it.
15976
15977 2000-03-17 Akim Demaille <akim@epita.fr>
15978
15979 Be kind to translators, save some useless translations.
15980
15981 * src/main.c (banner): New function.
15982 (fatal_banner): Use it.
15983 (warn_banner): Use it.
15984
15985 2000-03-17 Akim Demaille <akim@epita.fr>
15986
15987 * src/reader.c (copy_definition): Use copy_string and
15988 copy_comment. Removed now unused `match', `ended',
15989 `cplus_comment'.
15990 (copy_comment, copy_string): Moved, to be visible from
15991 copy_definition.
15992
15993 2000-03-17 Akim Demaille <akim@epita.fr>
15994
15995 * src/reader.c (copy_string): Declare `static inline'. No
15996 problems with inline, since it is checked by configure.
15997 (copy_comment): Likewise.
15998
15999 2000-03-17 Akim Demaille <akim@epita.fr>
16000
16001 * src/reader.c (packsymbols): Formatting changes.
16002
16003 2000-03-17 Akim Demaille <akim@epita.fr>
16004
16005 * src/reader.c (copy_comment): New function, factored out from:
16006 (copy_action): Use it. Removed now unused `match', `ended',
16007 `cplus_comment'.
16008 (copy_guard): Likewise.
16009
16010 2000-03-17 Akim Demaille <akim@epita.fr>
16011
16012 * src/reader.c (copy_string): New function, factored out from:
16013 (copy_action): Use it.
16014 (copy_guard): Likewise.
16015
16016 2000-03-17 Akim Demaille <akim@epita.fr>
16017
16018 Change the handling of @s so that they behave exactly like $s.
16019 There is now a pseudo variable @$ (readble and writable), location
16020 of the lhs of the rule (by default ranging from the location of
16021 the first symbol of the rhs, to the location of the last symbol,
16022 or, if the rhs is empty, YYLLOC).
16023
16024 * src/bison.s1 [YYLSP_NEEDED] (yyloc): New variable, twin of
16025 yyval.
16026 (yyparse): When providing a default semantic action, provide a
16027 default location action.
16028 (after the $): No longer change `*YYLSP', just stack YYLOC the
16029 same way you stack YYVAL.
16030 * src/reader.c (read_declarations): Use warns.
16031 (copy_guard, case '@'): Also recognize `@$', expanded as `YYLOC'.
16032 (copy_action, case '@'): Likewise.
16033 Use a standard error message, to save useless work from
16034 translators.
16035
16036 2000-03-17 Akim Demaille <akim@epita.fr>
16037
16038 * src/bison.s1: Formatting and cosmetics changes.
16039 * src/reader.c: Likewise.
16040 Update the Copyright notice.
16041
16042 2000-03-17 Akim Demaille <akim@epita.fr>
16043
16044 * src/bison.s1 (#line): All set to `#line' only, since the
16045 Makefile now handles them.
16046
16047 2000-03-16 Akim Demaille <akim@epita.fr>
16048
16049 * src/output.c (output_rule_data): Output the documentation of
16050 some of the tables.
16051 (Copyright notice): Update.
16052 Formatting changes.
16053
16054 2000-03-16 Akim Demaille <akim@epita.fr>
16055
16056 * src/bison.s1 [!YYDEBUG]: Define yydebug to 0. This allows to
16057 remove most `#if YYDEBUG != 0', since `if (yydebug)' is enough.
16058 One `#if YYDEBUG' remains, since it uses variables which are
16059 defined only if `YYDEBUG != 0'.
16060
16061 2000-03-16 Akim Demaille <akim@epita.fr>
16062
16063 * src/bison.s1 (yyparse): Reorganize the definitions of the stacks
16064 and related variables so that the similarities are highlighted.
16065
16066 2000-03-16 Akim Demaille <akim@epita.fr>
16067
16068 * src/bison.s1: Properly indent CPP directives.
16069
16070 2000-03-16 Akim Demaille <akim@epita.fr>
16071
16072 * src/bison.s1: Properly indent the `alloca' CPP section.
16073
16074 2000-03-16 Akim Demaille <akim@epita.fr>
16075
16076 Do not hard code values of directories in `configure.in'.
16077 Update the `configure' tool chain.
16078
16079 * configure.in (XPFILE, XPFILE1, LOCALEDIR): Remove, handled by
16080 src/makefile.am.
16081 (VERSION_STRING): Use the third arg of AC_DEFINE_UNQUOTED.
16082 (AC_OUTPUT): Add m4/Makefile.
16083 Bump to bison 1.28a, 1.29 has never been released.
16084 * acconfig.h (XPFILE, XPFILE1, LOCALEDIR): Remove, since they are
16085 handled via src/Makefile.am.
16086 (VERSION_STRING, PROTOTYPES, ENABLE_NLS, HAVE_CATGETS,
16087 HAVE_GETTEXT, HAVE_LC_MESSAGES, HAVE_STPCPY): Remove, handled by
16088 autoheader.
16089 * Makefile.am (SUBDIRS): Add m4.
16090 (ACLOCAL_AM_FLAGS): New variable.
16091 (AUTOMAKE_OPTIONS): Add check-news.
16092 * src/Makefile.am (bison.simple): Use awk to replace #line lines with
16093 the proper line number and file name.
16094 (DEFS): Propagate the location of bison library files and of the
16095 locale files.
16096 (INCLUDES): Added `-I ..' so that one can compile with srcdir !=
16097 builddir.
16098 * acinclude.m4: Remove, replaced by the directory m4.
16099 * m4/Makefile.am (EXTRA_DIST): New variable.
16100 * m4/gettext.m4: New file, from the fileutils.
16101 * m4/lcmessage.m4: Likewise
16102 * m4/progtest.m4: Likewise.
16103 * m4/bison-decl.m4: New file, extracted from former acinclude.m4.
16104
16105 2000-03-10 Akim Demaille <akim@epita.fr>
16106
16107 * src/closure.c:
16108 Formatting changes of various comments.
16109 Respect the GNU coding standards at various places.
16110 Don't use `_()' when no translation is needed.
16111
16112 1999-12-13 Jesse Thilo <jthilo@gnu.org>
16113
16114 * src/files.c:
16115 OS/2 honors TMPDIR environment variable.
16116
16117 1999-12-13 Jesse Thilo <jthilo@gnu.org>
16118
16119 * doc/bison.texinfo: Tweaked spelling and grammar.
16120 Updated ISBN.
16121 Removed reference to price of printed copy.
16122 Mention BISON_SIMPLE and BISON_HAIRY.
16123
16124 1999-12-13 Jesse Thilo <jthilo@gnu.org>
16125
16126 * configure.in, NEWS:
16127 Bison 1.29 released.
16128
16129 1999-10-27 Jesse Thilo <jthilo@gnu.org>
16130
16131 * doc/.cvsignore, doc/Makefile.am, doc/refcard.tex:
16132 Added reference card.
16133
16134 1999-07-26 Jesse Thilo <jthilo@gnu.org>
16135
16136 * po/ru.po: Added Russian translation.
16137
16138 1999-07-26 Jesse Thilo <jthilo@gnu.org>
16139
16140 * configure.in: Added Russian translation.
16141
16142 1999-07-06 Jesse Thilo <jthilo@gnu.org>
16143
16144 * configure.in, NEWS, README:
16145 Released version 1.28.
16146
16147 1999-06-14 Jesse Thilo <jthilo@gnu.org>
16148
16149 * src/system.h:
16150 Squashed redefinition warning on some systems.
16151
16152 * src/getargs.c, src/Makefile.am, src/reader.c, src/version.c:
16153 Have configure build version string instead of relying on ANSI string
16154 concatentation.
16155
16156 1999-06-14 Jesse Thilo <jthilo@gnu.org>
16157
16158 * po/POTFILES.in: Got rid of version.c.
16159
16160 1999-06-14 Jesse Thilo <jthilo@gnu.org>
16161
16162 * acconfig.h, configure.in:
16163 Have configure build version string instead of relying on ANSI string
16164 concatentation.
16165
16166 1999-06-08 Jesse Thilo <jthilo@gnu.org>
16167
16168 * doc/bison.1:
16169 Dropped mention of `+' for long-named options.
16170
16171 1999-05-30 Jesse Thilo <jthilo@gnu.org>
16172
16173 * src/files.c: Added <unistd.h> for unlink().
16174
16175 * src/Makefile.am, src/system.h:
16176 I18n fixes.
16177
16178 1999-05-30 Jesse Thilo <jthilo@gnu.org>
16179
16180 * README: Added a FAQ list.
16181
16182 * configure.in, acconfig.h:
16183 I18n fixes.
16184
16185 1999-05-30 Jesse Thilo <jthilo@gnu.org>
16186
16187 * doc/FAQ, doc/Makefile.am:
16188 Added a FAQ list.
16189
16190 1999-05-19 Jesse Thilo <jthilo@gnu.org>
16191
16192 * src/alloc.h, src/symtab.h, src/version.c:
16193 Protected inclusion of "config.h" with HAVE_CONFIG_H.
16194
16195 1999-04-18 Jesse Thilo <jthilo@gnu.org>
16196
16197 * src/.cvsignore, src/Makefile.am:
16198 Reorganized: sources in `src', documentation in `doc'.
16199
16200 * src/lex.c (literalchar):
16201 fixed the code for escaping double quotes (thanks
16202 Jonathan Czisny.)
16203
16204 1999-04-18 Jesse Thilo <jthilo@gnu.org>
16205
16206 * po/de.po, po/es.po, po/fr.po, po/nl.po, po/POTFILES.in:
16207 Adjusted paths to reflect directory reorganization.
16208
16209 1999-04-18 Jesse Thilo <jthilo@gnu.org>
16210
16211 * doc/.cvsignore, doc/Makefile.am:
16212 Reorganized: sources in `src', documentation in `doc'.
16213
16214 1999-04-18 Jesse Thilo <jthilo@gnu.org>
16215
16216 * configure.in:
16217 Updated AC_INIT file to reflect directory reorganization.
16218
16219 * configure.in, .cvsignore, Makefile.am, POTFILES.in:
16220 Reorganized: sources in `src', documentation in `doc'.
16221
16222 1999-04-13 Jesse Thilo <jthilo@gnu.org>
16223
16224 * src/allocate.c:
16225 Don't declare calloc() and realloc() if not necessary.
16226
16227 1999-04-13 Jesse Thilo <jthilo@gnu.org>
16228
16229 * configure.in, acconfig.h, acinclude.m4:
16230 Don't declare calloc() and realloc() if not necessary.
16231
16232 1999-03-23 Jesse Thilo <jthilo@gnu.org>
16233
16234 * po/.cvsignore: Added i18n support.
16235
16236 1999-03-23 Jesse Thilo <jthilo@gnu.org>
16237
16238 * acconfig.h, configure.in, Makefile.am:
16239 Added i18n support.
16240
16241 1999-03-22 Jesse Thilo <jthilo@gnu.org>
16242
16243 * src/bison.s1: Fixed #line numbers.
16244
16245 1999-03-15 Jesse Thilo <jthilo@gnu.org>
16246
16247 * po/es.po, po/fr.po, po/nl.po, po/de.po:
16248 Added PO files from Translation Project.
16249
16250 1999-03-03 Jesse Thilo <jthilo@gnu.org>
16251
16252 * Makefile.am:
16253 Added support for non-ANSI compilers (ansi2knr).
16254
16255 1999-02-16 Jesse Thilo <jthilo@gnu.org>
16256
16257 * configure.in: Bumped version number to 1.27.
16258
16259 * Makefile.am:
16260 Added `bison.simple' to list of files removed by `make distclean'.
16261
16262 1999-02-12 Jesse Thilo <jthilo@gnu.org>
16263
16264 * src/files.c, src/files.h:
16265 Defined locations of parser files in config.h instead of Makefile.
16266
16267 1999-02-12 Jesse Thilo <jthilo@gnu.org>
16268
16269 * acconfig.h, acinclude.m4, configure.in, Makefile.am:
16270 Defined locations of parser files in config.h instead of Makefile.
16271
16272 1999-02-09 Jesse Thilo <jthilo@gnu.org>
16273
16274 * Makefile.am:
16275 Removed inappropriate use of $< macro.
16276
16277 1999-02-05 Jesse Thilo <jthilo@gnu.org>
16278
16279 * po/Makefile.in.in, po/POTFILES.in:
16280 Add `po' directory skeleton.
16281
16282 1999-01-27 Jesse Thilo <jthilo@gnu.org>
16283
16284 * README: Document help-bison list.
16285
16286 * configure.in: Add check for mkstemp().
16287
16288 1999-01-20 Jesse Thilo <jthilo@gnu.org>
16289
16290 * src/conflicts.c, src/LR0.c, src/output.c, src/reader.c:
16291 Hush a few compiler warnings.
16292
16293 * src/files.c:
16294 Add tryclose(), which verifies that fclose was successful.
16295 Hush a couple of compiler warnings.
16296
16297 1999-01-20 Jesse Thilo <jthilo@gnu.org>
16298
16299 * Makefile.am, OChangeLog:
16300 ChangeLog is now automatically generated. Include the old version as
16301 OChangeLog.
16302
16303 1999-01-14 Jesse Thilo <jthilo@gnu.org>
16304
16305 * 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:
16306 Update FSF address.
16307
16308 1999-01-14 Jesse Thilo <jthilo@gnu.org>
16309
16310 * doc/bison.texinfo: Fix formatting glitch.
16311
16312 * doc/bison.texinfo: Update FSF address.
16313
16314 1999-01-14 Jesse Thilo <jthilo@gnu.org>
16315
16316 * acconfig.h: Update FSF address.
16317
16318 1999-01-08 Jesse Thilo <jthilo@gnu.org>
16319
16320 * src/system.h:
16321 Don't define PACKAGE here, since config.h defines it.
16322
16323 1998-12-30 Jesse Thilo <jthilo@gnu.org>
16324
16325 * src/reader.c: Update copyright date.
16326
16327 * src/main.c:
16328 Ditch sprintf to statically-sized buffers in fatal/warn functions in
16329 favor of output directly to stderr (avoids buffer overruns).
16330
16331 * src/reader.c: Some checks for premature EOF.
16332
16333 * 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:
16334 Use prototypes if the compiler understands them.
16335
16336 * src/files.c: Honor TMPDIR on Unix hosts.
16337 Use prototypes if the compiler understands them.
16338
16339 * src/reader.c:
16340 Fix a couple of buffer overrun bugs.
16341 Use prototypes if the compiler understands them.
16342
16343 * src/system.h: Include unistd.h and ctype.h.
16344 Use #ifdef instead of #if for NLS symbols.
16345
16346 1998-12-30 Jesse Thilo <jthilo@gnu.org>
16347
16348 * doc/bison.texinfo:
16349 Delete comment "consider using @set for edition number, etc..." since
16350 we now are doing so.
16351
16352 1998-12-30 Jesse Thilo <jthilo@gnu.org>
16353
16354 * configure.in:
16355 Use prototypes if the compiler understands them.
16356
16357 * NEWS: Document 1.26 highlights.
16358
16359 * Makefile.am: Require Automake 1.3 or later.
16360
16361 * acconfig.h:
16362 Use prototypes if the compiler understands them.
16363
16364 1998-12-29 Jesse Thilo <jthilo@gnu.org>
16365
16366 * src/version.c:
16367 Use VERSION symbol from automake for version number.
16368
16369 1998-12-29 Jesse Thilo <jthilo@gnu.org>
16370
16371 * acconfig.h, configure.in, version.cin:
16372 Use VERSION symbol from automake for version number.
16373
16374 1998-11-28 Jesse Thilo <jthilo@gnu.org>
16375
16376 * Makefile.am:
16377 Distribute original version of simple parser (bison.s1), not built
16378 version (bison.simple).
16379
16380 1998-11-28 Jesse Thilo <jthilo@gnu.org>
16381
16382 * doc/bison.texinfo: Add info dir entry.
16383
16384 * doc/bison.texinfo:
16385 Let automake put version number into documentation.
16386
16387 1998-11-26 Jesse Thilo <jthilo@gnu.org>
16388
16389 * src/bison.cld, src/build.com, src/vmshlp.mar:
16390 Add non-RCS files from /gd/gnu/bison.
16391
16392 1998-11-26 Jesse Thilo <jthilo@gnu.org>
16393
16394 * doc/bison.1:
16395 Document the BISON_HAIRY and BISON_SIMPLE variables.
16396
16397 1998-11-25 Jesse Thilo <jthilo@gnu.org>
16398
16399 * src/version.c: Build version.c automatically.
16400
16401 * src/reader.c:
16402 Fix token numbering (used to start at 258, not 257).
16403
16404 * src/system.h: Include config.h.
16405
16406 * src/getargs.c: Update bug report address.
16407
16408 * src/alloca.c, src/getopt1.c, src/getopt.c, src/getopt.h:
16409 Get latest copies of alloca.c, getopt.c, getopt.h, getopt1.c from gnu.org.
16410
16411 1998-11-25 Jesse Thilo <jthilo@gnu.org>
16412
16413 * Makefile.am:
16414 Rename bison.simple to bison.s1 (bison.simple is then built from bison.s1).
16415
16416 * configure.in, version.cin:
16417 Build version.c automatically.
16418
16419 * AUTHORS: Add AUTHORS file.
16420
16421 * README: Update bug report address.
16422
16423 * bison.simple:
16424 Rename bison.simple to bison.s1 (bison.simple is then built from bison.s1).
16425
16426 * configure.in, Makefile.am, Makefile.in, stamp-h.in:
16427 Add automake stuff.
16428
16429 1998-11-25 Jesse Thilo <jthilo@gnu.org>
16430
16431 * doc/bison.texinfo: Clean up some formatting.
16432
16433 1998-05-05 Richard Stallman <rms@gnu.org>
16434
16435 * doc/bison.texinfo:
16436 Explain better why to make a pure parser.
16437
16438 1998-01-05 Richard Stallman <rms@gnu.org>
16439
16440 * src/files.c (openfiles):
16441 [_WIN32 && !__CYGWIN32__] Use TEMP or Temp to
16442 find a temporary directory, if possible. Do not unlink files while
16443 they are open.
16444
16445 1997-08-25 Richard Stallman <rms@gnu.org>
16446
16447 * src/reader.c (stack_offset;):
16448 Change some warni to warns.
16449
16450 * src/lex.c (literalchar): Use warns, not warni.
16451
16452 1997-06-28 Richard Stallman <rms@gnu.org>
16453
16454 * src/bison.s1: Add a Bison version comment.
16455
16456 * src/main.c (fatal, warn, berror):
16457 Use program_name.
16458
16459 1997-06-28 Richard Stallman <rms@gnu.org>
16460
16461 * Makefile.in (bison_version): New variable.
16462 (dist): Use that variable.
16463 (bison.s1): Substitute the Bison version into bison.simple.
16464
16465 * bison.simple: Add a Bison version comment.
16466
16467 1997-06-18 Richard Stallman <rms@gnu.org>
16468
16469 * src/main.c (fatal, warn, berror):
16470 Make error messages standard.
16471 (toomany): Improve error message text.
16472
16473 * 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:
16474 new.h renamed to alloc.h.
16475
16476 1997-06-18 Richard Stallman <rms@gnu.org>
16477
16478 * Makefile.in: new.h renamed to alloc.h.
16479
16480 1997-05-24 Richard Stallman <rms@gnu.org>
16481
16482 * src/lex.c (literalchar):
16483 Fix the code for escaping \, " and '.
16484
16485 (lex): Avoid trouble when there are many chars
16486 to discard in a char literal with just several chars in it.
16487
16488 1997-05-17 Richard Stallman <rms@gnu.org>
16489
16490 * src/bison.s1:
16491 Use malloc, if using alloca is troublesome.
16492 (YYSTACK_USE_ALLOCA): New flag macro.
16493 Define it for some systems and compilers.
16494 (YYSTACK_ALLOC): New macro.
16495 (yyparse): Use YYSTACK_ALLOC to allocate stack.
16496 If it was malloc'd, free it.
16497
16498 1997-05-17 Richard Stallman <rms@gnu.org>
16499
16500 * bison.simple:
16501 Use malloc, if using alloca is troublesome.
16502 (YYSTACK_USE_ALLOCA): New flag macro.
16503 Define it for some systems and compilers.
16504 (YYSTACK_ALLOC): New macro.
16505 (yyparse): Use YYSTACK_ALLOC to allocate stack.
16506 If it was malloc'd, free it.
16507
16508 1997-04-23 Richard Stallman <rms@gnu.org>
16509
16510 * src/bison.s1:
16511 (alloca) [__hpux]: Always define as __builtin_alloca.
16512
16513 1997-04-23 Richard Stallman <rms@gnu.org>
16514
16515 * bison.simple:
16516 (alloca) [__hpux]: Always define as __builtin_alloca.
16517
16518 1997-04-22 Richard Stallman <rms@gnu.org>
16519
16520 * src/bison.s1:
16521 [__hpux]: Include alloca.h (right for HPUX 10)
16522 instead of declaring alloca (right for HPUX 9).
16523
16524 * src/bison.s1 (__yy_memcpy):
16525 Declare arg `count' as unsigned int.
16526 (yyparse): Cast third arg to __yy_memcpy to unsigned int.
16527
16528 1997-04-22 Richard Stallman <rms@gnu.org>
16529
16530 * bison.simple:
16531 [__hpux]: Include alloca.h (right for HPUX 10)
16532 instead of declaring alloca (right for HPUX 9).
16533
16534 * bison.simple (__yy_memcpy):
16535 Declare arg `count' as unsigned int.
16536 (yyparse): Cast third arg to __yy_memcpy to unsigned int.
16537
16538 1997-01-03 Richard Stallman <rms@gnu.org>
16539
16540 * src/allocate.c: [__STDC__ or _MSC_VER]:
16541 Declare calloc and realloc to return void *.
16542
16543 1997-01-02 Richard Stallman <rms@gnu.org>
16544
16545 * src/system.h:
16546 [_MSC_VER]: Include stdlib.h and process.h.
16547 [_MSC_VER] (getpid): Define as macro--translate it to _getpid.
16548
16549 * src/main.c (main): Return FAILURE as a value.
16550 (printable_version): Declare arg as int, not char.
16551
16552 1997-01-02 Richard Stallman <rms@gnu.org>
16553
16554 * Makefile.in (dist):
16555 Explicitly check for symlinks, and copy them.
16556
16557 1996-12-19 Richard Stallman <rms@gnu.org>
16558
16559 * src/files.c:
16560 [_MSC_VER] (XPFILE, XPFILE1): Define, if not already defined.
16561
16562 1996-12-18 Paul Eggert <eggert@gnu.org>
16563
16564 * src/bison.s1 (yyparse):
16565 If __GNUC__ and YYPARSE_PARAM are both defined,
16566 declare yyparse to have a void * argument.
16567
16568 1996-12-18 Paul Eggert <eggert@gnu.org>
16569
16570 * bison.simple (yyparse):
16571 If __GNUC__ and YYPARSE_PARAM are both defined,
16572 declare yyparse to have a void * argument.
16573
16574 1996-12-17 Richard Stallman <rms@gnu.org>
16575
16576 * src/reduce.c (nbits): Add some casts.
16577
16578 1996-08-12 Richard Stallman <rms@gnu.org>
16579
16580 * src/bison.s1: Test _MSDOS as well as _MSDOS_.
16581
16582 1996-08-12 Richard Stallman <rms@gnu.org>
16583
16584 * bison.simple: Test _MSDOS as well as _MSDOS_.
16585
16586 1996-07-31 Richard Stallman <rms@gnu.org>
16587
16588 * src/bison.s1:
16589 [__sun && __i386]: Include alloca.h.
16590
16591 1996-07-31 Richard Stallman <rms@gnu.org>
16592
16593 * bison.simple:
16594 [__sun && __i386]: Include alloca.h.
16595
16596 1996-07-30 Richard Stallman <rms@gnu.org>
16597
16598 * src/bison.s1: Comment change.
16599
16600 * src/bison.s1: Test _MSDOS_, not MSDOS.
16601
16602 1996-07-30 Richard Stallman <rms@gnu.org>
16603
16604 * bison.simple: Comment change.
16605
16606 * bison.simple: Test _MSDOS_, not MSDOS.
16607
16608 1996-06-01 Richard Stallman <rms@gnu.org>
16609
16610 * 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:
16611 Insert `_' macro around many string constants.
16612
16613 * src/main.c:
16614 Insert `_' macro around many string constants.
16615
16616 (main): Call setlocale, bindtextdomain and textdomain.
16617
16618 * src/system.h: [HAVE_LOCALE_H]: Include locale.h.
16619 [! HAVE_LOCALE_H] (setlocale): Define as no-op.
16620 [ENABLE_NLS]: Include libintl.h.
16621 [ENABLE_NLS] (gettext): Define.
16622 [! ENABLE_NLS] (bintextdomain, textdomain, _): Consolation definitions.
16623 (N_, PACKAGE, LOCALEDIR): New macros.
16624
16625 1996-06-01 Richard Stallman <rms@gnu.org>
16626
16627 * POTFILES.in: New file.
16628
16629 * Makefile.in (allocate.o):
16630 Define target explicitly.
16631
16632 * Makefile.in (CFLAGS): Set to @CFLAGS@.
16633 (LDFLAGS): Set to @LDFLAGS@.
16634 (configure): Run autoconf only if preceding `cd' succeeds.
16635 (bison.s1): Redirect output to temporary file then move the
16636 temporary to the target, rather than redirecting directly to bison.s1.
16637 (clean): Remove config.status and config.log.
16638 (distclean): Don't remove config.status here.
16639
16640 1996-05-12 Richard Stallman <rms@gnu.org>
16641
16642 * src/bison.s1:
16643 (__yy_memcpy) [__cplusplus]: Reorder declarations of variables f and t.
16644
16645 1996-05-12 Richard Stallman <rms@gnu.org>
16646
16647 * bison.simple:
16648 (__yy_memcpy) [__cplusplus]: Reorder declarations of variables f and t.
16649
16650 1996-05-11 Richard Stallman <rms@gnu.org>
16651
16652 * src/bison.s1 (__yy_memcpy):
16653 Really reorder the args, as was supposedly done on Feb 14 1995.
16654 (yyparse): Calls changed accordingly.
16655
16656 1996-05-11 Richard Stallman <rms@gnu.org>
16657
16658 * Makefile.in (dist): Don't use $(srcdir).
16659
16660 * bison.simple (__yy_memcpy):
16661 Really reorder the args, as was supposedly done on Feb 14 1995.
16662 (yyparse): Calls changed accordingly.
16663
16664 1996-01-27 Richard Stallman <rms@gnu.org>
16665
16666 * src/output.c (output_rule_data):
16667 Test YYERROR_VERBOSE in the conditional
16668 around the definition of ttyname.
16669
16670 1995-12-29 Richard Stallman <rms@gnu.org>
16671
16672 * src/bison.s1:
16673 Fix line numbers in #line commands.
16674
16675 1995-12-29 Richard Stallman <rms@gnu.org>
16676
16677 * bison.simple:
16678 Fix line numbers in #line commands.
16679
16680 1995-12-27 Richard Stallman <rms@gnu.org>
16681
16682 * src/bison.s1 (YYPARSE_PARAM_DECL):
16683 In C++, make it always null.
16684 (YYPARSE_PARAM_ARG): New macro.
16685 (yyparse): Use YYPARSE_PARAM_ARG.
16686
16687 1995-12-27 Richard Stallman <rms@gnu.org>
16688
16689 * bison.simple (YYPARSE_PARAM_DECL):
16690 In C++, make it always null.
16691 (YYPARSE_PARAM_ARG): New macro.
16692 (yyparse): Use YYPARSE_PARAM_ARG.
16693
16694 1995-11-29 Richard Stallman <rms@gnu.org>
16695
16696 * doc/bison.texinfo:
16697 Describe literal string tokens, %raw, %no_lines, %token_table.
16698
16699 1995-11-29 Daniel Hagerty <hag@gnu.org>
16700
16701 * doc/bison.texinfo: Fixed update date
16702
16703 1995-10-16 Richard Stallman <rms@gnu.org>
16704
16705 * src/version.c: Version 1.25.
16706
16707 1995-10-16 Richard Stallman <rms@gnu.org>
16708
16709 * NEWS: *** empty log message ***
16710
16711 1995-10-16 Richard Stallman <rms@gnu.org>
16712
16713 * doc/bison.1, doc/bison.rnh:
16714 Add new options.
16715
16716 1995-10-15 Richard Stallman <rms@gnu.org>
16717
16718 * src/vmsgetargs.c, src/getargs.c:
16719 Added -n, -k, and -raw switches.
16720 (noparserflag, toknumflag, rawtoknumflag): New variables.
16721
16722 * src/symtab.h (SALIAS):
16723 New #define for adding aliases to %token.
16724 (struct bucket): Added `alias' field.
16725
16726 * src/reduce.c (reduce_grammar):
16727 Revise error message.
16728 (print_notices): Remove final `.' from error message.
16729
16730 * src/reader.c (reader_output_yylsp):
16731 New function.
16732 (readgram): Use `#if 0' around code that accepted %command
16733 inside grammar rules: The documentation doesn't allow it,
16734 and it will fail since the %command processors scan for the next %.
16735 (parse_token_decl): Extended the %token
16736 declaration to allow a multi-character symbol as an alias.
16737 (parse_thong_decl): New function.
16738 (read_declarations): Added %thong declarations.
16739 (read_declarations): Handle NOOP to deal with allowing
16740 % declarations as another means to specify the flags.
16741 (readgram): Allow %prec prior to semantics embedded in a rule.
16742 (skip_to_char, read_declarations, copy_definition)
16743 (parse_token_decl, parse_start_decl, parse_type_decl)
16744 (parse_assoc_decl, parse_union_decl, parse_expect_decl)
16745 (get_type_name, copy_guard, copy_action, readgram)
16746 (get_type, packsymbols): Revised most error messages.
16747 Changed `fatal' to `warnxxx' to avoid aborting for error.
16748 Revised and use multiple warnxxx functions to avoid using VARARGS1.
16749 (read_declarations): Improve the error message for
16750 an invalid character. Do not abort.
16751 (read_declarations, copy_guard, copy_action): Use
16752 printable_version to avoid unprintable characters in printed output.
16753 (parse_expect_decl): Error if argument to %expect exceeds 10 digits.
16754 (parse_token_decl, parse_assoc_decl, parse_type_decl, get_type):
16755 Allow the type of a non-terminal can be given
16756 more than once, as long as all specifications give the same type.
16757
16758 * src/output.c:
16759 (output_headers, output_trailers, output, output_gram)
16760 (output_rule_data): Implement noparserflag variable.
16761 Implement toknumflag variable.
16762 (output): Call reader_output_yylsp to output LTYPESTR.
16763
16764 * src/main.c (main):
16765 If reader sees an error, don't process the grammar.
16766 (fatals): Updated to not use VARARGS1.
16767 (printable_version, int_to_string, warn, warni, warns, warnss)
16768 (warnsss): New error reporting functions. Avoid abort for error.
16769
16770 * src/lex.h:
16771 Added THONG and NOOP for alias processing.
16772 Added SETOPT for the new code that allows setting options with %flags.
16773
16774 * src/lex.c:
16775 Include getopt.h. Add some extern decls.
16776 (safegetc): New function to deal with EOF gracefully.
16777 (literalchar); new function to deal with reading \ escapes.
16778 (lex): Use literalchar.
16779 (lex): Implemented "..." tokens.
16780 (literalchar, lex, parse_percent_token): Made tokenbuffer
16781 always contain the token. This includes growing the token
16782 buffer while reading an integer.
16783 (parse_percent_token): Replaced if-else statement with percent_table.
16784 (parse_percent_token): Added % declarations as another
16785 way to specify the flags -n, -l, and -r. Also added hooks for
16786 -d, -k, -y, -v, -t, -p, -b, -o, but implementation requires
16787 major changes to files.c.
16788 (lex) Retain in the incoming stream a character following
16789 an incorrect '/'.
16790 (skip_white_space, lex): Revised most error messages
16791 and changed fatal to warn to avoid aborting.
16792 (percent_table): Added %thong declarations.
16793
16794 * src/gram.h: Comment changes.
16795
16796 * src/files.c (openfiles, open_extra_files, done):
16797 Add faction flag
16798 and actfile file. Handle noparserflag. Both for -n switch.
16799
16800 * src/conflicts.c (resolve_sr_conflict):
16801 Remove use of alloca.
16802
16803 1995-06-01 Jim Meyering <meyering@gnu.org>
16804
16805 * doc/bison.texinfo: *** empty log message ***
16806
16807 1995-05-06 Richard Stallman <rms@gnu.org>
16808
16809 * src/bison.s1: Comment change.
16810
16811 1995-05-06 Richard Stallman <rms@gnu.org>
16812
16813 * bison.simple: Comment change.
16814
16815 1995-05-03 Richard Stallman <rms@gnu.org>
16816
16817 * src/version.c: Version now 1.24.
16818
16819 * src/bison.s1: Change distribution terms.
16820
16821 * src/version.c: Version now 1.23.
16822
16823 1995-05-03 Richard Stallman <rms@gnu.org>
16824
16825 * doc/bison.texinfo:
16826 Rewrite "Conditions for Using Bison".
16827 Update version to 1.24.
16828
16829 1995-05-03 Richard Stallman <rms@gnu.org>
16830
16831 * bison.simple: Change distribution terms.
16832
16833 1995-02-23 Richard Stallman <rms@gnu.org>
16834
16835 * src/files.c: Test __VMS_POSIX as well as VMS.
16836
16837 1995-02-14 Jim Meyering <meyering@gnu.org>
16838
16839 * src/bison.s1 (__yy_memcpy):
16840 Renamed from __yy_bcopy to avoid
16841 confusion. Reverse FROM and TO arguments to be consistent with
16842 those of memcpy.
16843
16844 1995-02-14 Jim Meyering <meyering@gnu.org>
16845
16846 * bison.simple (__yy_memcpy):
16847 Renamed from __yy_bcopy to avoid
16848 confusion. Reverse FROM and TO arguments to be consistent with
16849 those of memcpy.
16850
16851 1994-11-10 David J. MacKenzie <djm@gnu.org>
16852
16853 * NEWS: reformat
16854
16855 * NEWS: New file.
16856
16857 * Makefile.in (DISTFILES): Include NEWS.
16858
16859 * Makefile.in (DISTFILES):
16860 Include install-sh, not install.sh.
16861
16862 * configure.in: Update to Autoconf v2 macro names.
16863
16864 1994-10-05 David J. MacKenzie <djm@gnu.org>
16865
16866 * Makefile.in: fix typo
16867
16868 * Makefile.in (prefix, exec_prefix):
16869 Let configure set them.
16870
16871 1994-09-28 David J. MacKenzie <djm@gnu.org>
16872
16873 * Makefile.in: Set datadir to $(prefix)/share.
16874
16875 1994-09-15 Richard Stallman <rms@gnu.org>
16876
16877 * src/bison.s1:
16878 Update copyright notice and GPL version.
16879
16880 1994-09-15 Richard Stallman <rms@gnu.org>
16881
16882 * bison.simple:
16883 Update copyright notice and GPL version.
16884
16885 1994-07-12 Richard Stallman <rms@gnu.org>
16886
16887 * src/reduce.c, src/reader.c:
16888 entered into RCS
16889
16890 1994-05-05 David J. MacKenzie <djm@gnu.org>
16891
16892 * Makefile.in: entered into RCS
16893
16894 1994-03-26 Richard Stallman <rms@gnu.org>
16895
16896 * src/bison.s1: entered into RCS
16897
16898 1994-03-26 Richard Stallman <rms@gnu.org>
16899
16900 * bison.simple: entered into RCS
16901
16902 1994-03-25 Richard Stallman <rms@gnu.org>
16903
16904 * src/main.c: entered into RCS
16905
16906 1994-03-24 Richard Stallman <rms@gnu.org>
16907
16908 * src/conflicts.c: entered into RCS
16909
16910 1994-01-02 Richard Stallman <rms@gnu.org>
16911
16912 * Makefile.in: *** empty log message ***
16913
16914 1993-11-21 Richard Stallman <rms@gnu.org>
16915
16916 * src/bison.s1: *** empty log message ***
16917
16918 1993-11-21 Richard Stallman <rms@gnu.org>
16919
16920 * doc/bison.texinfo: entered into RCS
16921
16922 * doc/bison.texinfo: *** empty log message ***
16923
16924 1993-11-21 Richard Stallman <rms@gnu.org>
16925
16926 * bison.simple: *** empty log message ***
16927
16928 1993-10-25 David J. MacKenzie <djm@gnu.org>
16929
16930 * doc/bison.texinfo: *** empty log message ***
16931
16932 1993-10-19 Richard Stallman <rms@gnu.org>
16933
16934 * src/bison.s1: *** empty log message ***
16935
16936 1993-10-19 Richard Stallman <rms@gnu.org>
16937
16938 * bison.simple: *** empty log message ***
16939
16940 1993-10-14 Richard Stallman <rms@gnu.org>
16941
16942 * src/bison.s1: *** empty log message ***
16943
16944 1993-10-14 Richard Stallman <rms@gnu.org>
16945
16946 * bison.simple: *** empty log message ***
16947
16948 1993-09-14 David J. MacKenzie <djm@gnu.org>
16949
16950 * doc/bison.texinfo: *** empty log message ***
16951
16952 1993-09-13 Noah Friedman <friedman@gnu.org>
16953
16954 * Makefile.in: *** empty log message ***
16955
16956 1993-09-10 Richard Stallman <rms@gnu.org>
16957
16958 * src/conflicts.c: *** empty log message ***
16959
16960 * src/system.h: entered into RCS
16961
16962 1993-09-10 Richard Stallman <rms@gnu.org>
16963
16964 * doc/bison.1: entered into RCS
16965
16966 1993-09-06 Noah Friedman <friedman@gnu.org>
16967
16968 * src/version.c: entered into RCS
16969
16970 1993-09-06 Noah Friedman <friedman@gnu.org>
16971
16972 * Makefile.in: *** empty log message ***
16973
16974 1993-07-30 David J. MacKenzie <djm@gnu.org>
16975
16976 * Makefile.in: *** empty log message ***
16977
16978 1993-07-24 Richard Stallman <rms@gnu.org>
16979
16980 * src/bison.s1: *** empty log message ***
16981
16982 1993-07-24 Richard Stallman <rms@gnu.org>
16983
16984 * bison.simple: *** empty log message ***
16985
16986 1993-07-08 David J. MacKenzie <djm@gnu.org>
16987
16988 * Makefile.in: *** empty log message ***
16989
16990 1993-07-04 Richard Stallman <rms@gnu.org>
16991
16992 * src/bison.s1: *** empty log message ***
16993
16994 1993-07-04 Richard Stallman <rms@gnu.org>
16995
16996 * bison.simple: *** empty log message ***
16997
16998 1993-06-26 David J. MacKenzie <djm@gnu.org>
16999
17000 * src/getargs.c: entered into RCS
17001
17002 1993-06-26 David J. MacKenzie <djm@gnu.org>
17003
17004 * doc/bison.texinfo: *** empty log message ***
17005
17006 * doc/bison.1: New file.
17007
17008 1993-06-25 Richard Stallman <rms@gnu.org>
17009
17010 * src/getargs.c: New file.
17011
17012 1993-06-16 Richard Stallman <rms@gnu.org>
17013
17014 * src/bison.s1: *** empty log message ***
17015
17016 1993-06-16 Richard Stallman <rms@gnu.org>
17017
17018 * bison.simple: *** empty log message ***
17019
17020 1993-06-03 Richard Stallman <rms@gnu.org>
17021
17022 * src/bison.s1: New file.
17023
17024 1993-06-03 Richard Stallman <rms@gnu.org>
17025
17026 * doc/bison.texinfo: *** empty log message ***
17027
17028 1993-06-03 Richard Stallman <rms@gnu.org>
17029
17030 * bison.simple: New file.
17031
17032 1993-05-19 Richard Stallman <rms@gnu.org>
17033
17034 * doc/bison.texinfo: New file.
17035
17036 1993-05-07 Noah Friedman <friedman@gnu.org>
17037
17038 * Makefile.in: *** empty log message ***
17039
17040 1993-04-28 Noah Friedman <friedman@gnu.org>
17041
17042 * src/reader.c: *** empty log message ***
17043
17044 1993-04-23 Noah Friedman <friedman@gnu.org>
17045
17046 * src/alloc.h: entered into RCS
17047
17048 1993-04-20 David J. MacKenzie <djm@gnu.org>
17049
17050 * src/version.c: *** empty log message ***
17051
17052 * src/files.c, src/allocate.c:
17053 entered into RCS
17054
17055 * src/reader.c: *** empty log message ***
17056
17057 * src/lex.c: entered into RCS
17058
17059 * src/conflicts.c: New file.
17060
17061 * src/symtab.c: entered into RCS
17062
17063 * src/alloc.h: New file.
17064
17065 * src/LR0.c: entered into RCS
17066
17067 1993-04-18 Noah Friedman <friedman@gnu.org>
17068
17069 * src/reader.c: New file.
17070
17071 * src/version.c: *** empty log message ***
17072
17073 1993-04-18 Noah Friedman <friedman@gnu.org>
17074
17075 * Makefile.in: *** empty log message ***
17076
17077 1993-04-17 Noah Friedman <friedman@gnu.org>
17078
17079 * Makefile.in: *** empty log message ***
17080
17081 1993-04-15 Richard Stallman <rms@gnu.org>
17082
17083 * src/main.c, src/files.c:
17084 New file.
17085
17086 1993-04-15 Noah Friedman <friedman@gnu.org>
17087
17088 * configure.in: entered into RCS
17089
17090 * configure.in: *** empty log message ***
17091
17092 * configure.in: New file.
17093
17094 1993-04-14 Richard Stallman <rms@gnu.org>
17095
17096 * Makefile.in: New file.
17097
17098 1993-04-13 Richard Stallman <rms@gnu.org>
17099
17100 * src/version.c: New file.
17101
17102 1993-03-25 Richard Stallman <rms@gnu.org>
17103
17104 * src/output.c: entered into RCS
17105
17106 1992-09-25 Richard Stallman <rms@gnu.org>
17107
17108 * configure.bat: entered into RCS
17109
17110 1992-06-22 Richard Stallman <rms@gnu.org>
17111
17112 * src/vmsgetargs.c: entered into RCS
17113
17114 1992-06-22 Richard Stallman <rms@gnu.org>
17115
17116 * doc/bison.rnh: entered into RCS
17117
17118 1992-04-20 David J. MacKenzie <djm@gnu.org>
17119
17120 * README: entered into RCS
17121
17122 1992-01-22 Richard Stallman <rms@gnu.org>
17123
17124 * src/machine.h: entered into RCS
17125
17126 1991-12-21 Richard Stallman <rms@gnu.org>
17127
17128 * src/lalr.c, src/closure.c:
17129 entered into RCS
17130
17131 1991-12-20 Richard Stallman <rms@gnu.org>
17132
17133 * src/state.h: entered into RCS
17134
17135 1991-12-18 Richard Stallman <rms@gnu.org>
17136
17137 * src/print.c, src/nullable.c, src/derives.c:
17138 entered into RCS
17139
17140 1991-11-03 David J. MacKenzie <djm@gnu.org>
17141
17142 * src/warshall.c, src/types.h, src/symtab.h, src/lex.h, src/gram.c, src/gram.h, src/files.h:
17143 entered into RCS
17144
17145 1988-09-09 Richard Stallman <rms@gnu.org>
17146
17147 * src/bison.hairy: entered into RCS
17148
17149 1987-12-16 Richard Stallman <rms@gnu.org>
17150
17151 * REFERENCES: entered into RCS
17152
17153
17154 -----
17155
17156 Copyright (C) 1987, 1988, 1991, 1992, 1993, 1994, 1995, 1996,
17157 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free
17158 Software Foundation, Inc.
17159
17160 Copying and distribution of this file, with or without
17161 modification, are permitted provided the copyright notice and this
17162 notice are preserved.
17163
17164 $Id$