]> git.saurik.com Git - bison.git/blame - ChangeLog
* bootstrap: Put in need-ngettext argument to AM_GNU_GETTEXT,
[bison.git] / ChangeLog
CommitLineData
11daa4e7
PE
12006-08-11 Paul Eggert <eggert@cs.ucla.edu>
2
3 * bootstrap: Put in need-ngettext argument to AM_GNU_GETTEXT,
4 to prevent failures when building on older platforms.
5 Check for autopoint failure.
6 Set XGETTEXT_OPTIONS to values that check for C format strings,
7 so that translators are warned about them (this also helps
8 prevent core dumps).
9
10 * lib/subpipe.c (create_subpipe): Use new gnulib pipe_safer
11 function, since it simplifies our code a bit.
12
13 * configure.ac (AC_ARG_ENABLE): Use -Wextra -Wno-sign-compare
14 rather than -W, so we don't get bogus warnings about sign comparisons.
15 Add -Wpointer-arith, since that warning is useful (it reports code
16 that does not conform to C89 and that some compilers reject).
17 * data/c.m4, data/glr.c, data/lalr1.cc, data/yacc.c: Undo latest change,
18 since it's no longer needed.
19
f9bfc42a
JD
202006-08-10 Joel E. Denny <jdenny@ces.clemson.edu>
21
22 Clean up scanners a bit.
23 * src/flex-scanner.h (FLEX_NO_OBSTACK): New macro that blocks obstack
24 definitions so gcc won't warn when obstack_for_string is unused.
25 * src/scan-code.l: config.h and system.h are already #include'd by
26 scan-code-c.c, so get rid of them here.
27 * src/scan-gram.l: Likewise.
28 * src/scan-skel.l: Likewise, and use flex-scanner.h without obstack
29 definitions rather than duplicating the rest of it.
30 * src/scan-gram-c.c, scan-skel-c.c: #include "system.h".
31
06e8700a
JD
322006-08-09 Joel E. Denny <jdenny@ces.clemson.edu>
33
34 Suppress signed/unsigned comparison warnings for yycheck.
35 * data/c.m4 (b4_safest_int_type): New macro.
36 * data/glr.c, data/lalr1.cc: Wherever you compare yycheck[i] against
37 a signed int type, cast it to b4_safest_int_type first.
38 * data/yacc.c: Likewise.
39 (b4_safest_int_type): Overwrite the one from c.m4 since b4_int_type is
40 also overwritten.
41
9c437126
PE
422006-08-09 Ralf Wildenhues <Ralf.Wildenhues@gmx.de> (tiny change)
43
44 * doc/bison.texinfo: Fix some typos.
45
284d8a13
PE
462006-08-02 Paul Eggert <eggert@cs.ucla.edu>
47
48 * m4/.cvsignore: Add inttypes_h.m4,lib-ld.m4, lib-prefix.m4,
49 po.m4, stdint_h.m4, uintmax_t.m4, ulonglong.m4, warning.m4.
50
51 * bootstrap (gnulib_tool): Stop using --assume-autoconf;
52 the latest gnulib does this a different way.
53 (get_translations): Sharuzzaman Ahmat Raslan reported that the ms
54 translation was patched, so stop omitting it.
55
ec5479ce
JD
562006-07-29 Joel E. Denny <jdenny@ces.clemson.edu>
57
58 Enable declaration of default %printer/%destructor. Make the parser
59 use these for all user-declared grammar symbols for which the user does
60 not declare a specific %printer/%destructor. Thus, the parser uses it
61 for token 0 if the user declares it but not if Bison generates it as
62 $end. Discussed starting at
63 <http://lists.gnu.org/archive/html/bison-patches/2006-02/msg00064.html>,
64 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00091.html>,
65 and
66 <http://lists.gnu.org/archive/html/bison-patches/2006-07/msg00019.html>.
67 * NEWS (2.3+): Mention.
68 * doc/bison.texinfo (Actions in Mid-Rule): It's no longer impossible to
69 declare a %destructor for a mid-rule's semantic value. It's just
70 impossible to declare one specific to it.
71 (Freeing Discarded Symbols): Mention that @$ can be used in %destructor
72 code. Describe default %destructor form.
73 * src/parse-gram.y (grammar_declaration): Parse default
74 %printer/%destructor declarations.
75 * src/output.c (symbol_destructors_output): Use symbol_destructor_get
76 and symbol_destructor_location_get rather than accessing the destructor
77 and destructor_location members of struct symbol.
78 (symbol_printers_output): Likewise but for %printer's.
79 * src/reader.c (symbol_should_be_used): Likewise but for %destructor's
80 again.
81 * src/symtab.c (default_destructor, default_destructor_location,
82 default_printer, default_printer_location): New static global
83 variables to record the default %destructor and %printer.
84 (symbol_destructor_get, symbol_destructor_location_get,
85 symbol_printer_get, symbol_printer_location_get): New functions to
86 compute the appropriate %destructor and %printer for a symbol.
87 (default_destructor_set, default_printer_set): New functions to set the
88 default %destructor and %printer.
89 * src/symtab.h: Prototype all those new functions.
90 * tests/actions.at (Default %printer and %destructor): New test to
91 check that the right %printer and %destructor are called, that they're
92 not called for $end, and that $$ and @$ work correctly.
93 (Default %printer and %destructor for user-declared end token): New
94 test to check that the default %printer and %destructor are called for
95 a user-declared end token.
96 * tests/input.at (Default %printer and %destructor redeclared, Unused
97 values with default %destructor): New tests to check related grammar
98 warnings and errors.
99
868d2d96
JD
1002006-07-29 Joel E. Denny <jdenny@ces.clemson.edu>
101
102 Clean up handling of %destructor for the end token (token 0).
103 Discussed starting at
104 <http://lists.gnu.org/archive/html/bison-patches/2006-07/msg00019.html>
105 and
106 <http://lists.gnu.org/archive/html/help-bison/2006-07/msg00013.html>.
107
108 Make the skeletons consistent in how they pop the end token and invoke
109 its %destructor.
110 * data/glr.c (yyrecoverSyntaxError, yyparse): Don't pop the start
111 state, which has token number 0, since this would invoke the
112 %destructor for the end token.
113 * data/lalr1.cc (yy::parser::parse): Don't check for the final state
114 until after shifting the end token, or else it won't be popped.
115 * data/yacc.c (yyparse): Likewise.
116
117 * data/glr.c (yyparse): Clear the lookahead after shifting it even when
118 it's the end token. Upon termination, destroy an unshifted lookahead
119 even when it's the end token.
120 * data/lalr1.cc (yy::parser::parse): Likewise.
121 * data/yacc.c (yyparse): Likewise.
122
123 * src/reader.c (packgram): Don't check rule 0. This suppresses unused
124 value warnings for the end token when the user gives the end token a
125 %destructor.
126
127 * tests/actions.at (Printers and Destructors): Test all the above.
128
62a9592d
PE
1292006-07-24 Paul Eggert <eggert@cs.ucla.edu>
130
131 Update to latest gnulib and gettext versions.
132 * bootstrap (gnulib-modules): Remove hard-locale, stdio-safer.
133 Add fopen-safer.
134 (gnulib_files): Add m4/warning.m4. Don't worry about files
135 overwritten by autopoint.
136 Replace gt_INTL_SUBDIR_CORE with an empty body in m4/gettext_gl.m4.
137 Suppress "id", "ms", "tr" translations for now, since gettext 0.15
138 rejects them.
139 Don't use autoreconf; instead, invoke autopoint etc. by hand,
140 so that we can remove the intl files at a better time.
141 (intl_files_to_remove): Remove aclocal.m4, since it gets
142 rebuilt anyway. Remove m4/inttypes_h.m4, m4/inttypes.m4,
143 m4/isc-posix.m4, m4/lib-ld.m4, m4/lib-prefix.m4, m4/po.m4,
144 m4/stdint_h.m4, m4/uintmax_t.m4, m4/ulonglong.m4.
145 Add m4/inttypes-h.m4, m4/lock.m4, m4/visibility.m4.
146 Remove datarootdir hack; no longer needed.
147 * configure.ac: Use gl_WARNING_CFLAGS rather than BISON_WARNING.
148 (AM_GNU_GETTEXT_VERSION): Bump from 0.12 to 0.15.
149 * lib/.cvsignore: Remove hard-locale.c, hard-locale.h, strdup.c,
150 strdup.h.
151 * m4/.cvsignore: Remove hard-locale.m4, strdup.m4.
152 * m4/warning.m4: Remove from CVS, since we now use gnulib's version.
153
10d6970f
PE
1542006-07-20 Paul Eggert <eggert@cs.ucla.edu>
155
156 * bootstrap: Adjust to today's change to gnulib-tool by invoking
157 it with --assume-autoconf='latest-stable'.
158
50a33993
JD
1592006-07-13 Joel E. Denny <jdenny@ces.clemson.edu>
160
161 * src/parse-gram.y (grammar_declaration): Don't confuse Doxygen (at
162 least 1.4.7 and 1.4.4) by putting a #line between `typedef union
163 YYSTYPE' and `{'.
164 * src/muscle_tab.h (muscle_grow): Replace the header comments with
165 those from muscle_tab.c since the old ones are misleading.
166
2ce4ed68
AD
1672006-07-13 Akim Demaille <akim@epita.fr>
168
169 Support %define "KEY" {VALUE}.
170 * src/scan-code.h, src/scan-code.l (translate_action)
171 (translate_rule_action, translate_symbol_action, translate_code):
172 Return char *, not const char *.
173 * src/parse-gram.y (declaration): Rename as...
174 (prologue_declaration): this.
175 (string_content): Remove this nonterminal, use STRING.
176 (braceless, content, content.opt): New nonterminal.
177 Use them.
178 (%define): Now accept content.opt, i.e., accept also BRACED_CODE
179 as value.
180 * src/scan-gram.l (getargs.h): Don't include it.
181
db7e5eb5
PE
1822006-07-12 Paul Eggert <eggert@cs.ucla.edu>
183
184 * data/lalr1.cc (YYCDEBUG): Use 'if (yydebug_) (*yycdebug_)'
185 rather than a for-loop that declares a local bool variable. This
186 should work around a compatibility problem with a Cray x1e C++
187 compiler reported by Hung Nguyen in
188 <http://lists.gnu.org/archive/html/help-bison/2006-07/msg00022.html>.
189 The for-loop was introduced in the 2004-11-17 change but I don't
190 know why it was needed.
191
a5d80ba5
AD
1922006-07-12 Akim Demaille <akim@epita.fr>
193
194 * data/c.m4: Comment changes.
195
23eb2a69
AD
1962006-07-10 Akim Demaille <akim@lrde.epita.fr>
197
198 * src/complain.c (error_message, ERROR_MESSAGE): New.
199 To factor...
200 (fatal_at, fatal, warn_at, warn, complain_at, complain): these.
201 * src/complain.h, src/complain.c (warning_issued): Remove, unused.
202
ddc8ede1
PE
2032006-07-09 Paul Eggert <eggert@cs.ucla.edu>
204
205 * NEWS: Instead of %union, you can define and use your own union type
206 YYSTYPE if your grammar contains at least one <type> tag.
207 Your YYSTYPE need not be a macro; it can be a typedef.
208 * doc/bison.texinfo (Value Type, Multiple Types, Location Type):
209 (Union Decl, Decl Summary): Document this.
210 * data/glr.c (YYSTYPE): Implement this.
211 * data/glr.cc (YYSTYPE): Likewise.
212 * data/lalr1.cc (YYSTYPE): Likewise.
213 * data/yacc.c (YYSTYPE): Likewise.
214 * src/output.c (prepare): Output tag_seen_flag.
215 * src/parse-gram.y (declaration, grammar_declaration):
216 Use 'union_seen' rather than 'typed' to determine whether
217 %union has been seen, since grammars can now be typed without
218 %union.
219 (symbol_declaration, type.opt, symbol_def):
220 Keep track of whether a tag has been seen.
221 * src/reader.c (union_seen, tag_seen): New vars.
222 (typed): remove.
223 * src/reader.h (union_seen, tag_seen, typed): Likewise.
224 * src/scan-code.l (untyped_var_seen): New variable.
225 (handle_action_dollar): Adjust to above changes.
226 (handle_action_dollar, handle_action_at):
227 Improve overflow checking for outlandish numbers.
228 * tests/input.at (AT_CHECK_UNUSED_VALUES): Redo test to
229 avoid new diagnostics generated by above changes.
230 * tests/regression.at (YYSTYPE typedef): Add test to check
231 for type tags without %union.
232
233 * src/symlist.c (symbol_list_length): Return int, not unsigned
234 int, since callers expect int. This may need to get revisited
235 once we have proper integer overflow checking.
236
237 * src/scan-gram.h (gram_scanner_cursor): Remove decl, since this
238 object is now static.
239
240 * src/getargs.c (flags_argmatch): Return void, not int,
241 to pacify ./configure --enable-gcc-warnings.
242
243 * src/flex-scanner.h (STRING_FREE): Don't use FLEX_PREFIX (last_string)
244 since last_string is already defined to FLEX_PREFIX (last_string).
245
7b42569e
AD
2462006-07-09 Akim Demaille <akim@lrde.epita.fr>
247
248 Implement --warnings/-W.
249 * src/getargs.c (report_argmatch, trace_argmatch): Remove,
250 replaced by...
251 (flags_argmatch, FLAGS_ARGMATCH): this new function and macro.
252 Adjust callers.
253 * src/getargs.h, src/getargs.c (warnings, warnings_flags)
254 (warnings_args, warnings_types): New.
255 (getargs, short_options, long_options): Accept -W/--warnings.
256 Sort the options by alphabetical order, upper case letter right
257 before its lower case.
258
3b452f4e
JD
2592006-07-09 Joel E. Denny <jdenny@ces.clemson.edu>
260
261 Change %merge result type clash warnings to errors. Discussed at
262 <http://lists.gnu.org/archive/html/bison-patches/2006-07/msg00026.html>.
263 * src/reader.c (record_merge_function_type): Use complain_at.
264 * tests/glr-regression.at (Missed %merge type warnings when LHS type is
265 declared later): Update test case results.
266
b8a41559
AD
2672006-07-09 Akim Demaille <akim@lrde.epita.fr>
268
269 * src/getargs.h, src/getargs.c: Swap --report and --trace handling
270 to be in alphabetical order.
271 (trace_args): Spelling fixes.
272
cd9e1ba2
PE
2732006-07-09 Paul Eggert <eggert@cs.ucla.edu>
274
275 * data/yacc.c (YYID, yy_stack_print): Prefix local vars with "yy"
276 so they don't collide with user-defined macros.
277 (yy_stack_print): Don't assume that yytype_int16 promotes to int;
278 this was never guaranteed, and now that we're using gnulib stdint,
279 which defines int_fast16_t to long int, the problem is exposed.
280
cb48f191
PE
2812006-07-08 Paul Eggert <eggert@cs.ucla.edu>
282
b8445a15
PE
283 * data/c.m4 (b4_basename): Simplify a bit, since we don't
284 need the full POSIX semantics (and weren't implementing them
285 anyway).
286
cb48f191
PE
287 Adjust to Autoconf 2.60 and today's gnulib.
288 * bootstrap (gnulib_modules): Add stdint.
289 Remove special case for m4/onceonly_2_57.m4, since gnulib-tool
290 no longer copies it.
291 (intl_files_to_remove): Remove m4/longlong.m4 and m4/wchar_t.m4,
292 since stdint needs the former and wcwidth (which is now required
293 by mbswidth) needs the latter.
294 Append 'datarootdir = @datarootdir@' to po/Makefile.in.in, to
295 work around a compatibility glitch between gettext 0.14.6 and
296 Autoconf 2.60.
297 * configure.ac (AC_PREREQ): Require Autoconf 2.60.
298 Do not check for uintptr_t, since new stdint module does the right
299 thing.
300 * lib/.cvsignore: Remove alloca.c, alloca.h, alloca_.h.
301 Add stdint.h, stdint_.h, wcwidth.h.
302 * m4/.cvsignore: Remove alloca.m4, onceonly.m4.
303 Add absolute-header.m4, double-slash-root.m4, longlong.m4,
304 stdint.m4, wchar_t.m4, wcwidth.m4.
305 * src/files.c: Include <dirname.h> and <stdio-safer.h> in the
306 usual order for ../lib/*.h files.
307 (file_name_split): Use last_component, not base_name, to adjust
308 to gnulib changes.
309 * src/parse-gram.h: Include <strverscmp.h> in the usual order
310 for ../lib/*.h files.
311 (YYTYPE_INT16, YYTYPE_INT8, YYTYPE_UINT16, YYTYPE_UINT8):
312 Define unconditionally, since we now assume the stdint module.
313 * src/scan-skel.l: Include <dirname.h>.
314 (BASE_QPUTS): Use last_component, not base_name.
315 * src/system.h: Include <unlocked-io.h> in the usual order
316 for ../lib/*.h files. Include <stdint.h> unconditionally,
317 since we now use the stdint module.
318 (uintptr_t): Declare if UINTPTR_MAX is not defined, not
319 HAVE_UINTPTR_T, since we now use the stdint module.
320 (base_name): Remove decl, since files now include <dirname.h>
321 to get the decl.
322
cd48d21d
AD
3232006-07-08 Akim Demaille <akim@lrde.epita.fr>
324
325 * data/c.m4 (b4_location_initial_column, b4_location_initial_line):
326 New, default to 1.
327 * data/yacc.c, data/glr.c, data/location.cc: Use them.
328 * NEWS, doc/bison.texinfo: The initial column and line are 1 by
329 default.
330 * tests/calc.at: Adjust.
331
8ec0a172
AD
3322006-07-08 Akim Demaille <akim@lrde.epita.fr>
333
b8445a15 334 * data/c.m4 (b4_basename): New.
8ec0a172
AD
335 (b4_syncline): Also output the location of its invocation (from
336 the skeleton).
337 (b4_user_action, b4_define_user_action, b4_user_actions)
338 (b4_user_initial_action, b4_user_post_prologue, b4_user_start_header)
339 (b4_user_stype): New.
340 * data/yacc.c, data/glr.c, data/lalr1.cc, data/glr.cc: Use them.
341
4a678af8
JD
3422006-07-07 Joel E. Denny <jdenny@ces.clemson.edu>
343
344 In the grammar file, the first column is 1 not 0 on the first line as
345 on every other line.
346 * src/parse-gram.y (%initial-action): Initialize @$ correctly.
347 * tests/input.at (Torturing the Scanner): Update output.
348
349 * src/scan-gram.l (scanner_cursor): Declare it static.
350
dd60572a
JD
3512006-07-07 Joel E. Denny <jdenny@ces.clemson.edu>
352
353 In warnings, say "previous declaration" rather than "first
354 declaration".
355 * src/symtab.c (redeclaration): Do that here.
356 * src/reader.c (record_merge_function_type): In the case of a result
357 type clash, report the previous declaration rather than the very first
358 one in the grammar file.
359 * tests/glr-regression.at (Missed %merge type warnings when LHS type is
360 declared later): Add a third declaration to check this behavior.
361 * tests/input.at (Incompatible Aliases): Update output.
362
2073e1b6
AD
3632006-06-27 Akim Demaille <akim@epita.fr>
364
365 * doc/Doxyfile.in: New.
366 * doc/Makefile.am: Use it.
367 * src/lalr.h, src/symtab.h: Initial doxygenation.
368
8ee5b538
JD
3692006-06-26 Joel E. Denny <jdenny@ces.clemson.edu>
370
371 Don't miss %merge result type warnings just because the LHS types are
fab044e6
JD
372 declared after the %merge. This continues the effort of the previous
373 patch.
8ee5b538
JD
374 * src/reader.c (get_merge_function): Don't set the merger type yet.
375 (record_merge_function_type): New function for setting the merger type
376 and checking for clashes.
377 (grammar_current_rule_merge_set): Set the location of the %merge for
378 the current rule.
379 (packgram): Invoke record_merge_function_type for each rule now that
380 all symbol type declarations have been parsed.
381 * src/reader.h (merger_list.type_declaration_location): New member
382 storing the location of the first %merge from which the type for this
383 merging function was derived.
384 * src/symlist.h (symbol_list.merger_declaration_location): New member
385 storing the location of a rule's %merge, if any.
386 * tests/glr-regression.at (Missed %merge type warnings when LHS type is
387 declared later): New test to catch the error fixed by the above patch.
388
ffa4ba3a
JD
3892006-06-26 Joel E. Denny <jdenny@ces.clemson.edu>
390
391 Get action warnings (grammar_rule_check) right even when symbol
fab044e6
JD
392 declarations appear after the rules. Discussed at
393 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00108.html>
394 and
395 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00151.html>.
396 Don't mistake the type of $$ in a midrule to be that of its parent
397 rule's $$.
ffa4ba3a
JD
398 * src/reader.c (grammar_current_rule_end): Don't invoke
399 grammar_rule_check yet since not all symbol declarations may have been
400 parsed yet.
401 (grammar_midrule_action): Likewise.
402 Don't record whether the midrule's $$ has been used yet since actions
403 haven't been translated yet.
404 Record the midrule's parent rule and its RHS index within the parent
405 rule.
406 (grammar_current_rule_action_append): Don't translate the action yet
407 since not all symbol declarations may have been parsed yet and, thus,
408 warnings about types for $$, $n, @$, and @n can't be reported yet.
409 (packgram): Translate the action and invoke grammar_rule_check now that
410 all symbol declarations have been parsed.
411 * src/scan-code.l (handle_action_dollar): Now that this is invoked
412 after parsing the entire grammar file, the symbol list here in the case
413 of a midrule is actually the midrule's empty RHS, so reference its
414 parent rule's RHS where necessary.
415 On the other hand, now that you can already know it's a midrule, you
416 aren't forced to think $$ has the same type as its parent rule's $$.
417 (handle_action_at): In the case of a midrule, reference the parent rule
418 where necessary.
419 * src/symlist.c (symbol_list_new): Initialize new midrule-related
420 members.
421 (symbol_list_length): Now that this is invoked after all rules have
422 been parsed, a NULL symbol (rather than a NULL symbol list node)
423 terminates a rule. symbol_list_print already does this correctly.
424 * src/symlist.h (symbol_list.midrule_parent_rule,
425 symbol_list.midrule_parent_rhs_index): New members so that midrules can
426 remember their relationships with their parents.
427 * tests/input.at (Type Clashes): Extend to catch the midrule $$ error
428 fixed by the above patch.
429 (_AT_UNUSED_VALUES_DECLARATIONS, AT_CHECK_UNUSED_VALUES): New m4 macros
430 implementing...
431 (Unused values): ... this old test case and...
432 (Unused values before symbol declarations): ... this new test case.
433 This one is the same as `Unused values' except that all symbol
434 declarations appear after the rules in order to catch the rest of the
435 errors fixed by the above patch.
436
e256e17f
JD
4372006-06-26 Joel E. Denny <jdenny@ces.clemson.edu>
438
300a1930
JD
439 More cleanup.
440 * src/reader.c (current_rule): Declare it static since it's no longer
441 used outside this file.
442 (grammar_current_rule_action_append): Remove redundant arguments from
443 translate_rule_action invocation.
444 * src/reader.h (current_rule): Remove this unused extern.
445 * src/scan-code.h (translate_rule_action): Remove redundant arguments.
446 * src/scan-code.l (translate_rule_action): Likewise.
e256e17f 447
381ecb06
JD
4482006-06-25 Joel E. Denny <jdenny@ces.clemson.edu>
449
450 Clean up yesterday's patch.
451 * parse-gram.y (rhs): Move grammar_midrule_action invocation from here
452 to...
453 * src/reader.c (grammar_current_rule_action_append): ... here for
454 consistency with grammar_current_rule_symbol_append.
455 * tests/regression.at (Braced code in declaration in rules section):
456 Make yyerror and yylex static as usual.
457
4210cd0b
JD
4582006-06-24 Joel E. Denny <jdenny@ces.clemson.edu>
459
460 Fix bug that mistakes braced code in a declaration in the rules section
461 to be a rule action. Mentioned at
462 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00105.html>.
463 * src/scan-gram.l: Move midrule action detection from the start of the
464 scanning of any braced code to...
465 * src/parse-gram.y (rhs): ... the parsing of braced code as a rule
466 action. For readability, use $2 and @2 rather than the equivalent
467 global variables.
468 * tests/regression.at (Braced code in declaration in rules section):
469 New test to catch the error fixed by the above patch.
470
471 Work on code readability some.
472 * src/scan-code.l (current_rule): Get rid of this misleading and
473 redundant declaration: it's actually extern'ed in reader.h.
474 (YY_DECL, code_lex, handle_action_dollar, handle_action_at,
475 translate_action): Add a rule argument and use it instead of the global
476 current_rule.
477 (translate_rule_action): This already receives current_rule through an
478 argument, so pass it on to translate_action instead of assigning
479 current_rule to current_rule.
480 (translate_symbol_action, translate_code): Pass rule = NULL to
481 translate_action.
482
34f98f46
JD
4832006-06-23 Joel E. Denny <jdenny@ces.clemson.edu>
484
485 Rename %before-definitions to %start-header and %after-definitions to
486 %end-header. Don't use these declarations to separate pre-prologue
487 blocks from post-prologue blocks. Add new order-independent
488 declarations %before-header and %after-header as alternatives to the
489 traditional Yacc pre-prologue and post-prologue blocks. Discussed at
490 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00110.html>.
491 * NEWS (2.3+): Update for these changes.
492 * data/glr.c (b4_before_definitions): Update to...
493 (b4_start_header): ... this.
494 (b4_after_definitions): Update to...
495 (b4_end_header): ... this.
496 * data/glr.cc: Likewise.
497 * data/lalr1.cc: Likewise.
498 * data/yacc.c: Likewise.
499 * doc/bison.texinfo (The prologue): Update names, and replace remaining
500 prologue blocks with %*-header declarations.
501 (Calc++ Parser): Likewise.
502 (Bison Declaration Summary): Update names.
503 (Bison Symbols): Update description.
504 * src/parse-gram.y (PERCENT_AFTER_DEFINITIONS): Update to...
505 (PERCENT_END_HEADER): ... this.
506 (PERCENT_BEFORE_DEFINITIONS): Update to...
507 (PERCENT_START_HEADER): ... this.
508 (PERCENT_AFTER_HEADER, PERCENT_BEFORE_HEADER): New tokens.
509 (declaration): Update token names and m4 macro names.
510 When parsing %end-header and %start-header, invoke translate_code
511 before muscle_code_grow, and no longer set global booleans to remember
512 whether these declarations have been seen.
513 Parse new %after-header and %before-header.
514 * src/reader.c (before_definitions, after_definitions): Remove.
515 (prologue_augment): Accept a new bool argument to specify whether to
516 augment the pre-prologue or post-prologue.
517 * src/reader.h (before_definitions, after_definitions): Remove these
518 extern's.
519 (prologue_augment): Add new bool argument.
520 * src/scan-gram.l (PERCENT_AFTER_DEFINITIONS): Update to...
521 (PERCENT_END_HEADER): ... this.
522 (PERCENT_BEFORE_DEFINITIONS): Update to...
523 (PERCENT_START_HEADER): ... this.
524 (PERCENT_AFTER_HEADER, PERCENT_BEFORE_HEADER): New tokens.
525 * tests/actions.at (Printers and Destructors): Update names.
526
31b2b07e
JD
5272006-06-22 Joel E. Denny <jdenny@ces.clemson.edu>
528
529 Add comparison operators for C++ location classes. Discussed at
530 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00092.html>.
531 * data/c++.m4 (b4_define_location_comparison): New boolean %define
532 declaration indicating whether filename_type has an operator==. If
533 filename_type is `std::string', it defaults to `1', `0' otherwise.
534 * data/location.cc: Iff b4_define_location_comparison is `1', add
535 operator== and operator!= for class position and for class location.
536
537 Some minor fixes.
538 * src/scan-action.l: Remove unused file.
539 * src/symtab.c (symbol_printer_set): Use printer_location not
540 destructor_location.
541 * src/symtab.h (struct symbol): Replace incorrect source comment for
542 printer members.
543 * tests/input.at (Incompatible Aliases): Update output with correct
544 printer location.
545
9bc0dd67
JD
5462006-06-20 Joel E. Denny <jdenny@ces.clemson.edu>
547
548 Don't put the pre-prologue in the header file. For the yacc.c code
549 file and the glr.c header and code files, move the pre-prologue before
550 the token definitions. Add new %before-definitions and
551 %after-definitions to declare code that will go in both the header file
552 and code file. Discussed at
553 <http://lists.gnu.org/archive/html/bison-patches/2005-12/msg00000.html>,
554 <http://lists.gnu.org/archive/html/bison-patches/2006-01/msg00016.html>,
555 and
556 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00055.html>.
557 * NEWS (2.3+): Describe these changes.
558 * data/glr.c (b4_pre_prologue): Move from within to before...
559 (b4_shared_declarations): ... this.
560 Add new b4_before_definitions before b4_token_enums.
561 Add new b4_after_definitions at the end.
562 * data/glr.cc (b4_pre_prologue): Replace with...
563 (b4_before_definitions): ... this in the header file.
564 (b4_after_definitions): New near the end of the header file.
565 * data/lalr1.cc (b4_pre_prologue): Move from the header file to the
566 code file right before including the header file.
567 (b4_before_definitions): New in the previous position of
568 b4_pre_prologue in the header file.
569 (b4_after_definitions): New near the end of the header file.
570 * data/yacc.c: Clean up some m4 quoting especially in the header file.
571 (b4_token_enums_defines): In the code file, move to right before
572 YYSTYPE for consistency with the header file.
573 (b4_before_definitions): New right before b4_token_enums_defines in
574 both the header and code file.
575 (b4_after_definitions): New right after YYLTYPE and yylloc in both the
576 header and code file.
577 * doc/bison.texinfo (Prologue): Show use of %before-definitions instead
578 of prologues for %union dependencies.
579 (Bison Declaration Summary): In %defines description, mention the
580 effect of %before-definitions and %after-definitions on the header
581 file.
582 (Calc++ Parser): Forward declare driver in a %before-definitions rather
583 than in the pre-prologue so that make check succeeds.
584 (Bison Symbols): Add entries for %before-definitions and
585 %after-definitions.
586 * src/parse-gram.y (PERCENT_BEFORE_DEFINITIONS): New token for
587 %before-definitions.
588 (PERCENT_AFTER_DEFINITIONS): New token for %after-definitions.
589 (declaration): Parse those declarations and append to
590 b4_before_definitions and b4_after_definitions, respectively.
591 * src/reader.c (before_definitions, after_definitions): New bools to
592 track whether those declarations have been seen.
593 (prologue_augment): Add to the post-prologue if %union,
594 %before-definitions, or %after-definitions has been seen.
595 * src/reader.h (before_definitions, after_definitions): New extern's.
596 * src/scan-gram.l: Scan the new declarations.
597 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Place the second
598 prologue block in a %before-definitions or a %after-definitions based
599 on whether the %union is declared.
600 * tests/regression.at (Early token definitions with --yacc, Early token
601 definitions without --yacc): Move tests for token definitions into the
602 post-prologue since token names are no longer defined in the
603 pre-prologue.
604
203b9274
AD
6052006-06-20 Akim Demaille <akim@epita.fr>
606
607 * src/symtab.h, src/symtab.c (symbol_from_uniqstr): New.
608 (symbol_get): Use it.
609 * src/parse-gram.y: Use it.
610
a7ee59cf
JD
6112006-06-19 Joel E. Denny <jdenny@ces.clemson.edu>
612
613 * src/scan-gram.l: Remove unused declaration of last_string_1 so the
614 build succeeds when configured with --enable-gcc-warnings.
615
5a2baae7
PE
6162006-06-19 Paul Eggert <eggert@cs.ucla.edu>
617
33ad1a9c
PE
618 * src/parse-gram.y (char_name): New function.
619 (CHAR, STRING, string_content): For %printer, properly escape.
620 (ID): Prefer fputs to fprintf.
621 (id): Reindent to be consistent with other rules.
622 Properly quote char.
623
5a2baae7
PE
624 The Translation Project changed its way of publishing translations
625 to maintainers. I haven't received any responses to my request
626 for supporting the old way, or for documenting the new way. I
627 have modified 'bootstrap' to use screen scraping
628 (in this case, HTML scraping). This is unreliable and inelegant,
629 but I don't see any better way. Yuck.
630 * bootstrap (TP_URL, WGET_COMMAND): New vars.
631 (get_translations): New function, which uses HTML scraping to
632 deduce locations of latest translations.
633 Use this function to grab both bison and bison-runtime .po files.
634 Don't bother priming the pump for the runtime-po domain any more,
635 as it's now translated better than bison is.
636
58d7a1a1
AD
6372006-06-19 Akim Demaille <akim@epita.fr>
638
639 * src/scan-gram.l: No longer "parse" things after `%union' until
640 `{'. Rather, return a single "%union" token.
641 No longer make symbols: return strings, and leave the conversion
642 to symbols to the parser.
643 (SC_PRE_CODE, token_type): Remove.
644 * src/parse-gram.y (%union): New field `character'.
645 Sort tokens.
646 (CHAR): New token.
647 (ID, ID_COLON): Now that the scanner no longer makes them
648 identifiers, adjust all uses to invoke symbol_get.
649 (id_colon): New, wraps the conversion from string to symbol.
650 (%union): Accept a possible union_name.
651 (symbol): Now can be a char.
652 * data/c.m4 (b4_union_name): Leave a default value.
653 * data/glr.c, data/yacc.c: Use it.
654
b931235e
JD
6552006-06-11 Joel E. Denny <jdenny@ces.clemson.edu>
656
657 For associating token numbers with token names for "yacc.c", don't use
658 #define statements unless `--yacc' is specified; always use enum
659 yytokentype. Most important discussions start at:
660 <http://lists.gnu.org/archive/html/bison-patches/2005-09/msg00053.html>,
661 <http://lists.gnu.org/archive/html/bison-patches/2005-12/msg00052.html>,
662 and
663 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00043.html>.
664 * NEWS (2.3+): Mention.
665 * data/c.m4 (b4_yacc_if): New.
666 (b4_token_enums_defines): Use b4_yacc_if to decide whether to add the
667 token #define's.
668 * doc/bison.texinfo (Bison Options): Describe the effect of `--yacc'
669 on token name definitions.
670 * src/getargs.c (usage): Capitalize `Yacc' in English.
671 * src/output.c (prepare): Define b4_yacc_flag.
672 * tests/regression.at (Early token definitions): Test that tokens names
673 are defined before the pre-prologue not just before the post-prologue.
674 Remove this test case and copy to...
675 (Early token definitions with --yacc): ... this to test #define's.
676 (Early token definitions without --yacc): ... and this to test enums.
677
9e6e7ed2
PE
6782006-06-11 Paul Eggert <eggert@cs.ucla.edu>
679
680 * NEWS: Reword the post-2.3 change to not be so optimistic about
681 removing the old "look-ahead" spelling.
682 Update previous look-ahead/lookahead change reports.
683 * REFERENCES: look-ahead -> lookahead (since that's
684 what he actually wrote).
685 * doc/refcard.tex: look ahead -> lookahead,
686 look-ahead -> lookahead
687
742e4900
JD
6882006-06-09 Joel E. Denny <jdenny@ces.clemson.edu>
689
690 For consistency, use `lookahead' instead of `look-ahead' or
691 `look_ahead'. Discussed starting at
692 <http://lists.gnu.org/archive/html/bison-patches/2006-01/msg00049.html>
693 and then at
694 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00017.html>.
695 * NEWS: For the next release, note the change to `--report'.
696 * TODO, doc/bison.1: Update English.
697 * doc/bison.texinfo: Update English.
698 (Understanding Your Parser, Bison Options): Document as
699 `--report=lookahead' rather than `--report=look-ahead'.
700 * src/conflicts.c: Update English in comments.
701 (lookahead_set): Rename from look_ahead_set.
702 (flush_reduce): Rename argument look_ahead_tokens to lookahead_tokens.
703 (resolve_sr_conflict): Rename local look_ahead_tokens to
704 lookahead_tokens, and update other uses.
705 (flush_shift, set_conflicts, conflicts_solve, count_sr_conflicts,
706 count_rr_conflicts, conflicts_free): Update uses.
707 * src/getargs.c (report_args): Move "lookahead" before alternate
708 spellings.
709 (report_types): Update uses.
710 (usage): For `--report' usage description, state `lookahead' spelling
711 rather than `look-ahead'.
712 * src/getargs.h (report.report_lookahead_tokens): Rename from
713 report_look_ahead_tokens.
714 * src/lalr.c: Update English in comments.
715 (compute_lookahead_tokens): Rename from compute_look_ahead_tokens.
716 (state_lookahead_tokens_count): Rename from
717 state_look_ahead_tokens_count.
718 Rename local n_look_ahead_tokens to n_lookahead_tokens.
719 (lookahead_tokens_print): Rename from look_ahead_tokens_print.
720 Rename local n_look_ahead_tokens to n_lookahead_tokens.
721 Update other uses.
722 Update English in output.
723 (add_lookback_edge, initialize_LA, lalr, lalr_free): Update uses.
724 * src/print.c: Update English in comments.
725 (lookahead_set): Rename from look_ahead_set.
726 (print_reduction): Rename argument lookahead_token from
727 look_ahead_token.
728 (print_core, state_default_rule, print_reductions, print_results):
729 Update uses.
730 * src/print_graph.c: Update English in comments.
731 (print_core): Update uses.
732 * src/state.c: Update English in comments.
733 (reductions_new): Update uses.
734 (state_rule_lookahead_tokens_print): Rename from
735 state_rule_look_ahead_tokens_print, and update other uses.
736 * src/state.h: Update English in comments.
737 (reductions.lookahead_tokens): Rename from look_ahead_tokens.
738 (state_rule_lookahead_tokens_print): Rename from
739 state_rule_look_ahead_tokens_print.
740 * src/tables.c: Update English in comments.
741 (conflict_row, action_row): Update uses.
742 * tests/glr-regression.at
743 (Incorrect lookahead during deterministic GLR,
744 Incorrect lookahead during nondeterministic GLR): Rename
745 print_look_ahead to print_lookahead.
746 * tests/torture.at: Update English in comments.
747 (AT_DATA_LOOKAHEAD_TOKENS_GRAMMAR): Rename from
748 AT_DATA_LOOK_AHEAD_TOKENS_GRAMMAR.
749 (Many lookahead tokens): Update uses.
750 * data/glr.c: Update English in comments.
751 * lalr1.cc: Likewise.
752 * yacc.c: Likewise.
753 * src/conflicts.h: Likewise.
754 * src/lalr.h: Likewise.
755 * src/main.c: Likewise.
756 * src/output.c: Likewise.
757 * src/parse-gram.c: Likewise.
758 * src/tables.h: Likewise.
759 * tests/calc.at: Likewise.
760
3c40d0b5
JD
7612006-06-08 Joel E. Denny <jdenny@ces.clemson.edu>
762
763 * src/flex-scanner.h (yytext): Remove stray `*/' in #define.
764
5d278082
PE
7652006-06-07 Paul Eggert <eggert@cs.ucla.edu>
766
767 * TODO: Add request from Nelson H. F. Beebe to be able to install
768 Bison without installing the yacc script.
769
9e668899
JD
7702006-06-07 Joel E. Denny <jdenny@ces.clemson.edu>
771
772 * src/flex-scanner.h: For the sake of Flex 2.5.4, don't #define yyleng
773 and yytext if they're already #define'd.
774 * src/flex-scanner.h, src/location.h: Move #include "system.h" to...
775 * src/scan-code-c.c: ... here.
776 * src/scan-code.l, src/scan-gram.l: ... and here. Also #include
777 <config.h>.
778
0c8e079f
JD
7792006-06-07 Joel E. Denny <jdenny@ces.clemson.edu>
780
781 Get Bison to build again when configured with --enable-gcc-warnings.
782 * src/location.c, src/location.h, src/main.c, src/scan-code.l: Add some
783 missing #include's.
784 * src/scan-code.l (handle_action_dollar, handle_action_at): Rename
785 loc argument as it shadows a global.
786 * src/scan-gram.l: Remove stray comma that prevents boundary_set
787 invocation.
788
789 * src/.cvsignore: Add scan-code.c.
790
2346344a
AD
7912006-06-07 Akim Demaille <akim@epita.fr>
792
793 * src/scan-gram.l: Move the "add a trailing ; to actions" code
794 to...
795 * src/scan-code.l: here.
796 * tests/input.at (Torturing the Scanner): Fix another location
797 error.
798
4862bdfd
AD
7992006-06-07 Akim Demaille <akim@epita.fr>
800
801 * src/Makefile.am (BUILT_SOURCES): Fix the trailing backslash.
802
e9071366
AD
8032006-06-06 Akim Demaille <akim@epita.fr>
804
805 Extract the parsing of user actions from the grammar scanner.
806 As a consequence, the relation between the grammar scanner and
807 parser is much simpler. We can also split "composite tokens" back
808 into simple tokens.
809 * src/gram.h (ITEM_NUMBER_MAX, RULE_NUMBER_MAX): New.
810 * src/scan-gram.l (add_column_width, adjust_location): Move to and
811 rename as...
812 * src/location.h, src/location.c (add_column_width)
813 (location_compute): these.
814 Fix the column count: the initial column is 0.
815 (location_print): Be robust to ending column being 0.
816 * src/location.h (boundary_set): New.
817 * src/main.c: Adjust to scanner_free being renamed as
818 gram_scanner_free.
819 * src/output.c: Include scan-code.h.
820 * src/parse-gram.y: Include scan-gram.h and scan-code.h.
821 Use boundary_set.
822 (PERCENT_DESTRUCTOR, PERCENT_PRINTER, PERCENT_INITIAL_ACTION)
823 (PERCENT_LEX_PARAM, PERCENT_PARSE_PARAM): Remove the {...} part,
824 which is now, again, a separate token.
825 Adjust all dependencies.
826 Whereever actions with $ and @ are used, use translate_code.
827 (action): Remove this nonterminal which is now useless.
828 * src/reader.c: Include assert.h, scan-gram.h and scan-code.h.
829 (grammar_current_rule_action_append): Use translate_code.
830 (packgram): Bound check ruleno, itemno, and rule_length.
831 * src/reader.h (gram_in, gram__flex_debug, scanner_cursor)
832 (last_string, last_braced_code_loc, max_left_semantic_context)
833 (scanner_initialize, scanner_free, scanner_last_string_free)
834 (gram_out, gram_lineno, YY_DECL_): Move to...
835 * src/scan-gram.h: this new file.
836 (YY_DECL): Rename as...
837 (GRAM_DECL): this.
838 * src/scan-code.h, src/scan-code.l, src/scan-code-c.c: New.
839 * src/scan-gram.l (gram_get_lineno, gram_get_in, gram_get_out):
840 (gram_get_leng, gram_get_text, gram_set_lineno, gram_set_in):
841 (gram_set_out, gram_get_debug, gram_set_debug, gram_lex_destroy):
842 Move these declarations, and...
843 (obstack_for_string, STRING_GROW, STRING_FINISH, STRING_FREE):
844 these to...
845 * src/flex-scanner.h: this new file.
846 * src/scan-gram.l (rule_length, rule_length_overflow)
847 (increment_rule_length): Remove.
848 (last_braced_code_loc): Rename as...
849 (gram_last_braced_code_loc): this.
850 Adjust to the changes of the parser.
851 Move all the handling of $ and @ into...
852 * src/scan-code.l: here.
853 * src/scan-gram.l (handle_dollar, handle_at): Remove.
854 (handle_action_dollar, handle_action_at): Move to...
855 * src/scan-code.l: here.
856 * src/Makefile.am (bison_SOURCES): Add flex-scanner.h,
857 scan-code.h, scan-code-c.c, scan-gram.h.
858 (EXTRA_bison_SOURCES): Add scan-code.l.
859 (BUILT_SOURCES): Add scan-code.c.
860 (yacc): Be robust to white spaces.
861
862 * tests/conflicts.at, tests/input.at, tests/reduce.at,
863 * tests/regression.at: Adjust the column numbers.
864 * tests/regression.at: Adjust the error message.
7891a7c4 865
184e42f0
JD
8662006-06-06 Joel E. Denny <jdenny@ces.clemson.edu>
867
868 * src/getargs.c (usage): Mention GLR not just LALR(1) in --help output.
869 Use Akim's wording from
870 <http://lists.gnu.org/archive/html/bison-patches/2006-05/msg00056.html>.
871
7891a7c4
JD
8722006-06-06 Joel E. Denny <jdenny@ces.clemson.edu>
873
874 Between Bison releases, manually append `+' to the previous Bison
875 release number, and use that as a signal to automatically print the
876 ChangeLog's CVS Id keyword from --version. Discussed starting at
877 <http://lists.gnu.org/archive/html/bison-patches/2006-05/msg00028.html>.
878 * ChangeLog: Add Id header.
879 * configure.ac (AC_INIT): Append `+' to `2.3'.
880 * src/.cvsignore: Add revision.c.
881 * src/Makefile.am (bison_SOURCES): Add revision.c and revision.h.
882 (BUILT_SOURCES): Add revision.c.
883 (revision.c): New target rule. This file defines a new global variable
884 named revision. It initializes it with either the Id from ChangeLog
885 or, if VERSION doesn't contain `+', with the empty string.
886 * src/getargs.c (version): Print the value of revision.
887 * src/revision.h: Extern revision.
888
4ad3ed84
PE
8892006-06-05 Paul Eggert <eggert@cs.ucla.edu>
890
891 * NEWS: Version 2.3.
892 * configure.ac (AC_INIT): Likewise.
893
02103984
PE
8942006-05-30 Paul Eggert <eggert@cs.ucla.edu>
895
896 * data/glr.c (YYRECOVERING): Define to be a function-like macro
897 with no arguments, not as an object-like macro. This is for
898 compatibility with data/yacc.c. Problem reported by John P. Hartmann in
899 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00059.html>.
900 * doc/bison.texinfo (Action Features, Error Recovery, Table of Symbols):
901 Document this.
902
2c08afa5
JD
9032006-05-30 Joel E. Denny <jdenny@ces.clemson.edu>
904
905 * src/getargs.c (usage): Back out yesterday's modification of the
906 --help output so that we don't have to wait for translation before
907 releasing 2.3.
908
6077da58
PE
9092006-05-29 Paul Eggert <eggert@cs.ucla.edu>
910
911 * doc/bison.texinfo (Introduction): Don't say "GLR grammar".
912 Problem reported by Akim Demaille.
913
2a26b6c2
JD
9142006-05-29 Joel E. Denny <jdenny@ces.clemson.edu>
915
916 * src/getargs.c (usage): Mention GLR not just LALR(1) in --help output.
917
aefef0d6
PE
9182006-05-26 Paul Eggert <eggert@cs.ucla.edu>
919
920 * data/yacc.c (yy_reduce_print): Omit trailing white space in
921 generated source code. Problem reported by Frans Englich in
922 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00049.html>.
923
fcd8e201
PE
9242006-05-22 Paul Eggert <eggert@cs.ucla.edu>
925
926 * Makefile.maint (gzip_rsyncable, GZIP_ENV): Compute within the
927 shell, not within 'make', so that 'make' by an ordinary builder
928 (using GNU make) does not worry about configuring gzip. This also
929 works around a bug reported independently by Keith Thompson and by
930 Georg Schwarz, whereby gzip 1.2.4 --help would output usage on
931 stderr rather than stdout, messing up the build logs.
932
7b5cdcbd
JD
9332006-05-21 Joel E. Denny <jdenny@ces.clemson.edu>
934
935 * data/yacc.c (yyparse): Wrap the final return from yyparse inside YYID
936 to make sure that YYID will never be unused. This fixes a 'make
937 maintainer-check' failure caused by the recent changes to the 'Trivial
938 grammars' test case, which caused g++ 4.1.0 to complain that YYID was
939 not used.
940 * data/glr.c (yyparse): Wrap yyparse's return inside YYID just in case.
941
5ad0a449
JD
9422006-05-21 Joel E. Denny <jdenny@ces.clemson.edu>
943
944 * data/glr.c (yyresolveLocations): Remove bogus YYASSERT that the
945 state before an empty RHS is always resolved here. Only the location
946 of that state is guaranteed to be resolved, and that's enough. This
947 fixes the remaining bug reported by Derek M. Jones in
948 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00027.html>.
949 * tests/glr-regression.at (Uninitialized location when reporting
950 ambiguity): Test the above case.
951 Also, the embedded comments in this test case claim it checks the case
952 of an empty RHS that has inherited the initial location. However, the
953 corresponding LHS was already resolved, so yyresolveLocations didn't
954 actually have reason to modify it. Fix this by forcing
955 nondeterministic operation at the beginning of the parse.
956
50cce58e
PE
9572006-05-20 Paul Eggert <eggert@cs.ucla.edu>
958
959 * data/c.m4 (b4_yy_symbol_print_generate):
960 (b4_yy_symbol_print_generate): Use 'YYSTYPE const' rather than
961 'const YYSTYPE', and similarly for YYLTYPE. This fixes one
962 of the bugs reported today by Derek M Jones in
963 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00027.html>.
964 * doc/bison.texinfo (Value Type): Document that YYSTYPE must be
965 defined to be a type name without parens or brackets.
966 (Location Type): Similarly for YYLTYPE.
967 * tests/regression.at (Trivial grammars): Put in a test for this
968 bug that will be caught by 'make maintainer-check' (though not,
969 alas, by 'make check' unless your compiler is picky).
970
ab8d9dc5
PE
9712006-05-19 Paul Eggert <eggert@cs.ucla.edu>
972
0d2c8934 973 * NEWS: Version 2.2.
ab8d9dc5
PE
974 * configure.ac (AC_INIT): Likewise.
975
9138c575
JD
9762006-05-17 Joel E. Denny <jdenny@ces.clemson.edu>
977
978 * data/glr.c (yyreportTree): Make room in yystates for the state
979 preceding the RHS. This fixes the segmentation fault reported by Derek
980 M. Jones in
981 <http://lists.gnu.org/archive/html/help-bison/2006-05/msg00035.html>.
982 (yyreportTree, yypdumpstack): Subtract 1 from yyrule before printing
983 to the user. Reported for yyreportTree by Derek M. Jones later in the
984 same thread.
985 * THANKS: Add Derek M. Jones.
986 Update my email address.
987 Fix typo in Steve Murphy's name.
988
276f48df
PE
9892006-05-14 Paul Eggert <eggert@cs.ucla.edu>
990
d6645148
PE
991 * data/glr.c (yyreportSyntaxError): Fix off-by-one error in
992 checking against YYLAST that caused the parser to miss a potential
993 alternative in its diagnostic.
994 Problem reported by Maria Jose Moron Fernandez in
995 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00024.html>.
996 * data/lalr1.cc (yysyntax_error_): Likewise.
997 * data/yacc.c (yysyntax_error): Likewise.
998 * tests/regression.at (_AT_DATA_DANCER_Y): Use static array for
999 tokens, in case we run into an older C compiler.
1000 (_AT_DATA_EXPECT2_Y, AT_CHECK_EXPECT2): New macros.
1001 Use them to check for the off-by-one error fixed above.
1002
276f48df
PE
1003 * data/yacc.c (yytnamerr): Fix typo: local var should be of type
1004 YYSIZE_T, not size_t.
1005 * tests/regression.at (Trivial grammars): New test, to catch
1006 the error fixed by the above patch.
1007
cd8b5791
AD
10082006-05-14 Akim Demaille <akim@lrde.epita.fr>
1009
1010 * doc/bison.texinfo (C++ Bison Interface): Clarify the naming
1011 scheme.
1012 Reported by Steve Murphy.
1013
34376418
AD
10142006-05-14 Akim Demaille <akim@lrde.epita.fr>
1015
1016 * data/glr.cc, data/lalr1.cc: Using %defines is mandatory.
1017 * data/glr.cc: b4_location_flag is now b4_locations_flag.
1018
327afc7c
AD
10192006-05-14 Akim Demaille <akim@lrde.epita.fr>
1020
1021 Implement --trace=m4.
1022 * src/getargs.c (trace_types, trace_args): Accept trace_m4.
1023 * src/output.c (output_skeleton): When set, pass -dV to m4.
1024
1025 Factor the handling of flags in m4.
1026 * src/output.c (prepare): Rename the muscle names debug, defines,
1027 error_verbose to debug_flag, defines_flag, error_verbose_flag.
1028 * data/c.m4: Adjust.
1029 (_b4_define_flag_if, b4_define_flag_if, b4_defines_if): New.
1030 Use b4_define_flag_if to define other b4_FLAG_if macros.
1031 (b4_location_if): As a consequence, rename as...
1032 (b4_locations_if): this, for consistency.
1033 Adjust all the skeletons.
1034
ba9ecd19
AD
10352006-05-14 Akim Demaille <akim@lrde.epita.fr>
1036
1037 * etc/bench.pm: Shorten bench names.
1038
4e83ea15
AD
10392006-05-14 Akim Demaille <akim@lrde.epita.fr>
1040
1041 * src/output.h, src/output.c (error_verbose): Move to...
1042 * src/getargs.h, src/getargs.c: here.
1043 Sort the flags.
1044 Adjust dependencies.
1045
6e93d810
PE
10462006-05-13 Paul Eggert <eggert@cs.ucla.edu>
1047
1048 * data/c.m4 (b4_copyright): Put the special exception for Bison
1049 skeletons here, so we don't have to put it in each skeleton. All
b15296ff
PE
1050 uses changed. Suggested by Akim Demaille. Also, wrap the
1051 copyright notice, in case it is longer than 80 columns. Replace
1052 comma by newline after title.
6e93d810 1053
eaea13f5
PE
10542006-05-11 Paul Eggert <eggert@cs.ucla.edu>
1055
1056 * doc/bison.texinfo (Calc++ Scanner): The flex behavior is an
1057 incompatibility, not a bug. Mention that it wasn't fixed as of
1058 flex 2.5.33.
1059
3cf084ec
AD
10602006-05-11 Akim Demaille <akim@lrde.epita.fr>
1061
1062 * examples/extexi: Enforce the precedence of concatenation over
1063 >>.
0a9f1c7d 1064 Reported by Tommy Nordgren.
3cf084ec 1065
32c96bd7
AD
10662006-05-11 Akim Demaille <akim@lrde.epita.fr>
1067
1068 * data/lalr1.cc (yytranslate_): Rename token as t to avoid clashes
1069 with the member "token".
f94705b2 1070 Reported by Martin Nylin.
32c96bd7 1071
eaea13f5
PE
10722006-05-08 Paul Eggert <eggert@cs.ucla.edu>
1073
1074 * data/glr.c: Switch to Bison 2.2 special-exception language in
1075 the copyright notice. Use more-regular format for titles and
1076 copyright notices.
1077 * data/glr.cc: Likewise.
1078 * data/location.cc: Likewise.
1079 * data/yacc.cc: Likewise.
1080 * doc/bison.texinfo (Conditions): Document this.
1081 * NEWS: likewise. Upgrade version to 2.2.
1082
6e2d1146
AD
10832006-04-27 Akim Demaille <akim@lrde.epita.fr>
1084
1085 * data/glr.cc: Remove dead code.
1086
47671055
PE
10872006-04-25 Paul Eggert <eggert@cs.ucla.edu>
1088
1089 * bootstrap: Comment out the AM_CPPFLAGS line, since we don't use
1090 that variable and the line breaks the bootstrap. Problem reported
1091 by Juan M. Guerrero.
1092
ed2e6384
AD
10932006-04-24 Akim Demaille <akim@lrde.epita.fr>
1094
1095 * doc/bison.texinfo (Multiple start-symbols): New.
1096
3cedc2dc
AD
10972006-04-24 Akim Demaille <akim@lrde.epita.fr>
1098
1099 * etc/README, etc/bench.pl: New.
1100
b2ddc3f3
AD
11012006-04-03 Akim Demaille <akim@lrde.epita.fr>
1102
1103 * src/scan-gram.l: Be robust to BRACED_CODE appearing before any
1104 rule.
1105 Reported by Mickael Labau.
1106 * tests/input.at (Torturing the Scanner): Test it.
1107
91e3ac9a
PE
11082006-03-16 Paul Eggert <eggert@cs.ucla.edu>
1109
1110 * doc/bison.texinfo (Decl Summary): Don't mention yylloc twice.
1111 Problem reported by Bob Rossi.
1112
11132006-03-13 Paul Eggert <eggert@cs.ucla.edu>
1114
1115 * doc/bison.texinfo: Remove @shorttitlepage stuff; it wasn't used
1116 and didn't really work.
1117 For the index, use @ifnotinfo, not @iftex.
1118 Minor cleanups of spacing and terminology.
1119
5cf61e93
AD
11202006-03-12 Akim Demaille <akim@lrde.epita.fr>
1121
1122 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Fix the definition
1123 of AT_NAME_PREFIX when %name-prefix is not used.
1124
aa08666d
AD
11252006-03-12 Akim Demaille <akim@lrde.epita.fr>
1126
1127 Apply --prefix to C++ skeletons too: they change the namespace.
1128 The test suite already exercize these cases.
1129 * data/c++.m4 (b4_namespace): New.
1130 * data/lalr1.cc, data/glr.cc, data/location.cc: Use it instead of `yy'.
1131 * data/lalr1.cc (yytnameerr_): Move its definition into the namespace.
1132 * data/yacc.c, data/glr.c: Remove a useless `[]'.
1133 * doc/bison.texinfo: Document it.
1134 (Option Cross Key): Use @multitable in all formats. It looks
1135 nicer, even in TeX outputs.
1136 (Rules): Use the same code whatever the output type is.
1137 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS)
1138 (_AT_BISON_OPTION_POPDEFS): Support AT_NAME_PREFIX.
1139 * tests/calc.at: Use it, instead of hard coding `yy'.
91e3ac9a 1140
45567173
AD
11412006-03-10 Akim Demaille <akim@lrde.epita.fr>
1142
1143 * TODO: Remove dead items.
1144
e9d8f881 11452006-03-10 Akim Demaille <akim@lrde.epita.fr>
55ba27be
AD
1146
1147 * doc/FAQ: Remove, merged into...
1148 * doc/bison.texinfo (FAQ): this.
1149 * doc/Makefile.am (EXTRA_DIST): Adjust.
1150
c095d689
AD
11512006-03-10 Akim Demaille <akim@lrde.epita.fr>
1152
1153 * data/c.m4 (b4_token_enum): Always define the enum of tokens,
1154 even if empty.
1155 * data/lalrl1.cc, data/glr.cc (parser::token_type): New.
1156 * doc/bison.texinfo (Calc++ Scanner): Use it.
1157
6e0f8287
PE
11582006-03-09 Paul Eggert <eggert@cs.ucla.edu>
1159
1160 Fix two nits reported by twlevo, plus one more that I discovered.
1161
1162 * src/assoc.h (assoc_to_string): Give a name to the arg, as
1163 this is the usual Bison style.
1164 * src/location.h (location_print): Likewise.
1165
1166 * src/reader.h (token_name): Likewise.
1167
d6b771c3
PE
11682006-03-08 Paul Eggert <eggert@cs.ucla.edu>
1169
1170 Fix some nits reported by twlevo.
1171 * doc/FAQ: Remove ancient Y2K FAQ, replacing it with "secure"
1172 and "POSIX". Use more-modern syntax for URLs. Mention C++
1173 and ask for Java. Don't hardwire OS version numbers. Add
1174 copyright notice.
1175 * m4/.cvsignore: Add unistd_h.m4, for latest gnulib.
1176 * src/conflicts.c (solved_conflicts_obstack): Now static.
1177
1e137b71
JD
11782006-03-08 Joel E. Denny <jdenny@ces.clemson.edu>
1179
1180 * doc/bison.texinfo (Introduction): Mention GLR and C++ as on the web
1181 page. Say "you can use it" not "you may use it" as on the web page;
1182 we're describing capabilities not granting permission.
1183
73f2e47e
PE
11842006-03-06 Paul Eggert <eggert@cs.ucla.edu>
1185
6d05403d
PE
1186 * data/glr.c (yyresolveLocations): Rename local variables to avoid
1187 shadowing warnings. Use usual patter for iterating through RHS.
1188 * tests/glr-regression.at
1189 (Uninitialized location when reporting ambiguity):
1190 Modify yylex so that it uses its argument, rather than trying
1191 to rely on ARGSUSED (which doesn't work for gcc with warnings).
1192 const char -> char const.
1193
73f2e47e
PE
1194 * tests/Makefile.am ($(srcdir)/package.m4, maintainer-check-valgrind):
1195 Don't use tabs inside commands; it messes up 'ps'.
1196 Problem reported by twlevo.
1197
8710fc41
JD
11982006-03-06 Joel E. Denny <jdenny@ces.clemson.edu>
1199
1200 * tests/glr-regression.at (Uninitialized location when reporting
1201 ambiguity): New test case.
1202 * data/glr.c (yyresolveLocations): New function, which uses
1203 YYLLOC_DEFAULT.
1204 (yyresolveValue): Invoke yyresolveLocations before reporting an
1205 ambiguity.
1206 * doc/bison.texinfo (Default Action for Locations): Note
1207 YYLLOC_DEFAULT's usage for ambiguity locations.
1208 (GLR Semantic Actions): Cross-reference those notes.
1209
ae952af2
JD
12102006-03-04 Joel E. Denny <jdenny@ces.clemson.edu>
1211
1212 * tests/glr-regression.at (Leaked semantic values when reporting
1213 ambiguity): Remove unnecessary union and type declarations.
1214 (Leaked lookahead after nondeterministic parse syntax error): New test
1215 case.
1216 * data/glr.c (yyparse): Check for zero stacks remaining before
1217 attempting to shift the lookahead so that you don't lose it.
1218
35ee866a
JD
12192006-03-02 Joel E. Denny <jdenny@ces.clemson.edu>
1220
1221 Avoid memory leaks by not invoking longjmp in yyreportAmbiguity.
1222 * tests/glr-regression.at (Leaked semantic values when reporting
1223 ambiguity): New test case.
1224 * data/glr.c (yyreportAmbiguity): Invoke yyyerror directly and return
1225 yyabort rather than invoking yyFail, which invokes longjmp. Remove the
1226 now unnecessary yystackp parameter.
1227 (yyresolveValue): Return yyreportAmbiguity's result. Now the necessary
1228 destructors can be called.
1229
1230 * tests/glr-regression.at: Don't invoke bison with `-t' unnecessarily
1231 in existing testcases.
1232
520181ab
JD
12332006-03-02 Joel E. Denny <jdenny@ces.clemson.edu>
1234
1235 Don't leak semantic values for parent RHS when a user action cuts the
1236 parser, and clean up related code a bit.
1237 * tests/glr-regression.at (Leaked merged semantic value if user action
35ee866a
JD
1238 cuts parse): Rename to...
1239 (Leaked semantic values if user action cuts parse): ... this. Add check
520181ab
JD
1240 for leaked parent RHS values.
1241 * data/glr.c (yydestroyGLRState): In debugging output, distinguish
1242 between an unresolved state (non-empty chain of semantic options) and
1243 an incomplete one (signaled by an empty chain).
ae952af2 1244 (yyresolveStates): Document the interface. Move all manipulation of a
520181ab
JD
1245 successfully or unsuccessfully resolved yyGLRState to...
1246 (yyresolveValue): ... here so that yyresolveValue always leaves a
1247 yyGLRState with consistent data and thus is easier to understand.
1248 Remove the yyvalp and yylocp parameters since they are always just
1249 taken from the yys parameter. When reporting a discarded merged value
1250 in debugging output, note that it is incompletely merged. Document the
1251 interface.
1252 (yyresolveAction): If resolving any of the RHS states fails, destroy
1253 them all rather than leaking them. Thus, as long as user actions are
1254 written to clean up the RHS correctly, yyresolveAction always cleans up
1255 the RHS of a semantic option. Document the interface.
1256
18d9185c
PE
12572006-02-27 Paul Eggert <eggert@cs.ucla.edu>
1258
1259 * data/glr.c (yyexpandGLRStack): Catch an off-by-one error that
1260 led to a segmentation fault in GNU Pascal. Problem reported
1261 by Waldek Hebisch.
1262
841a7737
JD
12632006-02-21 Joel E. Denny <jdenny@ces.clemson.edu>
1264
1265 * doc/bison.texinfo (Mid-Rule Actions): Explain how to bury a
1266 mid-rule action inside a nonterminal symbol in order to declare a
1267 destructor for its semantic value.
1268
fc3f467f
PE
12692006-02-16 Paul Eggert <eggert@cs.ucla.edu>
1270
1271 * data/yacc.c [(! defined yyoverflow || YYERROR_VERBOSE) && !
1272 YYSTACK_USE_ALLOCA && ! defined YYSTACK_ALLOC && defined
1273 __cplusplus && ! defined _STDLIB_H && !
1274 ((defined YYMALLOC || defined malloc) && (defined YYFREE ||
1275 defined free))]: Include <stdlib.h> rather than rolling our own
1276 declarations of malloc and free, to avoid problems with
1277 incompatible declarations (using 'throw') C++'s stdlib.h. This
1278 should fix Debian bug 340012
1279 <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=340012>,
1280 reported by Guillaume Melquiond.
1281
a3af26dd
PE
12822006-02-13 Paul Eggert <eggert@cs.ucla.edu>
1283
4d7bc38c
PE
1284 * NEWS: Clarify symbols versus types in unused-value warnings.
1285
a3af26dd
PE
1286 * configure.ac (AC_INIT): Bump version number.
1287
4e26c69e
PE
12882006-02-13 Paul Eggert <eggert@cs.ucla.edu>
1289
1290 * NEWS: Version 2.1a.
1291 * tests/headers.at (AT_TEST_CPP_GUARD_H): Declare yyerror and yylex,
1292 since C99 requires this.
1293
498e897c
PE
12942006-02-11 Paul Eggert <eggert@cs.ucla.edu>
1295
1296 * m4/c-working.m4: New file.
1297 * configure.ac (BISON_TEST_FOR_WORKING_C_COMPILER): Use it.
1298
57bb17ca
PE
12992006-02-10 Paul Eggert <eggert@cs.ucla.edu>
1300
1301 * Makefile.maint: Merge from coreutils.
1302
0be105dc
PE
13032006-02-09 Paul Eggert <eggert@cs.ucla.edu>
1304
1305 More portability fixes for problems summarized by Nelson H. F. Beebe.
1306
1307 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Catch a
1308 configuration screwup "./configure CC=/opt/SUNWspro/bin/c89
1309 CFLAGS="-xarch=generic64" CXX=/opt/SUNWspro/bin/CC
1310 LDFLAGS="-xarch=generic64" with Sun C 5.7 on Solaris 10; this
1311 messes up because C++ code is compiled in 32-bit mode but linked
1312 in 64-bit mode.
1313
6fc0c024
PE
13142006-02-08 Paul Eggert <eggert@cs.ucla.edu>
1315
1316 More portability fixes for problems summarized by Nelson H. F. Beebe.
1317
7870f699
PE
1318 * doc/bison.texinfo (Calc++ Scanner): Work around a bug in flex
1319 2.5.31. This resembles the 2005-10-10 patch to src/scan-skel.l.
1320
6fc0c024
PE
1321 * examples/calc++/Makefile.am (check_PROGRAMS): Renamed from
1322 nodist_PROGRAMS, since we don't need to actually compile the
1323 example if we're just doing a plain 'make'. This avoids bothering
1324 the installer unnecessarily about problems due to weird C++
1325 compilers.
1326
fe6c2fde
PE
13272006-02-06 Paul Eggert <eggert@cs.ucla.edu>
1328
1329 More portability fixes for problems summarized by Nelson H. F. Beebe.
1330
1331 * tests/headers.at (AT_TEST_CPP_GUARD_H): Use #include <...> rather
1332 than #include "...", and compile with -I'.'. The old method was
1333 not portable, according to Posix and the C standard, and it does
1334 not work with Sun C 5.7, where previous #line directives affect
1335 the working directory used in later #include "..." directives.
1336
927b425b
JMG
13372006-02-06 Juan Manuel Guerrero <juan.guerrero@gmx.de>
1338
1339 Various DJGGP specific issues in /djgpp
1340
d9735e9e
PE
13412006-02-02 Paul Eggert <eggert@cs.ucla.edu>
1342
1343 More portability fixes for problems summarized by Nelson H. F. Beebe.
1344
1345 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check that
1346 '#include <map>' works and that you can apply ++ to iterators.
1347
5a6755af
PE
13482006-02-01 Paul Eggert <eggert@cs.ucla.edu>
1349
67a0dc4f
PE
1350 Work around portability problems summarized by Nelson H. F. Beebe in
1351 <http://lists.gnu.org/archive/html/bug-bison/2005-09/msg00021.html>.
1352
8c86f0ef
PE
1353 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check
1354 that '#include <string>' works.
1355
de35dd59
PE
1356 * data/lalr1.cc (yytranslate_): No longer inline, to work around a
1357 porting problem to g++ 3.4.3 on Darwin 7.9.0, where g++ complained
1358 "warning: sorry: semantics of inline function static data `const
1359 unsigned char translate_table[262]' are wrong (you'll wind up with
1360 multiple copies)".
1361
67a0dc4f
PE
1362 * lib/bbitset.h (struct bitset_vtable): Rename members not, and,
1363 or, xor to not_, and_, or_, and xor_, respectively. This works
1364 around a bug in GCC 3.4.3 on Irix 6.5, which apparently has a
1365 random system header somewhere that includes the equivalent of
1366 <iso646.h>.
1367
5a6755af
PE
1368 * tests/headers.at (AT_TEST_CPP_GUARD_H): Don't assume that "$CC
1369 -E" works; it apparently doesn't work with PathScale EKO Compiler
67a0dc4f 1370 Suite Version 2.0.
5a6755af 1371
3f001415
JD
13722006-01-30 Joel E. Denny <jdenny@ces.clemson.edu>
1373
1374 During deterministic GLR operation, user actions should be able to
1375 influence the parse by changing yychar. To make this easier to fix and
1376 to make glr.c easier to evolve in general, don't maintain yytoken in
1377 parallel with yychar; just compute yytoken when needed.
1378 * tests/glr-regression.at (Incorrect lookahead during deterministic
1379 GLR): Check that setting yychar in a user action has the intended
1380 effect.
1381 * data/glr.c (yyGLRStack): Remove yytokenp member.
1382 (yyclearin): Don't set *yytokenp.
1383 (yyprocessOneStack, yyreportSyntaxError, yyrecoverSyntaxError): Examine
1384 yychar rather than *yytokenp to determine the current lookahead.
1385 Compute yytoken locally when needed.
1386 (yyparse): Likewise. Remove the local yytoken that yytokenp used to
1387 point to.
1388
1389 * doc/bison.texinfo (Bison Options): Remove stray sentence fragment
1390 after `--report' documentation.
1391
e2a8c0f5
PE
13922006-01-30 Paul Eggert <eggert@cs.ucla.edu>
1393
1394 * src/parse-gram.y (grammar_declaration): Location of printer
1395 symbol is @1, not list->location. Bug reported by twlevo.
1396 * tests/input.at (Incompatible Aliases): Adjust to above change.
1397
6b702268
PE
13982006-01-29 Paul Eggert <eggert@cs.ucla.edu>
1399
27622431
PE
1400 * tests/input.at (AT_CHECK_UNUSED_VALUES): Remove. Instead, do
1401 all the test at once. This makes the output easier to read in the
1402 normal case.
1403
6b702268
PE
1404 Fix a longstanding bug uncovered by bro-0.9a9/src/parse.y, which I
1405 got from <http://bro-ids.org/download.html>. The bug is that
1406 when two actions appeared in succession, the second one was
1407 scanned before the first one was added to the grammar rule
1408 as a midrule action. Bison then output the incorrect warning
1409 "parse.y:905.17-906.36: warning: unused value: $3".
1410 * src/parse-gram.y (BRACED_CODE, action): These are no longer
1411 associated with a value.
1412 (rhs): Don't invoke grammar_current_rule_action_append.
1413 (action): Invoke it here instead.
1414 * src/reader.c (grammar_midrule_action): Now extern.
1415 (grammar_current_rule_action_append): Don't invoke
1416 grammar_midrule_action; that is now the scanner's job.
1417 * src/reader.h (last_string, last_braced_code_loc):
1418 (grammar_midrule_action): New decls.
1419 * src/scan-gram.l (last_string): Now extern, sigh.
1420 (last_braced_code_loc): New extern variable.
1421 (<INITIAL>"{"): Invoke grammar_midrule_action if the current
1422 rule already has an action.
1423 (<SC_BRACED_CODE>"}"): Set last_braced_code_loc before returning.
1424 * tests/input.at (AT_CHECK_UNUSED_VALUES):
1425 Add some tests to check that the above changes fixed the bug.
1426
d40ba6c2
PE
14272006-01-27 Paul Eggert <eggert@cs.ucla.edu>
1428
1429 * src/reader.c (symbol_should_be_used): Renamed from symbol_typed_p.
1430 All used changed. Check whether the symbol has a destructor,
1431 not whether it is typed.
1432 * tests/input.at (AT_CHECK_UNUSED_VALUES): Add a destructor, so
1433 that the values are still reported as unused. All line numbers
1434 adjusted.
1435
401aace6
PE
14362006-01-23 Paul Eggert <eggert@cs.ucla.edu>
1437
1438 Work around a bug in bro 0.8, which underparenthesizes its
1439 definition of YYLLOC_DEFAULT.
1440 * data/glr.c: Change all uses of YYLLOC_DEFAULT to parenthesize
1441 their arguments.
1442 * data/lalr1.cc: Likewise.
1443 * data/yacc.cc: Likewise.
1444
06f01bc4
PE
14452006-01-22 Paul Eggert <eggert@cs.ucla.edu>
1446
401aace6
PE
1447 Work around a bug in Pike 7.0, and give the Pike folks a
1448 better way to override the usual int widths.
1449 * data/yacc.c (b4_int_type): Use yytype_uint8, etc., so that the
1450 user can override the types.
1451 (short): #undef, to work around a bug in Pike 7.0.
1452 (yytype_uint8, yytype_int8, yytype_uint16, yytype_int16): New types.
1453 (union yyalloc.yyss): Use yytype_int16 rather than short.
1454 All uses changed.
1455 (yysigned_char): Remove.
1456 * src/parse-gram.y (YYTYPE_UINT8, YYTYPE_INT8, YYTYPE_UINT16):
1457 (YYTYPE_INT16): New macros, to test the new facility in yacc.c.
1458 * tests/regression.at (Web2c Actions): Adjust to above changes.
1459
1460 * src/reader.c (check_and_convert_grammar): New function.
1461 (reader): Close the input file even if something went wrong during
1462 parsing. Minor file descriptor leak reported by twlevo.
1463
06f01bc4
PE
1464 * src/assoc.c (assoc_to_string): Use a default: abort (); case
1465 to pacify gcc -Wswitch-default.
1466 * src/scan-gram.l (adjust_location): Use a default: break; case
1467 to pacify gcc -Wswitch-default.
1468 * src/scan-skel.h (skel_get_lineno, skel_get_in, skel_get_out):
1469 (skel_get_leng, skel_get_text, skel_set_lineno, skel_set_in):
1470 (skel_set_out, skel_get_debug, skel_set_debug, skel_lex_destroy):
1471 Move these decls to scan-skel.l, since they don't need to be
1472 visible elsewhere.
1473 * src/scan-skel.l: Accept the above decls.
1474 (skel_lex): New decl, to pacify GCC when unpatched flex 2.5.31
1475 is used.
1476
02650b7f
PE
14772006-01-21 Paul Eggert <eggert@cs.ucla.edu>
1478
1479 * Makefile.cfg (local-checks-to-skip): Add changelog-check,
1480 since we don't want to insist on a version number at the start
1481 of the changelog every time.
1482 * Makefile.maint: Sync from coreutils a bit better.
1483 (sc_trailing_blank): Renamed from sc_trailing_space.
1484 All uses changed.
1485 (sc_no_if_have_config_h, sc_require_config_h):
1486 (sc_prohibit_assert_without_use): New rules.
1487 (sc_obsolete_symbols): Don't catch Makefile.maint itself.
1488 (sc_dd_max_sym_length): Fix leading spaces in rule.
1489 (sc_system_h_headers): Prefix with @.
1490 (sc_useless_cpp_parens, m4-check): Output line numbers.
1491 (changelog-check): Allow version only in head.
1492 * data/c.m4: Use "defined FOO" instead of "defined (FOO)", to
1493 satisfy new Makefile.maint rule.
1494 * data/glr.c: Likewise.
1495 * data/glr.cc: Likewise.
1496 * data/lalr1.cc: Likewise.
1497 * data/yacc.c: Likewise.
1498 * lib/ebitsetv.c: Likewise.
1499 * lib/lbitset.c: Likewise.
1500 * lib/subpipe.c: Likewise.
1501 * lib/timevar.c: Likewise.
1502 * src/system.h: Likewise.
1503 * data/yacc.c (YYSTYPE): Don't generate trailing spaces in output.
1504 * djgpp/Makefile.maint: Add copyright notice.
1505 * djgpp/README.in: Likewise.
1506 * djgpp/config.bat: Likewise.
1507 * djgpp/config.site: Likewise.
1508 * djgpp/config_h.sed: Likewise.
1509 * djgpp/djunpack.bat: Likewise.
1510 * djgpp/config.sed: Fix copyright notice to match standard format.
1511 * djgpp/subpipe.h: Likewise.
1512 * lib/bitsetv-print.c: Likewise.
1513 * lib/bitsetv.c: Likewise.
1514 * lib/subpipe.h: Likewise.
1515 * lib/timevar.c: Likewise.
1516 * lib/timevar.h: Likewise.
1517 * djgpp/subpipe.c: Use standard recipe for config.h.
1518 * lib/abitset.c: Likewise.
1519 * lib/bitset.c: Likewise.
1520 * lib/bitset_stats.c: Likewise.
1521 * lib/bitsetv-print.c: Likewise.
1522 * lib/bitsetv.c: Likewise.
1523 * lib/ebitsetv.c: Likewise.
1524 * lib/get-errno.c: Likewise.
1525 * lib/lbitset.c: Likewise.
1526 * lib/subpipe.c: Likewise.
1527 * lib/timevar.c: Likewise.
1528 * lib/vbitset.c: Likewise.
1529 * tests/local.at: Likewise.
1530 * src/scan-gram.l: Don't include verify.h, since system.h does
1531 that for us.
1532 * .x-sc_require_config_h: New file.
1533 * .x-sc_unmarked_diagnostics: New file.
1534
287c78f6
PE
15352006-01-20 Paul Eggert <eggert@cs.ucla.edu>
1536
287c78f6
PE
1537 Be a bit more systematic about using 'abort'.
1538 * lib/abitset.c (abitset_test): Remove ATTRIBUTE_UNUSED; not needed.
1539 * lib/bitset.c (bitset_bytes, bitset_init, bitset_op4_cmp):
1540 Put 'default: abort ();' before some other case, to satisfy older
1541 pedantic compilers.
1542 * lib/bitset_stats.c (bitset_stats_init): Likewise.
1543 * lib/ebitset.c (ebitset_elt_find, ebitset_op3_cmp): Likewise.
1544 * lib/lbitset.c (lbitset_elt_find, lbitset_op3_cmp): Likewise.
1545 * src/conflicts.c (resolve_sr_conflict): Likewise.
68cae94e
PE
1546 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str):
1547 (get_decision_str, get_orientation_str, get_node_alignment_str):
1548 (get_arrow_mode_str, get_crossing_type_str, get_view_str):
1549 (get_linestyle_str, get_arrowstyle_str): Likewise.
1550 * src/conflicts.c (resolve_sr_conflict):
1551 Use a default case rather than one for the one remaining enum
1552 value, to catch invalid enum values as well.
1553 * src/lalr.c (set_goto_map, map_goto):
1554 Prefer "assert (FOO);" to "if (!FOO) abort ();".
1555 * src/nullable.c (nullable_compute, token_definitions_output):
1556 Likewise.
1557 * src/reader.c (packgram, reader): Likewise.
1558 * src/state.c (transitions_to, state_new, state_reduction_find):
1559 Likewise.
1560 * src/symtab.c (symbol_user_token_number_set, symbol_make_alias):
1561 (symbol_pack): Likewise.
1562 * src/tables.c (conflict_row, pack_vector): Likewise.
287c78f6
PE
1563 * src/scan-skel.l (QPUTS): Remove unnecessary parens.
1564 (BASE_QPUTS, "@output ".*\n): Remove unnecessary asserts.
68cae94e
PE
1565 * src/system.h: Don't include <assert.h>.
1566 (assert): New macro.
1567
1568 * doc/bison.texinfo (Prologue, Rules, Actions, Union Decl, Action Decl):
1569 (Destructor Decl, Parser Function, Pure Calling):
1570 Describe rules for braces inside C code more carefully.
287c78f6 1571
c66dfadd
PE
15722006-01-19 Paul Eggert <eggert@cs.ucla.edu>
1573
c21493b8
PE
1574 Fix some porting glitches found by Nelson H. F. Beebe.
1575 * lib/abitset.c (abitset_resize): Rewrite to avoid warnings from
1576 compilers that don't understand that abort () does not return.
1577 * src/state.c (transitions_to): Likewise.
1578 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check
1579 that '#include <cstdlib>' works.
1580 * src/system.h (INT8_MIN, INT16_MIN, INT32_MIN, INT8_MAX):
1581 (INT16_MAX, UINT8_MAX, INT32_MAX, UINT16_MAX, UINT32_MAX):
1582 #undef if ! defined __STDC_VERSION__ || __STDC_VERSION__ < 199901,
1583 for the benefit of some pre-C99 compilers.
1584
b6e3facf
PE
1585 * bootstrap: Undo changes to gnulib files that autoreconf made.
1586
c66dfadd
PE
1587 Minor fixups to get 'make maintainer-check' to work.
1588 * configure.ac: Don't use -Wnested-externs, as it's incompatible
1589 with the new verify.h implementation.
1590 * data/c.m4 (b4_yy_symbol_print_generate): YYUSE (yyoutput).
1591 * data/glr.c (YYUSE): Depend on __GNUC__ as well.
1592 * data/yacc.c (YYUSE): Likewise.
1593 * data/lalr1.cc (yysyntax_error_): YYUSE (yystate).
1594 * lib/subpipe.c (end_of_output_subpipe): The args are unused.
1595 * src/parse-gram.y (declaration): Don't pass a string constant
1596 to a function that expects char *, since GCC might complain
1597 about the constant value.
1598 * src/reader.c (symbol_typed_p): Add parens to pacify GCC.
1599 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): #undef yylloc and yylval
1600 before #defining them.
1601 * tests/glr-regression.at
1602 (Incorrectly initialized location for empty right-hand side in GLR):
1603 In yyerror, use the msg arg.
1604 (Corrupted semantic options if user action cuts parse):
1605 (Incorrect lookahead during deterministic GLR):
1606 (Incorrect lookahead during nondeterministic GLR):
1607 Don't name a local var 'index'; it shadows string.h's 'index'.
1608
ed94ef2a
AD
16092006-01-19 Akim Demaille <akim@epita.fr>
1610
1611 * tests/calc.at (_AT_DATA_CALC_Y): Initialize the whole initial
1612 location, not just parts of it.
1613
e9ad4aec
PE
16142006-01-18 Paul Eggert <eggert@cs.ucla.edu>
1615
d6ca7905
PE
1616 * NEWS: Document the fact that multiple %unions are now allowed.
1617 * doc/bison.texinfo (Union Decl): Likewise.
51cbef6f
PE
1618 * TODO: This feature is now implemented, so remove it from
1619 the wishlist.
d6ca7905 1620
ef1b70e0
PE
1621 * Makefile.maint: Merge with coreutils Makefile.maint.
1622 (CVS_LIST): Use build-aux version if available.
1623 (VERSION_REGEXP): New macro.
1624 (syntax-check-rules): Add sc_no_if_have_config_h,
1625 sc_prohibit_assert_without_use, sc_require_config_h,
1626 sc_useless_cpp_parens.
1627 (sc_obsolete_symbols): Check for O_NDELAY.
1628 (sc_dd_max_sym_length): Track coreutils.
1629 (sc_unmarked_diagnostics): Look in all files, not just *.c.
1630 (sc_useless_cpp_parens): New rule.
1631 (news-date-check): Look for version or today's date.
1632 (changelog-check): Don't require version number near head.
1633 (copyright-check): Use current year instead of hardwiring 2005.
1634 (my-distcheck): Depend on $(release_archive_dir)/$(prev-tgz).
1635 (announcement): Add --gpg-key-ID.
1636
1637 * djgpp/config.sed: Add copyright notice, and replace "filesystem"
1638 with "file system".
1639
2073ce56 1640 Avoid undefined behavior that addressed just before the start of an
e9ad4aec
PE
1641 array. Problem reported by twlevo.
1642 * src/reader.c (packgram): Prepend a new sentinel before ritem.
1643 * src/lalr.c (build_relations): Rely on new sentinel.
1644 * src/gram.c (gram_free): Adjust to new sentinel.
1645
b7691f15
JD
16462006-01-12 Joel E. Denny <jdenny@ces.clemson.edu>
1647
1648 * data/glr.c (yyGLRStateSet): Rename yylookaheadStatuses to
1649 yylookaheadNeeds. All uses updated.
1650 (yysplitStack): Rename local yynewLookaheadStatuses to
1651 yynewLookaheadNeeds.
1652 * data/glr-regression.at (Incorrect lookahead during nondeterministic
1653 GLR): In comments, change `lookahead status' to `lookahead need'.
1654
ddee1b06
PH
16552006-01-11 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
1656
1657 * data/glr.c (yysplitStack): A little stylistic rewrite.
1658
12f4614d
PH
16592006-01-11 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
1660
1661 * data/glr.c (yyaddDeferredAction): Flesh out the comment.
1662
32c29292
JD
16632006-01-11 Joel E. Denny <jdenny@ces.clemson.edu>
1664
1665 * doc/bison.texinfo: Fix some typos.
1666 (GLR Semantic Actions): New subsection discussing special
1667 considerations because GLR semantic actions might be deferred.
1668 (Actions): Mention look-ahead usage of yylval.
1669 (Actions and Locations): Mention look-ahead usage of yylloc.
1670 (Special Features for Use in Actions): Add YYEOF entry and mention it
1671 in the yychar entry.
1672 In the yychar entry, remove mention of the local yychar case (pure
1673 parser) since this is irrelevant information when writing semantic
1674 actions and since it's already discussed in `Bison Symbols' where
1675 yychar is otherwise described as an external variable.
1676 In the yychar entry, don't call it the `current' look-ahead since it
1677 isn't when semantic actions are deferred.
1678 In the yychar and yyclearin entries, add note about deferred semantic
1679 actions.
1680 Add yylloc and yylval entries discussing look-ahead usage.
1681 (Look-Ahead Tokens): When discussing yychar, don't call it the
1682 `current' look-ahead, and do mention yylval and yylloc.
1683 (Error Recovery): Cross-reference `Action Features' when mentioning
1684 yyclearin.
1685 (Bison Symbols): In the yychar entry, don't call it the `current'
1686 look-ahead.
1687 In the yylloc and yylval entries, mention look-ahead usage.
1688
de366a2f 16892006-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
2781dbd1
JD
1690
1691 * tests/glr-regression.at: Update copyright year to 2006.
1692
bf70fa87
JD
16932006-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
1694
1695 * data/glr.c (yyGLRStateSet): Add yybool* yylookaheadStatuses member to
1696 use during nondeterministic operation to track which stacks have
1697 actually needed the current lookahead.
1698 (yyinitStateSet, yyfreeStateSet, yyremoveDeletes, yysplitStack):
1699 Allocate, deallocate, resize, and otherwise shuffle space for
1700 yylookaheadStatuses in parallel with yystates member of yyGLRStateSet.
1701 (yysplitStack, yyprocessOneStack, yyparse): Set lookahead status
1702 appropriately during nondeterministic operation.
1703 (yySemanticOption): Add int yyrawchar, YYSTYPE yyval, and YYLTYPE yyloc
1704 members to store the current lookahead to be used by the deferred
1705 user action.
1706 (yyaddDeferredAction): Add size_t yyk parameter specifying the stack
1707 from which the RHS is taken. Set the lookahead members of the new
1708 yySemanticOption according to the lookahead status for stack yyk.
1709 (yyglrShiftDefer, yyglrReduce): Pass yyk parameter on to
1710 yyaddDeferredAction.
1711 (yyresolveAction): Set yychar, yylval, and yylloc to the lookahead
1712 members of yySemanticOption before invoking yyuserAction, and then set
1713 them back to their current values afterward.
1714 (yyparse): Set yychar = YYEMPTY where yytoken = YYEMPTY.
1715 (yyreportAmbiguity): Add /*ARGSUSED*/ to pacify lint.
1716 * tests/glr-regression.at: Remove `.' from the ends of recent test case
1717 titles for consistency.
1718 (Leaked merged semantic value if user action cuts parse): In order to
1719 suppress lint warnings, use arguments in merge function, and assign
1720 char value < 128 in main.
1721 (Incorrect lookahead during deterministic GLR): New test case.
1722 (Incorrect lookahead during nondeterministic GLR): New test case.
1723
05449a2c
JD
17242006-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
1725
de366a2f 1726 * data/c.m4 (b4_yy_symbol_print_generate): In yy_symbol_print, accept
05449a2c
JD
1727 !yyvaluep as signal that no semantic value is available to print.
1728 * data/glr.c (yydestroyGLRState): If state is not resolved, don't try
1729 to print a semantic value.
1730
4158e0a1 17312006-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
fd2493f7 1732
4158e0a1
JD
1733 * tests/glr-regression.at: For consistency with my newer test cases,
1734 don't thank myself.
1735
d659304d
JD
17362006-01-05 Joel E. Denny <jdenny@ces.clemson.edu>
1737
1738 * data/glr.c (yyresolveValue): When merging semantic options, if at
1739 least one user action succeeds but a later one cuts the parse, then
1740 destroy the semantic value before returning rather than leaking it.
1741 (yyresolveStates): If a user action cuts the parse and thus
1742 yyresolveValue fails, ignore the (unset) semantic value rather than
1743 corrupting the yyGLRState, and empty the semantic options list since
1744 the user actions should have called all necessary destructors.
1745 Simplify code with YYCHK.
1746 * tests/glr-regression.at (Corrupted semantic options if user action
1747 cuts parse): New test case.
1748 (Undesirable destructors if user action cuts parse): New test case.
1749 Before applying any of this patch, this test case never actually failed
1750 for me... but only because the corrupted semantic options usually
1751 masked this bug.
1752 (Leaked merged semantic value if user action cuts parse): New test
1753 case.
1754
6ec2c0f2
AD
17552006-01-05 Akim Demaille <akim@epita.fr>
1756
1757 * src/reader.c, src/symlist.h, src/symlist.c: s/mid_rule/midrule/.
1758
1b9c21fb
PE
17592006-01-04 Paul Eggert <eggert@cs.ucla.edu>
1760
1761 * data/c.m4 (b4_c_modern): New macro, with a new provision for
1762 _MSC_VER. Problem reported by Cenzato Marco.
1763 (b4_c_function_def): Use it.
1764 * data/yacc.c (YYMODERN_C): Remove. All uses replaced by
1765 b4_c_modern.
1766 (yystrlen, yystpcpy, yyparse): Use b4_c_function... macros rather
1767 than rolling our own.
1768
84866159
AD
17692006-01-04 Akim Demaille <akim@epita.fr>
1770
1771 Also warn about non-used mid-rule values.
1772 * src/symlist.h, src/symlist.c (symbol_list): Add a mid_rule
1773 member.
1774 (symbol_list_new): Adjust.
1775 * src/reader.c (symbol_typed_p): New.
1776 (grammar_rule_check): Use it.
1777 (grammar_midrule_action): Bind a mid-rule LHS to its rule.
1778 Check its rule.
1779 * tests/input.at (AT_CHECK_UNUSED_VALUES): New.
1780 Use it.
1781 * tests/actions.at (Exotic Dollars): Adjust.
1782
378f4bd8
AD
17832006-01-04 Akim Demaille <akim@epita.fr>
1784
1785 * src/reader.c (grammar_midrule_action): If $$ is set in a
1786 mid-rule, move the `used' bit to its lhs.
1787 * tests/input.at (Unused values): New.
1788 * tests/actions.at (Exotic Dollars): Adjust: exp is not typed.
1789
e2a21b6f
PE
17902006-01-03 Paul Eggert <eggert@cs.ucla.edu>
1791
54662697
PE
1792 * doc/bison.texinfo (Bison Options): Say more accurately what
1793 --yacc does.
1794 * src/parse-gram.y (rules_or_grammar_declaration): Don't complain
1795 about declarations in the grammar when in Yacc mode, as POSIX does
1796 not require a diagnostic when the grammar uses extensions.
1797
1798 * src/reduce.c (reduce_grammar): Remove unnecessary cast to bool.
1799
073f9288
PE
1800 Warn about dubious constructions like "%token T T".
1801 Reported by twlevo.
1802 * src/symtab.h (struct symbol.declared): New member.
1803 * src/symtab.c (symbol_new): Initialize it to false.
1804 (symbol_class_set): New arg DECLARING, specifying whether
1805 this is a declaration that we want to warn about, if there
1806 is more than one of them. All uses changed.
1807
1221b78a
PE
1808 * data/glr.c, data/glr.cc, data/lalr1.cc, data/yacc.c:
1809 Allow multiple %union directives, whose contents concatenate.
1810 * src/parse-gram.y (grammar_declaration): Likewise.
1811 Use muscle_code_grow, so that we don't need stype_line any more.
1812 All uses changed.
1813
1814 * src/muscle_tab.c (muscle_grow): Fix comment.
1815
e2a21b6f
PE
1816 * ChangeLog, data/c.m4, data/glr.c, data/glr.cc, data/location.cc:
1817 * data/yacc.c, src/getargs.c, src/output.c, tests/cxx-type.at:
1818 Update copyright year to 2006.
1819
8f7e3cf9
AD
18202006-01-03 Akim Demaille <akim@epita.fr>
1821
1822 Have glr.cc pass (some of) the calc.at tests.
1823 * data/glr.cc (b4_parse_param_orig): New.
1824 (b4_parse_param): Improve its definition, and bound it more
1825 clearly in the skeleton.
1826 (b4_epilogue): Append, instead of prepending, in order to keep
1827 #line consistency.
1828 Simplify the generation of auxiliary functions: locations and
1829 purity are mandated.
1830 (b4_global_tokens_and_yystype): Honor it.
1831 * data/location.cc (c++.m4): Don't include it.
1832 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Define AT_GLR_CC_IF
1833 and AT_SKEL_CC_IF.
1834 * tests/calc.at (AT_CHECK_CALC): Rely on AT_SKEL_CC_IF instead of
1835 AT_LALR1_CC_IF.
1836 Be sure to initialize the first position's filename.
1837 (AT_CHECK_CALC_LALR1_CC): Add %location and %defines, they are
1838 mandated anyway.
1839 (AT_CHECK_CALC_GLR_CC): New.
1840 Use it to exercise glr.cc as a lalr1.cc drop-in replacement.
1841
3953ed88
AD
18422006-01-02 Akim Demaille <akim@epita.fr>
1843
1844 * src/output.c (output_skeleton): Don't hard wire the inclusion of
1845 c.m4.
0a96ba81 1846 * data/c++.m4, data/glr.c, data/yacc.c: Include c.m4.
3953ed88
AD
1847 * data/glr.cc: Do not include stack.hh.
1848
9ecafbbf
AD
18492006-01-02 Joel E. Denny <jdenny@ces.clemson.edu>
1850
1851 * data/glr.c: Reformat whitespace with tabs.
1852 (b4_lpure_formals): Remove this unused m4 macro.
1853 * tests/cxx-type.at: Reformat whitespace with tabs.
1854 (_AT_TEST_GLR_CXXTYPES): In union Node, rename node_info to nodeInfo
1855 since it's a member. Rename type to isNterm for clarity.
1856
c4d497a0
AD
18572005-12-29 Akim <akim@sulaco.local>
1858
1859 Let glr.cc catch up with symbol_value_print.
1860 * data/glr.cc (b4_yysymprint_generate): Replace by...
1861 (b4_yy_symbol_print_generate): this.
1862 (yy_symbol_print, yy_symbol_value_print): Declare them.
1863
4517da37
PE
18642005-12-28 Paul Eggert <eggert@cs.ucla.edu>
1865
1866 * src/location.h (boundary): Note that a line or column equal
1867 to INT_MAX indicates an overflow.
1868 * src/scan-gram.l: Include verify.h. Don't include get-errno.h.
1869 (rule_length_overflow, increment_rule_length, add_column_width):
1870 New functions.
1871 (<INITIAL>{id}, <SC_ESCAPED_STRING>"\"", <SC_ESCAPED_CHARACTER>"'"):
1872 (<SC_BRACED_CODE>"}"):
1873 Use increment_rule_length rather than incrementing it by hand.
1874 (adjust_location, handle_syncline): Diagnose overflow.
1875 (handle_action_dollar, handle_action_at):
1876 Fix bug with monstrosities like $-2147483648.
1877 Remove now-unnecessary checks.
1878 (scan_integer): Verify assumptions and remove now-unnecessary checks.
1879 (convert_ucn_to_byte): Verify assumptions.
1880 (handle_syncline): New arg LOC. All callers changed.
1881 Don't store through a value derived from char const * pointer.
1882
1883 * src/reader.c (grammar_rule_check): Rewrite slightly to avoid
1884 GCC warnings.
1885
e3233bf6
PE
18862005-12-27 Paul Eggert <eggert@cs.ucla.edu>
1887
1888 * src/reader.c (grammar_midrule_action, grammar_symbol_append):
1889 Remove unnecessary forward static decls.
1890
8f3596a6
AD
18912005-12-27 Akim Demaille <akim@epita.fr>
1892
1893 * src/reader.c (grammar_current_rule_check): Also check that $$
1894 is used.
1895 Take the rule to check as argument, hence rename as...
1896 (grammar_rule_check): this.
1897 * src/reader.h, src/reader.c (grammar_rule_begin, grammar_rule_end):
1898 Rename as...
1899 (grammar_rule_begin, grammar_rule_end): these, for consistency.
1900 (grammar_midrule_action, grammar_symbol_append): Now static.
1901 * tests/torture.at (input): Don't rely on the default action
1902 being always performed.
1903 * tests/calc.at: "Set" $$ even when the action is "cut" with
1904 YYERROR or other.
1905 * tests/actions.at (Exotic Dollars): Instead of using unused
1906 values, check that the warning is issued.
1907
721be13c
PE
19082005-12-22 Paul Eggert <eggert@cs.ucla.edu>
1909
1910 * NEWS: Improve wording for unused-value warnings.
1911
a0af42fc
AD
19122005-12-22 Akim Demaille <akim@epita.fr>
1913
1914 * data/lalr1.cc, data/yacc.c, data/glr.c, data/c.m4
1915 (b4_yysymprint_generate): Rename as...
1916 (b4_yy_symbol_print_generate): this.
1917 Generate yy_symbol_print instead of yysymprint.
1918 Generate also yy_symbol_value_print, and use it.
1919
affac613
AD
19202005-12-22 Akim Demaille <akim@epita.fr>
1921
721be13c 1922 * NEWS: Warn about unused values.
affac613
AD
1923 * src/symlist.h, src/symlist.c (symbol_list, symbol_list_new): Add
1924 a `used' member.
1925 (symbol_list_n_get, symbol_list_n_used_set): New.
1926 (symbol_list_n_type_name_get): Use symbol_list_n_get.
1927 * src/scan-gram.l (handle_action_dollar): Flag used symbols.
1928 * src/reader.c (grammar_current_rule_check): Check that values are
1929 used.
1930 * src/symtab.c (symbol_print): Accept 0.
1931 * tests/existing.at: Remove the type information.
1932 Empty the actions.
1933 Remove useless actions (beware of mid-rule actions: perl -000
1934 -pi -e 's/\s*\{\}(?=[\n\s]*[|;])//g').
1935 * tests/actions.at (Exotic Dollars): Use unused values.
1936 * tests/calc.at: Likewise.
1937 * tests/glr-regression.at (No users destructors if stack 0 deleted):
1938 Likewise.
1939
1940 * src/gram.c (rule_useful_p, rule_never_reduced_p): Use
1941 rule_useful_p.
1942
9d9b8b70
PE
19432005-12-21 Paul Eggert <eggert@cs.ucla.edu>
1944
8bb4c753
PE
1945 Undo 2005-12-01 tentative license wording change. The wording is
1946 still being reviewed by the lawyers, and we don't want to wait for
1947 them before publishing a test release. For now, revert to the
1948 previous wording.
1949 * NEWS: Undo 2005-12-01 change.
1950 * data/glr.c: Revert to previous license wording.
1951 * data/glr.cc: Likewise.
1952 * data/lalr1.cc: Likewise.
1953 * data/location.cc: Likewise.
1954 * data/yacc.c: Likewise.
1955
9d9b8b70
PE
1956 * NEWS: Reword %destructor vs YYABORT etc.
1957 * data/glr.c: Use American spacing, for consistency.
1958 * data/glr.cc: Likewise.
1959 * data/lalr1.cc: Likewise.
1960 * data/yacc.c: Likewise.
1961 * data/yacc.c: Reformat comments slightly.
1962 * doc/bison.texinfo: Replace "non-" with "non" when that makes sense,
1963 for consistency. Fix some spelling errors and reword recently-included
1964 text slightly.
1965 * tests/cxx-type.at: Cast results of malloc, for C++.
1966
2c3b392a
AD
19672005-12-21 Joel E. Denny <address@hidden>
1968
1969 * tests/cxx-type.at: Construct a tree, count the parents of shared
1970 nodes, and free each node once and only once. Previously, the memory
1971 for semantic values was leaked instead.
1972
d6cff4dc
AD
19732005-12-21 Joel E. Denny <address@hidden>
1974
1975 * data/glr.c (struct yyGLRStack): If pure, add yyval and yyloc members.
1976 (yylval, yylloc): If pure, #define to yystackp->yyval and
1977 yystackp->yyloc similar to yychar and yynerrs.
1978 (yyparse): If pure, remove local yylval and yylloc. Add local
1979 yystackp to accommodate pure definitions of yylval and yylloc.
1980 (b4_lex_param, b4_lyyerror_args, b4_lpure_args): If pure, change
1981 yylvalp and yyllocp to &yylval and &yylloc.
1982 (nerrs, char, lval, lloc): If pure, add #define's for b4_prefix[]
1983 namespace. Previously, nerrs and char were missing, but lval and lloc
1984 weren't necessary.
1985 (yyprocessOneStack, yyreportSyntaxError, yyrecoverSyntaxError): Remove
1986 yylvalp and yyllocp parameters since, if pure, these are now always
1987 accessible through yystackp. If not pure, they are still accessible
1988 globally.
1989 * data/glr.c, data/yacc.c (YYLLOC_DEFAULT): Change `if (N)' to
1990 `if (YYID (N))' to pacify lint.
1991
a85284cf
AD
19922005-12-21 Akim Demaille <akim@epita.fr>
1993
1994 YYACCEPT, YYERROR, and YYABORT, as user actions, should not
1995 destroy the RHS symbols of a rule.
1996 * data/yacc.c (yylen): Initialize to 0.
1997 Keep its value to the number of items to possibly shift.
1998 In particular, a regular successful parse that ends on YYFINAL by
1999 a (internal) YYACCEPT must not have yylen != 0.
2000 (yyerrorlab, yyreturn): Pop the RHS.
2001 Reorder a bit to emphasize the `shifting' bits of code.
2002 (YYPOPSTACK): Now accept a number of items to pop.
2003 * data/lalr1.cc: Likewise.
2004 * data/glr.c: Formatting changes.
2005 Use goto instead of fall through.
2006 * doc/bison.texinfo (Destructor Decl): Complete.
2007
d508c281
JMG
20082005-12-20 Juan Manuel Guerrero <juan.guerrero@gmx.de>
2009
2010 * Makefile.am: DJGPP specific files added to EXTRA_DIST.
2011 * djgpp/Makefile.maint: Fix PACKAGE variable computation.
2012 * djgpp/config.bat: Replace every occurence of the file name
2013 scan-gram-c.c with c-scan-gram.c. The same for scan-skel-c.c with
2014 c-scan-skel.c to conform with the 8.3 file name restriction on MSDOS.
2015 * djgpp/config.sed: Replace every occurence of the file name
2016 scan-gram-c.c with c-scan-gram.c. The same for scan-skel-c.c with
2017 c-scan-skel.c to conform with the 8.3 file name restriction on MSDOS.
2018 * djgpp/djunpack.bat: DJGPP specific file.
2019 * djgpp/fnchange.lst: DJGPP specific file.
2020 * djgpp/README.in: Add new information about how to unpack the bison
2021 source on MSDOS and other systems which have 8.3 file name restrictions
2022 using djunpack.bat and fnchange.lst.
2023
3e7a2cd9
PE
20242005-12-12 Paul Eggert <eggert@cs.ucla.edu>
2025
2026 * bootstrap (build_cvs_prefix): Remove; unused.
2027 (CVS_PREFIX): Adjust to yesterday's Savannah reorganization
2028 when getting gnulib.
2029
20302005-12-12 "Joel E. Denny" <jdenny@ces.clemson.edu>
2031
2032 * data/glr.c: Reorder typedef declarations for structs to match order
2033 of struct declarations.
2034 Rename yystack everywhere to yystackp except in yyparse where it's not
2035 a pointer.
2036 (yyglrShift): Change parameter YYSTYPE yysval to YYSTYPE* yyvalp for
2037 consistency.
2038 (yyis_table_ninf): Change 0 to YYID (0) to pacify lint.
2039 (yyreportSyntaxError): Add /*ARGSUSED*/ to pacify lint.
2040 (yyparse): Change while (yytrue) to while ( YYID (yytrue)) to pacify
2041 lint.
2042
877519f8
PE
20432005-12-09 Paul Eggert <eggert@cs.ucla.edu>
2044
0eca5a39
PE
2045 * tests/sets.at (Accept): Fix typos in regular expression used to
2046 sed out the final state number.
2047
2cec9080
PE
2048 Work around portability problem on Solaris 10: flex-generated
2049 files include <stdio.h> before <config.h>, which messes up
2050 because the latter defines __EXTENSIONS__. Address the problem
2051 by creating two new little files that include <config.h> first,
2052 then include the flex-generated files. Rewrite everyone else
2053 to include <config.h> first, as well.
2054 * lib/timevar.c: Always include "config.h".
2055 * src/Makefile.am (bison_SOURCES): Replace scan-gram.l with
2056 scan-gram-c.c, and scan-skel.l with scan-skel-c.c.
2057 (EXTRA_bison_SOURCES): New macro.
2058 * src/scan-gram-c.c, src/scan-skel-c.c: New files.
2059 * src/system.h: Don't include config.h.
2060 * src/LR0.c: Include <config.h> first.
2061 * src/assoc.c: Likewise.
2062 * src/closure.c: Likewise.
2063 * src/complain.c: Likewise.
2064 * src/conflicts.c: Likewise.
2065 * src/derives.c: Likewise.
2066 * src/files.c: Likewise.
2067 * src/getargs.c: Likewise.
2068 * src/gram.c: Likewise.
2069 * src/lalr.c: Likewise.
2070 * src/location.c: Likewise.
2071 * src/main.c: Likewise.
2072 * src/muscle_tab.c: Likewise.
2073 * src/nullable.c: Likewise.
2074 * src/output.c: Likewise.
2075 * src/parse-gram.y: Likewise.
2076 * src/print.c: Likewise.
2077 * src/print_graph.c: Likewise.
2078 * src/reader.c: Likewise.
2079 * src/reduce.c: Likewise.
2080 * src/relation.c: Likewise.
2081 * src/state.c: Likewise.
2082 * src/symlist.c: Likewise.
2083 * src/symtab.c: Likewise.
2084 * src/tables.c: Likewise.
2085 * src/uniqstr.c: Likewise.
2086 * src/vcg.c: Likewise.
2087
877519f8
PE
2088 * src/parse-gram.y: Fix minor problems uncovered by lint.
2089 (current_lhs, current_lhs_location): Now static.
2090 (current_assoc): Remove unused variable.
2091
2092 Cleanups so that Bison-generated parsers have less lint.
2093 * data/c.m4 (b4_yydestruct_generate, b4_yysymprint_generate):
2094 Prepend /*ARGSUSED*/, for lint's sake.
2095 * data/glr.c (YYUSE): Properly parenthesize, and use an alternate
2096 definition if 'lint' is defined.
2097 (YYID): New macro (or function, if lint).
2098 All uses of /*CONSTCOND*/0 replaced by YYID(0).
2099 * data/yacc.c: Likewise.
2100 * data/glr.c (yyuserAction, yyuserMerge, yy_reduce_print):
2101 (yyrecoverSyntaxError): Prepend /*ARGSUSED*/.
2102 * data/glr.cc (YYLLOC_DEFAULT): Omit /*CONSTCOND*/ since this code
2103 is C++ only.
2104 * data/lalr1.cc (YYUSE): Just use a cast, since this code is C++ only.
2105 * data/yacc.c (YYSTACK_FREE) [defined YYSTACK_ALLOC]:
2106 Use YYID(0) rather than 0, for lint.
2107 (yystrlen): Rewrite to avoid lint warning about ptrdiff_t overflow.
2108 (yysyntax_error): Rewrite to avoid lint warnings about parenthesization.
2109
f5228370
PE
21102005-12-07 Paul Eggert <eggert@cs.ucla.edu>
2111
2112 * tests/glr-regression.at
2113 (Improper handling of embedded actions and dollar(-N) in GLR parsers):
2114 Close memory leak reported by twlevo.
2115
69ce078b
PE
21162005-12-06 "Joel E. Denny" <jdenny@ces.clemson.edu>
2117
6ff99711
PE
2118 * data/glr.c (yyprocessOneStack, yyparse): Synchronize the shift for
2119 all stacks.
2120 (yyparse): Iterate another stack in order to call user destructors.
69ce078b
PE
2121 * tests/glr-regression.at (No users destructors if stack 0 deleted):
2122 New test case.
2123 (Duplicated user destructor for lookahead): This test now is expected
2124 to succeed.
2125
af3412cd
PE
21262005-12-01 Paul Eggert <eggert@cs.ucla.edu>
2127
32b5b719 2128 * NEWS: Document the following change.
af3412cd
PE
2129 * data/yacc.c: Say "parser skeleton" rather than "file", since
2130 it's no longer just a file.
2131 * data/glr.c: Grant a special exception for C GLR parsers, that
2132 reads like the already-existing exception for C LALR(1) parsers.
2133 * data/glr.cc: Likewise.
2134 * data/lalr1.cc: Likewise.
2135 * data/location.cc: Likewise.
2136 * data/yacc.c: Reword the "written by" statement to clarify that
2137 it was the parser skeleton, not the entire output file.
2138 * data/glr.c: Written by Paul Hilfinger.
2139 * data/glr.cc: Written by Akim Demaille.
2140 * data/lalr1.cc: Likewise.
2141
035aa4a0
PE
21422005-11-18 Paul Eggert <eggert@cs.ucla.edu>
2143
d9963c85
PE
2144 * data/yacc.c (yy_reduce_print, YY_REDUCE_PRINT):
2145 Fix typos in previous change that broke 'make check'.
2146 YY_REDUCE_PRINT cannot be a pseudo-varargs macro; that isn't
2147 supported in C.
2148 * tests/calc.at (_AT_CHECK_CALC,_AT_CHECK_CALC_ERROR):
2149 Don't check NUM-STDERR-LINES, since the output format is fluctuating.
2150 We can revert this once things settle down.
2151
035aa4a0
PE
2152 * src/conflicts.c (conflicts_print): Don't print file name twice
2153 when %expect fails because there were no conflicts.
2154 * doc/bison.texinfo (Expect Decl): Tighten up wording in previous
2155 change.
2156 * tests/conflicts.at (%expect not enough, %expect too much):
2157 (%expect with reduce conflicts): Adjust to new behavior.
2158
21592005-11-18 Akim Demaille <akim@epita.fr>
2160
2161 * src/conflicts.c (conflicts_print): Unsatisfied %expectation are
2162 errors.
2163 * NEWS: Document this.
2164 * doc/bison.texinfo (Expect Decl): Likewise.
2165
d1ff7a7c
AD
21662005-11-16 Akim Demaille <akim@epita.fr>
2167
2168 Generalize the display of semantic values and locations in traces.
2169 * data/glr.c (yy_reduce_print): Fix indices (again).
2170 * data/c++.m4 (b4_rhs_value, b4_rhs_location): Don't expect
2171 literal integers.
2172 * data/lalr1.cc (yyreduce_print): Rename as...
2173 (yy_reduce_print): this.
2174 Display values and locations.
2175 * data/yacc.c (yy_reduce_print): Likewise.
2176 (YY_REDUCE_PRINT): Adjust to pass the required arguments.
2177 (yysymprint): Move higher to be visible from yy_reduce_print).
2178 (yyparse): Adjust.
2179 * tests/calc.at: Adjust the expected length of the traces.
2180
6de5398d
AD
21812005-11-14 Akim Demaille <akim@epita.fr>
2182
2183 * data/glr.c (yy_reduce_print): The loop was quite wrong: type are
2184 from 1 to N, while values and location start at 0.
2185 (b4_rhs_location, b4_rhs_value): Add parens around $1 and $2.
2186
a1373f55
AD
21872005-11-14 Akim Demaille <akim@epita.fr>
2188
2189 * data/glr.c (yy_reduce_print): Fix the $ number.
2190
613d8952
AD
21912005-11-14 Akim Demaille <akim@epita.fr>
2192
2193 "Use" parse parameters.
2194 * data/c.m4 (b4_parse_param_for, b4_parse_param_use): New.
2195 * data/glr.c, data/glr.cc: Use them.
2196 * data/glr.c (YYUSE): Have a C++ definition that supports
2197 non-pointer types.
2198
b2741627
AD
21992005-11-14 Akim Demaille <akim@epita.fr>
2200
2201 * data/glr.c (yyexpandGLRStack): Declare only if defined.
2202
5059b5c8
AD
22032005-11-14 Akim Demaille <akim@epita.fr>
2204
42249483
AD
2205 * data/glr.cc: New.
2206 * data/m4sugar/m4sugar.m4 (m4_prepend): New.
5059b5c8 2207
4626a15d
AD
22082005-11-12 Akim Demaille <akim@epita.fr>
2209
2210 Let position and location be PODs.
2211 * data/location.cc (position::initialize, location::initialize): New.
2212 (position::position, location::location): Define only if
2213 b4_location_constructors is defined.
2214 * data/lalr1.cc (b4_location_constructors): Define it for backward
2215 compatibility.
2216 * doc/bison.texinfo (Initial Action Decl): Use initialize.
2217
22182005-11-12 Akim Demaille <akim@epita.fr>
98ae9643
AD
2219
2220 * data/lalr1.cc: Move the body of the ctor and dtor into the
2221 parser file (instead of the header).
2222 Wrap the implementations in a "namespace yy".
2223
22242005-11-12 Akim Demaille <akim@epita.fr>
2225
2226 Have glr.c include its header file when created.
2227 * data/glr.c (b4_shared_declarations): New.
2228 Output them verbatim in the parser if !%defines, otherwise
2229 output then in the header file, and include it instead.
2230
1989d947
AD
22312005-11-11 Akim Demaille <akim@epita.fr>
2232
2233 * data/glr.c: Comment changes.
2234
22352005-11-11 Akim Demaille <akim@epita.fr>
62b08cfc
AD
2236
2237 When yydebug, report semantic and location values for reductions.
2238 * data/glr.c (yy_reduce_print): Report the semantic values and the
2239 locations.
2240 (YY_REDUCE_PRINT): Adjust.
2241 (yyglrReduce): Use them.
2242 (b4_rhs_value, b4_rhs_location): Remove m4_eval invocations.
2243 * data/c.m4 (b4_yysymprint_generate): Specify the const arguments.
2244 * tests/calc.at (_AT_CHECK_CALC_ERROR): Remove the reduction
2245 traces.
2246
02998094
AD
22472005-11-10 Akim Demaille <akim@epita.fr>
2248
2249 * data/glr.c (yynewGLRStackItem, YY_RESERVE_GLRSTACK): New.
2250 (yyaddDeferredAction, yyglrShift, yyglrShiftDefer): Use them.
2251 (yyexpandGLRStack, YYRELOC): Define only when YYSTACKEXPANDABLE.
2252
5210672f
PE
22532005-11-09 Albert Chin-A-Young <china@thewrittenword.com>
2254
2255 * m4/cxx.m4, examples/Makefile.am: Don't build
2256 examples/calc++ if no C++ compiler is available. (trivial change)
2257
a8991a1d
AD
22582005-11-09 Akim Demaille <akim@epita.fr>
2259
2260 * src/scan-skel.l: Use a couple of asserts.
2261
36b5e963
AD
22622005-11-03 Akim Demaille <akim@epita.fr>
2263
2264 In some (weird) cases, the final state number is incorrect.
2265 Reported by Alexandre Duret-Lutz.
2266 * src/LR0.c (state_list_append): Remove the computation of
2267 final_state.
2268 (save_reductions): Do it here.
2269 (get_state): Alpha conversion.
2270 (generate_states): Use a for loop.
2271 * src/gram.h (item_number_is_rule_number)
2272 (item_number_is_symbol_number): New.
2273 * src/state.c: Use assert.
2274 * src/system.h: Include assert.h.
2275 * tests/sets.at (Accept): New.
2276
44e7ead1
PH
22772005-10-30 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
2278
2279 * data/glr.c (yyfill): Adjust comment.
36b5e963 2280 (yyresolveAction): Initialize default location properly
44e7ead1
PH
2281 for empty right-hand sides.
2282 (yydoAction): Ditto.
2283 Add comment explaining apparently dead code.
36b5e963
AD
2284 * tests/glr-regression.at
2285 (Incorrectly initialized location for empty right-hand side in GLR):
44e7ead1 2286 New test.
36b5e963 2287
e10a80ee
PE
22882005-10-30 Paul Eggert <eggert@cs.ucla.edu>
2289
2290 * bootstrap (cleanup_gnulib): New function. Use it to clean up
2291 gnulib when interrupted. This fixes some race conditions and
2292 works around some portability problems (one noted by Paul
2293 Hilfinger).
2294
067b32ee
AD
22952005-10-22 Akim <akim@epita.fr>
2296
2297 * Makefile.cfg: Adjust to config -> build-aux.
2298 Reported by twledo.
2299
4b367315
AD
23002005-10-21 Akim Demaille <akim@epita.fr>
2301
2302 * data/c.m4 (b4_yydestruct_generate, b4_yysymprint_generate): Pass
2303 the %parse-params.
2304 * data/glr.c (YY_SYMBOL_PRINT, yydestroyGLRState): Adjust.
2305 * data/yacc.c (b4_Pure_if): Rename as...
2306 (b4_yacc_pure_if): this.
2307 (YY_SYMBOL_PRINT, yyparse): Adjust.
2308 * doc/bison.texinfo: Formatting changes.
2309
24cc23d9
AD
23102005-10-21 Akim Demaille <akim@epita.fr>
2311
2312 Finish the transition config -> build-aux.
2313 * configure.ac, Makefile.am: Use build-aux.
2314 * config/prev-version, config/announce-gen, config/Makefile.am:
2315 Move to...
2316 * build-aux/prev-version, build-aux/announce-gen,
2317 * build-aux/Makefile.am: here.
2318
d4476375
AD
23192005-10-14 Akim Demaille <akim@epita.fr>
2320
2321 * examples/calc++/test: Use set -x only when VERBOSE.
2322
302c0aee
PE
23232005-10-13 Paul Eggert <eggert@cs.ucla.edu>
2324
2325 * NEWS: Bison now warns if it finds a stray `$' or `@' in an action.
2326 * src/scan-gram.l (<SC_BRACED_CODE>[$@]): Implement this.
2327
7625ec2c
AD
23282005-10-13 Akim Demaille <akim@epita.fr>
2329
2330 * src/scan-skel.l: Output the base name parts of the parser and
2331 header file names.
302c0aee 2332 * tests/output.at (AT_CHECK_OUTPUT): Support subdirectories, and
7625ec2c
AD
2333 additional checks.
2334 Use this to exercise C++ outputs in subdirs.
2335 Reported by Oleg Smolsky.
2336
ba0fe3c7
PE
23372005-10-12 Paul Eggert <eggert@cs.ucla.edu>
2338
2339 * data/c.m4 (b4_c_function_def): Look at __C99_FUNC__, not at
2340 __STDC_VERSION__, as IBM cc 7.0 doesn't define the latter either.
2341 Problem reported by John P. Hartmann.
2342 * data/yacc.c (YYMODERN_C): Likewise. Don't define if the user has
2343 already defined it.
2344
9b8a5ce0
AD
23452005-10-12 Akim Demaille <akim@epita.fr>
2346
2347 * src/parse-gram.y (version_check): Exit 63 to please missing
2348 (stands for "version mismatch).
2349 * tests/input.at, doc/bison.texinfo: Adjust.
2350
4f6e011e
PE
23512005-10-10 Paul Eggert <eggert@cs.ucla.edu>
2352
2353 Work around portability problems with Visual Age C compiler
2354 (xlc and xlC_r) reported by John P. Hartmann.
2355 * data/location.cc (initial_column, initial_line): Remove.
2356 All uses replaced by 0 and 1.
2357 * src/scan-gram.l (gram_wrap): Redefine to avoid bug in flex 2.5.31
2358 that xlc complains about.
2359 * src/scan-skel.l (skel_wrap): Likewise.
4d7aa45e 2360 * data/c.m4 (b4_c_function_def): Look at __STDC_VERSION__ as well
ba0fe3c7 2361 as __STDC__.
4d7aa45e
PE
2362 * data/yacc.c (YYMODERN_C): New macro, which also looks at
2363 __STDC_VERSION__. Use it everywhere instead of looking at
2364 __STDC__ and __cplusplus.
4f6e011e 2365
a1b3bf8c
AD
23662005-10-10 Akim Demaille <akim@epita.fr>
2367
2368 * examples/calc++/test: Be quiet unless VERBOSE.
2369
412e44aa
PE
23702005-10-05 Paul Eggert <eggert@cs.ucla.edu>
2371
2a4647a3
PE
2372 * data/c.m4 (yydestruct, yysymprint):
2373 Use YYUSE instead of casting to void.
2374 * data/glr.c (YYUSE): New macro.
2375 (yyuserMerge, yyreportAmbiguity, yyreportSyntaxError):
2376 Use it instead of rolling our own.
2377 (YYLLOC_DEFAULT, YYCHK, YYDPRINTF, YY_SYMBOL_PRINT, YY_REDUCE_PRINT):
2378 (YYCHK1):
2379 Use /*CONSTCOND*/ to suppress lint warnings.
2380 * data/lalr1.cc (YYLLOC_DEFAULT, YY_SYMBOL_PRINT, YY_REDUCE_PRINT):
2381 (YY_STACK_PRINT): Use 'false' not '0'.
2382 (YYUSE): New macro.
2383 (yysymprint_, yydestruct_): Use it instead of rolling our own.
2384 * data/yacc.c (YYUSE): New macro.
2385 (YYCOPY, YYSTACK_RELOCATE, YYBACKUP, YYLLOC_DEFAULT):
2386 (YYDPRINTF, YY_SYMBOL_PRINT, YY_STACK_PRINT, YY_REDUCE_PRINT):
2387 (yyerrorlab): Use /*CONSTCOND*/ to suppress lint warnings.
2388
2389
412e44aa
PE
2390 * data/m4sugar/m4sugar.m4 (_m4_map): New macro.
2391 (m4_map, m4_map_sep): Use it. Handle the empty list correctly.
2392
88c6637f
PE
23932005-10-04 Paul Eggert <eggert@cs.ucla.edu>
2394
2f4f028d
PE
2395 Undo the parts of the unlocked-I/O change that substituted
2396 putc or puts for printf. This might hurt performance a bit,
2397 but some people prefer the printf style.
2398 * data/c.m4 (yysymprint): Prefer printf to puts and putc.
2399 * data/glr.c (YYFPUTC, YYFPUTS, YYDPUTS): Remove.
2400 All uses replaced by YYFPRINTF and YYDPRINTF.
2401 * data/yacc.c: Likewise.
2402 * lib/bitset.c (bitset_print): Likewise.
2403 * lib/bitsetv.c (bitsetv_dump, debug-bitsetv): Prefer printf to
2404 putc and puts.
2405 * lib/lbitset.c (debug_lbitset): Likewise.
2406 * src/closure.c (print_firsts, print_fderives): Likewise.
2407 * src/gram.c (grammar_dump): Likewise.
2408 * src/lalr.c (look_ahead_tokens_print): Likewise.
2409 * src/output.c (escaped_output): Likewise.
2410 (user_actions_output): Break apart two printfs.
2411 * src/parse-gram.y (%printer): Prefer printf to putc and puts.
2412 * src/reduce.c (reduce_print): Likewise.
2413 * src/state.c (state_rule_look_ahead_tokens_print): Likewise.
2414 * src/system.h: Include unlocked-io.h rathe than stdio.h.
2415
88c6637f
PE
2416 * data/glr.c (yyuserMerge, yyreportAmbiguity, yyreportSyntaxError):
2417 Use assignments rather than casts-to-void to suppress
2418 unused-variable warnings. This pacifies 'lint'.
2419 * data/lalr1.cc (yysymprint_, yydestruct_): Use a call to suppress
2420 unused-variable warnings.
2421
fb32e373
JMG
24222005-10-03 Juan Manuel Guerrero <juan.guerrero@gmx.de>
2423
2424 * Makefile.am: DJGPP specific files added to EXTRA_DIST.
2425
edb8f44f
PE
24262005-10-02 Paul Eggert <eggert@cs.ucla.edu>
2427
fb9c0b33
PE
2428 Use unlocked I/O for a minor performance improvement on hosts like
2429 GNU/Linux and Solaris that support unlocked I/O. The basic idea
2430 is to use the gnlib unlocked-io module, and to prefer putc and
2431 puts to printf when either will work (since the latter doesn't
2432 come in an unlocked flavor).
2433 * bootstrap (gnulib_modules): Add unlocked-io.
2434 * data/c.m4 (yysymprint): Prefer puts and putc to printf.
2435 * data/glr.c (YYFPUTC, YYFPUTS, YYDPUTS): New macros.
2436 Prefer them to YYFPRINTF and YYDPRINTF if either will do,
2437 and similarly for puts and putc and printf.
2438 * data/yacc.c: Likewise.
2439 * lib/bitset.c (bitset_print): Likewise.
2440 * lib/bitset.h [USE_UNLOCKED_IO]: Include unlocked-io.h.
2441 * lib/bitsetv.c (bitsetv_dump, debug-bitsetv): Prefer putc and puts
2442 to printf.
2443 * lib/lbitset.c (debug_lbitset): Likewise.
2444 * src/closure.c (print_firsts, print_fderives): Likewise.
2445 * src/gram.c (grammar_dump): Likewise.
2446 * src/lalr.c (look_ahead_tokens_print): Likewise.
2447 * src/output.c (escaped_output): Likewise.
2448 (user_actions_output): Coalesce two printfs.
2f4f028d 2449 * src/parse-gram.y (%printer): Prefer putc and puts to printf.
fb9c0b33
PE
2450 * src/reduce.c (reduce_print): Likewise.
2451 * src/state.c (state_rule_look_ahead_tokens_print): Likewise.
2f4f028d 2452 * src/system.h: Include unlocked-io.h rather than stdio.h.
fb9c0b33 2453
edb8f44f
PE
2454 * data/lalr1.cc: Don't put an unmatched ' in a dnl comment, as
2455 this confuses xgettext.
2456
b50d2359
AD
24572005-10-02 Akim Demaille <akim@epita.fr>
2458
2459 * bootstrap (gnulib_modules): Add strverscmp.
2460 * lib/.cvsignore: Add strverscmp.c, strverscmp.h.
2461 * m4/.cvsignore: Add strverscmp.m4.
2462 * src/parse-gram.y (%require): New token, new rule.
2463 (version_check): New.
2464 * src/scan-gram.l (%require): Adjust.
2465 * tests/input.at (AT_REQUIRE): New.
2466 Use it.
2467 * doc/bison.texinfo (Require Decl): New.
2468 (Calc++ Parser): Use %require.
2469
21667f64
AD
24702005-10-02 Akim Demaille <akim@epita.fr>
2471
2472 * data/location.cc: New.
2473
2b81e969
AD
24742005-10-02 Paul Eggert <eggert@cs.ucla.edu>,
2475 Akim Demaille <akim@epita.fr>
2476
2477 Make sure -odir/foo.cc creates dir/location.hh etc.
2478 * src/files.h (spec_outfile, parser_file_name, spec_name_prefix)
2479 (spec_file_prefix, spec_verbose_file, spec_graph_file)
2480 (spec_defines_file): Now const.
2481 (dir_prefix): New.
2482 (short_base_name): Remove.
2483 * src/files.c: Adjust.
2484 (dirname.h): Include.
2485 (base_name): Don't prototype it.
2486 (finput): Remove, duplicates gram_in.
2487 (full_base_name, short_base_name): Replace by...
2488 (all_but_ext, all_but_tab_ext): these.
2489 (compute_base_names): Rename as...
2490 (compute_file_name_parts): this.
2491 Update to compute the new variables, including dir_prefix.
2492 Adjust dependencies.
2493 * src/output.c (prepare): Output them.
2494 * src/reader.c: Adjust to use gram_in, not finput.
2495 * src/scan-skel.l (@dir_prefix@): New.
2496
ad6a9b97
JMG
24972005-10-02 Juan Manuel Guerrero <juan.guerrero@gmx.de>
2498
2499 * lib/subpipe.c: New function end_of_output_subpipe() added
2500 to allow support for non-posix systems. This is a no-op function
2501 for posix systems.
2502
2503 * lib/subpipe.h: New function end_of_output_subpipe() added
2504 to allow support for non-posix systems. This is a no-op function
2505 for posix systems.
2506
2507 * src/output.c (output_skeleton): Use end_of_output_subpipe() to
2508 handle the lack of pipe/fork functionality on non-posix systems.
2509
2510 * djgpp/Makefile.maint: DJGPP specific file.
2511
2512 * djgpp/README.in: DJGPP specific file.
2513
2514 * djgpp/config.bat: DJGPP specific configuration file.
2515
2516 * djgpp/config.sed: DJGPP specific configuration file.
2517
2518 * djgpp/config.site: DJGPP specific configuration file.
2519
2520 * djgpp/config_h.sed: DJGPP specific configuration file.
2521
2522 * djgpp/subpipe.c: DJGPP specific replacement file for lib/subpipe.c.
2523
2524 * djgpp/subpipe.h: DJGPP specific replacement file for lib/subpipe.h.
2525
fc695704
AD
25262005-10-02 Akim Demaille <akim@epita.fr>
2527
2528 * data/location.cc: New, extract from...
2529 * data/lalr1.cc: here.
2530 (location.hh): Include it after the user prologue, in case the
2531 filename type is defined by the user.
2532 Forward declation location and position before the pre-prologue.
2533 (yyresult_): Rename as...
2534 (yyresult): this, it's a local variable, not an attribute.
2535 * data/Makefile.am (dist_pkgdata_DATA): Adjust.
2536
25372005-10-01 Akim Demaille <akim@epita.fr>
5215c87f
AD
2538
2539 * examples/extexi: Restore the #line generation.
2540
fb9712a9
AD
25412005-09-30 Akim Demaille <akim@epita.fr>,
2542 Alexandre Duret-Lutz <adl@gnu.org>
2543
2544 Move the token type and YYSTYPE in the parser class.
2545 * data/lalr1.cc (stack.hh, location.hh): Include earlier.
2546 (parser::token): New, from the moved free definition of tokens.
2547 (parser::semantic_value): Now a full definition instead of an
2548 indirection to YYSTYPE.
2549 (b4_post_prologue): No longer included in the header file, but
2550 in the implementation file.
2551 * doc/bison.texi (C+ Language Interface): Update.
2552 * src/parse-gram.y: Support unary %define.
2553 * tests/actions.at: Define global_tokens_and_yystype for backward
2554 compatibility until we update the tests.
2555 * tests/calc.at: Idem.
2556 (first_line, first_column, last_line, last_column): Define for lalr1.cc
2557 to simplify the code.
2558
55f0c7b1
PE
25592005-09-29 Paul Eggert <eggert@cs.ucla.edu>
2560
2561 Port to SunOS 4.1.4, which lacks strtoul and strerror.
2562 Ah, the good old days! Problem reported by Peter Klein.
2563 * bootstrap (gnulib_modules): Add strerror, strtoul.
2564 * lib/.cvsignore: Add strerror.c, strtol.c, strtoul.c
2565 * m4/.cvsignore: Add strerror.m4, strtol.m4, strtoul.m4.
2566
fb9712a9 25672005-09-29 Akim Demaille <akim@epita.fr>
d4fb5e3c
AD
2568
2569 * data/c.m4 (b4_error_verbose_if): New.
2570 * data/lalr1.cc: Use it.
2571 (YYERROR_VERBOSE_IF): Remove.
2572 (yyn_, yylen_, yystate_, yynerrs_, yyerrstatus_): Remove as
2573 parser members, replaced by...
2574 (yyn, yylen, yystate, yynerss, yyerrstatus): these parser::parse
2575 local variables.
2576 (yysyntax_error_): Takes the state number as argument.
2577 (yyreduce_print_): Use the argument yyrule, not the former
2578 attribute yyn_.
2579
8a6f72f3
PE
25802005-09-26 Paul Eggert <eggert@cs.ucla.edu>
2581
2582 * bootstrap (gnulib_modules): Add verify.
2583 * lib/.cvsignore: Add verify.h.
2584 * src/getargs.c: Use ARGMATCH_VERIFY rather than verify.
2585 * src/system.h (verify): Remove.
2586 Include verify.h instead.
2587 * src/tables.c (tables_generate): Use new API for 'verify'.
2588
0d50976f
PE
25892005-09-21 Paul Eggert <eggert@cs.ucla.edu>
2590
ebc3737e
PE
2591 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Do not use
2592 local variables whose names begin with 'yy'.
2593 * tests/calc.at (_AT_DATA_CALC_Y): Likewise.
2594 Trivial changes from Joel E. Denny.
2595
0d50976f
PE
2596 * bootstrap (gnulib_modules): Remove alloca. Bison doesn't need
2597 it itself.
2598 * src/main.c (main) [C_ALLOCA]: Don't flush alloca'ed memory; we
2599 don't use alloca any more.
2600
2601 * data/yacc.c [YYSTACK_USE_ALLOCA && !defined __GNUC__ && ! defined
2602 __BUILTIN_VA_ARG_INCR && ! defined _AIX && ! defined _MSC_VER &&
62c4328e 2603 defined _ALLOCA_H]: Don't include <stdlib.h>; not needed in this case.
0d50976f
PE
2604 * tests/torture.at (Exploding the Stack Size with Alloca): Adjust
2605 to match yacc.c, to test more hosts.
2606
a05b79df
PE
26072005-09-20 Paul Eggert <eggert@cs.ucla.edu>
2608
55289366
PE
2609 * data/yacc.c (YYSIZE_T): Reindent to make it clearer. This
2610 doesn't affect behavior.
2611 (YYSTACK_ALLOC) [YYSTACK_USE_ALLOCA]: Improve support for
2612 Solaris, AIX, MSC.
2613 (_STDLIB_H): Renamed from YYINCLUDED_STDLIB_H. All uses changed.
2614 This works a bit better with glibc, if user code has already included
2615 stdlib.h.
2616 * doc/bison.texinfo (Bison Parser): Document that users can't
2617 arbitrarily use malloc and free for other purposes. Document
2618 that <alloca.h> and <malloc.h> might be included.
2619 (Table of Symbols): Under YYSTACK_USE_ALLOCA, Don't claim that the
2620 user must declare alloca.
2621
a05b79df
PE
2622 * HACKING (release): Forwarn the Translation Project about
2623 stable releses.
2624
3ab2ca22
AD
26252005-09-20 Akim Demaille <akim@epita.fr>
2626
2627 * data/glr.c: Use b4_token_enums, not b4_token_enums_defines.
2628
a9739e7c
PE
26292005-09-19 Paul Eggert <eggert@cs.ucla.edu>
2630
a702593e
PE
2631 * data/yacc.c (YYSIZE_MAXIMUM): New macro.
2632 (YYSTACK_ALLOC_MAXIMUM): Use it.
2633 (yysyntax_error): New function.
2634 (yyparse) [YYERROR_VERBOSE]: Don't leak memory indefinitely if
2635 multiple syntax errors are reported, and alloca is being used.
2636 Instead, reallocate buffers twice as big each time, so that
2637 we waste at most half the allocated memory. Start with a small
2638 (128-byte) buffer that will suffice in most cases anyway.
2639 Use yysyntax_error to do most of the work.
2640
2641 * doc/bison.texinfo (Error Reporting, Table of Symbols):
2642 yynerrs is the number of errors reported, not the number of
2643 errors encountered.
2644
a9739e7c
PE
2645 * tests/glr-regression.at (Duplicated user destructor for lookahead):
2646 Mark it as expected to fail.
2647 Cast result of malloc; problem reported by twlevo@xs4all.nl.
2648 * tests/actions.at, tests/calc.at, tests/glr-regression.at:
2649 Don't start user-code symbols with "yy", to avoid name space problems.
2650
f479c6c6
AD
26512005-09-19 Akim Demaille <akim@epita.fr>
2652
2653 Remove the traits, failed experiment.
2654 It never proved useful, and anyway because of the current
2655 definition, it was not possible to have several specialization of
2656 this traits, making it useless.
2657 * data/lalr1.cc (yy:traits): Remove.
2658 Inline its definitions in the parser class.
2659
e2586f82
AD
26602005-09-19 Akim Demaille <akim@epita.fr>
2661
2662 * tests/atlocal.in (LIBS): Pass INTLLIBS to address failures on at
2663 least Mac OSX with a /usr/local install of gettext.
2664
2e8cf949
AD
26652005-09-19 Akim Demaille <akim@epita.fr>
2666
2667 * data/lalr1.cc (yyparse): Rename yylooka and yyilooka as yychar
2668 and yytoken for similarity with the other skeletons.
2669
c7fb0b90
AD
26702005-09-19 Akim Demaille <akim@epita.fr>
2671
4e26c69e 2672 * NEWS, configure.ac: update version number to 2.1a.
c7fb0b90 2673
1bd0deda
PE
26742005-09-16 Paul Eggert <eggert@cs.ucla.edu>
2675
2676 * NEWS: Version 2.1.
2677
2678 * NEWS: Remove notice of yytname change, since it was never in an
2679 official release.
2680 * data/glr.c (yydestroyGLRState): Rename local var to avoid shadowing
2681 diagnostic.
2682 * src/output.c (prepare): Likewise.
2683 * data/lalr1.cc (YYERROR_VERBOSE_IF): New macro.
2684 (yysyntax_error_): Use it to avoid GCC warning when YYERROR_VERBOSE
2685 is not defined. This is an awful hack, but it's enough for now.
2686 All callers changed.
2687 * tests/glr-regression-at (make_value): Args are const pointers now,
2688 to avoid GCC warning.
2689 (Duplicated user destructor for lookahead): New test. Currently
2690 skipped. It fails on my host but I'm not sure it'll always fail.
2691
26922005-09-16 Akim Demaille <akim@epita.fr>
c1432f65
AD
2693
2694 * src/symtab.h (struct symbol): Declare the printer and destructor
2695 as const, to avoid accidental calls to free.
2696 (symbol_destructor_set, symbol_printer_set): Adjust.
2697 * src/symtab.c: Adjust.
2698
1bd0deda 26992005-09-16 Akim Demaille <akim@epita.fr>
cf147260
AD
2700
2701 * data/c.m4 (b4_token_enums): New.
2702 (b4_token_defines): Rename as...
2703 (b4_token_enums_defines): this.
2704 (b4_token_defines): New, output only the #defines.
2705 * data/yacc.c, data/glr.c: Adjust.
2706 * data/lalr1.cc: Use b4_token_enums instead of b4_token_enums_defines.
2707 * data/c.m4 (b4_yydestruct_generate, b4_yysymprint_generate): Define
2708 as default values.
2709
dbcdae2d
AD
27102005-09-16 Akim Demaille <akim@epita.fr>
2711
2712 * data/lalr1.cc (yylex_): Remove, inline its code.
2713 (yyreport_syntax_error_): Remove, replaced by...
2714 (yysyntax_error_): this which returns a string and leaves to the
2715 caller the call to the users' error function.
2716 (yylooka_, yyilooka_, yylval, yylloc, yyerror_range_, yyval, yyloc):
2717 Move from members of the parser object...
2718 (yylooka, yyilooka, yylval, yylloc, yyerror_range, yyval, yyloc):
2719 to local variables of the parse function.
2720
70d8f291
AD
27212005-09-16 Akim Demaille <akim@epita.fr>
2722
2723 * doc/bison.texinfo (Calc++ Parser): Don't promote defining YYEOF
2724 since it's in Bison's name space.
2725
b47dbebe
PE
27262005-09-15 Paul Eggert <eggert@cs.ucla.edu>
2727
ae199bf1
PE
2728 * data/glr.c (yyresolveValue): Add default case to pacify
2729 gcc -Wswitch-default. Problem reported by twlevo@xs4all.nl.
2730
b47dbebe
PE
2731 * NEWS: Document when yyparse started to return 2.
2732 * doc/bison.texinfo (Parser Function): Document when yyparse
2733 returns 2.
2734
2735 * data/lalr1.cc: Revert part of previous change, as it's incompatible.
2736 (b4_filename_type): Renamed back from b4_file_name_type. All uses
2737 changed.
2738 (class position): file_name -> filename (reverting). All uses changed.
2739
27402005-09-14 Paul Eggert <eggert@cs.ucla.edu>
2741
2742 * examples/calc++/Makefile.am ($(calc_sources_generated)): Don't
2743 do anything if $@ exists. This reverts part of the 2005-07-07
2744 patch.
2745
00292f66
PE
27462005-09-11 Paul Eggert <eggert@cs.ucla.edu>
2747
2748 * Makefile.am (EXTRA_DIST): Do not distribute REFERENCES; it
2749 contains obsolete information and isn't worth distributing as a
2750 separate file anyway.
2751 * data/glr.c [defined YYSETJMP]: Don't include <setjmp.h>.
2752 (YYJMP_BUF, YYSETJMP, YYLONGJMP) [!defined YYSETJMP]: New macros.
2753 All uses of jmp_buf, setjmp, longjmp changed to use these instead.
2754 (yyparse): Abort if user code uses longjmp to throw an unexpected
2755 value.
2756
a420f962
PE
27572005-09-09 Paul Eggert <eggert@cs.ucla.edu>
2758
00292f66
PE
2759 * data/c.m4 (b4_identification): Define YYBISON_VERSION.
2760 Suggested by twlevo@xs4all.nl.
2761
127287e9
PE
2762 * data/glr.c (YYCHK1): Do not assume YYE is in range.
2763 This avoids a diagnostic from gcc -Wswitch-enum.
2764 Problem reported by twlevo@xs4all.nl.
2765
a420f962
PE
2766 * doc/bison.texinfo: Don't use "filename", as per GNU coding
2767 standards. Use "file name" or "file" or "name", depending on
2768 the context.
2769 (Invocation): The output of "bison hack/foo.y" goes to foo.tab.c,
2770 not to hack/foo.tab.c.
2771 (Calc++ Top Level): 2nd arg of main is not const.
48b16bbc
PE
2772 * data/glr.c: b4_filename -> b4_file_name.
2773 * data/lalr1.cc: Likewise. Also, b4_filename_type -> b4_file_name_type.
2774 All uses changed.
2775 (class position): filename -> file_name. All uses changed.
2776 * data/yacc.c: b4_filename -> b4_file_name.
2777 * lib/bitset.h: filename -> file_name in local vars.
2778 * lib/bitset_stats.c: Likewise.
2779 * src/files.c: Likewise.
2780 * src/scan-skel.l ("@output ".*\n): Likewise.
2781 * src/files.c (file_name_split): Renamed from filename_split.
2782 * src/muscle_tab.c (muscle_init): Output b4_file_name, not b4_filename.
a420f962
PE
2783
27842005-09-08 Paul Eggert <eggert@cs.ucla.edu>
2785
2786 * lib/.cvsignore: Add pipe-safer.c, stdio--.h, unistd--.h,
2787 to accommodate latest gnulib.
2788
2789 * tests/glr-regression.at (Duplicate representation of merged trees):
2790 Add casts to pacify g++. Problem reported by twlevo@xs4all.nl.
2791
2792 * bootstrap: Add comment as to why the AM_LANGINFO_CODESET hack is
2793 needed.
2794
42a6501d
PE
27952005-08-26 Paul Eggert <eggert@cs.ucla.edu>
2796
2797 * data/glr.c (yydestroyGLRState): Renamed from yydestroyStackItem.
2798 All uses changed. Invoke user destructor after an error during a
2799 split parse (trivial change from Joel E. Denny).
2800
2801 * tests/glr-regression.at
2802 (User destructor after an error during a split parse): New test case.
2803 Problem reported by Joel E. Denny in:
2804 http://lists.gnu.org/archive/html/bison-patches/2005-08/msg00029.html
2805
ef9a1faf
PE
28062005-08-25 Paul Eggert <eggert@cs.ucla.edu>
2807
5b4aaf78
PE
2808 * README-cvs: Give URLs for recommended tools.
2809 Mention Gzip version problem, and bootstrapping issues.
2810 Remove troubleshooting section, as it's somewhat obsolete.
2811
b5240ba5
PE
2812 * bootstrap (no_cache): New var, to accommodate different wget
2813 variants. Use it instead of '-C off'. Problem reported by
2814 twlevo@xs4all.nl.
2815
ef9a1faf
PE
2816 * data/glr.c (yydestroyStackItem): New function.
2817 (yyrecoverSyntaxError, yyreturn): Use it to improve quality of
2818 debugging information. Problem reported by Joel E. Denny.
2819
e6efa9da
AD
28202005-08-25 Akim Demaille <akim@epita.fr>
2821
2822 * tests/local.at (AT_COMPILE_CXX): Pass $LINKS too.
2823
adc90f13
PE
28242005-08-24 Paul Eggert <eggert@cs.ucla.edu>
2825
2826 * data/glr.c (yyrecoverSyntaxError, yyreturn):
2827 Don't invoke destructor on unresolved entries.
2828 * tests/glr-regression.at
2829 (User destructor for unresolved GLR semantic value): New test case.
2830 Problem reported by Joel E. Denny in:
2831 http://lists.gnu.org/archive/html/bison-patches/2005-08/msg00016.html
2832
f9315de5
PE
28332005-08-21 Paul Eggert <eggert@cs.ucla.edu>
2834
15d29c1f
PE
2835 * lib/.cvsignore: Remove realloc.c, strncasecmp.c, xstrdup.c.
2836 Add strnlen.c.
2837 * m4/.cvsignore: Remove codeset.m4, gettext.m4, lib-ld.m4,
2838 lib-prefix.m4, po.m4.
2839
dd5f2af2
PE
2840 * data/glr.c (yyreturn): Use "Cleanup:" rather than "Error:"
2841 in yydestruct diagnostic, since it might not be an error.
2842 Problem reported by Joel Denny near end of
2843 <http://lists.gnu.org/archive/html/help-bison/2005-07/msg00040.html>.
6250acbd 2844 * data/lalr1.cc (yyerturn): Likewise.
dd5f2af2
PE
2845 * data/yacc.c (yyreturn): Likewise.
2846 * tests/calc.at (_AT_CHECK_CALC_ERROR): Adjust to the above change.
2847
2848 * src/files.c: Remove obsolete FIXME comment.
2849
2850 * data/glr.c (YY_SYMBOL_PRINT): Append a newline, for consistency
2851 with the other templates, and to fix bogus run-on messages such
2852 as the one reported at the end of
2853 <http://lists.gnu.org/archive/html/help-bison/2005-07/msg00040.html>.
2854 All callers changed to avoid the newline.
2855 (yyprocessOneStack): Output two lines rather than one, to accommodate
2856 the above change. This changes the debug output format slightly.
2857
f9315de5
PE
2858 * data/glr.c (yyresolveValue): Fix redundant parse tree problem
2859 reported by Joel E. Denny in
2860 <http://lists.gnu.org/archive/html/bison-patches/2005-08/msg00004.html>
2861 (trivial change).
2862 * tests/glr-regression.at (Duplicate representation of merged trees):
2863 New test, from Joel E. Denny in:
2864 <http://lists.gnu.org/archive/html/help-bison/2005-07/msg00013.html>.
2865 * THANKS: Add Joel E. Denny.
2866
2867 * configure.ac (AC_INIT): Bump to 2.0c.
2868
04098407
PE
28692005-07-24 Paul Eggert <eggert@cs.ucla.edu>
2870
2871 * NEWS: Version 2.0b.
2872
ca5d2013
PE
2873 * Makefile.am (SUBDIRS): Put examples before tests, so that
2874 "make check" doesn't finish with "All 1 tests passed".
2875
3d54b576
PE
2876 * tests/regression.at (Token definitions): Don't rely on
2877 AT_PARSER_CHECK for data that contains backslashes. It currently
2878 uses 'echo', and 'echo' isn't portable if its argument contains
2879 backslashes. Problem found on OpenBSD 3.4. Also, do not assume
2880 that the byte '\0xff' is not printable in the C locale; it is,
2881 under OpenBSD 3.4 (!). Luckily, '\0x80' through '\0x9e' are
2882 not printable, so use '\0x81' to test.
2883
d53ae497
PE
2884 * data/glr.c (YYOPTIONAL_LOC): Define even if it's not a recent
2885 version of GCC, since the macro is used with non-GCC compilers.
2886
fc01665e
PE
2887 Fix core dump reported by Pablo De Napoli in
2888 <http://lists.gnu.org/archive/html/bug-bison/2005-07/msg00053.html>.
2889 * tests/regression.at (Invalid inputs with {}): New test.
2890 * src/parse-gram.y (token_name): Translate type before using
2891 it as an index.
2892
04098407
PE
2893 * data/glr.c (ATTRIBUTE_UNUSED): Remove, since it infringes on
2894 the user's name space. All uses changed to __attribute__
2895 ((__unused__)).
2896 (yyFail, yyMemoryExhausted, yyreportAmbiguity):
2897 Add __attribute__ ((__noreturn__)).
2898
2899 * etc/clcommit: Remove. We weren't using it, and it failed
2900 "make maintainer-distcheck".
2901 * Makefile.maint: Merge from coreutils.
2902 (CVS_LIST, CVS_LIST_EXCEPT): New macros.
2903 (syntax-check-rules): Change list of rules as described below.
2904 (sc_cast_of_alloca_return_value, sc_dd_max_sym_length):
2905 (sc_file_system, sc_obsolete_symbols, sc_prohibit_atoi_atof):
2906 (sc_prohibit_jm_in_m4, sc_root_tests, sc_tight_scope):
2907 (sc_trailing_space): New rules.
2908 (sc_xalloc_h_in_src): Remove.
2909 (sc_cast_of_argument_to_free, sc_cast_of_x_alloc_return_value):
2910 (sc_space_tab, sc_error_exit_success, sc_changelog):
2911 (sc_system_h_headers, sc_sun_os_names, sc_unmarked_diagnostics):
2912 (makefile-check, po-check, author_mark_check):
2913 (makefile_path_separator_check, copyright-check):
2914 Use grep -n, to make it easier to find violations.
2915 Use CVS_LIST and CVS_LIST_EXCEPT.
2916 (header_regexp, h_re): Remove.
2917 (dd_c): New macro.
2918 (sc_dd_max_sym_length, .re-list, news-date-check): New rules.
2919 (my-distcheck): Use more-modern GCC flags.
2920 (signatures, %.asc): Remove.
2921 (rel-files, announcement): Remove signatures.
2922 Restore old updating code, even though we don't use it, so
2923 that we're the same as coreutils.
2924 (alpha, beta, major): Depend on news-date-check.
2925 Make the upload commands.
2926
2927 * data/c.m4, data/lalr1.cc, data/yacc.c: Normalize white space.
2928 * lib/abitset.h, lib/bbitset.h, lib/bitset.h: Likewise.
2929 * lib/bitset_stats.c, lib/ebitset.h, lib/lbitset.c: Likewise.
2930 * lib/libitset.h, lib/timevar.c, lib/vbitset.h: Likewise.
2931 * src/Makefile.am, src/gram.c, src/muscle_tab.h: Likewise.
2932 * src/parse-gram.y, src/system.h, src/tables.c, src/vcg.c: Likewise.
2933 * src/vcg_defaults.h, tests/cxx-type.at, tests/existing.at: Likewise.
2934 * tests/sets.at: Likewise.
2935
2936 * data/m4sugar/m4sugar.m4: Sync from Autoconf, except that
2937 we comment out the Autoconf version number.
2938 * doc/bison.texinfo (Calc++ Scanner): Don't use atoi, as
2939 it's error-prone and "make maintainer-distcheck" rejects it.
2940
2941 * lib/subpipe.c: Include <fcntl.h> without checking for HAVE_FCNTL_H.
2942 Indent calls to "error" to pacify "make maintainer-distcheck",
2943 when the calls are not intended to be translated.
2944 * m4/subpipe.m4 (BISON_PREREQ_SUBPIPE): Don't check for fcntl.h.
2945
2946 * src/Makefile.am (DEFS): Use +=, to pacify
2947 "make maintainer-distcheck".
2948 (bison_SOURCES): Add scan-skel.h.
2949 (sc_tight_scope): New rule, from coreutils.
2950
2951 * src/files.c (src_extension, header_extension):
2952 Now static, not extern.
2953 * src/getargs.c (short_options): Likewise.
2954 * src/muscle_tab.c (muscle_table): Likewise.
2955 * src/parse-gram.y (current_class, current_type, current_prec):
2956 Likewise.
2957 * src/reader.c (grammar_end, previous_rule_end): Likewise.
2958 * src/getargs.h: Redo comments to pacify "make maintainer-distcheck".
2959 * src/main.c (main): Cast bindtextdomain and textdomain calls to
2960 void, to avoid warning when NLS is disabled.
2961 * src/output.c: Include scan-skel.h.
2962 (scan_skel): Remove decl, since scan-skel.h does this.
2963 (output_skeleton):
2964 Indent calls to "error" to pacify "make maintainer-distcheck".
2965 * src/print_graph.c: Don't include <obstack.h>, as system.h does this.
2966 * src/reader.h (gram_end, gram_lineno): New decls to pacify
2967 "make maintainer-distcheck".
2968 * src/scan-skel.l (skel_lex, skel_get_lineno, skel_get_in):
2969 (skel_get_out, skel_get_leng, skel_get_text, skel_set_lineno):
2970 (skel_set_in, skel_set_out, skel_get_debug, skel_set_debug):
2971 (skel_lex_destroy, scan_skel): Move these decls to...
2972 * src/scan-skel.h: New file.
2973 * src/uniqstr.c (uniqstr_assert):
2974 Indent calls to "error" to pacify "make maintainer-distcheck".
2975
2976 * tests/Makefile.am ($(srcdir)/package.m4): Use $(VAR),
2977 not @VAR@.
2978
2979 * tests/torture.at: Revamp to avoid misuse of atoi that
2980 "make maintainer-distcheck" complained about.
2981
2982 * examples/extexi (message): Don't print a message more than once,
2983 and omit line-number decoration that makes Emacs compile think
2984 that informative messages are worth worrying about.
2985
29862005-07-22 Paul Eggert <eggert@cs.ucla.edu>
2987
2988 * configure.ac: Update version number.
2989
2990 * Makefile.am (SUBDIRS): Add examples; somehow this got removed
2991 accidentally.
2992 * examples/calc++/calc++-parser.yy: Remove from CVS, as it's
2993 autogenerated by the maintainer.
2994 * examples/calc++/.cvsignore: Add *.yy.
2995
2996 * lib/bitset.c (bitset_alloc): Don't cast xcalloc result.
2997 * lib/bitset_stats.c (bitset_stats_init): Likewise.
2998 * lib/bitsetv.c (bitsetv_alloc): Likewise.
2999
3000 * po/POTFILES.in: Add lib/xalloc-die.c; remove lib/xmalloc.c.
3001
3002 * src/relation.c (relation_transpose): Rewrite to avoid bogus complaint
3003 from maintainer-distcheck about casting the argument of 'free'.
3004
3005 * NEWS: Mention recent yytname changes.
3006 * THANKS: Add Anthony Heading, twlevo@xs4all.nl.
3007
3008 * bootstrap: For translations that have not yet been upgraded to
3009 the new runtime-po domain, prime the pump by extracting the
3010 relevant strings from the obsolete translations. This code can be
3011 removed once the bison-runtime domain has been translated by each
3012 team.
3013
3014 * src/scan-gram.l (<SC_PRE_CODE>.): Don't double-quote token names,
3015 now that token names are already quoted.
3016
3017 Fix problem reported by Anthony Heading.
3018 * data/glr.c (YYTOKEN_TABLE): New macro.
3019 (yytname): Define if YYTOKEN_TABLE.
3020 * data/yacc.c (YYTOKEN_TABLE, yytname): Likewise.
3021 * data/lalr1.cc (YYTOKEN_TABLE, yytname_): Likewise.
3022 (YYERROR_VERBOSE): Define the same way the other skeletons do.
3023 * src/output.c (prepare_symbols): Output token_table_flag.
3024
0ffda363
PE
30252005-07-21 Paul Eggert <eggert@cs.ucla.edu>
3026
3027 * data/glr.c (yyinitGLRStack, yyreturn): Don't call malloc
3028 again if the first call fails.
3029
3030 * data/glr.c (yytnamerr): New function.
3031 (yyreportSyntaxError): Use it to dequote most string literals.
3032 * data/lalr1.c (yytname_): Renamed from yyname_, for compatibility
3033 with other skeletons. All uses changed.
3034 (yytnameerr_): New function.
3035 (yyreport_syntax_error): Use it to dequote most string literals.
3036 * data/yacc.c (yytnamerr): New function.
3037 (yyerrlab): Use it to decode most string literals.
3038 * doc/bison.texinfo (Decl Summary, Calling Convention):
3039 Clarify quoting convention of yytname.
3040 * src/output.c (prepare_symbols): Quote all names. This undoes
3041 the 2005-04-17 change, which is now accomplished (mostly) via
3042 changes in the parsers as described above.
3043 * tests/regression.at (Token definitions, Web2c Actions):
3044 Undo most 2005-04-17 change here, too.
3045
30462005-07-20 Paul Eggert <eggert@cs.ucla.edu>
3047
3048 Fix more problems reported by twlevo@xs4all.nl.
3049 * tests/cxx-type.at: Don't pipe output of ./types through sed to
3050 remove trailing spaces. This loses the exit status of ./types,
3051 and isn't needed since ./types shouldn't be emitting trailing
3052 spaces.
3053 * data/glr.c (yyreturn): Don't pop stack if yyinitStateSet failed,
3054 as the stack isn't valid in that case.
3055
3056 * src/scan-gram.l (gram_get_lineno, gram_get_in, gram_get_out):
3057 (gram_get_leng, gram_get_text, gram_set_lineno, gram_set_in):
3058 (gram_set_out, gram_get_debug, gram_set_debug, gram_lex_destroy):
3059 Add declarations to pacify "gcc -Wmissing-prototypes" when flex 2.5.31
3060 is used.
3061 * src/scan-skel.l (skel_get_lineno, skel_get_in, skel_get_out):
3062 (skel_get_leng, skel_get_text, skel_set_lineno, skel_set_in):
3063 (skel_set_out, skel_get_debug, skel_set_debug, skel_lex_destroy):
3064 Likewise.
3065
3066 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Work even with
3067 overly-picky compilers that reject 'char *foo = "bar";'.
3068
3069 * src/symtab.c (SYMBOL_ATTR_PRINT, symbol_print): Direct output
3070 to FILE * parameter, not to stderr. This fixes a typo introduced
3071 in the 2005-07-12 change.
3072
3073 * lib/subpipe.c (create_subpipe): Rewrite slightly to avoid
3074 warnings from GCC 4.
3075
3076 * data/glr.c (yyexpandGLRStack, yyaddDeferredAction, yyexpandGLRStack):
3077 (yyglrShiftDefer, yysplitStack):
3078 Remove unused parameters b4_pure_formals. All uses changed.
3079 (yyglrShift): Remove unused parameters b4_user_formals.
3080 All uses changed.
3081 (yyglrReduce): Removed unused parameter yylocp. All uses changed.
3082
6100a9aa
PE
30832005-07-18 Paul Eggert <eggert@cs.ucla.edu>
3084
258b75ca
PE
3085 Destructor cleanups and regularization among the three skeletons.
3086 * NEWS: Document the behavior changes.
3087 * data/glr.c (yyrecoverSyntaxError): Don't bother to pop the
3088 stack before failing, as the cleanup code will do it for us now.
3089 * data/lalr1.cc (yyerrlab): Likewise.
3090 * data/glr.c (yyparse): Pop everything off the stack before
3091 freeing it, so that destructors get called properly.
3092 * data/lalr1.cc (yyreturn): Likewise.
3093 * data/yacc.c (yyreturn): Pop and destroy the start symbol, too.
3094 This is more consistent.
3095 * doc/bison.texinfo (Destructor Decl): Mention more reasons
3096 why destructors might be called. 1.875 -> 2.1.
3097 (Destructor Decl, Decl Summary, Table of Symbols):
3098 Some English-language cleanups for %destructor.
3099 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
3100 Add output line for destructor of start symbol.
3101 * tests/calc.at (AT_CHECK_CALC): Add one to line counts,
3102 because of that same extra output line.
3103
1a059451
PE
3104 * NEWS: Document minor wording changes in diagnostics of
3105 Bison-generated parsers.
3106 * data/glr.c (yyMemoryExhausted): Renamed from yyStackOverflow.
3107 Remove unused formals. All uses changed.
3108 (yyreportAmbiguity): "ambiguity detected" -> "syntax is ambiguous".
3109 (yyparse): Rename yyoverflowlab to yyexhaustedlab.
3110 * data/yacc.c (yyparse): "parser stack overflow" -> "memory exhausted".
3111 Rename yyoverflowab to yyexhaustedlab.
3112 When memory exhaustion occurs during syntax-error reporting,
3113 report it separately rather than in a single diagnostic; this
3114 eases translation.
3115 * doc/bison.texinfo (Memory Management): Renamed from Stack Overflow.
3116 (Memory Exhausted): Renamed from Parser Stack Overflow.
3117 Revamp wording slightly to prefer "memory exhaustion".
3118 * tests/actions.at: "parser stack overflow" -> "memory exhausted".
3119
97460c78
PE
3120 * data/c.m4 (b4_yysymprint_generate): Use YYFPRINTF, not fprintf.
3121
30757c8c
PE
3122 Add i18n support to the GLR skeleton. Partially fix the C++
3123 skeleton; a C++ expert needs to finish this. Remove debugging
3124 msgids; there's little point to having them translated, since they
3125 can be understood only by someone who can read the
3126 (English-language) source code.
3127
3128 Generate runtime-po/bison-runtime.pot automatically, so that we
3129 don't have to worry about garbage getting in that file. We'll
3130 make sure after the next official release that old msgids don't
3131 get lost. See
3132 <http://lists.gnu.org/archive/html/bison-patches/2005-07/msg00119.html>.
3133
3134 * runtime-po/Makefile.in.in, runtime-po/bison-runtime.pot: Remove.
3135 Now auto-generated.
3136 * PACKAGING: Don't claim that Gawk, GCC, Perl use this method yet.
3137 Fix typos in explanations of the runtime file.
3138 * bootstrap: Change gettext keyword from YYI18N to YY_.
3139 Use standard Makefile.in.in in runtime-po, since we'll arrange
3140 for backward-compatible bison-runtime.po files in a different way.
3141 * data/glr.c (YY_): New macro, from yacc.c.
3142 (yyuserAction, yyreportAmbiguity, yyreportSyntaxError, yyparse):
3143 Translate messages intended for users.
3144 (yyreportSyntaxError): Change "virtual memory" to "memory" to match
3145 the wording in the other skeletons. We don't know that the memory
3146 is virtual.
3147 * data/lalr1.cc (YY_): Renamed from _. All uses changed.
3148 Use same method that yacc.c uses.
3149 Don't translate debugging messages.
3150 (yy::yyreport_syntax_error): Put in a FIXME for the i18n stuff;
3151 it doesn't work (yet), and requires C++ expertise to fix.
3152 * data/yacc.c (YY_): Renamed from YY18N. All uses changed.
3153 Move defn to a more logical place, to be consistent with other
3154 skeletons.
3155 Don't translate debugging messages.
3156 Don't assume line numbers fit in unsigned int; use unsigned long fmts.
3157 * doc/bison.texinfo: Mention <libintl.h>. Change glibc cross reference
3158 to gettext cross reference. Add indexing terms. Mention YYENABLE_NLS.
3159 * runtime-po/POTFILES.in: Add data/glr.c, data/lalr1.cc.
3160
ac8c5689
PE
3161 Fix yyerror / yylex test glitches noted by twlevo@xs4all.nl.
3162 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Have yyerror return
3163 void, not int.
3164 * tests/glr-regression.at (Badly Collapsed GLR States):
3165 Likewise.
3166 (Improper handling of embedded actions and dollar(-N) in GLR parsers):
3167 yylex should return 0 at EOF rather than aborting.
3168
6100a9aa
PE
3169 Improve tests for stack overflow in GLR parser.
3170 Problem reported by twlevo@xs4all.nl.
3171 * data/glr.c (struct yyGLRStack): Remove yyerrflag member.
3172 All uses removed.
3173 (yyStackOverflow): Just longjmp, but with value 2 so that caller
3174 can handle the problem.
3175 (YYCHK1): Use goto (a la yacc.c) rather than setting a flag.
3176 (yyparse): New local variable yyresult to record the result.
3177 Use result of setjmp to set it, rather than storing itinto
3178 struct.
3179 (yyDone): Remove label.
3180 (yyacceptlab, yyabortlab, yyoverflowlab, yyreturn): New labels,
3181 to mimic yacc.c. Do not discard lookahead if it's EOF (possible
3182 if YYABORT is used).
3183 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Exit with
3184 yyparse status; put status > 1 into diagnostic.
3185 Check that status==2 works.
3186 * tests/calc.at, tests/cxx-type.at, tests/glr-regression.at:
3187 Use exit status 3 for failure to open (which shouldn't happen).
3188
15f40952
PE
31892005-07-17 Paul Eggert <eggert@cs.ucla.edu>
3190
67fd79c4
PE
3191 * tests/conflicts.at (%nonassoc and eof): Don't exit with status
3192 1 on syntax error; just let yyparse do its thing.
3193 * tests/glr-regression.at (Badly Collapsed GLR States): Likewise.
3194 * tests/torture.at (AT_DATA_STACK_TORTURE): Likewise.
3195 (Exploding the Stack Size with Alloca):
3196 (Exploding the Stack Size with Malloc):
3197 Expect exit status 2, not 1, since the parser is supposed to blow
3198 its stack. Problem reported by twlevo@xs4all.nl.
3199
15f40952
PE
3200 * data/glr.c (yyparse): Don't assume that the initial calls
3201 to YYMALLOC succeed; in that case, yyparse incorrectly returned 0.
3202 Print a stack-overflow message and fail instead.
3203 Initialize the line-number information before creating the stack,
3204 so that the stack-overflow message can report line zero safely.
3205
f32c66b5
PE
32062005-07-14 Paul Eggert <eggert@cs.ucla.edu>
3207
a22ff96f 3208 Fix problems reported by twlevo@xs4all.nl.
e2688cd9
PE
3209 * data/glr.c (YYSTACKEXPANDABLE): Don't define if already defined.
3210 (yyuserMerge): Provide a default case if b4_mergers is empty.
3211 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Define YYSTACKEXPANDABLE.
3212 * tests/glr-regression.at
3213 (Improper handling of embedded actions and dollar(-N) in GLR parsers):
c70fdfcd 3214 Add casts to pacify C++ compilers.
1beb0b24
PE
3215 * tests/glr-regression.at (Improper merging of GLR delayed action
3216 sets): Declare yylex before using it.
f32c66b5 3217 * tests/Makefile.am (maintainer-check-g++): Fix a stray
a22ff96f
PE
3218 $(GXX) that escaped the renaming of GXX to CXX. Remove bogus
3219 test for valgrind; valgrind is independent of g++.
3220 (maintainer-check-posix): Add _POSIX2_VERSION=200112, to check
3221 for compatibility with POSIX 1003.1-2001 (if running coreutils).
3222 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Port to stricter C++.
3223 Use a destructor, so that we can expand the stack. Change
3224 YYSTYPE to char * so that we can free it. Cast result of malloc.
f32c66b5 3225
d741bd1b
PE
32262005-07-13 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
3227
3228 * data/glr.c (yyuserAction): Fix uninitialized variable that caused
3229 a valgrind failure. Problem reported by twlevo@xs4all.nl.
3230
0410a6e0
PE
32312005-07-13 Paul Eggert <eggert@cs.ucla.edu>
3232
3233 * PACKAGING: New file, suggested by Bruno Haible and taken from
3234 similar wording in gettext's PACKAGING file.
3235 * NEWS: Mention PACKAGING.
3236 * Makefile.am (EXTRA_DIST): Add PACKAGING.
3237
f7ab6a50
PE
32382005-07-12 Paul Eggert <eggert@cs.ucla.edu>
3239
baf785db 3240 * NEWS: Document recent i18n improvements.
f7ab6a50
PE
3241 * bootstrap: Get runtime translations into runtime-po.
3242 Create runtime-po files automatically, if possible.
3243 * configure.ac: Invoke BISON_I18N, so that we eat our own dog food.
3244 * data/yacc.c: Rewrite inclusion of <libintl.h> so that ENABLE_NLS
3245 does not infringe on the user's name space.
3246 (YYENABLE_NLS): Renamed from ENABLE_BISON_NLS.
3247 * doc/bison.texinfo (Internationalization): Revamp the English
3248 and Texinfo syntax a bit, to try to make it clearer.
3249 (Bison Options, Option Cross Key): Mention --print-localedir.
3250 * m4/bison-i18n.m4 (BISON_I18N): Rename ENABLE_BISON_NLS to
3251 YYENABLE_NLS. Quote a bit more.
3252 * runtime-po/.cvsignore: New file.
3253 * runtime-po/Makefile.in.in (mostlyclean): Remove *.old.pot.
3254 * runtime-po/Rules-quot: Remove; now created by bootstrap.
3255 * runtime-po/quot.sed: Likewise.
3256 * runtime-po/boldquot.sed: Likewise.
3257 * runtime-po/en@quot.header: Likewise.
3258 * runtime-po/en@boldquot.header: Likewise.
3259 * runtime-po/insert-header.sin: Likewise.
3260 * runtime-po/remove-potcdate.sin: Likewise.
3261 * runtime-po/Makevars: Likewise.
3262 * runtime-po/LINGUAS: Likewise.
3263 * runtime-po/de.po: Likewise; we will rely on the translation project
3264 to maintain this, so "bootstrap" should get it.
0410a6e0 3265 * src/getarg.c (PRINT_LOCALEDIR_OPTION): Let the C compiler determine
f7ab6a50
PE
3266 its value.
3267 * src/main.c (main): Bind the bison-runtime domain, too.
3268
32692005-07-12 Bruno Haible <bruno@clisp.org>
3270
3271 * data/yacc.c: Include <libintl.h> when NLS is enabled.
3272 (YYI18N): Renamed from _. Use dgettext when NLS is enabled.
3273 * po/POTFILES.in: Remove autogenerated file src/parse-gram.c.
3274 * runtime-po: New directory.
3275 * runtime-po/Makefile.in.in: New file, copied from po/, with modified
3276 $(DOMAIN).pot-update rule, so that old messages are never dropped.
3277 * runtime-po/Rules-quot: New file, copied from po/.
3278 * runtime-po/quot.sed: Likewise.
3279 * runtime-po/boldquot.sed: Likewise.
3280 * runtime-po/en@quot.header: Likewise.
3281 * runtime-po/en@boldquot.header: Likewise.
3282 * runtime-po/insert-header.sin: Likewise.
3283 * runtime-po/remove-potcdate.sin: Likewise.
3284 * runtime-po/Makevars: New file.
3285 * runtime-po/POTFILES.in: New file.
3286 * runtime-po/LINGUAS: New file.
3287 * runtime-po/bison-runtime.pot: New file.
3288 * runtime-po/de.po: New file.
3289 * m4/bison.m4: New file.
3290 * Makefile.am (SUBDIRS): Add runtime-po.
3291 (aclocaldir, aclocal_DATA): New variables.
3292 * configure.ac: Add AC_CONFIG_FILES of runtime-po/Makefile.in.
3293 Define aclocaldir.
3294 * src/getargs.c (usage): Document --print-localedir option.
3295 (PRINT_LOCALEDIR_OPTION): New enum item.
3296 (long_options): Add --print-localedir option.
3297 (getargs): Handle --print-localedir option.
3298 * doc/bison.texinfo (Bison Parser): Remove paragraph about _().
3299 (Internationalization): New section.
3300
22dda0f0
AD
33012005-07-12 Akim Demaille <akim@epita.fr>
3302
3303 * src/symtab.h, src/symtab.c (symbol_print): Swap the arguments,
3304 for consistency with the rest of the code.
3305 * src/symlist.h, src/symlist.c (symbol_list_print): Ditto.
3306 Add separators.
3307
82b248ad
AD
33082005-07-12 Akim Demaille <akim@epita.fr>
3309
3310 * src/parse-gram.y: Use %printer instead of YYPRINT.
3311
fa0e9314
AD
33122005-07-12 Akim Demaille <akim@epita.fr>
3313
867a3e00
AD
3314 * src/symtab.h, src/symtab.c (symbol_print): New.
3315 * src/symlist.h, src/symlist.c (symbol_list_print): New.
3316 * src/symlist.c (symbol_list_n_type_name_get): Report the culprit.
3317
33182005-07-12 Akim Demaille <akim@epita.fr>
3319
3320 * data/glr.c (b4_syncline): Fix (swap) the definitions of
fa0e9314
AD
3321 b4_at_dollar and b4_dollar_dollar.
3322
e054b190
PE
33232005-07-11 Paul Eggert <eggert@cs.ucla.edu>
3324
3325 * doc/bison.texinfo (Mystery Conflicts): Add reference to DeRemer
3326 and Pennello's paper.
3327
34160ec4
PE
33282005-07-09 Paul Eggert <eggert@cs.ucla.edu>
3329
407d4a75
PE
3330 * data/yacc.c (yyparse): Undo previous patch. Instead,
3331 set yylsp[0] and yyvsp[0] only if the initial action
3332 sets yylloc and yylval, respectively.
3333
34160ec4
PE
3334 * data/yacc.c (yyparse): In the initial action, set
3335 yylsp[0] and yyvsp[0] rather than yylloc and yylval.
3336 This avoids the use of undefined variables if the initial
3337 action does not set yylloc and/or yylval.
3338
c3d5a4a7
PE
33392005-07-07 Paul Eggert <eggert@cs.ucla.edu>
3340
b34d96c1
PE
3341 * examples/calc++/calc++-driver.cc, examples/calc++/calc++-driver.hh:
3342 * examples/calc++/calc++-scanner.ll, examples/calc++/calc++.cc:
3343 Remove from CVS. These files are automatically generated.
3344 * examples/extexi: Clarify that this file is now part of Bison,
3345 not GNU M4, and that it works with any POSIX-compatible Awk.
3346 * examples/calc++/Makefile.am (run_extexi): Remove; not used.
3347 ($(calc_extracted)): Renamed from $(calc_sources_extracted),
3348 so that we also get calc++-parser.yy. Geneate it.
3349 Use $(AWK), not gawk, since any conforming Awk will do.
3350 Put comment before action, since older 'make' can't handle comment
3351 in action.
3352 $(BUILT_SOURCES): List all built sources, not just some of them.
3353 $(MAINTAINERCLEANFILES): Remove *.stamp, and all built sources.
3354 $($(srcdir)/calc++-parser.stamp): Work even if POSIXLY_CORRECT.
3355 $($(calc_sources_generated)): Remove unnecessary test for existence
3356 of target. (This had a shell syntax error anyway; a stray "x".)
3357 (calc_extracted): List $(srcdir)/calc++-parser.yy, not
3358 calc++-parser.yy.
3359 * examples/.cvsignore, examples/calc++/.cvsignore: New files.
3360
c3d5a4a7
PE
3361 * bootstrap (gnulib_modules): Add gettext, now that it's no longer
3362 implied by the other modules.
3363
828c373b
AD
33642005-07-06 Akim Demaille <akim@epita.fr>
3365
3366 Bind examples/calc++ to the package.
3367 * examples/calc++/Makefile: Remove, replaced by...
3368 * examples/calc++/Makefile.am: ... this new file.
3369 * examples/calc++/test: Remove input.
3370 * examples/calc++/compile: Remove.
3371 * examples/Makefile.am: New.
3372 * configure.ac, Makefile.am: Adjust.
3373 * doc/Makefile.am (clean-local): New, for more recent texi2dvis.
3374
63cb01d6
PE
33752005-07-05 Paul Eggert <eggert@cs.ucla.edu>
3376
fd2df2ed
PE
3377 * data/glr.c (yyFail): Drastically simplify; since the format argument
3378 never had any % directives, we can simply pass it to yyerror.
3379 (yyparse): Use "t a; a=b;" rather than "t a = b;" when a will
3380 be modified later, as that is the usual style in glr.c.
3381 Problems reported by Paul Hilfinger.
3382
63cb01d6
PE
3383 Rewrite GLR parser to catch more buffer overrun, storage exhaustion,
3384 and size overflow errors.
3385 * data/glr.c: Include <stdio.h> etc. after user prolog, not before,
3386 in case the user prolog sets feature-test macros like _GNU_SOURCE.
3387 (YYSIZEMAX): New macro.
3388 (yystpcpy): New function, taken from yacc.c.
3389 (struct yyGLRStack.yyspaceLeft): Now size_t, not int.
3390 (yyinitGLRStack, yyfreeGLRstack): Remove unnecessary forward decls,
3391 so that we don't have to maintain their signatures.
3392 (yyFail): Check for buffer overflow, by using vsnprintf rather
3393 than vsprintf. Allocate a bigger buffer if possible.
3394 Report an error if buffer allocation fails.
3395 (yyStackOverflow): New function.
3396 (yyinitStateSet, yyinitGLRStack): Return a boolean indicating whether
3397 the initialization was successful. It might fail if storage was
3398 exhausted.
3399 (yyexpandGLRStack): Add more checks for storage allocation failure.
3400 Use yyStackOverflow to report failures.
3401 (yymarkStackDeleted, yyglrShift, yyglrShiftDefer, yydoAction):
3402 (yysplitStack, yyprocessOneStack, yyparse, yypstack):
3403 Don't assume stack number fits in int.
3404 (yysplitStack): Check for storage allocation failure.
3405 (yysplitStack, yyprocessOneStack): Add pure_formals, so that we
3406 can print diagnostics on storage allocation failure. All callers
3407 changed.
3408 (yyresolveValue): Use yybool for boolean.
3409 (yyreportSyntaxError): Check for size-calculation overflow.
3410 This code is taken from yacc.c.
3411 (yyparse): Check for storage allocation errors when allocating
3412 the initial stack.
3413
1c59e0a1
AD
34142005-07-05 Akim Demaille <akim@epita.fr>
3415
3416 Extract calc++ from the documentation.
3417 * doc/bison.texinfo (Calc++): Add the extraction marks.
3418 * examples/extexi: New, from the aborted GNU Programming 2E.
3419 Separate the different paragraph of a file with empty lines.
3420 * examples/Makefile: Use it to extract the whole calc++ example.
3421
8a0adb01
AD
34222005-06-24 Akim Demaille <akim@epita.fr>
3423
3424 * doc/bison.texinfo (C++ Parser Interface): Use defcv to define
3425 class typedefs.
3426
12545799
AD
34272005-06-22 Akim Demaille <akim@epita.fr>
3428
3429 * doc/bison.texinfo (C++ Language Interface): First stab.
3430 (C++ Parsers): Remove.
3431
99be0235
AD
34322005-06-22 Akim Demaille <akim@epita.fr>
3433
3434 * data/lalr1.cc (yylex_): Honor %lex-param.
3435
0ffd4fd1
AD
34362005-06-22 Akim Demaille <akim@epita.fr>
3437
3438 Start a set of simple examples.
3439 * examples/calc++/Makefile, examples/calc++/calc++-driver.cc,
3440 * examples/calc++/calc++-driver.hh,
3441 * examples/calc++/calc++-parser.yy,
3442 * examples/calc++/calc++-scanner.ll, examples/calc++/calc++.cc,
3443 * examples/calc++/compile, examples/calc++/test: New.
3444
0925ebb4
PE
34452005-06-09 Paul Eggert <eggert@cs.ucla.edu>
3446
3447 * data/yacc.c (malloc, free) [defined __cplusplus]: Wrap inside
3448 extern "C" {}. This fixes a problem reported by Paul Hilfinger,
3449 which stems from the 2005-05-27 patch.
3450
43d3b664
PH
34512005-06-06 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
3452
3453 * data/glr.c: Modify treatment of unused parameters to permit use
3454 of g++ (which doesn't allow __attribute__ ((unused)) for parameters).
3455
3062864d
PE
34562005-05-30 Paul Eggert <eggert@cs.ucla.edu>
3457
3458 Fix infringement on user name space reported by Janos Zoltan Szabo.
3459 * data/yacc.c (yyparse): strlen -> yystrlen.
3460
989b5b8e
AD
34612005-05-30 Akim Demaille <akim@epita.fr>
3462
3463 * data/lalr1.cc (_): New.
3464 Translate the various messages.
3465
bedf57f5
PE
34662005-05-27 Paul Eggert <eggert@cs.ucla.edu>
3467
3468 Fix infringement on user name space reported by Bruno Haible.
3469 * data/yacc.c (YYSIZE_T): Define first, so that later decls can use it.
3470 Prefer GCC's __SIZE_TYPE__ if available, so that we don't infringe on
3471 the user's name space.
3472 (alloca): Include <stdlib.h> to get it, if it's not built in.
3473 (YYMALLOC, YYFREE): Define only if needed.
3474 (malloc, free): Declare, but only if needed, as this infringes on
3475 the user name space.
3476
4d1801f1
PE
34772005-05-25 Paul Eggert <eggert@cs.ucla.edu>
3478
3479 Fix BeOS, FreeBSD, MacOS porting problems reported by Bruno Haible.
3480 * lib/bitset.c (bitset_print): Don't assume size_t can be printed
3481 with %d format.
3482 * lib/ebitset.c (min, max): Undef before defining.
3483 * lib/vbitset.c (min, max): Likewise.
3484 * lib/subpipe.c (create_subpipe): Save local variables in case
3485 vfork clobbers them.
3486
34872005-05-24 Bruno Haible <bruno@clisp.org>
3488
3489 * tests/synclines.at (AT_SYNCLINES_COMPILE): Add support for the
3490 error message syntax used by gcc-4.0.
3491
b94a9e1e
PE
34922005-05-23 Paul Eggert <eggert@cs.ucla.edu>
3493
85ac3861
PE
3494 * README: Mention m4 1.4.3. Remove obsolete advice about
3495 Sun Forte Developer 6 update 2, VMS, and MS-DOS.
3496
b94a9e1e
PE
3497 * bootstrap: Remove workaround for problem I encountered with
3498 gettext 0.14.1; it seems to be fixed now.
3499
51c30d21
PE
35002005-05-22 Paul Eggert <eggert@cs.ucla.edu>
3501
009ce67d
PE
3502 * NEWS: Version 2.0a.
3503
f2a97c62
PE
3504 * src/files.c: Include "stdio-safer.h"; this fixes a typo in
3505 the previous change.
3506
c8775f93
PE
3507 Various maintainer cleanups.
3508 * .cvsignore: Add a.exe, a.out, b.out,, conf[0-9]*, confdefs*,
3509 conftest*, for benefit of CVS commands run at the same time as
3510 "configure". Add build-aux, since "bootstrap" now creates it and
3511 its subfiles.
3512 * Makefile.cfg (move_if_change): Remove.
3513 * Makefile.maint: Remove the update stuff; we now use "bootstrap".
3514 (ftp-gnu, www-gnu, move_if_change, local_updates, update):
3515 (po_repo, do-po-update, po-update, wget_files, get-targets):
3516 (config.guess-url_prefix, config.sub-url_prefix):
3517 (ansi2knr.c-url_prefix, texinfo.tex-url_prefix):
3518 (standards.texi-url_prefix, make-stds.texi-url_prefix, taget, url):
3519 ($(get-targets), cvs-files, automake_repo, wget-update, cvs-update):
3520 Remove.
3521 * configure.ac (AC_CONFIG_AUX_DIR): Change from config to build-aux;
3522 this is now the recommended name.
3523 * config/.cvsignore: Remove config.guess, config.rpath, config.sub,
3524 depcomp, install-sh, mdate-sh, missing, mkinstalldirs, texinfo.tex,
3525 ylwrap. These files now go into build-aux.
3526 * config/move-if-change: Remove.
3527 * config/prev-version.txt: Bump from 1.75 to 2.0.
3528
3ea5f0ec
PE
3529 * bootstrap: Add stdio-safer, unistd-safer modules.
3530 Remove m4/glibc2.m4 (introduced by latest gnulib, but
3531 we don't need it).
3532 * lib/.cvsignore: Add dup-safer.c, fd-safer.c,
3533 fopen-safer.c, stdio-safer.h, unistd-safer.h.
3534 * lib/subpipe.c: Include "unistd-safer.h".
3535 (create_subpipe): Make sure all the newly-created
3536 file descriptors are > 2, so that diagnostics don't
3537 get sent down them (which might cause Bison to hang, in theory).
3538 * m4/.cvsignore: Add stdio-safer.m4, unistd-safer.m4.
3539 * src/files.c (xfopen): Use fopen_safer, not fopen.
3540
51c30d21
PE
3541 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Port
3542 yesterday's yacc.c fix.
3543
cea1469d
PE
35442005-05-21 Paul Eggert <eggert@cs.ucla.edu>
3545
3ea5f0ec
PE
3546 * data/glr.c, data/lalr1.cc: Update copyright date.
3547
cea1469d
PE
3548 Fix a destructor bug reported by Wolfgang Spraul in
3549 <http://lists.gnu.org/archive/html/bug-bison/2005-05/msg00042.html>.
3550 * data/yacc.c (yyabortlab): Don't call destructor, and
3551 don't set yychar to EMPTY.
3552 (yyoverflowlab): Don't call destructor.
3553 (yyreturn): Call destructor, if yychar is neither YYEOF nor YYEMPTY.
3554 * tests/calc.at (AT_CHECK_CALC): Expect one fewer output lines,
3555 since we no longer output the message "discarding lookahead token
3556 end of input ()".
3557
5e6f62f2
PH
35582005-05-20 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
3559
3560 * data/glr.c (YY_SYMBOL_PRINT): Don't print newline at end to
3561 fix a small glitch in debugging output.
3562 (yyprocessOneStack, yyrecoverSyntaxError, yyparse): Print newline
3563 after YY_SYMBOL_PRINT where needed.
3564
3565 (struct yyGLRState): Add some comments.
3566 (struct yySemanticOption): Add some comments.
3567 (union yyGLRStackItem): Add comment.
3568
3569 (yymergeOptionSets): Correct this to properly perform the union,
3570 avoiding infinite reported by Michael Rosien.
3571 Update comment.
3572
3573 * tests/glr-regression.at: Add test for GLR merging error reported
3574 by M. Rosien.
cea1469d 3575
0fb669f9
PE
35762005-05-13 Paul Eggert <eggert@cs.ucla.edu>
3577
3578 * COPYING, ChangeLog, GNUmakefile, HACKING, Makefile.am,
3579 Makefile.cfg, Makefile.maint, NEWS, README, README-alpha,
3580 README-cvs, TODO, bootstrap, configure.ac, data/Makefile.am,
3581 data/README, data/c.m4, data/glr.c, data/lalr1.cc, data/yacc.c,
3582 data/m4sugar/m4sugar.m4, doc/Makefile.am, doc/bison.texinfo,
3583 doc/fdl.texi, doc/gpl.texi, doc/refcard.tex, lib/Makefile.am,
3584 lib/abitset.c, lib/abitset.h, lib/bbitset.h, lib/bitset.c,
3585 lib/bitset.h, lib/bitset_stats.c, lib/bitset_stats.h,
3586 lib/bitsetv-print.c, lib/bitsetv-print.h, lib/bitsetv.c,
3587 lib/bitsetv.h, lib/ebitset.c, lib/ebitset.h, lib/get-errno.c,
3588 lib/get-errno.h, lib/lbitset.c, lib/lbitset.h, lib/libiberty.h,
3589 lib/main.c, lib/subpipe.c, lib/subpipe.h, lib/timevar.c,
3590 lib/timevar.def, lib/timevar.h, lib/vbitset.c, lib/vbitset.h,
3591 lib/yyerror.c, m4/cxx.m4, m4/m4.m4, m4/subpipe.m4, m4/timevar.m4,
3592 m4/warning.m4, src/LR0.c, src/LR0.h, src/Makefile.am, src/assoc.c,
3593 src/assoc.h, src/closure.c, src/closure.h, src/complain.c,
3594 src/complain.h, src/conflicts.c, src/conflicts.h, src/derives.c,
3595 src/derives.h, src/files.c, src/files.h, src/getargs.c,
3596 src/getargs.h, src/gram.c, src/gram.h, src/lalr.c, src/lalr.h,
3597 src/location.c, src/location.h, src/main.c, src/muscle_tab.c,
3598 src/muscle_tab.h, src/nullable.c, src/nullable.h, src/output.c,
3599 src/output.h, src/parse-gram.c, src/parse-gram.h,
3600 src/parse-gram.y, src/print.c, src/print.h, src/print_graph.c,
3601 src/print_graph.h, src/reader.c, src/reader.h, src/reduce.c,
3602 src/reduce.h, src/relation.c, src/relation.h, src/scan-gram.l,
3603 src/scan-skel.l, src/state.c, src/state.h, src/symlist.c,
3604 src/symlist.h, src/symtab.c, src/symtab.h, src/system.h,
3605 src/tables.c, src/tables.h, src/uniqstr.c, src/uniqstr.h,
3606 src/vcg.c, src/vcg.h, src/vcg_defaults.h, tests/Makefile.am,
3607 tests/actions.at, tests/c++.at, tests/calc.at, tests/conflicts.at,
3608 tests/cxx-type.at, tests/existing.at, tests/glr-regression.at,
3609 tests/headers.at, tests/input.at, tests/local.at, tests/output.at,
3610 tests/reduce.at, tests/regression.at, tests/sets.at,
3611 tests/synclines.at, tests/testsuite.at, tests/torture.at:
3612 Update FSF postal mail address.
3613
51f4735e
PE
36142005-05-11 Paul Eggert <eggert@cs.ucla.edu>
3615
3616 * tests/local.at (AT_COMPILE_CXX): Treat LDFLAGS like AT_COMPILE does.
3617 Problem reported by Ralf Menzel.
3618
80ce3401
PE
36192005-05-01 Paul Eggert <eggert@cs.ucla.edu>
3620
3621 * tests/actions.at: Test that stack overflow invokes destructors.
3622 From Marcus Holland-Moritz.
3623 * data/yacc.c (yyerrlab): Move the code that destroys the stack
3624 from here....
3625 (yyreturn): to here. That way, destructors are called properly
3626 even if the stack overflows, or the user calls YYACCEPT or
3627 YYABORT. Stack-overflow problem reported by Marcus Holland-Moritz.
3628 (yyoverflowlab): Destroy the lookahead.
3629
36302005-04-24 Paul Eggert <eggert@cs.ucla.edu>
3631
3632 * data/yacc.c (YYSTACK_ALLOC_MAXIMUM): Add more-descriptive comment.
3633
72f000b0
PE
36342005-04-17 Paul Eggert <eggert@cs.ucla.edu>
3635
3636 * NEWS: Bison-generated C parsers no longer quote literal strings
3637 associated with tokens.
3638 * src/output.c (prepare_symbols): Don't escape strings,
3639 since users don't want to see C escapes.
3640 * tests/calc.at (AT_CHECK_CALC): Adjust to lack of quotes
3641 in diagnostics.
c19683bb 3642 * tests/input.at (Torturing the Scanner): Likewise.
72f000b0
PE
3643 * tests/regression.at (Token definitions, Web2c Actions): Likewise.
3644
1094323f
PE
36452005-04-16 Paul Eggert <eggert@cs.ucla.edu>
3646
3647 * tests/torture.at (AT_INCREASE_DATA_SIZE): Skip the test if
3648 the data size is known to be too small and we can't increase it.
3649 This works around an HP-UX 11.00 glitch reported by Andrew Benham.
3650
ca407bdf
PE
36512005-04-15 Paul Eggert <eggert@cs.ucla.edu>
3652
3653 * src/parse-gram.y: Include quotearg.h.
3654 (string_as_id): Quote $1 before using it as a key, since the
3655 lexer no longer quotes it for us.
3656 (string_content): Don't strip quotes, since lexer no longer
3657 quotes it for us.
3658 * src/scan-gram.l: Include quotearg.h.
3659 ("\""): Omit quote.
3660 ("'"<SC_ESCAPED_CHARACTER>): Quote symbol before using it as
3661 a key, since the rest of the lexer doesn't quote it.
3662 * src/symtab.c (symbol_get): Don't quote symbol; caller does it now.
3663 * tests/regression.at (Token definitions): Check for backslashes
3664 in token strings.
3665
3666 * data/yacc.c (YYSTACK_ALLOC_MAXIMUM): New macro.
3667 (YYSIZE_T): Define to unsigned long int when using an older compiler.
3668 (yyparse): Revamp code to generate long syntax error message, to
3669 make it easier to translate, and to avoid problems with arithmetic
3670 overflow. Change "virtual memory" to "memory" in diagnostic, since
3671 we don't know whether the memory is virtual.
3672
1ce59070
PE
36732005-04-13 Paul Eggert <eggert@cs.ucla.edu>
3674
3675 * NEWS: Bison-generated C parsers now use the _ macro to
3676 translate strings.
3677 * data/yacc.c (_) [!defined _]: New macro.
3678 All English strings wrapped inside this macro.
3679 * doc/bison.texinfo (Bison Parser): Document _.
3680 * po/POTFILES.in: Include src/parse-gram.c, since it now
3681 includes translateable strings that parse-gram.y doesn't.
3682
a749a695
PE
36832005-04-12 Paul Eggert <eggert@cs.ucla.edu>
3684
3685 * src/symtab.c (symbol_make_alias): Call symbol_type_set,
3686 reverting the 2004-10-11 change to this function.
3687 (symbol_check_alias_consistency): Don't call symbol_type_set
3688 if the type name is already correct.
3689 * tests/input.at (Typed symbol aliases): New test, from Tim Van Holder.
3690
8fb1053b
PE
36912005-03-25 Paul Eggert <eggert@cs.ucla.edu>
3692
3693 * tests/regression.at (Token definitions): Don't use a token named
3694 c, as that generates a "#define c ..." that runs afoul of buggy
3695 stdlib.h that uses the identifier c as a member of struct
3696 drand48_data. Problem reported by Horst Wente.
3697
ff498c4a
PE
36982005-03-21 Paul Eggert <eggert@cs.ucla.edu>
3699
3700 * bootstrap: Change translation URL from
3701 http://www2.iro.umontreal.ca/~gnutra/po/maint/bison/ to
3702 http://www.iro.umontreal.ca/translation/maint/bison/ to avoid
3703 redirection glitches. Problem reported by twlevo@xs4all.nl.
3704
65211d70
PE
37052005-03-20 Paul Eggert <eggert@cs.ucla.edu>
3706
3707 * tests/local.at (AT_COMPILE, AT_COMPILE_CXX): Don't put options
3708 after operands; POSIX says this isn't portable for the c99 command.
3709
9577fb1f
PE
37102005-03-18 Paul Eggert <eggert@cs.ucla.edu>
3711
3712 * tests/glr-regression.at (glr-regr2a.y): Try to dump core
3713 immediately if a data overrun has occurred; this may help us track
3714 down what may be a spurious failure on MacOS.
3715
78b178f7
PE
37162005-03-17 Paul Eggert <eggert@cs.ucla.edu>
3717
a2599d0f
PE
3718 Respond to problems reported by twlevo@xs4all.nl.
3719
3720 * bootstrap: Use "trap - 0" rather than the unportable "trap 0".
3721
78b178f7
PE
3722 * src/vcg.h: Comment fix.
3723 * src/vcg_defaults.h: Parenthesize macro bodies to make them safe.
3724 (G_CMAX): Change to -1 instead of INT_MAX.
3725
3726 * data/yacc.c (yyparse): Omit spaces before #line.
78b178f7 3727
7296e729
PE
37282005-03-15 Paul Eggert <eggert@cs.ucla.edu>
3729
3730 * src/tables.c (state_number_to_vector_number): Put it inside an
3731 "#if 0", since it's not currently used. Problem reported by
3732 Roland McGrath.
3733
05ac60f3
PE
37342005-03-06 Paul Eggert <eggert@cs.ucla.edu>
3735
3736 * src/output.c (escaped_output): Renamed from
3737 escaped_file_name_output, since we now use it for symbol tags as
3738 well. All uses changed.
3739 (symbol_destructors_output, symbol_printers_output):
3740 Escape symbol tags too.
3741 Problem reported by Matyas Forstner in
3742 <http://lists.gnu.org/archive/html/bug-bison/2005-03/msg00009.html>.
3743
3744 * src/muscle_tab.c (muscle_code_grow): Don't quote numbers; it's
3745 not needed.
3746 * src/output.c (user_actions_output, token_definitions_output,
3747 symbol_destructors_output, symbol_printers_output): Likewise.
3748 * src/reader.c (prologue_augment): Likewise.
3749 * src/scan-gram.l (handle_action_dollar, handle_action_at): Likewise.
3750
3751 * src/vcg.c (output_edge): Don't quote linestyle arg.
3752 Problem reported by twlevo@xs4all.nl.
3753
7eb453ac
PE
37542005-02-28 Paul Eggert <eggert@cs.ucla.edu>
3755
3756 * doc/bison.texinfo (Semantic Tokens): Fix scoping problem in
3757 example, reported by Derek M Jones. Also, make the example even
3758 more outrageous, to better illustrate how bad the problem is.
3759
4c04c52a
PE
37602005-02-24 Paul Eggert <eggert@cs.ucla.edu>
3761
3762 * doc/bison.texinfo (Mfcalc Symtab): Correct the prototype for
3763 putsym. Typo reported by Sebastian Piping.
3764
a61e1620
PE
37652005-02-23 Paul Eggert <eggert@cs.ucla.edu>
3766
3767 * doc/bison.texinfo (Language and Grammar): some -> same
3768 (Epilogue): int he -> in the
3769 Typos reported by Sebastian Piping via Justin Pence.
3770
9ec93868
PE
37712005-02-07 Paul Eggert <eggert@cs.ucla.edu>
3772
3773 * tests/glr-regression.at (Improper handling of embedded actions
3774 and dollar(-N) in GLR parsers): Renamed from "Improper handling of
3775 embedded actions and $-N in GLR parsers", work around an Autoconf bug
3776 with dollar signs in test names.
3777 * tests/input.at (Invalid dollar-n): Renamed from "Invalid \$n",
3778 for a similar reason.
3779
73ce7e7e
PE
37802005-01-28 Paul Eggert <eggert@cs.ucla.edu>
3781
3782 * src/vcg.c (output_graph): G_VIEW -> normal_view in case someone
3783 wants to redefine G_VIEW.
3784
2e72b98e
PE
37852005-01-27 Paul Eggert <eggert@cs.ucla.edu>
3786
3787 * src/vcg.c (get_view_str): Remove case for normal_view.
3788 Problem reported by twlevo@xs4all.nl.
3789
e0d634e5
PE
37902005-01-24 Paul Eggert <eggert@cs.ucla.edu>
3791
ccf830a4
PE
3792 * configure.ac (O0CFLAGS, O0CXXFLAGS): Fix quoting bug.
3793 Problem reported by twlevo@xs4all.nl.
3794
e0d634e5
PE
3795 * doc/bison.texinfo: Change @dircategory from "GNU programming
3796 tools" to "Software development". Requested by Richard Stallman
3797 via Karl Berry.
3798
7bbc8cb0
PE
37992005-01-23 Paul Eggert <eggert@cs.ucla.edu>
3800
3801 * tests/c++.at (AT_CHECK_DOXYGEN): Don't use options after operands.
3802 Problem reported by twlevo@xs4all.nl.
3803
08b770bc
PE
38042005-01-21 Paul Eggert <eggert@cs.ucla.edu>
3805
3806 * data/yacc.c (YYCOPY, yystpcpy, yyparse): Remove "register"
3807 keyword; it's not needed with modern compilers, and it doesn't
3808 affect correctness with older compilers. Suggested by
3809 twlevo@xs4all.nl.
3810
95f22ad2
PE
38112005-01-17 Paul Eggert <eggert@cs.ucla.edu>
3812
3813 * data/glr.c (yyuserAction): Add "default: break;" case to pacify
3814 gcc -Wswitch-default.
3815 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Likewise.
3816 * data/yacc.c (yyparse): Likewise.
3817
d229d15c
PE
38182005-01-12 Paul Eggert <eggert@cs.ucla.edu>
3819
3820 * src/system.h (OUTPUT_EXT, TAB_EXT): Define only if not defined
3821 already. Let config.h define any nonstandard values.
3822
ecadd90f
PE
38232005-01-10 Paul Eggert <eggert@cs.ucla.edu>
3824
3825 * tests/calc.at (_AT_DATA_CALC_Y): Use alarm (100), not alarm (10),
3826 for the benefit of slower hosts. Problem reported by
3827 Nelson H. F. Beebe.
3828
213744b5
PE
38292005-01-07 Paul Eggert <eggert@cs.ucla.edu>
3830
3831 * data/yacc.c (yyparse): Pacify non-GCC compilers about yyerrorlab
3832 being defined and not used.
3833 * data/lalr1.cc (yyparse): Likewise.
3834 Use "if (false)" rather than "if (0)".
3835
249d3236
PE
38362005-01-05 Paul Eggert <eggert@cs.ucla.edu>
3837
3838 * TODO: Mention that we should allow NUL bytes in tokens.
3839
987cc1fb
PE
38402005-01-02 Paul Eggert <eggert@cs.ucla.edu>
3841
3842 * src/scan-skel.l (<<EOF>>): Don't close standard output.
3843 Problem reported by Hans Aberg.
3844
08fe02d9
PE
38452005-01-01 Paul Eggert <eggert@cs.ucla.edu>
3846
3847 * src/getargs.c (version): Happy new year; update overall
3848 program copyright date from 2004 to 2005.
3849
3850 * src/scan-skel.l ("@output ".*\n): Don't close standard output.
3851 Problem reported by Hans Aberg.
3852 * tests/output.at (AT_CHECK_OUTPUT): New arg SHELLIO.
3853 (Output file names.): Add a test for the case when standard output
3854 is closed.
3855
010c0266
PE
38562004-12-26 Paul Eggert <eggert@cs.ucla.edu>
3857
3858 * doc/bison.texinfo (@copying): Update FDL version number to 1.2,
3859 to fix an oversight in the Bison 2.0 manual.
3860
da12206a
PE
38612004-12-25 Paul Eggert <eggert@cs.ucla.edu>
3862
3863 * NEWS: Version 2.0. Reformat the existing news items since
3864 1.875, so that related items are grouped together.
3a4734aa 3865 * configure.ac (AC_INIT): Bump version to 2.0.
da12206a
PE
3866 * src/parse-gram.c, src/parse-gram.h: Regenerate with 2.0.
3867
c935d934
PE
3868 * tests/torture.at (Exploding the Stack Size with Alloca): Set
3869 YYSTACK_USE_ALLOCA to 1 if __GNUC__ or alloca are defined;
3870 otherwise, we're not testing alloca. Unfortunately there's no
3871 simple way to consult HAVE_ALLOCA here.
3872
da12206a
PE
3873 * data/lalr1.cc (yydestruct_): Pacify unused variable warning
3874 for yymsg, too.
3875
3876 * src/LR0.c (new_itemsets): Use memset rather than zeroing by
3877 hand. This avoids a warning about comparing int to size_t when
3878 GCC warnings are enabled.
3879
0a2c5137
PE
38802004-12-22 Paul Eggert <eggert@cs.ucla.edu>
3881
d7e14fc0
PE
3882 * NEWS: Bison-generated parsers no longer default to using the
3883 alloca function (when available) to extend the parser stack, due
3884 to widespread problems in unchecked stack-overflow detection.
3885 * data/glr.c (YYMAXDEPTH): Remove undef when zero. It's the user's
3886 responsibility to set it to a positive value. This lets the user
3887 specify a value that is not a preprocessor constant.
3888 * data/yacc.c (YYMAXDEPTH): Likewise.
3889 (YYSTACK_ALLOC): Define only if YYSTACK_USE_ALLOCA is nonzero.
3890 * doc/bison.texinfo (Stack Overflow): YYMAXDEPTH no longer needs
3891 to be a compile-time constant. However, explain the constraints on it.
3892 Also, explain the constraints on YYINITDEPTH.
3893 (Table of Symbols): Explain that alloca is no longer the default.
3894 Explain the user's responsibility if they define YYSTACK_USE_ALLOCA
3895 to 1.
3896
0a2c5137
PE
3897 * doc/bison.texinfo (Location Default Action): Mention that n must
3898 be zero when k is zero. Suggested by Frank Heckenbach.
3899
e019c247
AD
39002004-12-22 Akim Demaille <akim@epita.fr>
3901
3902 * data/lalr1.cc (parser::token_number_type, parser::rhs_number_type)
3903 (parser::state_type, parser::semantic_type, parser::location_type):
3904 Private, not public.
3905 (parser::parse): Return ints, not bool.
3906 Returning a bool introduces a problem: 0 corresponds to false, and
3907 it seems weird to return false on success. Returning true changes
3908 the conventions for yyparse.
3909 Alternatively we could return void and send an exception.
3910 There is no clear consensus (yet?).
3911 (state_stack, semantic_stack, location_stack): Rename as...
3912 (state_stack_type, semantic_stack_type, location_stack_type): these.
3913 Private, not public.
3914 * tests/c++.at: New.
3915 * tests/testsuite.at, tests/Makefile.am: Adjust.
3916
72731bb7
AD
39172004-12-21 Akim Demaille <akim@epita.fr>
3918
3919 * data/lalr1.cc (parser::parse): Return a bool instead of an int.
3920
9a0d8bec
AD
39212004-12-21 Akim Demaille <akim@epita.fr>
3922
3923 Don't impose std::string for filenames.
3924
3925 * data/lalr1.cc (b4_filename_type): New.
3926 (position::filename): Use it.
3927 (parser.hh): Move the inclusion of stack.hh and location.hh below
3928 the user code, so that needed headers for the filename type can be
3929 included first.
72731bb7
AD
3930 Forward declare them before the user code.
3931 * tests/Makefile.am (check-local, installcheck-local): Pass
3932 TESTSUITEFLAGS to the TESTSUITE.
9a0d8bec 3933
99880de5
AD
39342004-12-20 Akim Demaille <akim@epita.fr>
3935
3936 Use more STL like names: my_class instead of MyClass.
3937
3938 * data/lalr1.cc (LocationStack, LocationType, RhsNumberType)
3939 (SemanticStack, SemanticType, StateStack, StateType)
3940 (TokenNumberType, Stack, Slice, Traits, Parser::location)
3941 (Parser::value): Rename as...
3942 (location_stack, location_type, rhs_number_type, semantic_stack)
3943 (semantic_type, state_stack, state_type, token_number_type, stack)
3944 (slice, traits, parser::yylloc, parser::yylval): these.
3945
3946 * tests/calc.at, tests/regression.at, tests/actions.at: Adjust.
3947
9bec482e
PE
39482004-12-19 Paul Eggert <eggert@cs.ucla.edu>
3949
3950 * data/glr.c (YYLLOC_DEFAULT): Use GNU spacing conventions.
3951 * data/yacc.c (YYLLOC_DEFAULT): Likewise.
3952
f6fbd3da
PE
39532004-12-17 Paul Eggert <eggert@cs.ucla.edu>
3954
3955 Remove uses of 'short int' and 'unsigned short int'. This raises
3956 some arbitrary limits. It uses more memory but nowadays that's
3957 not much of an issue.
3958
3959 This change does not affect the generated parsers; that's a different
3960 task, as some users will want to conserve memory there.
3961
3962 Ideally we should use size_t to represent all object counts, and
3963 something like ptrdiff_t to represent signed differences of object
3964 counts; but that will require more code-cleanup than I have the
3965 time to do right now.
3966
3967 * src/LR0.c (allocate_itemsets, new_itemsets, save_reductions):
3968 Use size_t, not int or short int, to count objects.
3969 * src/closure.c (nritemset, closure): Likewise.
3970 * src/closure.h (nritemset, closure): Likewise.
3971 * src/nullable.c (nullable_compute): Likewise.
3972 * src/print.c (print_core): Likewise.
3973 * src/print_graph.c (print_core): Likewise.
3974 * src/state.c (state_compare, state_hash): Likewise.
3975 * src/state.h (struct state): Likewise.
3976 * src/tables.c (default_goto, goto_actions): Likewise.
3977
3978 * src/gram.h (rule_number, rule): Use int, not short int.
3979 * src/output.c (prepare_rules): Likewise.
3980 * src/state.h (state_number, STATE_NUMBER_MAXIMUM, transitions,
3981 errs, reductions): Likewise.
3982 * src/symtab.h (symbol_number, SYMBOL_NUMBER_MAXIMUM, struct symbol):
3983 Likewise.
3984 * src/tables.c (vector_number, tally, action_number,
3985 ACTION_NUMBER_MINIMUM): Likewise.
3986 * src/output.c (muscle_insert_short_int_table): Remove.
3987
efeed023
AD
39882004-12-17 Akim Demaille <akim@epita.fr>
3989
3990 * data/lalr1.cc: Extensive Doxygenation.
3991 (error_): Rename as...
3992 (error): this, since it is visible to the user.
3993 Adjust callers.
3994 (Parser::message): Now an automatic variable from...
3995 (Parser::yyreport_syntax_error_): here.
3996 * tests/actions.at, tests/calc.at, tests/regression.at: Adjust to
3997 Parser::error.
3998 * tests/input.at: Escape $.
3999
bc82c5a5
PE
40002004-12-16 Paul Eggert <eggert@cs.ucla.edu>
4001
4002 * data/glr.c (b4_lhs_value, b4_rhs_value, b4_rhs-location):
4003 Parenthesize rhs to avoid obscure problems with mistakes like
4004 "foo$$bar = foo$1bar;". Problem reported by twlevo at xs4all.
4005 * data/lalr1.cc (b4_lhs_value, b4_rhs_value, b4_lhs_location,
4006 b4_rhs_location): Likewise.
4007 * data/yacc.c (b4_lhs_value, b4_rhs_value, b4_lhs_location,
4008 b4_rhs_location): Likewise.
4009
fd19f271
AD
40102004-12-16 Akim Demaille <akim@epita.fr>
4011
4012 * data/lalr1.cc (yyreport_syntax_error_): Catch up with glr.c and
4013 yacc.c: be sure to stay within yycheck_.
4014 * tests/actions.at: Re-enable C++ tests.
4015
10454ea4
AD
40162004-12-16 Akim Demaille <akim@epita.fr>
4017
4018 * src/print_graph.c (print_graph): Remove layoutalgorithm uses for
4019 real.
4020
c5b95ccf
AD
40212004-12-16 Akim Demaille <akim@epita.fr>
4022
4023 Use #define to handle the %name-prefix.
4024
4025 * data/glr.c, data/yacc.c: Comment changes.
4026 * data/lalr1.cc (yylex): Use #define to select the name of yylex,
4027 so that one can refer to yylex in the parser file, and have it
4028 renamed, as is the case with other skeletons.
4029
617a8f12
AD
40302004-12-16 Akim Demaille <akim@epita.fr>
4031
4032 Move lalr1.cc internals into yy*.
4033
4034 * data/lalr1.cc (semantic_stack_, location_stack_, state_stack_)
4035 (semantic_stack_, location_stack_, pact_, pact_ninf_, defact_)
4036 (pgoto_, defgoto_, table_, table_ninf_, check_, stos_, r1_, r2_)
4037 (name_, rhs_, prhs_, rline_, token_number_, eof_, last_, nnts_)
4038 (empty_, final_, terror_, errcode_, ntokens_)
4039 (user_token_number_max_, undef_token_, n_, len_, state_, nerrs_)
4040 (looka_, ilooka_, error_range_, nerrs_):
4041 Rename as...
4042 (yysemantic_stack_, yylocation_stack_, yystate_stack_)
4043 (yysemantic_stack_, yylocation_stack_, yypact_, yypact_ninf_)
4044 (yydefact_, yypgoto_, yydefgoto_, yytable_, yytable_ninf_)
4045 (yycheck_, yystos_, yyr1_, yyr2_, yyname_, yyrhs_, yyprhs_)
4046 (yyrline_, yytoken_number_, yyeof_, yylast_, yynnts_, yyempty_)
4047 (yyfinal_, yyterror_, yyerrcode_, yyntokens_)
4048 (yyuser_token_number_max_, yyundef_token_, yyn_, yylen_, yystate_)
4049 (yynerrs_, yylooka_, yyilooka_, yyerror_range_, yynerrs_):
4050 these.
4051
1e547e6e
PE
40522004-12-15 Paul Eggert <eggert@cs.ucla.edu>
4053
4054 Fix some problems reported by twlevo at xs4all.
4055 * src/symtab.c (symbol_new): Report an error if the input grammar
4056 contains too many symbols. This is better than calling abort() later.
4057 * src/vcg.h (enum layoutalgorithm): Remove. All uses removed.
4058 (struct node, struct graph):
4059 Rename member expand to stretch. All uses changed.
4060 (struct graph): Remove member layoutalgorithm. All uses removed.
4061 * src/vcg.c (get_layoutalgorithm_str): Remove. All uses removed.
4062 * src/vcg_defaults.h (G_STRETCH): Renamed from G_EXPAND.
4063 All uses changed.
4064 (N_STRETCH): Rename from N_EXPAND. All uses changed.
4065
735d6bd4
AD
40662004-12-15 Akim Demaille <akim@epita.fr>
4067
4068 * data/lalr1.cc: Normalize /** \brief ... */ to ///.
4069 Add more Doxygen comments.
4070 (symprint_, stack_print_, reduce_print_, destruct_, pop)
4071 (report_syntax_error_, translate_): Rename as...
4072 (yysymprint_, yystack_print_, yyreduce_print_, yydestruct_)
4073 (yypop_, yyreport_syntax_error_, yytranslate_): this.
4074
2e1f5829
AD
40752004-12-15 Akim Demaille <akim@epita.fr>
4076
4077 * data/lalr1.cc (lex_): Rename as...
4078 (yylex_): this.
4079 Move the trace here.
4080 Take the %name-prefix into account.
4081 Reported by Alexandre Duret-Lutz.
4082
a3cb6248
AD
40832004-12-15 Akim Demaille <akim@epita.fr>
4084
4085 Simplify the C++ parser constructor.
4086
4087 * data/lalr1.cc (debug_): Rename as...
4088 (yydebug_): so that the parser's internals are always in the yy*
4089 pseudo namespace.
4090 Adjust uses.
4091 (b4_parse_param_decl): Remove the leading comma as it is now only
4092 called as unique argument list.
4093 (Parser::Parser): Remove the constructor accepting a location and
4094 an initial debugging level.
4095 Remove from the other ctor the argument for the debugging level.
4096 (debug_level_type, debug_level, set_debug_level): New.
4097
4098 * tests/actions.at, tests/calc.at, tests/regression.at: Adjust
4099 constructor calls.
4100
07fed891
AD
41012004-12-15 Akim Demaille <akim@epita.fr>
4102
4103 Remove b4_root related material: failure experiment
a3cb6248 4104 (which goal was to allow to derive from a class).
07fed891
AD
4105
4106 * data/lalr1.cc (b4_root, b4_param, b4_constructor): Remove
4107 definitions and uses.
4108
e603eaa5
PE
41092004-12-14 Paul Eggert <eggert@cs.ucla.edu>
4110
4111 * data/glr.c (struct yyGLRStack): yyerror_range now has 3 items,
4112 not 2, since it's not portable to subtract 1 from the start of an
4113 array. The new item 0 is never set or used. All uses changed.
4114
4115 (yyrecoverSyntaxError): Use YYLLOC_DEFAULT instead of assuming
4116 the default definition of YYLLOC_DEFAULT. Problem reported
4117 by Frank Heckenbach.
4118
fafb007d
PE
41192004-12-12 Paul Eggert <eggert@cs.ucla.edu>
4120
4121 * data/glr.c (YYRHSLOC): Don't have two definitions, one for
4122 the normal case and one for the error case. Just use the
4123 first one uniformly. Problem reported by Frank Heckenbach.
4124 (YYLLOC_DEFAULT): Use the conventions of yacc.c, so we can
4125 use exactly the same macro in both places.
4126 (yyerror_range): Now of type yyGLRStackItem, not YYLTYPE,
4127 so that the normal-case YYRHSLOC works for the error case too.
4128 All uses changed.
4129 * data/yacc.c (YYRHSLOC): New macro, taken from glr.c.
4130 (YYLLOC_DEFAULT): Use the same macro as glr.c.
4131 * doc/bison.texinfo (Location Default Action): Don't claim that
4132 we have an array of locations. Use the same macro for both glr
4133 and lalr parsers. Mention YYRHSLOC. Mention what happens when
4134 the index is 0.
4135
48814dcd
PE
41362004-12-10 Paul Eggert <eggert@cs.ucla.edu>
4137
a4e1a53b
PE
4138 * HACKING: Update email addresses to send announcements to.
4139
48814dcd
PE
4140 * configure.ac (AC_INIT): Bump version to 1.875f.
4141
337116ba
PE
41422004-12-10 Paul Eggert <eggert@cs.ucla.edu>
4143
4144 * NEWS: Version 1.875e.
4145 * src/parse-gram.c, src/parse-gram.h: Regenerate with 1.875e.
4146
4147 * src/scan-skel.l: Include "complain.h", for "fatal".
4148
4149 * src/relation.h (relation_print, relation_digraph):
4150 Relation sizes are of type relation_node, not size_t (this is
4151 merely a doc fix, since the two types are equivalent).
4152 (relation_transpose): Relation sizes are of type relation_node,
4153 not int.
4154 * src/relation.c: Likewise.
4155 (top, infinity): Now of type relation_node, not int.
4156 (traverse, relation_transpose): Use relation_node, not int.
4157
4158 * data/glr.c (yyuserAction, yyrecoverSyntaxError): Mark args
4159 with ATTRIBUTE_UNUSED if they're not used, to avoid GCC warning.
4160 (yyparse): Remove unused local introduced in 2004-10-25 patch.
4161
4162 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): New arg
68b082af 4163 specifying whether the test should be skipped. Use it tp
337116ba 4164 specify that the [%defines %skeleton "lalr1.cc"] tests currently
68b082af 4165 fail on some hosts, and should be skipped.
337116ba 4166
da2a7671
PE
41672004-12-08 Paul Eggert <eggert@cs.ucla.edu>
4168
4169 * src/system.h (CALLOC, MALLOC, REALLOC): Remove. All callers
4170 changed to use xcalloc, xnmalloc, xnrealloc, respectively,
4171 unless otherwise specified below.
4172
4173 * src/LR0.c (allocate_itemsets): Use xnmalloc, not xcalloc,
4174 to allocate kernel_base, kernel_items, kernel_size, since
4175 they needn't be initialized to 0.
4176 (allocate_storgae): Likewise, for shiftset, redset, shift_symbol.
4177 * src/closure.c (new_closure): Likewise, for itemset.
4178 * src/derives.c (derives_compute): Likewise, for delts, derives, q.
4179 * src/lalr.c (set_goto_map): Likewise, for temp_map.
4180 (initialize_F): Likewise, for reads, edge, reads[i], includes[i].
4181 (build_relations): Likewise for edge, states1, includes.
4182 * src/nullable.c (nullable_compute): Likewise, for squeue, relts.
4183 * src/reader.c (packgram): Likewise, for ritem, rules.
4184 * src/reduce.c (nonterminals_reduce): Likewise for nontermmap.
4185 * src/relation.c (relation_digraph): Likewise for VERTICES.
4186 (relation_transpose): Likewise for new_R, end_R.
4187 * src/symtab.c (symbols_token_translations_init): Likewise for
4188 token_translations.
4189 * src/tables.c (save_row): Likewise for froms, tos, conflict_tos.
4190 (token_actions): Likewise for yydefact, actrow, conflrow,
4191 conflict_list.
4192 (save_column): Likewise for froms[symno], tos[symno].
4193 (goto_actions): Likewise for state_count.
4194 (pack_table): Likewise for base, pos, check.
4195 (tables_generate): Likewise for width.
4196
4197 * src/LR0.c (set_states): Don't reuse kernel_size and kernel_base
4198 for initial core. Just have a separate core, so we needn't worry
4199 about whether kernel_size and kernel_base are initialized.
4200
4201 * src/LR0.c (shift_symbol, redset, shiftset, kernel_base,
4202 kernel_size, kernel_items): Remove unnecessary initialization.
4203 * src/conflicts.c (conflicts): Likewise.
4204 * src/derives.c (derives): Likewise.
4205 * src/muscle_tablc (muscle_insert): Likewise.
4206 * src/relation.c (relation_digraph): Likewise.
4207 * src/tables.c (froms, tos, conflict_tos, tally, width, actrow, order,
4208 conflrow, conflict_table, conflict_list, table, check):
4209 Likewise.
4210
4211 * src/closure.c (new_closure): Arg is of type unsigned int, not int.
4212 This is because all callers pass unsigned int.
4213 * src/closure.h (new_closure): Likewise.
4214
4215 * src/lalr.c (initialize_F): Initialize reads[i] in all cases.
4216 (build_relations): Initialize includes[i] in all cases.
4217 * src/reader.c (packgram): Always initialize rules[ruleno].prec
4218 and rules[ruleno].precsym. Initialize members in order.
4219 * src/relation.c (relation_transpose): Always initialize new_R[i]
4220 and end_R[i].
4221 * src/table.c (conflict_row): Initialize 0 at end of conflict_list.
4222
4223 * src/output.c (prepare_actions): Pass 0 instead of conflict_list[0];
4224 conflict_list[0] was always 0, but now it isn't initialized.
4225
4226 * src/table.c (table_grow): When conflict_table grew, the grown
4227 area wasn't cleared. Fix this.
4228
4229 * lib/.cvsignore: Add strdup.c, strdup.h.
4230 * m4/.cvsignore: Add strdup.m4.
4231
00baeeac
PE
42322004-12-07 Paul Eggert <eggert@cs.ucla.edu>
4233
4234 * src/lalr.h (GOTO_NUMBER_MAXIMUM): New macro.
4235 * src/lalr.c (set_goto_map): Don't allow ngotos to equal
4236 GOTO_NUMBER_MAXIMUM, since we occasionally compute
4237 ngotos + 1 without checking for overflow.
4238 (build_relations): Use END_NODE, not -1, to denote end of edges.
4239 * src/lalr.c (set_goto_map, map_goto, initialize_F, add_loopback_edge,
4240 build_relations): Use goto_number, not int, for goto numbers.
4241 * src/tables.c (save_column, default_goto): Likewise.
4242
be3d9d42
AD
42432004-11-23 Akim Demaille <akim@epita.fr>
4244
4245 * data/lalr1.cc (YYSTYPE): Define it as is done for C, instead
4246 of #defining from yystype.
4247 Don't typedef yystype, C++ does not need it.
4248 This lets it possible to forward declare it as union.
4249
78e526d5
PE
42502004-11-23 Paul Eggert <eggert@cs.ucla.edu>
4251
4252 * bootstrap (gnulib_modules): Add extensions.
4253 Problem reported by Jim Meyering.
4254
afbb696d
PE
42552004-11-22 Paul Eggert <eggert@cs.ucla.edu>
4256
4257 * src/LR0.c, src/closure.c, src/derives.c, src/gram.c,
4258 src/lalr.c, src/nullable.c, src/relation.c, src/scan-skel.l,
4259 src/system.h, src/tables.c: XFREE -> free, to accommodate
4260 recent change to gnulib xalloc.h.
78e526d5 4261 Problem reported by Jim Meyering.
afbb696d 4262
c1f8f16a
AD
42632004-11-17 Akim Demaille <akim@epita.fr>
4264
4265 * data/lalr1.cc (symprint_): Use cdebug_ to avoid warnings.
4266
db7e5eb5 42672004-11-17 Akim Demaille <akim@epita.fr>,
9a1e9989
AD
4268 Alexandre Duret-Lutz <adl@gnu.org>
4269
4270 * data/lalr1.cc (Parser::yycdebug_): New, a pointer, to allow
4271 changes.
4272 (YYCDEBUG): Adjust.
4273 Use it instead of cdebug_.
4274 (Parser::debug_stream, Parser::set_debug_stream): New.
4275 (Parser::symprint_): Define cdebug_ for temporary backward
4276 compatibility.
4277 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Use
4278 debug_stream ().
4279
68e11668
AD
42802004-11-17 Akim Demaille <akim@epita.fr>
4281
4282 * data/lalr1.cc (Parser:print_): Remove, use %printer instead.
4283 * tests/regression.at (_AT_DATA_DANCER_Y): Adjust.
4284 * tests/calc.at (_AT_DATA_CALC_Y): Ditto.
4285 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise.
4286
97cbc73e
PE
42872004-10-27 Paul Eggert <eggert@cs.ucla.edu>
4288
4289 * data/glr.c (yyloc_default): Remove; not used.
4290 Problem reported by Frank Heckenbach.
4291
e342c3be
AD
42922004-10-25 Akim Demaille <akim@epita.fr>
4293
4294 * data/glr.c (YYRHSLOC): Move its definition next to its uses.
4295 Introduce another definition to address simple location arrays.
4296 (yyGLRStack): New member: yyerror_range.
4297 (yyrecoverSyntaxError, yyparse): Update it.
4298 (yyrecoverSyntaxError): Use it when shifting the error token to
4299 have an accurate range, equivalent to the one computed by both
4300 yacc.c and lalr1.cc.
4301 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Change its yylex so
4302 that column numbers start at column 0, as per GNU Coding
4303 Standards, the others tests, and the doc.
4304 (_AT_RESOLVED_GLR_OUTPUT_WITH_LOC, _AT_AMBIG_GLR_OUTPUT_WITH_LOC):
4305 Adjust to the above change (first column is 0).
4306 And adjust the location of the "<error>", now covering the whole
4307 line.
4308
93602feb 43092004-10-22 Akim Demaille <akim@epita.fr>
04098407 4310 and Paul Eggert <eggert@cs.ucla.edu>
93602feb
PE
4311
4312 Remove some arbitrary limits on goto numbers and relations.
4313 * src/lalr.c (goto_map, ngotos, from_state, to_state): Omit
4314 initial values, since they're never used.
4315 (set_goto_map): ngotos is now unsigned, so test for overflow
4316 by seeing whether it wraps around to zero.
4317 * src/lalr.h (goto_number): Now size_t, not short int.
4318 (GOTO_NUMBER_MAXIMUM): Remove.
4319 * src/relation.c (relation_print, traverse, relation_transpose):
4320 Check for END_NODE rather than looking at sign.
4321 * src/relation.h (END_NODE): New macro.
4322 (relation_node): Now size_t, not short int.
4323
dba08b04
PE
43242004-10-22 Paul Eggert <eggert@cs.ucla.edu>
4325
4326 * doc/bison.texinfo (Language and Grammar): In example, "int" is a
4327 keyword, not an identifier. Problem reported by Baron Schwartz in
4328 <http://lists.gnu.org/archive/html/bug-bison/2004-10/msg00017.html>.
4329
df09ef2e
AD
43302004-10-11 Akim Demaille <akim@epita.fr>
4331
4332 * src/symtab.c (symbol_check_alias_consistency): Also check
4333 type names, destructors, and printers.
4334 Reported by Alexandre Duret-Lutz.
4335 Recode the handling of associativity and precedence in terms
4336 of symbol_precedence_set.
4337 Accept no redeclaration at all, not even equal to the previous
4338 value.
4339 (redeclaration): New.
4340 Use it to factor redeclaration complaints.
4341 (symbol_make_alias): Don't set the type of the alias, let
4342 symbol_check_alias_consistency do it as for other features.
4343 * src/symtab.h (symbol): Add new member prec_location, and
4344 type_location.
4345 * src/symtab.c (symbol_precedence_set, symbol_type_set): Set them.
4346 * tests/input.at (Incompatible Aliases): New.
4347
146bc99d
PE
43482004-10-09 Paul Eggert <eggert@cs.ucla.edu>
4349
4350 .cvsignore fixes to accommodate gnulib changes,
4351 and the practice of naming build directories "_build".
4352 * .cvsignore: Add "_*". Sort.
4353 * lib/.cvsignore: Add getopt_.h, xalloc-die.c.
4354 * m4/.cvsignore: Add "*_gl.m4".
4355
e503aa60
AD
43562004-10-06 Akim Demaille <akim@epita.fr>
4357
4358 * src/parse-gram.y (add_param): Fix the truncation of trailing
4359 spaces.
4360
b4a20338
AD
43612004-10-05 Akim Demaille <akim@epita.fr>
4362
4363 In Bison 1.875's yacc.c, YYLLOC_DEFAULT was called regardless
4364 whether the reducion was empty or not. This leaves room to
4365 improve the use of YYLLOC_DEFAULT in such a case.
4366 lalr1.cc is still experimental, so changing this is acceptable.
4367 And finally, there are probably not many users who changed the
4368 handling of locations in GLR, so changing is admissible too.
4369
4370 * data/glr.c, data/lalr1.cc, data/yacc.c (YYLLOC_DEFAULT): On an
4371 empty reduction, set @$ to an empty location ending the previously
4372 stacked symbol.
4373 Adjust uses to make sure the code is triggered on empty
4374 reductions.
4375 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust the
4376 expected output: empty reductions have empty locations.
4377
f85a5e6f
AD
43782004-09-29 Akim Demaille <akim@epita.fr>
4379
4380 * data/lalr1.cc: Move towards a more standard C++ coding style
4381 for templates: Class < T > -> Class<T>.
4382
b203fc2c
AD
43832004-09-29 Akim Demaille <akim@epita.fr>
4384
4385 * data/lalr1.cc: Reinstall the former ctor, for sake of
4386 compatibility, but warn it will be removed.
4387 Move towards a more standard C++ coding style (i.e., type *var ->
4388 type* var).
4389
5b7e1e73
PE
43902004-09-27 Paul Eggert <eggert@cs.ucla.edu>
4391
3fee967f
PE
4392 * src/parse-gram.y (add_param): Rewrite to avoid strchr,
4393 since it's less likely to work if NULs are involved in the future.
5b7e1e73 4394
0dcca5c2
AD
43952004-09-27 Akim Demaille <akim@epita.fr>
4396
4397 * data/yacc.c (YY_LOCATION_PRINT): Fix its default declaration.
4398
6dde1c82
AD
43992004-09-27 Akim Demaille <akim@epita.fr>
4400
4401 * data/lalr1.cc (b4_parse_param_decl_1): New.
b203fc2c 4402 (b4_parse_param_decl): Use it to have different names between attribute
6dde1c82
AD
4403 and argument names.
4404 (b4_cc_constructor_call): Likewise.
4405
b233d555
AD
44062004-09-24 Akim Demaille <akim@epita.fr>
4407
4408 * src/parse-gram.y (add_param): Strip the leading and trailing
4409 blanks from a formal argument declaration.
4410 (YY_LOCATION_PRINT): New.
4411
619404e3
AD
44122004-09-24 Akim Demaille <akim@epita.fr>
4413
4414 * data/c.m4 (b4_yysymprint_generate): Move the YYINPUT invocation
4415 after the location.
4416
dd8d9022
AD
44172004-09-24 Akim Demaille <akim@epita.fr>
4418
4419 * doc/bison.texinfo (Table of Symbols): Sort.
4420
0092f063
AD
44212004-09-21 Akim Demaille <akim@epita.fr>
4422
4423 * data/yacc.c, data/glr.c (b4_at_dollar, b4_dollar_dollar): Remove
4424 the useless parentheses.
4425 Suggested by Paul Eggert.
4426
451364ed
AD
44272004-09-20 Akim Demaille <akim@epita.fr>
4428
4429 Let the initial-action act on the look-ahead, and use it for the
4430 "initial push" (corresponding to an hypothetical beginning-of-file).
4431 And let lalr1.cc honor %initial-action.
4432
4433 * doc/bison.texinfo (Initial Action Decl): Clarify, and add an
4434 example.
4435 * data/lalr1.cc (Parser::initlocation_): Remove, bad experiment.
4436 (Parser::Parser): Remove the ctor that used to initialize it.
4437 (Parser::parse): Like in the other skeletons, issue the "starting
4438 parse" message before any action.
4439 Honor %initial-action.
4440 Initialize the stacks with the lookahead.
4441 * data/yacc.c: Let $$ and @$ in %initial-action designate the
4442 look-ahead.
4443 Push them in the stacks.
4444 * tests/actions.at, tests/calc.at: Adjust the C++ ctor invocations.
4445
18d192f0
AD
44462004-09-20 Akim Demaille <akim@epita.fr>
4447
4448 * doc/bison.texinfo (Initial Action Decl): New.
4449
b8458aa5
AD
44502004-09-20 Akim Demaille <akim@epita.fr>
4451
4452 * data/yacc.c (YY_LOCATION_PRINT): Use YYLTYPE_IS_TRIVIAL as a
4453 clearer criterion to define it.
4454 (parse): Initialize the initial location when YYLTYPE_IS_TRIVIAL.
4455 When reducing on an empty RHS, use the latest stacked location as
4456 location.
4457 yylloc is not always available.
4458 * data/glr.c: Likewise.
4459 Also, honor initial-actions.
4460
3fc16193
AD
44612004-09-20 Akim Demaille <akim@epita.fr>
4462
4463 * data/yacc.c (YY_LOCATION_PRINT): New.
4464 Define when we know YYLTYPE's structure, i.e., when the default
4465 YYLLOC_DEFAULT is used.
4466 * data/c.m4 (b4_yysymprint_generate): Use it.
4467 * data/lalr1.cc (YYLLOC_DEFAULT): Stop relying on the initial
4468 value of the result.
4469 (error_start_): Replace with...
4470 (error_range_): this location array.
4471 This allows to replace code relying on the implementation of
4472 locations by portable code.
4473 * data/yacc.c (yylerrsp): Replace with...
4474 (yyerror_range): this.
4475 Every time a token is popped, update yyerror_range[0], to have an
4476 accurate location for the error token.
4477 * data/glr.c (YY_LOCATION_PRINT): New.
4478 (yyprocessOneStack): Fix an invocation of YY_SYMBOL_PRINT:
4479 deference a pointer.
4480 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): No longer
4481 report the location in %printers.
4482
4483 * src/scan-skel.l: Instead of abort, report error messages to ease
4484 understanding skeleton scanning failures.
4485
ecfe33e7
AD
44862004-09-16 Akim Demaille <akim@epita.fr>
4487
4488 * data/lalr1.cc (Stack::Iterator, Stack::ConstIterator): Rename as...
4489 (iterator, const_iterator): these, to be more in the C++ spirit.
4490 Also, return reverse iterators so that when displaying the stack
4491 we display its bottom first.
4492 (Parser::stack_print_, Parser::reduce_print_): Match the messages
4493 from yacc.c.
4494 We should probably use vector here though.
4495
1576d44d
AD
44962004-09-16 Akim Demaille <akim@epita.fr>
4497
4498 Have more complete shift traces.
4499
4500 * data/yacc.c, data/lalr1.c, data/glr.c: Use YY_SYMBOL_PRINT
4501 to report Shifts instead of ad hoc YYDPRINTF invocations,
4502 including for the error token.
4503 * data/lalr1.cc (symprint_): Output the location.
4504 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): In C++, don't
4505 output the location within the %printer.
4506 Activate GLR tests, at least to make sure they compile properly.
4507 They still don't pass though.
4508 * tests/calc.at: Adjust expect verbose output, since now "Entering
4509 state..." is on a different line than the "Shifting" message.
4510
9c66f418
AD
45112004-09-08 Akim Demaille <akim@epita.fr>
4512
4513 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Move the
4514 Bison directive from the Bison file to the invocation of this
4515 macro, so that these directives are passed to
4516 AT_BISON_OPTION_PUSHDEFS to get correct help macros.
4517 Use these helping macros (e.g., AT_LOC, AT_VAL and so forth).
4518 Move the AT_SETUP/AT_CLEANUP outside, to report as test title
4519 the extra Bison directives instead of the whole series.
4520 Change the grammar so that there are recoverable errors, and
4521 unrecoverable errors. Now we can have the parser give up before
4522 consuming the whole input. As a result we now can observe that
4523 the lookahead is freed when needed.
4524 Change the parser source to parse argv[1] instead of a hard coded
4525 string.
4526 Simplify yylex, and give a value and location to EOF.
4527 Simplify some invocations of AT_CHECK_PRINTER_AND_DESTRUCTOR that
4528 passed directives already coded in the file.
4529 Add some tests to check the location of "error".
4530 For some tests, the C++ parser is correct, and not yacc.c.
4531 For other tests, they provide different, but unsatisfying, values,
4532 so keep the C++ value so that at least one parser is "correct"
4533 according to the test suite.
4534 (Actions after errors): Remove, this is subsumed by the
4535 AT_CHECK_PRINTER_AND_DESTRUCTOR series.
4536
52d5733f
AD
45372004-09-06 Akim Demaille <akim@epita.fr>
4538
4539 * data/lalr1.cc: Adjust the indentation of the labels.
04098407 4540 (Parser::pop): New.
52d5733f
AD
4541 Use it.
4542
a0e68930
AD
45432004-09-06 Akim Demaille <akim@epita.fr>
4544
4545 * data/yacc.cc, data/glr.cc (yydestruct): Accept an additional
4546 argument, an informative message.
4547 Call YY_SYMBOL_PRINT.
4548 Adjust all callers: integrate the associated YY_SYMBOL_PRINT.
4549 * data/lalr1.cc (destruct_): Likewise.
4550 In addition, no longer depend on b4_yysymprint_generate and
4551 b4_yydestruct_generate to generate these functions, do it "by
4552 hand".
4553
e757bb10
AD
45542004-09-03 Akim Demaille <akim@epita.fr>
4555
4556 * data/glr.c, data/lalr1.cc, data/yacc.c: When YYABORT was
4557 invoked, yydestruct the lookahead.
4558 * tests/calc.at (Calculator $1): Update the expected lengths of
4559 traces: there is an added line for the discarded lookahead.
4560 * doc/bison.texinfo (Destructor Decl): Some rewording.
4561 Define "discarded" symbols.
4562
0fe1f06d
AD
45632004-09-02 Akim Demaille <akim@epita.fr>
4564
4565 * data/lalr1.cc (translate_, destruct_): No reason to be static.
4566
284acc8b
AD
45672004-09-02 Akim Demaille <akim@epita.fr>
4568
4569 * data/glr.c, yacc.c (YYDSYMPRINT): Remove, not used.
4570 (YYDSYMPRINTF): Rename as...
4571 (YY_SYMBOL_PRINT): this.
4572 * data/lalr1.cc (YY_SYMBOL_PRINT): New, modeled after the previous
4573 two.
4574 Use it instead of direct symprint_ calls.
4575 (yybackup): Tweak the "Now at end of input" case to match yacc.c's
4576 one.
4577
a5eb1ed2
AD
45782004-09-02 Akim Demaille <akim@epita.fr>
4579
b7c72fe1
AD
4580 * data/lalr1.cc (b4_yysymprint_generate): New.
4581 (symprint_): New member function, defined when YYDEBUG.
4582 Use it consistently instead of token/nterm debugging output by
4583 hand.
a5eb1ed2
AD
4584 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust
4585 %printer calls to use cdebug_ when using lalr1.cc.
4586
417141dd
AD
45872004-08-30 Florian Krohm <florian@edamail.fishkill.ibm.com>
4588
4589 * data/glr.c: Guard the declarations of yypstack and yypdumpstack
4590 with #ifdef YYDEBUG.
4591
2fa09258
AD
45922004-08-26 Akim Demaille <akim@epita.fr>
4593
4594 * doc/bison.texinfo (Implementing Loops): Rename as...
4595 (Implementing Gotos/Loops): this.
4596
9378b508
PE
45972004-08-13 Paul Eggert <eggert@cs.ucla.edu>
4598
4599 Adjust to latest gnulib.
4600 * bootstrap (gnulib_modules): Add xalloc-die.
4601 Set LC_ALL=C so that file names sort consistently.
4602 Prefer the gnulib copies of gettext.m4, glibc21.m4,
4603 inttypes_h.m4, lib-ld.m4, lib-prefix.m4, po.m4, stdint_h.m4,
4604 uintmax_t.m4, ulonglong.m4.
4605 (intl_files_to_remove): Add gettext.m4, lib-ld.m4, lib-prefix.m4,
4606 po.m4 since we are now using _gl.m4 instead.
4607
87a8ad5c
PE
46082004-08-10 Florian Krohm <florian@edamail.fishkill.ibm.com>
4609
4610 * src/scan-action.l: Remove. Scanning of semantic actions is
4611 handled in scan-gram.l.
4612
dca81a78
PE
46132004-08-07 Florian Krohm <florian@edamail.fishkill.ibm.com>
4614
4615 * src/scan-gram.l (handle_syncline): Use uniqstr_new not xstrdup.
4616
4617 * src/location.h (struct): The file member is a uniqstr.
4618 (equal_boundaries): Use UNIQSTR_EQ for comparison.
4619
c9cbf7c5
PE
46202004-07-22 Paul Eggert <eggert@cs.ucla.edu>
4621
4622 Fix bug with non-%union parsers that have printers or destructors,
4623 which led to a Bison core dump. Reported by Peter Fales in
4624 <http://lists.gnu.org/archive/html/bug-bison/2004-07/msg00014.html>.
2fa09258 4625
c9cbf7c5
PE
4626 * data/c.m4 (b4_symbol_actions): Don't assume %union was used.
4627 * data/lalr1.cc (yystype) [defined YYSTYPE]: Define to YYSTYPE,
4628 not to our own type.
4629 * src/output.c (symbol_destructors_output, symbol_printers_output):
4630 Don't assume %union.
4631 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR,
4632 AT_CHECK_PRINTER_AND_DESTRUCTOR): New argument
4633 UNION-FLAG. All callers changed.
4634 (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Don't assume %union.
4635 Use type char, not unsigned int, when declaring an array of char;
4636 this lets us remove a cast.
4637 (Printers and Destructors): Add non-%union test cases.
4638
fa7e68c3
PE
46392004-06-21 Paul Eggert <eggert@cs.ucla.edu>
4640
4641 * doc/bison.texinfo: Minor editorial changes, mostly to the new
4642 GLR writeups. E.g., avoid frenchspacing and the future tense,
4643 change "lookahead" to "look-ahead", and change "wrt" to "with
4644 respect to".
2fa09258 4645
fa7e68c3
PE
46462004-06-21 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
4647
4648 * doc/bison.texinfo (Merging GLR Parses, Compiler Requirements):
4649 New sections, split off from the GLR Parsers section. Put the new
4650 Simple GLR Parser near the start of the GLR section, for clarity.
4651 Rewrite connective text.
4652
99a9344e
PE
46532004-06-21 Frank Heckenbach <frank@g-n-u.de>
4654
4655 * doc/bison.texinfo (Simple GLR Parsers): New section.
4656
8dd162d3
PE
46572004-06-21 Paul Eggert <eggert@cs.ucla.edu>
4658
4659 * NEWS, TODO, doc/bison.texinfo:
4660 Use "look-ahead" instead of "lookahead", to be consistent.
4661 * REFERENCES: Fix incorrect reference to DeRemer and Pennello,
4662 while we're fixing "look-ahead".
4663 * src/conflicts.c (shift_set): Renamed from shiftset.
4664 (look_ahead_set): Renamed from lookaheadset.
4665 * src/print.c: Likewise.
4666 * src/getargs.c (report_args): Add "look-ahead" as the new canonical
4667 name for "lookahead".
4668 (report_types, usage): Likewise.
4669 * src/getargs.h (report_look_ahead_tokens): Renamed from
4670 report_lookaheads.
4671 * src/lalr.c (compute_look_ahead_tokens): Renamed from
4672 compute_lookaheads.
4673 (state_look_ahead_tokens_count): Renamed from state_lookaheads_count.
4674 (look_ahead_tokens_print): Renamed from lookaheads_print.
4675 * src/state.c (state_rule_look_ahead_tokens_print): Renamed from
4676 state_rule_lookaheads_print.
4677 * src/state.h: Likewise.
4678 (reductions.look_ahead_tokens): Renamed from lookaheads.
4679 * tests/torture.at (AT_DATA_LOOK_AHEAD_TOKENS_GRAMMAR): Renamed from
4680 AT_DATA_LOOKAHEADS_GRAMMAR.
4681
57a90331
PE
46822004-06-03 Paul Eggert <eggert@cs.ucla.edu>
4683
4684 * README: Update location of patched M4 distribution.
4685
8ed3234a
PE
46862004-05-30 Albert Chin-A-Young <china@thewrittenword.com>
4687
4688 Don't assume the C++ compiler takes the same arguments as the C compiler
4689 (trivial change).
4690 * configure.ac (O0CXXFLAGS): New var.
4691 * tests/atlocal.in (CXXFLAGS): Use it.
4692
07971983
PE
46932004-05-29 Paul Eggert <eggert@cs.ucla.edu>
4694
4695 Fix some "make check" problems with C++ reported by
4696 Albert Chin-A-Young for Tru64 C++ in this thread:
4697 http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00049.html
4698
4699 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check for std::cerr.
4700 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
4701 Output to a .cc file for C++, not to a .c file.
4702 * tests/calc.at (AT_CHECK_CALC): Likewise.
4703 * tests/regression.at (AT_CHECK_DANCER): Likewise.
4704 * tests/local.at (AT_COMPILE_CXX): Default to OUTPUT.cc, not OUTPUT.c.
4705
29058652
PE
47062004-05-28 Albert Chin-A-Young <china@thewrittenword.com>
4707
4708 * tests/calc.at, tests/actions.at: Workaround for SGI
4709 C++ compiler. (trivial change)
4710
62cb8a99
PE
47112004-05-27 Paul Eggert <eggert@cs.ucla.edu>
4712
fd418816
PE
4713 Spent a few hours checking out which prerequisite versions the
4714 current sources actually require. I went all the way back to
4715 Gettext 0.10.40, Automake 1.4, and Autoconf 2.57 and investigated
4716 a seemingly endless set of combinations of versions more recent
4717 than that. The bottom line is that the current sources require
4718 fairly recent versions of the build tools, and it'll be some work
4719 to change this.
4720 * configure.ac (AC_PREREQ): Increase from 2.58 to 2.59.
4721 (AM_INIT_AUTOMAKE): Increase from 1.7 to 1.8.
4722 (AM_GNU_GETTEXT_VERSION): Increase from 0.11.5 to 0.12.
4723 Add comments explaining why those particular versions are
4724 currently needed.
2fa09258 4725
62cb8a99
PE
4726 * src/parse-gram.y (lloc_default): Rewrite to avoid compiler bug
4727 in SGI MIPSpro 7.4.1m. Problem reported by Albert Chin-A-Young in
161a71f3 4728 <http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00037.html>.
62cb8a99
PE
4729
4730 * configure.ac (AC_PREREQ): Bump to 2.58, since 2.57 doesn't work
4731 (it fails with a Autoconf-without-aclocal-m4 diagnostic).
4732
caa52c10
PE
47332004-05-26 Paul Eggert <eggert@cs.ucla.edu>
4734
4735 * configure.ac (AM_GNU_GETTEXT_VERSION): Lower it from 0.14.1 to
4736 0.11.5. Suggested by Bruno Haible.
4737 * bootstrap: Remove gettext version checking.
4738
4739 * doc/bison.texinfo (Decl Summary): Also mention that %union
4740 can depend on prerequisite types. Problem reported by Tim
4741 Van Holder.
4742
4bfd5e4e
PE
47432004-05-25 Paul Eggert <eggert@cs.ucla.edu>
4744
2cef3017
PE
4745 * README: Mention GNU m4 1.4 bugs and Akim's patched version.
4746 * README-alpha: Don't tell people not to package this.
4747
b9c85d5c
PE
4748 * bootstrap: Don't assume $(...) works; use `...` instead.
4749 Problem reported by Paul Hilfinger. Also, diagnose non-GNU
4750 gettext better.
4751
4bfd5e4e
PE
4752 * doc/bison.texinfo (Decl Summary, Bison Options): Clarify what's
4753 put into the -d output file, and mention what to do if YYSTYPE is
4754 defined as a macro.
4755
6a36ff94
PE
47562004-05-24 Paul Eggert <eggert@cs.ucla.edu>
4757
6712933e
PE
4758 Undo change made earlier today: it caused autopoint to not bring
4759 in ABOUT-NLS. Ouch. Instead, substitute our own diagnostic for
4760 autopoint's.
4761
4762 * bootstrap: Check that gettext version matches what's in
4763 configure.ac. Warn users to ignore robots.txt ERROR 404.
4764 * bootstrap: Undo today's earlier change (logged below).
4765 * configure.ac (AM_GNU_GETTEXT_VERSION): Likewise.
b9c85d5c 4766
6a36ff94
PE
4767 The gettext version checking is causing more trouble than it's
4768 curing; remove it. Problem reported by Paul Hilfinger.
4769
4770 * bootstrap: Issue a warning that one can expect a message
4771 'AM_GNU_GETTEXT is used, but not AM_GNU_GETTEXT_VERSION'.
4772 * configure.ac (AM_GNU_GETTEXT_VERSION): Remove.
4773
209ea708
PE
47742004-05-23 Paul Eggert <eggert@cs.ucla.edu>
4775
4776 Ensure that the C++ compiler used for testing actually works on a
4777 simple test program; if not, skip the C++-related tests. Problem
4778 reported by Vin Shelton in:
161a71f3 4779 http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00026.html
209ea708
PE
4780
4781 * m4/cxx.m4: New file.
4782 * configure.ac (BISON_TEST_FOR_WORKING_CXX_COMPILER): Add.
4783 * tests/atlocal.in (BISON_CXX_WORKS): Add.
4784 * tests/local.at (AT_COMPILE_CXX): Use it.
4785
41ca2549
PE
47862004-05-21 Paul Eggert <eggert@cs.ucla.edu>
4787
383e69dc
PE
4788 * data/glr.c (yylloc): Output this macro even if locations are not
4789 being generated, as the GLR parser needs it even in that case.
4790 Problem reported by Troy A. Johnson
4791 <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=195946>.
4792
41ca2549
PE
4793 * configure.ac (AC_INIT): Update to 1.875e.
4794
e476c87d
PE
47952004-05-21 Paul Eggert <eggert@cs.ucla.edu>
4796
4797 * NEWS: Version 1.875d.
4798 * configure.ac (AC_INIT): Likewise.
4799 * src/parse-gram.c, src/parse-gram.h: Regenerate with 1.875d.
4800
4801 * configure.ac (--enable-gcc-warnings): Do not enable -Wshadow,
4802 -Wmissing-prototypes, or -Wstrict-prototypes for C++. The current
4803 lalr1.cc runs afoul of the first, and the last two are no longer
4804 supported by GCC 3.4.0.
4805 * README: Mention GNU m4 1.4 or later; mention m4 patches.
4806 * HACKING: Use ./bootstrap, not "make update" to import foreign files.
4807
233a88ad
PE
48082004-05-06 Paul Eggert <eggert@cs.ucla.edu>
4809
4810 * src/muscle_tab.c (hash_muscle): Accept and return size_t, not
4811 unsigned int, for compatibility with latest gnulib hash module.
4812 * src/state.c (state_hash, state_hasher): Likewise.
4813 * src/symtab.c (hash_symbol, hash_symbol_hasher): Likewise.
4814 * src/uniqstr.c (hash_uniqstr): Likewise.
e476c87d 4815
12ffdd28
PE
48162004-05-03 Paul Eggert <eggert@cs.ucla.edu>
4817
4818 * NEWS: Unescaped newlines are no longer allowed in char & strings.
4819
4820 * src/scan-gram.l (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER,
4821 SC_CHARACTER,SC_STRING>): Reject unescaped newlines in
4822 character and string literals.
4823 (unexpected_end): New function.
4824 (unexpected_eof): Use it.
4825 (unexpected_newline): New function.
4826 (<INITIAL,SC_AFTER_IDENTIFIER,SC_PRE_CODE>): Coalesce duplicate
4827 actions.
e476c87d 4828
12ffdd28
PE
4829 * NEWS: Document %expect-rr.
4830
4831 * bootstrap (--gnulib-srcdir=*, --cvs-user=*):
4832 Fix typo by replacing $1 with $option.
4833 Remove more 'intl'-related files.
9668e2be 4834 Don't DEFUN AM_INTL_SUBDIR twice.
12ffdd28
PE
4835
4836 * lib/.cvsignore: Add strndup.h. Remove memchr.c, memcmp.c,
4837 memrchr.c, strcasecmp.c, strchr.c, strrchr.c, strspn.c, strtol.c,
4838 strtoul.c.
4839 * m4/.cvsignore: Add exitfail.m4, extensions.m4, gnulib.m4,
4840 hard-locale.m4, mbstate_t.m4, strerror_r.m4, strndup.m4,
4841 xstrndup.m4. Remove glibc21.m4, intdiv0.m4, inttypes-pri.m4,
4842 inttypes.m4, inttypes_h.m4, isc-posix.m4, lcmessage.m4,
4843 stdint_h.m4, uintmax_t.m4, ulonglong.m4.
4844 * src/.cvsignore: Add *.output.
4845
4846 * src/parse-gram.y: Put copyright notice inside %{ %} so it
4847 gets copied to the output file.
e476c87d 4848
1f65350a
PE
48492004-04-28 Paul Eggert <eggert@twinsun.com>
4850
4851 Get files from the gnulib and po repositories, instead of relying
4852 on them being in our CVS. Upgrade to latest versions of gnulib
4853 and Automake.
4854
4855 * Makefile.am (SUBDIRS): Remove m4; Automake now does m4.
4856 * bootstrap: Bootstrap from gnulib and po repositories.
4857 Much of this code was stolen from GNU diff and GNU tar's bootstrap.
4858 * README-cvs: Document these changes. Remove version numbers from
4859 mentions of build tools, since they change so often. Mention Flex.
4860
4861 * configure.ac (AC_CONFIG_MACRO_DIR): Add, with m4 as arg.
4862 (gl_USE_SYSTEM_EXTENSIONS): Add.
12ffdd28
PE
4863 (AC_GNU_SOURCE, AC_AIX, AC_MINIX):
4864 Remove; no longer needed, as gl_USE_SYSTEM_EXTENSIONS
1f65350a 4865 does this for us.
12ffdd28
PE
4866 (AC_ISC_POSIX): Remove; we no longer support this
4867 ancient OS, as it gets in the way of latest Autoconf & gnulib.
1f65350a
PE
4868 (AC_HEADER_STDC): Remove: we now assume C89 or better.
4869 (AC_CHECK_HEADERS_ONCE): Use instead of AC_CHECK_HEADERS.
4870 Do not check for C89 headers, except for locale.h which is used
4871 by the Yacc library and must port to K&R hosts.
4872 (AC_CHECK_FUNCS_ONCE): Use instead of AC_CHECK_FUNCS.
4873 Do not check for C89 functions, except for setlocale which is
4874 used by the Yacc library.
4875 (AC_CHECK_DECLS, AC_REPLACE_FUNCS): Remove; no longer needed.
4876 (gl_DIRNAME, gl_ERROR, gl_FUNC_ALLOCA, gl_FUNC_MEMCHR,
4877 gl_FUNC_MEMRCHR, gl_FUNC_STPCPY, gl_FUNC_STRNLEN, gl_FUNC_STRTOL,
4878 gl_GETOPT, gl_HASH, gl_MBSWIDTH, gl_OBSTACK, gl_QUOTE,
4879 gl_QUOTEARG, gl_XALLOC, jm_FUNC_GLIBC_UNLOCKED_IO, jm_FUNC_MALLOC,
4880 AM_GNU_GETTEXT): Remove; now done by:
4881 (GNULIB_AUTOCONF_SNIPPET): Add. "bootstrap" builds this for us.
4882 (AC_CONFIG_FILES): Remove m4/Makefile, as Automake now does this
4883 for us.
4884
4885 * lib/Makefile.am: Include gnulib.mk, built for us by "bootstrap".
4886 (BUILT_SOURCES, EXTRA_DIST, MOSTLYCLEANFILES):
4887 Define to empty, as gnulib.mk will do the rest for us.
4888 ($(libbison_a_OBJECTS), stdbool.h): Remove, as gnulib.mk does this
4889 for us.
4890 (libbison_a_SOURCES): Define to $(lib_SOURCES) now.
4891 (lib_SOURCES): New symbol, containing only the non-gnulib libs.
4892
4893 * src/files.c: Include gnulib's xstrndup.h.
4894
4895 * src/system.h (MALLOC): Use xnmalloc, for better overflow checking.
4896 (REALLOC): Use xnrealloc, for likewise.
4897 (xstrndup, stpcpy): Remove decls, as gnulib does this for us now.
4898 (strnlen, memrchr): Remove decls; functions no longer used.
4899 Include <stpcpy.h>.
4900
4901 * config/depcomp, config/install-sh, lib/alloca.c, lib/argmatch.c,
4902 lib/argmatch.h, lib/basename.c, lib/dirname.c, lib/dirname.h,
4903 lib/error.c, lib/error.h, lib/getopt.c, lib/getopt.h,
4904 lib/getopt1.c, lib/gettext.h, lib/hash.c, lib/hash.h,
4905 lib/malloc.c, lib/mbswidth.c, lib/mbswidth.h, lib/memchr.c,
4906 lib/memcmp.c, lib/memrchr.c, lib/obstack.c, lib/obstack.h,
4907 lib/quote.c, lib/quote.h, lib/quotearg.c, lib/quotearg.h,
4908 lib/realloc.c, lib/stdbool_.h, lib/stpcpy.c, lib/strcasecmp.c,
4909 lib/strchr.c, lib/strncasecmp.c, lib/strnlen.c, lib/strrchr.c,
4910 lib/strspn.c, lib/strtol.c, lib/strtoul.c, lib/unlocked-io.h,
4911 lib/xalloc.h, lib/xmalloc.c, lib/xstrdup.c, lib/xstrndup.c,
4912 m4/Makefile.am, m4/alloca.m4, m4/dirname.m4, m4/dos.m4,
4913 m4/error.m4, m4/getopt.m4, m4/hash.m4, m4/malloc.m4,
4914 m4/mbrtowc.m4, m4/mbswidth.m4, m4/memchr.m4, m4/memcmp.m4,
4915 m4/memrchr.m4, m4/obstack.m4, m4/onceonly.m4, m4/prereq.m4,
4916 m4/quote.m4, m4/quotearg.m4, m4/realloc.m4, m4/stdbool.m4,
4917 m4/stpcpy.m4, m4/strnlen.m4, m4/strtol.m4, m4/strtoul.m4,
4918 m4/unlocked-io.m4, m4/xalloc.m4, po/LINGUAS, po/Makefile.in.in,
4919 po/Makevars, po/da.po, po/de.po, po/es.po, po/et.po, po/fr.po,
4920 po/hr.po, po/id.po, po/it.po, po/ja.po, po/ms.po, po/nl.po,
4921 po/pt_BR.po, po/ro.po, po/ru.po, po/sv.po, po/tr.po:
4922 Remove, as these files are now generated automatically
4923 by bootstrap or automake.
4924
4925 * po/ChangeLog: Remove: all but one entry was a duplicate
4926 of this file, and I moved that 2000-11-02 entry here.
4927
4928 * config/.cvsignore: Add Makefile, depcomp, install-sh.
4929 * lib/.cvsignore: Add alloca.c, alloca.h, alloca_.h, argmatch.c,
4930 argmatch.h, basename.c, dirname.c, dirname.h, error.c, error.h,
4931 exit.h, exitfail.c, exitfail.h, getopt.c, getopt.h, getopt1.c,
4932 getopt_int.h, gettext.h, gnulib.mk, hard-locale.c, hard-locale.h,
4933 hash.c, hash.h, malloc.c, mbswidth.c, mbswidth.h, memchr.c,
4934 memcmp.c, memrchr.c, obstack.c, obstack.h, quote.c, quote.h,
4935 quotearg.c, quotearg.h, realloc.c, stdbool_.h, stpcpy.c, stpcpy.h,
4936 strcasecmp.c, strchr.c, stripslash.c, strncasecmp.c, strndup.c,
4937 strnlen.c, strrchr.c, strspn.c, strtol.c, strtoul.c,
4938 unlocked-io.h, xalloc.h, xmalloc.c, xstrdup.c, xstrndup.c,
4939 xstrndup.h.
4940 * m4/.cvsignore: Remove Makefile, Makefile.in. Add alloca.m4,
4941 dirname.m4, dos.m4, error.m4, getopt.m4, hash.m4, mbrtowc.m4,
4942 mbswidth.m4, obstack.m4, onceonly.m4, quote.m4, quotearg.m4,
4943 stdbool.m4, stpcpy.m4, strnlen.m4, unlocked-io.m4, xalloc.m4.
4944 * po/.cvsignore: Add *.po, LINGUAS, Makefile.in.in, Makevars.
4945 * src/.cvsignore: Remove *_.c.
4946
4947
4948 * Makefile.maint (GZIP_ENV): Don't use --rsyncable if gzip doesn't
4949 support it. (The latest stable gzip doesn't.)
4950
49512004-04-27 Paul Eggert <eggert@twinsun.com>
4952
4953 * data/lalr1.cc (Parser::stos_) [! YYDEBUG]: Define even in this
4954 case, as stos_ is now used by destructors due to the 2004-02-09
4955 change.
4956
4957 Remove more K&R C support.
4958 * lib/libiberty.y (PARAMS): Remove. All uses removed.
4959 * lib/subpipe.c (errno): Remove decl.
4960 Include <stdlib.h> unconditionally.
4961 (EXIT_FAILURE): Remove macro.
4962 * src/complain.c (vfprintf, strerror): Remove.
4963 * src/system.h: Include limits.h, stdlib.h, string.h, locale.h
4964 unconditionally.
4965 (EXIT_FAILURE, EXIT_SUCCESS, setlocale): Remove defns.
4966 Use latest Autoconf recommendations for including inttypes.h, stdint.h.
4967 (strchr, strspn, memchr): Remove decls.
4968 * tests/calc.at (_AT_DATA_CALC_Y): Include stdlib.h, string.h
4969 unconditionally. Do not declare perror.
4970 * tests/conflicts.at (%nonassoc and eof): Include stdlib.h
4971 unconditionally.
4972
4973 * src/complain.c (_): Remove useless defn, as system.h defines this.
4974
4975 * lib/bitset.h (__INT_TO_PTR): Remove; workaround no longer needed
4976 with latest obstack.h.
4977 * lib/ebitset.c (ebitset_elt_alloc): Don't bother to cast args
4978 to procedure types, as obstack.h now does that for us.
4979 * lib/lbitset.c (lbitset_elt_alloc): Likewise.
4980
4981 * lib/subpipe.h [HAVE_SYS_TYPES_H]: Include <sys/types.h>,
4982 so that this include file can stand alone.
4983 * lib/subpipe.c: Do not include <sys/types.h>, as subpipe.h
4984 does this now. Include subpipe.h first after config.h, to
4985 test whether it can stand alone.
4986
4987 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Don't
4988 declare yyerror when using lalr.cc, as GCC 3.4.0 warns about the
4989 unused declaration.
4990
4991 * tests/synclines.at (%union synch line): Put a dummy member in
4992 the union, because empty unions aren't allowed in C. Caught
4993 by GCC 3.4.0.
4994
4f16766c
PE
49952004-04-13 Jim Meyering <jim@meyering.net>
4996
4997 * src/conflicts.c (conflicts_print): Correct format string typo:
4998 use `%%' to produce literal `%'. (trivial change)
4999
779e7ceb
PE
50002004-03-30 Paul Eggert <eggert@twinsun.com>
5001
5002 * src/getargs.c (version): Update copyright year to 2004.
5003
5004 * data/c.m4 (b4_int_type): Use 'short int' rather than
5005 'short', and similarly for 'long', 'unsigned', etc.
5006 * data/glr.c (YYTRANSLATE, yyconfl, yySymbol, yyItemNum,
5007 yygetLRActions, yyprocessOneStack, yyrecoverSyntaxError,
5008 yy_yypstack, yydumpstack): Likewise.
5009 * data/lalr1.cc (user_token_number_max_, user_token_number_max_,
5010 translate_, seq_, [], pop, Slice, range_, operator+, operator+=):
5011 Likewise.
5012 * data/yacc.c (b4_int_type, yyss, YYSTACK_BYTES, yysigned_char,
5013 yy_stack_print, yyparse): Likewise.
5014 * doc/bison.texinfo (Prologue, Multiple Types): Likewise.
5015 * lib/bbitset.h (bitset_word, BITSET_WORD_BITS): Likewise.
5016 * lib/bitset.c (bitset_print): Likewise.
5017 * lib/bitset_stats.c (bitste_log_histogram_print): Likewise.
5018 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
5019 * lib/bitsetv.c (bitsetv_dump): Likewise.
5020 * lib/ebitset.c (EBITSET_ELT_BITS, ebitset_elt_alloc): Likewise.
5021 * lib/lbitset.c (LBITSET_ELT_BITS, lbitset_elt_alloc, debug_lbitset):
5022 Likewise.
5023 * src/LR0.c (allocate_itemsets): Likewise.
5024 * src/gram.h (rule_number, rule): Likewise.
5025 * src/lalr.h (goto_number): Likewise.
5026 * src/nullable.c (nullable_compute): Likewise.
5027 * src/output.c (prepare_rules): Likewise.
5028 * src/relation.c (relation_print, relation_digraph): Likewise.
5029 * src/relation.h (relation_node): Likewise.
5030 * src/state.h (state_number, transitions, errs, reductions,
5031 struct state): Likewise.
5032 * src/symtab.h (symbol_number, struct symbol): Likewise.
5033 * src/tables.c (vector_number, tally, action_number,
5034 default_goto, goto_actions): Likewise.
5035 * tests/existing.at (GNU Cim Grammar): Likewise.
5036 * tests/regression.at (Web2c Actions): Likewise.
5037
5038 * src/output.c (muscle_insert_short_int_table): Renamed from
5039 muscle_insert_short_table. All uses changed.
5040
d6328241
PH
50412004-03-25 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
5042
5043 * src/parse-gram.y: Define PERCENT_EXPECT_RR.
5044 (declaration): Replace expected_conflicts with expected_sr_conflicts.
5045 Add %expect-rr rule.
4f16766c 5046
d6328241
PH
5047 * src/scan-gram.l: Recognize %expect-rr.
5048
4f16766c 5049 * src/conflicts.h (expected_sr_conflicts): Rename from
d6328241 5050 expected_conflicts.
4f16766c 5051 (expected_rr_conflicts): Declare.
d6328241
PH
5052
5053 * src/conflicts.c (expected_sr_conflicts): Rename from
5054 expected_conflicts.
5055 (expected_rr_conflicts): Define.
5056 (conflicts_print): Check r/r conflicts against expected_rr_conflicts
5057 for GLR parsers.
5058 Use expected_sr_conflicts in place of expected_conflicts.
5059 Warn if expected_rr_conflicts used in non-GLR parser.
4f16766c 5060
d6328241 5061 * doc/bison.texinfo: Add documentation for %expect-rr.
4f16766c 5062
1452af69
PE
50632004-03-08 Paul Eggert <eggert@gnu.org>
5064
5065 Add support for hex token numbers. Suggested by Odd Arild Olsen in
161a71f3 5066 <http://lists.gnu.org/archive/html/bison-patches/2004-03/msg00000.html>.
1452af69
PE
5067
5068 * NEWS: Document hexadecimal tokens, no NUL bytes, %destructor
5069 in lalr1.cc.
5070 * doc/bison.texinfo (Token Decl): Add hexadecimal token numbers.
5071 * src/scan-gram.l (scan_integer): New function.
5072 ({int}): Use it.
5073 (0[xX][0-9abcdefABCDEF]+): New pattern, to support hex numbers.
5074 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>, \\x[0-9abcdefABCDEF]+,
5075 handle_action_dollar, handle_action_at, convert_ucn_to_byte):
5076 Say "long int", not "long", for uniformity with GNU style.
5077
006d217d
PE
50782004-02-25 Paul Eggert <eggert@twinsun.com>
5079
5080 * tests/local.at (AT_COMPILE, AT_COMPILE_CXX): Ignore stdout from
5081 compilers. This fixes a problem with Intel's C++ compiler being
5082 chatty, reported by Guido Trentalancia in
161a71f3 5083 <http://lists.gnu.org/archive/html/bug-bison/2004-02/msg00030.html>.
006d217d 5084
c2729758
ADL
50852004-02-09 Alexandre Duret-Lutz <adl@gnu.org>
5086
5087 Support %destructor and merge error locations in lalr1.cc.
5088
5089 * data/lalr1.cc (b4_cxx_destruct_def): New macro.
5090 (Parser::stos_): Define unconditionally.
5091 (Parser::destruct_): New method. Generate its body with
5092 b4_yydestruct_generate.
5093 (Parser::error_start_): New attribute.
5094 (Parser::parse) <yyerrlab, yyerrlab1>: Call destruct_ on erroneous
5095 token which are discarded.
5096 (Parser::parse) <yyerrlab, yyerrorlab, yyerrlab1>: Update
5097 error_start_ when erroneous token are discarded.
5098 (Parser::parse) <yyerrlab1>: Compute the location of the error
5099 token so that it covers all the discarded tokens.
5100 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust so
5101 it can be called with `%skeleton "lalr1.cc"', and do that.
5102
dd0e0635
PE
51032004-02-02 Paul Eggert <eggert@twinsun.com>
5104
5105 * src/Makefile.am (AM_CPPFLAGS): New macro. It mentions
5106 $(top_srcdir)/lib and ../lib. This fixes a bug reported
5107 by Paul Hilfinger; the old INCLUDES value didn't mention ../lib.
5108 There's no need to mention top_builddir since Automake does that
5109 for us.
5110 (INCLUDES): Remove, as Automake says it's obsolescent.
5111 Contents migrated into AM_CPPFLAGS as described above.
5112 * lib/Makefile.am (INCLUDES): Remove; obsolescent.
5113
51142004-01-14 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
5115
5116 * data/glr.c (yytokenName): Bullet-proof against YYEMPTY token.
5117 (yyreportSyntaxError): Handle case where lookahead token is
5118 YYEMPTY.
5119
be16239b
PH
51202004-01-13 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
5121
5122 * data/glr.c: Put casts on uses of YYREALLOC and YYMALLOC so that
5123 resulting parsers are compilable with C++.
5124
5fa90832
PE
51252003-12-23 Paul Eggert <eggert@twinsun.com>
5126
5127 * config/depcomp, config/install-sh: Sync with Automake 1.8.
5128 * src/output.c (output_skeleton): Rename local var.
5129 * tests/input.at (Torturing the Scanner): Don't use \x0 or \0 in
5130 Bison tokens, as this runs afoul of the 2003-10-07 change that
5131 disallowed NUL bytes in character constants or string literals.
5132
5133 * tests/local.at: Require Autoconf 2.59's Autotest.
5134 * tests/testsuite.at: Don't include local.at, since we now assume
5135 Autoconf 2.59 or later. Autoconf 2.59 had some problems with
5136 including it.
5137 * tests/Makefile.am ($(TESTSUITE)): Remove warning about ignoring
5138 multiple inclusion warnings.
dd0e0635 5139
b165c324
AD
51402003-12-02 Akim Demaille <akim@epita.fr>
5141
5142 * doc/bison.texinfo (How Can I Reset the Parser): More about start
5143 conditions.
5144 From Bruno Haible.
5145
26e06a21
ADL
51462003-11-18 Alexandre Duret-Lutz <adl@gnu.org>
5147
5148 * doc/bison.texinfo (Bison Options): Escape `@' in `$@'.
5149
92ac3705
PE
51502003-10-07 Paul Eggert <eggert@twinsun.com>
5151
6a5ecb38
PE
5152 * tests/Makefile.am (clean-local): Don't run 'testsuite --clean'
5153 if testsuite doesn't exist.
5154
92ac3705
PE
5155 * doc/bison.texinfo (Symbols): NUL bytes are not allowed in string
5156 literals, unfortunately.
5157 * src/scan-gram.l (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>):
5158 Complain about NUL bytes in character constants or string literals.
5159
91d2c560
PE
51602003-10-05 Paul Eggert <eggert@twinsun.com>
5161
5162 * NEWS: Don't document %no-default-prec, as it's still
5163 too experimental.
5164 * doc/bison.texinfo: Document %no-default-prec only if
5165 the defaultprec flag is set. Normally it's not.
5166
0cc3da3a
PE
51672003-10-04 Paul Eggert <eggert@twinsun.com>
5168
5169 * data/glr.c (b4_rhs_value, b4_rhs_location): Yield a
5170 non-modifiable lvalue, instead of a modifiable one.
5171 * doc/bison.texinfo (Actions): Document that $$ can
5172 be assigned to. Do not claim that $$ and $N are
5173 array element references: user code should not rely on this.
5174
22fccf95
PE
51752003-10-01 Paul Eggert <eggert@twinsun.com>
5176
5177 * src/parse-gram.h (PERCENT_NO_DEFAULT_PREC): New token.
5178 (grammar_declaration): Use it.
5179 * src/scan-gram.l: New token %no-default-prec.
5180 * tests/conflicts.at: Revamp tests to use %no-default-prec.
5181 * NEWS, doc/bison.texinfo: Document the above.
5182
fc8f2965
AD
51832003-10-01 Akim Demaille <akim@epita.fr>
5184
5185 VCG no longer supports long_straight_phase.
5186
5187 * src/vcg.c, src/vcg.h: Remove the handling of long_straight_phase.
5188 * src/print_graph.c (print_graph): Adjust.
5189
39a06c25
PE
51902003-09-30 Frank Heckenbach <frank@g-n-u.de>
5191 and Paul Eggert <eggert@twinsun.com>
5192
5193 * doc/bison.texinfo (Decl Summary, Contextual Precedence,
5194 Table of Symbols): Document %default-prec.
5195 * src/parse-gram.y (PERCENT_DEFAULT_PREC): New token.
5196 (grammar_declaration): Set default_prec on %default-prec.
5197 * src/scan-gram.l (%default-prec): New token.
5198 * src/reader.h (default_prec): New flag.
5199 * src/reader.c: Likewise.
5200 (packgram): Handle it.
5201 * tests/conflicts.at (%default-prec without %prec,
5202 %default-prec with %prec, %default-prec 1): New tests.
fc8f2965 5203
39a06c25
PE
52042003-09-30 Paul Eggert <eggert@twinsun.com>
5205
5206 * tests/testsuite.at: Include local.at, not input.at, fixing
5207 a typo in the 2003-08-25 patch.
5208
62b6aef9
AD
52092003-08-27 Akim Demaille <akim@epita.fr>
5210
5211 * data/lalr1.cc (yyparse) [__GNUC__]: "Use" yyerrorlab to pacify
5212 GCC warnings.
5213
89e1cc61
AD
52142003-08-26 Akim Demaille <akim@epita.fr>
5215
5216 * config/announce-gen (print_changelog_deltas): Neutralize "<#" as
5217 "<\#" to avoid magic from Gnus when posting parts of this script.
5218
a08460b0
AD
52192003-08-26 Akim Demaille <akim@epita.fr>
5220
5221 * data/lalr1.cc (Parser::report_syntax_error_): New, extracted from
5222 (Parser::parse): here.
5223 Adjust: nerrs and errstatus is now replaced by...
5224 (Parser::nerrs_, Parser::errstatus_): New.
5225
603f1cfd
AD
52262003-08-25 Akim Demaille <akim@epita.fr>
5227
5228 * config/announce-gen, Makefile.cfg: New.
5229 * Makefile.am: Adjust.
5230 * GNUmakefile, Makefile.maint: Update from CVS Autoconf, but
5231 keeping local WGET and WGETFLAGS modifications from Paul Eggert.
5232
cd3684cf
AD
52332003-08-25 Akim Demaille <akim@epita.fr>
5234
5235 When reducing initial empty rules, Bison parser read an initial
5236 location that is not defined. This results in garbage, and that
5237 affects Bison's own parser. Therefore we need (i) to extend Bison
5238 to support a means to initialize this location, and (ii) to use
5239 this CVS Bison to fix CVS Bison's parser.
5240
5241 * src/reader.h, reader.c (epilogue_augment): Remove, replace
5242 with...
5243 * src/muscle_tab.h, src/muscle_tab.c (muscle_code_grow): this.
5244 * src/parse-gram.y: Adjust.
5245 (%initial-action): New.
5246 (%error-verbose): Since we require CVS Bison, there is no reason
5247 not to use it.
5248 * src/scan-gram.l: Adjust.
5249 * src/Makefile.am (YACC): New, to make sure we use our own parser.
5250 * data/yacc.c (yyparse): Use b4_initial_action.
5251
4e03e201
AD
52522003-08-25 Akim Demaille <akim@epita.fr>
5253
5254 * doc/bison.texinfo: Don't promote stdout for error messages.
5255
8c182d05
AD
52562003-08-25 Akim Demaille <akim@epita.fr>
5257
5258 * data/lalr1.cc (Parser::reduce_print_): Remove unused yyi.
5259 From Alexandre Duret-Lutz.
5260
6a60c4cf
PE
52612003-08-25 Akim Demaille <akim@epita.fr>
5262
5263 Version 1.875c.
5264
25f66e1a
AD
52652003-08-25 Akim Demaille <akim@epita.fr>
5266
5267 * data/lalr1.cc (Parser::stack_print_, YY_STACK_PRINT): New.
5268 Use them.
5269
5348bfbe
AD
52702003-08-25 Akim Demaille <akim@epita.fr>
5271
5272 * data/lalr1.cc (Parser::reduce_print_): New.
5273 Use it.
5274
47301314
AD
52752003-08-25 Akim Demaille <akim@epita.fr>
5276
5277 Have lalr1.cc catch with Paul Eggert's patch to fix the infinite
5278 error recovery loops. This patch is based on
161a71f3 5279 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00000.html>.
47301314
AD
5280 Also, augment the similarity between lalr1.cc and yacc.c.
5281 Note: the locations of error recovery rules are not correct yet.
5282
5283 * data/lalr1.cc: Comment changes to augment the similarity between
5284 lalr1.cc and yacc.c.
5285 (YYERROR): Goto to yyerrorlab, not yyerrlab1.
5286 (yyerrlab1): Remove, but where it used to be (now the bottom part of
5287 yyerrlab), when hitting EOF, pop the whole stack here instead of
5288 merely falling thru the default error handling mechanism.
5289 (yyerrorlab): New label, with the old contents of YYERROR,
5290 plus the following change: pop the stack of rhs corresponding
5291 to the production that invoked YYERROR. That is how Yacc
5292 behaves (required by POSIX).
5293 * tests/calc.at (AT_CHECK_CALC_LALR1_CC): No longer expected to
5294 fail.
5295
1f7a61ff
AD
52962003-08-25 Akim Demaille <akim@epita.fr>
5297
5298 Tune local.at so that people can "autom4te -l autotest calc.at -o
5299 calc" for instance, to extract a sub test suite.
5300
5301 * tests/testsuite.at: Move the initialization, Autotest version
5302 requirement, and AT_TESTED invocation into...
5303 * tests/local.at: here.
5304 * tests/testsuite.at: Include it for compatibility with Autoconf
5305 2.57.
5306 * tests/Makefile.am ($(TESTSUITE)): Report that the warning should
5307 be ignore.
5308
327b5b56
PE
53092003-08-04 Paul Eggert <eggert@twinsun.com>
5310
5311 Rework code slightly to avoid gcc -Wtraditional warnings.
5312 * data/glr.c (yyuserMerge): Return void, not YYSTYPE.
5313 The returned value is now stored in *YY0. All callers changed.
5314 * src/output.c (merge_output): Adjust to the above change.
5315
0051e3ed
PE
53162003-07-26 Paul Eggert <eggert@twinsun.com>
5317
5318 * data/glr.c (YYASSERT): New macro.
5319 (yyfillin, yydoAction, yyglrReduce, yysplitStack,
5320 yyresolveStates, yyprocessOneStack):
5321 Use `YYASSERT (FOO);' rather than `if (! (FOO)) abort ();'.
5322 Derived from a suggestion by Frank Heckenbach.
1f7a61ff 5323
137437c6
PE
53242003-07-25 Paul Eggert <eggert@twinsun.com>
5325
5b620e06
PE
5326 * data/glr.c (yyglrReduce): Don't use C89 string concatenation,
5327 for portability to K&R C (after ansi2knr, presumably). See
161a71f3 5328 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00041.html>
5b620e06
PE
5329 by Frank Heckenbach, though I have omitted the structure-initialization
5330 part of his glr-knr.diff patch since I recall that the Portable
5331 C Compiler didn't require that change.
5332
137437c6
PE
5333 Let the user specify how to allocate and free memory.
5334 Derived from a suggestion by Frank Heckenbach in
161a71f3 5335 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00041.html>.
137437c6
PE
5336 * data/glr.c (YYFREE, YYMALLOC, YYREALLOC): New macros.
5337 All uses of free, malloc, realloc changed to use these macros,
5338 and unnecessary casts removed.
5339 * data/yacc.c (YYFREE, YYMALLOC): Likewise.
5340
ddb85ca5
PE
53412003-07-06 Matthias Mann <MatthiasMann@gmx.de>
5342
5343 * data/lalr1.cc (operator<<(std::ostream&, const Position&)):
5344 use s.empty() rather than s == "" to test for empty string; see
161a71f3 5345 <http://lists.gnu.org/archive/html/bison-patches/2003-07/msg00003.html>
ddb85ca5
PE
5346 (trivial change)
5347
39910e09
AD
53482003-06-25 Akim Demaille <akim@epita.fr>
5349
5350 * config/depcomp, config/install-sh: Update from masters.
5351
0ae99356
PE
53522003-06-20 Paul Eggert <eggert@twinsun.com>
5353
5354 * data/glr.c (YYLLOC_DEFAULT): Parenthesize arguments as needed,
5355 and return properly parenthesized result.
5356 * data/lalar1.cc (YYLLOC_DEFAULT): Likewise.
5357 * data/yacc.c (YYLLOC_DEFAULT): Likewise.
5358 Remove unnecessary parentheses from uses.
5359 * doc/bison.texinfo (Location Default Action): Describe the
5360 conventions for parentheses.
5361
cd05d13c
PE
53622003-06-19 Paul Eggert <eggert@twinsun.com>
5363
81fd08ca
PE
5364 * data/glr.c (yyremoveDeletes, yy_reduce_print, yyglrReduce,
5365 yyreportTree): Do not assume that size_t is the same width as int,
5366 when printing sizes. Print sizes using an unsigned format.
5367 Problem reported by Frank Heckenbach in
161a71f3 5368 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00035.html>.
4dcf140b 5369
cd05d13c
PE
5370 Port to Forte Developer 7 C compiler.
5371 * data/glr.c (struct YYLTYPE): If locations are not being used,
5372 declare a single dummy member, as empty structs do not conform
5373 to the C standard.
5374 (YYERROR, YYBACKUP): Do not use "do { ...; return foo; } while (0)";
5375 the Forte Developer 7 C compiler complains that end-of-loop
5376 code is not reached.
5377
4dcf140b
PE
53782003-06-17 Paul Eggert <eggert@twinsun.com>
5379
5380 * lib/libiberty.h (PARAMS): Spell argument as Args, not as X, to
5381 avoid warnings from picky compilers about redefinition of PARAMS.
5382
8dd76bee
PE
53832003-06-17 Paul Eggert <eggert@twinsun.com>
5384
5385 Version 1.875b.
5386
5387 * NEWS: Document 1.875b.
5388
5389 * lib/bbitset.h: Do not include config.h; that's the includer's job.
5390 Do not include <sys/types.h>; shouldn't be needed on a C89 host.
5391 * lib/bitset.h (bitset_compatible_p): Indent as per GNU standard.
5392 Don't use 'index' in comments, as it's a builtin fn on some hosts.
5393 * lib/bitset_stats.c: Include gettext.h unconditionally, as
5394 per recent gettext manual's suggestion.
5395 * lib/ebitset.c (ebitset_resize, ebitset_unused_clear):
5396 Use prototypes, not old-style definitions.
5397 * lib/lbitset.c (lbitset_unused_clear): Likewise.
5398 * lib/vbitset.c (vbitset_resize, vbitset_ones, vbitset_zero,
5399 vbitset_empty_p, vbitset_copy1, vbitset_not, vbitset_equal_p,
5400 vbitset_subset_p, vbitset_disjoint_p, vbitset_and, vbitset_and_cmp,
5401 vbitset_andn, vbitset_andn_cmp, vbitset_or, vbitset_or_cmp,
5402 vbitset_xor, vbitset_xor_cmp, vbitset_and_or, vbitset_and_or_cmp,
5403 vbitset_andn_or, vbitset_andn_or_cmp, vbitset_or_and,
5404 vbitset_or_and_cmp, vbitset_copy): Likewise.
5405
5406 * lib/libiberty.h: Do not include config.h; that's the includer's job.
5407 Do not include <stdlib.h>.
5408 (PARAMS): Define unconditionally for C89.
5409 (ATTRIBUTE_NORETURN): Remove.
5410 (ATTRIBUTE_UNUSED): Define unconditionally.
5411
5412 Upgrade to 2003-06-08 libbitset, submitted by Michael Hayes in:
161a71f3 5413 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00005.html>
8dd76bee
PE
5414 * lib/Makefile.am (bitsets_sources): Add vbitset.c, vbitset.h.
5415 * lib/vbitset.c, lib/vbitset.h: New files.
5416 * lib/abitset.c, lib/bbitset.h, lib/bitset.c, lib/bitset.h,
5417 lib/bitset_stats.c, lib/ebitset.c, lib/lbitset.c: Import
5418 from libbitset.
5419
5420 * doc/bison.texinfo (How Can I Reset the Parser): Renamed from
5421 `How Can I Reset @code{yyparse}', since texinfo does not allow
5422 arbitrary @ in node names.
5423
5424 * m4/Makefile.am (EXTRA_DIST): Add the following files, which
5425 shouldn't be needed according to the gettext 0.12.1 documentation
5426 but which seem to be needed anyway: codeset.m4 glibc21.m4
f8e8262e 5427 intdiv0.m4 inttypes-pri.m4 inttypes.m4 inttypes_h.m4 isc-posix.m4
8dd76bee 5428 lcmessage.m4 nls.m4 po.m4 stdint_h.m4 uintmax_t.m4 ulonglong.m4.
f8e8262e 5429 * po/Makefile.in.in: Upgrade to gettext 0.12.1 version.
cd05d13c 5430
8dd76bee
PE
5431 * lib/.cvsignore: Add stdbool.h.
5432 * m4/.cvsignore: Add nls.m4, po.m4.
5433
5434 Upgrade to CVS gnulib.
5435 * stdbool_.h: File renamed from stdbool.h.in.
5436 * configure.ac (AM_STDBOOL_H): Invoke this instead of
5437 AC_HEADER_STDBOOL.
5438 (AM_GNU_GETTEXT): Put brackets around args, as latest manual suggests.
5439 (AM_GNU_GETTEXT_VERSION): Update to 0.12.1.
5440 * lib/Makefile.am (EXTRA_DIST): Add stdbool_.h.
5441 (MOSTLYCLEANFILES): New var.
5442 ($(libbison_a_OBJECTS)): Depend on $(STDBOOL_H).
5443 (stdbool.h): New rule.
5444 * lib/dirname.c, lib/dirname.h, lib/hash.c, lib/hash.h,
5445 lib/malloc.c, lib/obstack.h, lib/quote.c, lib/realloc.c,
5446 lib/strcasecmp.c, lib/xalloc.h, m4/alloca.m4, m4/onceonly.m4,
5447 m4/quote.m4: Upgrade to today's gnulib.
5448
5449 * tests/calc.at (AT_CHECK_CALC): New option EXPECTED-TO-FAIL.
5450 (AT_CHECK_CALC_LALR1_CC): Use it, since the C++ LALR parser fails
5451 the tests right now.
5452 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Ensure yylex and
5453 yyerror are declared before use; C99 requires this.
5454
25005f6a
PH
54552003-06-09 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
5456
5457 * data/glr.c (YYERROR): Update definition to reset yyerrState to 0
5458 first.
5459 (yyrecoverSyntaxError): Correct the logic for setting and testing
5460 yyerrState.
5461 Correct comment on handling EOF.
5462 Allow states with only a default reduction, rather than failing
8dd76bee 5463 (I can't quite reconstruct why these were not allowed before).
25005f6a 5464
137437c6 5465 Fixes to avoid problem that $-N rules in GLR parsers can cause
25005f6a 5466 buffer overruns, corrupting state.
8dd76bee
PE
5467
5468 * src/output.c (prepare_rules): Output max_left_semantic_context
25005f6a
PH
5469 definition.
5470 * src/reader.h (max_left_semantic_context): New variable declaration.
5471 * src/scan-gram.l (max_left_semantic_context): Define.
5472 (handle_action_dollar): Update max_left_semantic_context.
5473 * data/glr.c (YYMAXLEFT): New definition.
5474 (yydoAction): Increase size of yyrhsVals by YYMAXLEFT.
5475 (yyresolveAction): Ditto.
5476
5477 Fixes to problems with location handling in GLR parsers reported by
5478 Frank Heckenbach (2003/06/05).
5479
5480 * data/glr.c (YYLTYPE): Make trivial if locations not used.
5481 (YYRHSLOC): Add parentheses, and define only if locations used.
5482 (YYLLOC_DEFAULT): Add parentheses, and give trivial definition if
5483 locations not used.
5484 (yyuserAction): Use YYLLOC_DEFAULT to set *yylocp.
5485 (yydoAction): Remove redundant initialization of *yyvalp and *yylocp.
8dd76bee 5486
25005f6a
PH
5487 * tests/cxx-type.at: Exercise location information; update tests
5488 to differentiate output with and without locations.
8dd76bee 5489 Remove forward declarations of yylex and yyerror---caused errors
25005f6a
PH
5490 because default YYLTYPE not yet defined.
5491 Change semantic actions to compute strings, rather than printing
5492 them directly (to test proper passing of semantics values). Change
5493 output to prefix notation and update test data and expected results.
5494 (yylex): Track locations.
5495 (stmtMerge): Return value rather than printing, and include arguments
5496 in value.
8dd76bee 5497
711f40b7
PE
54982003-06-03 Paul Eggert <eggert@twinsun.com>
5499
5500 Avoid warnings generated by GCC 2.95.4 when Bison is
5501 configured with --enable-gcc-warnings.
5502 * data/lalr1.cc (yy::]b4_parser_class_name[::parse,
5503 yy::]b4_parser_class_name[::translate_,
5504 yy::Stack::operator[] (unsigned),
5505 yy::Stack::operator[] (unsigned) const,
5506 yy::Slice::operator[] (unsigned),
5507 yy::Slice::operator[] (unsigned) const):
5508 Rename local vars to avoid warnings.
5509 * tests/glr-regression.at (Improper handling of embedded actions
5510 and $-N in GLR parsers): Remove unused local variable from yylex.
5511 * tests/regression.at (_AT_DATA_DANCER_Y): Declare yylex to take
5512 (void) as arg when not pure, since we now assume C89 when building
5513 Bison. Pacify GCC by using parameter.
5514
ac695f7d
PE
55152003-06-02 Paul Eggert <eggert@twinsun.com>
5516
5517 * data/lalr1.cc (yy::Position::lines, yy::Position::columns,
5518 yy::Location::lines, yy::Location::columns): Rename arguments
5519 to avoid shadowing; this removes a warning generated by GCC 3.3.
5520
26ec81e0
PE
55212003-06-01 Paul Eggert <eggert@twinsun.com>
5522
5523 Don't pass C-only warning optins (e.g., -Wmissing-declarations)
5524 to g++, as GCC 3.3 complains if you do it.
5525 * configure.ac (WARNING_CXXFLAGS): New subst. Set it to
5526 everything that WARNING_CFLAGS has, except omit warnings
5527 not suitable for C++.
5528 (AC_PROG_CXX): Use this instead of AC_CHECK_PROGS([CXX], [g++]).
5529 * tests/atlocal.in (CXXFLAGS): New var.
5530 * tests/local.at (AT_COMPILE_CXX): Use it instead of CFLAGS.
5531
5532 Fix a GLR parser bug I reported in February; see
161a71f3 5533 <http://lists.gnu.org/archive/html/bison-patches/2003-02/msg00008.html>.
26ec81e0
PE
5534 The problem was that GLR parsers did not conform to the C standard,
5535 because actions like { $1 = $2 + $3; } expanded to expressions
5536 that invoked YYFILL in separate subexpressions, and YYFILL assigned
5537 to a local variable. The C standard says that expressions
5538 like (var = f ()) + (var = f ()) have undefined behavior.
5539 Another problem was that GCC sometimes issues warnings that
5540 yyfill and its parameters are unused.
5541
5542 * data/glr.c (yyfillin): Renamed from the old yyfill. Mark
5543 as possibly unused.
5544 (yyfill): New function.
5545 (YYFILL): Use it.
5546 (yyuserAction): Change type of yynormal to bool, so that it matches
5547 the new yyfill signature. Mark it as possibly unused.
5548
5549
5550 Follow up on a bug I reported in February, where a Bison-generated
5551 parser can loop. Provide a test case and a fix for yacc.c. I
5552 don't have a fix for lalr1.cc or for glr.c, unfortunately.
5553 The original bug report is in:
161a71f3 5554 <http://lists.gnu.org/archive/html/bison-patches/2003-02/msg00044.html>
26ec81e0
PE
5555
5556 * data/yacc.c (YYERROR): Now just 'goto yyerrorlab', since the
5557 macro's size was becoming unwieldy.
5558 (yyerrlab): Do not discard an empty lookahead symbol, as this
5559 might destroy garbage.
5560 (yyerrorlab): New label, with the old contents of YYERROR,
5561 plus the following change: pop the stack of rhs corresponding
5562 to the production that invoked YYERROR. That is how Yacc
5563 behaves, and POSIX requires this behavior.
5564 (yyerrlab1): Use YYPOPSTACK instead of its definiens.
5565 * tests/calc.at (_AT_DATA_CALC_Y): Include unistd.h if available.
5566 Define 'alarm' to do nothing if unistd.h is not available.
5567 Add a new rule "exp: '-' error;" to test the above change to
5568 data/yacc.c. Use 'alarm' to abort any test taking longer than
5569 10 seconds, as it's probably looping.
5570 (AT_CHECK_CALC): Test recovery from error in new grammar rule.
5571 Also, the new yacc.c generates two fewer diagnostics for an
5572 existing test.
5573
d0829076
PE
55742003-05-24 Paul Eggert <eggert@twinsun.com>
5575
c6ae27df
PE
5576 * data/glr.c (YYSTACKEXPANDABLE): Do not evaluate
5577 YYSTYPE_IS_TRIVIAL or YYSTYPE_IS_TRIVIAL unless they are defined.
5578 This fixes a problem reported by John Bowman when the Compaq/HP
5579 Alpha cxx compiler happy (e.g. using cxx -D__USE_STD_IOSTREAM
5580 -ansi -Wall -gall).
5581 * data/yacc.c (union yyalloc): Likewise.
5582 (YYCOPY): Do not evaluate __GNUC__ unless it is defined.
26ec81e0 5583
d0829076
PE
5584 Switch from 'int' to 'bool' where that makes sense.
5585
5586 * lib/abitset.c (abitset_test, abitset_empty_p, abitset_equal_p,
5587 abitset_subset_p, abitset_disjoint_p, abitset_and_cmp,
5588 abitset_andn_cmp, abitset_or_cmp, abitset_xor_cmp, abitset_and_or,
5589 abitset_and_or_cmp, abitset_andn_or_cmp, abitset_or_and_cmp):
5590 Return or accept bool, not int. All callers changed.
5591 * lib/bbitset.h: (bitset_toggle_, bitset_copy_, bitset_and_or_cmp_,
5592 bitset_andn_or_cmp_, bitset_or_and_cmp_): Likewise.
5593 * lib/bitset.c (bitset_only_set_p, bitset_print, bitset_toggle_,
5594 bitset_copy_, bitset_op4_cmp, bitset_and_or_cmp_, bitset_andn_or_cmp_,
5595 bitset_or_and_cmp_): Likewise.
5596 * lib/bitset.h (bitset_test, bitset_only_set_p): Likewise.
5597 * lib/bitset_stats.c (bitset_stats_print, bitset_stats_toggle,
5598 bitset_stats_test, bitset_stats_empty_p, bitset_stats_disjoint_p,
5599 bitset_stats_equal_p, bitset_stats_subset_p, bitset_stats_and_cmp,
5600 bitset_stats_andn_cmp, bitset_stats_or_cmp, bitset_stats_xor_cmp,
5601 bitset_stats_and_or_cmp, bitset_stats_andn_or_cmp,
5602 bitset_stats_or_and_cmp): Likewise.
5603 * lib/ebitset.c (ebitset_elt_zero_p, ebitset_equal_p, ebitset_copy_cmp,
5604 ebitset_test, ebitset_empty_p, ebitset_subset_p, ebitset_disjoint_p,
5605 ebitset_op3_cmp, ebitset_and_cmp, ebitset_andn_cmp, ebitset_or_cmp,
5606 ebitset_xor_cmp): Likewise.
5607 * lib/lbitset.c (lbitset_elt_zero_p, lbitset_equal_p, lbitset_copy_cmp,
5608 lbitset_test, lbitset_empty_p, lbitset_subset_p, lbitset_disjoint_p,
5609 lbitset_op3_cmp, lbitset_and_cmp, lbitset_andn_cmp, lbitset_or_cmp,
5610 lbitset_xor_cmp): Likewise.
5611 * lib/bbitset.h: Include <stdbool.h>.
5612 (struct bitset_vtable): The following members now return bool, not
5613 int: toggle, test, empty_p, disjoint_p, equal_p, subset_p,
5614 and_cmp, andn_cmp, or_cmp, xor_cmp, and_or_cmp, andn_or_cmp,
5615 or_and_cmp).
5616 * src/conflicts.c (count_rr_conflicts): Likewise.
5617 * lib/bitset_stats.h (bitset_stats_enabled): Now bool, not int.
5618 All uses changed.
5619 * lib/ebitset.c (ebitset_obstack_init): Likewise.
5620 * lib/lbitset.c (lbitset_obstack_init): Likewise.
5621 * src/getargs.c (debug_flag, defines_flag, locations_flag,
5622 no_lines_flag, no_parser_flag, token_table_flag, yacc_flag,
5623 graph_flag): Likewise.
5624 * src/getargs.h (debug_flag, defines_flag, locations_flag,
5625 no_lines_flag, no_parser_flag, token_table_flag, yacc_flag,
5626 graph_flag): Likewise.
5627 * src/output.c (error_verbose): Likewise.
5628 * src/output.h (error_verbose): Likewise.
5629 * src/reader.c (start_flag, typed): Likewise.
5630 * src/reader.h (typed): Likewise.
5631 * src/getargs.c (LOCATIONS_OPTION): New constant.
5632 (long_options, getargs): Use it.
5633 * src/lalr.c (build_relations): Use bool, not int.
5634 * src/nullable.c (nullable_compute): Likewise.
5635 * src/print.c (print_reductions): Likewise.
5636 * src/tables.c (action_row, pack_vector): Likewise.
5637 * src/muscle_tab.h (MUSCLE_INSERT_BOOL): New macro.
5638 * src/output.c (prepare): Use it.
5639 * src/output.c (token_definitions_output,
5640 symbol_destructors_output, symbol_destructors_output): Use string,
5641 not boolean integer, to keep track of whether to output separator.
5642 * src/print_graph.c (print_core): Likewise.
5643 * src/state.c (state_rule_lookaheads_print): Likewise.
5644
5645 * config/install-sh: Sync from automake 1.7.5.
5646
6b2584b7
PE
56472003-05-14 Paul Eggert <eggert@twinsun.com>
5648
5649 * src/parse-gram.y (rules_or_grammar_declaration): Require a
5650 semicolon after a grammar declaration, in the interest of possible
5651 future changes to the Bison input language.
5652 Do not allow a stray semicolon at the start of the grammar.
5653 (rhses.1): Allow one or more semicolons after any rule, including
5654 just before "|" as required by POSIX.
5655 * tests/input.at (Torturing the Scanner): Add tests for ";|" in a
5656 grammar.
5657
caf37a36
ADL
56582003-05-14 Alexandre Duret-Lutz <adl@gnu.org>
5659
5660 %parse-param support for lalr1.cc.
5661
5662 * data/lalr1.cc (b4_parse_param_decl, b4_parse_param_cons,
5663 b4_cc_constructor_calls, b4_cc_constructor_call,
5664 b4_parse_param_vars, b4_cc_var_decls, b4_cc_var_decl): New m4
5665 definitions.
5666 (yy::b4_parser_class_name::b4_parser_class_name): Take extra
5667 parse-param arguments.
5668 (yy::b4_parser_class_name): Declare instance variables to
5669 hold parse-param arguments.
5670 * tests/calc.at: s/value/semantic_value/ because value clashes
5671 with a member of yy::b4_parser_class_name. Adjust C++ code
5672 to handle %parse-param. Enable %parse-param test in C++.
5673
3ab37077
PE
56742003-05-12 Paul Eggert <eggert@twinsun.com>
5675
5676 * doc/bison.texinfo (How Can I Reset @code{yyparse}): Reword the
5677 English a bit. Fix fclose typo. Change "const char" to "char
5678 const", and use ANSI C rather than K&R for "main". Suggest
5679 YY_FLUSH_BUFFER over yyrestart (as that is what Flex recommends)
5680 and suggest yy_switch_to_buffer.
5681
56822003-05-05 Paul Eggert <eggert@twinsun.com>
163ab321
PE
5683
5684 * lib/bitset.h (__INT_TO_PTR): Define to a value that presumes
5685 C89. This avoids a diagnostic on compilers that define __STDC__
5686 to 0, fixing a problem with Tru64 cc reported by Martin Mokrejs in
161a71f3 5687 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00041.html>.
163ab321 5688
e743727f
PE
56892003-05-03 Paul Eggert <eggert@twinsun.com>
5690
5691 * lib/bitset.h (BITSET_FOR_EACH, BITSET_FOR_EACH_REVERSE):
5692 Do not overrun array bounds.
5693 This should fix a bug reported today by Olatunji Oluwabukunmi in
161a71f3 5694 <http://lists.gnu.org/archive/html/bug-bison/2003-05/msg00004.html>.
e743727f 5695
916708d5
AD
56962003-04-29 Akim Demaille <akim@epita.fr>
5697
5698 * src/gram.h, src/gram.c (pure_parser, glr_parser): Move to...
5699 * src/getargs.c, src/getargs.h: here, as bool, not int.
5700 (nondeterministic_parser): New.
5701 * src/parse-gram.y, src/scan-gram.l: Support
5702 %nondeterministic-parser.
5703 * src/output.c (prepare): Use nondeterministic_parser instead
5704 of glr_parser where appropriate.
5705 * src/tables.c (conflict_row, action_row, save_row)
5706 (token_actions, token_actions, pack_vector): Ditto.
5707
a06ea4aa
AD
57082003-04-29 Akim Demaille <akim@epita.fr>
5709
5710 * doc/bison.texinfo (C++ Parsers, Implementing Loops): New.
5711
211074ca
AD
57122003-04-29 Akim Demaille <akim@epita.fr>
5713
5714 * tests/calc.at: Also test yacc.c and glr.c (but not lalr1.cc yet)
5715 with %pure-parser and %locations to exercise the patch from Yakov
5716 Markovitch below.
5717
6175ffe3
PE
57182003-04-28 Tim Van Holder <tim.van.holder@pandora.be>
5719
5720 * data/yacc.c: (b4_lex_param): Corrected for the case where
5721 %lex-param is provided and %pure-parser isn't.
5722
b1e95857
PE
57232003-04-27 Paul Eggert <eggert@twinsun.com>
5724
5725 Avoid gcc -Wundef warnings reported by Gerald Pfeifer in
161a71f3 5726 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00044.html>.
b1e95857
PE
5727 * data/yacc.c (YYSTACK_ALLOC): Don't evaluate YYSTACK_USE_ALLOCA
5728 if it is not defined.
5729 (YYMAXDEPTH): Don't evaluate YYMAXDEPTH if it is not defined.
5730
acda9df6
PE
57312003-04-26 Paul Eggert <eggert@twinsun.com>
5732
3470c57b
PE
5733 * data/lalr1.cc (yy::Parser::pact_ninf_, yy::Parser::table_ninf_):
5734 Declare to be of type suitable for the ninf value itself, not of
5735 type suitable for the corresponding table, since the latter might
5736 be unsigned but the ninf value might be negative. This fixes a
5737 bug reported by Alexandre Duret-Lutz in
161a71f3 5738 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00017.html>.
3470c57b 5739
acda9df6
PE
5740 * configure.ac (AC_FUNC_ERROR_AT_LINE): Remove, since gl_ERROR
5741 invokes it. We shouldn't invoke it twice because it will attempt
5742 to put error.o in the archive twice. This fixes a glitch reported
5743 by Martin Mokrejs in
161a71f3 5744 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00041.html>.
acda9df6 5745
b5250f26
PE
57462003-04-21 Paul Eggert <eggert@twinsun.com>
5747
5748 * m4/error.m4: Update from Bruno Haible's 2003-04-14 patch
5749 to gnulib.
5750
089ac0f1
PE
57512003-04-21 Yakov Markovitch <Markovitch@iso.ru>
5752
5753 * data/glr.c (yyexpandGLRStack) [!YYSTACKEXPANDABLE]:
5754 Fix obvious typo that results in uncompilable GLR parsers
5755 when both %pure-parser and %locations are used. (trivial change)
5756
5ededac6
PE
57572003-04-17 Paul Eggert <eggert@twinsun.com>
5758
1b8f2fff
PE
5759 * src/scan-gram.l: Add %option nounput, since we no longer use unput.
5760 (unexpected_eof): Renamed from unexpected_end_of_file, for brevity.
5761 Do not insert the expected token via unput, as this runs afoul
5762 of a POSIX-compatibility bug in flex 2.5.31.
5763 All uses changed to BEGIN the parent state,
5764 since we no longer insert the expected token via unput.
5765 * tests/regression.at (Invalid inputs): Remove cascaded diagnostic
5766 that is no longer emitted after the above change.
5767
5ededac6
PE
5768 * src/conflicts.c (set_conflicts): Resolve all conflicts, not just
5769 the first one. This change is from Paul Hilfinger, and it fixes
5770 regression reported by Werner Lemberg in
161a71f3 5771 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00026.html>.
5ededac6
PE
5772
5773 (resolve_sr_conflict): Don't invoke state_errs_set
5774 unless one or more tokens have been explicitly made errors.
5775 Otherwise, the above change causes Bison to abort.
5776
5777 * tests/existing.at (GNU pic Grammar): New test case, taken from
5778 Lemberg's email.
5779
b8be9132
AD
57802003-03-31 Akim Demaille <akim@epita.fr>
5781
5782 * doc/Makefile.am (AM_MAKEINFOFLAGS): Don't split the info file.
5783
d423d460
AD
57842003-03-31 Akim Demaille <akim@epita.fr>
5785
5786 * src/output.c (prepare_symbols): Avoid trailing spaces in the
5787 output.
5788
c7e441b4
AD
57892003-03-31 Akim Demaille <akim@epita.fr>
5790
5791 * doc/bison.texinfo (Strings are Destroyed): s/losses/loses/.
5792 From Paul Hilfinger.
5793
231897ad
AD
57942003-03-29 Akim Demaille <akim@epita.fr>
5795
5796 * m4/error.m4: Do not put under dynamic conditions some code which
5797 expansion is under static control.
5798
5b066063
AD
57992003-03-29 Akim Demaille <akim@epita.fr>
5800
5801 * doc/bison.texinfo (How Can I Reset @code{yyparse}): New.
5802
22a74fec
AD
58032003-03-29 Akim Demaille <akim@epita.fr>
5804
5805 * doc/bison.texinfo (Strings are Destroyed): New.
5806
0eee27e7
PE
58072003-03-13 Paul Eggert <eggert@twinsun.com>
5808
5809 * .cvsignore: Add configure.lineno.
5810 * src/.cvsignore: Add yacc.
5811 * tests/.cvsignore: Add testsuite.log.
5812 * doc/fdl.texi: Sync with latest FSF version.
5813
f61aad93
PE
58142003-03-12 Paul Eggert <eggert@twinsun.com>
5815
537636c7
PE
5816 * scan-gram.l (YY_USER_INIT): Initialize code_start, too.
5817 (<INITIAL><<EOF>>, <SC_PRE_CODE><<EOF>>): Set *loc to the scanner
5818 cursor, instead of leaving it undefined. This fixes a bug
5819 reported by Tim Van Holder in
161a71f3 5820 <http://lists.gnu.org/archive/html/bug-bison/2003-03/msg00023.html>.
537636c7
PE
5821 * tests/input.at (Torturing the Scanner): Test the scanner on
5822 an empty input file, which was Tim Van Holder's test case.
5823
5824 * m4/timevar.m4 (BISON_PREREQ_TIMEVAR): When checking whether
5825 <sys/resource.h> can be included, include sys/time.h and
5826 sys/times.h first, if available. This works around the SunOS
5827 4.1.4 porting bug reported by Bruce Becker in
161a71f3 5828 <http://lists.gnu.org/archive/html/bug-bison/2003-03/msg00018.html>.
537636c7
PE
5829
5830 * m4/subpipe.m4 (BISON_PREREQ_SUBPIPE): Don't
5831 AC_CHECK_HEADERS([sys/wait.h]), as this interferes with
5832 AC_HEADER_SYS_WAIT.
5833
f61aad93
PE
5834 Merge changes from gnulib. This was prompted because the CVS
5835 snapshot didn't build on Solaris 7 due to strnlen problems.
5836
5837 These changes need to be merged back into gnulib:
5838 * lib/hash.c: Include <stdbool.h> unconditionally.
5839 * m4/onceonly.m4 (m4_quote): New macro.
5840 (AC_CHECK_HEADERS_ONCE, AC_CHECK_FUNCS_ONCE, AC_CHECK_DECLS_ONCE):
5841 Quote AC_FOREACH variable-expansions properly.
5842 The 2003-01-03 obstack.h change also needs merging.
5843 {end of changes requiring merging}
5b066063 5844
f61aad93
PE
5845 * lib/stdbool.h.in, m4/alloca.m4, m4/dirname.m4, m4/dos.m4,
5846 m4/getopt.m4, m4/hash.m4, m4/malloc.m4, m4/memchr.m4,
5847 m4/memrchr.m4, m4/obstack.m4, m4/onceonly.m4, m4/quote.m4,
5848 m4/quotearg.m4, m4/realloc.m4, m4/stpcpy.m4, m4/strnlen.m4,
5849 m4/strtol.m4, m4/strtoul.m4, m4/unlocked-io.m4, m4/xalloc.m4:
5850 New files, imported from gnulib.
5851 * m4/Makefile.am (EXTRA_DIST): Add the new m4/*.m4 files mentioned
5852 above.
5853
5854 * lib/mbswidth.c, m4/error.m4, m4/mbrtowc.m4, m4/mbswidth.m4,
5855 m4/memcmp.m4, m4/prereq.m4, m4/stdbool.m4: Update to current
5856 gnulib sources.
5857
5858 * configure.ac (gl_DIRNAME, gl_GETOPT, gl_HASH, gl_QUOTE, gl_XALLOC):
5859 Add.
5860 (gl_ERROR): New, replacing jm_PREREQ_ERROR.
5861 (gl_FUNC_ALLOCA): New, replacing AC_FUNC_ALLOCA.
5862 (gl_FUNC_STPCPY): New, replacing AC_REPLACE_FUNCS(stpcpy).
5863 (gl_FUNC_STRNLEN): New, replacing AC_FUNC_STRNLEN.
5864 (gl_MBSWIDTH): New, replacing jm_PREREQ_MBSWIDTH.
5865 (gl_OBSTACK): New, replacing AC_FUNC_OBSTACK.
5866 (gl_QUOTEARG): New, replacing jm_PREREQ_QUOTEARG.
5867 (jm_FUNC_GLIBC_UNLOCKED_IO, gl_FUNC_STPCPY, gl_FUNC_STRTOL): New.
5868 (jm_FUNC_MALLOC): New, replacing AC_FUNC_MALLOC.
5869 (jm_FUNC_REALLOC): New, replacing AC_FUNC_REALLOC.
5870 (jm_PREREQ_ARGMATCH): Remove.
5871 (AC_REPLACE_FUNCS): Remove memchr, memrchr, stpcpy, strtol, strtoul.
5872 * lib/Makefile.am (libbison_a_SOURCES): Add argmatch.c, argmatch.h.
5873
5874 * src/system.h: Include <stdbool.h> unconditionally.
5875
5876 * lib/bbitset.h: Include <limits.h> unconditionally. We have been
5877 assuming at least C89 in the bitset code for some time now.
5878
d2ffe116
AD
58792003-03-03 Akim Demaille <akim@epita.fr>
5880
5881 * ro.po: New.
5882
052826fd
AD
58832003-03-02 Akim Demaille <akim@epita.fr>
5884
5885 * doc/bison.texinfo (Table of Symbols): Reactivate the
5886 documentation for %lex-param, and %parse-param.
5887
c4749565
AD
58882003-03-02 Akim Demaille <akim@epita.fr>
5889
5890 * data/yacc.c, data/glr.c, data/lal1.cc: Use similar code to
5891 generate verbose error messages.
5892 Use the number of tokens as an upper bound in yytname, as it
5893 cannot be a non terminal.
5894
d5286af1
AD
58952003-03-02 Akim Demaille <akim@epita.fr>
5896
5897 * tests/regression.at (_AT_DATA_DANCER_Y): Fix the expected error
5898 message.
5899
22e304a6
AD
59002003-03-02 Akim Demaille <akim@epita.fr>
5901
22e304a6
AD
5902 * tests/regression.at (_AT_DATA_DANCER_Y, AT_CHECK_DANCER): New.
5903 Use them to exercise yycheck overrun.
5904 Based on Andrew Suffield's grammar.
5905
67a25fed
AD
59062003-03-02 Akim Demaille <akim@epita.fr>
5907
5908 Create tests/local.at for Bison generic testing macros.
5909
5910 * tests/calc.at (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): Move to...
5911 * tests/local.at (AT_BISON_OPTION_PUSHDEFS, AT_BISON_OPTION_POPDEFS):
5912 This new file.
5913 * tests/calc.at (AT_CHECK_CALC): Adjust.
5914 * tests/testsuite.at (AT_DATA_GRAMMAR_PROLOGUE, AT_DATA_GRAMMAR)
5915 (AT_COMPILE, AT_COMPILE_CXX, AT_PARSER_CHECK): Move to...
5916 * tests/local.at: here.
5917 (AT_COMPILE_CXX): Tags the tests using it as c++.
5918 Ignore the test if CXX is not functional.
5919
9c2b381f
PE
59202003-03-01 Paul Eggert <eggert@twinsun.com>
5921
5922 * src/scan-gram.l (code_start): Initialize it to scanner_cursor,
5923 not loc->end, since loc->end might contain garbage and this leads
5924 to undefined behavior on some platforms.
5925 (id_loc, token_start): Use (IF_LINTed) initial values that do not
5926 depend on *loc, so that the reader doesn't give the the false
5927 impression that *loc is initialized.
5928 (<INITIAL>"%%"): Do not bother setting code_start, since its value
5929 does not survive the return.
5930
0433ba88
AD
59312003-03-01 Akim Demaille <akim@epita.fr>
5932
5933 * src/scan-gram.l (code_start): Always initialize it when entering
5934 into yylex, as SC_EPILOGUE is activated *before* the corresponding
5935 yylex invocation. An alternative would be making it static, but
5936 then it starts with the second %%'s beginning, instead of its end.
5937
b305ea69
PE
59382003-02-28 Paul Eggert <eggert@twinsun.com>
5939
5940 * lib/mbswidth.c: Include <wchar.h> before "mbswidth.h", to work
5941 around a UnixWare 7.1.1 porting bug reported by John Hughes in
161a71f3 5942 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00030.html>.
b305ea69 5943
c3d25e01
PE
59442003-02-26 Paul Eggert <eggert@twinsun.com>
5945
5946 * README: Mention compiler bug in Sun Forte Developer 6 update 2.
5947 Remove Sequent/Pyramid discussion (nobody uses them any more).
5948 Merge VMS and MS-DOS discussion; these ports may well be dead
5949 but let's keep mentioning them for now. Put <> around email
5950 addresses. Add copyright notice.
5951
c267ffbc
PE
59522003-02-24 Paul Eggert <eggert@twinsun.com>
5953
5954 * data/glr.c (yy_reduce_print): yylineno -> yylno,
5955 to avoid collision with flex use of yylineno.
5956 Problem reported by Bruce Lilly in
161a71f3 5957 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00016.html>.
c267ffbc
PE
5958 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Likewise.
5959 * data/yacc.c (yy_reduce_print): Likewise.
5960
5961 * config/depcomp: Sync with Automake 1.7.3.
5962
f939fc12
AD
59632003-02-21 Akim Demaille <akim@epita.fr>
5964
5965 * data/lalr1.cc: Use temporary variables instead of casts to
5966 change integer types.
5967 Suggested by Paul Eggert.
5968
95923bd6
AD
59692003-02-21 Akim Demaille <akim@epita.fr>
5970
5971 * doc/bison.texinfo: Use "location" consistently to refer to @n,
5972 to avoid confusions with lalr1.cc's notion of Position.
5973 Suggested by Paul Eggert.
5974
2cdc240e
AD
59752003-02-20 Akim Demaille <akim@epita.fr>
5976
5977 * data/lalr1.cc (position.hh): Make sure "columns" never pushes
5978 before initial_columns.
5979 (location.hh): Use consistent variable names when defining the
5980 operator<<.
5981 Use "last" so that we subtract from Positions, not from unsigned.
5982
5d003116
AD
59832003-02-20 Akim Demaille <akim@epita.fr>
5984
5985 * data/lalr1.cc (position.hh): New subfile, including the extended
5986 and Doxygen'ed documentation of class Position.
5987 (location.hh): Use it.
5988 Document a` la Doxygen.
ba1ecc07 5989 With the help of Benoit Perrot.
5d003116 5990
d02b25f9
AD
59912003-02-20 Akim Demaille <akim@epita.fr>
5992
5993 * tests/calc.at (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): Define
5994 AT_YACC_IF.
5995 Redefine AT_YYERROR_SEES_LOC_IF using it.
5996 (_AT_DATA_CALC_Y): Don't declare yyerror when lalr1.cc, as it is
5997 not defined.
5998 Don't use the location in yy::Parser::error_ and
5999 yy::Parser::print_ when not %locations.
6000 Activate more lalr1.cc tests.
6001
0d1c3a04
AD
60022003-02-19 Akim Demaille <akim@epita.fr>
6003
6004 * data/lalr1.cc: When displaying a line number, be sure to make it
6005 an int.
6006
60a777aa
AD
60072003-02-19 Akim Demaille <akim@epita.fr>
6008
6009 * data/lalr1.cc (b4_stack_depth_init, yy::Parser::initdepth_):
6010 Remove, useless.
6011 (YYABORT, YYACCEPT, YYERROR): New.
6012 * tests/calc.at: Renable the lalr1.cc test.
6013
0b86fc41
AD
60142003-02-19 Akim Demaille <akim@epita.fr>
6015
6016 * tests/calc.at (AT_CHECK_CALC): Check different scenarios of
6017 error recovery, mixing with/without pops and discarding of the
6018 lookahead.
6019 Exercise YYERROR.
6020 Disable the lalr1.cc tests as currently it doesn't support YYERROR.
6021
da99a5dc
PE
60222003-02-17 Paul Eggert <eggert@twinsun.com>
6023
6024 * tests/atlocal.in (LDFLAGS, LIBS): New vars.
6025 * tests/testsuite.at (AT_COMPILE): Use them.
6026 This fixes the testsuite problem reported by Robert Lentz in
161a71f3 6027 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00011.html>.
da99a5dc 6028
93b8c255
PE
60292003-02-12 Paul Eggert <eggert@twinsun.com>
6030
6031 * data/yacc.c (yyerrlab) [YYERROR_VERBOSE]:
6032 Avoid subscript error in yycheck. Bug reported by Andrew Suffield in
161a71f3 6033 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00003.html>.
93b8c255
PE
6034 * data/glr.c (yyreportSyntaxError) [YYERROR_VERBOSE]: Likewise.
6035 Check for malloc failure, for consistency with yacc.c.
6036 (yytname_size): Remove, for consistency with yacc.c.
6037
6038 The bug still remains in data/lalr1.cc, as I didn't have time
6039 to fix it there.
6040
7548fed2
AD
60412003-02-06 Akim Demaille <akim@epita.fr>
6042
6043 * configure.ac (GXX): Rename as...
6044 (CXX): this, to keep the original Autoconf semantics.
6045 Require 2.57.
6046 * data/lalr1.cc: Fix b4_copyright invocations.
6047 If YYDEBUG is not defined, don't depend upon name_ being defined.
6048 (location.hh): Include string and iostream.
6049 (Position::filename): New member.
6050 (Position::Position ()): New.
6051 (operator<< (Position)): New.
6052 (operator- (Position, int)): New.
6053 (Location::first, Location::last): Rename as...
6054 (Location::begin, Location::end): these, to mock the conventional
6055 iterator names.
6056 (operator<< (Location)): New.
6057 * tests/atlocal.in (CXX): New.
6058 * tests/testsuite.at (AT_COMPILE_CXX): New.
6059 * tests/calc.at (_AT_DATA_CALC_Y): Adjust yyerror to report the
6060 locations in a more synthetic way.
6061 (AT_CHECK_PUSHDEFS): AT_YYERROR_SEES_LOC_IF is positive if
6062 lalr1.cc is used.
6063 Adjust the C locations to match those from Emacs: first column is
6064 column 0.
6065 Change all the expected results.
6066 Conform to the GCS: simplify the locations when applicable.
6067 (LOC, VAL, YYLLOC_FORMAL, YYLLOC_ARG, USE_YYLLOC, LEX_FORMALS)
6068 (LEX_ARGS, USE_LEX_ARGS, LEX_PRE_FORMALS, LEX_PRE_ARGS): Replace
6069 these CPP macros with the m4 macros new defined by...
6070 (AT_CHECK_PUSHDEFS): this, i.e.:
6071 (AT_LALR1_CC_IF, AT_PURE_LEX_IF, AT_LOC, AT_VAL, AT_LEX_FORMALS)
d02b25f9 6072 (AT_LEX_ARGS, AT_USE_LEX_ARGS, AT_LEX_PRE_FORMALS, AT_LEX_PRE_ARGS)
7548fed2
AD
6073 New macros.
6074 (AT_CHECK_POPDEFS): Undefine them.
6075 (AT_CHECK_CALC_LALR1_CC): New.
6076 Use it for the first lalr1.cc test.
6077
43a176ef
AD
60782003-02-04 Akim Demaille <akim@epita.fr>
6079
6080 * data/lalr1.cc (YYLLOC_DEFAULT): Fix its definition: be based on
6081 Location as is defined.
6082
fc049e9c
AD
60832003-02-04 Akim Demaille <akim@epita.fr>
6084
6085 * data/lalr1.cc: If YYDEBUG is not defined, don't depend upon
6086 name_ being defined.
6087
a737b216
PE
60882003-02-03 Paul Eggert <eggert@twinsun.com>
6089
6090 * src/gram.h (start_symbol): Remove unused decl.
6091
6092 Use more-consistent naming conventions for local vars.
6093
6094 * src/derives.c (derives_compute): Change type of local var from
6095 int to rule_number.
6096 * src/gram.c (grammar_rules_partial_print): Likewise.
6097 * src/print.c (print_core): Likewise.
6098 * src/reduce.c (reduce_grammar_tables): Likewise.
6099
6100 * src/gram.c (grammar_dump): Change name of item_number *
6101 local var from r to rp.
6102 * src/nullable.c (nullable_compute): Likewise.
6103
6104 * src/gram.h (ISTOKEN, ISVAR): Use i, not s, for int var.
6105
6106 * src/gram.h (symbol_number_as_item_number): Use sym, not s,
6107 for symbol or symbol_number var.
6108 * src/reader.c (grammar_start_symbol_set): Likewise.
6109 * src/reader.h (grammar_start_symbol_set, grammar_symbol_append):
6110 Likewise.
6111 * src/state.c (transitions_to): Likewise.
6112 * src/state.h: Likewise.
6113 * src/tables.c (symbol_number_to_vector_number): Likewise.
6114
6115 * src/muscle_tab.h (MUSCLE_OBSTACK_SGROW): Use p, not s, for
6116 char * var.
6117
6118 * src/parse-gram.y (lloc_default): Use loc, not r, for YYLTYPE
6119 var.
6120
6121 * src/scan-gram.l (no_cr_read): Use bytes_read, not s, for size
6122 var.
6123
6124 * src/system.h (xstrndup, strchr, strspn, strnlen, memchr, memrchr):
6125 Use str, not s, for char * var. Use ch, not c, for character var.
6126 Use size for size var.
6127
6128 * src/uniqstr.c (uniqstr_new, uniqstr_assert): Use str, not s, for
6129 char * var.
6130 (uniqstr_print, uniqst_print_processor): Use ustr, not s, for
6131 uniqstr var.
6132 * src/uniqstr.h: Likewise.
6133
6134 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str,
6135 get_layoutalgorithm_str, get_decision_str, get_orientation_str,
6136 get_node_alignment_str, get_arrow_mode_str, get_crossing_type_str,
6137 get_view_str, get_linestyle_str, get_arrowstyle_str): Rename
6138 param to have same name as that of enum, so that we don't use
6139 "s" to stand for a non-state.
6140
68e93ad5
AD
61412003-02-02 Akim Demaille <akim@epita.fr>
6142
6143 * src/scan-skel.l: Scan more than one inert character per yylex
6144 invocation.
6145
92898986
PE
61462003-02-01 Paul Eggert <eggert@twinsun.com>
6147
6148 Version 1.875a.
6149
1d9d5d71
PE
6150 * po/LINGUAS: Add ms.
6151
0435d061
AD
61522003-01-30 Akim Demaille <akim@epita.fr>
6153
6154 * doc/Makefile.am (CLEANFILES): Add bison.fns for distcheck.
6155
6029a57f
PH
61562003-01-29 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
6157
6158 * tests/cxx-type.at: Correct apparent typo in Bison input: $$ instead
6159 of $1.
0435d061
AD
6160
6161 Changes in response to error report by S. Eken: GLR mode does not
6029a57f 6162 handle negative $ indices or $ indices in embedded rules correctly.
161a71f3 6163 See <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00076.html>.
0435d061 6164
6029a57f
PH
6165 * data/glr.c (b4_rhs_value): Change to use YYFILL macro.
6166 (b4_rhs_location): Ditto.
0435d061 6167 (yyfill): New function to copy from stack tree into array
6029a57f 6168 incrementally.
0435d061
AD
6169 (yyuserAction): Modify to allow incremental move of semantic values
6170 to rhs array when in GLR mode.
6171 Define YYFILL to use in user-defined actions to fill semantic array
6029a57f
PH
6172 as needed.
6173 Remove dummy use of yystack, as there is now a guaranteed use.
6174 (yydoAction): Modify to allow incremental move of semantic values
6175 to rhs array when in GLR mode.
6176 (yyresolveAction): Ditto.
6177 (yyglrShiftDefer): Update comment.
0435d061 6178 (yyresolveStates): Use X == NULL for pointers, not !X.
6029a57f
PH
6179 (yyglrReduce): Ditto.
6180 (yydoAction): Ditto
0435d061 6181
6029a57f
PH
6182 * tests/glr-regr1.at: Rename to ...
6183 * tests/glr-regression.at: Add new regression test for the problems
6184 described above (adapted from S. Eken).
6185 Update copyright notice.
6186 * tests/testsuite.at: Rename glr-regr1.at to glr-regression.at.
6187 * tests/Makefile.am: Ditto.
6188
6cee6297
PE
61892003-01-28 Paul Eggert <eggert@twinsun.com>
6190
6191 * data/lalr1.cc: Do not use @output_header_name@ unless
6192 b4_defines_flag is set. This fixes two bugs reported by
6193 Tim Van Holder in
161a71f3
PE
6194 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00071.html>
6195 and <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00073.html>.
6cee6297 6196
b2a836b5
PE
61972003-01-21 Paul Eggert <eggert@twinsun.com>
6198
6199 * data/yacc.c (YYERROR): Move code from yyerrlab1 to here, so that
6200 we don't need to worry about yyerrlab1 being reported as an
6201 "unused label" by non-GCC C compilers. The downside is that if
6202 locations are used then a couple of statements are duplicated each
6203 time YYERROR is invoked, but the upside is that the warnings
6204 should vanish.
6205 (yyerrlab1): Move code to YERROR.
6206 (yyerrlab2): Remove. Change uses back to yyerrlab1.
6207 This reverts some of the 2002-12-27 change.
6208
4196b931
PE
62092003-01-17 Paul Eggert <eggert@twinsun.com>
6210
6211 * src/output.c (symbol_printers_output): Fix typo that led
6212 to core dump. Problem reported by Antonio Rus in
161a71f3 6213 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00058.html>.
4196b931 6214
3ae831b4
AD
62152003-01-13 Akim Demaille <akim@epita.fr>,
6216 Quoc Peyrot <chojin@lrde.epita.fr>,
6217 Robert Anisko <anisko_r@lrde.epita.fr>
6218
6219 * data/lalr1.cc (parse::yyerrlab1): When popping the stack, stop
6220 when the stacks contain one element, as the loop would otherwise
6221 free the last state, and then use the top state (the one we just
6222 popped). This means that the initial elements will not be freed
6223 explicitly, as is the case in yacc.c; it is not a problem, as
6224 these elements have fake values.
6225
e3aa65c5
PE
62262003-01-11 Paul Eggert <eggert@twinsun.com>
6227
6228 * NEWS: %expect-violations are now just warnings, reverting
6229 to Bison 1.30 and 1.75 behavior. This fixes the GCC 3.2
6230 bootstrapping problem reported by Matthias Klose; see
161a71f3 6231 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00053.html>.
e3aa65c5
PE
6232 * src/conflicts.c (conflicts_print): Likewise.
6233 * tests/conflicts.at (%expect not enough, %expect too much,
6234 %expect with reduce conflicts): Likewise.
6235 * doc/bison.texinfo (Expect Decl): Document this. Also mention
6236 that the warning is enabled if the number of conflicts changes
6237 (not necessarily increases).
6238
6239 * src/getargs.c (version): Update copyright year.
6240
f0057011
AD
62412003-01-09 Akim Demaille <akim@epita.fr>
6242
6243 * src/Makefile.am, lib/Makefile.am: Use $(VAR) instead of @VAR@.
6244
1ee6d2a0
PE
62452003-01-08 Paul Eggert <eggert@twinsun.com>
6246
6247 * Makefile.maint (WGETFLAGS):
6248 New macro, containing "-C off" to disable proxy caches.
6249 All uses of $(WGET) changed to $(WGET) $(WGETFLAGS).
6250 (rel-check): Use $(WGET) instead of wget.
6251
d4fd77c4
PE
62522003-01-06 Paul Eggert <eggert@twinsun.com>
6253
6254 * doc/bison.texinfo (Generalized LR Parsing): Add a reference to
6255 the GLR paper of Scott, Johnstone and Hussain.
6256
464c6927
PE
62572003-01-04 Paul Eggert <eggert@twinsun.com>
6258
d600ee67
PE
6259 * configure.ac (AC_ARG_ENABLE): Add --disable-yacc.
6260 (YACC_SCRIPT, YACC_LIBRARY): New vars to AC_SUBST.
6261 * lib/Makefile.am (lib_LIBRARIES): liby.a -> @YACC_LIBRARY@.
6262 (EXTRA_LIBRARIES): New var, for liby.a.
6263 * src/Makefile.am (bin_SCRIPTS): yacc -> @YACC_SCRIPT@.
6264 (EXTRA_SCRIPTS): New var, for yacc.
6265
464c6927
PE
6266 * data/yacc.c (yyerrlab1): Omit attribute if __cplusplus is defined,
6267 since GNU C++ (as of 3.2.1) does not allow attributes on labels.
6268 Problem reported by Nelson H. F. Beebe.
6269
62702003-01-03 Paul Eggert <eggert@twinsun.com>
6271
6272 * lib/obstack.h (__INT_TO_PTR) [__STDC__]: Cast result to
6273 (void *) to avoid diagnostic with native c89 on SGI IRIX 6.5
6274 when compiling Bison 1.875's `bitset bset = obstack_alloc
6275 (bobstack, bytes);'. Problem reported by Nelson H. F. Beebe.
6276
6277 * src/scan-skel.l (QPUTS): Omit redundant `;' from macro definition.
6278 ([^@\n]): Renamed from [^@\n]+ so that the token buffer does not
6279 grow to a huge size with typical invocation.
d600ee67 6280
464c6927
PE
6281 * lib/hash.c (_Bool, bool, false, true, __bool_true_false_are_defined):
6282 Use the pattern recommended by Autoconf 2.57, except also protect
6283 against double-definition.
6284 * src/system.h: Likewise.
6285 Portability issues reported by Nelson H. F. Beebe.
d600ee67 6286
464c6927
PE
6287 * data/glr.c (yybool): Renamed from bool, to avoid collisions in C.
6288 All uses changed. Provide a definition in both C and C++.
6289 (yytrue, yyfalse): Define even if defined (__cplusplus).
6290
6291 * lib/bitset_stats.c (bitset_stats_list): Remove unused var.
6292 Reported by Nelson H. F. Beebe.
d600ee67 6293
464c6927
PE
6294 * src/scan-skel.l ("@oline@"): Output lineno+1, not lineno.
6295
0f42c7d5
PE
62962003-01-02 Paul Eggert <eggert@twinsun.com>
6297
6298 * data/yacc.c (yyerrlab1): Append `;' after attribute, to
6299 pacify the buggy "smart preprocessor" in MacOS 10.2.3.
6300 Bug reported by Nelson H. F. Beebe.
6301
dc546b0f
PE
63022003-01-01 Paul Eggert <eggert@twinsun.com>
6303
6304 * Version 1.875.
6305
2c09b6a7
PE
63062002-12-30 Paul Eggert <eggert@twinsun.com>
6307
6308 * src/scan-gram.l (<INITIAL,SC_AFTER_IDENTIFIER,SC_PRE_CODE>","):
6309 Moved here from...
6310 (<INITIAL>","): Here. This causes stray "," to be treated
6311 more uniformly.
6312
dc546b0f 6313 * src/scan-gram.l (<SC_BRACED_CODE>"}"): Output ";" before the
2c09b6a7
PE
6314 last brace in braced code when not in Yacc mode, for compatibility
6315 with Bison 1.35. This resurrects the 2001-12-15 patch to
6316 src/reader.c.
6317
6318 * src/reader.h (YYDECL): Use YYSTYPE, not its deprecated alias
6319 yystype. This follows up the 2002-12-24 YYSTYPE bug fix.
6320
535c0f63
PE
63212002-12-28 Paul Eggert <eggert@twinsun.com>
6322
6323 * src/symtab.c (symbol_make_alias): Set type of SYMVAL to be
6324 that of SYM's type. This fixes Debian bug 168069, reported by
6325 Thomas Olsson.
d600ee67 6326
963fcc17
PE
63272002-12-28 Paul Eggert <eggert@twinsun.com>
6328
6329 Version 1.75f.
6330
6331 Switch back to the Yacc style of conflict reports, undoing some
6332 of the 2002-07-30 change.
6333 * doc/bison.texinfo (Understanding): Use Yacc style for
6334 conflict reports. Also, use new way of locating rules.
6335 * src/conflicts.c (conflict_report):
6336 Renamed from conflict_report_yacc, removing the old
6337 'conflict_report'. Translate the entire conflict report at once,
6338 so that we don't assume that "," has the same interpretation in
6339 all languages.
6340 (conflicts_output): Use Yacc-style conflict report for each state,
6341 instead of our more-complicated style.
6342 (conflicts_print): Use Yacc-style conflict report, except print
6343 the input file name when not emulating Yacc.
6344 * tests/conflicts.at (Unresolved SR Conflicts, Defaulted
6345 Conflicted Reduction, %expect not enough, %expect too much,
6346 %expect with reduce conflicts): Switch to Yacc-style conflict reports.
6347 * tests/existing.at (GNU Cim Grammar): Likewise.
6348 * tests/glr-regr1.at (Badly Collapsed GLR States): Likewise.
6349
6350 * src/complain.c (warn_at, warn, complain_at, complain, fatal_at,
6351 fatal): Don't invoke fflush; it's not needed and it might even be
6352 harmful for stdout, as stdout might not be open.
6353 * src/reduce.c (reduce_print): Likewise.
6354
b1efe548
PE
63552002-12-27 Paul Eggert <eggert@twinsun.com>
6356
6357 Fix a bug where error locations were not being recorded correctly.
6358 This problem was originally reported by Paul Hilfinger in
161a71f3 6359 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00086.html>.
b1efe548
PE
6360
6361 * data/yacc.c (yyparse): New local var yylerrsp, to record the
6362 top of the location stack's error locations.
6363 (yyerrlab): Set it. When discarding a token, push its location
6364 onto yylerrsp so that we don't lose track of the error's end.
6365 (yyerrlab1): Now is only the target of YYERROR, so that we can
6366 properly record the location of the action that failed. For GCC
6367 2.93 and later, insert an __attribute__ ((__unused__)) to avoid
6368 GCC warning about yyerrlab1 being unused if YYERROR is unused.
6369 (yyerrlab2): New label, which yyerrlab now falls through to.
6370 Compute the error's location by applying YYLLOC_DEFAULT to
6371 the locations of all the symbols that went into the error.
6372 * doc/bison.texinfo (Location Default Action): Mention that
6373 YYLLOC_DEFAULT is also invoked for syntax errors.
6374 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
6375 Error locations include the locations of all the tokens that were
6376 discarded, not just the last token.
d600ee67 6377
983c5c2c
PE
63782002-12-26 Paul Eggert <eggert@twinsun.com>
6379
b1efe548
PE
6380 * src/files.c: Include quote.h.
6381 (compute_output_file_names): Warn if we detect conflicting
6382 outputs to the same file. This should catch the misunderstanding
6383 exemplified by Debian Bug 165349, reported by Bruce Stephens..
6384
6385 * src/conflicts.c (conflicts_print): If the user specifies
6386 "%expect N", report an error if there are any reduce/reduce
6387 conflicts. This is what the manual says should happen.
6388 This fixes Debian bug 130890, reported by Anthony DeRobertis.
6389 * tests/conflicts.at (%expect with reduce conflicts): New test.
6390
983c5c2c
PE
6391 Don't use m4_include on relative file names, as it doesn't work as
6392 desired if there happens to be a file with that name under ".".
d600ee67 6393
983c5c2c
PE
6394 * m4sugar/version.m4: Remove; it was included but it wasn't used.
6395 * data/Makefile.am (dist_m4sugar_DATA): Remove m4sugar/version.m4.
6396 * data/m4sugar/m4sugar.m4: Don't include m4sugar/version.m4.
6397 * data/glr.c, data/lalr1.cc, data/yacc.c: Don't include c.m4.
6398 * src/output.c (output_skeleton): Use full path names when
6399 specifying a file to include; don't rely on include path, as
6400 it's unreliable when the working file contains a file with
6401 that name.
d600ee67 6402
983c5c2c
PE
64032002-12-25 Paul Eggert <eggert@twinsun.com>
6404
6405 Remove obsolete references to bison.simple and bison.hairy.
6406 Problem mentioned by Aubin Mahe in
161a71f3 6407 <http://lists.gnu.org/archive/html/help-bison/2002-12/msg00010.html>.
983c5c2c
PE
6408 * data/glr.c: Comment fix.
6409 * doc/bison.1: Remove references. Also, mention "yacc".
6410
6411 * src/getargs.c (getargs) [MSDOS]: Don't assume optarg != NULL
6412 with -g option.
6413
6414 * src/parse-gram.y (declaration): Use enum "report_states" rather
6415 than its numeric value 1.
6416
6417 * src/scan-skel.l ("@output ".*\n): Close any old yyout before
6418 opening a new one. This fixes Debian bug 165349, reported by
6419 Bruce Stephens.
6420
23f2d9dc
PE
64212002-12-24 Paul Eggert <eggert@twinsun.com>
6422
6423 Version 1.75e.
6424
6425 * Makefile.maint (cvs-update): Don't assume that the shell
6426 supports $(...), as Solaris sh doesn't.
6427
6428 * src/parse-gram.y (lloc_default): Remove test for empty
6429 nonterminals at the end, since it didn't change the result.
6430
64312002-12-24 Paul Eggert <eggert@twinsun.com>
33167b8b
PE
6432
6433 If the user does not define YYSTYPE as a macro, Bison now declares it
6434 using typedef instead of defining it as a macro. POSIX requires this.
6435 For consistency, YYLTYPE is also declared instead of defined.
6436
6437 %union directives can now have a tag before the `{', e.g., the
6438 directive `%union foo {...}' now generates the C code
6439 `typedef union foo { ... } YYSTYPE;'; this is for Yacc compatibility.
6440 The default union tag is `YYSTYPE', for compatibility with Solaris 9
6441 Yacc. For consistency, YYLTYPE's struct tag is now `YYLTYPE'
6442 instead of `yyltype'.
6443
6444 `yystype' and `yyltype' are now obsolescent macros instead of being
6445 typedefs or tags; they are no longer documented and will be
6446 withdrawn in a future release.
6447
6448 * data/glr.c (b4_location_type): Remove.
6449 (YYSTYPE): Renamed from yystype.
6450 (YYSTYPE_IS_DECLARED): New macro, used to prevent double-typedef.
6451 (struct YYLTYPE): Renamed from struct yyltype.
6452 (YYLTYPE): Renamed from yyltype.
6453 (yyltype, yystype): New (and obsolescent) macros,
6454 for backward compatibility.
6455 * data/yacc.c: Likewise.
6456
6457 * data/yacc.c (YYSTYPE): Declare as union YYSTYPE if the user
6458 does not specify a union tag. This is for compatibility with
6459 Solaris 9 yacc.
6460
6461 * src/parse-gram.y (add_param): 2nd arg is now char * not char
6462 const *, since it is now modified by stripping surrounding { }.
6463 (current_braced_code): Remove.
6464 (PERCENT_DESTRUCTOR, PERCENT_PRINTER, PERCENT_UNION,
6465 PERCENT_LEX_PARAM, PERCENT_PARSE_PARAM): Change names to include
6466 trailing " {...}". Now of type <chars>.
6467 (grammar_declaration): Adjust to bundled tokens.
6468 (code_content): Remove; stripping is now done by add_param.
6469 (print_token_value): Print contents of bundled tokens.
6470 (token_name): New function.
6471
6472 * src/reader.h (braced_code, current_braced_code): Remove.
6473 (token_name): New decl.
6474
6475 * src/scan-gram.l (handle_dollar, handle_at): Now takes int
6476 token_type, not braced_code code_kind. All uses changed.
6477 (SC_PRE_CODE): New state, for scanning after a keyword that
6478 has (or usually has) an immediately-following braced code.
6479 (token_type): New local var, to keep track of which token type
6480 to return when scanning braced code.
6481 (<INITIAL>"%destructor", <INITIAL>"%lex-param",
dc546b0f 6482 <INITIAL>"%parse-param", <INITIAL>"%printer",
33167b8b
PE
6483 <INITIAL>"%union"): Set token type and BEGIN SC_PRE_CODE
6484 instead of returning a token type immediately.
6485 (<INITIAL>"{"): Set token type.
6486 (<SC_BRACED_CODE>"}"): Use it.
6487 (handle_action_dollar, handle_action_at): Now returns bool
6488 indicating success. Fail if ! current_rule; this prevents a core dump.
6489 (handle_symbol_code_dollar, handle_symbol_code_at):
6490 Remove; merge body into caller.
6491 (handle_dollar, handle_at): Complain in invalid contexts.
6492
6493 * NEWS, doc/bison.texinfo: Document the above.
6494 * NEWS: Fix years and program names in copyright notice.
6495
879ca4f8
PE
64962002-12-17 Paul Eggert <eggert@twinsun.com>
6497
6498 * NEWS, doc/bison.texinfo (Parser Function, Pure Calling, Error
6499 Reporting, Table of Symbols): Omit mentions of %lex-param and
6500 %parse-param from the documentation for now.
6501
1c5fe69d
PE
65022002-12-15 Paul Eggert <eggert@twinsun.com>
6503
6504 Undo most of the 2002-11-12 yychar -> yytoken patch, as it broke
6505 GCC 3.2.1 (which depends on yychar == YYEMPTY when there is no
6506 lookahead symbol, and which sets yychar in parser actions) and it
7ea9026a
PE
6507 disagreed with the Bison documentation. Bug
6508 reported by Andrew Walrond.
d600ee67 6509
1c5fe69d
PE
6510 * data/yacc.c (YYTRANSLATE): Don't check for negative argument,
6511 as the caller now does that.
6512 (yyclearin, YYBACKUP, yyparse): Use yychar, not yytoken.
6513 (YYEMPTY): Parenthesize right hand side, since others use it.
6514 (yyparse): Don't assume that our generated code is the only code
6515 that sets yychar.
6516
d1de5372
PE
65172002-12-13 Paul Eggert <eggert@twinsun.com>
6518
6519 Version 1.75d.
6520
6521 POSIX requires a "yacc" command.
6522 * src/Makefile.am (bin_SCRIPTS): New macro, for yacc.
6523 (MOSTLYCLEANFILES): Add yacc.
6524 (yacc): New rule.
1c5fe69d 6525 * doc/bison.texinfo (Invocation, Bison Options): Mention yacc
d1de5372
PE
6526 as an alias for bison y.
6527
6528 * po/LINGUAS: Add da.
d600ee67 6529
d1de5372
PE
6530 * src/getargs.c (__GNU_LIBRARY__) [lint]: Define to work around
6531 problem with latest <getopt.h>.
6532 (HACK_FOR___GNU_LIBRARY___PROTOTYPE): New macro.
6533
6534 * doc/fdl.texi: Upgrade to 1.2.
6535 * lib/alloca.c, lib/error.c, lib/getopt.c, lib/getopt.h
6536 lib/getopt1.c, lib/gettext.h, lib/memrchr.c, lib/obstack.c,
6537 lib/obstack.h, lib/strnlen.c, lib/unlocked-io.h: Sync with
6538 gnulib.
6539 * config/install-sh: Sync with autotools.
6540
6541 Fix a bad interaction with flex 2.5.23 reported by Bruce Lilly in
161a71f3 6542 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00114.html>.
d1de5372
PE
6543 * data/yacc.c (YYLTYPE, struct yyltype): Do not define unless
6544 locations are requested.
6545 (union yyalloc): Do not depend on YYLTYPE_IS_TRIVIAL unless
6546 locations are requested.
6547
d0f3fe23
PE
65482002-12-12 Paul Eggert <eggert@twinsun.com>
6549
6550 Remove unportable casts and storage allocation tricks.
6551 While we're at it, remove almost all casts, since they
6552 usually aren't needed and are a sign of trouble.
6553
6554 * configure.ac (AC_CHECK_TYPES): Check for uintptr_t.
6555
6556 * src/derives.c (derives_compute): Do not subtract NTOKENS from
6557 the pointer DSET returned by malloc; this isn't portable.
6558 Instead, always use DSET[i - NTOKENS] rather than DSET[i].
6559 Similarly for DERIVES.
6560 * src/lalr.c (set_goto_map): Likewise, for GOTO_MAP and TEMP_MAP.
6561 * src/nullable.c (nullable_compute): Likewise, for RSETS and NULLABLE.
6562 * src/reduce.c (reduce_grammar_tables): Likewise, for nontermmap
6563
6564 * src/derives.c (derives_compute): Do not bother invoking
6565 int_of_rule_number, since rule numbers are integers.
6566
6567 * src/files.c (concat2, tr, compute_base_name): Use xmalloc (N)
6568 rather than XMALLOC (char, N).
6569
6570 * src/files.c (filename_split): Rewrite to avoid cast.
6571
6572 * src/gram.h (symbol_number_as_item_number,
6573 item_number_as_symbol_number, rule_number_as_item_number,
6574 item_number_as_rule_number):
6575 Now inline functions rather than macros, to avoid casts.
6576 * src/state.h (state_number_as_int): Likewise.
6577 * src/tables.c (state_number_to_vector_number,
6578 symbol_number_to_vector_number): Likewise.
6579
6580 * src/gram.h (int_of_rule_number): Remove; no longer used.
6581
6582 * src/lalr.c (add_lookback_edge): Use malloc rather than calloc,
6583 since the resulting storage is always stored into.
6584
6585 * src/main.c (alloca) [C_ALLOCA]: Add decl here, the only place
6586 where it's needed.
6587
6588 * src/muscle_tab.c (muscle_m4_output):
6589 Now inline. Return bool, not int.
6590 * src/state.c (state_compare): Likewise.
6591 * src/symtab.c (symbol_check_defined,
6592 symbol_check_alias_consistency, symbol_pack, symbol_translation,
6593 hash_compare_symbol, hash_symbol):
6594 Likewise.
6595 * src/uniqstr.c (uniqstr_print): Likewise.
6596 * src/muscle_tab.c (muscle_m4_output_processor):
6597 New function, to avoid casts.
6598 * src/state.c (state_comparator, stage_hasher): Likewise.
6599 * src/symtab.c (symbol_check_defined_processor,
6600 symbol_check_alias_consistency_processor, symbol_pack_processor,
6601 symbol_translation_processor, hash_symbol_comparator,
6602 hash_symbol_hasher): Likewise.
6603 * src/uniqstr.c (uniqstr_print_processor): Likewise.
6604 * src/muscle_tab.c (muscles_m4_output):
6605 Use new functions instead of casting old functions unportably.
6606 * src/state.c (state_hash_new): Likewise.
6607 * src/symtab.c (symbols_new, symbols_do, symbols_check_defined,
6608 symbols_token_translations_init):
6609 Likewise.
6610 * src/uniqstr.c (uniqstrs_new, hash_initialize, uniqstrs_do): Likewise.
6611
6612 * src/output.c (GENERATE_MUSCLE_INSERT_TABLE): Use long local
6613 var instead of casting to long, to avoid casts.
6614 (prepare_states): Use MALLOC rather than alloca, so that we don't
6615 have to worry about alloca.
6616 * src/state.c (state_hash_lookup): Likewise.
6617
6618 * src/scan-gram.l (<SC_ESCAPED_CHARACTER>"'"): Use unsigned char
6619 local var instead of casting to unsigned char, to avoid casts.
6620
6621 * src/state.c (TRANSITIONS_ALLOC, ERRS_ALLOC, REDUCTIONS_ALLOC,
6622 STATE_ALLOC): Remove.
6623 (transitions_new, errs_new, reductions_new, state_new): Use malloc
6624 rather than calloc, and use offsetof to avoid allocating slightly
6625 too much storage.
6626 (state_new): Initialize all members.
6627
6628 * src/state.c (state_hash): Use unsigned accumulator, not signed.
6629
6630 * src/symtab.c (symbol_free): Remove; unused.
6631 (symbol_get): Remove cast in lhs of assignment.
6632 (symbols_do): Now static. Accept generic arguments, not
6633 hashing-related ones.
6634
6635 * src/symtab.h: (NUMBER_UNDEFINED): Remove unnecessary cast.
6636 (symbol_processor): Remove.
6637 (symbols_do): Remove decl; now static.
6638
6639 * src/system.h (alloca): Remove; decl no longer needed.
6640 (<stddef.h>): Include, for offsetof.
6641 (<inttypes.>, <stdint.h>): Include if available.
6642 (uintptr_t): New type, if system lacks it.
6643 (CALLOC, MALLOC, REALLOC): New macros.
6644 All uses of XCALLOC, XMALLOC, and XREALLOC changed to use these
6645 new macros.
6646
6647 * src/tables.c (table_size): Now int, to pacify GCC.
6648 (table_grow, table_ninf_remap): Use signed table size.
6649 (save_row): Don't bother initializing locals when not needed.
6650 (default_goto, goto_actions, pack_vector): Remove unnecessary casts.
6651 * src/uniqstr.c (hash_compare_uniqstr): Likewise.
6652
6653 * src/vcg.h: Correct misspellings.
6654
6655 * src/vcg_defaults.h (G_CMAX): Now INT_MAX.
6656
6657
6658 * src/getargs.c (getargs): Don't assume EOF == -1.
6659
26b4a969
PE
66602002-12-09 Paul Eggert <eggert@twinsun.com>
6661
6662 Change identifier spellings to avoid collisions with names
6663 that are reserved by POSIX.
6664
6665 Don't use names ending in _t, since POSIX reserves them.
6666 For consistency, remove _e and _s endings -- they're weren't
6667 needed to remove ambiguity. All uses changed.
6668 * src/uniqstr.h (uniqstr): Renamed from uniqstr_t, which in
6669 turn was just renamed from struniq_t.
6670 * src/uniqstr.c (uniqstr_processor): Renamed from struniq_processor,
6671 which in turn was just renamed from struniq_processor_t.
6672 (hash_compare_uniqstr): Renamed from hash_compare_struniq, which
6673 in turn was renamed from hash_compare_struniq_t.
6674 * src/LR0.c (struct state_list): Renamed from struct state_list_s.
6675 (state_list): Renamed from state_list_t.
6676 * src/assoc.h (assoc): Renamed from assoc_t.
6677 * src/conflicts.c (enum conflict_resolution): Renamed from
6678 enum conflict_resolution_e.
6679 * src/derives.c (struct rule_list): Renamed from struct rule_list_s.
6680 (rule_list): Renamed from rule_list_t.
6681 * src/getargs.h (enum trace): Renamed from enum trace_e.
6682 (enum report): Renamed from enum report_e.
6683 * src/gram.h (item_number): Renamed from item_number_t.
6684 (rule_number): Renamed from rule_number_t.
6685 (struct rule_s): Remove the "rule_s" part; not used.
6686 (rule): Renamed from rule_t.
6687 (rule_filter): Renamed from rule_filter_t.
6688 * src/lalr.c (struct goto_list): Renamed from struct goto_list_s.
6689 (goto_list): Renamed from goto_list_t.
6690 * src/lalr.h (goto_number): Renamed from goto_number_t.
6691 * src/location.h (location): Renamed from location_t.
6692 * src/muscle_tab.c (muscle_entry): Renamed from muscle_entry_t,
6693 and moved here from:
6694 * src/muscle_tab.h (muscle_entry_t): here.
6695 * src/nullable.c (struct rule_list): Renamed from struct rule_list_s.
6696 (rule_list): Renamed from rule_list_t.
6697 * src/print_graph.c (static_graph): Renamed from graph.
6698 * src/reader.h (braced_code): Renamed from braced_code_t.
6699 Remove brace_code_e tag.
6700 * src/relation.h (relation_node): Renamed from relation_node_t.
6701 (relation_nodes): Renamed from relation_nodes_t.
6702 (relation): Renamed from relation_t.
6703 * src/state.h (state_number): Renamed from state_number_t.
6704 (struct state): Renamed from struct state_s.
6705 (state): Renamed from state_t.
6706 (transitions): Renamed from transitions_t. Unused (and
6707 misspelled) transtion_s tag removed.
6708 (errs): Renamed from errs_t. Unused errs_s tag removed.
6709 (reductions): Renamed from reductions_t. Unused tag
6710 reductions_s removed.
6711 * src/symlist.h (symbol_list): Renamed from symbol_list_t.
6712 (struct symbol_list): Renamed from struct symbol_list_s.
6713 * src/symtab.h (symbol_number): Renamed from symbol_number_t.
6714 (struct symbol): Renamed from struct symbol_s.
6715 (symbol): Renamed from symbol_t.
6716 * src/tables.c (vector_number): Renamed from vector_number_t.
6717 (action_number): Renamed from action_t.
6718 * src/tables.h (base_number): Renamed from base_t.
6719 * src/vcg.h (enum color): Renamed from enum color_e.
6720 (enum textmode): Renamed from enum textmode_e.
6721 (enum shape): Renamed from enum shape_e.
6722 (struct colorentry): Renamed from struct colorentry_s.
6723 (struct classname): Renamed from struct classname_s.
6724 (struct infoname): Renamed from struct infoname_s.
6725 (enum layoutalgorithm): Renamed from enum layoutalgorithm_e.
6726 (enum decision): Renamed from enum decision_e.
6727 (enum orientation): Renamed from enum orientation_e.
6728 (enum alignment): Renamed from enum alignment_e.
6729 (enum arrow_mode): Renamed from enum arrow_mode_e.
6730 (enum crossing_type): Renamed from enum crossing_type_e.
6731 (enum view): Renamed from enum view_e.
6732 (struct node): Renamed from struct node_s.
6733 (node): Renamed from node_t.
6734 (enum linestyle): Renamed from enum linestyle_e.
6735 (enum arrowstyle): Renamed from enum arrowstyle_e.
6736 (struct edge): Renamed from struct edge.
6737 (edge): Renamed from edge_t.
6738 (struct graph): Renamed from struct graph_s.
6739 (graph): Renamed from graph_t.
6740 * tests/calc.at (_AT_DATA_CALC_Y, Simple LALR Calculator):
6741 Rename value_t -> value.
6742 * tests/input.at (Torturing the Scanner): Rename value_t -> value,
6743 value_t_as_yystype -> value_as_yystype.
6744
6745 Don't include <errno.h> in the mainstream code, since it
6746 reserves E[A-Z0-9]* and we want to use symbols like 'EQUALS'.
6747 * lib/get-errno.c, lib/get-errno.h: New files.
6748 * lib/Makefile.am (libbison_a_SOURCES): Add get-errno.h,
6749 get-errno.c.
6750 * src/files.c (xfopen, xfclose): Use get_errno instead of errno.
6751 * src/output.c (output_skeleton): Likewise.
6752 * src/scan-gram.l (<INITIAL>{int}): Use set_errno and get_errno
6753 instead of errno.
6754 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>\\x[0-9abcdefABCDEF]+):
6755 Likewise.
6756 (handle_action_dollar, handle_action_at): Likewise.
6757 * src/system.h: Do not include <errno.h>.
6758 (TAB_EXT): Renamed from EXT_TAB.
6759 (OUTPUT_EXT): Renamed from EXT_OUTPUT.
6760
6761 Avoid str[a-z]*, since <string.h> reserves that name space.
6762 Change all instances of "struniq" in names to "uniqstr", and
6763 likewise for "STRUNIQ" and "UNIQSTR".
6764 * src/uniqstr.c: Renamed from src/struniq.c.
6765 * src/uniqstr.h: Renamed from src/struniq.h.
6766 * src/Makefile.am (bison_SOURCES): Adjust to these renamings.
6767 * src/files.c (strsuffix): Remove; unused.
6768 (concat2): Renamed from stringappend. Now static.
6769 * src/files.h (strsuffix, stringappend): Remove; unused.
6770 * src/parse-gram.y (<chars>): Renamed from <string>.
6771 (<uniqstr>): Renamed from <struniq>.
6772 * src/scan-gram.l (obstack_for_string): Renamed from string_obstack.
6773 * src/vcg.h (struct node_s.expand): Renamed from struct node_s.stretch.
6774 (struct graph_s.expand): Renamed from struct graph_s.stretch.
6775 * src/vcg_defaults.h (G_EXPAND): Renamed from G_STRETCH.
6776 (G_LONG_STRAIGHT_PHASE): Renamed from G_STRAIGHT_PHASE.
6777 (N_EXPAND): Renamed from N_STRETCH.
6778
6779 Avoid *_MAX and *_MIN, since <limits.h> reserves that name space.
6780 * data/yacc.c (YYSTACK_GAP_MAXIMUM): Renamed from YYSTACK_GAP_MAX.
6781 * src/gram.h (ITEM_NUMBER_MAX, ITEM_NUMBER_MIN, RULE_NUMBER_MAX):
6782 Remove; unused.
6783 * src/lalr.h (GOTO_NUMBER_MAXIMUM): Renamed from GOTO_NUMBER_MAX.
6784 * src/state.h (STATE_NUMBER_MAXIMUM): Renamed from STATE_NUMBER_MAX.
6785 * src/symtab.h (SYMBOL_NUMBER_MAXIMUM): Renamed from SYMBOL_NUMBER_MAX.
6786 * src/tables.c (VECTOR_NUMBER_MAX, VECTOR_NUMBER_MIN): Remove; unused.
6787 (BASE_MAXIMUM): Renamed from BASE_MAX.
6788 (BASE_MINIMUM): Renamed from BASE_MIN.
6789 (ACTION_MAX): Remove; unused.
6790 (ACTION_NUMBER_MINIMUM): Renamed from ACTION_MIN.
6791 Unnecessary casts removed from above defines.
6792
6793
6794 Fix misspelling in names.
6795 * src/vcg.h (enum_alignment_e): Renamed from enum_alignement_e.
6796 * src/vcg_defaults.h (G_NODE_ALIGNMENT): Renamed from
6797 G_NODE_ALIGNEMENT.
6798
6799
6800 * lib/timevar.c (timevar_report): Renamed from time_report,
6801 for consistency with other names.
6802 * lib/timevar.h (timevar_report): New decl.
6803 * src/system.h (time_report): Remove; decl is now in lib/timevar.h.
6804
6805
6806 Sort include-file uses.
6807
6808 Reorder all include files under src to be in the order "system.h".
6809 then the ../lib include files in angle brackets (alphabetized),
6810 then the . include files in double-quotes (alphabetized). Fix
6811 dependency breakages encountered in this process, as follows:
6812 * src/closure.h, src/derives.h, src/state.h: Include "gram.h".
6813 * src/complain.c: Don't include stdlib.h, string.h _LIBC stuff.
6814 * src/state.h: Include "symtab.h".
6815
996b1c7e
PE
68162002-12-08 Paul Eggert <eggert@twinsun.com>
6817
6818 * data/glr.c, data/lalr1.cc, data/yacc.c: Do not use __file__,
6819 since this causes problems when __file__ contains character
6820 sequences like "@" that are treated specially by src/scan-skel.l.
6821 Instead, just use the file's basename. This fixes the bug
6822 reported by Martin Mokrejs in
161a71f3 6823 <http://lists.gnu.org/archive/html/bug-bison/2002-12/msg00007.html>.
996b1c7e 6824
e19c4e5d
PE
68252002-12-06 Paul Eggert <eggert@twinsun.com>
6826
6827 Add support for rules that do not have trailing semicolons, as
6828 POSIX requires. Improve the quality of locations in Bison
6829 diagnostics.
26b4a969 6830
e19c4e5d
PE
6831 * src/location.c: Include <quotearg.h>.
6832 (empty_location): Now const.
6833 (location_print): New function. Follow the recommendation of the
6834 GNU Coding Standards for locations that span file boundaries.
6835 * src/location.h: Do not include <quotearg.h>; no longer needed.
6836 (boundary): New type.
6837 (location_t): Use it. This allows locations to span file boundaries.
6838 All member uses changed: file -> start.file or end.file (as needed),
6839 first_line -> start.line, first_column -> start.column,
6840 last_line -> end.line, last_column -> end.column.
6841 (equal_boundaries): New function.
6842 (LOCATION_RESET, LOCATION_STEP): Remove.
6843 (LOCATION_PRINT): Remove. All callers changed to use location_print.
6844 (empty_location): Now const.
6845 (location_print): New decl.
6846 * src/parse-gram.y (lloc_default): New function, which handles
6847 empty locations more accurately.
6848 (YYLLOC_DEFAULT): Use it.
6849 (%token COLON): Remove.
6850 (%token ID_COLON): New token.
26b4a969 6851 (rules): Use it.
e19c4e5d
PE
6852 (declarations, rules): Remove trailing semicolon.
6853 (declaration, rules_or_grammar_declaration):
6854 Allow empty (";") declaration.
6855 (symbol_def): Remove empty actions; no longer needed.
6856 (rules_or_grammar_declaration): Remove trailing semicolon.
6857 (semi_colon.opt): Remove.
6858 * src/reader.h: Include location.h.
6859 (scanner_cursor): New decl.
6860 * src/reduce.c (nonterminals_reduce): Use warn_at rather than
6861 rolling our own.
6862 * src/scan-gram.l (YY_USER_INIT): Initialize scanner_cursor instead
6863 of *loc.
6864 (STEP): Remove. No longer needed, now that adjust_location does
6865 the work. All uses removed.
6866 (scanner_cursor): New var.
6867 (adjust_location): Renamed from extend_location. It now sets
6868 *loc and adjusts the scanner cursor. All uses changed.
6869 Don't bother testing for CR.
6870 (handle_syncline): Remove location arg; now updates scanner cursor.
6871 All callers changed.
6872 (unexpected_end_of_file): Now accepts start boundary of token or
6873 comment, not location. All callers changed. Update scanner cursor,
6874 not the location.
6875 (SC_AFTER_IDENTIFIER): New state.
6876 (context_state): Renamed from c_context. All uses changed.
6877 (id_loc, code_start, token_start): New local vars.
6878 (<INITIAL,SC_AFTER_IDENTIFIER>): New initial context. Move all
6879 processing of Yacc white space and equivalents here.
6880 (<INITIAL>{id}): Save id_loc. Begin state SC_AFTER_IDENTIFIER
6881 instead of returning ID immediately, since we need to search for
6882 a subsequent colon.
6883 (<INITIAL>"'", "\""): Save token_start.
6884 (<INITIAL>"%{", "{", "%%"): Save code_start.
6885 (<SC_AFTER_IDENTIFIER>): New state, looking for a colon.
6886 (<SC_YACC_COMMENT>, <SC_COMMENT>, <SC_LINE_COMMENT>):
6887 BEGIN context_state at end, not INITIAL.
6888 (<SC_ESCAPED_STRING>"\"", <SC_ESCAPED_CHARACTER>"'",
6889 <SC_BRACED_CODE>"}", <SC_PROLOGUE>"%}", <SC_EPILOGUE><<EOF>>):
6890 Return correct token start.
6891 (<SC_BRACED_CODE,SC_PROLOGUE,SC_EPILOGUE>): Save start boundary when
6892 the start of a character, string or multiline comment is found.
6893 * tests/conflicts.at (S/R in initial, Defaulted Conflicted
6894 Reduction): Adjust reported locations to match the more-precise
6895 results now expected.
6896 * tests/input.at (Invalid $n, Invalid @n, Type Clashes): Likewise.
6897 * tests/reduce.at (Useless Rules, Reduced Automaton,
6898 Underivable Rules): Likewise.
6899 * tests/regression.at (Invalid inputs): No longer `expecting ";"
6900 or "|"' now that so many other tokens are allowed by the new grammar.
6901
6902 * src/complain.h (current_file): Remove duplicate decl;
6903 current_file is now owned by files.h.
6904 * src/complain.c, src/scan-gram.l: Include files.h.
6905
69062002-12-06 Paul Eggert <eggert@twinsun.com>
26b4a969 6907
e19c4e5d
PE
6908 * data/glr.c (yy_reduce_print): Don't assume that yyrline[yyrule]
6909 promotes to int; it might be unsigned int.
6910 * data/yacc.c (yy_reduce_print): Likewise.
6911
6912 * doc/bison.texinfo (Table of Symbols): YYERROR_VERBOSE should
6913 be #defined in the prologue, not in the Bison declarations.
6914 This fixes Debian Bug 102878, reported by Shaul Karl.
26b4a969 6915
b64755e3
PE
69162002-12-02 Paul Eggert <eggert@twinsun.com>
6917
6918 * configure.ac (AC_REPLACE_FUNCS): Add strtoul.
6919 * lib/strtoul.c: New file, from gnulib.
6920 This fixes a porting bug reported by Peter Klein in
161a71f3 6921 <http://lists.gnu.org/archive/html/bug-bison/2002-12/msg00000.html>.
b64755e3 6922
6e746484
PE
69232002-11-30 Paul Eggert <eggert@twinsun.com>
6924
b64755e3
PE
6925 * src/scan-gram.l (no_cr_read, extend_location): Move to epilogue,
6926 and put only a forward declaration in the prologue. This is for
6927 consistency with the other scanner helper functions.
6928
6ba55592
PE
6929 Type clashes now generate warnings, not errors, since it
6930 appears that POSIX may allow some grammars with type clashes.
6931 * src/reader.c (grammar_current_rule_check): Warn about
6932 type clashes instead of complaining.
6933 * tests/input.at (Type Clashes): Expect warnings, not complaints.
6934
6e746484
PE
6935 Add Yacc library, since POSIX requires it.
6936 * doc/bison.texinfo (Yacc Library): New node. Regenerate top menu.
6937 * lib/Makefile.am (lib_LIBRARIES, liby_a_SOURCES): New macros.
6938 * lib/main.c, lib/yyerror.c: New files.
6939
6940 gram_error can be static; it need not be extern.
6941 * src/reader.h (gram_error): Remove decl.
6942 * src/parse-gram.y (gram_error): Now static. Add static decl.
6943 (print_token_value): Omit parameter names from forward decl,
6944 for consistency.
6945
88510f9c
PE
69462002-11-29 Paul Eggert <eggert@twinsun.com>
6947
6e746484
PE
6948 * doc/bison.texinfo: Emphasize that yylex and yyerror must
6949 be declared before being used. E.g., one should typically
6950 declare them in the prologue. Use GNU coding style in examples.
6951 Put "const" consistently after the type it modifies. Mention
6952 that C99 supports "inline". Mention that yyerror traditionally
6953 returns "int".
6954
88510f9c
PE
6955 %parse-param and %lex-param now take just one argument, the
6956 declaration; the argument name is deduced from the declaration.
6957
6958 * doc/bison.texinfo (Parser Function, Pure Calling, Error
6959 Reporting, Table of Symbols): Document this.
6960 * src/parse-gram.y (add_param): New function.
6961 (COMMA): Remove.
6962 (declaration): Implement new rule for %parse-param and %lex-param.
6963 * src/scan-gram.l: "," now elicits a warning, rather than being
6964 a token; this is more compatible with byacc.
6965 * tests/calc.at (Simple LALR Calculator): Adopt new convention.
6966
bb92250c
PE
69672002-11-27 Paul Eggert <eggert@twinsun.com>
6968
6969 Rename identifiers to avoid real and potential collisions.
6970
6971 * data/c.m4 (b4_yysymprint_generate): yyout -> yyoutput,
6972 to avoid collision with lex macro described by Bruce Lilly in
161a71f3 6973 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00114.html>.
bb92250c
PE
6974 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise.
6975 * doc/bison.texinfo (Prologue, Tracing): yyprint -> print_token_value.
6976 * src/parse-gram.y (print_token_value): Renamed from yyprint.
6977 All uses changed.
6978 (YYPARSE_PARAM, YYLEX_PARAM, yycontrol): Remove. All uses changed.
6979 The name "yycontrol" violates the name space rules, and this stuff
6980 wasn't being used anyway.
6981 (input): Remove action; this stuff wasn't being used.
6982 (gram_error): Rename local variable yylloc -> loc.
6983 * src/reader.h (struct gram_control_s, gram_control_t): Remove.
6984 (YY_DECL): Don't use "yy" at start of local variables.
6985 All uses changed, e.g., yylloc -> loc.
6986 * src/scan-gram.l (STEP): Renamed from YY_STEP. All uses changed.
6987 (STRING_GROW): Renamed from YY_OBS_GROW. All uses changed.
6988 (STRING_FINISH): Renamed from YY_OBS_FINISH. All uses changed.
6989 (STRING_FREE): Renamed from YY_OBS_FREE. All uses changed.
6990
6991 * src/parse-gram.y (gram_error): loc is now const *.
6992 * src/reader.h (gram_error): Likewise.
6993
3af4feb2
PE
69942002-11-24 Paul Eggert <eggert@twinsun.com>
6995
6996 Version 1.75c.
6997
6998 * tests/actions.at (Actions after errors): Use an output format
6999 more similar to that of the Printers and Destructors test.
7000 Test the position of the ';' token too.
7001 (Printers and Destructors): Likewise.
7002 (Printers and Destructors: %glr-parser): Remove for now, to avoid
7003 unnecessarily alarming people when the test fails.
7004
7005 * data/yacc.c (yyerrlab1): Move this label down, so that the
7006 parser does not discard the lookahead token if the user code
7007 invokes YYERROR. This change is required for POSIX conformance.
7008
7009 * lib/error.c: Sync with gnulib.
7010
70112002-11-22 Paul Eggert <eggert@twinsun.com>
7012
7013 * lib/quotearg.c, lib/quotearg.h: Sync with gnulib.
7014 * lib/mbswidth.c, lib/mbswidth.h: Likewise.
7015 * lib/xmalloc.c: Likewise.
26b4a969 7016
58004308
PE
70172002-11-20 Paul Eggert <eggert@twinsun.com>
7018
7019 * lib/argmatch.c, lib/argmatch.h: Sync with gnulib.
7020
70212002-11-20 Paul Eggert <eggert@twinsun.com>
26b4a969 7022
58004308
PE
7023 Avoid use of <assert.h>, as the GNU Coding Standards hint that one
7024 should use `if (! x) abort ();' rather than `assert (x);', and
7025 anyway it's one less thing to worry about configuring.
7026
7027 * data/glr.c, lib/hash.c, src/system.h: Do not include <assert.h>.
7028 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise,
7029 and replace all instances of assert with abort.
7030 * tests/calc.at (_AT_DATA_CALC_Y): Likewise.
7031 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Likewise.
7032
7033 * data/glr.c (yydoAction, yyglrReduce, yysplitStack, yyresolveStates,
7034 yyresolveAction, yyprocessOneStack): Use abort rather than assert.
7035 * lib/hash.c (hash_lookup, hash_get_first, hash_get_next,
7036 hash_find_entry, hash_rehash, hash_insert): Likewise.
7037 * src/conflicts.c (resolve_sr_conflict): Likewise.
7038 * src/lalr.c (set_goto_map, map_goto): Likewise.
7039 * src/nullable.c (nullable_compute): Likewise.
7040 * src/output.c (prepare_rules, token_definitions_output): Likewise.
7041 * src/reader.c (packgram, reader): Likewise.
7042 * src/state.c (state_new, state_free, state_transitions_set,
7043 state_reduction_find): Likewise.
7044 * src/symtab.c (symbol_user_token_number_set, symbol_make_alias,
7045 symbol_pack): Likewise.
7046 * src/tables.c (conflict_row, pack_vector): Likewise.
7047 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str,
7048 get_layoutalgorithm_str, get_decision_str, get_orientation_str,
7049 get_node_alignement_str, get_arrow_mode_str, get_crossing_type_str,
7050 get_view_str, get_linestyle_str, get_arrowstyle_str): Likewise.
7051
7052 * lib/argmatch.h (ARRAY_CARDINALITY): Do not bother to #undef.
7053 (ARGMATCH_CONSTRAINT): New macro.
7054 (ARGMATCH_ASSERT): Use it.
7055
7056 * src/system.h (verify): New macro.
7057 * src/getargs.c (trace_argmatch, report_argmatch): Use verify
7058 rather than assert.
7059 * src/tables.c (tables_generate): Likewise.
7060
7061 * src/struniq.c (struniq_assert): Now returns void, and aborts
7062 if the assertion is false.
7063 (struniq_assert_p): Remove.
7064 * src/struniq.h: Likewise.
7065
76ae8198
PE
70662002-11-18 Paul Eggert <eggert@twinsun.com>
7067
7068 * data/glr.c (yygetLRActions): Replace `yyindex' with
7069 `yytable[yyindex]' to fix typo introduced in my 2002-11-09 patch.
7070 This fixes the regression with Sun ONE Studio 7 cc that I reported in
161a71f3 7071 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00077.html>.
76ae8198 7072
d3c4e709
AD
70732002-11-18 Akim Demaille <akim@epita.fr>
7074
7075 * doc/bison.texinfo (Tracing): `yyprint' shouldn't prepend a
7076 space.
7077 From Tim Van Holder.
7078
8d8a7238
PE
70792002-11-17 Paul Eggert <eggert@twinsun.com>
7080
7081 Pacify Sun ONE Studio 7 lint. Also, rename "ParseError"
7082 to "SyntaxError" for consistency with my 2002-11-15 change.
7083
7084 * data/glr.c (YYDPRINTF, YYDSYMPRINT, YYDSYMPRINTF) [!YYDEBUG]: Do
7085 not define to {}, since this breaks the common use of `YYDPRINTF
7086 ((...));' if a single statement is desired (e.g. before `else').
7087 Work around GCC warnings by surrounding corresponding calls with
7088 {} if needed.
7089 (yyhasResolvedValue): Remove unused function.
7090 (yymergeOptionSets, yyresolvStack): Use `continue;' for empty
7091 loop body.
7092 (yyreportSyntaxError): Renamed from yyreportParseError.
7093 (yyrecoverSyntaxError): Renamed from yyrecoverParseError.
7094 All uses changed.
7095 * tests/calc.at (_AT_DATA_CALC_Y): Make vars static instead of
7096 extern when possible. Remove unused initializations.
7097
b0937b22
AD
70982002-11-16 Akim Demaille <akim@epita.fr>
7099
7100 Augment the similarity between GLR and LALR traces.
7101
7102 * data/yacc.c (yy_stack_print, YY_STACK_PRINT, yy_reduce_print)
7103 (YY_REDUCE_PRINT): New.
7104 (yyparse): Use them.
7105 * data/glr.c (yy_reduce_print): Use YYFPRINTF, no need for
7106 YYDPRINT here.
7107 (yyglrReduce, yyrecoverParseError, yyparse): Don't report the
7108 state reached after the reduction/recovery, since...
7109 (yyparse, yyprocessOneStack): Report the state we are entering in.
7110
c5e3e510
AD
71112002-11-16 Akim Demaille <akim@epita.fr>
7112
7113 * src/getargs.h, src/getargs.c (trace_e, trace_args, trace_types):
7114 Add support for --trace=skeleton.
7115 * src/scan-skel.l: %option debug.
7116 Scan strings of non-@ or \n instead of character by character.
7117 (scan_skel): Handle trace_skeleton.
7118 (QPUTS): New.
7119 (@output_parser_name@, @output_header_name@): ``Restore'' their
7120 support (used to be M4 macros).
7121 * data/yacc.c: Quote larger chunks, a la glr.c.
7122 * data/lalr1.cc: Likewise.
7123 The header guards are no longer available, so use some other
7124 string than `YYLSP_NEEDED'.
7125
4c6cc1db
AD
71262002-11-16 Akim Demaille <akim@epita.fr>
7127
7128 Make the ``Printers and Destructors'' test more verbose, taking
7129 `yacc.c''s behavior as (possibly wrong) reference.
7130
7131 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Use printf
7132 instead of fprint on stdout.
7133 Set and report the last_line of the symbols.
7134 Consistently display values and locations.
7135
6d9e8019
PE
71362002-11-16 Paul Eggert <eggert@twinsun.com>
7137
7138 * data/yacc.c: Avoid over-quoting of __line__ and __file__.
7139
6e649e65
PE
71402002-11-15 Paul Eggert <eggert@twinsun.com>
7141
b25d88f6
PE
7142 * tests/actions.at (Actions after errors): New test case.
7143
6e649e65
PE
7144 * data/glr.c, data/lalr1.cc, data/yacc.cc, doc/bison.texinfo,
7145 src/conflicts.c, src/parse-gram.y, src/tables.c, src/tables.h,
7146 tests/action.at, tests/calc.at, tests/conflicts.at,
7147 tests/cxx-type.at, tests/regression.at:
7148 "parse error" -> "syntax error" for POSIX compatibility.
7149 "parsing stack overflow..." -> "parser stack overflow" so
7150 that code matches Bison documentation.
7151
0f39aab9
AD
71522002-11-15 Akim Demaille <akim@epita.fr>
7153
7154 * src/parse-gram.y (declaration): Have %parse-param and %lex-param
7155 take two BRACED_CODE, not two string_content.
7156 Free the scanner's obstack when we are done.
7157 (code_content): New.
7158 * tests/calc.at: Adjust.
7159 * doc/bison.texinfo: Adjust.
7160 Also, make sure to include the `,' for these declarations.
7161
761c1926
AD
71622002-11-15 Tim Van Holder <tim.van.holder@pandora.be>
7163
7164 * m4/prereq.m4: Removed the commented jm_PREREQ_HASH
7165 definition; avoids potential autoreconf problems.
7166
b0f98b10
AD
71672002-11-15 Akim Demaille <akim@epita.fr>
7168
7169 Always check the value returned by yyparse.
7170
7171 * tests/calc.at (_AT_DATA_CALC_Y): Have `main' exit with the value
7172 returned by yyparse.
7173 (_AT_CHECK_CALC_ERROR): Take the expected exit value as argument.
7174 Adjust calls.
7175 * tests/glr-regr1.at (glr-regr1.y): Have `main' exit with the value
7176 returned by yyparse.
7177
970785f1
PH
71782002-11-14 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
7179
7180 * data/glr.c (yyFail): Always set yyerrflag. Corrects regression
7181 on input.at test.
7182
8fcc7db1
PE
71832002-11-14 Paul Eggert <eggert@twinsun.com>
7184
7ec1b48e
PE
7185 * src/output.c (output_skeleton): Call xfopen instead of
7186 duplicating xfopen's body.
7187
cfff7583 7188 Fix bugs reported by Nelson H. F. Beebe in
161a71f3 7189 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00078.html>.
cfff7583 7190
8fcc7db1
PE
7191 * tests/headers.at (AT_TEST_CPP_GUARD_H): Don't assume that
7192 "$CC -E foo.h" is allowed, as this doesn't work with the Portland
7193 Group compiler. Instead, use "$CC -E bar.c". Include the .h
7194 file twice in the grammar, as an extra check.
7195
7196 * tests/input.at (Torturing the Scanner): Surround the
7197 backslash-newline tests with "#if 0", to make it less likely that
7198 we'll run into compiler bugs. Bring back solitary \ inside
7199 comment, but add a closing comment to work around HP C bug. Don't
e3aa65c5 7200 test backslash-newline in C character constant.
8fcc7db1 7201
4e8d992c
AD
72022002-11-14 Akim Demaille <akim@epita.fr>
7203
7204 * tests/synclines.at (AT_SYNCLINES_COMPILE): Ignore the exit
7205 status of the compiler.
f32b346d 7206 Calling `exit 1' is no longer needed.
4e8d992c
AD
7207 Reported by Nelson H. F. Beebe.
7208
9501dc6e
AD
72092002-11-14 Akim Demaille <akim@epita.fr>
7210
7211 * tests/atlocal.in (CPPFLAGS): We have config.h.
7212 * tests/testsuite.at (AT_DATA_GRAMMAR_PROLOGUE, AT_DATA_GRAMMAR):
7213 New.
7214 * tests/actions.at, tests/calc.at, tests/conflicts.at,
7215 * tests/cxx-type.at, tests/glr-regr1.at, tests/headers.at,
7216 * tests/regression.at, tests/torture.at: Use them for all the
7217 grammars that are to be compiled.
7218 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Rename as...
7219 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): this.
7220 * doc/bison.texinfo (GLR Parsers): Document `inline'.
7221
18b519c0
AD
72222002-11-14 Akim Demaille <akim@epita.fr>
7223
7224 * doc/bison.texinfo: Various formatting changes (alignments in
7225 samples, additional @group/@end group, GCS in samples.
7226 Use @deffn instead of simple @table to define the directives,
7227 macros, variables etc.
7228
9a86cdb9
PE
72292002-11-13 Paul Eggert <eggert@twinsun.com>
7230
daa33def 7231 Fix some bugs reported by Albert Chin-A-Young in
161a71f3 7232 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00066.html>.
18b519c0 7233
daa33def 7234 * tests/input.at (Torturing the Scanner): Don't invoke "cc a.c b.c
8fcc7db1 7235 -o c"; the HP C compiler chatters during compilation.
daa33def
PE
7236 Instead, invoke "cc -c a.c -o a.o; cc -c b.c -o b.o; cc a.o b.o -o c".
7237 * tests/headers.at (export YYLTYPE): Likewise.
7238
7239 * tests/input.at (Torturing the Scanner): Remove lines containing
8fcc7db1 7240 solitary backslashes, as they tickle a bug in the HP C compiler.
daa33def 7241
9a86cdb9
PE
7242 * tests/glr-regr1.at (Badly Collapsed GLR States): Avoid //
7243 comments, since they're not portable. Use GNU coding style.
7244
9c1e26bd
AD
72452002-11-13 Akim Demaille <akim@epita.fr>
7246
7247 * data/yacc.c: Leave bigger chunks of quoted text.
7248 (YYDSYMPRINTF): New.
7249 Use it to report symbol activities.
7250 * data/glr.c (YYDSYMPRINTF): New.
7251 Use it.
7252
87f721cc
PE
72532002-11-12 Paul Eggert <eggert@twinsun.com>
7254
7255 Version 1.75b.
7256
7257 * data/glr.c (yydoAction): Return YYRESULTTAG, not int.
7258 (yyglrReduce): Return yyok, not 0.
7259 This should avoid the enumerated-type warnings reported
464c6927 7260 by Nelson H. F. Beebe in
161a71f3 7261 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00057.html>.
87f721cc
PE
7262
7263 * lib/bbitset.h (BITSET_INLINE): Remove.
7264 * lib/bitset.h [! BITSET_INLINE]: Remove.
7265 (bitset_set, bitset_reset, bitset_test): Rename local vars
7266 to avoid shadowing warnings by GCC.
7267
7268 * data/glr.c (inline): Remove #define. It's the user's
7269 responsibility to #define it away, just like 'const'.
464c6927 7270 This fixes one of the bugs reported by Nelson H. F. Beebe in
161a71f3 7271 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00058.html>.
18b519c0 7272
87f721cc
PE
7273 * Makefile.maint (po-check): Scan .l and .y files instead of the
7274 .c and the .h files that they generate. This fixes the bug
7275 reported by Tim Van Holder in:
161a71f3 7276 <http://lists.gnu.org/archive/html/bison-patches/2002-11/msg00062.html>
87f721cc
PE
7277 Look for N_ as well as for _. Try to avoid matching #define for
7278 N_ and _.
7279 * po/POTFILES.in: Remove src/parse-gram.c, src/scan-gram.c,
7280 src/system.h. Add src/parse-gram.y, src/scan-gram.l.
7281 * src/scan-gram.l: Revamp regular expressions so that " and '
7282 do not confuse xgettext.
7283
7284 * src/struniq.h (struniq_new): Do not declare the return type
7285 to be 'const'; this violates the C standard.
7286 * src/struniq.c (struniq_new): Likewise.
7287
be14ade5
AD
72882002-11-12 Albert Chin-A-Young <china@thewrittenword.com>
7289
7290 * src/Makefile.am (LDADD): Link $(LIBINTL) last to avoid the
7291 duplicate definition of optind on Tru64 UNIX 4.0D with the Compaq
7292 linker.
7293
05291fbc
AD
72942002-11-12 Akim Demaille <akim@epita.fr>
7295
7296 * Makefile.maint: Sync with Autoconf:
7297 (local_updates): New.
7298
1f5fd52e
AD
72992002-11-12 Akim Demaille <akim@epita.fr>
7300
7301 * po/POTFILES.in (src/lalr.c, src/state.c): Remove
7302
283f1e64
AD
73032002-11-12 Akim Demaille <akim@epita.fr>
7304
7305 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Display the
7306 locations.
7307
886b69d1
AD
73082002-11-12 Akim Demaille <akim@epita.fr>
7309
7310 * data/c.m4 (b4_yysymprint_generate): Pass *yyvaluep to YYPRINT,
7311 not yyvalue.
7312
3df37415
AD
73132002-11-12 Akim Demaille <akim@epita.fr>
7314
7315 * tests/actions.at (AT_CHECK_PRINTER_AND_DESTRUCTOR): New.
7316 Use it to test the GLR parser.
7317
7bd6c77e
AD
73182002-11-12 Akim Demaille <akim@epita.fr>
7319
7320 * tests/regression.at (input.y): s/YYEOF/MYEOF/, as the skeleton
7321 defines it.
7322 * data/glr.c (yystos): New.
7323 (b4_yysymprint_generate, b4_yydestruct_generate): Invoke.
7324 (YYDSYMPRINT): New.
7325 (yyval): Don't define it, it is handled via M4.
7326 (yyrecoverParseError): Free verbosely the discarded symbols.
7327 * data/yacc.c (yysymprint): Remove, rather...
7328 (b4_yysymprint_generate): invoke.
7329 * data/c.m4 (b4_yysymprint_generate): New.
7330 Accept pointers as arguments, as opposed to the version from
7331 yacc.c.
7332 (b4_yydestruct_generate): Likewise.
7333 * tests/cations.at (Printers and Destructors): Use Bison directives
7334 instead of CPP macros.
7335 Don't rely on internal details.
7336
b0400cc6
AD
73372002-11-12 Akim Demaille <akim@epita.fr>
7338
7339 * data/c.m4 (b4_yydestruct_generate, b4_symbol_actions): New.
7340 * data/yacc.c: Rename yychar1 as yytoken, as in glr.c.
7341 Don't work on yychar (i.e., do set it to YYEMPTY, don't match
7342 it against YYEMPTY and so forth), work on yytoken (i.e., set
7343 it to YYEMPTY etc.).
7344 (yydestruct): Replace with a b4_yydestruct_generate invocation.
7345 (b4_symbol_actions): Remove.
7346 * data/glr.c (YYTRANSLATE): As for yacc.c, if negative, it stands
7347 for 0, end-of-input.
7348
72f889cc
AD
73492002-11-12 Akim Demaille <akim@epita.fr>
7350
7351 * doc/bison.texinfo (Destructor Decl): New.
7352
b1ae9233
AD
73532002-11-12 Akim Demaille <akim@epita.fr>
7354
7355 * src/tables.c (tables_generate): Use free for pointers that
7356 cannot be NULL, not XFREE.
7357 (pack_vector): Use assert, not fatal, for bound violations.
7358 * src/state.c (state_new): Likewise.
7359 * src/reader.c (reader): Likewise.
7360 * src/lalr.c (set_goto_map): Likewise.
72f889cc 7361 * src/location.h (LOCATION_PRINT): If first_line is 0, just issue
b1ae9233
AD
7362 the file name.
7363
7ec2d4cd
AD
73642002-11-12 Akim Demaille <akim@epita.fr>
7365
7366 * src/scan-gram.l, src/reader.h (scanner_last_string_free):
7367 Restore.
7368 * src/scan-gram.l (last_string): Is global to the file, not to
7369 yylex.
7370 * src/parse-gram.y (input): Don't append the epilogue here,
7371 (epilogue.opt): do it here, and free the scanner's obstack.
7372 * src/reader.c (epilogue_set): Rename as...
7373 (epilogue_augment): this.
7374 * data/c.m4 (b4_epilogue): Defaults to empty.
7375
573a6cd3
AD
73762002-11-12 Akim Demaille <akim@epita.fr>
7377
7378 * src/getargs.c (long_options): Remove duplicates.
7379 * src/vmsgetargs.c, src/build.com, src/bison.cld, src/vmshlp.mar:
7380 Remove.
7381 * doc/bison.rnh: Remove.
7382 * doc/bison.texinfo (VMS Invocation): Remove.
7383
95612cfa
AD
73842002-11-12 Akim Demaille <akim@epita.fr>
7385
7386 * src/struniq.h, src/struniq.c (struniq_t): Is const.
7387 (STRUNIQ_EQ, struniq_assert, struniq_assert_p): New.
7388
7389 Use struniq for symbols.
7390
7391 * src/symtab.h (symbol_t): The tag member is a struniq.
7392 (symbol_type_set): Adjust.
7393 * src/symtab.c (symbol_new): Takes a struniq.
7394 (symbol_free): Don't free the tag member.
7395 (hash_compare_symbol_t, hash_symbol_t): Rename as...
7396 (hash_compare_symbol, hash_symbol): these.
7397 Use the fact that tags as struniqs.
7398 (symbol_get): Use struniq_new.
7399 * src/symlist.h, src/symlist.c (symbol_list_n_type_name_get):
7400 Returns a strniq.
7401 * src/reader.h (merger_list, grammar_currentmerge_set): The name
7402 and type members are struniqs.
7403 * src/reader.c (get_merge_function)
7404 (grammar_current_rule_merge_set): Adjust.
7405 (TYPE, current_type): Are struniq.
7406
7407 Use struniq for file names.
7408
7409 * src/files.h, src/files.c (infile): Split into...
7410 (grammar_file, current_file): these.
7411 * src/scan-gram.c (YY_USER_INIT, handle_syncline): Adjust.
7412 * src/reduce.c (reduce_print): Likewise.
7413 * src/getargs.c (getargs): Likewise.
7414 * src/complain.h, src/complain.c: Likewise.
7415 * src/main.c (main): Call struniqs_new early enough to use it for
7416 file names.
7417 Don't free the input file name.
7418
3e6656f9
AD
74192002-11-12 Akim Demaille <akim@epita.fr>
7420
7421 * src/symtab.c (symbol_free): Remove dead deactivated code:
7422 type_name are properly removed.
7423 Don't use XFREE to free items that cannot be NULL.
7424 * src/struniq.h, src/struniq.c: New.
7425 * src/main.c (main): Initialize/free struniqs.
7426 * src/parse-gram.y (%union): Add astruniq member.
7427 (yyprint): Adjust.
7428 * src/scan-gram.l (<{tag}>): Return a struniq.
7429 Free the obstack bit that used to store it.
7430 * src/symtab.h (symbol_t): The 'type_name' member is a struniq.
7431
7672019c
PE
74322002-11-11 Paul Eggert <eggert@twinsun.com>
7433
7434 Revamp to fix many (but not all) of the C- and M4-related quoting
7435 problems. Among other things, this fixes the Bison bug reported
7436 by Jan Hubicka when processing the Bash grammar; see:
161a71f3 7437 <http://lists.gnu.org/archive/html/bison-patches/2002-11/msg00039.html>
7672019c
PE
7438
7439 Use new @ escapes consistently. Represent brackets with @{ and @}
7440 rather than @<:@ and @:>@, since this works a bit better with dumb
7441 editors like vi. Represent @ with @@, since @ is now consistently
7442 an escape. Use @oline@ and @ofile@ rather than __oline__ and
7443 __ofile__, to avoid unexpected expansions. Similarly, use @output
7444 rather than #output.
7445
7446 * data/c.m4 (b4_copyright): Omit file name from comment, since
7447 the file name could contain "*/".
7448 (b4_synclines_flag): Don't quote the 2nd argument; it should already
7449 be quoted. All uses changed.
7450
7451 * data/glr.c: Use new @ escapes consistently.
7452 (b4_input_suffix, b4_output_parser_suffix, b4_output_parser_name,
7453 b4_output_header_suffix, b4_output_header_name, b4_header_guard):
7454 Remove, since they couldn't handle arbitrary characters in file
7455 names.
7456 * data/lalr1.cc: Likewise.
7457 * data/yacc.c: Likewise.
7458
7459 * src/files.c (output_infix): Remove; all uses removed.
7460 * src/files.h: Likewise.
7461
7462 * data/glr.c: Remove use of "#ifdef b4_header_guard", since it
7463 mishandled funny characters in file names, and anyway it isn't
7464 needed any more.
7465 * data/yacc.c: Likewise.
7466 * data/lalr1.cc: Use YYSLP_NEEDED instead of b4_header_guard.
7467
7468 * data/glr.c (YYSTYPE_IS_TRIVIAL): Define when the .h file would.
7469 * data/yacc.c: Likewise.
7470
7471 * src/muscle_tab.c: Include quotearg.h, since we need to quote C
7472 strings now.
7473 (muscle_init): Quote filename as a C string.
7474 * src/muscle_tab.h (MUSCLE_GROW_STRING_PAIR): Remove; unused.
7475 (MUSCLE_OBSTACK_SGROW, MUSCLE_INSERT_C_STRING): New macros.
7476 * src/output.c (escaped_file_name_output): New function.
7477 (prepare_symbols): Quote tokens for M4.
7478 (prepare): Don't insert output_infix, output_prefix,
7479 output_parser_name, output_header_name; this is now down by scan-skel.
7480 Insert skeleton as a C string.
7481
7482 * src/output.c (user_actions_output, symbol_destructors_output,
7483 symbol_printers_output): Quote filenames for C and M4.
7484 * src/reader.c (prologue_augment, epilogue_set): Likewise.
7485
7486 * src/scan-gram.l (<SC_CHARACTER>): Don't worry about any backslash
7487 escapes other than \\ and \'; this simplifies the code.
7488 (<SC_STRING>): Likewise, for \\ and \".
7489 (<SC_COMMENT,SC_LINE_COMMENT,SC_STRING,SC_CHARACTER,SC_BRACED_CODE,
7490 SC_PROLOGUE,SC_EPILOGUE>): Escape $ and @, too.
7491 Use new escapes @{ and @} for [ and ].
7492
7493 * src/scan-skel.l (yylineno, yyoutname): Remove static vars, replacing
7494 them with auto vars.
7495 Switch to new escape scheme, where @ is the escape character uniformly.
7496 Abort if a stray escape character is found. Avoid unbounded input
7497 buffer when parsing non-escaped text.
7498
7499 * tests/input.at (Torturing the Scanner): Add tests that @oline@,
7500 __oline__, #output, $@, and @{ do not have unintended meanings.
7501
acea4f3b
PE
75022002-11-09 Paul Eggert <eggert@twinsun.com>
7503
7504 Fix the test failure due to GCC warnings described in
161a71f3 7505 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00000.html>.
acea4f3b
PE
7506 * data/glr.c (yyis_pact_ninf, yyis_table_ninf): New macros, which
7507 evaluate to 0 if it's impossible for NINF to be in the respective
7508 table.
7509 (yygetLRActions, yyrecoverParseError): Use them.
7510
7511 * src/scan-gram.l (unexpected_end_of_file): Fix bug: columns were
7512 counted in the token inserted at end of file. Now takes
7513 location_t *, not location_t, so that the location can be
7514 adjusted. All uses changed.
7515
7516 * tests/regression.at (Invalid inputs): Adjust wording in
7517 diagnostic to match the new behavior.
7518
7519 * tests/torture.at (AT_DATA_TRIANGULAR_GRAMMAR,
7520 AT_DATA_HORIZONTAL_GRAMMAR, AT_DATA_LOOKAHEADS_GRAMMAR,
7521 AT_DATA_STACK_TORTURE): Replace `assert (x);' with `if (! (x))
7522 abort ();'. This reduces the runtime of the "Many lookaheads"
7523 test from 27.6 to 2.7 minutes on a 440 MHz Ultrasparc III running
7524 GCC 3.2.
7525
20ef1ad5
PE
75262002-11-07 Paul Eggert <eggert@twinsun.com>
7527
7528 * src/parse-gram.y (CHARACTER): Remove unused token.
7529 All uses removed.
7530
7531 * src/scan-gram.l: Remove stack option. We no longer use the
7532 stack, since the stack was never deeper than 1; instead, use the
7533 new auto var c_context to record the stacked value.
7534
7535 Remove nounput option. At an unexpected end of file, we now unput
7536 the minimal input necessary to end cleanly; this simplifies the
7537 code.
7538
7539 Avoid unbounded token sizes where this is easy.
7540
7541 (unexpected_end_of_file): New function.
7542 Use it to systematize the error message on unexpected EOF.
7543 (last-string): Now auto, not static.
7544 (YY_OBS_FREE): Remove unnecessary do while (0) wrapper.
7545 (scanner_last_string_free): Remove; not used.
7546 (percent_percent_count): Move decl to just before use.
7547 (SC_ESCAPED_CHARACTER): Return ID at unexpected end of file,
7548 not the (never otherwised-used) CHARACTER.
7549
93724f13
AD
75502002-11-07 Akim Demaille <akim@epita.fr>
7551
7552 Let yyerror always receive the msg as last argument, so that
7553 yyerror can be variadic.
7554
7555 * data/yacc.c (b4_yyerror_args): New.
7556 Use it when calling yyerror.
7557 * data/glr.c (b4_yyerror_args, b4_lyyerror_args): New.
7558 Use it when calling yyerror.
7559 * doc/bison.texinfo (Error Reporting): Adjust.
7560 * tests/calc.at (_AT_DATA_CALC_Y): Adjust.
7561 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Adjust.
7562
6e40b4eb
AD
75632002-11-06 Akim Demaille <akim@epita.fr>
7564
7565 #line should have quoted strings.
7566 Ideally, this should be done by m4_quotearg.
7567
7568 * src/scan-skel.l: Include quotearg.h.
7569 Quote __ofile__.
7570 * src/output.c (symbol_printers_output)
7571 (symbol_destructors_output): Quote the file name.
7572
2dfbfc12
AD
75732002-11-06 Akim Demaille <akim@epita.fr>
7574
7575 * tests/regression.at (Invalid inputs): Adjust to the recent
7576 messages.
7577
437c2d80
AD
75782002-11-06 Akim Demaille <akim@epita.fr>
7579
7580 Restore --no-lines.
7581 Reported by Jim Kent.
7582
7583 * data/c.m4 (b4_syncline): New.
7584 * data/glr.c, data/yacc.c, data/lalr1.cc: Use it.
7585 * src/reader.c (prologue_augment, epilogue_set): Use b4_syncline.
7586 * src/output.c (user_actions_output): Likewise.
7587 (prepare): Define 'b4_synclines_flag'.
2dfbfc12 7588 * src/muscle_tab.c (muscle_init): Don't define b4_linef.
437c2d80 7589
900c5db5
AD
75902002-11-06 Akim Demaille <akim@epita.fr>
7591
7592 * src/main.c (main): Free `infile'.
7593 * src/scan-gram.l (handle_syncline): New.
7594 Recognize `#line'.
7595 * src/output.c (user_actions_output, symbol_destructors_output)
7596 (symbol_printers_output): Use the location's file name, not
7597 infile.
7598 * src/reader.c (prologue_augment, epilogue_set): Likewise.
7599
e183b123 76002002-11-05 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
51b4a04c 7601
e183b123 7602 * src/tables.c (matching_state): Don't allow states to match if
51b4a04c 7603 either has GLR conflict entries.
e183b123 7604
193eb6b7
PE
76052002-11-05 Paul Eggert <eggert@twinsun.com>
7606
e183b123
PE
7607 * src/scan-gram.l: Use more accurate diagnostics, e.g.
7608 "integer out of range" rather than "invalid value".
7609 * tests/input.at (Invalid $n, Invalid @n): Change expected wording
7610 accordingly.
7611
193eb6b7
PE
7612 Scan <% and %> digraphs in C code as POSIX 1003.1-2001 requires.
7613 Also, remove one static variable in the scanner.
7614
7615 * src/scan-gram.l (braces_level): Now auto, not static.
7616 Initialize to zero if the compiler is being picky.
7617 (INITIAL): Clear braces_level instead of incrementing it.
7618 (SC_BRACED_CODE): Treat <% and %> as { and } when inside C code,
7619 as POSIX 1003.1-2001 requires.
7620 * src/system.h (IF_LINT): New macro, taken from coreutils.
7621 * configure.ac: Define "lint" if --enable-gcc-warnings.
7622
29c01725
AD
76232002-11-05 Akim Demaille <akim@epita.fr>
7624
7625 * src/scan-gram.l: When it starts with `%', complain about the
7626 whole directive, not just that `invalid character: %'.
7627
8aeac3ca
AD
76282002-11-04 Akim Demaille <akim@epita.fr>
7629
7630 * Makefile.maint: Update from Autoconf.
7631 (update, cvs-update, po-update, do-po-update): New.
7632
793a58bb
AD
76332002-11-04 Akim Demaille <akim@epita.fr>
7634
7635 * tests/glr-regr1.at (Badly Collapsed GLR States): Prototype yylex
7636 and yyerror.
7637 Have yyerror `use' its arguments.
7638 * tests/calc.at (AT_CHECK_PUSHDEFS): AT_YYERROR_SEES_LOC_IF
7639 returns true when location & yacc & pure & parse-param.
7640 (_AT_DATA_CALC_Y): Let yyerror ``use'' its arguments.
7641
c4d720cd
AD
76422002-11-04 Akim Demaille <akim@epita.fr>
7643
7644 * src/location.h (LOCATION_PRINT): Use quotearg slot 3 to avoid
7645 clashes.
7646 * src/scan-gram.l: Use [\'] instead of ['] to pacify
7647 font-lock-mode.
7648 Use complain_at.
7649 Use quote, not quote_n since LOCATION_PRINT no longer uses the
7650 slot 0.
7651
613a0dc5
PE
76522002-11-03 Paul Eggert <eggert@twinsun.com>
7653
7654 * src/reader.c (get_merge_function, grammar_current_rule_check):
7655 Use consistent diagnostics for reporting type name clashes.
7656 Quote the types with <>, for consistency with Yacc.
7657 * tests/input.at (Type Clashes): Adjust to diagnostic changes.
7658
2a8d363a
AD
76592002-11-03 Akim Demaille <akim@epita.fr>
7660
7661 * data/c.m4 (b4_identification, b4_user_args, b4_parse_param):
7662 New.
7663 * data/yacc.m4 (b4_pure_args, b4_Pure_args): New.
7664 (b4_parse_param): Remove.
7665 Use b4_identification.
7666 Propagate b4_pure_args where needed to pass them to yyerror.
7667 * data/glr.m4 (b4_parse_param): Remove.
7668 (b4_user_formals, b4_pure_args, b4_pure_formals, b4_lpure_args)
7669 (b4_lpure_formals): New.
7670 Use b4_identification.
7671 (YY_USER_FORMALS, YY_USER_ARGS): Remove, replaced by
7672 b4_user_formals and b4_user_args.
7673 (yyexpandGLRStack, yyFail, yyaddDeferredAction, yyglrShiftDefer)
7674 (yyreportAmbiguity): When using a pure parser, also need
7675 the location, and the parse-params.
7676 Adjust callers.
7677 (yyuserAction, yyglrShift, yyreportParseError, yyrecoverParseError):
7678 When using a pure parser, also need the parse-params.
7679 Adjust callers.
7680 * tests/calc.at: Test pure (%pure-parser) and absolutely pure
7681 (%pure-parser + %parse-param) LALR and GLR parsers.
7682 (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): New, define AT_PARAM_IF,
7683 AT_LOCATION_IF, AT_PURE_IF, AT_GLR_IF, AAT_PURE_AND_LOC_IF,
7684 AT_GLR_OR_PARAM_IF, AT_YYERROR_ARG_LOC_IF, AT_YYERROR_SEES_LOC_IF.
7685 (_AT_DATA_CALC_Y): Equip for purity of yyerror.
7686 (_AT_CHECK_CALC_ERROR): Use AT_YYERROR_SEES_LOC_IF.
7687 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Equip for yyerror purity.
7688 * doc/bison.texinfo: Untabify the whole file.
7689 (Parser Function): Document %parse-param, deprecate YYPARSE_PARAM.
7690 (Pure Calling): Document %lex-param, deprecate YYLEX_PARAM.
7691 (Error Reporting): Adjust to these new directives.
7692 Document %error-verbose, deprecate YYERROR_VERBOSE.
7693
9e32add8
AD
76942002-11-03 Akim Demaille <akim@epita.fr>
7695
7696 * tests/calc.at: Change all the AT_CHECK_CALC_LALR and
7697 AT_CHECK_CALC_GLR invocations to use % directives, instead of
7698 command line options.
7699 * tests/cxx-type.at: Formatting changes.
7700
b02d90a5
PE
77012002-11-03 Paul Eggert <eggert@twinsun.com>
7702
7703 * src/scan-gram.l: Revamp to fix POSIX incompatibilities,
7704 to count columns correctly, and to check for invalid inputs.
9e32add8 7705
b02d90a5
PE
7706 Use mbsnwidth to count columns correctly. Account for tabs, too.
7707 Include mbswidth.h.
7708 (YY_USER_ACTION): Invoke extend_location rather than LOCATION_COLUMNS.
7709 (extend_location): New function.
7710 (YY_LINES): Remove.
7711
7712 Handle CRLF in C code rather than in Lex code.
7713 (YY_INPUT): New macro.
7714 (no_cr_read): New function.
7715
7716 Scan UCNs, even though we don't fully handle them yet.
7717 (convert_ucn_to_byte): New function.
7718
7719 Handle backslash-newline correctly in C code.
7720 (SC_LINE_COMMENT, SC_YACC_COMMENT): New states.
7721 (eols, blanks): Remove. YY_USER_ACTION now counts newlines etc.;
7722 all uses changed.
7723 (tag, splice): New EREs. Do not allow NUL or newline in tags.
7724 Use {splice} wherever C allows backslash-newline.
7725 YY_STEP after space, newline, vertical-tab.
7726 ("/*"): BEGIN SC_YACC_COMMENT, not yy_push_state (SC_COMMENT).
9e32add8 7727
b02d90a5
PE
7728 (letter, id): Don't assume ASCII; e.g., spell out a-z.
7729
7730 ({int}, handle_action_dollar, handle_action_at): Check for integer
7731 overflow.
9e32add8 7732
b02d90a5
PE
7733 (YY_STEP): Omit trailing semicolon, so that it's more like C.
7734
7735 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>): Allow \0 and \00
7736 as well as \000. Check for UCHAR_MAX, not 255.
7737 Allow \x with an arbitrary positive number of digits, as in C.
7738 Check for overflow here.
7739 Allow \? and UCNs, for compatibility with C.
7740
7741 (handle_symbol_code_dollar): Use quote_n slot 1 to avoid collision
7742 with quote slot used by complain_at.
7743
7744 * tests/input.at: Add tests for backslash-newline, m4 quotes
7745 in symbols, long literals, and funny escapes in strings.
7746
7747 * configure.ac (jm_PREREQ_MBSWIDTH): Add.
7748 * lib/Makefile.am (libbison_a_SOURCES): Add mbswidth.h, mbswidth.c.
7749 * lib/mbswidth.h, lib/mbswidth.c: New files, from GNU gettext.
7750 * m4/Makefile.am (EXTRA_DIST): Add mbswidth.m4.
7751 * m4/mbswidth.m4: New file, from GNU coreutils.
7752
7753 * doc/bison.texinfo (Grammar Outline): Document // comments.
7754 (Symbols): Document that trigraphs have no special meaning in Bison,
7755 nor is backslash-newline allowed.
7756 (Actions): Document that trigraphs have no special meaning.
7757
7758 * src/location.h (LOCATION_COLUMNS, LOCATION_LINES): Remove;
7759 no longer used.
7760
77612002-11-02 Paul Eggert <eggert@twinsun.com>
7762
7763 * src/reader.c: Don't include quote.h; not needed.
7764 (get_merge_function): Reword warning to be consistent with
7765 type clash diagnostic in grammar_current_rule_check.
7766
7767 * lib/quotearg.c (quotearg_buffer_restyled): Fix off-by-two
7768 bug in trigraph handling.
7769
7770 * src/output.c (prepare_symbols): When printing token names,
7771 escape "[" as "@<:@" and likewise for "]".
7772
7773 * src/system.h (errno): Remove declaration, as we are now
7774 assuming C89 or better, and C89 guarantees errno.
7775
762b212b
PE
77762002-10-30 Paul Eggert <eggert@twinsun.com>
7777
7778 * lib/bitset_stats.c (bitset_stats_read, bitset_stats_write):
7779 Check for close failures.
7780 * src/files.h (xfclose): Return void, not int, since it always
7781 returned zero.
7782 * src/files.c (xfclose): Likewise. Report I/O error if ferror
7783 indicates one.
7784 * src/output.c (output_skeleton): Use xfclose rather than fclose
7785 and ferror. xfclose now checks ferror.
7786
7787 * data/glr.c (YYLEFTMOST_STATE): Remove.
7788 (yyreportTree): Use a stack-based leftmost state. This avoids
7789 our continuing battles with bogus warnings about initializers.
7790
56100c60
AD
77912002-10-30 Akim Demaille <akim@epita.fr>
7792
7793 * src/system.h: Don't use #ifdef/#ifndef on HAVE_ values, only
7794 #if.
7795
51b4a04c
PH
77962002-10-29 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
7797
7798 * tests/glr-regr1.at: New test for reported regressions.
7799 * tests/testsuite.at: Add glr-regr1.at test.
7800 * tests/Makefile.am: Add glr-regr1.at test.
e183b123 7801
bf1ebda2
PE
78022002-10-24 Paul Eggert <eggert@twinsun.com>
7803
5c16c6b1
PE
7804 Version 1.75a.
7805
bf1ebda2
PE
7806 * tests/calc.at (_AT_DATA_CALC_Y): Remove unused strcat declaration.
7807 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Include stdlib.h, since
7808 we use malloc. Don't assume 'A' through 'Z' are contiguous.
7809 Don't assume strdup exists; POSIX says its an XSI extension.
7810 Check for buffer overflow on input.
7811
b526ee61
AD
78122002-10-24 Akim Demaille <akim@epita.fr>
7813
7814 * src/output.c (output_skeleton): Don't disable M4sugar comments
7815 too soon: it results in comments being expanded.
7816 * data/yacc.c, data/glr.c, data/lalr1.cc: Do it right before the
7817 first output.
7818
f1886bb2
AD
78192002-10-24 Akim Demaille <akim@epita.fr>
7820
7821 * data/yacc.c (m4_int_type): New.
7822 * data/c.m4 (m4_int_type): Don't use yysigned_char, but `signed
7823 char' as only yacc.c wants K&R portability.
7824 * data/glr.c (yysigned_char): Remove.
7825 * data/lalr1.cc: Rename the trailing b4_name as b4_parser_class_name.
7826 Reported by Quoc Peyrot.
7827
c5576256
PE
78282002-10-23 Paul Eggert <eggert@twinsun.com>
7829
7830 * src/main.c (main): With --trace=time, report times even if a
7831 non-fatal error occurs. Formerly, the times were reported in some
7832 such cases but not in others.
7833 * src/reader.c (reader): Just return if a complaint has been issued,
7834 instead of exiting, so that 'main' can report times.
7835
27b0ffea
AD
78362002-10-22 Akim Demaille <akim@epita.fr>
7837
7838 * src/system.h: Include sys/types.
7839 Reported by Bert Deknuydt.
7840
223a7883
PE
78412002-10-23 Paul Eggert <eggert@twinsun.com>
7842
7843 * configure.ac (AC_PROG_LEX): Use instead of AM_PROG_LEX.
7844 Suggested by Art Haas.
7845
78462002-10-22 Paul Eggert <eggert@twinsun.com>
7847
7848 * src/complain.c (exit) [! (STDC_HEADERS || _LIBC)]: Remove exit
7849 decl; not needed any more.
7850 * src/main.c (main): Use return to exit, undoing yesterday's change.
7851 The last OS that we could find where this wouldn't work is
7852 SunOS 3.5, and that's too old to worry about now.
7853
7854 * data/glr.c (struct yyltype): Define members even when not
7855 doing locations. This is more consistent with yacc.c, and it
7856 works around the following bug reports:
161a71f3
PE
7857 http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00106.html
7858 http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00111.html
27b0ffea 7859
223a7883
PE
7860 * doc/bison.texinfo: Minor spelling and typographical fixes. Use
7861 @acronym consistently. Standardize on "Yacc" instead of "YACC",
7862 "Algol" instead of "ALGOL". Give a bit more history about BNF.
7863
8b76775a
AD
78642002-10-22 Akim Demaille <akim@epita.fr>
7865
7866 * data/README: New.
7867
6db10d14
PE
78682002-10-21 Paul Eggert <eggert@twinsun.com>
7869
7870 Be consistent about 'bool'; the old code used an enum in one
7871 module and an int in another, and this violates the C standard.
7872 * m4/stdbool.m4: New file, from coreutils 4.5.3.
7873 * configure.ac (AC_HEADER_STDBOOL): Add.
7874 * m4/Makefile.am (EXTRA_DIST): Add stdbool.m4.
7875 * src/muscle_tab.c (hash_compare_muscles): (a ? FALSE : TRUE) -> (! a)
7876 * src/symtab.c (hash_compare_symbol_t): Likewise.
7877 * src/system.h (bool, false, true): Use a definition consistent
7878 with ../lib/hash.c. All uses changed.
7879
7880 * src/complain.c (warning_issued): Renamed from warn_message_count,
7881 so that we needn't worry about integer overflow (!).
7882 Now of type bool. All uses changed.
7883 (complaint_issued): Renamed from complain_message_count; likewise.
7884
7885 * src/main.c (main): Use exit to exit with failure.
27b0ffea 7886
6db10d14
PE
7887 * src/complain.c (fatal_at, fatal): Use EXIT_FAILURE and EXIT_SUCCESS
7888 rather than 1 and 0.
7889 * src/main.c (main): Likewise.
7890 * src/getargs.c (getargs): Likewise.
7891 * src/reader.c (reader): Likewise.
7892
7893 * src/getarg.c (getargs): Remove duplicate code for
7894 "Try `bison --help'".
7895
7896 * src/files.c (xfopen, xfclose): Use EXIT_FAILURE rather than 2.
7897 What was that "2" for?
7898
7899 * src/complain.h (fatal, fatal_at): Add __attribute__((__noreturn__)).
7900 * src/getargs.c (usage): Likewise.
7901
7902 * src/getargs.c (getargs): When there are too few operands, report
7903 the last one. When there are too many, report the first extra
7904 one. This is how diffutils does it.
7905
92a060fd
PE
79062002-10-20 Paul Eggert <eggert@twinsun.com>
7907
7908 Remove K&R vestiges.
7909 * configure.ac (AC_C_CONST, AM_C_PROTOTYPES): Remove.
7910 * src/complain.c (VA_START): Remove. Assume prototypes.
7911 (vfprintf) [! (HAVE_VPRINTF || defined vfprintf)]: New macro.
7912 (private_strerror, warn_at, warn, complain_at, complain, fatal_at,
7913 fatal): Assume prototypes.
7914 * src/complain.h: Assume prototypes.
7915 * src/system.h (PARAMS): Remove.
7916 Include <limits.h> unconditionally, since it's guaranteeed even
7917 for a freestanding C89 compiler.
7918 (SHRT_MIN, SHRT_MAX): Remove, since C89 guarantees them.
7919 * src/vmsgetargs.c (getargs, cli_present, cli_get_value): Prototype.
8b76775a 7920
e7cb57c0
AD
79212002-10-20 Akim Demaille <akim@epita.fr>
7922
7923 * src/muscle_tab.c (muscle_grow): Remove trailing debugging code.
7924 * data/glr.c (YY_USER_FORMALS, YY_USER_ARGS): New.
7925 (yyuserAction, yydoAction, yyglrReduce, yyresolveValue)
7926 (yyresolveStates, yyresolveAction, yyresolveStack)
7927 (yyprocessOneStack): Use them.
7928 (yy_reduce_print): New.
7929 * tests/calc.at (_AT_DATA_CALC_Y): Exercise %parse-param.
7930
0245f82d
AD
79312002-10-20 Akim Demaille <akim@epita.fr>
7932
7933 * data/c.m4 (b4_c_ansi_args): Recognize functions with no
7934 arguments and output `void'.
7935 (b4_c_function): Rename as...
7936 (b4_c_function_def): this.
7937 (b4_c_function_decl, b4_c_ansi_function_def)
7938 (b4_c_ansi_function_decl): New.
7939 Change the interpretation of the arguments: before `int, foo', now
7940 `int foo, foo'.
7941 * data/yacc.c (yyparse): Prototype and define thanks to these.
7942 Adjust b4_c_function_def uses.
7943 * data/glr.c (yyparse): Likewise, but ANSI only.
7944
39912f52
AD
79452002-10-20 Akim Demaille <akim@epita.fr>
7946
7947 * src/output.c (prepare): Move the definition of `tokens_number',
7948 `nterms_number', `undef_token_number', `user_token_number_max'
7949 to...
7950 (prepare_tokens): Here.
7951 (prepare_tokens): Rename as...
7952 (prepare_symbols): this.
7953 (prepare): Move the definition of `rules_number' to...
7954 (prepare_rules): here.
7955 (prepare): Move the definition of `last', `final_state_number',
7956 `states_number' to...
7957 (prepare_states): here.
7958 * data/yacc.c, data/lalr1.cc, data/glr.c: Normalize `>' into `<'.
7959
20c1e2ad
AD
79602002-10-20 Akim Demaille <akim@epita.fr>
7961
7962 * src/tables.h, src/tables.c, src/output.c: Comment changes.
7963
21964f43
AD
79642002-10-20 Akim Demaille <akim@epita.fr>
7965
7966 * data/yacc.c, data/yacc.c (b4_location_if, b4_pure_if): Move to...
7967 * data/c.m4: here.
7968
66d30cd4
AD
79692002-10-20 Akim Demaille <akim@epita.fr>
7970
7971 * src/output.c (prepare): Use MUSCLE_INSERT_STRING.
7972 * src/muscle_tab.c (muscle_pair_list_grow): Rename `val as
7973 `pair'.
7974 (muscle_init): Move the `b4_ltype', `b4_maxdepth', `b4_initdepth',
7975 `name' to...
7976 * data/glr.c, data/lalr1.cc, data/yacc.c (b4_location_type)
7977 (b4_stack_depth_init, b4_stack_depth_max, b4_parser_class_name):
7978 These.
7979
95f2c9fe
PE
79802002-10-19 Paul Eggert <eggert@twinsun.com>
7981
7982 Do not create a temporary file, as that involves security and
7983 cleanup headaches. Instead, use a pair of pipes.
7984 Derived from a suggestion by Florian Krohm.
7985 * lib/subpipe.c, lib/subpipe.h, m4/subpipe.m4: New files.
7986 * lib/mkstemp.c, lib/readpipe.c, lib/tempname.c, m4/mkstemp.m4: Remove.
7987 * configure.ac (UTILS_FUNC_MKSTEMP, jm_PREREQ_TEMPNAME): Remove.
7988 (BISON_PREREQ_SUBPIPE): Add.
7989 * lib/Makefile.am (libbison_a_SOURCES): Remove readpipe.c.
7990 Add subpipe.h, subpipe.c.
7991 * m4/Makefile.am (EXTRA_DIST): Remove mkstemp.m4. Add subpipe.m4.
7992 * po/POTFILES.in: Add lib/subpipe.c.
7993 * src/output.c: Include "subpipe.h".
7994 (m4_invoke): Remove decl.
7995 (scan_skel): New decl.
7996 (output_skeleton): Use pipe rather than temporary file for m4 input.
7997 Check that m4sugar.m4 is readable, to avoid deadlock.
7998 Check for pipe I/O error.
7999 * src/scan-skel.l (readpipe): Remove decl.
8000 (scan_skel): New function, to be used in place of m4_invoke.
8001 Read from stream rather than file.
66d30cd4 8002
95f2c9fe
PE
8003 * lib/timevar.c (TICKS_TO_MSEC, CLOCKS_TO_MSEC): Do not cast to
8004 float, as this generates a warning on Solaris 8 + GCC 3.2 with
8005 --enable-gcc-warnings. Instead, divide into 1.0 rather than 1;
8006 this generates a more-accurate value anyway.
8007
8008 * lib/timevar.c (timervar_accumulate): Rename locals to
8009 avoid confusion with similarly-named more-global.
8010 * src/muscle_tab.c (muscle_pair_list_grow): Likewise.
8011
8012 * src/output.c (prepare): Use xstrdup to convert char const *
8013 to char *, to avoid GCC warning.
8014
c19988b7
AD
80152002-10-19 Akim Demaille <akim@epita.fr>
8016
8017 * tests/calc.at (_AT_DATA_CALC_Y): Define VAL, LOC, LEX_FORMALS,
8018 LEX_PRE_FORMALS, LEX_ARGS, LEX_PRE_ARGS, USE_LEX_ARGS.
8019 Use them to have `calc.y' ready for %pure-parser.
8020 * data/yacc.c (YYLEX): Pass a yylex return type to
8021 b4_c_function_call.
8022
ae7453f2
AD
80232002-10-19 Akim Demaille <akim@epita.fr>
8024
8025 Prototype support of %lex-param and %parse-param.
8026
8027 * src/parse-gram.y: Add the definition of the %lex-param and
8028 %parse-param tokens, plus their rules.
8029 Drop the `_' version of %glr-parser.
8030 Add the "," token.
8031 * src/scan-gram.l (INITIAL): Scan them.
8032 * src/muscle_tab.c: Comment changes.
8033 (muscle_insert, muscle_find): Rename `pair' as `probe'.
8034 * src/muscle_tab.h (MUSCLE_INSERT_PREFIX): Remove unused.
8035 (muscle_entry_s): The `value' member is no longer const.
8036 Adjust all dependencies.
8037 * src/muscle_tab.c (muscle_init): Adjust: use
8038 MUSCLE_INSERT_STRING.
8039 Initialize the obstack earlier.
8040 * src/muscle_tab.h, src/muscle_tab.c (muscle_grow)
8041 (muscle_pair_list_grow): New.
8042 * data/c.m4 (b4_c_function_call, b4_c_args): New.
8043 * data/yacc.c (YYLEX): Use b4_c_function_call to honor %lex-param.
8044 * tests/calc.at: Use %locations, not --locations.
8045 (AT_CHECK_CALC_GLR): Use %glr-parser, not %glr_parser.
8046
0e575721
AD
80472002-10-19 Akim Demaille <akim@epita.fr>
8048
8049 * src/getargs.c (usage): Take status as argument and exit
8050 accordingly.
8051 Report the traditional `Try ... --help' message when status != 0.
8052 (usage, version): Don't take a FILE * as arg, it is pointless.
8053 (getargs): When there is an incorrect number of arguments, make it
8054 an error, and report it GNUlically thanks to `usage ()'.
8055
724ce7f5
PE
80562002-10-18 Paul Eggert <eggert@twinsun.com>
8057
3a781eb2
PE
8058 * data/glr.c (yyreportParseError): Don't assume that sprintf
8059 yields the length of the printed string, as this is not true
8060 on SunOS 4.1.4. Reported by Peter Klein.
8061
724ce7f5
PE
8062 * tests/calc.at (_AT_DATA_CALC_Y): #undef memcmp and realloc.
8063 * tests/conflicts.at (%nonassoc and eof): Likewise.
8064 Fixes SunOS 4.1.4 test failure reported by Peter Klein.
8065
473d0a75
AD
80662002-10-17 Akim Demaille <akim@epita.fr>
8067
8068 * src/getargs.h (trace_e): Add trace_scan, and trace_parse.
8069 * src/getargs.c (trace_types, trace_args): Adjust.
8070 * src/reader.c (grammar_current_rule_prec_set)
8071 (grammar_current_rule_dprec_set, grammar_current_rule_merge_set):
8072 Standardize error messages.
8073 And s/@prec/%prec/!
8074 (reader): Use trace_flag to enable scanner/parser debugging,
8075 instead of an adhoc scheme.
8076 * src/scan-gram.l: Remove trailing debugging code.
8077
e76d2469
PE
80782002-10-16 Paul Eggert <eggert@twinsun.com>
8079
93e2236a
PE
8080 * src/muscle_tab.h (MUSCLE_TAB_H_): Was misspelled as
8081 MUSCLE_TAB_H.
8082
e76d2469
PE
8083 * NEWS: Officially drop support for building Bison with K&R C,
8084 since it didn't work anyway and it's not worth worrying about.
8085 * Makefile.maint (wget_files): Remove ansi2knr.c.
8086 (ansi2knr.c-url_prefix): Remove.
8087 * lib/.cvsignore: Remove ansi2knr, ansi2knr.*.
8088 * lib/Makefile.am (AUTOMAKE_OPTIONS): Remove.
8089 * src/Makefile.am (AUTOMAKE_OPTIONS): Remove.
8090
5bd1c419
PE
80912002-10-15 Paul Eggert <eggert@twinsun.com>
8092
8093 Stop using the "enum_" trick for K&R-style function definitions;
8094 it confused me, and I was the author! Instead, assume that people
8095 who want to use K&R C compilers (when using these modules in GCC,
8096 perhaps?) will run ansi2knr.
8097
8098 * lib/bbitset.h: (enum_bitset_ops, enum_bitset_type): Remove.
8099 All uses of "enum_" changed to "enum ".
8100 * lib/ebitset.c (enum_ebitset_find_mode): Likewise.
8101 * lib/lbitset.c (enum_lbitset_find_mode): Likewise.
e76d2469 8102
5bd1c419
PE
8103 * lib/abitset.c (abitset_and, abitset_and_cmp, abitset_and_or,
8104 abitset_and_or_cmp, abitset_andn, abitset_andn_cmp,
8105 abitset_andn_or, abitset_andn_or_cmp, abitset_bytes, abitset_copy,
8106 abitset_copy1, abitset_disjoint_p, abitset_empty_p,
8107 abitset_equal_p, abitset_init, abitset_list, abitset_list_reverse,
8108 abitset_not, abitset_ones, abitset_or, abitset_or_and,
8109 abitset_or_and_cmp, abitset_or_cmp, abitset_reset, abitset_set,
8110 abitset_size, abitset_small_list, abitset_subset_p, abitset_test,
8111 abitset_unused_clear, abitset_xor, abitset_xor_cmp, abitset_zero):
8112 Use function prototypes; this removes the need for declaring
8113 static functions simply to provide their prototypes.
8114 * lib/bitset.c (bitset_alloc, bitset_and_or_, bitset_and_or_cmp_,
8115 bitset_andn_or_, bitset_andn_or_cmp_, bitset_bytes, bitset_copy_,
8116 bitset_count_, bitset_create, bitset_dump, bitset_first,
8117 bitset_free, bitset_init, bitset_last, bitset_next,
8118 bitset_obstack_alloc, bitset_obstack_free, bitset_only_set_p,
8119 bitset_op4_cmp, bitset_or_and_, bitset_or_and_cmp_, bitset_prev,
8120 bitset_print, bitset_release_memory, bitset_toggle_,
8121 bitset_type_choose, bitset_type_get, bitset_type_name_get,
8122 debug_bitset): Likewise.
8123 * lib/bitset.h (bitset_set, bitset_reset, bitset_test): Likewise.
8124 * lib/bitset_stats.c (bitset_log_histogram_print,
8125 bitset_percent_histogram_print, bitset_stats_and,
8126 bitset_stats_and_cmp, bitset_stats_and_or,
8127 bitset_stats_and_or_cmp, bitset_stats_andn, bitset_stats_andn_cmp,
8128 bitset_stats_andn_or, bitset_stats_andn_or_cmp, bitset_stats_copy,
8129 bitset_stats_count, bitset_stats_disable, bitset_stats_disjoint_p,
8130 bitset_stats_dump, bitset_stats_empty_p, bitset_stats_enable,
8131 bitset_stats_equal_p, bitset_stats_free, bitset_stats_init,
8132 bitset_stats_list, bitset_stats_list_reverse, bitset_stats_not,
8133 bitset_stats_ones, bitset_stats_or, bitset_stats_or_and,
8134 bitset_stats_or_and_cmp, bitset_stats_or_cmp, bitset_stats_print,
8135 bitset_stats_print_1, bitset_stats_read, bitset_stats_reset,
8136 bitset_stats_set, bitset_stats_size, bitset_stats_subset_p,
8137 bitset_stats_test, bitset_stats_toggle, bitset_stats_type_get,
8138 bitset_stats_write, bitset_stats_xor, bitset_stats_xor_cmp,
8139 bitset_stats_zero): Likewise.
8140 * lib/bitsetv.c (bitsetv_alloc, bitsetv_create, bitsetv_free,
8141 bitsetv_zero, bitsetv_ones, bitsetv_transitive_closure,
8142 bitsetv_dump, debug_bitsetv): Likewise.
8143 * lib/ebitset.c (ebitset_and, ebitset_and_cmp, ebitset_andn,
8144 ebitset_andn_cmp, ebitset_bytes, ebitset_copy, ebitset_copy_,
8145 ebitset_copy_cmp, ebitset_disjoint_p, ebitset_elt_add,
8146 ebitset_elt_alloc, ebitset_elt_calloc, ebitset_elt_find,
8147 ebitset_elt_free, ebitset_elt_last, ebitset_elt_remove,
8148 ebitset_elt_zero_p, ebitset_elts_grow, ebitset_empty_p,
8149 ebitset_equal_p, ebitset_free, ebitset_init, ebitset_list,
8150 ebitset_list_reverse, ebitset_not, ebitset_ones, ebitset_op3_cmp,
8151 ebitset_or, ebitset_or_cmp, ebitset_release_memory, ebitset_reset,
8152 ebitset_set, ebitset_size, ebitset_subset_p, ebitset_test,
8153 ebitset_weed, ebitset_xor, ebitset_xor_cmp, ebitset_zero):
8154 Likewise.
8155 * lib/lbitset.c (debug_lbitset, lbitset_and, lbitset_and_cmp,
8156 lbitset_andn, lbitset_andn_cmp, lbitset_bytes, lbitset_copy,
8157 lbitset_copy_cmp, lbitset_disjoint_p, lbitset_elt_alloc,
8158 lbitset_elt_calloc, lbitset_elt_find, lbitset_elt_free,
8159 lbitset_elt_link, lbitset_elt_unlink, lbitset_elt_zero_p,
8160 lbitset_empty_p, lbitset_equal_p, lbitset_free, lbitset_init,
8161 lbitset_list, lbitset_list_reverse, lbitset_not, lbitset_ones,
8162 lbitset_op3_cmp, lbitset_or, lbitset_or_cmp, lbitset_prune,
8163 lbitset_release_memory, lbitset_reset, lbitset_set, lbitset_size,
8164 lbitset_subset_p, lbitset_test, lbitset_weed, lbitset_xor,
8165 lbitset_xor_cmp, lbitset_zero): Likewise.
e76d2469 8166
ae26e1f0
AD
81672002-10-14 Akim Demaille <akim@epita.fr>
8168
8169 Version 1.75.
8170
d43baf71
AD
81712002-10-14 Akim Demaille <akim@epita.fr>
8172
8173 * tests/Makefile.am (maintainer-check-posix): New.
8174
7ebc83e3
AD
81752002-10-14 Akim Demaille <akim@epita.fr>
8176
8177 * data/glr.c [YYDEBUG] (YYLEFTMOST_STATE): Initialize the yyloc
8178 member.
8179
05846dae
AD
81802002-10-14 Akim Demaille <akim@epita.fr>
8181
8182 * src/tables.c (table_ninf_remap): base -> tab.
8183 Reported by Matt Rosing.
8184
1318e37d
PE
81852002-10-14 Paul Eggert <eggert@twinsun.com>
8186
447fbb17
PE
8187 * tests/action.at, tests/calc.at, tests/conflicts.at,
8188 tests/cxx-type.at, tests/headers.at, tests/input.at,
8189 tests/regression.at, tests/synclines.at, tests/torture.at:
8190 Say "bison -o foo.c foo.y", not "bison foo.y -o foo.c",
8191 so that the tests still work even if POSIXLY_CORRECT is set.
8192 * doc/bison.texinfo (Rpcalc Compile, Invocation): Likewise.
05846dae 8193
1318e37d
PE
8194 * data/c.m4 (b4_int_type): Use yysigned_char instead of signed char,
8195 for portability to K&R hosts. Fix typo: signed char is guaranteed
8196 only to 127, not to 128.
8197 * data/glr.c (yysigned_char): New type.
8198 * data/yacc.c (yysigned_char): Likewise.
8199 * tests/regression.at (Web2c Actions): signed char -> yysigned_char.
8200
cc0f0794
PE
82012002-10-13 Paul Eggert <eggert@twinsun.com>
8202
5038f418
PE
8203 * data/yacc.c (yyparse): Rewrite to avoid "comparison is always
8204 true due to limited range of data type" warning from GCC.
8205
cc0f0794
PE
8206 * data/c.m4 (b4_token_defines): Protect against double-inclusion
8207 by wrapping enum yytokentype's definition inside #ifndef
8208 YYTOKENTYPE. This undoes a bug I introduced on 2002-10-12.
8209
6fed0802
AD
82102002-10-13 Akim Demaille <akim@epita.fr>
8211
8212 * data/glr.c (yyglrShiftDefer, yyaddDeferredAction, yydoAction):
8213 Un yy- yyrhs to avoid the name clash with the global YYRHS.
8214
32f0598d
AD
82152002-10-13 Akim Demaille <akim@epita.fr>
8216
8217 * Makefile.maint: Update from Autoconf 2.54.
8218 * m4/strerror_r.m4 (AC_FUNC_STRERROR_R): Remove, shipped with 2.54.
8219
7ea9a33f
AD
82202002-10-13 Akim Demaille <akim@epita.fr>
8221
8222 * src/print.c (print_state): Separate the list of solved conflicts
8223 from the other items.
8224 * tests/conflicts.at (Resolved SR Conflicts): Adjust.
8225
ea99527d
AD
82262002-10-13 Akim Demaille <akim@epita.fr>
8227
8228 Let nondeterministic skeletons be usable with deterministic
8229 tables.
8230
8231 With the patch, GAWK compiled by GCC without -O2 passes its test
8232 suite using a GLR parser driven by LALR tables. It fails with -O2
8233 because `struct stat' gives two different answers on my machine:
8234 88 (definition of an auto var) and later 96 (memset on this var).
8235 Hence the stack is badly corrumpted. The headers inclusion is to
8236 blame: if I move the awk.h inclusion before GLR's system header
8237 inclusion, the two struct stat have the same size.
8238
8239 * src/tables.c (pack_table): Always create conflict_table.
8240 (token_actions): Always create conflict_list.
8241 * data/glr.c (YYFLAG): Remove, unused.
8242
f377f69f
AD
82432002-10-13 Akim Demaille <akim@epita.fr>
8244
8245 * configure.ac (AC_GNU_SOURCE): Use it instead of hand written code.
8246 (O0FLAGS): New.
8247 (VALGRIND, GXX): New.
8248 * tests/atlocal.in (CFLAGS): Use O0FLAGS.
8249 * tests/bison.in: Run $PREBISON a pre-command.
8250 * tests/Makefile.am (maintainer-check, maintainer-check-valgrind)
8251 (maintainer-check-g++): New.
8252 * Makefile.am (maintainer-check): New.
8253
2a1fe6ed
AD
82542002-10-13 Akim Demaille <akim@epita.fr>
8255
8256 * data/glr.c: Formatting changes.
8257 Tweak some trace messages to match yacc.c's.
8258
f50adbbd
AD
82592002-10-13 Akim Demaille <akim@epita.fr>
8260
8261 GLR parsers sometimes raise parse errors instead of performing the
8262 default reduction.
8263 Reported by Charles-Henry de Boysson.
8264
8265 * tests/calc.at (_AT_CHECK_CALC, _AT_CHECK_CALC_ERROR): Don't
ba0fe3c7 8266 check the length of the traces when %glr.
f50adbbd
AD
8267 (_AT_CHECK_CALC_ERROR): Also skip `^Stack' lines, coming from
8268 GLR's traces.
8269 (AT_CHECK_CALC_LALR, AT_CHECK_CALC_GLR): New.
8270 Test GLR parsers.
8271 * data/glr.c (YYLEFTMOST_STATE): Fix its value.
8272 (yyltype): Remove the yy prefix from the member names.
8273 (yytable): Complete its comment.
8274 (yygetLRActions): Map error action number from YYTABLE from
8275 YYTABLE_NINF to 0.
8276 (yyisErrorAction): No longer compare YYACTION to YYPACT_NINF
8277 (which was a bug: it should have been YYTABEL_NINF, and yet it was
8278 not satisfying as we could compare an YYACTION computed from
8279 YYDEFACT to YYTABLE_NINF although they are unrelated): 0 is the
8280 only value for error actions.
8281 (yyreportParseError): In verbose parse error messages, don't issue
8282 `error' in the list of expected tokens.
8283 * data/yacc.c (yyparse) <yybackup>: Rewrite the decoding of the
8284 next action to perform to match glr.c's decoding.
8285 (yytable): Complete its comment.
8286
bcbad5b9
PE
82872002-10-13 Paul Eggert <eggert@twinsun.com>
8288
8289 Fix problem reported by Henrik Grubbstroem in
161a71f3 8290 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00098.html>:
bcbad5b9
PE
8291 "nonterm: { $$ = 123; } { $$ = $1; };" was wrongly rejected,
8292 because the Bison parser reads the second action before reducing
8293 the first one.
8294 * src/scan-gram.l (rule_length): New static var.
8295 Use it to keep track of the rule length in the scanner, since
8296 we can't expect the parser to be in lock-step sync with the scanner.
8297 (handle_action_dollar, handle_action_at): Use this var.
8298 * tests/actions.at (Exotic Dollars): Test for the problem.
05846dae 8299
14904b89
PE
83002002-10-12 Paul Eggert <eggert@twinsun.com>
8301
1fe611e5
PE
8302 * lib/timevar.c [! IN_GCC && HAVE_SYS_TIME_H]: Include <sys/time.h>.
8303 * m4/timevar.m4 (BISON_PREREQ_TIMEVAR): Check for <sys/time.h>.
8304 Include <sys/time.h> when checking for clock_t and struct tms.
8305 Use same include order as source.
8306 This is for the SunOS 4.1.4 porting bug reported by Peter Klein in
161a71f3 8307 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00016.html>.
05846dae 8308
1fe611e5
PE
8309 * lib/timevar.c: Update copyright date and clarify comments.
8310 (get_time) [IN_GCC]: Keep the GCC version for reference.
05846dae 8311
1fe611e5
PE
8312 * lib/timevar.c, lib/timevar.h, lib/timevar.def: Import
8313 GCC version as of today, then merge Bison's changes.
8314 Change "GCC" to "Bison" in copyright notice. timevar.def's
8315 author is Akim, so change that too.
8316
98194095
PE
8317 * src/reader.c (grammar_current_rule_check):
8318 Don't worry about the default action if $$ is untyped.
8319 Prevents bogus warnings reported by Jim Gifford in
161a71f3 8320 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00015.html>.
98194095 8321
14904b89
PE
8322 * data/c.m4 (b4_token_enum): Do not define YYTOKENTYPE.
8323 * data/glr.c, data/lalr1.cc, data/yacc.c:
8324 Output token definitions before the first part of user declarations.
8325 Fixes compatibility problem reported by Jim Gifford for kbd in
161a71f3 8326 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00014.html>.
14904b89 8327
ff6dca18
PE
83282002-10-11 Paul Eggert <eggert@twinsun.com>
8329
8330 * data/yacc.c (yyreport_parse_error): Remove, putting its body into...
8331 (yyparse): here. This undoes some of the 2002-07-25 change.
8332 Compatibility problem reported by Ralf S. Engelschall with
8333 OSSP cfg <http://www.ossp.org/pkg/lib/cfg/>.
8334
eb714592
AD
83352002-10-11 Akim Demaille <akim@epita.fr>
8336
8337 * tests/regression.at Characters Escapes): New.
8338 * src/scan-gram.l (SC_ESCAPED_CHARACTER): Accept \' in strings and
8339 characters.
8340 Reported by Jan Nieuwenhuizen.
8341
b7195100
AD
83422002-10-11 Akim Demaille <akim@epita.fr>
8343
8344 * po/id.po: New.
8345
f28a0f2d
PE
83462002-10-10 Paul Eggert <eggert@twinsun.com>
8347
8348 Portability fixes for bitsets; this also avoids several GCC
8349 warnings.
8350
8351 * lib/abitset.c: Include <stddef.h>, for offsetof.
8352 * lib/lbitset.c: Likewise.
8353
8354 * lib/abitset.c (abitset_bytes): Return a size that is aligned
8355 properly for vectors of objects. Do not assume that adding a
8356 header size to a multiple of a word size yields a value that is
8357 properly aligned for the whole union.
8358 * lib/bitsetv.c (bitsetv_alloc): Likewise.
8359
8360 * lib/bitset_stats.c (bitset_stats_bytes): Adjust to new,
8361 unique names for structures.
8362 * lib/ebitset.c (ebitset_bytes): Likewise.
8363 * lib/lbitset.c (lbitset_bytes): Likewise.
8364
8365 * lib/abitset.c (abitset_ones, abitset_zero, abitset_empty_p,
8366 abitset_copy1, abitset_not, abitset_equal_p, abitset_subset_p,
8367 abitset_disjoint_p, abitset_and, abitset_and_cmp, abitset_andn,
8368 abitset_andn_cmp, abitset_or, abitset_or_cmp, abitset_xor,
8369 abitset_xor_cmp, abitset_and_or, abitset_and_or_cmp,
8370 abitset_andn_or, abitset_andn_or_cmp, abitset_or_and,
8371 abitset_or_and_cmp, abitset_copy): Supply prototype decls,
8372 to improve the type-checking that GCC can do.
8373 * lib/bitset.c (bitset_op4_cmp): Likewise.
8374 * lib/bitset_stats.c (bitset_stats_count,
8375 bitset_stats_empty_p, bitset_stats_ones, bitset_stats_zero,
8376 bitset_stats_copy, bitset_stats_disjoint_p,
8377 bitset_stats_equal_p, bitset_stats_not, bitset_stats_subset_p,
8378 bitset_stats_and, bitset_stats_and_cmp, bitset_stats_andn,
8379 bitset_stats_andn_cmp, bitset_stats_or, bitset_stats_or_cmp,
8380 bitset_stats_xor, bitset_stats_xor_cmp, bitset_stats_and_or,
8381 bitset_stats_and_or_cmp, bitset_stats_andn_or,
8382 bitset_stats_andn_or_cmp, bitset_stats_or_and,
8383 bitset_stats_or_and_cmp): Likewise.
8384 * lib/lbitset.c (lbitset_and, lbitset_and_cmp, lbitset_andn,
8385 lbitset_andn_cmp, lbitset_or, lbitset_or_cmp, lbitset_xor,
8386 lbitset_xor_cmp, lbitset_empty_p, lbitset_ones, lbitset_not,
8387 lbitset_subset_p, lbitset_disjoint_p, debug_lbitset): Likewise.
8388
8389 * lib/abitset.h: Include bitset.h, not bbitset.h.
8390 * lib/ebitset.h: Likewise.
8391 * lib/lbitset.h: Likewise.
8392
8393 * lib/bbitset.h: (enum_bitset_ops, enum_bitset_type): New types.
8394 All instances of parameters of type enum bitset_opts are now of
8395 type enum_bitset_opts, to conform to the C Standard, and similarly
8396 for enum_bitset_type.
8397 * lib/ebitset.c (enum_ebitset_find_mode): Likewise.
8398 * lib/lbitset.c (enum_lbitset_find_mode): Likewise.
8399
8400 Do not use "struct bitset_struct" to mean different things in
8401 different modules. Not only is this confusing, it violates
8402 the C Standard, which requires that structure types in different
8403 modules must be compatible if one is to be passed to the other.
8404 * lib/bbitset.h (bitset): Now points to a union, not to a struct.
8405 All instances of "struct bitset_struct *" replaced with "bitset".
8406 * lib/bitset.h (struct bitset_struct): Remove, replacing with....
8407 (union bitset_union, struct abitset_struct, struct ebitset_struct,
8408 struct lbitset_struct, struct bitset_stats_struct): New types.
8409 All uses of struct bitset_struct changed to union bitset_union,
8410 etc.
ba0fe3c7 8411 * lib/abitset.c (struct abitset_struct, abitset,
f28a0f2d
PE
8412 struct bitset_struct): Remove.
8413 * lib/bitset_stats.c (struct bitset_stats_struct, bitset_stats,
8414 struct bitset_struct): Remove.
8415 * lib/ebitset.c (struct ebitset_struct, ebitset, struct
8416 bitset_struct): Remove.
8417 * lib/lbitset.c (struct lbitset_struct, lbitset, bitset_struct):
8418 Likewise.
8419
8420 Do not call a function of type T using a call that assumes the
8421 function is of a different type U. Standard C requires that a
8422 function must be called with a type that is compatible with its
8423 definition.
8424 * lib/bbitset.h (bitset_and_or_, bitset_andn_or_, bitset_or_and_):
8425 New decls.
8426 * lib/bitset.c (bitset_and_or_, bitset_andn_or_, bitset_or_and_):
8427 New functions.
8428 * lib/ebitset.c (PFV): Remove.
8429 * lib/lbitset.c (PFV): Likewise.
8430 * lib/ebitset.c (ebitset_and, ebitset_andn, ebitset_or,
8431 ebitset_xor, ebitset_copy, ebitset_ones, ebitset_empty_p): New
8432 decls.
8433 (ebitset_and, ebitset_andn, ebitset_or, ebitset_xor): New functions.
8434 (ebitset_vtable): Use them.
8435 * lib/lbitset.c (lbitset_and, lbitset_andn, lbitset_or,
8436 lbitset_xor): New functions.
8437 (lbitset_vtable): Use them.
8438
8439 * lib/bitset.h (bitset_next, bitset_prev, bitset_only_set_p):
8440 Declare.
8441
8442 * lib/bitsetv.c (bitsetv_alloc): Add a cast to (void *) to avoid a
8443 GCC warning.
8444 * lib/lbitset.c (LBITSET_CURRENT1): Likewise.
8445 Use offsetof, for simplicity.
8446
6fbe4984
PE
84472002-10-06 Paul Eggert <eggert@twinsun.com>
8448
8449 * lib/bitset.h (bitset_reset): Do not assume that bitset_word is
8450 the same width as int. This reapplies a hunk of the 2002-08-12 patch
161a71f3 8451 <http://lists.gnu.org/archive/html/bison-patches/2002-08/msg00007.html>,
6fbe4984
PE
8452 which was inadvertently undone by the 2002-09-30 patch.
8453 * lib/lbitset.c (debug_lbitset): Do not assume that bitset_word is
8454 the same width as int.
8455
420f93c8
PE
84562002-10-04 Paul Eggert <eggert@twinsun.com>
8457
8458 Version 1.50.
8459
8460 * configure.ac (AC_INIT), NEWS: Increment version number.
8461
8462 * doc/bison.texinfo: Minor spelling, grammar, and white space
8463 fixes.
8464 (Symbols): Mention that any negative value returned from yylex
8465 signifies end-of-input. Warn about negative chars. Mention
8466 the portable Standard C character set.
8467
8468 The GNU coding standard says CFLAGS and YFLAGS are reserved
8469 for the installer to set.
8470 * lib/Makefile.am (AM_CFLAGS): Renamed from CFLAGS.
8471 * src/Makefile.am (AM_CFLAGS): Likewise.
8472 (AM_YFLAGS): Renamed from YFLAGS.
8473
8474 Fix some MAX and MIN problems.
8475 * src/gram.h (ITEM_NUMBER_MIN): MIN_MAX -> INT_MIN.
8476 * src/lalr.h (GOTO_NUMBER_MAX): INT_MAX -> SHRT_MAX.
8477 * src/symtab.h (SYMBOL_NUMBER_MAX): New macro.
8478 * src/reader.c (reader): Use it.
8479
8480 * tests/regression.at (Braces parsing): Use grep, not fgrep, as
8481 POSIX 1003.1-2001 has removed fgrep.
8482
84832002-10-04 Michael Hayes <m.hayes@elec.canterbury.ac.nz>
8484
8485 * lib/bbitset.h (BITSET_WINDEX_MAX): Redefine so that it cannot be
8486 interpreted as signed.
8487 * lib/ebitset.c (ebitset_list): Fix bug.
8488
ff68026d
PE
84892002-10-01 Paul Eggert <eggert@twinsun.com>
8490
8491 More fixes for 64-bit hosts and large bitsets.
8492
8493 * lib/abitset.c (struct abitset_struct.n_bits, abitset_small_list,
8494 abitset_size, abitset_list, abitset_list_reverse, abitset_list):
8495 Use bitset_bindex, not int or unsigned int or size_t, to count bits.
8496 * lib/bbitset.h (struct bitset_vtable.size, struct bitset_vtable.count,
8497 struct bitset_vtable.list, struct bitset_vtable.list_reverse,
8498 bitset_count_, bitset_next, bitset_prev, bitset_first, bitset_last,
8499 bitset_count_): Likewise.
8500 * lib/bitset.h (bitset_iterator.num, bitset_iterator.i,
8501 bitset_first, bitset_last): Likewise.
8502 * lib/bitset_stats.c (bitset_stats_size, bitset_stats_list,
8503 bitset_stats_list_reverse, bitset_stats_size,
8504 bitset_stats_count, bitset_stats_list, bitset_stat_list_reverse):
8505 Likewise.
8506 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
8507 * lib/bitsetv.c (bitsetv_alloc, bitsetv_create, bitsetv_free,
8508 bitsetv_zero, bitsetv_ones, bitsetv_transitive_closure,
8509 bitsetv_reflexive_transitive_closure): Likewise.
8510 * lib/bitsetv.h (bitsetv_alloc, bitsetv_create): Likewise.
8511 * lib/ebitset.c (ebitset_size, ebitset_list, ebitset_list_reverse):
8512 Likewise.
8513 * lib/lbitset.c (lbitset_size, lbitset_list, lbitset_list_merge):
8514 Likewise.
420f93c8 8515
ff68026d
PE
8516 * lib/abitset.c (abitset_ones, abitset_zero, abitset_bytes):
8517 Use size_t, not unsigned int, to count bytes.
8518 * lib/abitset.h (abitset_bytes): Likewise.
8519 * lib/bitset.c (bitset_bytes, bitset_alloc, bitset_obstack_alloc):
8520 Likewise.
8521 * lib/bitset.h (bitset_bytes): Likewise.
8522 * lib/bitset_stats.c (bitset_stats_bytes, bitset_stats_init): Likewise.
8523 * lib/bitset_stats.h (bitset_stats_bytes): Likewise.
8524 * lib/bitsetv.c (bitsetv_alloc): Likewise.
8525 * lib/ebitset.c (ebitset_bytes): Likewise.
8526 * lib/ebitset.h (ebitset_bytes): Likewise.
8527 * lib/lbitset.c (lbitset_bytes): Likewise.
8528 * lib/lbitset.h (lbitset_bytes): Likewise.
420f93c8 8529
ff68026d
PE
8530 * lib/abitset.c (abitset_empty_p, abitset_not, abitset_equal_p,
8531 abitset_subset_p, abitset_disjoint_p, abitset_and,
8532 abitset_and_cmp, abitset_andn, abitset_andn_cmp, abitset_or,
8533 abitset_or_cmp, abitset_xor, abitset_xor_cmp, abitset_and_or,
8534 abitset_and_or_cmp, abitset_andn_or, abitset_andn_or_cmp,
8535 abitset_or_and, abitset_or_and_cmp):
8536 Use bitset_windex instead of unsigned int.
8537 * lib/bitsetv.c (bitsetv_dump, debug_bitsetv): Likewise.
8538 * lib/ebitset.c (struct ebitset_struct.size, ebitset_elts_grow,
8539 ebitset_elt_add, ebitset_elt_remove, ebitset_weed,
8540 ebitset_elt_find, ebitset_list_reverse, ebitset_list, ebitset_init):
8541 Likewise.
8542 * lib/lbitset.c (lbitset_ones, lbitset_not): Likewise.
420f93c8 8543
ff68026d
PE
8544 * lib/bitset.c (bitset_print):
8545 Use proper printf formats for widths of integer types.
8546 * lib/bitset_stats.c (bitset_percent_histogram_print,
8547 bitset_log_histogram_print, bitset_stats_print_1): Likewise.
8548 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
8549 * lib/bitsetv.c (bitsetv_dump, debug_bitsetv): Likewise.
8550 * lib/lbitset.c (lbitset_bytes): Likewise.
420f93c8 8551
ff68026d
PE
8552 * lib/bbitset.h (BITSET_BINDEX_MAX, BITSET_WINDEX_MAX,
8553 BITSET_SIZE_MAX): New macros.
8554 (BITSET_INDEX_MAX): Remove. It wasn't right, since it assumed that
8555 sizeof (bitset_word) == sizeof (bitset_windex). All uses changed
8556 to BITSET_WINDEX_MAX.
8557
8558 * lib/bitset.c (bitset_next, bitset_prev, bitset_first,
8559 bitset_last): Return BITSET_BINDEX_MAX (not -1) for no value,
8560 since we now return the bitset_bindex type (not int).
8561
8562 * lib/bitsetv.c (bitsetv_alloc): Check for arithmetic overflow
8563 when computing sizes.
8564 * lib/ebitset.c (ebitset_elts_grow): Likewise.
8565
8566 * lib/lbitset.c (lbitset_elt_find): Simplify windex calculation
8567 and avoid cast to unsigned.
8568
6aa452a6
AD
85692002-09-30 Akim Demaille <akim@epita.fr>
8570
8571 * lib/abitset.c, lib/bbitset.h, lib/bitset.c, lib/bitset.h,
8572 * lib/bitset_stats.c, lib/bitsetv.c, lib/ebitset.c, lib/lbitset.c:
8573 Updates from Michael Hayes.
8574
927f7817
AD
85752002-09-30 Art Haas <ahaas@neosoft.com>
8576
8577 * configure.ac: Update AC_OUTPUT and AM_CONFIG_HEADER
8578 invocations.
8579 * tests/cxx-type.at (declarator): Don't rely on NDEBUG being not
8580 defined.
8581
9738f41e
AD
85822002-09-27 Akim Demaille <akim@epita.fr>
8583
8584 Version 1.49c.
8585
a5c75d7f
AD
85862002-09-27 Akim Demaille <akim@epita.fr>
8587
8588 * configure.ac (AM_INIT_AUTOMAKE): We _need_ 1.7.
8589 (Because of AC_LIBSOURCE).
8590
8280e179
AD
85912002-09-27 Akim Demaille <akim@epita.fr>
8592
8593 Playing with Autoscan.
8594
8595 * configure.ac: Remove the old LIBOBJ tweaks.
8596 (AC_REPLACE_FUNCS): Add strrchr and strtol.
8597 * lib/strrchr.c: New.
8598 * lib/strtol.c: New, from the Coreutils 4.5.1.
8599
ae64af35
AD
86002002-09-27 Akim Demaille <akim@epita.fr>
8601
8602 Playing with Autoscan.
8603
8604 * m4/prereq.m4 (jm_PREREQ_ARGMATCH, jm_FUNC_ARGMATCH): New.
8605 * lib/Makefile.am (libbison_a_SOURCES): No longer include
8606 argmatch.c and argmatch.h, since they are AC_LIBSOURCE'd.
8607 * lib/strcasecmp.c, lib/strncasecmp.c, lib/memcmp.c: New, from the
8608 Coreutils 4.5.1.
8609
d1a1114f
AD
86102002-09-24 Akim Demaille <akim@epita.fr>
8611
8612 * doc/bison.texinfo (Stack Overflow): xref to Recursion.
8613 (Frequently Asked Questions, Parser Stack Overflow): New.
8614
b906441c
AD
86152002-09-13 Akim Demaille <akim@epita.fr>
8616
8617 Playing with autoscan.
8618
8619 * src/reader.c (get_merge_function): Use xstrdup, not strdup.
8620 * src/files.c (skeleton_find): Remove, unused.
8621 * m4/memcmp.m4: New, from the Coreutils 4.5.1.
8622 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Run jm_FUNC_MEMCMP.
8623
bd701811
AD
86242002-09-13 Akim Demaille <akim@epita.fr>
8625
8626 * configure.ac (AM_INIT_AUTOMAKE): Require Automake 1.6.3.
8627 * Makefile.am (AUTOMAKE_OPTIONS): Don't.
8628
e0a13e7b
AD
86292002-09-13 Akim Demaille <akim@epita.fr>
8630
8631 * configure.ac: Require 2.54.
8632 s/jm_FUNC_MALLOC/AC_FUNC_MALLOC/.
8633 s/jm_FUNC_REALLOC/AC_FUNC_REALLOC/.
8634 * m4/c-bs-a.m4, m4/malloc.m4, m4/mbstate_t.m4, m4/realloc.m4:
8635 Remove, provided by Autoconf macros.
8636
c97011bf
AD
86372002-09-12 Akim Demaille <akim@epita.fr>
8638
8639 * m4/prereq.m4: Update, from Coreutils 4.5.1.
8640
d862b1be
AD
86412002-09-12 Akim Demaille <akim@epita.fr>
8642
8643 * m4/prereq.m4: Update, from Fileutils 4.1.5.
8644 * configure.ac (jm_PREREQ_TEMPNAME): Invoke it.
8645 Reported by Martin Mokrejs.
8646
3d38c03a
AD
86472002-09-10 Akim Demaille <akim@epita.fr>
8648
8649 * src/parse-gram.y: Associate a human readable string to each
8650 token type.
8651 * tests/regression.at (Invalid inputs): Adjust.
8652
b6347355
AD
86532002-09-10 Gary V. Vaughan <gary@gnu.org>
8654
8655 * tests/Makefile.am ($(srcdir)/package.m4): Bison now ships
8656 with an Autoconf-2.5x style configure.ac.
8657
09ba4ab2
PE
86582002-09-06 Paul Eggert <eggert@twinsun.com>
8659
8660 * doc/bison.texinfo (Conditions): Make explicit that the GPL
8661 exception applies only to yacc.c. This is a modification of a
8662 patch originally suggested by Akim Demaille.
8663
21846f69
AD
86642002-09-06 Akim Demaille <akim@epita.fr>
8665
09ba4ab2
PE
8666 * data/c.m4 (b4_copyright): Move the GPL exception comment from
8667 here to...
8668 * data/yacc.c: here.
8669
21846f69
AD
8670 * data/lalr1.cc (struct yyltype): Don't define it, since we use
8671 LocationType.
8672 (b4_ltype): Default to yy::Location from location.hh.
8673
c0ad8bf3
AD
86742002-09-04 Jim Meyering <jim@meyering.net>
8675
8676 * data/yacc.c: Guard the declaration of yytoknum also with
8677 `#ifdef YYPRINT', so it is declared only when used.
8678
3a93251e
AD
86792002-09-04 Akim Demaille <akim@epita.fr>
8680
8681 * configure.in: Rename as...
8682 * configure.ac: this.
8683 Bump to 1.49c.
8684
427c0dda
AD
86852002-09-04 Akim Demaille <akim@epita.fr>
8686
8687 * src/assoc.c, src/closure.c, src/gram.c, src/injections.c,
8688 * src/lalr.c, src/LR0.c, src/relation.c, src/tables.c: Don't
8689 translate maintainer only messages.
8690
6a254321
PE
86912002-08-12 Paul Eggert <eggert@twinsun.com>
8692
645e30d1
PE
8693 Version 1.49b.
8694
6a254321
PE
8695 * Makefile.am (SUBDIRS): Remove intl.
8696 (DISTCLEANFILES): Remove.
8697 * NEWS: Mention that GNU M4 is now required. Clarify what is
8698 meant by "larger grammars". Mention the pt_BR translation.
8699 * configure.in (AC_CHECK_DECLS): Add getenv, getopt.
8700 (AM_GNU_GETTEXT_VERSION): New macro, replacing GETTEXT_VERSION var.
8701 Bump version from 0.11.2 to 0.11.5.
8702 (BISON_PREREQ_STAGE): Remove.
8703 (AM_GNU_GETTEXT): Use external gettext.
8704 (AC_OUTPUT): Remove intl/Makefile.
8705
8706 * config/depcomp, config/install-sh: Sync with Automake 1.6.3.
8707
8708 * data/glr.c: Include string.h, for strlen.
8709 (yyreportParseError): Use size_t for yysize.
8710 (yy_yypstack): No longer nested inside yypstates, as nested
8711 functions are not portable. Do not assume size_t is the
8712 same width as int.
8713 (yypstates): Do not assume that ptrdiff_t is the same width
8714 as int, and similarly for yyposn and YYINDEX.
8715
8716 * data/yacc.c: Fix comment about `$$ = $1': it can copy garbage.
8717
8718 * lib/Makefile.am (INCLUDES): Do not include from the intl
8719 directory, which has been removed.
8720 * src/Makefile.am (INCLUDES): Likewise.
8721
8722 * lib/Makefile.am (libbison_a_SOURCES): Add unlocked-io.h.
8723 (bitsets_sources, additional_bitsets_sources, timevars_sources):
8724 New vars.
8725
8726 * lib/Makefile.am (libbison_a_SOURCES): Avoid +=, a GNU make extension.
8727 * tests/Makefile.am (EXTRA_DIST): Likewise.
8728
8729 * lib/abitset.c (abitset_reverse_list, ebitset_reverse_list):
8730 Do not assume that bitset_windex is the same width as unsigned.
8731
8732 * lib/abitset.c (abitset_unused_clear): Do not assume that
8733 bitset_word is the same width as int.
8734 * lib/bbitset.h (BITSET_INDEX_MAX, BITSET_MSB): Likewise.
8735 * lib/bitset.h (bitset_set, bitset_reset): Likewise.
8736 * lib/bitset_stats.c (bitset_stats_set, bitset_stats_reset): Likewise.
8737 * lib/ebitset.c (ebitset_set, ebitset_reset): Likewise.
8738 * lib/lbitset.c (lbitset_set, lbitset_reset): Likewise.
8739
8740 * lib/abitset.c (abitset_op1): Use -1, not ~0, as memset arg (for
8741 portability to one's complement hosts!).
8742 * lib/ebitset.c (ebitset_op1): Likewise.
8743 * lib/lbitset.c (lbitset_op1): Likewise.
8744
8745 * lib/argmatch.c, lib/quotearg.c, quotearg.h: Sync with GNU tar.
8746 * lib/argmatch.h, lib/basename.c, lib/dirname.c, lib/dirname.h,
8747 lib/hash.c, lib/hash.h, lib/strnlen.c, lib/xmalloc.c:
8748 Sync with fileutils.
8749 * lib/error.c, lib/getopt.c, lib/getopt.h, lib/getopt1.c,
8750 lib/gettext.h: Sync with diffutils.
8751
8752 * lib/memrchr.c, lib/mkstemp.c, lib/strchr.c, lib/strnlen.c,
8753 lib/strspn.c, lib/tempname.c: Use GPL, not LGPL.
8754
8755 * lib/obstack.c, lib/obstack.h: Sync with fileutils, except use
8756 PROTOTYPES to check for prototypes, and "defined __STDC__" to
8757 check for void *.
8758
8759 * lib/bbitset.h (BITSET_WORD_BITS): Now of type unsigned, not
8760 size_t; the old version tried to do this but casted improperly.
8761 (bitset_bindex, bitset_windex): Now size_t, not unsigned long.
8762 (bitset_test): Now returns int, not unsigned long.
8763
8764 * lib/bitset_stats.c: Include "gettext.h".
8765 (_): New macro.
8766 (bitset_stats_set, bitset_stats_reset, bitset_stats_test): Don't
8767 name locals "index", as it generates unnecessary warnings on some
8768 hosts that have an "index" function.
8769
8770 * lib/bitset_stats.c (bitset_stats_print_1, bitset_stats_print,
8771 bitset_stats_read, bitset_stats_write): Wrap strings in _() if
8772 they need translation.
8773 * src/LR0.c (state_list_append, new_itemsets, get_state,
8774 append_states, generate_states): Likewise.
8775 * src/assoc.c (assoc_to_string): Likewise.
8776 * src/closure.c (print_closure, set_firsts, closure): Likewise.
8777 * src/gram.c (grammar_dump): Likewise.
8778 * src/injections.c (injections_compute): Likewise.
8779 * src/lalr.c (lookaheads_print): Likewise.
8780 * src/relation.c (relation_transpose): Likewise.
8781 * src/scan-gram.l: Likewise.
8782 * src/tables.c (table_grow, pack_vector): Likewise.
8783
8784 * m4/Makefile.am (EXTRA_DIST): Remove codeset.m4,
8785 glibc21.m4, isc-posix.m4 lcmessage.m4, stage.m4.
8786 * m4/malloc.m4, m4/realloc.m4: Sync with diffutils.
8787 * m4/mbstate_t.m4: Sync with fileutils.
8788 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): AC_MBSTATE_T -> AC_TYPE_MBSTATE_T.
8789
8790 * po/LINGUAS: Add pt_BR.
8791 * po/POTFILES.in: Add src/assoc.c, src/closure.c, src/gram.c,
8792 src/main.c, src/relation.c, src/state.c, lib/bitset_stats.c,
8793 lib/timevar.c.
8794 Use src/parse-gram.y instead of src/parse-gram.c, as the gettext
8795 manual recommends.
8796 Similarly, use src/scan-gram.l instead of src/scan-gram.c.
8797
8798 * src/complain.c (strerror_r): Remove decl; not needed.
8799 (strerror): Use same pattern as ../lib/error.c.
8800
8801 * src/files.c, src/files.h (compute_header_macro): Remove; unused.
8802
8803 * src/gram.c (grammar_dump): Do not assume ptrdiff_t fits in int.
8804
8805 * src/main.c (main): Cast result of bindtextdomain and textdomain
8806 to void, to avoid a GCC warning when --disable-nls is in effect.
8807
8808 * src/scan-gram.l: Use strings rather than escapes when possible,
8809 to minimize the number of warnings from xgettext.
8810 (handle_action_dollar, handle_action_at): Don't use isdigit,
8811 as it mishandles negative chars and it may not work as expected
8812 outside the C locale.
8813
8814 * src/symtab.c (symbol_get): Don't cast LHS of an assignment;
8815 this is a GCC extension and is not portable to other compilers.
8816
8817 * src/system.h (alloca): Use same pattern as ../lib/error.c.
8818 Do not include <ctype.h>; no longer needed.
8819 Do not include <malloc.h>; no longer needed (and generates
8820 warnings on OpenBSD 3.0).
8821
8822 * tests/cxx-type.at (yylex): Do not pass signed char to isupper;
8823 it's not portable.
8824
8825 * tests/regression.at: Do not use 'cc -c input.c -o input';
8826 Sun C rejects this. Instead, use 'cc -c input.c -o input.o'.
8827
8828 * tests/synclines.at (AC_SYNCLINES_COMPILE): Accept any nonzero
8829 exit status as failure, not just exit status 1. Sun C exits
8830 with status 2 sometimes.
8831
8832 * tests/torture.at (AT_INCREASE_DATA_SIZE): New macro.
8833 Use it for the two large tests.
8834
c8f002c7
AD
88352002-08-02 Akim Demaille <akim@epita.fr>
8836
8837 * src/conflicts.c (conflicts_output): Don't output rules never
8838 reduced here, since anyway that computation doesn't work.
8839 * src/gram.h, src/gram.h (rule_filter_t, rule_useful_p)
8840 (rule_useless_p, rule_never_reduced_p): New.
8841 (grammar_rules_partial_print): Use a filter instead of a range.
8842 Display the title only if needed.
8843 (grammar_rules_print): Adjust.
8844 (grammar_rules_never_reduced_report): New.
8845 * src/tables.c (action_row): Move the computation of rules never
8846 reduced to...
8847 (token_actions): here.
8848 * src/main.c (main): Make the parser before making the report, so
8849 that rules never reduced are computed.
8850 Call grammar_rules_never_reduced_report.
8851 * src/print.c (print_results): Report rules never reduced.
8852 * tests/conflicts.at, tests/reduce.at: Adjust.
8853
cd08e51e
AD
88542002-08-01 Akim Demaille <akim@epita.fr>
8855
8856 Instead of attaching lookaheads and duplicating the rules being
8857 reduced by a state, attach the lookaheads to the reductions.
8858
8859 * src/state.h (state_t): Remove the `lookaheads',
8860 `lookaheads_rule' member.
8861 (reductions_t): Add a `lookaheads' member.
8862 Use a regular array for the `rules'.
8863 * src/state.c (reductions_new): Initialize the lookaheads member
8864 to 0.
8865 (state_rule_lookaheads_print): Adjust.
8866 * src/state.h, src/state.c (state_reductions_find): New.
8867 * src/conflicts.c (resolve_sr_conflict, set_conflicts)
8868 (count_rr_conflicts): Adjust.
8869 * src/lalr.c (LArule): Remove.
8870 (add_lookback_edge): Adjust.
8871 (state_lookaheads_count): New.
8872 (states_lookaheads_initialize): Merge into...
8873 (initialize_LA): this.
8874 (lalr_free): Adjust.
8875 * src/main.c (main): Don't free nullable and derives too early: it
8876 is used by --verbose.
8877 * src/print.c, src/print_graph.c, src/tables.c: Adjust.
8878
bb0027a9
AD
88792002-08-01 Akim Demaille <akim@epita.fr>
8880
8881 * src/derives.h, src/derives.c (derives): A `rule_t***' instead of
8882 `rule_number_t**'.
8883 (set_derives, free_derives): Rename as...
8884 (derives_compute, derives_free): this.
8885 Adjust all dependencies.
8886 * src/nullable.c (set_nullable, free_nullable): Rename as...
8887 (nullable_compute, nullable_free): these.
8888 (rule_list_t): Store rule_t *, not rule_number_t.
8889 * src/state.c (state_rule_lookaheads_print): Directly compare rule
8890 pointers, instead of their numbers.
8891 * src/main.c (main): Call nullable_free, and derives_free earlier,
8892 as they were lo longer used.
8893
3325ddc4
AD
88942002-08-01 Akim Demaille <akim@epita.fr>
8895
8896 * lib/timevar.c (get_time): Include children time.
8897 * src/lalr.h (LA, LArule): Don't export them: used with the
8898 state_t.
8899 * src/lalr.c (LA, LArule): Static.
8900 * src/lalr.h, src/lalr.c (lalr_free): New.
8901 * src/main.c (main): Call it.
8902 * src/tables.c (pack_vector): Check whether loc is >= to the
8903 table_size, not >.
8904 (pack_tables): Don't free froms, tos, conflict_tos, and pos...
8905 (tables_generate): do it, since that's also it which allocates
8906 them.
8907 Don't free LA and LArule, main does.
8908
c6f1a33c
AD
89092002-07-31 Akim Demaille <akim@epita.fr>
8910
8911 Separate parser tables computation and output.
8912
8913 * src/output.c (nvectors, base_t, base, base_ninf, conflict_table)
8914 (conflict_list, conflict_list_cnt, table, check, table_ninf)
8915 (yydefgoto, yydefact, high): Move to...
8916 * src/tables.h, src/tables.c: here.
8917 * src/output.c (vector_number_t, VECTOR_NUMBER_MAX)
8918 (VECTOR_NUMBER_MIN, state_number_to_vector_number)
8919 (symbol_number_to_vector_number, nvectors, BASE_MAX, BASE_MIN)
8920 (froms, tos, conflict_tos, tally, width, action_t, ACTION_MAX)
8921 (ACTION_MIN, actrow, order, nentries, pos, conflrow)
8922 (conflict_list_free, table_size, lowzero, table_grow, conflict_row)
8923 (action_row, save_row, token_actions, save_column, default_goto)
8924 (goto_actions, sort_actions, matching_state, pack_vector)
8925 (table_ninf_remap, pack_table, prepare_actions): Move to...
8926 * src/tables.c: here.
8927 * src/tables.h, src/tables.c(tables_generate, tables_free): New.
8928 * src/output.c (token_actions, output_base, output_conflicts)
8929 (output_check): Merge into...
8930 (prepare_actions): this.
8931 (actions_output): Rename as...
8932 (user_actions_output): this.
8933 * src/main.c (main): Call tables_generate and tables_free.
8934
1509d42f
AD
89352002-07-31 Akim Demaille <akim@epita.fr>
8936
8937 Steal GCC's --time-report support.
8938
8939 * lib/timevar.c, lib/timevar.h, lib/timevar.def: New,
8940 stolen/adjusted from GCC.
8941 * m4/stage.m4: Remove time related checks.
8942 * m4/timevar.m4: New.
8943 * configure.in: Adjust.
8944 * src/system.h: Adjust to using timevar.h.
8945 * src/getargs.h, src/getargs.c: Support trace_time for
8946 --trace=time.
8947 * src/main.c (stage): Remove.
8948 (main): Replace `stage' invocations with timevar calls.
8949 * src/output.c: Insert pertinent timevar calls.
8950
273a74fa
AD
89512002-07-31 Akim Demaille <akim@epita.fr>
8952
8953 Let --trace have arguments.
8954
8955 * src/getargs.h (enum trace_e): New.
8956 * src/getargs.c (trace_args, trace_types, trace_argmatch): New.
8957 (long_options, short_options): --trace/-T takes an optional
8958 argument.
8959 Change all the uses of trace_flag to reflect the new flags.
8960 * tests/sets.at (Firsts, Nullable, Broken Closure): Use --trace=sets.
8961
8962 Strengthen `stage' portability.
8963
8964 * m4/stage.m4 (BISON_PREREQ_STAGE): New.
8965 * configure.in: Use it.
8966 Don't check for malloc.h and sys/times.h.
8967 * src/system.h: Include them when appropriate.
8968 * src/main.c (stage): Compile only when mallinfo, struct mallinfo,
8969 times and struct tms are available.
8970
217598da
AD
89712002-07-30 Akim Demaille <akim@epita.fr>
8972
8973 In verbose parse error message, don't report `error' as an
8974 expected token.
8975 * tests/actions.at (Printers and Destructors): Adjust.
8976 * tests/calc.at (Calculator $1): Adjust.
8977 * data/yacc.c, data/glr.c, data/lalr1.c: When making the verbose
8978 error message, do not report the parser accepts the error token in
8979 that state.
8980
52489d44
AD
89812002-07-30 Akim Demaille <akim@epita.fr>
8982
8983 Normalize conflict related messages.
8984
8985 * src/complain.h, src/complain.c (warn, complain): New.
8986 * src/conflicts.c (conflicts_print): Use them.
8987 (conflict_report_yacc): New, extracted from...
8988 (conflicts_print): here.
8989 * tests/conflicts.at, tests/existing.at: Adjust.
8990
e8832397
AD
89912002-07-30 Akim Demaille <akim@epita.fr>
8992
8993 Report rules which are never reduced by the parser: those hidden
8994 by conflicts.
8995
8996 * src/LR0.c (save_reductions): Don't make the final state too
8997 different: save its reduction (accept) instead of having a state
8998 without any action (no shift or goto, no reduce).
8999 Note: the final state is now a ``regular'' state, i.e., the
9000 parsers now contain `reduce 0' as default reduction.
9001 Nevertheless, since they decide to `accept' when yystate =
9002 final_state, they still will not reduce rule 0.
9003 * src/print.c (print_actions, print_reduction): Adjust.
9004 * src/output.c (action_row): Track reduced rules.
9005 (token_actions): Report rules never reduced.
9006 * tests/conflicts.at, tests/regression.at: Adjust.
9007
caf23d24
AD
90082002-07-30 Akim Demaille <akim@epita.fr>
9009
9010 `stage' was accidently included in a previous patch.
9011 Initiate its autoconfiscation.
9012
9013 * configure.in: Look for malloc.h and sys/times.h.
9014 * src/main.c (stage): Adjust.
9015 Report only when trace_flag.
9016
640748ee
AD
90172002-07-29 Akim Demaille <akim@epita.fr>
9018
9019 * src/state.h, src/state.c (transitions_t): Holds state_t*'s, not
9020 state_number_t.
9021 (errs_t): symbol_t*, not symbol_number_t.
9022 (reductions_t): rule_t*, not rule_number_t.
9023 (FOR_EACH_SHIFT): New.
9024 * src/LR0.c, src/conflicts.c, src/lalr.c, src/output.c
9025 * src/print.c, src/print_graph.c: Adjust.
9026
88bce5a2
AD
90272002-07-29 Akim Demaille <akim@epita.fr>
9028
9029 Use $accept and $end, as BYacc and BTYacc do, instead of $axiom and $.
9030
9031 * src/symtab.h, src/symtab.c (eoftoken, axiom): Rename as...
9032 (endtoken, accept): these.
9033 * src/reader.c (reader): Set endtoken's default tag to "$end".
9034 Set undeftoken's tag to "$undefined" instead of "$undefined.".
9035 * doc/bison.texinfo (Table of Symbols): Mention $accept and $end.
9036 Adjust.
9037
1bfb97db
AD
90382002-07-29 Akim Demaille <akim@epita.fr>
9039
9040 * src/reduce.c (reduce_grammar): When the language is empty,
9041 complain about the start symbol, not the axiom.
9042 Use its location.
9043 * tests/reduce.at (Empty Language): New.
9044
fc5734fe
AD
90452002-07-26 Akim Demaille <akim@epita.fr>
9046
9047 * src/reader.h, src/reader.c (gram_error): ... can't get
9048 yycontrol without making too strong assumptions on the parser
9049 itself.
9050 * src/output.c (prepare_tokens): Use the real 0th value of
9051 token_translations instead of `0'.
9052 * src/parse-gram.y (yyerror): Don't rely on yycontrol being
9053 visible here.
9054 * data/yacc.c (yyreport_parse_error): Rename yylocation as yylloc
9055 for the time being: %locations ought to provide it to yyerror.
9056
3650b4b8
AD
90572002-07-25 Akim Demaille <akim@epita.fr>
9058
9059 * src/output.c (prepare_tokens): Go up to ntokens, not ntokens + 1.
9060 * doc/bison.texinfo (Decl Summary): s/$illegal/$undefined./.
9061 * tests/regression.at (Web2c Actions): Adjust.
9062
4b3d3a8e
AD
90632002-07-25 Akim Demaille <akim@epita.fr>
9064
9065 Stop storing rules from 1 to nrules + 1.
9066
9067 * src/LR0.c, src/closure.c, src/derives.c, src/gram.c, src/lalr.c
9068 * src/nullable.c, src/output.c, src/print.c, src/reader.c
9069 * src/reduce.c: Allocate and free from &rules[0], not &rules[1].
9070 Iterate from 0 to nrules.
9071 Use rule_number_as_item_number and item_number_as_rule_number.
9072 Adjust to `derive' now containing possibly 0.
9073 * src/gram.h (rule_number_as_item_number, item_number_as_rule_number):
9074 Handle the `- 1' part in rule numbers from/to item numbers.
9075 * src/conflicts.c (log_resolution): Fix the message which reversed
9076 shift and reduce.
9077 * src/output.c (action_row): Initialize default_rule to -1.
9078 (token_actions): Adjust.
9079 * tests/sets.at (Nullable, Firsts): Fix the previously bogus
9080 expected output.
9081 * tests/conflicts.at (Resolved SR Conflicts): Likewise.
9082
4a2a22f4
AD
90832002-07-25 Akim Demaille <akim@epita.fr>
9084
9085 * data/c.m4 (b4_c_function, b4_c_ansi_args, b4_c_ansi_arg)
9086 (b4_c_knr_arg_names, b4_c_knr_arg_name, b4_c_knr_arg_decls)
9087 (b4_c_knr_arg_decl): New.
9088 * data/yacc.c: Use it to define yysymprint, yydestruct, and
9089 yyreport_parse_error.
9090
b8df3223
AD
90912002-07-25 Akim Demaille <akim@epita.fr>
9092
9093 * data/yacc.c (yyreport_parse_error): New, extracted from...
9094 (yyparse): here.
9095 (yydestruct, yysymprint): Move above yyparse.
9096 Be K&R compliant.
9097
a762e609
AD
90982002-07-25 Akim Demaille <akim@epita.fr>
9099
9100 * data/c.m4 (b4_ints_in, b4_int_type, b4_int_type_for): New,
9101 replace...
9102 (b4_sint_type, b4_uint_type): these.
9103 * data/yacc.c, data/glr.c, data/lalr1.cc: Use b4_int_type_for.
9104 * tests/regression.at (Web2c Actions): Adjust.
9105
12b0043a
AD
91062002-07-25 Akim Demaille <akim@epita.fr>
9107
9108 * src/gram.h (TIEM_NUMBER_MAX): New.
9109 (item_number_of_rule_number, rule_number_of_item_number): Rename
9110 as...
9111 (rule_number_as_item_number, item_number_as_rule_number): these.
9112 Adjust dependencies.
9113 * src/output.c (vector_number_t, VECTOR_NUMBER_MAX)
9114 (VECTOR_NUMBER_MIN, state_number_to_vector_number)
9115 (symbol_number_to_vector_number): New.
9116 (order): Of vector_number_t* type.
9117 (base_t, BASE_MAX, BASE_MIN): New.
9118 (froms, tos, width, pos, check): Of base_t type.
9119 (action_number_t, ACTION_MIN, ACTION_MAX): New.
9120 (actrow): Of action_number_t type.
9121 (conflrow): Of unsigned int type.
9122 (table_ninf, base_ninf): New.
9123 (GENERATE_MUSCLE_INSERT_TABLE): Also output the `*_min' value.
9124 (muscle_insert_int_table, muscle_insert_base_table)
9125 (muscle_insert_rule_number_table): New.
9126 (prepare_tokens): Output `toknum' as int_table.
9127 (action_row): Returns a rule_number_t.
9128 Use ACTION_MIN, not SHRT_MIN.
9129 (token_actions): yydefact is rule_number_t*.
9130 (table_ninf_remap): New.
9131 (pack_table): Use it for `base' and `table'.
9132 * data/yacc.c, data/glr.c, data/lalr1.cc (YYFLAG): Remove,
9133 replaced with...
9134 (YYPACT_NINF, YYTABLE_NINF): these.
9135 (yypact, yytable): Compute their types instead of hard-coded
9136 `short'.
9137 * tests/regression.at (Web2c Actions): Adjust.
9138
5dde258a
AD
91392002-07-19 Akim Demaille <akim@epita.fr>
9140
9141 * src/scan-gram.l (id): Can start with an underscore.
9142
a945ec39
AD
91432002-07-16 Akim Demaille <akim@epita.fr>
9144
9145 * src/assoc.c, src/asssoc.h (assoc_t, assoc_to_string): New.
9146 Adjust all former `associativity' dependencies.
9147 * src/symtab.c (symbol_new): Default associativity is `undef', not
9148 `right'.
9149 (symbol_check_alias_consistence): Adjust.
9150
fae437e8
AD
91512002-07-09 Akim Demaille <akim@epita.fr>
9152
9153 * doc/bison.texinfo: Properly set the ``header'' part.
9154 Use @dircategory ``GNU programming tools'' as per Texinfo's
9155 documentation.
9156 Use @copying.
9157
1a715ef2
AD
91582002-07-09 Akim Demaille <akim@epita.fr>
9159
9160 * lib/quotearg.h: Protect against multiple inclusions.
9161 * src/location.h (location_t): Add a `file' member.
9162 (LOCATION_RESET, LOCATION_PRINT): Adjust.
9163 * src/complain.c (warn_at, complain_at, fatal_at): Drop
9164 `error_one_per_line' support.
9165
a5d50994
AD
91662002-07-09 Akim Demaille <akim@epita.fr>
9167
9168 * src/complain.h, src/complain.c (warn, complain): Remove, unused.
9169 * src/reader.c (lineno): Remove.
9170 Adjust all dependencies.
9171 (get_merge_function): Take a location and use complain_at.
9172 * src/symtab.h, src/symtab.c (symbol_make_alias): Likewise.
9173 * tests/regression.at (Invalid inputs, Mixing %token styles):
9174 Adjust.
9175
b275314e
AD
91762002-07-09 Akim Demaille <akim@epita.fr>
9177
9178 * src/parse-gram.y (rules_or_grammar_declaration): Add an error
9179 recovery rule, and forbid extensions when --yacc.
9180 (gram_error): Use complain_at.
9181 * src/reader.c (reader): Exit if there were parse errors.
9182
865b9df1
AD
91832002-07-09 Akim Demaille <akim@epita.fr>
9184
9185 * tests/synclines.at (AT_SYNCLINES_COMPILE): New.
9186 (AT_TEST_SYNCLINE): Adjust to unusual GCC outputs.
9187 Reported by R Blake <blakers@mac.com>.
9188
c76e14da
AD
91892002-07-09 Akim Demaille <akim@epita.fr>
9190
9191 * data/yacc.c: Output the copyright notive in the header.
9192
7db2ed2d
AD
91932002-07-03 Akim Demaille <akim@epita.fr>
9194
9195 * src/output.c (froms, tos): Are state_number_t.
9196 (save_column): sp, sp1, and sp2 are state_number_t.
9197 (prepare): Rename `final' as `final_state_number', `nnts' as
9198 `nterms_number', `nrules' as `rules_number', `nstates' as
9199 `states_number', and `ntokens' as `tokens_number'. Remove `nsym',
9200 unused.
9201 * data/yacc.c, data/glr.c, data/lalr1.cc: Adjust.
9202 * data/lalr1.cc (nsym_): Remove, unused.
9203
e68e0410
AD
92042002-07-03 Akim Demaille <akim@epita.fr>
9205
9206 * src/lalr.h, src/lalr.c (goto_number_t): New.
9207 * src/lalr.c (goto_list_t): New.
9208 Propagate them.
9209 * src/nullable.c (rule_list_t): New.
9210 Propagate.
9211 * src/types.h: Remove.
9212
e1a4f3a4
AD
92132002-07-03 Akim Demaille <akim@epita.fr>
9214
9215 * src/closure.c (print_fderives): Use rule_rhs_print.
9216 * src/derives.c (print_derives): Use rule_rhs_print.
9217 (rule_list_t): New, replaces `shorts'.
9218 (set_derives): Add comments.
9219 * tests/sets.at (Nullable, Firsts): Adjust.
9220
536545f3
AD
92212002-07-03 Akim Demaille <akim@epita.fr>
9222
9223 * src/output.c (prepare_actions): Free `tally' and `width'.
9224 (prepare_actions): Allocate and free `order'.
9225 * src/symtab.c (symbols_free): Free `symbols'.
9226 * src/scan-gram.l (scanner_free): Clear Flex's scanners memory.
9227 * src/output.c (m4_invoke): Move to...
9228 * src/scan-skel.l: here.
9229 (<<EOF>>): Close yyout, and free its name.
9230
8b752b00
AD
92312002-07-03 Akim Demaille <akim@epita.fr>
9232
9233 Fix some memory leaks, and fix a bug: state 0 was examined twice.
9234
9235 * src/LR0.c (new_state): Merge into...
9236 (state_list_append): this.
9237 (new_states): Merge into...
9238 (generate_states): here.
9239 (set_states): Don't ensure a proper `errs' state member here, do it...
9240 * src/conflicts.c (conflicts_solve): here.
9241 * src/state.h, src/state.c: Comment changes.
9242 (state_t): Rename member `shifts' as `transitions'.
9243 Adjust all dependencies.
9244 (errs_new): For consistency, also take the values as argument.
9245 (errs_dup): Remove.
9246 (state_errs_set): New.
9247 (state_reductions_set, state_transitions_set): Assert that no
9248 previous value was assigned.
9249 (state_free): New.
9250 (states_free): Use it.
9251 * src/conflicts.c (resolve_sr_conflict): Don't use an `errs_t' as
9252 temporary storage: use `errs' and `nerrs' as elsewhere.
9253 (set_conflicts): Allocate and free this `errs'.
9254
613f5e1a
AD
92552002-07-02 Akim Demaille <akim@epita.fr>
9256
9257 * lib/libiberty.h: New.
9258 * lib: Update the bitset implementation from upstream.
9259 * src/closure.c, src/lalr.c, src/output.c, src/print_graph.c,
9260 * src/state.c: Use BITSET_FOR_EACH, not BITSET_EXECUTE.
9261 * src/main.c: Adjust bitset stats calls.
9262
26e0cadc
PE
92632002-07-01 Paul Eggert <eggert@twinsun.com>
9264
9265 * src/scan-gram.l (<SC_ESCAPED_CHARACTER>): Convert to unsigned
9266 char, so that negative chars don't collide with $.
9267
1154cced
AD
92682002-06-30 Akim Demaille <akim@epita.fr>
9269
9270 Have the GLR tests be `warning' checked, and fix the warnings.
9271
9272 * data/glr.c (YYFPRINTF): Always define it, not only when YYDEBUG
9273 (yyuserAction, yyreportAmbiguity): `Use' all the arguments.
9274 (yyremoveDeletes): `yyi' and `yyj' are size_t.
9275 Use YYFPRINTF when under if (YYDEBUG) to avoid empty `if' bodies.
9276 (yyaddDeferredAction): static.
9277 (yyglrReduce): yyi, yyk, amd yyposn are size_t.
9278 (yyreportParseError): yyprefix is const.
9279 yytokenp is used only when verbose.
9280 (yy__GNUC__): Replace with __GNUC__.
9281 (yypdumpstack): yyi is size_t.
9282 (yypreference): Un-yy local variables and arguments, to avoid
9283 clashes with `yyr1'. Anyway, we are not in the user name space.
9284 (yytname_size): be an int, as is compared with ints.
9285 * tests/testsuite.at (AT_COMPILE, AT_PARSER_CHECK): New.
9286 Use them.
9287 * tests/cxx-gram.at: Use quotation to protect $1.
9288 Use AT_COMPILE to enable warnings hunts.
9289 Prototype yylex and yyerror.
9290 `Use' argc.
9291 Include `string.h', not `strings.h'.
9292 Produce and prototype stmtMerge only when used.
9293 yylex takes a location.
9294
97650f4e
AD
92952002-06-30 Akim Demaille <akim@epita.fr>
9296
9297 We spend a lot of time in quotearg, in particular when --verbose.
9298
9299 * src/symtab.c (symbol_get): Store a quoted version of the key.
9300 (symbol_tag_get, symbol_tag_get_n, symbol_tag_print): Remove.
9301 Adjust all callers.
9302
d2576365
AD
93032002-06-30 Akim Demaille <akim@epita.fr>
9304
9305 * src/state.h (reductions_t): Rename member `nreds' as num.
9306 (errs_t): Rename members `nerrs' and `errs' as `num' and `symbols'.
9307 * src/state.c (ERRS_ALLOC, REDUCTIONS_ALLOC): Use the correct types.
9308
ccaf65bc
AD
93092002-06-30 Akim Demaille <akim@epita.fr>
9310
9311 * src/state.h, src/state.c (shift_t, SHIFT_SYMBOL, SHIFT_IS_SHIFT)
9312 (SHIFT_IS_GOTO, SHIFT_IS_ERROR, SHIFT_DISABLE, SHIFT_IS_DISABLED)
9313 (shifts_to): Rename as...
9314 (transition_t, TRANSITION_SYMBOL, TRANSITION_IS_TRANSITION)
9315 (TRANSITION_IS_GOTO, TRANSITION_IS_ERROR, TRANSITION_DISABLE)
9316 (TRANSITION_IS_DISABLED, transitions_to): these.
9317
87675353
AD
93182002-06-30 Akim Demaille <akim@epita.fr>
9319
9320 * src/print.c (print_shifts, print_gotos): Merge into...
9321 (print_transitions): this.
9322 (print_transitions, print_errs, print_reductions): Align the
9323 lookaheads columns.
9324 (print_core, print_transitions, print_errs, print_state,
9325 print_grammar): Output empty lines separator before, not after.
9326 (state_default_rule_compute): Rename as...
9327 (state_default_rule): this.
9328 * tests/conflicts.at (Defaulted Conflicted Reduction),
9329 (Unresolved SR Conflicts, Resolved SR Conflicts): Adjust.
9330 * tests/regression.at (Rule Line Numbers, Web2c Report): Adjust.
9331
ce4ccb4b
AD
93322002-06-30 Akim Demaille <akim@epita.fr>
9333
9334 Display items as we display rules.
9335
9336 * src/gram.h, src/gram.c (rule_lhs_print): New.
9337 * src/gram.c (grammar_rules_partial_print): Use it.
9338 * src/print.c (print_core): Likewise.
9339 * tests/conflicts.at (Defaulted Conflicted Reduction),
9340 (Unresolved SR Conflicts): Adjust.
9341 (Unresolved SR Conflicts): Adjust and rename as...
9342 (Resolved SR Conflicts): this, as was meant.
9343 * tests/regression.at (Web2c Report): Adjust.
9344
bc933ef1
AD
93452002-06-30 Akim Demaille <akim@epita.fr>
9346
9347 * src/print.c (state_default_rule_compute): New, extracted from...
9348 (print_reductions): here.
9349 Pessimize, but clarify the code.
9350 * tests/conflicts.at (Defaulted Conflicted Reduction): New.
9351
53d4308d
AD
93522002-06-30 Akim Demaille <akim@epita.fr>
9353
9354 * src/output.c (action_row): Let default_rule be always a rule
9355 number.
9356
574fb2d5
AD
93572002-06-30 Akim Demaille <akim@epita.fr>
9358
9359 * src/closure.c (print_firsts, print_fderives, closure):
9360 Use BITSET_EXECUTE.
9361 * src/lalr.c (lookaheads_print): Likewise.
9362 * src/state.c (state_rule_lookaheads_print): Likewise.
9363 * src/print_graph.c (print_core): Likewise.
9364 * src/print.c (print_reductions): Likewise.
9365 * src/output.c (action_row): Likewise.
9366 Use SHIFT_IS_DISABLED, SHIFT_IS_SHIFT and SHIFT_SYMBOL.
9367
05811fd7
AD
93682002-06-30 Akim Demaille <akim@epita.fr>
9369
9370 * src/print_graph.c: Use report_flag.
9371
0e4d5753
AD
93722002-06-30 Akim Demaille <akim@epita.fr>
9373
9374 * src/lalr.c (traverse, digraph, matrix_print, transpose): Move
9375 to...
9376 * src/relation.h, src/relation.c (traverse, relation_digraph)
9377 (relation_print, relation_transpose): New.
9378
24c7d800
AD
93792002-06-30 Akim Demaille <akim@epita.fr>
9380
9381 * src/state.h, src/state.c (shifts_to): New.
9382 * src/lalr.c (build_relations): Use it.
9383
9222837b
AD
93842002-06-30 Akim Demaille <akim@epita.fr>
9385
9386 * src/gram.h (rule_number_t, RULE_NUMBER_MAX, int_of_rule_number)
9387 (item_number_of_rule_number, rule_number_of_item_number): New.
9388 * src/LR0.c, src/closure.c, src/derives.c, src/derives.h,
9389 * src/gram.c, src/lalr.c, src/nullable.c, src/output.c, src/print.c,
9390 * src/print_graph.c, src/reader.c, src/reduce.c, src/reduce.h:
9391 Propagate their use.
9392 Much remains to be done, in particular wrt `shorts' from types.h.
9393
260008e5
AD
93942002-06-30 Akim Demaille <akim@epita.fr>
9395
9396 * src/symtab.c (symbol_new): Initialize the `printer' member.
9397
8a731ca8
AD
93982002-06-30 Akim Demaille <akim@epita.fr>
9399
9400 * src/LR0.c (save_reductions): Remove, replaced by...
9401 * src/state.h, src/state.c (state_reductions_set): New.
9402 (reductions, errs): Rename as...
9403 (reductions_t, errs_t): these.
9404 Adjust all dependencies.
9405
32e1e0a4
AD
94062002-06-30 Akim Demaille <akim@epita.fr>
9407
9408 * src/LR0.c (state_list_t, state_list_append): New.
9409 (first_state, last_state): Now symbol_list_t.
9410 (this_state): Remove.
9411 (new_itemsets, append_states, save_reductions): Take a state_t as
9412 argument.
9413 (set_states, generate_states): Adjust.
9414 (save_shifts): Remove, replaced by...
9415 * src/state.h, src/state.c (state_shifts_set): New.
9416 (shifts): Rename as...
9417 (shifts_t): this.
9418 Adjust all dependencies.
9419 * src/state.h (state_t): Remove the `next' member.
9420
e5fb6710
AD
94212002-06-30 Akim Demaille <akim@epita.fr>
9422
9423 * src/vcg.c (quote): Use slot 2, since we often pass symbol tag
9424 escaped in slot 0.
9425
c7ca99d4
AD
94262002-06-30 Akim Demaille <akim@epita.fr>
9427
9428 Use hash.h for the state hash table.
9429
9430 * src/LR0.c (STATE_HASH_SIZE, state_hash): Remove.
9431 (allocate_storage): Use state_hash_new.
9432 (free_storage): Use state_hash_free.
9433 (new_state, get_state): Adjust.
9434 * src/lalr.h, src/lalr.c (states): Move to...
9435 * src/states.h (state_t): Remove the `link' member, no longer
9436 used.
9437 * src/states.h, src/states.c: here.
9438 (state_hash_new, state_hash_free, state_hash_lookup)
9439 (state_hash_insert, states_free): New.
9440 * src/states.c (state_table, state_compare, state_hash): New.
9441 * src/output.c (output_actions): Do not free states now, since we
9442 still need to know the final_state number in `prepare', called
9443 afterwards. Do it...
9444 * src/main.c (main): here: call states_free after `output'.
9445
df0e7316
AD
94462002-06-30 Akim Demaille <akim@epita.fr>
9447
9448 * src/state.h, src/state.c (state_new): New, extracted from...
9449 * src/LR0.c (new_state): here.
9450 * src/state.h (STATE_ALLOC): Move to...
9451 * src/state.c: here.
9452 * src/LR0.h, src/LR0.c (nstates, final_state): Move to...
9453 * src/state.h, src/state.c: here.
9454
39f41916
AD
94552002-06-30 Akim Demaille <akim@epita.fr>
9456
9457 * src/reader.c (gensym): Rename as...
9458 * src/symtab.h, src/symtab.c (dummy_symbol_get): this.
9459 (getsym): Rename as...
9460 (symbol_get): this.
9461
d57650a5
AD
94622002-06-30 Akim Demaille <akim@epita.fr>
9463
9464 * src/state.h (state_number_t, STATE_NUMBER_MAX): New.
9465 * src/LR0.c, src/LR0.h, src/conflicts.c, src/lalr.c, src/lalr.h,
9466 * src/output.c, src/print.c, src/print_graph.c: Propagate.
9467 * src/LR0.h, src/LR0.h (final_state): Is a state_t*.
9468
5a08f1ce
AD
94692002-06-30 Akim Demaille <akim@epita.fr>
9470
9471 Make the test suite pass with warnings checked.
9472
9473 * tests/actions.at (Printers and Destructors): Improve.
9474 Avoid unsigned vs. signed issues.
9475 * tests/calc.at: Don't exercise the scanner here, do it...
9476 * tests/input.at (Torturing the Scanner): here.
9477
720623af
PH
94782002-06-28 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
9479
88e7e941 9480 * data/glr.c: Correct typo in Emacs-mode directive. Slightly
720623af
PH
9481 reorganize first lines parallel to yacc.c.
9482
fb8135fa
AD
94832002-06-28 Akim Demaille <akim@epita.fr>
9484
9485 * data/c.m4 (b4_copyright, b4_sint_type, b4_uint_type, b4_token_define)
9486 (b4_token_enum, b4_token_defines): New, factored from...
9487 * data/lalr1.cc, data/yacc.c, glr.c: here.
9488
41442480
AD
94892002-06-28 Akim Demaille <akim@epita.fr>
9490
9491 * data/yacc.c (yydestruct, yysymprint): Pacify GCC warnings for
9492 unused variables.
9493 * src/output.c (merger_output): static.
9494
e0e5bf84
AD
94952002-06-28 Akim Demaille <akim@epita.fr>
9496
ba0fe3c7 9497 * src/reader.h: s/grammer_current_rule_merge_set/grammar_.../.
e0e5bf84
AD
9498 * src/conflicts.c (conflicts_total_count): `i' is unsigned, to
9499 pacify GCC.
9500 * src/output.c (save_row): Initialize all the variables to pacify GCC.
e0e5bf84 9501
676385e2
PH
95022002-06-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
9503
9504 Accumulated changelog for new GLR parsing features.
9505
6a254321 9506 * src/conflicts.c (count_total_conflicts): Change name to
676385e2
PH
9507 conflicts_total_count.
9508 * src/conflicts.h: Ditto.
9509 * src/output.c (token_actions): Use the new name.
9510 (output_conflicts): Change conflp => conflict_list_heads, and
9511 confl => conflict_list for better readability.
9512 * data/glr.c: Use the new names.
9513 * NEWS: Add self to GLR announcement.
e0e5bf84 9514
676385e2
PH
9515 * src/reader.c (free_merger_functions): Cleanup: XFREE->free.
9516
9517 * doc/bison.texinfo (GLR Parsers): Make corrections suggested by
9518 Akim Demaille.
9519
9520 * data/bison.glr: Change name to glr.c
9521 * data/glr.c: Renamed from bison.glr.
9522 * data/Makefile.am: Add glr.c
e0e5bf84
AD
9523
9524 * src/getargs.c:
9525
676385e2 9526 * src/symlist.h: Add dprec and merger fields to symbol_list_s.
ba0fe3c7 9527 * src/symlist.c (symbol_list_new): Initialize dprec and merger fields.
e0e5bf84 9528
676385e2
PH
9529 Originally 2002-06-16 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
9530
9531 * data/bison.glr: Be sure to restore the
9532 current #line when returning to the skeleton contents after having
9533 exposed the input file's #line.
9534
9535 Originally 2002-06-13 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
9536
9537 * data/bison.glr: Bring up to date with changes to bison.simple.
9538
9539 Originally 2002-06-03 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
9540
9541 * data/bison.glr: Correct definitions that use b4_prefix.
9542 Various reformatting.
9543 (GLRStack): Make yychar (in YYPURE case) and yytokenp as part of stack.
9544 (yyreportParseError, yyrecoverParseError, yyprocessOneStack): remove
9545 yytokenp argument; now part of stack.
9546 (yychar): Define to behave as documented.
9547 (yyclearin): Ditto.
e0e5bf84 9548
676385e2
PH
9549 Originally 2002-05-14 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
9550
9551 * src/reader.h: Add declaration for free_merger_functions.
9552
9553 * src/reader.c (merge_functions): New variable.
9554 (get_merge_function): New function.
9555 (free_merger_functions): New function.
9556 (readgram): Check for %prec that is not followed by a symbol.
9557 Handle %dprec and %merge declarations.
9558 (packgram): Initialize dprec and merger fields in rules array.
9559
9560 * src/output.c (conflict_tos, conflrow, conflict_table, conflict_list,
9561 conflict_list_cnt, conflict_list_free): New variables.
9562 (table_grow): Also grow conflict_table.
e0e5bf84 9563 (prepare_rules): Output dprec and merger tables.
676385e2 9564 (conflict_row): New function.
e0e5bf84 9565 (action_row): Output conflict lists for GLR parser. Don't use
676385e2
PH
9566 default reduction in conflicted states for GLR parser so that there
9567 are spaces for the conflict lists.
9568 (save_row): Also save conflict information.
9569 (token_actions): Allocate conflict list.
9570 (merger_output): New function.
9571 (pack_vector): Pack conflict table, too.
9572 (output_conflicts): New function to output yyconflp and yyconfl.
9573 (output_check): Allocate conflict_tos.
9574 (output_actions): Output conflict tables, also.
9575 (output_skeleton): Output b4_mergers definition.
9576 (prepare): Output b4_max_rhs_length definition.
9577 Use 'bison.glr' as default skeleton for GLR parsers.
9578
9579 * src/gram.c (glr_parser): New flag.
9580 (grammar_free): Call free_merger_functions.
9581
9582 * src/conflicts.c (count_rr_conflicts): Augment to optionally count
9583 all pairs of conflicting reductions, rather than just all tokens
9584 causing conflicts. Needed to size conflict tables.
e0e5bf84 9585 (conflicts_output): Modify call to count_rr_conflicts for new
676385e2
PH
9586 interface.
9587 (conflicts_print): Ditto.
9588 (count_total_conflicts): New function.
9589
9590 * src/reader.h (merger_list): New type.
9591 (merge_functions): New variable.
9592
9593 * src/lex.h (tok_dprec, tok_merge): New token types.
9594
9595 * src/gram.h (rule_s): Add dprec and merger fields.
9596 (glr_parser): New flag.
9597
9598 * src/conflicts.h (count_total_conflicts): New function.
9599
9600 * src/options.c (option_table): Add %dprec, %merge, and %glr-parser.
9601
9602 * doc/bison.texinfo (Generalized LR Parsing): New section.
9603 (GLR Parsers): New section.
9604 (Language and Grammar): Mention GLR parsing.
9605 (Table of Symbols): Add %dprec, %glr-parser, %merge, GLR
9606 Correct typo ("tge" -> "the").
9607
9608 * data/bison.glr: New skeleton for GLR parsing.
9609
9610 * tests/cxx-gram.at: New tests for GLR parsing.
9611
9612 * tests/testsuite.at: Include cxx-gram.at.
9613
9614 * tests/Makefile.am: Add cxx-gram.at.
e0e5bf84 9615
676385e2
PH
9616 * src/parse-gram.y:
9617
9618 * src/scan-gram.l: Add %dprec, %glr-parser, %merge.
9619
9620 * src/parse-gram.y: Grammar for %dprec, %merge, %glr-parser.
e0e5bf84 9621
b5480d74 96222002-06-27 Akim Demaille <akim@epita.fr>
e2aaf4c4
AD
9623
9624 * src/options.h, src/options.c: Remove.
9625 * src/getargs.c (short_options, long_options): New.
9626
60491a94
AD
96272002-06-27 Akim Demaille <akim@epita.fr>
9628
9629 * data/bison.simple, data/bison.c++: Rename as...
9630 * data/yacc.c, data/lalr1.cc: these.
9631 * doc/bison.texinfo (Environment Variables): Remove.
9632
9be0c25b
AD
96332002-06-25 Raja R Harinath <harinath@cs.umn.edu>
9634
9635 * src/getargs.c (report_argmatch): Initialize strtok().
9636
1ae72863
AD
96372002-06-20 Akim Demaille <akim@epita.fr>
9638
9639 * data/bison.simple (b4_symbol_actions): New, replaces...
9640 (b4_symbol_destructor, b4_symbol_printer): these.
9641 (yysymprint): Be sure to call YYPRINT only for tokens, and using
9642 user token numbers.
9643
87542d29
AD
96442002-06-20 Akim Demaille <akim@epita.fr>
9645
9646 * data/bison.simple (yydestructor): Rename as...
9647 (yydestruct): this.
9648
1a31ed21
AD
96492002-06-20 Akim Demaille <akim@epita.fr>
9650
9651 * src/symtab.h, src/symtab.c (symbol_type_set)
9652 (symbol_destructor_set, symbol_precedence_set): The location is
9653 the last argument.
9654 Adjust all callers.
9655
e776192e
AD
96562002-06-20 Akim Demaille <akim@epita.fr>
9657
9658 * src/parse-gram.y (YYPRINT, yyprint): Don't mess with the parser
9659 internals.
9660 * src/reader.h, src/reader.c (grammar_current_rule_prec_set):
9661 Takes a location.
9662 * src/symtab.h, src/symtab.c (symbol_class_set)
9663 (symbol_user_token_number_set): Likewise.
9664 Adjust all callers.
9665 Promote complain_at.
9666 * tests/input.at (Type Clashes): Adjust.
9667
5c1180b3
AD
96682002-06-20 Akim Demaille <akim@epita.fr>
9669
9670 * data/bison.simple (YYLEX): Fix the declaration when
9671 %pure-parser.
9672
e3170060
AD
96732002-06-20 Akim Demaille <akim@epita.fr>
9674
9675 * data/bison.simple (yysymprint): Don't print the token number,
9676 just its name.
9677 * tests/actions.at (Destructors): Rename as...
9678 (Printers and Destructors): this.
9679 Also exercise %printer.
9680
253862fd
AD
96812002-06-20 Akim Demaille <akim@epita.fr>
9682
9683 * data/bison.simple (YYDSYMPRINT): New.
9684 Use it to remove many of the #if YYDEBUG/if (yydebug).
9685
366eea36
AD
96862002-06-20 Akim Demaille <akim@epita.fr>
9687
9688 * src/symtab.h, src/symtab.c (symbol_t): printer and
9689 printer_location are new members.
9690 (symbol_printer_set): New.
9691 * src/parse-gram.y (PERCENT_PRINTER): New token.
9692 Handle its associated rule.
9693 * src/scan-gram.l: Adjust.
9694 (handle_destructor_at, handle_destructor_dollar): Rename as...
9695 (handle_symbol_code_at, handle_symbol_code_dollar): these.
9696 * src/output.c (symbol_printers_output): New.
9697 (output_skeleton): Call it.
9698 * data/bison.simple (yysymprint): New. Cannot be named yyprint
9699 since there are already many grammar files with a user `yyprint'.
9700 Replace the calls to YYPRINT to calls to yysymprint.
9701 * tests/calc.at: Adjust.
9702 * tests/torture.at (AT_DATA_STACK_TORTURE): Remove YYPRINT: it was
9703 taking advantage of parser very internal details (stack size!).
9704
4f25ebb0
AD
97052002-06-20 Akim Demaille <akim@epita.fr>
9706
9707 * src/scan-gram.l: Complete the scanner with the missing patterns
9708 to pacify Flex.
9709 Use `quote' and `symbol_tag_get' where appropriate.
9710
93b68a0e
AD
97112002-06-19 Akim Demaille <akim@epita.fr>
9712
9713 * tests/actions.at (Destructors): Augment to test locations.
9714 * data/bison.simple (yydestructor): Pass it the current location
9715 if locations are enabled.
9716 Prototype only when __STDC__ or C++.
9717 Change the argument names to move into the yy name space: there is
9718 user code here.
9719
58612f1d
AD
97202002-06-19 Akim Demaille <akim@epita.fr>
9721
74310291
AD
9722 * data/bison.simple (b4_pure_if): New.
9723 Use it instead of #ifdef YYPURE.
9724
97252002-06-19 Akim Demaille <akim@epita.fr>
9726
9727 * data/bison.simple (b4_location_if): New.
58612f1d
AD
9728 Use it instead of #ifdef YYLSP_NEEDED.
9729
f25bfb75
AD
97302002-06-19 Akim Demaille <akim@epita.fr>
9731
9732 Prepare @$ in %destructor, but currently don't bind it in the
9733 skeleton, as %location use is not cleaned up yet.
9734
9735 * src/scan-gram.l (handle_dollar, handle_destructor_at)
9736 (handle_action_at): New.
9737 (handle_at, handle_action_dollar, handle_destructor_dollar): Take
9738 a braced_code_t and a location as additional arguments.
9739 (handle_destructor_dollar): Instead of requiring `b4_eval', just
9740 unquote one when outputting `b4_dollar_dollar'.
9741 Adjust callers.
9742 * data/bison.simple (b4_eval): Remove.
9743 (b4_symbol_destructor): Adjust.
9744 * tests/input.at (Invalid @n): Adjust.
9745
c732d2c6
AD
97462002-06-19 Zack Weinberg <zack@codesourcery.com>
9747
9748 * doc/bison.texinfo: Document ability to have multiple
9749 prologue sections.
9750
8c165d89
AD
97512002-06-18 Akim Demaille <akim@epita.fr>
9752
9753 * src/files.c (compute_base_names): When computing the output file
9754 names from the input file name, strip the directory part.
9755
ca98bf57
AD
97562002-06-18 Akim Demaille <akim@epita.fr>
9757
9758 * data/bison.simple.new: Comment changes.
9759 Reported by Andreas Schwab.
9760
0bfb02ff
AD
97612002-06-18 Matt Kraai <kraai@alumni.cmu.edu>
9762
9763 * data/bison.simple (yyoverflowlab): #ifndef yyoverflow, so that
9764 there are no `label `yyoverflowlab' defined but not used' warnings
9765 when yyoverflow is defined.
9766
24c0aad7
AD
97672002-06-18 Akim Demaille <akim@epita.fr>
9768
9769 * src/symtab.h, src/symtab.c (symbol_t): destructor_location is a
9770 new member.
9771 (symbol_destructor_set): Adjust.
9772 * src/output.c (symbol_destructors_output): Output the destructor
9773 locations.
9774 Output the symbol name.
9775 * data/bison.simple (b4_symbol_destructor): Adjust.
9776
5719c109
AD
97772002-06-18 Cris Bailiff <c.bailiff@awayweb.com>
9778 and Akim Demaille <akim@epita.fr>
9779
9780 * data/bison.simple.new (yyerrlab1): Be sure to pop and destroy
9781 what's left on the stack when the error recovery hits EOF.
9782 * tests/actions.at (Destructors): Complete to exercise this case.
9783
9280d3ef
AD
97842002-06-17 Akim Demaille <akim@epita.fr>
9785
9786 * data/m4sugar/m4sugar.m4 (m4_map): Recognize when the list of
9787 arguments is really empty, not only equal to `[]'.
9788 * src/symtab.h, src/symtab.c (symbol_t): `destructor' is a new
9789 member.
9790 (symbol_destructor_set): New.
9791 * src/output.c (symbol_destructors_output): New.
9792 * src/reader.h (brace_code_t, current_braced_code): New.
9793 * src/scan-gram.l (BRACED_CODE): Use it to branch on...
9794 (handle_dollar): Rename as...
9795 (handle_action_dollar): this.
9796 (handle_destructor_dollar): New.
9797 * src/parse-gram.y (PERCENT_DESTRUCTOR): New.
9798 (grammar_declaration): Use it.
9799 * data/bison.simple (yystos): Is always defined.
9800 (yydestructor): New.
9801 * tests/actions.at (Destructors): New.
9802 * tests/calc.at (_AT_CHECK_CALC_ERROR): Don't rely on egrep.
9803
dafdc66f
AD
98042002-06-17 Akim Demaille <akim@epita.fr>
9805
9806 * src/symlist.h, src/symlist.c (symbol_list_length): New.
9807 * src/scan-gram.l (handle_dollar, handle_at): Compute the
9808 rule_length only when needed.
9809 * src/output.c (actions_output, token_definitions_output): Output
9810 the full M4 block.
9811 * src/symtab.c: Don't access directly to the symbol tag, use
9812 symbol_tag_get.
9813 * src/parse-gram.y: Use symbol_list_free.
9814
56c47203
AD
98152002-06-17 Akim Demaille <akim@epita.fr>
9816
9817 * src/reader.h, src/reader.c (symbol_list, symbol_list_new)
9818 (symbol_list_prepend, get_type_name): Move to...
9819 * src/symlist.h, src/symlist.c (symbol_list_t, symbol_list_new)
9820 (symbol_list_prepend, symbol_list_n_type_name_get): here.
9821 Adjust all callers.
9822 (symbol_list_free): New.
9823 * src/scan-gram.l (handle_dollar): Takes a location.
9824 * tests/input.at (Invalid $n): Adjust.
9825
1e0bab92
AD
98262002-06-17 Akim Demaille <akim@epita.fr>
9827
9828 * src/reader.h, src/reader.c (symbol_list_new): Export it.
9829 (symbol_list_prepend): New.
9830 * src/parse-gram.y (%union): `list' is a new member.
9831 (symbols.1): New, replaces...
9832 (terms_to_prec.1, nterms_to_type.1): these.
9833 * src/symtab.h, src/symtab.c (symbol_type_set, symbol_precedence_set)
9834 Take a location as additional argument.
9835 Adjust all callers.
9836
04e60654
AD
98372002-06-15 Akim Demaille <akim@epita.fr>
9838
9839 * src/parse-gram.y: Move %token in the declaration section so that
9840 we don't depend upon CVS Bison.
9841
10e5b8bd
AD
98422002-06-15 Akim Demaille <akim@epita.fr>
9843
9844 * src/state.h, src/state.c (state_rule_lookaheads_print): New.
9845 * src/print.c (print_core): Use it.
9846
9801d40c
AD
98472002-06-15 Akim Demaille <akim@epita.fr>
9848
9849 * src/conflicts.c (log_resolution): Accept the rule involved in
9850 the sr conflicts instead of the lookahead number that points to
9851 that rule.
9852 (flush_reduce): Accept the current lookahead vector as argument,
9853 instead of the index in LA.
9854 (resolve_sr_conflict): Accept the current number of lookahead
9855 bitset to consider for the STATE, instead of the index in LA.
9856 (set_conflicts): Adjust.
9857 * src/lalr.c, src/lalr.h, src/state.h: Comment changes.
9858
c0263492
AD
98592002-06-15 Akim Demaille <akim@epita.fr>
9860
9861 * src/state.h (state_t): Replace the `lookaheadsp' member, a
9862 short, with `lookaheads' (bitsetv), `lookaheads_rule' (rule_t**).
9863 Adjust all dependencies.
9864 * src/lalr.c (initialize_lookaheads): Split into...
9865 (states_lookaheads_count, states_lookaheads_initialize): these.
9866 (lalr): Adjust.
9867
9757c359
AD
98682002-06-15 Akim Demaille <akim@epita.fr>
9869
9870 * src/gram.h, src/gram.c (grammar_rules_partial_print): New, eved
9871 out of...
9872 (grammar_rules_print): here.
9873 * src/reduce.c (reduce_output): Use it.
9874 * tests/reduce.at (Useless Rules, Reduced Automaton)
9875 (Underivable Rules): Adjust.
9876
6b98e4b5
AD
98772002-06-15 Akim Demaille <akim@epita.fr>
9878
9879 Copy BYacc's nice way to report the grammar.
9880
9881 * src/gram.h, src/gram.c (grammar_rhs_print, grammar_rules_print):
9882 New.
9883 Don't print the rules' location, it is confusing and useless.
9884 (rule_print): Use grammar_rhs_print.
9885 * src/print.c (print_grammar): Use grammar_rules_print.
9886
6b98e4b5
AD
98872002-06-15 Akim Demaille <akim@epita.fr>
9888
9889 Complete and rationalize `useless thing' warnings.
9890
9891 * src/symtab.h, src/symtab.c (symbol_tag_get, symbol_tag_get_n)
9892 (symbol_tag_print): New.
9893 Use them everywhere in place of accessing directly the tag member.
9894 * src/gram.h, src/gram.c (rule_print): New.
9895 Use it where a rule used to be printed `by hand'.
9896 * src/reduce.c (nonterminals_reduce): Report the use nonterminals.
9897 (reduce_grammar_tables): Report the useless rules.
9898 (reduce_print): Useless things are a warning, not an error.
9899 Report it as such.
9900 * tests/reduce.at (Useless Nonterminals, Useless Rules):
9901 (Reduced Automaton, Underivable Rules): Adjust.
9902 * tests/regression.at (Web2c Report, Web2c Report): Adjust.
9903 * tests/conflicts.at (Unresolved SR Conflicts)
9904 (Solved SR Conflicts): Adjust.
9905
ee000ba4
AD
99062002-06-15 Akim Demaille <akim@epita.fr>
9907
9908 Let symbols have a location.
9909
9910 * src/symtab.h, src/symtab.c (symbol_t): Location is a new member.
9911 (getsym): Adjust.
9912 Adjust all callers.
9913 * src/complain.h, src/complain.c (complain_at, fatal_at, warn_at):
9914 Use location_t, not int.
9915 * src/symtab.c (symbol_check_defined): Take advantage of the
9916 location.
9917 * tests/regression.at (Invalid inputs): Adjust.
9918
8efe435c
AD
99192002-06-15 Akim Demaille <akim@epita.fr>
9920
9921 * src/parse-gram.y (YYLLOC_DEFAULT, current_lhs_location): New.
9922 (input): Don't try to initialize yylloc here, do it in the
9923 scanner.
9924 * src/scan-gram.l (YY_USER_INIT): Initialize yylloc.
9925 * src/gram.h (rule_t): Change line and action_line into location
9926 and action_location, of location_t type.
9927 Adjust all dependencies.
9928 * src/location.h, src/location.c (empty_location): New.
9929 * src/reader.h, src/reader.c (grammar_start_symbol_set)
9930 (grammar_symbol_append, grammar_rule_begin, grammar_rule_end)
9931 (grammar_current_rule_symbol_append)
9932 (grammar_current_rule_action_append): Expect a location as argument.
9933 * src/reader.c (grammar_midrule_action): Adjust to attach an
9934 action's location as dummy symbol location.
9935 * src/symtab.h, src/symtab.c (startsymbol_location): New.
9936 * tests/regression.at (Web2c Report, Rule Line Numbers): Adjust
9937 the line numbers.
9938
1921f1d7
AD
99392002-06-14 Akim Demaille <akim@epita.fr>
9940
9941 Grammar declarations may be found in the grammar section.
9942
9943 * src/parse-gram.y (rules_or_grammar_declaration): New.
9944 (declarations): Each declaration may end with a semicolon, not
9945 just...
9946 (grammar_declaration): `"%union"'.
9947 (grammar): Branch to rules_or_grammar_declaration.
9948
4515534c
AD
99492002-06-14 Akim Demaille <akim@epita.fr>
9950
9951 * src/main.c (main): Invoke scanner_free.
9952
f958596b
AD
99532002-06-14 Akim Demaille <akim@epita.fr>
9954
9955 * src/output.c (m4_invoke): Extracted from...
9956 (output_skeleton): here.
9957 Free tempfile.
9958
2c569025
AD
99592002-06-14 Akim Demaille <akim@epita.fr>
9960
9961 * src/parse-gram.y (directives, directive, gram)
9962 (grammar_directives, precedence_directives, precedence_directive):
9963 Rename as...
9964 (declarations, declaration, grammar, grammar_declaration)
9965 (precedence_declaration, precedence_declarator): these.
9966 (symbol_declaration): New.
9967
592e8d4d
AD
99682002-06-14 Akim Demaille <akim@epita.fr>
9969
9970 * src/files.c (action_obstack): Remove, unused.
9971 (output_obstack): Remove it, and all its dependencies, as it is no
9972 longer needed.
9973 * src/reader.c (epilogue_set): Build the epilogue in the
9974 muscle_obstack.
9975 * src/output.h, src/output.c (muscle_obstack): Move to...
9976 * src/muscle_tab.h, src/muscle_tab.h: here.
9977 (muscle_init): Initialize muscle_obstack.
9978 (muscle_free): New.
9979 * src/main.c (main): Call it.
9980
0c15323d
AD
99812002-06-14 Akim Demaille <akim@epita.fr>
9982
9983 * src/location.h: New, extracted from...
9984 * src/reader.h: here.
9985 * src/Makefile.am (noinst_HEADERS): Merge into
9986 (bison_SOURCES): this.
9987 Add location.h.
9988 * src/parse-gram.y: Use location_t instead of Bison's.
9989 * src/reader.h, src/reader.c (prologue_augment, epilogue_set):
9990 Use location_t instead of ints.
9991
e96c9728
AD
99922002-06-14 Akim Demaille <akim@epita.fr>
9993
9994 * data/bison.simple, data/bison.c++: Be sure to restore the
9995 current #line when returning to the skeleton contents after having
9996 exposed the input file's #line.
9997
75d1fe16
AD
99982002-06-12 Akim Demaille <akim@epita.fr>
9999
10000 * src/scan-gram.l (SC_BRACED_CODE): Don't use `<.*>', it is too
10001 eager.
10002 * tests/actions.at (Exotic Dollars): New.
10003
6c35d22c
AD
100042002-06-12 Akim Demaille <akim@epita.fr>
10005
10006 * src/scan-gram.l (SC_PROLOGUE): Don't eat characters amongst
10007 ['"/] too eagerly.
10008 * tests/input.at (Torturing the Scanner): New.
10009
1d6412ad
AD
100102002-06-11 Akim Demaille <akim@epita.fr>
10011
10012 * src/scan-gram.l (YY_OBS_INIT): Remove, replace with...
10013 [SC_COMMENT,SC_STRING,SC_CHARACTER,SC_BRACED_CODE,SC_PROLOGUE]
10014 [SC_EPILOGUE]: Output the quadrigraphs only when not in a comment.
10015 * src/reader.h, src/scan-gram.l (scanner_initialize): this.
10016 * src/reader.c (reader): Use it.
10017
4cdb01db
AD
100182002-06-11 Akim Demaille <akim@epita.fr>
10019
10020 * src/scan-gram.l (YY_OBS_FINISH): Don't set yylval.
10021 Adjust all callers.
10022 (scanner_last_string_free): New.
10023
44995b2e
AD
100242002-06-11 Akim Demaille <akim@epita.fr>
10025
10026 * src/scan-gram.l (YY_INIT, YY_GROW, YY_FINISH): Rename as...
10027 (YY_OBS_INIT, YY_OBS_GROW, YY_OBS_FINISH): these.
10028 (last_string, YY_OBS_FREE): New.
10029 Use them when returning an ID.
10030
e9955c83
AD
100312002-06-11 Akim Demaille <akim@epita.fr>
10032
10033 Have Bison grammars parsed by a Bison grammar.
10034
10035 * src/reader.c, src/reader.h (prologue_augment): New.
10036 * src/reader.c (copy_definition): Remove.
10037
10038 * src/reader.h, src/reader.c (gram_start_symbol_set, prologue_augment)
10039 (grammar_symbol_append, grammar_rule_begin, grammar_midrule_action)
10040 (grammar_current_rule_prec_set, grammar_current_rule_check)
10041 (grammar_current_rule_symbol_append)
10042 (grammar_current_rule_action_append): Export.
10043 * src/parse-gram.y (symbol_list_new, symbol_list_symbol_append_
10044 (symbol_list_action_append): Remove.
10045 Hook the routines from reader.
10046 * src/scan-gram.l: In INITIAL, characters and strings are tokens.
10047 * src/system.h (ATTRIBUTE_NORETURN, ATTRIBUTE_UNUSED): Now.
10048
10049 * src/reader.c (read_declarations): Remove, unused.
10050
10051 * src/parse-gram.y: Handle the epilogue.
10052 * src/reader.h, src/reader.c (gram_start_symbol_set): Rename as...
10053 (grammar_start_symbol_set): this.
10054 * src/scan-gram.l: Be sure to ``use'' yycontrol to keep GCC quiet.
10055 * src/reader.c (readgram): Remove, unused.
10056 (reader): Adjust to insert eoftoken and axiom where appropriate.
10057
10058 * src/reader.c (copy_dollar): Replace with...
10059 * src/scan-gram.h (handle_dollar): this.
10060 * src/parse-gram.y: Remove `%thong'.
10061
10062 * src/reader.c (copy_at): Replace with...
10063 * src/scan-gram.h (handle_at): this.
10064
10065 * src/complain.h, src/complain.c (warn_at, complain_at, fatal_at):
10066 New.
10067
10068 * src/scan-gram.l (YY_LINES): Keep lineno synchronized for the
10069 time being.
10070
10071 * src/reader.h, src/reader.c (grammar_rule_end): New.
10072
10073 * src/parse.y (current_type, current_class): New.
10074 Implement `%nterm', `%token' support.
10075 Merge `%term' into `%token'.
10076 (string_as_id): New.
10077 * src/symtab.h, src/symtab.c (symbol_make_alias): Don't pass the
10078 type name.
10079
10080 * src/parse-gram.y: Be sure to handle properly the beginning of
10081 rules.
10082
10083 * src/parse-gram.y: Handle %type.
10084 * src/reader.c (grammar_rule_end): Call grammar_current_rule_check.
10085
10086 * src/parse-gram.y: More directives support.
10087 * src/options.c: No longer handle source directives.
10088
10089 * src/parse-gram.y: Fix %output.
10090
10091 * src/parse-gram.y: Handle %union.
10092 Use the prologue locations.
10093 * src/reader.c (parse_union_decl): Remove.
10094
10095 * src/reader.h, src/reader.c (epilogue_set): New.
10096 * src/parse-gram.y: Use it.
10097
10098 * data/bison.simple, data/bison.c++: b4_stype is now either not
10099 defined, then default to int, or to the contents of %union,
10100 without `union' itself.
10101 Adjust.
10102 * src/muscle_tab.c (muscle_init): Don't predefine `stype'.
10103
10104 * src/output.c (actions_output): Don't output braces, as they are
10105 already handled by the scanner.
10106
10107 * src/scan-gram.l (SC_CHARACTER): Set the user_token_number of
10108 characters to themselves.
10109
10110 * tests/reduce.at (Reduced Automaton): End the grammars with %% so
10111 that the epilogue has a proper #line.
10112
10113 * src/parse-gram.y: Handle precedence/associativity.
10114
10115 * src/symtab.c (symbol_precedence_set): Requires the symbol to be
10116 a terminal.
10117 * src/scan-gram.l (SC_BRACED_CODE): Catch strings and characters.
10118 * tests/calc.at: Do not use `%token "foo"' as it makes not sense
10119 at all to define terminals that cannot be emitted.
10120
10121 * src/scan-gram.l: Escape M4 characters.
10122
10123 * src/scan-gram.l: Working properly with escapes in user
10124 strings/characters.
10125
10126 * tests/torture.at (AT_DATA_TRIANGULAR_GRAMMAR)
10127 (AT_DATA_HORIZONTAL_GRAMMAR): Respect the `%token ID NUM STRING'
10128 grammar.
10129 Use more modest sizes, as for the time being the parser does not
10130 release memory, and therefore the process swallows a huge amount
10131 of memory.
10132
10133 * tests/torture.at (AT_DATA_LOOKAHEADS_GRAMMAR): Adjust to the
10134 stricter %token grammar.
10135
10136 * src/symtab.h (associativity): Add `undef_assoc'.
10137 (symbol_precedence_set): Do nothing when passed an undef_assoc.
10138 * src/symtab.c (symbol_check_alias_consistence): Adjust.
10139
10140 * tests/regression.at (Invalid %directive): Remove, as it is now
10141 meaningless.
10142 (Invalid inputs): Adjust to the new error messages.
10143 (Token definitions): The new grammar doesn't allow too many
10144 eccentricities.
10145
10146 * src/lex.h, src/lex.c: Remove.
10147 * src/reader.c (lastprec, skip_to_char, read_signed_integer)
10148 (copy_character, copy_string2, copy_string, copy_identifier)
10149 (copy_comment, parse_token_decl, parse_type_decl, parse_assoc_decl)
10150 (parse_muscle_decl, parse_dquoted_param, parse_skel_decl)
10151 (parse_action): Remove.
10152 * po/POTFILES.in: Adjust.
10153
2e047461
AD
101542002-06-11 Akim Demaille <akim@epita.fr>
10155
cd05d13c 10156 * src/reader.c (parse_action): Don't store directly into the
2e047461
AD
10157 rule's action member: return the action as a string.
10158 Don't require `rule_length' as an argument: compute it.
10159 (grammar_current_rule_symbol_append)
10160 (grammar_current_rule_action_append): New, eved out from
10161 (readgram): here.
10162 Remove `action_flag', `rulelength', unused now.
10163
9af3fbce
AD
101642002-06-11 Akim Demaille <akim@epita.fr>
10165
10166 * src/reader.c (grammar_current_rule_prec_set).
10167 (grammar_current_rule_check): New, eved out from...
10168 (readgram): here.
10169 Remove `xaction', `first_rhs': useless.
10170 * tests/input.at (Type clashes): New.
10171 * tests/existing.at (GNU Cim Grammar): Adjust.
10172
1485e106
AD
101732002-06-11 Akim Demaille <akim@epita.fr>
10174
10175 * src/reader.c (grammar_midrule_action): New, Eved out from
10176 (readgram): here.
10177
da4160c3
AD
101782002-06-11 Akim Demaille <akim@epita.fr>
10179
10180 * src/reader.c (grammar_rule_begin, previous_rule, current_rule):
10181 New.
10182 (readgram): Use them as replacement of inlined code, crule and
10183 crule1.
10184
f6d0f937
AD
101852002-06-11 Akim Demaille <akim@epita.fr>
10186
10187 * src/reader.c (grammar_end, grammar_symbol_append): New.
10188 (readgram): Use them.
10189 Make the use of `p' as local as possible.
10190
69078d4b
AD
101912002-06-10 Akim Demaille <akim@epita.fr>
10192
10193 GCJ's parser requires the tokens to be defined before the prologue.
10194
10195 * data/bison.simple: Output the token definition before the user's
10196 prologue.
10197 * tests/regression.at (Braces parsing, Duplicate string)
10198 (Mixing %token styles): Check the output from bison.
10199 (Early token definitions): New.
10200
5e424082
AD
102012002-06-10 Akim Demaille <akim@epita.fr>
10202
10203 * src/symtab.c (symbol_user_token_number_set): Don't complain when
10204 assigning twice the same user number to a token, so that we can
10205 use it in...
10206 * src/lex.c (lex): here.
10207 Also use `symbol_class_set' instead of hand written code.
10208 * src/reader.c (parse_assoc_decl): Likewise.
10209
44536b35
AD
102102002-06-10 Akim Demaille <akim@epita.fr>
10211
10212 * src/symtab.c, src/symtab.c (symbol_class_set)
10213 (symbol_user_token_number_set): New.
10214 * src/reader.c (parse_token_decl): Use them.
10215 Use a switch instead of ifs.
10216 Use a single argument.
10217
8b9f2372
AD
102182002-06-10 Akim Demaille <akim@epita.fr>
10219
10220 Remove `%thong' support as it is undocumented, unused, duplicates
10221 `%token's job, and creates useless e-mail traffic with people who
10222 want to know what it is, why it is undocumented, unused, and
10223 duplicates `%token's job.
10224
10225 * src/reader.c (parse_thong_decl): Remove.
10226 * src/options.c (option_table): Remove "thong".
10227 * src/lex.h (tok_thong): Remove.
10228
3ae2b51f
AD
102292002-06-10 Akim Demaille <akim@epita.fr>
10230
10231 * src/symtab.c, src/symtab.c (symbol_type_set)
10232 (symbol_precedence_set): New.
10233 * src/reader.c (parse_type_decl, parse_assoc_decl): Use them.
10234 (value_components_used): Remove, unused.
10235
2f1afb73
AD
102362002-06-09 Akim Demaille <akim@epita.fr>
10237
10238 Move symbols handling code out of the reader.
10239
10240 * src/reader.h, src/reader.c (errtoken, undeftoken, eoftoken)
10241 (axiom): Move to...
10242 * src/symtab.h, src/symtab.c: here.
10243
10244 * src/gram.c (start_symbol): Remove: use startsymbol->number.
10245 * src/reader.c (startval): Rename as...
10246 * src/symtab.h, src/symtab.c (startsymbol): this.
10247 * src/reader.c: Adjust.
10248
10249 * src/reader.c (symbol_check_defined, symbol_make_alias)
10250 (symbol_check_alias_consistence, symbol_pack, symbol_translation)
10251 (token_translations_init)
10252 Move to...
10253 * src/symtab.c: here.
10254 * src/reader.c (packsymbols): Move to...
10255 * src/symtab.h, src/symtab.c (symbols_pack): here.
10256 * src/symtab.h, src/symtab.c (symbol_make_alias): Takes SYMVAL as
10257 argument.
10258
e9bca3ad
AD
102592002-06-03 Akim Demaille <akim@epita.fr>
10260
10261 * src/muscle_tab.c (muscle_insert, muscle_find): Declarations,
10262 then statements.
10263
86eff183
AD
102642002-06-03 Akim Demaille <akim@epita.fr>
10265
10266 * src/muscle_tab.c (muscle_find, muscle_insert): Don't initialize
10267 structs with non literals.
10268 * src/scan-skel.l: never-interactive.
10269 * src/conflicts.c (enum conflict_resolution_e): No trailing
10270 comma.
10271 * src/getargs.c (usage): Split long literal strings.
10272 Reported by Hans Aberg.
10273
717be197
AD
102742002-05-28 Akim Demaille <akim@epita.fr>
10275
10276 * data/bison.c++: Use C++ ostreams.
10277 (cdebug_): New member.
10278
670ddffd
AD
102792002-05-28 Akim Demaille <akim@epita.fr>
10280
10281 * src/output.c (output_skeleton): Be sure to allocate enough room
10282 for `/' _and_ for `\0' in full_skeleton.
10283
769b430f
AD
102842002-05-28 Akim Demaille <akim@epita.fr>
10285
10286 * data/bison.c++: Catch up with bison.simple:
10287 2002-05-24 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
10288 and Paul Eggert <eggert@twinsun.com>: `error' handing.
10289 2002-05-26 Akim Demaille <akim@epita.fr>: stos_, token_number_,
10290 and popping traces.
10291
7067cb36
PH
102922002-05-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
10293
10294 * src/output.c (output_skeleton): Put an explicit path in front of
10295 the skeleton file name, rather than relying on the -I directory,
10296 to partially alleviate effects of having a skeleton file lying around
10297 in the current directory.
769b430f 10298
4a713ec2
PH
102992002-05-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
10300
769b430f 10301 * src/conflicts.c (log_resolution): Correct typo:
4a713ec2
PH
10302 obstack_printf should be obstack_fgrow1.
10303
b408954b
AD
103042002-05-26 Akim Demaille <akim@epita.fr>
10305
10306 * src/state.h (state_t): `solved_conflicts' is a new member.
10307 * src/LR0.c (new_state): Set it to 0.
10308 * src/conflicts.h, src/conflicts.c (print_conflicts)
10309 (free_conflicts, solve_conflicts): Rename as...
10310 (conflicts_print, conflicts_free, conflicts_solve): these.
10311 Adjust callers.
10312 * src/conflicts.c (enum conflict_resolution_e)
10313 (solved_conflicts_obstack): New, used by...
10314 (log_resolution): this.
10315 Adjust to attach the conflict resolution to each state.
10316 Complete the description with the precedence/associativity
10317 information.
10318 (resolve_sr_conflict): Adjust.
10319 * src/print.c (print_state): Output its solved_conflicts.
10320 * tests/conflicts.at (Unresolved SR Conflicts)
10321 (Solved SR Conflicts): Exercise --report=all.
10322
a49aecd5
AD
103232002-05-26 Akim Demaille <akim@epita.fr>
10324
10325 * src/LR0.c, src/derives.c, src/gram.c, src/gram.h, src/lalr.c,
10326 * src/nullable.c, src/output.c, src/print.c, src/print_graph.c,
10327 * src/reader.c, src/reduce.c, src/state.h, src/symtab.h
10328 (token_number_t, item_number_as_token_number)
10329 (token_number_as_item_number, muscle_insert_token_number_table):
10330 Rename as...
10331 (symbol_number_t, item_number_as_symbol_number)
10332 (symbol_number_as_item_number, muscle_insert_symbol_number_table):
10333 these, since it is more appropriate.
10334
5504898e
AD
103352002-05-26 Akim Demaille <akim@epita.fr>
10336
10337 * tests/calc.at (AT_CHECK_CALC): Adjust: there are now additional
10338 `Error:' lines.
10339 * data/bison.simple (yystos) [YYDEBUG]: New.
10340 (yyparse) [YYDEBUG]: Display the symbols which are popped during
10341 error recovery.
10342 * tests/regression.at (Web2c Actions): Adjust: yystos is output now.
10343
ec3bc396
AD
103442002-05-25 Akim Demaille <akim@epita.fr>
10345
10346 * doc/bison.texinfo (Debugging): Split into...
10347 (Tracing): this new section, its former contents, and...
10348 (Understanding): this new section.
10349 * src/getargs.h, src/getargs.c (verbose_flag): Remove, replaced
10350 by...
10351 (report_flag): this.
10352 Adjust all dependencies.
10353 (report_args, report_types, report_argmatch): New.
10354 (usage, getargs): Report/support -r, --report.
10355 * src/options.h
10356 (struct option_table_struct): Rename as..,
10357 (struct option_table_s): this.
10358 Rename the `set_flag' member to `flag' to match with getopt_long's
10359 struct.
10360 * src/options.c (option_table): Split verbose into an entry for
10361 %verbose, and another for --verbose.
10362 Support --report/-r, so remove -r from the obsolete --raw.
10363 * src/print.c: Attach full item sets and lookaheads reports to
10364 report_flag instead of trace_flag.
10365 * lib/argmatch.h, lib/argmatch.c: New, from Fileutils 4.1.
10366
78df8250
PE
103672002-05-24 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
10368 and Paul Eggert <eggert@twinsun.com>
769b430f 10369
78df8250
PE
10370 * data/bison.simple (yyparse): Correct error handling to conform to
10371 POSIX and yacc. Specifically, after syntax error is discovered,
10372 do not reduce further before shifting the error token.
10373 Clean up the code a bit by removing the labels yyerrdefault,
10374 yyerrhandle, yyerrpop.
10375 * NEWS: Document the above.
10376
c0c9ea05
PH
103772002-05-20 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
10378
10379 * data/bison.simple (yyr1): Don't use yy_token_number_type as element
10380 type; it isn't always big enough, since it doesn't necessarily
10381 include non-terminals.
769b430f 10382 (yytranslate): Expand definition of yy_token_number_type, so that
c0c9ea05
PH
10383 the latter can be removed.
10384 (yy_token_number_type): Remove, only one use.
10385 * data/bison.c++ (r1_): Parallel change to yyr1 in bison.simple---
10386 don't use TokenNumberType as element type.
769b430f 10387
c0c9ea05
PH
10388 * tests/regression.at: Modify expected output to agree with change
10389 to yyr1 and yytranslate.
769b430f 10390
6390a83f
FK
103912002-05-13 Florian Krohm <florian@edamail.fishkill.ibm.com>
10392
10393 * src/reader.c (parse_action): Use copy_character instead of
10394 obstack_1grow.
10395
db7c8e9a
AD
103962002-05-13 Akim Demaille <akim@epita.fr>
10397
10398 * tests/regression.at (Token definitions): Prototype yylex and
10399 yyerror.
10400
fcc61800
PH
104012002-05-12 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
10402
158c687b 10403 * src/scan-skel.l: Correct off-by-one error in handling of __oline__.
fcc61800
PH
10404 * data/bison.simple (b4_sint_type, b4_uint_type): Correct to reflect
10405 32-bit arithmetic.
10406 * data/bison.c++ (b4_sint_type, b4_uint_type): Ditto.
10407
5683e9b2
AD
104082002-05-07 Akim Demaille <akim@epita.fr>
10409
10410 * tests/synclines.at: Be sure to prototype yylex and yyerror to
10411 avoid GCC warnings.
10412
0c2d3f4c
AD
104132002-05-07 Akim Demaille <akim@epita.fr>
10414
10415 Kill GCC warnings.
10416
10417 * src/reduce.c (nonterminals_reduce): Don't loop over RITEM: loop
10418 over the RHS of each rule.
10419 * src/gram.h, src/gram.c (nritems): Is `unsigned int', not int.
10420 * src/state.h (state_t): Member `nitems' is unsigned short.
10421 * src/LR0.c (get_state): Adjust.
10422 * src/reader.c (packgram): Likewise.
10423 * src/output.c (GENERATE_MUSCLE_INSERT_TABLE): `max' is of type
10424 `Type'.
10425 (muscle_insert_int_table): Remove, unused.
10426 (prepare_rules): Remove `max'.
10427
1565b720
AD
104282002-05-06 Akim Demaille <akim@epita.fr>
10429
10430 * src/closure.c (print_firsts): Display of the symbol tags.
10431 (bitmatrix_print): Move to...
10432 * lib/bitsetv-print.h, lib/bitsetv-print.c (bitsetv_matrix_dump):
10433 here.
10434 * tests/sets.at (Nullable, Broken Closure, Firsts): Adjust.
10435
cfaee611
AD
104362002-05-06 Akim Demaille <akim@epita.fr>
10437
10438 * src/muscle_tab.c (muscle_m4_output): Must return TRUE for
10439 hash_do_for_each.
10440
458be8e0
AD
104412002-05-06 Akim Demaille <akim@epita.fr>
10442
10443 * src/LR0.c (new_state, get_state): Instead of using the global
10444 `kernel_size' and `kernel_base', have two new arguments:
10445 `core_size' and `core'.
10446 Adjust callers.
10447
a900a624
AD
104482002-05-06 Akim Demaille <akim@epita.fr>
10449
10450 * src/reader.c (packgram): No longer end `ritem' with a 0
10451 sentinel: it is not used.
10452
d4e7d3a1
AD
104532002-05-05 Akim Demaille <akim@epita.fr>
10454
10455 New experimental feature: display the lookaheads in the report and
10456 graph.
10457
10458 * src/print (print_core): When --trace-flag, display the rules
10459 lookaheads.
10460 * src/print_graph.c (print_core): Likewise.
10461 Swap the arguments.
10462 Adjust caller.
10463
39ceb25b
AD
104642002-05-05 Akim Demaille <akim@epita.fr>
10465
10466 * tests/torture.at (Many lookaheads): New test.
10467
5372019f
AD
104682002-05-05 Akim Demaille <akim@epita.fr>
10469
10470 * src/output.c (GENERATE_OUTPUT_TABLE): Replace with...
10471 (GENERATE_MUSCLE_INSERT_TABLE): this.
10472 (output_int_table, output_unsigned_int_table, output_short_table)
10473 (output_token_number_table, output_item_number_table): Replace with...
10474 (muscle_insert_int_table, muscle_insert_unsigned_int_table)
10475 (muscle_insert_short_table, muscle_insert_token_number_table)
10476 (muscle_insert_item_number_table): these.
10477 Adjust all callers.
10478 (prepare_tokens): Don't free `translations', since...
10479 * src/reader.h, src/reader.c (grammar_free): do it.
10480 Move to...
10481 * src/gram.h, src/gram.c (grammar_free): here.
10482 * data/bison.simple, data/bison.c++: b4_token_number_max is now
10483 b4_translate_max.
10484
5df5f6d5
AD
104852002-05-05 Akim Demaille <akim@epita.fr>
10486
10487 * src/output.c (output_unsigned_int_table): New.
10488 (prepare_rules): `i' is unsigned.
10489 `prhs', `rline', `r2' are unsigned int.
10490 Rename muscle `rhs_number_max' as `rhs_max'.
10491 Output muscles `prhs_max', `rline_max', and `r2_max'.
10492 Free rline and r1.
10493 * data/bison.simple, data/bison.c++: Adjust to use these muscles
10494 to compute types instead of constant types.
10495 * tests/regression.at (Web2c Actions): Adjust.
10496
b87f8b21
AD
104972002-05-04 Akim Demaille <akim@epita.fr>
10498
10499 * src/symtab.h (SALIAS, SUNDEF): Rename as...
10500 (USER_NUMBER_ALIAS, USER_NUMBER_UNDEFINED): these.
10501 Adjust dependencies.
10502 * src/output.c (token_definitions_output): Be sure not to output a
10503 `#define 'a'' when fed with `%token 'a' "a"'.
10504 * tests/regression.at (Token definitions): New.
10505
8bb936e4
PE
105062002-05-03 Paul Eggert <eggert@twinsun.com>
10507
10508 * data/bison.simple (b4_token_defines): Also define YYTOKENTYPE
10509 for K&R C.
10510
105112002-05-03 gettextize <bug-gnu-gettext@gnu.org>
10512
10513 * Makefile.am (SUBDIRS): Remove intl.
10514 (EXTRA_DIST): Add config/config.rpath.
10515
53c71a12
AD
105162002-05-03 Akim Demaille <akim@epita.fr>
10517
10518 * data/bison.simple (m4_if): Don't output empty enums.
10519 And actually, output valid enum definitions :(.
10520
289dd0cf
AD
105212002-05-03 Akim Demaille <akim@epita.fr>
10522
10523 * configure.bat: Remove, completely obsolete.
10524 * Makefile.am (EXTRA_DIST): Adjust.
10525 Don't distribute config.rpath...
10526 * config/Makefile.am (EXTRA_DIST): Do it.
10527
db85e524
AD
105282002-05-03 Akim Demaille <akim@epita.fr>
10529
10530 * configure.in (GETTEXT_VERSION): New.
10531 Suggested by Bruno Haible for the forthcoming Gettext 0.10.3.
10532
83ccf991
AD
105332002-05-03 Akim Demaille <akim@epita.fr>
10534
10535 * data/bison.simple (b4_token_enum): New.
10536 (b4_token_defines): Use it to output tokens both as #define and
10537 enums.
10538 Suggested by Paul Eggert.
10539 * src/output.c (token_definitions_output): Don't output spurious
10540 white spaces.
10541
1f418995
AD
105422002-05-03 Akim Demaille <akim@epita.fr>
10543
10544 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
10545
45119f04
RA
105462002-05-02 Robert Anisko <robert@lrde.epita.fr>
10547
10548 * data/bison.c++: Adapt expansion of $s and @s to the C++ parser.
10549 Update the stack class, give a try to deque as the default container.
10550
b2d52318
AD
105512002-05-02 Akim Demaille <akim@epita.fr>
10552
10553 * data/bison.simple (yyparse): Do not implement @$ = @1.
10554 (YYLLOC_DEFAULT): Adjust to do it.
10555 * doc/bison.texinfo (Location Default Action): Fix.
10556
3a8b4109
AD
105572002-05-02 Akim Demaille <akim@epita.fr>
10558
10559 * src/reader.c (parse_braces): Merge into...
10560 (parse_action): this.
10561
84614e13
AD
105622002-05-02 Akim Demaille <akim@epita.fr>
10563
10564 * configure.in (ALL_LINGUAS): Remove.
10565 * po/LINGUAS, hr.po: New.
10566
fdbcd8e2
AD
105672002-05-02 Akim Demaille <akim@epita.fr>
10568
10569 Remove the so called hairy (semantic) parsers.
10570
10571 * src/system.h (EXT_GUARD_C, EXT_STYPE_H): Remove.
10572 * src/gram.h, src/gram.c (semantic_parser): Remove.
10573 (rule_t): Remove the guard and guard_line members.
10574 * src/lex.h (token_t): remove tok_guard.
10575 * src/options.c (option_table): Remove %guard and %semantic_parser
10576 support.
10577 * src/output.c, src/output.h (guards_output): Remove.
10578 (prepare): Adjust.
10579 (token_definitions_output): Don't output the `T'
10580 tokens (???).
10581 (output_skeleton): Don't output the guards.
10582 * src/files.c, src/files.c (attrsfile): Remove.
10583 * src/reader.c (symbol_list): Remove the guard and guard_line
10584 members.
10585 Adjust dependencies.
10586 (parse_guard): Remove.
10587 * data/bison.hairy: Remove.
10588 * doc/bison.texinfo (Environment Variables): Remove occurrences of
10589 BISON_HAIRY.
10590
82b6cb3f
AD
105912002-05-02 Akim Demaille <akim@epita.fr>
10592
10593 * src/reader.c (copy_at, copy_dollarm parse_braces, parse_action)
10594 (parse_guard): Rename the formal argument `stack_offset' as
10595 `rule_length', which is more readable.
10596 Adjust callers.
10597 (copy_at, copy_dollar): Instead of outputting the hard coded
10598 values of $$, $n and so forth, output invocation to b4_lhs_value,
10599 b4_lhs_location, b4_rhs_value, and b4_rhs_location.
900c877b
AD
10600 Note: this patch partially drops `semantic-parser' support: it
10601 always does `rule_length - n', where semantic parsers ought to
10602 always use `-n'.
82b6cb3f
AD
10603 * data/bison.simple, data/bison.c++ (b4_lhs_value)
10604 (b4_lhs_location, b4_rhs_value, and b4_rhs_location: New.
10605
6cbfbcc5
AD
106062002-05-02 Akim Demaille <akim@epita.fr>
10607
10608 * configure.in (AC_INIT): Bump to 1.49b.
10609 (AM_INIT_AUTOMAKE): Short invocation.
10610
b8548114
AD
106112002-05-02 Akim Demaille <akim@epita.fr>
10612
10613 Version 1.49a.
10614
c20cd1fa
AD
106152002-05-01 Akim Demaille <akim@epita.fr>
10616
10617 * src/skeleton.h: Remove.
10618
8a9566d4
AD
106192002-05-01 Akim Demaille <akim@epita.fr>
10620
10621 * src/skeleton.h: Fix the #endif.
10622 Reported by Magnus Fromreide.
10623
8c6d399a
PE
106242002-04-26 Paul Eggert <eggert@twinsun.com>
10625
10626 * data/bison.simple (YYSTYPE_IS_TRIVIAL, YYLTYPE_IS_TRIVIAL):
10627 Define if we define YYSTYPE and YYLTYPE, respectively.
b756bb75 10628 (YYCOPY): Fix [] quoting problem in the non-GCC case.
8a9566d4 10629
2b7ed18a
RA
106302002-04-25 Robert Anisko <robert@lrde.epita.fr>
10631
10632 * src/scan-skel.l: Postprocess quadrigraphs.
10633
10634 * src/reader.c (copy_character): New function, used to output
10635 single characters while replacing `[' and `]' with quadrigraphs, to
10636 avoid troubles with M4 quotes.
10637 (copy_comment): Output characters with copy_character.
10638 (read_additionnal_code): Likewise.
10639 (copy_string2): Likewise.
10640 (copy_definition): Likewise.
10641
10642 * tests/calc.at: Exercise M4 quoting.
10643
34a89c50
AD
106442002-04-25 Akim Demaille <akim@epita.fr>
10645
10646 * tests/sets.at (AT_EXTRACT_SETS): Sed portability issue: no space
10647 between `!' and the command.
10648 Reported by Paul Eggert.
10649
0dd1580a
RA
106502002-04-24 Robert Anisko <robert@lrde.epita.fr>
10651
10652 * tests/calc.at: Exercise prologue splitting.
10653
10654 * data/bison.simple, data/bison.c++: Use `b4_pre_prologue' and
10655 `b4_post_prologue' instead of `b4_prologue'.
10656
10657 * src/output.c (prepare): Add the `pre_prologue' and `post_prologue'
10658 muscles.
10659 (output): Free pre_prologue_obstack and post_prologue_obstack.
10660 * src/files.h, src/files.c (attrs_obstack): Remove.
10661 (pre_prologue_obstack, post_prologue_obstack): New.
10662 * src/reader.c (copy_definition): Add a parameter to specify the
10663 obstack to fill, instead of using attrs_obstack unconditionally.
10664 (read_declarations): Pass pre_prologue_obstack to copy_definition if
10665 `%union' has not yet been seen, pass post_prologue_obstack otherwise.
10666
83c1796f
PE
106672002-04-23 Paul Eggert <eggert@twinsun.com>
10668
10669 * data/bison.simple: Remove unnecessary commentary and white
10670 space differences from 1_29-branch.
10671 Depend on YYERROR_VERBOSE, not defined (YYERROR_VERBOSE).
10672
10673 (union yyalloc, YYSTACK_GAP_MAX, YYSTACK_BYTES, YYCOPY,
10674 YYSTACK_RELOCATE): Do not define if yyoverflow is defined, or
10675 if this is a C++ parser and YYSTYPE or YYLTYPE has nontrivial
10676 constructors or destructors.
10677
10678 (yyparse) [! defined YYSTACK_RELOCATE]: Do not relocate the stack.
10679
1207eeac
AD
106802002-04-23 Akim Demaille <akim@epita.fr>
10681
10682 * tests/sets.at (AT_EXTRACT_SETS): Don't use 8 char long sed labels.
10683 * tests/synclines.at (AT_TEST_SYNCLINE): Be robust to GCC's
10684 location with columns.
10685 * tests/conflicts.at (%nonassoc and eof): Don't use `error.h'.
10686 All reported by Paul Eggert.
10687
78ab8f67
AD
106882002-04-22 Akim Demaille <akim@epita.fr>
10689
10690 * src/reduce.c (dump_grammar): Move to...
10691 * src/gram.h, src/gram.c (grammar_dump): here.
10692 Be sure to separate long item numbers.
10693 Don't read the members of a rule's prec if its nil.
10694
133c20e2
AD
106952002-04-22 Akim Demaille <akim@epita.fr>
10696
10697 * src/output.c (table_size, table_grow): New.
10698 (MAXTABLE): Remove, replace uses with table_size.
10699 (pack_vector): Instead of dying when the table is too big, grow it.
10700
9515e8a7
AD
107012002-04-22 Akim Demaille <akim@epita.fr>
10702
10703 * data/bison.simple (yyr1): Its type is that of a token number.
10704 * data/bison.c++ (r1_): Likewise.
10705 * tests/regression.at (Web2c Actions): Adjust.
10706
23c5a174
AD
107072002-04-22 Akim Demaille <akim@epita.fr>
10708
10709 * src/reader.c (token_translations_init): 256 is now the default
10710 value for the error token, i.e., it will be assigned another
10711 number if the user assigned 256 to one of her tokens.
10712 (reader): Don't force 256 to error.
10713 * doc/bison.texinfo (Symbols): Adjust.
10714 * tests/torture.at (AT_DATA_HORIZONTAL_GRAMMAR)
10715 (AT_DATA_TRIANGULAR_GRAMMAR): Number the tokens as 1, 2, 3
10716 etc. instead of 10, 20, 30 (which was used to `jump' over error
10717 (256) and undefined (2)).
10718
5fbb0954
AD
107192002-04-22 Akim Demaille <akim@epita.fr>
10720
10721 Propagate more token_number_t.
10722
10723 * src/gram.h (token_number_as_item_number)
10724 (item_number_as_token_number): New.
10725 * src/output.c (GENERATE_OUTPUT_TABLE): New.
10726 Use it to create output_item_number_table and
10727 output_token_number_table.
10728 * src/LR0.c, src/derives.c, src/gram.c, src/gram.h, src/lalr.c,
10729 * src/lex.c, src/nullable.c, src/output.c, src/print.c,
10730 * src/print_graph.c, src/reader.c, src/reduce.c, src/state.h,
10731 * src/symtab.c, src/symtab.h: Use token_number_t instead of shorts.
10732
4f940944
AD
107332002-04-22 Akim Demaille <akim@epita.fr>
10734
10735 * src/output.h, src/output.c (get_lines_number): Remove.
10736
3ded9a63
AD
107372002-04-19 Akim Demaille <akim@epita.fr>
10738
10739 * doc/bison.texinfo (Actions): Make clear that `|' is not the same
10740 as Lex/Flex'.
10741 (Debugging): More details about enabling the debugging features.
10742 (Table of Symbols): Describe $$, $n, @$, and @n.
10743 Suggested by Tim Josling.
10744
e0c471a9
AD
107452002-04-19 Akim Demaille <akim@epita.fr>
10746
10747 * doc/bison.texinfo: Remove the uses of the obsolete @refill.
10748
fecc10cd
AD
107492002-04-10 Akim Demaille <akim@epita.fr>
10750
10751 * src/system.h: Rely on HAVE_LIMITS_H.
10752 Suggested by Paul Eggert.
10753
51dec47b
AD
107542002-04-09 Akim Demaille <akim@epita.fr>
10755
10756 * tests/calc.at (_AT_CHECK_CALC_ERROR): Receive as argument the
10757 full stderr, and strip it according to the bison options, instead
10758 of composing the error message from different bits.
10759 This makes it easier to check for several error messages.
10760 Adjust all the invocations.
10761 Add an invocation exercising the error token.
10762 Add an invocation demonstrating a stupid error message.
10763 (_AT_DATA_CALC_Y): Follow the GCS: initial column is 1, not 0.
10764 Adjust the tests.
10765 Error message are for stderr, not stdout.
10766
007a50a4
AD
107672002-04-09 Akim Demaille <akim@epita.fr>
10768
10769 * src/gram.h, src/gram.c (error_token_number): Remove, use
10770 errtoken->number.
10771 * src/reader.c (reader): Don't specify the user token number (2)
10772 for $undefined, as it uselessly prevents using it.
10773 * src/gram.h (token_number_t): Move to...
10774 * src/symtab.h: here.
10775 (state_t.number): Is a token_number_t.
10776 * src/print.c, src/reader.c: Use undeftoken->number instead of
10777 hard coded 2.
10778 (Even though this 2 is not the same as above: the number of the
10779 undeftoken remains being 2, it is its user token number which
10780 might not be 2).
10781 * src/output.c (prepare_tokens): Rename the `maxtok' muscle with
10782 `user_token_number_max'.
10783 Output `undef_token_number'.
10784 * data/bison.simple, data/bison.c++: Use them.
10785 Be sure to map invalid yylex return values to
10786 `undef_token_number'. This saves us from gratuitous SEGV.
10787
10788 * tests/conflicts.at (Solved SR Conflicts)
10789 (Unresolved SR Conflicts): Adjust.
10790 * tests/regression.at (Web2c Actions): Adjust.
10791
06446ccf
AD
107922002-04-08 Akim Demaille <akim@epita.fr>
10793
10794 * data/bison.c++: s/b4_item_number_max/b4_rhs_number_max/.
10795 Adding #line.
10796 Remove the duplicate `typedefs'.
10797 (RhsNumberType): Fix the declaration and various other typos.
10798 Use __ofile__.
10799 * data/bison.simple: Use __ofile__.
10800 * src/scan-skel.l: Handle __ofile__.
10801
62a3e4f0
AD
108022002-04-08 Akim Demaille <akim@epita.fr>
10803
10804 * src/gram.h (item_number_t): New, the type of item numbers in
10805 RITEM. Note that it must be able to code symbol numbers as
10806 positive number, and the negation of rule numbers as negative
10807 numbers.
10808 Adjust all dependencies (pretty many).
10809 * src/reduce.c (rule): Remove this `short *' pointer: use
10810 item_number_t.
10811 * src/system.h (MINSHORT, MAXSHORT): Remove.
10812 Include `limits.h'.
10813 Adjust dependencies to using SHRT_MAX and SHRT_MIN.
10814 (shortcpy): Remove.
10815 (MAXTABLE): Move to...
10816 * src/output.c (MAXTABLE): here.
10817 (prepare_rules): Use output_int_table to output rhs.
10818 * data/bison.simple, data/bison.c++: Adjust.
10819 * tests/torture.at (Big triangle): Move the limit from 254 to
10820 500.
10821 * tests/regression.at (Web2c Actions): Ajust.
10822
10823 Trying with bigger grammars shows various phenomena: at 3000 (28Mb
10824 of grammar file) bison is killed by my system, at 2000 (12Mb) bison
10825 passes, but produces negative #line number, once fixed, GCC is
10826 killed while compiling 14Mb, at 1500 (6.7 Mb of grammar, 8.2Mb of
10827 C), it passes.
10828 * src/state.h (state_h): Code input lines on ints, not shorts.
10829
bb88b0fc
AD
108302002-04-08 Akim Demaille <akim@epita.fr>
10831
10832 * src/reduce.c (reduce_grammar): First reduce the nonterminals,
10833 and then the grammar.
10834
9a636f47
AD
108352002-04-08 Akim Demaille <akim@epita.fr>
10836
10837 * src/system.h: No longer using strndup.
10838
680e8701
AD
108392002-04-07 Akim Demaille <akim@epita.fr>
10840
10841 * src/muscle_tab.h (MUSCLE_INSERT_LONG_INT): New.
10842 * src/output.c (output_table_data): Return the longest number.
10843 (prepare_tokens): Output `token_number_max').
10844 * data/bison.simple, data/bison.c++ (b4_sint_type, b4_uint_type):
10845 New.
10846 Use them to define yy_token_number_type/TokenNumberType.
10847 Use this type for yytranslate.
10848 * tests/torture.at (Big triangle): Push the limit from 124 to
10849 253.
10850 * tests/regression.at (Web2c Actions): Adjust.
10851
817e9f41
AD
108522002-04-07 Akim Demaille <akim@epita.fr>
10853
10854 * tests/torture.at (Big triangle): New.
10855 (GNU AWK Grammar, GNU Cim Grammar): Move to...
10856 * tests/existing.at: here.
10857
5123689b
AD
108582002-04-07 Akim Demaille <akim@epita.fr>
10859
10860 * src/gram.h, src/gram.c (nitems): Remove, it is an alias of
10861 nritems.
10862 Adjust dependencies.
10863
f3849179
AD
108642002-04-07 Akim Demaille <akim@epita.fr>
10865
10866 * src/reader.c: Normalize increments to prefix form.
10867
bd02036a
AD
108682002-04-07 Akim Demaille <akim@epita.fr>
10869
10870 * src/reader.c, symtab.c: Remove debugging code.
10871
db8837cb
AD
108722002-04-07 Akim Demaille <akim@epita.fr>
10873
10874 Rename all the `bucket's as `symbol_t'.
10875
10876 * src/gram.c, src/gram.h, src/lex.c, src/lex.h, src/output.c,
10877 * src/reader.c, src/reader.h, src/reduce.c, src/state.h,
10878 * src/symtab.c, src/symtab.h (bucket): Rename as...
10879 (symbol_t): this.
10880 (symbol_list_new, bucket_check_defined, bucket_make_alias)
10881 (bucket_check_alias_consistence, bucket_pack, bucket_translation)
10882 (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
10883 (buckets_new, buckets_free, buckets_do): Rename as...
10884 (symbol_list_new, symbol_check_defined, symbol_make_alias)
10885 (symbol_check_alias_consistence, symbol_pack, symbol_translation)
10886 (symbol_new, symbol_free, hash_compare_symbol_t, hash_symbol_t)
10887 (symbols_new, symbols_free, symbols_do): these.
10888
72a23c97
AD
108892002-04-07 Akim Demaille <akim@epita.fr>
10890
10891 Use lib/hash for the symbol table.
10892
10893 * src/gram.c (ntokens): Initialize to 1, to reserve a slot for
10894 EOF.
10895 * src/lex.c (lex): Set the `number' member of new terminals.
10896 * src/reader.c (bucket_check_defined, bucket_make_alias)
10897 (bucket_check_alias_consistence, bucket_translation): New.
10898 (reader, grammar_free, readgram, token_translations_init)
10899 (packsymbols): Adjust.
10900 (reader): Number the predefined tokens.
10901 * src/reduce.c (inaccessable_symbols): Just use hard coded numbers
10902 for predefined tokens.
10903 * src/symtab.h (bucket): Remove all the hash table related
10904 members.
10905 * src/symtab.c (symtab): Replace by...
10906 (bucket_table): this.
10907 (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
10908 (buckets_new, buckets_do): New.
10909
280a38c3
AD
109102002-04-07 Akim Demaille <akim@epita.fr>
10911
10912 * src/gram.c (nitems, nrules, nsyms, ntokens, nvars, nritems)
10913 (start_symbol, max_user_token_number, semantic_parser)
10914 (error_token_number): Initialize.
10915 * src/reader.c (grammar, start_flag, startval, typed, lastprec):
10916 Initialize.
10917 (reader): Don't.
10918 (errtoken, eoftoken, undeftoken, axiom): Extern.
10919
03b31c0c
AD
109202002-04-07 Akim Demaille <akim@epita.fr>
10921
10922 * src/gram.h (rule_s): prec and precsym are now pointers
10923 to the bucket giving the priority/associativity.
10924 Member `associativity' removed: useless.
10925 * src/reduce.c, src/conflicts.c: Adjust.
10926
8b3df748
AD
109272002-04-07 Akim Demaille <akim@epita.fr>
10928
10929 * src/lalr.c, src/LR0.c, src/closure.c, src/gram.c, src/reduce.c:
10930 Properly escape the symbols' TAG when outputting them.
10931
e601aa1d
AD
109322002-04-07 Akim Demaille <akim@epita.fr>
10933
10934 * src/lalr.h (LA): Is a bitsetv, not bitset*.
10935
b0299a2e
AD
109362002-04-07 Akim Demaille <akim@epita.fr>
10937
10938 * src/lalr.h, src/lalr.c (LAruleno): Replace with...
10939 (LArule): this, which is an array to rule_t*.
10940 * src/print.c, src/conflicts.c: Adjust.
10941
d7e1f00c
AD
109422002-04-07 Akim Demaille <akim@epita.fr>
10943
10944 * src/gram.h (rule_t): Rename `number' as `user_number'.
10945 `number' is a new member.
10946 Adjust dependencies.
10947 * src/reduce.c (reduce_grammar_tables): Renumber rule_t.number.
10948
cc9305dd
AD
109492002-04-07 Akim Demaille <akim@epita.fr>
10950
10951 As a result of the previous patch, it is no longer needed
10952 to reorder ritem itself.
10953
10954 * src/reduce.c (reduce_grammar_tables): Don't sort RITEM.
10955
b0940840
AD
109562002-04-07 Akim Demaille <akim@epita.fr>
10957
10958 Be sure never to walk through RITEMS, but use only data related to
10959 the rules themselves. RITEMS should be banished.
10960
10961 * src/output.c (output_token_translations): Rename as...
10962 (prepare_tokens): this.
10963 In addition to `translate', prepare the muscles `tname' and
10964 `toknum', which were handled by...
10965 (output_rule_data): this.
10966 Remove, and move the remainder of its outputs into...
10967 (prepare_rules): this new routines, which also merges content from
10968 (output_gram): this.
10969 (prepare_rules): Be sure never to walk through RITEMS.
10970 (output_stos): Rename as...
10971 (prepare_stos): this.
10972 (output): Always invoke prepare_states, after all, just don't use it
10973 in the output if you don't need it.
10974
643a5994
AD
109752002-04-07 Akim Demaille <akim@epita.fr>
10976
10977 * src/LR0.c (new_state): Display `nstates' as the name of the
10978 newly created state.
10979 Adjust to initialize first_state and last_state if needed.
10980 Be sure to distinguish the initial from the final state.
10981 (new_states): Create the itemset of the initial state, and use
10982 new_state.
10983 * src/closure.c (closure): Now that the initial state has its
10984 items properly set, there is no need for a special case when
10985 creating `ruleset'.
10986
10987 As a result, now the rule 0, reducing to $axiom, is visible in the
10988 outputs. Adjust the test suite.
10989
10990 * tests/conflicts.at (Solved SR Conflicts)
10991 (Unresolved SR Conflicts): Adjust.
10992 * tests/regression.at (Web2c Report, Rule Line Numbers): Idem.
10993 * tests/conflicts.at (S/R in initial): New.
10994
b4c4ccc2
AD
109952002-04-07 Akim Demaille <akim@epita.fr>
10996
10997 * src/LR0.c (allocate_itemsets): Don't loop over ritem: loop over
10998 the RHS of the rules.
10999 * src/output.c (output_gram): Likewise.
11000
bba97eb2
AD
110012002-04-07 Akim Demaille <akim@epita.fr>
11002
11003 * src/gram.h (rule_t): `lhs' is now a pointer to the symbol's
11004 bucket.
11005 Adjust all dependencies.
11006 * src/reduce.c (nonterminals_reduce): Don't forget to renumber the
11007 `number' of the buckets too.
11008 * src/gram.h: Include `symtab.h'.
11009 (associativity): Move to...
11010 * src/symtab.h: here.
11011 No longer include `gram.h'.
11012
c3b407f4
AD
110132002-04-07 Akim Demaille <akim@epita.fr>
11014
11015 * src/gram.h, src/gram.c (rules_rhs_length): New.
11016 (ritem_longest_rhs): Use it.
11017 * src/gram.h (rule_t): `number' is a new member.
11018 * src/reader.c (packgram): Set it.
11019 * src/reduce.c (reduce_grammar_tables): Move the useless rules at
11020 the end of `rules', and count them out of `nrules'.
11021 (reduce_output, dump_grammar): Adjust.
11022 * src/print.c (print_grammar): It is no longer needed to check for
11023 the usefulness of a rule, as useless rules are beyond `nrules + 1'.
11024 * tests/reduce.at (Reduced Automaton): New test.
11025
11652ab3
AD
110262002-04-07 Akim Demaille <akim@epita.fr>
11027
11028 * src/reduce.c (inaccessable_symbols): Fix a buglet: because of a
11029 lacking `+ 1' to nrules, Bison reported as useless a token if it
11030 was used solely to set the precedence of the last rule...
11031
26b23c1a
AD
110322002-04-07 Akim Demaille <akim@epita.fr>
11033
11034 * data/bison.c++, data/bison.simple: Don't output the current file
11035 name in #line, to avoid useless diffs between two identical
11036 outputs under different names.
11037
18bcecb0
AD
110382002-04-07 Akim Demaille <akim@epita.fr>
11039
11040 * src/closure.c, src/print.c, src/reader.c, src/reduce.c:
11041 Normalize loops to using `< nrules + 1', not `<= nrules'.
11042
fa770c86
AD
110432002-04-07 Akim Demaille <akim@epita.fr>
11044
11045 * TODO: Update.
11046
d9b739c3
AD
110472002-04-07 Akim Demaille <akim@epita.fr>
11048
11049 * src/output.c, src/reader.c, src/symtab.c, src/symtab.h: Rename
11050 bucket.value as bucket.number.
11051
99013900
AD
110522002-04-07 Akim Demaille <akim@epita.fr>
11053
11054 * src/closure.c, src/derives.c, src/gram.h, src/lalr.c,
11055 * src/nullable.c, src/output.c, src/print.c, src/print_graph.c,
11056 * src/reader.c, src/reduce.c: Let rule_t.rhs point directly to the
11057 RHS, instead of being an index in RITEMS.
11058
e966383b
PE
110592002-04-04 Paul Eggert <eggert@twinsun.com>
11060
11061 * doc/bison.texinfo: Update copyright date.
11062 (Rpcalc Lexer, Symbols, Token Decl): Don't assume ASCII.
11063 (Symbols): Warn about running Bison in one character set,
11064 but compiling and/or running in an incompatible one.
11065 Warn about character code 256, too.
11066
110672002-04-03 Paul Eggert <eggert@twinsun.com>
11068
11069 * src/bison.data (YYSTACK_ALLOC): Depend on whether
11070 YYERROR_VERBOSE is nonzero, not whether it is defined.
11071
11072 Merge changes from bison-1_29-branch.
c307773e 11073
8d6c48b9
PE
110742002-03-20 Paul Eggert <eggert@twinsun.com>
11075
11076 Merge fixes from Debian bison_1.34-1.diff.
11077
11078 * configure.in (AC_PREREQ): 2.53.
11079
e53c6322
AD
110802002-03-20 Akim Demaille <akim@epita.fr>
11081
11082 * src/conflicts.c (log_resolution): Argument `resolution' is const.
11083
9ffbeca7
PE
110842002-03-19 Paul Eggert <eggert@twinsun.com>
11085
21db0b2a
PE
11086 * src/bison.simple (YYCOPY): New macro.
11087 (YYSTACK_RELOCATE): Use it.
11088 Remove Type arg; no longer needed. All callers changed.
11089 (yymemcpy): Remove; no longer needed.
11090
9ffbeca7
PE
11091 * Makefile.am (AUTOMAKE_OPTIONS): 1.6.
11092 * doc/Makefile.am (AUTOMAKE_OPTIONS): Remove.
11093
642cb8f8
AD
110942002-03-19 Akim Demaille <akim@epita.fr>
11095
11096 Test and fix the #line outputs.
11097
11098 * tests/atlocal.at (GCC): New.
11099 * tests/synclines.at (AT_TEST_SYNCLINE): New macro.
0ffd4fd1 11100 (Prologue synch line, %union synch line, Postprologue synch line)
642cb8f8
AD
11101 (Action synch line, Epilogue synch line): New tests.
11102 * src/reader.c (parse_union_decl): Define the muscle stype_line.
11103 * data/bison.simple, data/bison.c++: Use it.
11104
3c31a486
AD
111052002-03-19 Akim Demaille <akim@epita.fr>
11106
11107 * tests/regression.at (%nonassoc and eof, Unresolved SR Conflicts)
11108 (Solved SR Conflicts, %expect not enough, %expect right)
11109 (%expect too much): Move to...
11110 * tests/conflicts.at: this new file.
11111
0d8bed56
AD
111122002-03-19 Akim Demaille <akim@epita.fr>
11113
11114 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
11115 * data/bison.simple, data/bison.c++: Handle the `#define' part, so
11116 that we can move to enums for instance.
11117 * src/output.c (token_definitions_output): Output a list of
11118 `token-name, token-number' instead of the #define.
11119 (output_skeleton): Name this list `b4_tokens', not `b4_tokendefs'.
11120
9208d17f
AD
111212002-03-14 Akim Demaille <akim@epita.fr>
11122
11123 Use Gettext 0.11.1.
11124
af27eacb
RA
111252002-03-09 Robert Anisko <robert@lrde.epita.fr>
11126
11127 * data/bison.c++: Make the user able to add members to the generated
11128 parser by subclassing.
11129
9101a310
RA
111302002-03-05 Robert Anisko <robert@lrde.epita.fr>
11131
11132 * src/reader.c (read_additionnal_code): `c' should be an integer, not
11133 a character.
11134 Reported by Nicolas Tisserand and Nicolas Burrus.
11135
fff9bf0b
RA
111362002-03-04 Robert Anisko <robert@lrde.epita.fr>
11137
11138 * src/reader.c: Warn about lacking semi-colons, do not complain.
11139
64dba31e
RA
111402002-03-04 Robert Anisko <robert@lrde.epita.fr>
11141
11142 * data/bison.c++: Remove a debug line.
11143
374f5a14
RA
111442002-03-04 Robert Anisko <robert@lrde.epita.fr>
11145
11146 * data/bison.c++: Unmerge value as yylval and value as yyval. Unmerge
11147 location as yylloc and location as yyloc. Use YYLLOC_DEFAULT, and
11148 provide a default implementation.
11149
bfcf1f3a
AD
111502002-03-04 Akim Demaille <akim@epita.fr>
11151
11152 * tests/input.at (Invalid $n, Invalid @n): Add the ending `;'.
11153 * tests/output.at (AT_CHECK_OUTPUT): Likewise.
11154 * tests/headers.at (AT_TEST_CPP_GUARD_H): Ditto.
11155 * tests/semantic.at (Parsing Guards): Similarly.
11156 * src/reader.at (readgram): Complain if the last rule is not ended
11157 with a semi-colon.
11158
65ccf9fc
AD
111592002-03-04 Akim Demaille <akim@epita.fr>
11160
11161 * src/warshall.h, src/warshall.c (bitmatrix_print): Move to...
11162 * src/closure.c: here.
11163 (set_firsts): Use bitsetv_reflexive_transitive_closure instead of
11164 RTC.
11165 * src/warshall.h, src/warshall.c: Remove.
11166 * tests/sets.at (Broken Closure): Adjust.
11167
d0039cbc
AD
111682002-03-04 Akim Demaille <akim@epita.fr>
11169
11170 * src/output.c (output_skeleton): tempdir is const.
11171 bytes_read is unused.
11172
345cea78
AD
111732002-03-04 Akim Demaille <akim@epita.fr>
11174
11175 * lib/bbitset.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
11176 * lib/bitsetv.h, lib/ebitset.c, lib/lbitset.c, lib/sbitset.c:
11177 Update.
11178 From Michael Hayes.
11179
564801f7
AD
111802002-03-04 Akim Demaille <akim@epita.fr>
11181
11182 * src/closure.c (closure): `r' is unused.
11183
e5352bc7
AD
111842002-03-04 Akim Demaille <akim@epita.fr>
11185
11186 * tests/sets.at (Broken Closure): Add the ending `;'.
11187 * src/reader.at (readgram): Complain if a rule is not ended with a
11188 semi-colon.
11189
914feea9
AD
111902002-03-04 Akim Demaille <akim@epita.fr>
11191
11192 * src/conflicts.c (set_conflicts): Use bitset_disjoint_p.
11193 (count_sr_conflicts): Use bitset_count.
11194 * src/reduce.c (inaccessable_symbols): Ditto.
11195 (bits_size): Remove.
11196 * src/warshall.h, src/warshall.c: Convert to bitsetv.
11197
f0250de6
AD
111982002-03-04 Akim Demaille <akim@epita.fr>
11199
11200 * src/closure.c, src/conflicts.c, src/lalr.c, src/print.c,
11201 * src/reduce.c: Remove the `bitset_zero's following the
11202 `bitset_create's, as now it is performed by the latter.
11203
ef017502
AD
112042002-03-04 Akim Demaille <akim@epita.fr>
11205
11206 * lib/bitset.c, lib/bitset.h, lib/bitsetv.c, lib/bitsetv.h,
11207 * lib/ebitset.c, lib/ebitset.h, lib/lbitset.c, lib/lbitset.h,
11208 * lib/sbitset.c, lib/sbitset.h, lib/bbitset.h: Update from the
11209 latest sources from Michael.
11210
76514394
AD
112112002-03-04 Akim Demaille <akim@epita.fr>
11212
11213 * src/output.c (output): Don't free the grammar.
11214 * src/reader.c (grammar_free): New.
11215 * src/main.c (main): Call it and don't free symtab here.
11216
55024580
AD
112172002-03-04 Akim Demaille <akim@epita.fr>
11218
11219 * src/lex.c (parse_percent_token): Be sure to 0-end token_buffer
11220 before returning.
11221 Reported by Benoit Perrot.
11222
f9abaa2c
AD
112232002-03-04 Akim Demaille <akim@epita.fr>
11224
11225 Use bitset operations when possible, not loops over bits.
11226
11227 * src/conflicts.c (set_conflicts, count_sr_conflicts): Use
11228 bitset_or.
11229 * src/print.c (print_reductions): Use bitset_and, bitset_andn.
11230 * src/reduce.c (useless_nonterminals): Formatting changes.
11231 * src/warshall.c (TC): Use bitset_or.
11232
0e721e75
AD
112332002-03-04 Akim Demaille <akim@epita.fr>
11234
11235 * src/lalr.h, src/lalr.c (tokensetsize): Remove, unused.
11236 * src/system.h (BITS_PER_WORD, WORDSIZE, SETBIT, RESETBIT, BITISSET):
11237 Ditto.
11238
0fb1ffb1
AD
112392002-03-04 Akim Demaille <akim@epita.fr>
11240
11241 * src/lalr.c (F): Now a bitset*.
11242 Adjust all dependencies.
11243
b86796bf
AD
112442002-03-04 Akim Demaille <akim@epita.fr>
11245
11246 * src/conflicts.c (shiftset, lookaheadset): Now bitset.
11247 Adjust all dependencies.
11248
602bbf31
AD
112492002-03-04 Akim Demaille <akim@epita.fr>
11250
11251 * src/L0.c, src/LR0.h (nstates): Be size_t.
11252 Adjust comparisons (signed vs unsigned).
11253 * src/conflics.c, src/lalr.c, src/lalr.h, src/output.c (LA): Now a
11254 bitset*.
11255 Adjust all dependencies.
11256
d8a0245c
AD
112572002-03-04 Akim Demaille <akim@epita.fr>
11258
11259 * src/closure.c (firsts): Now, also a bitset.
11260 Adjust all dependencies.
11261 (varsetsize): Remove, now unused.
11262 * src/warshall.h, src/warshall.c: Now work on arrays of bitsets.
11263
34ba9743
AD
112642002-03-04 Akim Demaille <akim@epita.fr>
11265
11266 * src/print.c: Convert to use bitset.h, not hand coded iterations
11267 over ints.
11268
ed86e78c
AD
112692002-03-04 Akim Demaille <akim@epita.fr>
11270
11271 * src/reduce.c: Convert to use bitset.h, not hand coded BSet.
11272
dfdb1797
AD
112732002-03-04 Akim Demaille <akim@epita.fr>
11274
11275 * src/closure.c (ruleset): Be a bitset.
11276 (rulesetsize): Remove.
11277
7086e707
AD
112782002-03-04 Akim Demaille <akim@epita.fr>
11279
11280 * lib/bitset-int.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
11281 * lib/bitsetv.h, lib/ebitset.c, lib/ebitset.h, lib/lbitset.c,
11282 * lib/lbitset.h, lib/sbitset.c, lib/sbitset.h: New.
11283 * src/closure.c (fderives): Be an array of bitsets.
11284
98254360
RA
112852002-02-28 Robert Anisko <robert@lrde.epita.fr>
11286
11287 * data/bison.c++: Merge the two generated headers. Insert a copyright
11288 notice in each output file.
11289
a75c057f
AD
112902002-02-28 Akim Demaille <akim@epita.fr>
11291
11292 * data/bison.c++: Copy the prologue of bison.simple to fetch
11293 useful M4 definitions, such as b4_header_guard.
11294
06b00abc
AD
112952002-02-25 Akim Demaille <akim@epita.fr>
11296
11297 * src/getargs.c (version): Give the name of the authors, and use a
a75c057f
AD
11298 translator friendly scheme for the bgr
11299 copyright notice.
06b00abc 11300
70e7d534
AD
113012002-02-25 Akim Demaille <akim@epita.fr>
11302
11303 * src/output.c (header_output): Remove, now handled completely via
11304 M4.
11305
abe017f6
AD
113062002-02-25 Akim Demaille <akim@epita.fr>
11307
11308 * m4/m4.m4: New, from CVS Autoconf.
11309 * configure.in: Invoke it.
11310 * src/output.c (output_skeleton): Use its result instead of the
11311 hard coded name.
11312
381fb12e
AD
113132002-02-25 Akim Demaille <akim@epita.fr>
11314
11315 * lib/tempname.c, lib/mkstemp.c, m4/mkstemp.m4: New, stolen from
11316 Fileutils 4.1.5.
11317 * configure.in: Invoke UTILS_FUNC_MKSTEMP.
11318 * src/output.c (output_skeleton): Use mkstemp to create a real
11319 temporary file.
11320 Move the filling of `skeleton' and its muscle to...
11321 (prepare): here.
11322 (output): Move the definition of the prologue muscle to...
11323 (prepare): here.
11324 * src/system.h (DEFAULT_TMPDIR): New.
11325
6f38107f
PE
113262002-02-14 Paul Eggert <eggert@twinsun.com>
11327
11328 Remove the support for C++ namespace cleanliness; it was
11329 causing more problems than it was curing, since it didn't work
11330 properly on some nonstandard C++ compilers. This can wait
11331 for a proper C++ parser.
11332
11333 * NEWS: Document this.
11334 * doc/bison.texinfo (Bison Parser, Debugging): Remove special mention
11335 of C++, as it's treated like C now.
11336 * src/bison.simple (YYSTD): Remove.
11337 (YYSIZE_T, YYFPRINTF, YYPARSE_PARAM_ARG, YYPARSE_PARAM_DECL):
11338 Treat C++ just like Standard C instead of trying to support
11339 namespace cleanliness.
11340
80cce3da
AD
113412002-02-14 Akim Demaille <akim@epita.fr>
11342
11343 * tests/regression.at (else): Adjust to Andreas' change.
11344
842e8679
AD
113452002-02-14 Akim Demaille <akim@epita.fr>
11346
11347 * lib/Makefile.am (EXTRA_DIST): Ship strnlen.c.
11348
4bda3f10
AD
113492002-02-13 Andreas Schwab <schwab@suse.de>
11350
11351 * src/output.c (output_rule_data): Don't output NULL, it might
11352 not be defined yet.
11353
4162fa07 113542002-02-11 Robert Anisko <robert@lrde.epita.fr>
b418ecd8 11355
4162fa07
RA
11356 * data/bison.c++ (YYDEBUG, YYERROR_VERBOSE): After the prologue.
11357 (Copyright notice): Update.
b418ecd8 11358
bd16a5dc
AD
113592002-02-11 Akim Demaille <akim@epita.fr>
11360
11361 * tests/regression.at (%nonassoc and eof): Don't include
11362 nonportable headers.
11363
8d69a1a3
RA
113642002-02-08 Robert Anisko <robert@lrde.epita.fr>
11365
11366 * data/bison.c++: Correct error recovery. Make the user able to
11367 initialize the starting location.
11368
9b2d0677
AD
113692002-02-07 Akim Demaille <akim@epita.fr>
11370
11371 * tests/input.at: New.
11372
69e2658b
RA
113732002-02-07 Robert Anisko <robert@lrde.epita.fr>
11374
11375 * data/bison.c++: Replace some direct m4 expansions by constants. Be
9b2d0677 11376 more consistent when naming methods and variables. Put preprocessor
69e2658b
RA
11377 directives around tables only needed for debugging.
11378
4aacc3a7
RA
113792002-02-07 Robert Anisko <robert@lrde.epita.fr>
11380
11381 * data/bison.c++ (yy::b4_name::print_): New method, replaces yyprint in
11382 C++ parsers.
11383 (yy::b4_name::parse): Use print_.
11384
762a801e
RA
113852002-02-07 Robert Anisko <robert@lrde.epita.fr>
11386
11387 * data/bison.c++ (yy::b4_name::parse): Error recovery is back.
11388
4bb2bc3f
RA
113892002-02-07 Robert Anisko <robert@lrde.epita.fr>
11390
11391 * data/bison.c++ (yy::b4_name::error_): New method, replaces yyerror in
11392 C++ parsers.
11393 (yy::b4_name::parse): Build verbose error messages, and use error_.
11394
6b45a3ca
RA
113952002-02-06 Robert Anisko <robert@lrde.epita.fr>
11396
11397 * data/bison.c++: Fix m4 quoting in comments.
11398
50997c6e
RA
113992002-02-06 Robert Anisko <robert@lrde.epita.fr>
11400
11401 * data/bison.c++: Adjust the parser code. Fix some muscles that were
11402 not expanded by m4.
11403
3f3eed27
AD
114042002-02-05 Akim Demaille <akim@epita.fr>
11405
11406 * data/bison.c++: Adjust to the M4 back end.
11407 More is certainly needed.
11408
be2a1a68
AD
114092002-02-05 Akim Demaille <akim@epita.fr>
11410
11411 Give a try to M4 as a back end.
11412
11413 * lib/readpipe.c: New, from wdiff.
11414 * src/Makefile.am (DEFS): Define PKGDATADIR, not BISON_SIMPLE and
11415 BISON_HAIRY.
11416 * src/system.h (BISON_HAIRY, BISON_SIMPLE): Remove the DOS and VMS
11417 specific values. Now it is m4 that performs the lookup.
11418 * src/parse-skel.y: Remove.
11419 * src/muscle_tab.c, src/muscle_tab.h (muscles_m4_output): New.
11420 * src/output.c (actions_output, guards_output)
11421 (token_definitions_output): No longer keeps track of the output
11422 line number, hence remove the second argument.
11423 (guards_output): Check against the guard member of a rule, not the
11424 action member.
11425 Adjust callers.
11426 (output_skeleton): Don't look for the skeleton location, let m4 do
11427 that.
11428 Create `/tmp/muscles.m4'. This is temporary, a proper temporary
11429 file will be used.
11430 Invoke `m4' on m4sugar.m4, muscles.m4, and the skeleton.
11431 (prepare): Given that for the time being changesyntax is not
11432 usable in M4, rename the muscles using `-' to `_'.
11433 Define `defines_flag', `output_parser_name' and `output_header_name'.
11434 * src/output.h (actions_output, guards_output)
11435 (token_definitions_output): Adjust prototypes.
11436 * src/scan-skel.l: Instead of scanning the skeletons, it now
11437 processes the output of m4: `__oline__' and `#output'.
11438 * data/bison.simple: Adjust to be used by M4(sugar).
11439 * tests/Makefile.am: Use check_SCRIPTS to make sure `bison' is up
11440 to date.
11441 * tests/bison.in: Use the secrete envvar `BISON_PKGDATADIR'
11442 instead of the dead `BISON_SIMPLE' and `BISON_HAIRY'.
11443 * data/m4sugar/m4sugar.m4, data/m4sugar/version.m4: New,
11444 shamelessly stolen from CVS Autoconf.
11445
beda758b
AD
114462002-02-05 Akim Demaille <akim@epita.fr>
11447
11448 * lib/hash.c, lib/hash.h: Replace with Fileutils 4.1's version.
11449 * configure.in: Check for the declarations of free and malloc.
11450 * src/muscle_tab.c: Adjust.
11451
5ece6d43
AD
114522002-02-05 Akim Demaille <akim@epita.fr>
11453
11454 * src/muscle_tab.c (muscle_init): Don't default to NULL muscle
11455 which have no values.
11456
5bb18f9a
AD
114572002-02-05 Akim Demaille <akim@epita.fr>
11458
11459 * src/bison.simple, src/bison.hairy, src/bison.c++: Move to...
11460 * data/: here.
11461
894dd62e
PE
114622002-01-29 Paul Eggert <eggert@twinsun.com>
11463
11464 * src/bison.simple (YYSIZE_T): Do not define merely because
11465 YYSTACK_USE_ALLOCA is nonzero or alloca or _ALLOCA_H are defined.
11466 On some platforms, <alloca.h> does not declare YYSTD (size_t).
11467
82841af7
AD
114682002-01-27 Akim Demaille <akim@epita.fr>
11469
11470 Fix `%nonassoc and eof'.
11471
11472 * src/state.c (errs_dup): Aaaah! The failure was due to bytes
11473 which were not properly copied! Replace
11474 memcpy (res->errs, src->errs, src->nerrs);
11475 with
11476 memcpy (res->errs, src->errs, src->nerrs * sizeof (src->errs[0]));
11477 !!!
11478 * tests/regression.at (%nonassoc and eof): Adjust to newest
11479 Autotest: `.' is not in the PATH.
11480
318b76e9
AD
114812002-01-27 Akim Demaille <akim@epita.fr>
11482
11483 * tests/sets.at (AT_EXTRACT_SETS): New.
11484 (Nullable): Use it.
11485 (Firsts): New.
11486
30d2f3d5
AD
114872002-01-26 Akim Demaille <akim@epita.fr>
11488
11489 * tests/actions.at, tests/calc.at, tests/headers.at,
11490 * tests/torture.at: Adjust to the newest Autotest which no longer
11491 forces `.' in the PATH.
11492
30f8c395
AD
114932002-01-25 Akim Demaille <akim@epita.fr>
11494
11495 * tests/regression.at (%nonassoc and eof): New.
11496 Suggested by Robert Anisko.
11497
29ae55f1
AD
114982002-01-24 Akim Demaille <akim@epita.fr>
11499
11500 Bison dumps core when trying to complain about broken input files.
11501 Reported by Cris van Pelt.
11502
11503 * src/lex.c (parse_percent_token): Be sure to set token_buffer.
11504 * tests/regression.at (Invalid input: 1, Invalid input: 2): Merge
11505 into...
11506 (Invalid inputs): Strengthen: exercise parse_percent_token.
11507
2b548aa6
RA
115082002-01-24 Robert Anisko <robert.anisko@epita.fr>
11509
11510 * src/Makefile.am: Add bison.c++.
11511 * src/bison.c++: New skeleton.
11512
bb0146c2
AD
115132002-01-21 Paolo Bonzini <bonzini@gnu.org>
11514
11515 * po/it.po: New.
11516
bec30531
AD
115172002-01-21 Kees Zeelenberg <kzlg@users.sourceforge.net>
11518
11519 * src/files.c (skeleton_find) [MSDOS]: Fix cp definition.
11520
fc6edc45
MA
115212002-01-20 Marc Autret <marc@gnu.org>
11522
11523 * src/files.c (compute_output_file_names): Fix
11524
5e5d5415
MA
115252002-01-20 Marc Autret <marc@gnu.org>
11526
11527 * tests/output.at: New test.
11528 * src/files.c (compute_base_names): Don't map extensions when
11529 the YACC flag is set, use defaults.
11530 Reported by Evgeny Stambulchik.
11531
44ea3fbd
MA
115322002-01-20 Marc Autret <marc@gnu.org>
11533
ba0fe3c7
PE
11534 * src/system.h: Need to define __attribute__ away for non-GCC
11535 compilers as well (i.e., the vendor C compiler).
44ea3fbd
MA
11536 Suggested by Albert Chin-A-Young.
11537
338963d1
TVH
115382002-01-11 Tim Van Holder <tim.van.holder@pandora.be>
11539
11540 * lib/hash.h, lib/hash.c: Renamed __P to PARAMS and used the
11541 canonical definition.
11542 * src/system.h: Use the canonical definition for PARAMS (avoids
11543 a conflict with the macro from lib/hash.h).
11544
c57b2479
AD
115452002-01-11 Akim Demaille <akim@epita.fr>
11546
11547 * configure.in: Use AC_FUNC_STRNLEN.
d9e9746c 11548 Fixes the failures observed on AIX 4.3 by H.Merijn Brand.
c57b2479 11549
b85810ae
AD
115502002-01-09 Akim Demaille <akim@epita.fr>
11551
11552 * src/files.c, src/files.h (output_infix): New.
11553 (tab_extension): Remove.
11554 (compute_base_names): Compute the former, drop the latter.
11555 * src/output.c (prepare): Insert the muscles `output-infix', and
11556 `output-suffix'.
11557 * src/parse-skel.y (string, string.1): New.
11558 (section.header): Use it.
11559 (section.yacc): Remove.
11560 (prefix): Remove too.
11561 * src/scan-skel.l: Adjust.
11562 * src/bison.simple, src/bison.hairy: Adjust.
11563
cae60122
AD
115642002-01-09 Akim Demaille <akim@epita.fr>
11565
11566 * configure.in (WERROR_CFLAGS): Compute it.
11567 * src/Makefile.am (CFLAGS): Pass it.
11568 * tests/atlocal.in (CFLAGS): Idem.
11569 * src/files.c: Fix a few warnings.
11570 (get_extension_index): Remove, unused.
11571
ae404801
AD
115722002-01-08 Akim Demaille <akim@epita.fr>
11573
11574 * src/getargs.c (AS_FILE_NAME): New.
11575 (getargs): Use it to convert DOSish file names.
11576 * src/files.c (base_name): Rename as full_base_name to avoid
11577 clashes with `base_name ()'.
11578 (filename_split): New.
11579 (compute_base_names): N-th rewrite, using filename_split.
11580
22312b71
AD
115812002-01-08 Akim Demaille <akim@epita.fr>
11582
11583 * lib/basename.c, lib/dirname.h, lib/dirname.c, lib/memrchr.c:
11584 New, stolen from the Fileutils 4.1.
11585 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
11586 * configure.in: Check for the presence of memrchr, and of its
11587 prototype.
11588
a67cef01
TVH
115892002-01-07 Tim Van Holder <tim.van.holder@pandora.be>
11590
11591 * lib/hash.h (__P): Added definition for this macro.
11592 * src/Makefile.am: Add parse-skel.c and scan-skel.c to
11593 BUILT_SOURCES, to ensure they are generated first.
11594 * src/parse-skel.y: Use YYERROR_VERBOSE instead of
11595 %error-verbose to allow bootstrapping with bison 1.30x.
11596
2b25d624
AD
115972002-01-06 Akim Demaille <akim@epita.fr>
11598
11599 * src/reader.c (parse_braces): Don't fetch the next char, the
11600 convention is to fetch on entry.
11601 * tests/torture.at (GNU Cim Grammar): Reintroduce their weird
11602 'switch' without a following semicolon.
11603 * tests/regression.at (braces parsing): New.
11604
3460813b
AD
116052002-01-06 Akim Demaille <akim@epita.fr>
11606
11607 Bison is dead wrong in its RR conflict reports.
11608
11609 * tests/torture.at (GNU Cim Grammar): New.
11610 * src/conflicts.c (count_rr_conflicts): Fix.
11611
73784c64
AD
116122002-01-06 Akim Demaille <akim@epita.fr>
11613
11614 Creating package.m4 from configure.ac causes too many problems.
11615
11616 * tests/Makefile.am (package.m4): Create it by hand,
11617 AC_CONFIG_TESTDIR no longer does in the most recent CVS Autoconf.
11618
25d81090
AD
116192002-01-06 Akim Demaille <akim@epita.fr>
11620
11621 * src/Makefile.am (bison_SOURCES): Add parse-skel.h and
11622 skeleton.h.
11623
a9b8959e
PE
116242002-01-04 Paul Eggert <eggert@twinsun.com>
11625
11626 * doc/bison.texinfo (Debugging):
11627 Remove YYSTDERR; it's no longer defined or used.
11628 Also, s/cstdio.h/cstdio/.
11629
25d81090
AD
116302002-01-03 Akim Demaille <akim@epita.fr>
11631
11632 * tests/bison.in, tests/atlocal.in: Adjust to CVS Autoconf.
11633
1109455c
AD
116342002-01-03 Akim Demaille <akim@epita.fr>
11635
11636 * src/parse-skel.y (process_skeleton): Don't bind the parser's
11637 tracing code to --trace, wait for a better --trace option, with
11638 args.
11639
7ea5e977
AD
116402002-01-03 Akim Demaille <akim@epita.fr>
11641
11642 * src/bison.simple (YYSTDERR): Remove, replace `stderr'.
11643 The ISO C++ standard is extremely clear about it: stderr is
11644 considered a macro, not a regular symbol (see table 94 `Header
11645 <cstdio> synopsis', [lib.c.files] 27.8.2 C Library files).
11646 Therefore std:: does not apply to it. It still does with fprintf.
11647 Also, s/cstdio.h/cstdio/.
11648
fab5b110
AD
116492002-01-03 Akim Demaille <akim@epita.fr>
11650
11651 * lib/quotearg.c: Use `#include "..."' instead of `#include <...>'
11652 for non system headers.
11653
aed7fd9b
AD
116542002-01-02 Akim Demaille <akim@epita.fr>
11655
11656 Equip the skeleton chain with location tracking, runtime trace,
11657 pure parser and scanner.
11658
11659 * src/parse-skel.y: Request a pure parser, locations, and prefix
11660 renaming.
11661 (%union): Having several members with the same type does not help
11662 type mismatches, simplify.
11663 (YYPRINT, yyprint): New.
11664 (yyerror): ``Rename'' (there is a #define yyerror skel_error) as...
11665 (skel_error): this.
11666 Handle locations.
11667 * src/scan-skel.l: Adjust to these changes.
11668 * src/skeleton.h (LOCATION_RESET, LOCATION_LINES, LOCATION_STEP)
11669 (LOCATION_PRINT, skel_control_t): New.
11670
24fad99e
AD
116712001-12-30 Akim Demaille <akim@epita.fr>
11672
11673 * src/parse-skel.y: Get rid of the shift/reduce conflict:
11674 replace `gb' with BLANKS.
11675 * src/scan-skel.l: Adjust.
11676
a4b36db4
AD
116772001-12-30 Akim Demaille <akim@epita.fr>
11678
11679 * src/system.h: We don't need nor want bcopy.
11680 Throw away MS-DOS crap: we don't need getpid.
11681 * configure.in: We don't need strndup. It was even causing
11682 problems: because Flex includes the headers *before* us,
11683 _GNU_SOURCE is not defined by config.h, and therefore strndup was
11684 not visible.
11685 * lib/xstrndup.c: New.
11686 * src/scan-skel.l: Use it.
11687 Be sure to initialize yylval.muscle member when scanning a MUSCLE.
11688 * src/parse-skel.y: Use %directives instead of #defines.
11689
1239777d
AD
116902001-12-30 Akim Demaille <akim@epita.fr>
11691
11692 * src/skeleton.h: New.
11693 * src/output.c (output_parser, output_master_parser): Remove, dead
11694 code.
11695 * src/output.h (get_lines_number, actions_output, guards_output)
11696 (token_definitions_output): Prototype them.
11697 * src/parse-skel.y: Add the license notice.
11698 Include output.h and skeleton.h.
11699 (process_skeleton): Returns void, and takes a single parameter.
11700 * src/scan-skel.l: Add the license notice.
11701 Include skeleton.h.
11702 Don't use %option yylineno: it seems that then Flex imagines
11703 REJECT has been used, and therefore it won't reallocate its
11704 buffers (which makes no other sense to me than a bug). It results
11705 in warnings for `unused: yy_flex_realloc'.
11706
9b3add5b
RA
117072001-12-30 Robert Anisko <robert.anisko@epita.fr>
11708
11709 * src/muscle_tab.h (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
11710 (MUSCLE_INSERT_PREFIX): ...to there.
11711 * src/output.c (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
11712 (MUSCLE_INSERT_PREFIX): Move from here...
11713
11714 * src/bison.hairy: Add a section directive. Put braces around muscle
11715 names. This parser skeleton is still broken, but Bison should not
11716 choke on a bad muscle 'syntax'.
11717 * src/bison.simple: Add a section directive. Put braces around muscle
11718 names.
11719
11720 * src/files.h (strsuffix, stringappend): Add declarations.
11721 (tab_extension): Add declaration.
11722 (short_base_name): Add declaration.
11723
11724 * src/files.c (strsuffix, stringappend): No longer static. These
11725 functions are used in the skeleton parser.
11726 (tab_extension): New.
11727 (compute_base_names): Use the computations done in this function
fab5b110 11728 to guess if the generated parsers should have '.tab' in their
9b3add5b
RA
11729 names.
11730 (short_base_name): No longer static.
11731
11732 * src/output.c (output_skeleton): New.
11733 (output): Disable call to output_master_parser, and give a try to
11734 a new skeleton handling system.
11735 (guards_output, actions_output): No longer static.
11736 (token_definitions_output, get_lines_number): No longer static.
11737
11738 * configure.in: Use AM_PROG_LEX and AC_PROG_YACC.
11739
fab5b110 11740 * src/Makefile.am (bison_SOURCES): Add scan-skel.l and
9b3add5b
RA
11741 parse-skel.y.
11742
11743 * src/parse-skel.y: New file.
11744 * src/scan-skel.l: New file.
11745
b5b61c61
AD
117462001-12-29 Akim Demaille <akim@epita.fr>
11747
11748 %name-prefix is broken.
11749
11750 * src/files.c (spec_name_prefix): Initialize to NULL, not to "yy".
11751 Adjust all dependencies.
11752 * tests/headers.at (export YYLTYPE): Strengthen this test: use
11753 %name-prefix.
11754
11755 Renaming yylval but not yylloc is not consistent. Now we do.
11756
11757 * src/bison.simple: Prefix yylloc if used.
11758 * doc/bison.texinfo (Decl Summary): Document that.
11759
8c9a50be
AD
117602001-12-29 Akim Demaille <akim@epita.fr>
11761
11762 * doc/bison.texinfo: Promote `%long-directive' over
11763 `%long_directive'.
11764 Remove all references to fixed-output-files, yacc is enough.
11765
d99361e6
AD
117662001-12-29 Akim Demaille <akim@epita.fr>
11767
11768 * src/bison.simple: Define YYDEBUG and YYERROR_VERBOSE *after* the
11769 user prologue. These are defaults.
11770 * tests/actions.at (Mid-rule actions): Make sure the user can
11771 define YYDEBUG and YYERROR_VERBOSE.
11772
b9cecb91
AD
117732001-12-29 Akim Demaille <akim@epita.fr>
11774
11775 * src/output.c (header_output): Don't forget to export YYLTYPE and
11776 yylloc.
11777 * tests/headers.at (export YYLTYPE): New, make sure it does.
11778 * tests/regression.at (%union and --defines, Invalid CPP headers):
11779 Move to...
11780 * tests/headers.at: here.
11781
aea13e97
AD
117822001-12-29 Akim Demaille <akim@epita.fr>
11783
11784 * src/gram.h (rule_s): Member `assoc' is of type `associativity'.
11785
931394cb
AD
117862001-12-29 Akim Demaille <akim@epita.fr>
11787
11788 * tests/actions.at (Mid-rule actions): Output on a single line
11789 instead of several.
11790
704a47c4
AD
117912001-12-29 Akim Demaille <akim@epita.fr>
11792
11793 * doc/bison.texinfo: Formatting changes.
11794
091e20bb
AD
117952001-12-29 Akim Demaille <akim@epita.fr>
11796
11797 Don't store the token defs in a muscle, just be ready to output it
11798 on command. Now possible via `symbols'. Fixes a memory leak.
11799
11800 * src/output.c (token_definitions_output): New.
11801 (output_parser, header_output): Use it.
11802 * src/reader.c (symbols_save): Remove.
11803
cce71710
AD
118042001-12-29 Akim Demaille <akim@epita.fr>
11805
11806 * src/bison.simple: Do not provide a default for YYSTYPE and
11807 YYLTYPE before the user's prologue. Otherwise it's hardly... a
11808 default.
11809
82c035a8
AD
118102001-12-29 Akim Demaille <akim@epita.fr>
11811
11812 Mid-rule actions are simply... ignored!
11813
11814 * src/reader.c (readgram): Be sure to attach mid-rule actions to
11815 the empty-rule associated to the dummy symbol, not to the host
11816 rule.
11817 * tests/actions.at (Mid-rule actions): New.
11818
8419d367
AD
118192001-12-29 Akim Demaille <akim@epita.fr>
11820
11821 Memory leak.
11822
11823 * src/reader.c (reader): Free grammar.
11824
375d5806
AD
118252001-12-29 Akim Demaille <akim@epita.fr>
11826
11827 Memory leak.
11828
11829 * src/LR0.c (new_itemsets): Don't allocate `shift_symbol' here,
11830 since it allocates it for each state, although only one is needed.
11831 (allocate_storage): Do it here.
11832
f51cb8ff
AD
118332001-12-29 Akim Demaille <akim@epita.fr>
11834
11835 * src/options.h, src/options.c (create_long_option_table): Rename
11836 as...
11837 (long_option_table_new): this, with a clearer prototype.
11838 (percent_table): Remove, unused,
11839 * src/getargs.c (getargs): Adjust.
11840
29e88316
AD
118412001-12-29 Akim Demaille <akim@epita.fr>
11842
11843 * src/LR0.c, src/conflicts.c, src/lalr.c, src/lalr.h, src/output.c
11844 * src/print.c, src/print_graph.c, src/state.h: Rename state_table
11845 as states.
11846
b9f71f19
AD
118472001-12-29 Akim Demaille <akim@epita.fr>
11848
11849 * src/lalr.c (build_relations): Rename `states' as `states1'.
11850 Sorry, I don't understand exactly what it is, no better name...
11851
1a2b5d37
AD
118522001-12-29 Akim Demaille <akim@epita.fr>
11853
11854 * src/closure.c, src/conflicts.c, src/derives.c, src/gram.c
11855 * src/gram.h, src/lalr.c, src/nullable.c, src/output.c, src/print.c
11856 * src/print_graph.c, src/reader.c, src/reduce.c: Rename rule_table
11857 as rules.
11858
1cca533e
AD
118592001-12-29 Akim Demaille <akim@epita.fr>
11860
11861 * src/gram.c (rprec, rprecsym, rassoc): Remove, unused since long
11862 ago.
11863
c03ae966
AD
118642001-12-29 Akim Demaille <akim@epita.fr>
11865
11866 * src/reader.c, src/reader.h (user_toknums): Remove.
11867 Adjust all users to use symbols[i]->user_token_number.
11868
5a670b1e
AD
118692001-12-29 Akim Demaille <akim@epita.fr>
11870
11871 * src/gram.c, src/gram.h (sprec, sassoc): Remove.
11872 Adjust all users to use symbols[i]->prec or ->assoc.
11873
ad949da9
AD
118742001-12-29 Akim Demaille <akim@epita.fr>
11875
11876 * src/reader.c, src/reader.h (tags): Remove.
11877 Adjust all users to use symbols[i]->tag.
11878
0e78e603
AD
118792001-12-29 Akim Demaille <akim@epita.fr>
11880
11881 * src/gram.h, src/gram.c (symbols): New, similar to state_table
11882 and rule_table.
11883 * src/reader.c (packsymbols): Fill this table.
11884 Drop sprec.
11885 * src/conflicts.c (resolve_sr_conflict): Adjust.
11886 * src/reduce.c (reduce_grammar): Adjust: just sort symbols, a
11887 single table.
11888 Use symbols[i]->tag instead of tags[i].
11889
213e640e
AD
118902001-12-29 Akim Demaille <akim@epita.fr>
11891
11892 * tests/calc.at (_AT_DATA_CALC_Y): Also use %union.
11893 In addition, put a comment in there, to replace...
11894 * tests/regression.at (%union and C comments): Remove.
11895
e7b8bef1
AD
118962001-12-29 Akim Demaille <akim@epita.fr>
11897
11898 * tests/regression.at (Web2c Actions): Blindly move the actual
11899 output as expected output. The contents *seem* right to me, but I
11900 can't pretend reading perfectly parser tables... Nonetheless, all
11901 the other tests pass correctly, the table look OK, even though the
11902 presence of `$axiom' is to be noted: AFAICS it is useless (but
11903 harmless).
11904
b68e7744
AD
119052001-12-29 Akim Demaille <akim@epita.fr>
11906
11907 * src/reader.c (readgram): Don't add the rule 0 if there were no
11908 rules read. In other words, add it _after_ having performed
11909 grammar sanity checks.
11910 Fixes the `tests/regression.at (Invalid input: 1)' Failure.
11911
78d5bae9
AD
119122001-12-29 Akim Demaille <akim@epita.fr>
11913
11914 * tests/regression.at (Web2c Report): Catch up: the rule 0 is now
11915 visible, and some states have now a different number.
11916
ff442794
AD
119172001-12-29 Akim Demaille <akim@epita.fr>
11918
11919 * src/reader.c (readgram): Bind the initial rule's lineno to that
11920 of the first rule.
11921 * tests/regression.at (Rule Line Numbers, Unresolved SR Conflicts):
11922 (Solved SR Conflicts): Adjust rule 0's line number.
11923
610ab194
AD
119242001-12-29 Akim Demaille <akim@epita.fr>
11925
11926 Fix the `GAWK Grammar' failure.
11927
11928 * src/LR0.c (final_state): Initialize to -1 so that we do compute
11929 the reductions of the first state which was mistakenly confused
11930 with the final state because precisely final_state was initialized
11931 to 0.
11932 * tests/sets.at (Nullable): Adjust: state 0 does have lookaheads,
11933 now noticed by Bison.
11934 * tests/regression.at (Rule Line Numbers): Adjust: state 0 does
11935 have a reduction on $default.
11936
29d29c8f
AD
119372001-12-29 Akim Demaille <akim@epita.fr>
11938
11939 * src/gram.c (ritem_print): Be sure to subtract 1 when displaying
11940 rule line numbers.
11941 * src/closure.c (print_closure): Likewise.
11942 * src/derives.c (print_derives): Likewise.
11943 * tests/sets.at (Nullable): Adjust: the rule numbers are correct
11944 now.
11945
7c6b64d0
AD
119462001-12-29 Akim Demaille <akim@epita.fr>
11947
11948 * src/lalr.c (lookaheads_print): New.
11949 (lalr): Call it when --trace-flag.
11950 * tests/sets.at (Nullable): Adjust: when tracing, the lookaheads
11951 are dumped.
11952
3d4daee3
AD
119532001-12-29 Akim Demaille <akim@epita.fr>
11954
11955 * src/derives.c (print_derives): Be sure to use `>= 0', not `> 0',
11956 when walking through ritem, even via rule->rhs.
11957 * src/reduce.c (dump_grammar, useful_production, reduce_output)
11958 (useful_production, useless_nonterminals): Likewise.
11959 (reduce_grammar_tables): Likewise, plus update nritems.
11960 * src/nullable.c (set_nullable): Likewise.
11961 * src/lalr.c (build_relations): Likewise.
11962 * tests/sets.at (Nullable): Adjust.
11963 Fortunately, now, the $axiom is no longer nullable.
11964
9e7f6bbd
AD
119652001-12-29 Akim Demaille <akim@epita.fr>
11966
11967 * src/LR0.c (generate_states): Use nritems, not nitems, nor using
11968 the 0-sentinel.
11969 * src/gram.c (ritem_longest_rhs): Likewise.
11970 * src/reduce.c (nonterminals_reduce): Likewise.
11971 * src/print_graph.c (print_graph): Likewise.
11972 * src/output.c (output_rule_data): Likewise.
11973 * src/nullable.c (set_nullable): Likewise.
11974
255ef638
AD
119752001-12-29 Akim Demaille <akim@epita.fr>
11976
11977 * src/output.c: Comment changes.
11978
0d8a7363
AD
119792001-12-27 Paul Eggert <eggert@twinsun.com>
11980
11981 * src/bison.simple (YYSTACK_ALLOC, YYSIZE_T): Remove special
11982 cases for non-GNU systems like AIX, HP-UX, SGI, Sun, and
11983 Sparc, as they were causing more porting problems than the
11984 (minor) performance improvement was worth.
11985
11986 Also, catch up with 1.31's YYSTD.
11987
3db472b9
AD
119882001-12-27 Akim Demaille <akim@epita.fr>
11989
11990 * src/output.c (output_gram): Rely on nritems, not the
11991 0-sentinel. See below.
11992 Use -1 as separator, not 0.
11993 * src/bison.simple (yyparse): Subtract 1 to the rule numbers.
11994 Rely on -1 as separator in yyrhs, instead of 0.
11995 * tests/calc.at (AT_CHECK_CALC): Now, the parsers no longer issue
11996 twice `Now at end of input', therefore there are two lines less to
11997 expect.
11998
b365aa05
AD
119992001-12-27 Akim Demaille <akim@epita.fr>
12000
12001 * tests/regression.at (Unresolved SR Conflicts):
12002 (Solved SR Conflicts, Rule Line Numbers): Adjust to the changes
12003 below.
12004
30171f79
AD
120052001-12-27 Akim Demaille <akim@epita.fr>
12006
12007 * src/LR0.c (new_state): Recognize the final state by the fact it
12008 is reached by eoftoken.
12009 (insert_start_shifting_state, insert_eof_shifting_state)
12010 (insert_accepting_state, augment_automaton): Remove, since now
12011 these states are automatically computed from the initial state.
12012 (generate_states): Adjust.
12013 * src/print.c: When reporting a rule number to the user, substract
12014 1, so that the axiom rule is rule 0, and the first user rule is 1.
12015 * src/reduce.c: Likewise.
12016 * src/print_graph.c (print_core): For the time being, just as for
12017 the report, depend upon --trace-flags to dump the full set of
12018 items.
12019 * src/reader.c (readgram): Once the grammar read, insert the rule
12020 0: `$axiom: START-SYMBOL $'.
12021 * tests/set.at: Adjust: rule 0 is now displayed, and since the
12022 number of the states has changed (the final state is no longer
12023 necessarily the last), catch up.
12024
75142d45
AD
120252001-12-27 Akim Demaille <akim@epita.fr>
12026
12027 Try to make the use of the eoftoken valid. Given that its value
12028 is 0 which was also used as a sentinel in ritem, (i) make sure >= 0
12029 is used instead of > 0 where appropriate, (ii), depend upon nritems
12030 instead of the 0-sentinel.
12031
12032 * src/gram.h, src/gram.c (nritems): New.
12033 Expected to be duplication of nitems, but for the time being...
12034 * src/reader.c (packgram): Assert nritems and nitems are equal.
12035 * src/LR0.c (allocate_itemsets, new_itemsets): Adjust.
12036 * src/closure.c (print_closure, print_fderives): Likewise.
12037 * src/gram.c (ritem_print): Likewise.
12038 * src/print.c (print_core, print_grammar): Likewise.
12039 * src/print_graph.c: Likewise.
12040
b7c49edf
AD
120412001-12-27 Akim Demaille <akim@epita.fr>
12042
12043 * src/main.c (main): If there are complains after grammar
12044 reductions, then output the report anyway if requested, then die.
12045 * src/symtab.c (bucket_new): Initialize `value' to -1, not 0.
12046 * src/reader.c (eoftoken): New.
12047 (parse_token_decl): If the token being defined has value `0', it
12048 is the eoftoken.
12049 (packsymbols): No longer hack `tags' to insert `$' by hand.
12050 Be sure to preserve the value of the eoftoken.
12051 (reader): Make sure eoftoken is defined.
12052 Initialize nsyms to 0: now eoftoken is created just like the others.
12053 * src/print.c (print_grammar): Don't special case the eof token.
12054 * src/regression.at: Adjust: `$' has value 0, not -1, which was a
12055 lie anyway, albeit pleasant.
12056 * tests/calc.at: Exercise error messages with eoftoken.
12057 Change the grammar so that empty input is invalid.
12058 Adjust expectations.
12059 When yyungeting, be sure to use a valid yylloc: use last_yylloc.
12060
ec2da99f
AD
120612001-12-27 Akim Demaille <akim@epita.fr>
12062
12063 * configure.in: Check the protos of strchr ans strspn.
12064 Replace strchr if needed.
12065 * src/system.h: Provide the protos of strchr, strspn and memchr if
12066 missing.
12067 * lib/strchr.c: New.
12068 * src/reader.c (symbols_save): Use strchr.
12069
8adfa272
AD
120702001-12-27 Akim Demaille <akim@epita.fr>
12071
12072 * src/print.c, src/print_graph.c (escape): New.
12073 Use it to quote the TAGS outputs.
12074 * src/print_graph.c (print_state): Now errors are in red, and
12075 reductions in green.
12076 Prefer high to wide: output the state number on a line of its own.
12077
80dac38c
AD
120782001-12-27 Akim Demaille <akim@epita.fr>
12079
12080 * src/state.h, src/state.c (reductions_new): New.
12081 * src/LR0.c (set_state_table): Let all the states have a
12082 `reductions', even if reduced to 0.
12083 (save_reductions): Adjust.
12084 * src/lalr.c (initialize_LA, initialize_lookaheads): Adjust.
12085 * src/print.c (print_reductions, print_actions): Adjust.
12086 * src/output.c (action_row): Adjust.
12087
2cec70b9
AD
120882001-12-27 Akim Demaille <akim@epita.fr>
12089
12090 * src/state.h, src/state.c (errs_new, errs_dup): New.
12091 * src/LR0.c (set_state_table): Let all the states have an errs,
12092 even if reduced to 0.
12093 * src/print.c (print_errs, print_reductions): Adjust.
12094 * src/output.c (output_actions, action_row): Adjust.
12095 * src/conflicts.c (resolve_sr_conflict): Adjust.
12096
13ca549a
AD
120972001-12-27 Akim Demaille <akim@epita.fr>
12098
12099 * src/lalr.c (set_goto_map, initialize_F): Use SHIFT_SYMBOL.
12100
5092aba5
AD
121012001-12-27 Akim Demaille <akim@epita.fr>
12102
12103 * src/conflicts.c, src/conflicts.h (print_reductions): Move to...
12104 * src/print.c: here.
12105 (lookaheadset, shiftset): New, used as additional storage by
12106 print_reductions.
12107 (print_results): Adjust.
12108 (print_shifts, print_gotos, print_errs): New, extracted from...
12109 (print_actions): here.
12110 * src/print_graph.c (print_actions): Remove dead code.
12111
11e2beca
AD
121122001-12-27 Akim Demaille <akim@epita.fr>
12113
12114 * src/reader.c (copy_dollar, copy_at): Better checking of `n' in
12115 `$n' and `@n'.
12116
dac3c910
AD
121172001-12-27 Akim Demaille <akim@epita.fr>
12118
12119 * src/lalr.c (add_lookback_edge): Use state_t instead of ints.
12120 (build_relations): Adjust.
12121
d0b0fefa
AD
121222001-12-27 Akim Demaille <akim@epita.fr>
12123
12124 * src/lalr.c (set_goto_map): Remove a wrong but benign loop
12125 duplication.
12126
adc8c848
AD
121272001-12-27 Akim Demaille <akim@epita.fr>
12128
12129 * src/reader.c (packgram): Catch nitems overflows.
12130
14d293ac
AD
121312001-12-27 Akim Demaille <akim@epita.fr>
12132
12133 * src/files.c, src/files.h (guard_obstack): Remove.
12134 * src/output.c (output): Adjust.
12135 * src/reader.c (parse_braces): New, factoring...
12136 (copy_action, copy_guard): these two which are renamed as...
12137 (parse_action, parse_guard): these.
12138 As a voluntary consequence, using braces around guards is now
12139 mandatory.
12140
f499b062
AD
121412001-12-27 Akim Demaille <akim@epita.fr>
12142
12143 * src/gram.h (rule_t): `guard' and `guard_line' are new members.
12144 * src/reader.c (symbol_list): `guard' and `guard_line' are new
12145 members.
12146 (symbol_list_new): Adjust.
12147 (copy_action): action_line is the first line, not the last.
12148 (copy_guard): Just as for actions, store the `action' only, not
12149 the switch/case/break flesh.
12150 Don't parse the user action that might follow the guard, let...
12151 (readgram): do it, i.e., now, there can be an action after a
12152 guard.
12153 In other words the guard is just explicitly optional.
12154 (packgram): Adjust.
12155 * src/output.c (guards_output): New.
12156 (output_parser): Call it when needed.
12157 (output): Also free the guard and attrs obstacks.
12158 * src/files.c, src/files.h (obstack_save): Remove.
12159 (output_files): Remove.
12160 As a result, if one needs the former `.act' file, using an
12161 appropriate skeleton which requires actions and guards is now
12162 required.
12163 * src/main.c (main): Adjust.
12164 * tests/semantic.at: New.
12165 * tests/regression.at: Use `input.y' as input file name.
12166 Avoid 8+3 problems by requiring input.c when the test needs the
12167 parser.
12168
d945f5cd
AD
121692001-12-27 Akim Demaille <akim@epita.fr>
12170
12171 * src/reader.c (symbol_list_new): Be sure to initialize all the
12172 fields.
12173
d200e455
AD
121742001-12-27 Akim Demaille <akim@epita.fr>
12175
12176 All the hacks using a final pseudo state are now useless.
12177
12178 * src/LR0.c (set_state_table): state_table holds exactly nstates.
12179 * src/lalr.c (nLA): New.
12180 (initialize_LA, compute_lookaheads, initialize_lookaheads): Use it
12181 instead of lookaheadsp from the pseudo state (nstate + 1).
12182
f9507c28
AD
121832001-12-27 Akim Demaille <akim@epita.fr>
12184
12185 * src/output.c (action_row, token_actions): Use a state_t instead
12186 of a integer, and nlookaheads instead of the following state's
12187 lookaheadsp.
12188
065fbd27
AD
121892001-12-27 Akim Demaille <akim@epita.fr>
12190
12191 * src/conflicts.c (log_resolution, flush_shift)
12192 (resolve_sr_conflict, set_conflicts, solve_conflicts)
12193 (count_sr_conflicts, count_rr_conflicts, conflicts_output)
12194 (conflicts_print, print_reductions): Use a state_t instead of an
12195 integer when referring to a state.
12196 As much as possible, depend upon nlookaheads, instead of the
12197 `lookaheadsp' member of the following state (since lookaheads of
12198 successive states are successive, the difference between state n + 1
12199 and n served as the number of lookaheads for state n).
12200 * src/lalr.c (add_lookback_edge): Likewise.
12201 * src/print.c (print_core, print_actions, print_state)
12202 (print_results): Likewise.
12203 * src/print_graph.c (print_core, print_actions, print_state)
12204 (print_graph): Likewise.
12205 * src/conflicts.h: Adjust.
12206
1b177bd7
AD
122072001-12-27 Akim Demaille <akim@epita.fr>
12208
12209 * src/bison.hairy: Formatting/comment changes.
12210 ANSIfy.
12211 Remove `register' indications.
12212 Add plenty of `static'.
12213
7742ddeb
AD
122142001-12-27 Akim Demaille <akim@epita.fr>
12215
12216 * src/output.c (prepare): Drop the muscle `ntbase' which
12217 duplicates ntokens.
12218 * src/bison.simple: Formatting/comment changes.
12219 Use YYNTOKENS only, which is documented, but not YYNTBASE, which
12220 is an undocumented synonym.
12221
1fa14068
AD
122222001-12-22 Akim Demaille <akim@epita.fr>
12223
12224 * src/output.c (output_table_data): Change the prototype to use
12225 `int' for array ranges: some invocations do pass an int, not a
12226 short.
12227 Reported by Wayne Green.
12228
b9752825
AD
122292001-12-22 Akim Demaille <akim@epita.fr>
12230
12231 Some actions of web2c.y are improperly triggered.
12232 Reported by Mike Castle.
12233
12234 * src/lalr.c (traverse): s/F (i)[k] = F (j)[k]/F (j)[k] = F (i)[k]/.
12235 * tests/regression.at (Web2c): Rename as...
12236 (Web2c Report): this.
12237 (Web2c Actions): New.
12238
776209d6
AD
122392001-12-22 Akim Demaille <akim@epita.fr>
12240
12241 Reductions in web2c.y are improperly reported.
12242 Reported by Mike Castle.
12243
12244 * src/conflicts.c (print_reductions): Fix.
12245 * tests/regression.at (Web2c): New.
12246
275fc3ad
AD
122472001-12-18 Akim Demaille <akim@epita.fr>
12248
12249 Some host fail on `assert (!"foo")', which expands to
12250 ((!"foo") ? (void)0 : __assert("!"foo."", __FILE__, __LINE__))
12251 Reported by Nelson Beebee.
12252
12253 * src/output.c, src/vcg.c: Replace `assert (!"it succeeded")' with
12254 `#define it_succeeded 0' and `assert (it_succeeded)'.
12255
897668ee
MA
122562001-12-17 Marc Autret <autret_m@epita.fr>
12257
12258 * src/bison.simple: Don't hard code the skeleton line and filename.
12259 * src/output.c (output_parser): Rename 'line' as 'output_line'.
12260 New line counter 'skeleton_line' (skeleton-line muscle).
12261
ab3399e0
PE
122622001-12-17 Paul Eggert <eggert@twinsun.com>
12263
12264 * NEWS, doc/bison.texinfo, doc/bison.1, doc/bison.rnh: Document that
12265 YYDEBUG must be defined to a nonzero value.
12266
12267 * src/bison.simple (yytname): Do not assume that the user defines
12268 YYDEBUG to a properly parenthesized expression.
12269
3877f72b
AD
122702001-12-17 Akim Demaille <akim@epita.fr>
12271
12272 * src/state.h (state_t): Rename lookaheads as lookaheadsp.
12273 nlookaheads is a new member.
12274 Adjust all users.
12275 * src/lalr.h (nlookaheads): Remove this orphan declaration.
12276 * src/lalr.c (initialize_lookaheads): Set nlookaheads for each
12277 state.
776209d6 12278
331dbc1b
AD
122792001-12-17 Akim Demaille <akim@epita.fr>
12280
12281 * src/files.h, src/files.c (open_files, close_files): Remove.
12282 * src/main.c (main): Don't open/close files, nor invoke lex_free,
12283 let...
12284 * src/reader.c (reader): Do it.
776209d6 12285
be750e4c
AD
122862001-12-17 Akim Demaille <akim@epita.fr>
12287
12288 * src/conflicts.c (print_reductions): Formatting changes.
776209d6 12289
709ae8c6
AD
122902001-12-17 Akim Demaille <akim@epita.fr>
12291
12292 * src/conflicts.c (flush_shift): Also adjust lookaheadset.
12293 (flush_reduce): New.
12294 (resolve_sr_conflict): Adjust.
776209d6 12295
f87685c3
AD
122962001-12-17 Akim Demaille <akim@epita.fr>
12297
12298 * src/output.c (output_obstack): Be static and rename as...
12299 (format_obstack): this, to avoid any confusion with files.c's
12300 output_obstack.
12301 * src/reader.h (muscle_obstack): Move to...
12302 * src/output.h: here, since it's defined in output.c.
12303
837491d8
AD
123042001-12-17 Akim Demaille <akim@epita.fr>
12305
12306 * src/output.c (action_row, save_column, default_goto)
12307 (sort_actions, matching_state, pack_vector): Better variable
12308 locality.
12309
796d61fb
AD
123102001-12-17 Akim Demaille <akim@epita.fr>
12311
12312 * src/output.c: Various formatting changes.
776209d6 12313
64d15509
AD
123142001-12-17 Akim Demaille <akim@epita.fr>
12315
12316 * src/files.c (output_files): Free the output_obstack.
12317 * src/main.c (main): Call print and print_graph conditionally.
12318 * src/print.c (print): Work unconditionally.
12319 * src/print_graph.c (print_graph): Work unconditionally.
12320 * src/conflicts.c (log_resolution): Output only if verbose_flag.
12321
fbc8ecb7
MA
123222001-12-16 Marc Autret <autret_m@epita.fr>
12323
12324 * src/output.c (actions_output): Fix. When we use %no-lines,
12325 there is one less line per action.
12326
f0440388
MA
123272001-12-16 Marc Autret <autret_m@epita.fr>
12328
12329 * src/bison.simple: Remove a useless #line directive.
12330 s/#line %%line %%skeleton/#line %%line "%%parser-file-name"/'.
12331 * src/output.c (get_lines_number): New.
776209d6 12332 (output_parser): Adjust, now takes care about the lines of a
f0440388
MA
12333 output muscles.
12334 Fix line numbering.
12335 (actions_output): Computes the number of lines taken by actions.
12336 (output_master_parser): Insert new skeleton which is the name of
12337 the output parser file name.
12338
a79986b8
MA
123392001-12-15 Marc Autret <autret_m@epita.fr>
12340
12341 * src/bison.simple [YYERROR_VERBOSE]: Restore backward compatibility.
12342
4ec8e00f
MA
123432001-12-15 Marc Autret <autret_m@epita.fr>
12344
12345 * src/output.c (output_gram): Keep track of the hairy one.
12346
1a4648ff
AD
123472001-12-15 Akim Demaille <akim@epita.fr>
12348
12349 Make `make distcheck' work.
12350
12351 * lib/Makefile.am (INCLUDES): Add top_srcdir/intl, since hash uses
12352 system.h which uses libgettext.h.
12353
9c2c67e6
AD
123542001-12-15 Akim Demaille <akim@epita.fr>
12355
12356 * src/nullable.c (set_nullable): Useless rules must be skipped,
12357 otherwise, since we range over their symbols, we might look at a
12358 nonterminal which no longer ``exists'', i.e., it is not counted in
12359 `nvars', hence we overflow our arrays.
12360
93ede233
AD
123612001-12-15 Akim Demaille <akim@epita.fr>
12362
12363 The header can also be produced directly, without any obstack!
12364 Yahoo!
12365
12366 * src/files.c, src/files.h (defines_obstack): Remove.
12367 (compute_header_macro): Global.
12368 (defines_obstack_save): Remove.
12369 * src/reader.c (parse_union_decl): No longer output to
12370 defines_obstack: its content can be found in the `stype' muscle
12371 anyway.
12372 (output_token_translations): Merge into...
12373 (symbols_output): this.
12374 Rename as...
12375 (symbols_save): this.
12376 (reader): Adjust.
12377 * src/output.c (header_output): New.
12378 (output): Call it.
12379
2666f928
AD
123802001-12-15 Akim Demaille <akim@epita.fr>
12381
12382 * src/reader.c (parse_union_decl): Instead of handling two obstack
12383 simultaneously, use one to define the `stype' muscle, and use the
12384 value of the latter to fill defines_obstack.
12385 (copy_comment): Remove.
12386 (copy_comment2): Work for a single obstack.
12387 Rename as...
12388 (copy_comment): this.
12389
428046f8
AD
123902001-12-15 Akim Demaille <akim@epita.fr>
12391
12392 * src/lex.c, src/lex.h (xgetc): No longer static.
12393 * src/reader.c (parse_union_decl): Revamp.
12394
ea52d706
AD
123952001-12-15 Akim Demaille <akim@epita.fr>
12396
12397 Still making progress in separating Bison into (i) input, (ii)
12398 process, (iii) output: now we can directly output the parser file
12399 without using table_obstack at all.
12400
12401 * src/files.c, src/files.h (table_obstack): Bye bye.
12402 (parser_file_name): New.
12403 * src/files.c (compute_output_file_names): Compute it.
12404 * src/output.c (actions_output, output_parser)
12405 (output_master_parser): To a file instead of an obstack.
12406
3f96f4dc
AD
124072001-12-15 Akim Demaille <akim@epita.fr>
12408
12409 Attach actions to rules, instead of pre-outputting them to
12410 actions_obstack.
12411
12412 * src/gram.h (rule_t): action and action_line are new members.
12413 * src/reader.c (symbol_list): Likewise.
12414 (copy_action): Save the actions within the rule.
12415 (packgram): Save them in rule_table.
12416 * src/output.c (actions_output): New.
12417 (output_parser): Use it on `%%actions'.
12418 (output_rule_data): Don't free rule_table.
12419 (output): Do it.
12420 (prepare): Don't save the `action' muscle.
12421 * src/bison.simple: s/%%action/%%actions/.
12422
51576fb3
AD
124232001-12-15 Akim Demaille <akim@epita.fr>
12424
12425 * src/reader.c (copy_action): When --yacc, don't append a `;'
12426 to the user action: let it fail if lacking.
dee049eb 12427 Suggested by Arnold Robbins and Tom Tromey.
51576fb3 12428
2648a72d
AD
124292001-12-14 Akim Demaille <akim@epita.fr>
12430
12431 * src/lex.c (literalchar): Simply return the char you decoded, non
12432 longer mess around with obstacks and int pointers.
12433 Adjust all callers.
12434
92790e5b
AD
124352001-12-14 Akim Demaille <akim@epita.fr>
12436
12437 * src/lex.c (literalchar): Don't escape the special characters,
12438 just decode them, and keep them as char (before, eol was output as
12439 the 2 char string `\n' etc.).
12440 * src/output.c (output_rule_data): Use quotearg to output the
12441 token strings.
12442
927c1557
PE
124432001-12-13 Paul Eggert <eggert@twinsun.com>
12444
12445 * src/bison.simple (YYSIZE_T, YYSTACK_ALLOC, YYSTACK_FREE):
12446 Do not infringe on the global user namespace when using C++.
12447 (YYFPRINTF, YYSTDERR): New macros, needed for the above.
12448 All uses of `fprintf' and `stderr' changed.
12449
12450 * doc/bison.texinfo: Document YYFPRINTF, YYSTDERR.
12451
ed8e1f68
AD
124522001-12-13 Akim Demaille <akim@epita.fr>
12453
12454 The computation of nullable is broken: it doesn't handle empty
12455 RHS's properly.
12456
12457 * tests/torture.at (GNU AWK Grammar): New.
12458 * tests/sets.at (Nullable): New.
12459 * src/nullable.c (set_nullable): Instead of blindly looping over
12460 `ritems', loop over the rules, and then over their rhs's.
12461
12462 Work around Autotest bugs.
12463
12464 * src/warshall.c (bitmatrix_print): Don't use `+--+' as table
12465 frame, because Autotest understand lines starting with a `+' as
12466 traces from the shell. Then, they are not processed properly.
12467 Admittedly an Autotest bug, but we don't have time to wait for
12468 Autotest to catch up.
12469 * tests/regression.at (Broken Closure): Adjust to the new table
12470 frames.
12471 Move to...
12472 * tests/sets.at: here.
12473
cb581495
AD
124742001-12-13 Akim Demaille <akim@epita.fr>
12475
12476 * src/closure.c (closure): Use nrules instead of playing tricks
12477 with BITS_PER_WORD.
12478
2e729273
AD
124792001-12-13 Akim Demaille <akim@epita.fr>
12480
12481 * src/print.c (print_actions): Output the handling of `$' as the
12482 traces do: shifting the token EOF. Before EOF was treated as a
12483 nonterminal.
12484 * tests/regression.at: Adjust some tests.
12485 * src/print_graph.c (print_core): Complete the set of items via
12486 closure. The next-to-final and final states are still unsatisfying,
12487 but that's to be addressed elsewhere.
12488 No longer output the rule numbers, but do output the state number.
12489 A single loop for the shifts + gotos is enough, but picked a
12490 distinct color for each.
12491 (print_graph): Initialize and finalize closure.
12492
107f7dfb
AD
124932001-12-13 Akim Demaille <akim@epita.fr>
12494
12495 * src/reader.c (readgram): Remove dead code, an strip useless
12496 braces.
12497 (get_type): Remove, unused.
12498
9b53a24f
AD
124992001-12-12 Akim Demaille <akim@epita.fr>
12500
12501 * src/complain.h, src/complain.c: Remove error_one_per_line, rely
12502 on that of lib/error.c.
12503
dbfb6dcd
AD
125042001-12-12 Akim Demaille <akim@epita.fr>
12505
12506 Some hosts don't like `/' in includes.
12507
12508 * src/system.h: Include libgettext.h without qualifying the path.
12509 * src/Makefile.am (INCLUDES): Add $(top_srcdir)/intl, remove
12510 $(top_srcdir).
12511
c25fb648
MA
125122001-12-11 Marc Autret <autret_m@epita.fr>
12513
12514 * src/output.c (output_parser): Remove useless muscle.
12515
710ddc4f
MA
125162001-12-11 Marc Autret <autret_m@epita.fr>
12517
12518 * src/bison.simple: Remove #line just before %%epilogue. It
12519 is now handled in ...
12520 * src/reader.c (read_additionnal_code): Add the output of a
12521 #line for the epilogue.
12522
e83d80b8
MA
125232001-12-10 Marc Autret <autret_m@epita.fr>
12524
927c1557 12525 * src/reader.c (copy_definition): Re-use CPP-outed code which
e83d80b8
MA
12526 replace precedent remove.
12527 * src/bison.simple: Remove #line before %%prologue because
12528 %%input-line is wrong at this time.
12529
971d5158
MA
125302001-12-10 Marc Autret <autret_m@epita.fr>
12531
12532 * src/reader.c (symbols_output): Clean up.
927c1557 12533 * src/output.c (output_gram, output): Clean up.
971d5158 12534
5edafffd
AD
125352001-12-10 Akim Demaille <akim@epita.fr>
12536
12537 * src/lalr.c (initialize_lookaheads): New. Extracted from...
12538 * src/LR0.c (set_state_table): here.
12539 * src/lalr.c (lalr): Call it.
12540
0279f8e9
AD
125412001-12-10 Akim Demaille <akim@epita.fr>
12542
12543 * src/state.h (shifts): Remove the `number' member: shifts are
12544 attached to state, hence no longer need to be labelled with a
12545 state number.
12546
190c4f5f
AD
125472001-12-10 Akim Demaille <akim@epita.fr>
12548
12549 Now that states have a complete set of members, the linked list of
12550 shifts is useless: just fill directly the state's shifts member.
12551
12552 * src/state.h (shifts): Remove the `next' member.
12553 * src/LR0.c (first_state, last_state): Remove.
12554 Adjust the callers.
12555 (augment_automaton): Don't look for the shifts that must be added
12556 a shift on EOF: it is those of the state we looked for! But now,
12557 since shifts are attached, it is no longer needed to looking
12558 merely by its id: its number.
12559
2a73b93d
AD
125602001-12-10 Akim Demaille <akim@epita.fr>
12561
12562 * src/LR0.c (augment_automaton): Better variable locality.
12563 Remove an impossible branch: if there is a state corresponding to
12564 the start symbol being shifted, then there is shift for the start
12565 symbol from the initial state.
12566
74392f6a
AD
125672001-12-10 Akim Demaille <akim@epita.fr>
12568
12569 * src/LR0.c (augment_automaton): Call `insert_eof_shifting_state'
12570 only when appropriate: when insert_start_shifting_state' is not
12571 invoked.
12572 * tests/regression.at (Rule Line Numbers): Adjust.
12573
37c82725
AD
125742001-12-10 Akim Demaille <akim@epita.fr>
12575
12576 * src/LR0.c (augment_automaton): Now that all states have shifts,
12577 merge the two cases addition shifts to the initial state.
12578
6a164e0c
AD
125792001-12-10 Akim Demaille <akim@epita.fr>
12580
12581 * src/lalr.c (set_state_table): Move to...
12582 * src/LR0.c: here.
12583 * src/lalr.c (lalr): Don't call it...
12584 * src/LR0.c (generate_states): do it.
12585 * src/LR0.h (first_state): Remove, only the table is used.
12586
7215de24
AD
125872001-12-10 Akim Demaille <akim@epita.fr>
12588
12589 * src/LR0.h (first_shift, first_reduction): Remove.
12590 * src/lalr.c: Don't use first_shift: find shifts through the
12591 states.
12592
80e25d4d
AD
125932001-12-10 Akim Demaille <akim@epita.fr>
12594
12595 * src/LR0.c: Attach shifts to states as soon as they are
12596 computed.
12597 * src/lalr.c (set_state_table): Instead of assigning shifts to
12598 state, just assert that the mapping was properly done.
12599
0ab3728b
AD
126002001-12-10 Akim Demaille <akim@epita.fr>
12601
12602 * src/LR0.c (insert_start_shift): Rename as...
12603 (insert_start_shifting_state): this.
12604 (insert_eof_shifting_state, insert_accepting_state): New.
12605 (augment_automaton): Adjust.
12606 Better locality of the variables.
12607 When looking if the start_symbol is shifted from the initial
12608 state, using `while (... symbol != start_symbol ...)' sounds
12609 better than `while (... symbol < start_symbol ...)': If fail
12610 to see how the order between symbols could be relevant!
12611
78af9bbc
AD
126122001-12-10 Akim Demaille <akim@epita.fr>
12613
12614 * src/getargs.h: Don't declare `spec_name_prefix' and
12615 `spec_file_prefix', declared by src/files.h.
12616 * src/files.c, src/files.h: Default for spec_name_prefix is "yy".
12617 * src/muscle_tab.c (muscle_init): Default prefix to NULL.
12618 * src/output.c (prepare): Adjust.
12619 * src/reader.c (symbols_output): Likewise.
12620 * src/vmsgetargs.c: Vaguely adjust, but who cares?
12621
bdef2a41
AD
126222001-12-10 Akim Demaille <akim@epita.fr>
12623
12624 * src/muscle_tab.c (muscle_init): NULL is a better default than
12625 `"0"'.
12626
3735969c
AD
126272001-12-10 Akim Demaille <akim@epita.fr>
12628
12629 * src/reader.c (reader): Calling symbols_output once is enough.
12630
49701457
AD
126312001-12-10 Akim Demaille <akim@epita.fr>
12632
12633 Now that states have a complete set of members, the linked list of
12634 reductions is useless: just fill directly the state's reductions
12635 member.
12636
12637 * src/state.h (struct reductions): Remove member `number' and
12638 `next'.
12639 * src/LR0.c (first_reduction, last_reduction): Remove.
12640 (save_reductions): Don't link the new reductions, store them in
12641 this_state.
12642 * src/lalr.c (set_state_table): No need to attach reductions to
12643 states, it's already done.
12644 * src/output.c (output_actions): No longer free the shifts, then
12645 the reductions, then the states: free all the states and their
12646 members.
12647
0edad749
AD
126482001-12-10 Akim Demaille <akim@epita.fr>
12649
12650 * src/options.c (OPTN, DRTV, BOTH): New.
12651 (option_table): Use them.
12652
0edad749
AD
12653 * src/muscle_tab.c: Don't include xalloc.h and string.h: that's
12654 the job of system.h.
12655 * src/options.c: Don't include stdio.h and xalloc.h for the same
12656 reasons.
12657
5449dd0f
AD
126582001-12-10 Akim Demaille <akim@epita.fr>
12659
12660 * src/output.c (output, prepare): Make sure the values of the
12661 muscles `action' and `prologue' are 0-terminated.
12662
a870c567
AD
126632001-12-10 Akim Demaille <akim@epita.fr>
12664
12665 Clean up GCC warnings.
12666
12667 * src/reader.c (copy_action): `buf' is not used.
12668 (parse_skel_decl): Be static.
12669 * src/muscle_tab.c (mhash1, mhash2, muscle_insert): Preserve `const'.
12670 * src/options.h (create_long_option_table): Have a real prototype.
12671 * lib/hash.c, lib/hash.h (hash_insert, hash_insert_at, hash_delete)
12672 (hash_delete_at): Return const void *.
12673 Adjust casts to preserve the const.
12674
80df8768
AD
126752001-12-10 Akim Demaille <akim@epita.fr>
12676
12677 * configure.in: Require 2.52g.
12678 M4 is not needed, but AUTOM4TE is.
12679 * m4/m4.m4: Remove.
12680 * tests/Makefile.am: Adjust.
12681
f693ad14
AD
126822001-12-10 Akim Demaille <akim@epita.fr>
12683
12684 One structure for states is enough, even though theoretically
12685 there are LR(0) states and LALR(1) states.
12686
12687 * src/lalr.h (state_t): Remove.
12688 (state_table): Be state_t **, not state_t *.
12689 * src/state.h (core, CORE_ALLOC): Rename as...
12690 (state_t, STATE_ALLOC): this.
12691 Add the LALR(1) members: shifts, reductions, errs.
12692 * src/LR0.c (state_table): Rename as...
12693 (state_hash): this, to avoid name clashes with the global
12694 `state_table'.
12695 * src/print_graph.c, src/LR0.c, src/LR0.h, src/conflicts.c
12696 * src/lalr.c, src/lalr.h, src/output.c, src/print.c: Adjust.
12697
74ffbcb6
AD
126982001-12-10 Akim Demaille <akim@epita.fr>
12699
12700 Bison dumps core on bash.y.
12701 Reported by Pascal Bart.
12702
12703 * src/warshall.c (bitmatrix_print): New.
12704 (TC): Use it.
ba0fe3c7 12705 When performing a transitive closure R(i, j) && R(j, k) => R(i, k),
74ffbcb6
AD
12706 j must be the outer loop.
12707 * tests/regression.at (Broken Closure): New.
12708
07708e19
AD
127092001-12-05 Akim Demaille <akim@epita.fr>
12710
12711 * tests/atlocal.in (CPPFLAGS): Do not leave a space between -I and
12712 its argument.
ba1ecc07 12713 Reported by Peter Hamorsky.
07708e19 12714
92b16366
AD
127152001-12-05 Akim Demaille <akim@epita.fr>
12716
12717 * src/conflicts.c (err_table): Remove.
12718 (resolve_sr_conflict): Adjust.
12719 * src/lalr.h (state_t.reduction_table, state_t.shift_table):
12720 Rename as...
12721 (state_t.reductions, state_t.shifts): this.
12722
076ab033
AD
127232001-12-05 Akim Demaille <akim@epita.fr>
12724
12725 * src/reduce.c (reduce_grammar_tables): No longer disable the
12726 removal of useless rules via CPP but via `if (0)', so that the
12727 compiler still check the code is valid.
12728 For instance, it should have noticed `rline' no longer exists: use
12729 the `line' member of rule_t.
12730 * src/gram.c (dummy, rline): Remove, unused.
12731
3843c413
AD
127322001-12-05 Akim Demaille <akim@epita.fr>
12733
12734 * src/output.c (pack_vector): Use assert, not berror.
12735 * src/main.c (berror): Remove, unused.
12736
43168960
AD
127372001-12-05 Akim Demaille <akim@epita.fr>
12738
12739 New experimental feature: if --verbose --trace output all the
12740 items of a state, not only its kernel.
12741
12742 * src/print.c (print_core): If `trace_flag', then invoke closure
12743 before outputting the items of the state (print_core is no longer
12744 a correct name them).
12745 (print_results): Invoke new_closure/free_closure if needed.
12746
b2872512
AD
127472001-12-05 Akim Demaille <akim@epita.fr>
12748
12749 * src/LR0.c (new_itemsets): Use nshifts only, not shiftcount.
12750 * src/closure.c, src/closure.h (itemsetsize): Rename as...
12751 (nitemset): for consistency with the rest of the project.
12752
23cbcc6c
AD
127532001-12-05 Akim Demaille <akim@epita.fr>
12754
12755 * src/closure.c (print_closure): Improve.
12756 (closure): Use it for printing input and output.
12757
03ec521c
AD
127582001-12-05 Akim Demaille <akim@epita.fr>
12759
12760 * src/closure.c (FIRSTS, FDERIVES): Adjust to reality: they are
12761 indexed by nonterminals.
12762
3a7456dd
AD
127632001-12-05 Akim Demaille <akim@epita.fr>
12764
12765 * src/warshall.c (TC, RTC): De-obsfucate (source reduced to 22% of
12766 what it was!).
12767 * src/warshall.h: Remove accidental duplication of the content.
12768
1cbcf2e7
AD
127692001-12-05 Akim Demaille <akim@epita.fr>
12770
12771 * src/closure.c (set_fderives): De-obfuscate.
12772
84182270
AD
127732001-12-05 Akim Demaille <akim@epita.fr>
12774
12775 * src/closure.c (print_firsts, print_fderives): De-obfuscate.
12776
3f6f053c
AD
127772001-12-05 Akim Demaille <akim@epita.fr>
12778
12779 * src/closure.c (set_firsts): De-obfuscate.
12780
7a5350ba
AD
127812001-12-05 Akim Demaille <akim@epita.fr>
12782
12783 * src/output.c (action_row): De-obfuscate
12784 using the good o' techniques: arrays not pointers, variable
12785 locality, BITISSET, RESETBIT etc.
12786
d954473d
AD
127872001-12-05 Akim Demaille <akim@epita.fr>
12788
12789 Pessimize the code to simplify it: from now on, all the states
12790 have a valid SHIFTS, which NSHIFTS is possibly 0.
12791
12792 * src/LR0.c (shifts_new): Be global and move to..
12793 * src/state.c, src/state.h: here.
12794 * src/conflicts, src/lalr.c, src/output.c, src/print.c,
12795 * src/print_graph: Adjust.
12796
9839bbe5
AD
127972001-12-05 Akim Demaille <akim@epita.fr>
12798
12799 * src/state.h (SHIFT_DISABLE, SHIFT_IS_DISABLED): New.
12800 * src/conflicts.c: Use it.
12801 Restore a few missing `if (!SHIFT_IS_DISABLED)' which were
12802 incorrectly ``simplified''.
12803
9f136c07
AD
128042001-12-05 Akim Demaille <akim@epita.fr>
12805
12806 * src/conflicts.c (flush_shift, resolve_sr_conflict): De-obfuscate
12807 using the good o' techniques: arrays not pointers, variable
12808 locality, BITISSET, RESETBIT etc.
12809
b608206e
AD
128102001-12-05 Akim Demaille <akim@epita.fr>
12811
12812 * src/state.h (SHIFT_SYMBOL): New.
12813 * src/conflicts.c: Use it to deobfuscate.
12814
52afa962
AD
128152001-12-05 Akim Demaille <akim@epita.fr>
12816
12817 * src/conflicts.c (count_sr_conflicts, count_rr_conflicts)
12818 (print_reductions): De-obfuscate using the good o' techniques:
12819 arrays not pointers, variable locality, BITISSET.
12820
e74dc321
AD
128212001-12-05 Akim Demaille <akim@epita.fr>
12822
12823 * src/conflicts.c (print_reductions): Arrays, not pointers.
12824 Use BITISSET.
12825
768fca83
AD
128262001-12-05 Akim Demaille <akim@epita.fr>
12827
12828 * src/conflicts.c (print_reductions): Pessimize, but clarify.
12829
a17e599f
AD
128302001-12-05 Akim Demaille <akim@epita.fr>
12831
12832 * src/conflicts.c (print_reductions): Improve variable locality.
12833
a04bc341
AD
128342001-12-05 Akim Demaille <akim@epita.fr>
12835
12836 * src/conflicts.c (print_reductions): Pessimize, but clarify.
12837
c8ea038e
AD
128382001-12-05 Akim Demaille <akim@epita.fr>
12839
12840 * src/conflicts.c (print_reductions): Improve variable locality.
12841
aa2aab3c
AD
128422001-12-05 Akim Demaille <akim@epita.fr>
12843
12844 * src/state.h (SHIFT_IS_ERROR, SHIFT_IS_GOTO, SHIFT_IS_SHIFT): New.
12845 * src/lalr.c: Use them.
12846
b178c8cc
AD
128472001-12-05 Akim Demaille <akim@epita.fr>
12848
12849 * src/LR0.c (augment_automaton): Formatting changes.
12850 Better variable locality.
12851
f67d13aa
AD
128522001-12-05 Akim Demaille <akim@epita.fr>
12853
12854 * src/lalr.c (matrix_print): New.
12855 (transpose): Use it.
12856 Use arrays instead of pointers.
12857
c2713865
AD
128582001-12-05 Akim Demaille <akim@epita.fr>
12859
12860 * src/lalr.c (maxrhs): Move to...
12861 * src/gram.c, src/gram.h (ritem_longest_rhs): here.
12862 * src/lalr.c (build_relations): Adjust.
12863
9887c18a
AD
128642001-12-05 Akim Demaille <akim@epita.fr>
12865
12866 * src/lalr.c (transpose): Free the memory allocated to the
12867 argument, as it is replaced by the results by the unique caller.
12868 (build_relations): Merely invoke transpose: it handles the memory
12869 deallocation.
12870 Improve variable locality.
12871 Avoid variables used as mere abbreviations.
12872 (compute_lookaheads): Use arrays instead of pointers.
12873
4d4f699c
AD
128742001-12-05 Akim Demaille <akim@epita.fr>
12875
12876 * src/lalr.c (initialize_F): Improve variable locality.
12877 Avoid variables used as mere abbreviations.
12878
80a69750
AD
128792001-12-05 Akim Demaille <akim@epita.fr>
12880
12881 * src/derives.c (print_derives): Display the ruleno.
12882 * src/lalr.c (initialize_F, transpose): Better variable locality
12883 to improve readability.
12884 Avoid variables used as mere abbreviations.
12885
fe961097
AD
128862001-12-05 Akim Demaille <akim@epita.fr>
12887
12888 * src/lalr.c (traverse): Use arrays instead of pointers.
12889
e3e4e814
AD
128902001-12-05 Akim Demaille <akim@epita.fr>
12891
12892 * src/nullable.c (set_nullable): Use a for loop to de-obfuscate
12893 the handling of squeue.
12894 `symbol >= 0' is wrong now, use `rule_table[ruleno].useful'.
12895
630e182b
AD
128962001-12-05 Akim Demaille <akim@epita.fr>
12897
12898 Because useless nonterminals are now kept alive (instead of being
12899 `destroyed'), we now sometimes examine them, and store information
12900 related to them. Hence we need to know their number, and adjust
12901 memory allocations.
12902
12903 * src/reduce.c, src/reduce.h (nuseless_nonterminals): No longer
12904 static.
12905 * src/LR0.c (allocate_itemsets): The memory allocated to
12906 `symbol_count' was used for two different purpose: once to count
12907 the number of occurrences of each symbol, and later reassigned to
12908 `shift_symbol', containing the symbol that can be shifted from a
12909 given state.
12910 Deobfuscate, i.e., allocate, use and free `symbol_count' here
12911 only, and...
12912 (new_itemsets): Allocate `shift_symbol' here.
12913 (allocate_itemsets): symbol_count includes useless nonterminals.
12914 Make room for them.
12915 (free_storage): Use `free', not `XFREE', for pointers that cannot
12916 be null.
12917
81b51460
AD
129182001-12-05 Akim Demaille <akim@epita.fr>
12919
12920 * src/nullable.c (set_nullable): Deobfuscate the handling of
12921 ritem.
12922 `symbol >= 0' is wrong now, use `rule_table[ruleno].useful'.
12923
3067fbef
AD
129242001-12-05 Akim Demaille <akim@epita.fr>
12925
12926 * src/gram.c, src/gram.h (ritem_print): New.
12927 * src/gram.c (dummy): Remove, now there is actual code in gram.c.
12928 (This useless function was defined only to work around VMS linkers
12929 that can't handle compilation units with variables only).
12930 * src/reduce.c (dump_grammar): Use it to trace the construction of
12931 ritem.
12932
c2bea5f9
PE
129332001-12-04 Paul Eggert <eggert@twinsun.com>
12934
7d27c823
PE
12935 * src/bison.simple (union yyalloc): Change member names
12936 to be the same as the stack names.
12937 (yyparse): yyptr is now union yyalloc *, not char *.
12938 (YYSTACK_RELOCATE): Likewise. This avoids a GCC warning,
12939 and may generate better code on some machines.
c2bea5f9
PE
12940 (yystpcpy): Use prototype if __STDC__ is defined, not just
12941 if __cplusplus is defined.
35687a9d 12942
2c8a9dfa
AD
129432001-11-30 Akim Demaille <akim@epita.fr>
12944
12945 * configure.in (WARNING_CFLAGS): Add -Werror when possible.
12946 (CFLAGS): Do not include the WARNING_CFLAGS here, since GNU
12947 Gettext doesn't compile cleanly, and dies with -Werror.
12948 * src/Makefile.am, lib/Makefile.am, tests/atlocal.in (CFLAGS):
12949 Include WARNING_CFLAGS here.
12950 * lib/xstrdup.c: Include xalloc.h, so that xstrdup be declared
12951 before being defined.
12952
f4e421e6
AD
129532001-11-27 Paul Eggert <eggert@twinsun.com>
12954
12955 * lib/quotearg.h (quotearg_n, quotearg_n_style):
12956 First arg is int, not unsigned.
12957 * lib/quotearg.c (quotearg_n, quotearg_n_style): Likewise.
12958 (SIZE_MAX, UINT_MAX): New macros.
12959 (quotearg_n_options): Abort if N is negative.
12960 Avoid overflow check on hosts where size_t is 64 bits and int
12961 is 32 bits, as overflow is impossible there.
12962 Fix off-by-one typo that caused unnecessary reallocation.
12963
7093d0f5
AD
129642001-11-29 Paul Eggert <eggert@twinsun.com>
12965
12966 Name space cleanup in generated parser.
12967
12968 * doc/bison.texinfo (Bison Parser): Discuss system headers
12969 and their effect on the user name space.
12970
12971 * src/bison.simple:
12972 (YYSTACK_ALLOC, YYSTACK_FREE, union yyalloc, YYSTACK_GAP_MAX,
12973 YYSTACK_BYTES, YYSTACK_RELOCATE): Do not define unless necessary,
12974 i.e. unless ! defined (yyoverflow) || defined (YYERROR_VERBOSE).
12975
12976 (YYSIZE_T): New macro. Use it instead of size_t, to avoid infringing
12977 on user names when possible.
12978
12979 (YYSTACK_USE_ALLOCA): Do not define; just use any existing defn.
12980 Simplify test for whather <alloca.h> exists.
12981
12982 (<stdlib.h>): Include if we will use malloc, and if standard C or C++.
12983
12984 (<stdio.h>): Include if YYDEBUG.
12985
12986 (yymemcpy): Renamed from __yy_memcpy. Do not define unless
12987 ! defined (yyoverflow) && ! defined (yymemcpy).
12988
12989 (yymemcpy, yyparse): Rename local variables as needed so that
12990 they all begin with 'yy'.
12991
12992 (yystrlen, yystpcpy): New functions.
12993
12994 (YY_DECL_NON_LSP_VARIABLES): Renamed from _YY_DECL_VARIABLES.
12995 All uses changed.
12996
12997 (yyparse): size_t -> YYSIZE_T. Use yystrlen and yystpcpy
12998 instead of relying on string.h functions. Use YYSTACK_ALLOC
12999 and YYSTACK_FREE instead of malloc and free.
13000
fd51e5ff
AD
130012001-11-30 Akim Demaille <akim@epita.fr>
13002
13003 * src/bison.simple (YYSTYPE, YYLTYPE): Move their definitions
13004 before their first uses.
13005 (YYBISON, YYPURE): Move to the top of the output.
13006
7d13ff5f
AD
130072001-11-30 Akim Demaille <akim@epita.fr>
13008
13009 * tests/reduce.at (Useless Nonterminals): Fix.
13010
892a3995
AD
130112001-11-30 Akim Demaille <akim@epita.fr>
13012
13013 * src/bison.simple (YYSTACK_FREE): Use `do {;} while (0)' as empty
13014 if body instead of `;' to pacify GCC's warnings.
13015
68f1e3ed
AD
130162001-11-30 Akim Demaille <akim@epita.fr>
13017
13018 Instead of mapping the LHS of unused rules to -1, keep the LHS
13019 valid, but flag the rules as invalid.
13020
13021 * src/gram.h (rule_t): `useful' is a new member.
13022 * src/print.c (print_grammar): Adjust.
13023 * src/derives.c (set_derives): Likewise.
13024 * src/reader.c (packgram, reduce_output): Likewise.
13025 * src/reduce.c (reduce_grammar_tables): Likewise.
13026 * tests/reduce.at (Underivable Rules, Useless Rules): New.
13027
d2d1b42b
AD
130282001-11-30 Akim Demaille <akim@epita.fr>
13029
13030 * src/reduce.c (reduce_output): Formatting changes.
13031 * src/print.c (print_results, print_grammar): Likewise.
13032 * tests/regression.at (Rule Line Numbers)
13033 (Solved SR Conflicts, Unresolved SR Conflicts): Adjust.
13034
760b53a8
AD
130352001-11-30 Akim Demaille <akim@epita.fr>
13036
13037 * src/reduce.c (nonterminals_reduce): Instead of throwing away
13038 useless nonterminals, move them at the end of the symbol arrays.
13039 (reduce_output): Adjust.
13040 * tests/reduce.at (Useless Nonterminals): Adjust.
13041
00238958
AD
130422001-11-30 Akim Demaille <akim@epita.fr>
13043
13044 * src/reduce.c: Various comment/formatting changes.
13045 (nonterminals_reduce): New, extracted from...
13046 (reduce_grammar_tables): here.
13047 (reduce_grammar): Call nonterminals_reduce.
13048
396452de
PE
130492001-11-29 Paul Eggert <eggert@twinsun.com>
13050
13051 * src/bison.simple (YYSTACK_REALLOC): Remove.
13052 (YYSTACK_ALLOC): Resurrect this macro, with its old meaning.
13053 (YYSTACK_FREE, YYSTACK_GAP_MAX, YYSTACK_BYTES, YYSTACK_RELOCATE):
13054 New macros.
13055 (union yyalloc): New type.
13056 (__yy_memcpy): Last arg is size_t, not unsigned int, to remove
13057 an arbitrary restriction on hosts where size_t is wider than int.
13058
13059 (yyparse): Don't dump core if alloca or malloc fails; instead, report
13060 a parser stack overflow. Allocate just one block of memory for all
13061 three stacks, instead of allocating three blocks; this typically is
13062 faster and reduces fragmentation.
13063
13064 Do not limit the number of items in the stack to a value that fits
13065 in 'int', as this is an arbitrary limit on hosts with 64-bit
13066 size_t and 32-bit int.
13067
147e184c
MA
130682001-11-29 Marc Autret <autret_m@epita.fr>
13069
13070 * tests/calc.at [AT_DATA_CALC_Y]: Use %error-verbose instead
13071 of defining YYERROR_VERBOSE.
13072 [AT_DATA]: $4 is now out of C declarations in the prologue.
13073
426cf563
MA
130742001-11-28 Marc Autret <autret_m@epita.fr>
13075
13076 * src/reader.c (parse_dquoted_param): New.
13077 (parse_skel_decl): Use it.
13078 * src/lex.h: Add its prototype.
13079 * src/lex.c (literalchar): Become not static.
13080
c7925b99
MA
130812001-11-28 Marc Autret <autret_m@epita.fr>
13082
13083 * src/output.h: And put its extern declaration here.
13084 * src/output.c (error_verbose): Define here.
13085 (prepare): Echo name modification.
13086 * src/getargs.h: Clean its extern declaration.
13087 * src/getargs.c (error_verbose_flag): Remove.
13088 (getargs): Remove case 'e'.
13089 * src/options.c (option_table): 'error-verbose' is now seen as simple
13090 percent option.
13091 Include output.h.
13092
13093 * src/reader.c (read_declarations): Remove case tok_include.
13094 (parse_include_decl): Remove.
13095 * src/lex.h (token_t): Remove tok_include.
13096 * src/options.c (option_table): 'include' is now a simple command line
13097 option.
13098
5b5d1929
MA
130992001-11-28 Marc Autret <autret_m@epita.fr>
13100
13101 * src/bison.simple: Adjust muscle names.
13102 * src/muscle_tab.c (muscle_init): Also rename the muscles.
13103 * src/output.c (prepare): s/_/-/ for the muscles names.
13104 (output_parser): When scanning for a muscle, allow '-' instead of '_'.
13105
8850be4b
MA
131062001-11-28 Marc Autret <autret_m@epita.fr>
13107
13108 * src/bison.simple: Fix debug.
13109 [YYERROR_VERBOSE]: Re-integrate as an internal macro.
13110
4a38e613
AD
131112001-11-28 Akim Demaille <akim@epita.fr>
13112
13113 * src/LR0.c (shifts_new): New.
13114 (save_shifts, insert_start_shift, augment_automaton): Use it.
13115
4b35e1c1
AD
131162001-11-28 Akim Demaille <akim@epita.fr>
13117
13118 * src/closure.c (closure): `b' and `ruleno' denote the same value:
13119 keep ruleno only.
13120
d2b04478
AD
131212001-11-28 Akim Demaille <akim@epita.fr>
13122
13123 * src/closure.c (closure): Instead of looping over word in array
13124 then bits in words, loop over bits in array.
13125
2c4c30aa
AD
131262001-11-28 Akim Demaille <akim@epita.fr>
13127
13128 * src/closure.c (closure): No longer optimize the special case
13129 where all the bits of `ruleset[r]' are set to 0, to make the code
13130 clearer.
13131
576890b7
AD
131322001-11-28 Akim Demaille <akim@epita.fr>
13133
13134 * src/closure.c (closure): `r' and `c' are new variables, used to
13135 de-obfuscate accesses to RULESET and CORE.
13136
cb487d7d
AD
131372001-11-28 Akim Demaille <akim@epita.fr>
13138
13139 * src/reduce.c (reduce_print): Use ngettext.
13140 (dump_grammar): Improve the trace accuracy.
13141
6013d43f
AD
131422001-11-28 Akim Demaille <akim@epita.fr>
13143
13144 * src/reduce.c (dump_grammar): Don't translate trace messages.
13145
cb4956ee
AD
131462001-11-28 Akim Demaille <akim@epita.fr>
13147
13148 * tests/reduce.at (Useless Terminals, Useless Nonterminals): New.
13149 * src/reduce.c (reduce_grammar_tables): Do not free useless tags,
13150 as all tags are free'ed afterwards.
13151 From Enrico Scholz.
13152
648185ab
PE
131532001-11-27 Paul Eggert <eggert@twinsun.com>
13154
13155 * src/bison.simple (YYSTACK_REALLOC): Fix typo that caused us to
13156 use alloca when we didn't want to, and vice versa.
13157
68254a03
MA
131582001-11-27 Marc Autret <autret_m@epita.fr>
13159
9113b58f
AD
13160 * src/muscle_tab.c (muscle_init): Remove 'verbose' muscle
13161 initialization.
68254a03
MA
13162 * src/output.c (prepare): Remove its update.
13163
04d843a2
MA
131642001-11-27 Marc Autret <autret_m@epita.fr>
13165
13166 * tests/torture.at [AT_DATA]: Remove YYERROR_VERBOSE definition.
13167 Use %error-verbose.
13168
d2079671 131692001-11-27 Marc Autret <autret_m@epita.fr>
eeeb962b
MA
13170
13171 * src/bison.simple: Remove YYERROR_VERBOSE using.
13172 Use %%error_verbose.
13173 (yyparse): Likewise.
13174 * src/output.c (prepare): Give its final value.
13175 * src/muscle_tab.c (muscle_init): Init new muscle 'error_verbose'.
13176 * src/getargs.h: Add its extern declaration.
13177 * src/getargs.c (error_verbose_flag): New int.
13178 (getargs): Update to catch new case.
13179 * src/options.c (option_table): 'error-verbose' is a new option.
13180 (shortopts): Update.
13181
e0327bc8
AD
131822001-11-27 Akim Demaille <akim@epita.fr>
13183
13184 * src/system.h: Use intl/libgettext.h.
13185 * src/Makefile.am (INCLUDES): Add -I $(top_srcdir).
13186
000f1a3c
AD
131872001-11-27 Akim Demaille <akim@epita.fr>
13188
13189 * tests/torture.at (Exploding the Stack Size with Malloc):
13190 s/YYSTACK_USE_ALLOCA_ALLOCA/YYSTACK_USE_ALLOCA/.
13191
26cfe0be
AD
131922001-11-27 Akim Demaille <akim@epita.fr>
13193
13194 * src/files.c: Include error.h.
13195 Reported by Hans Aberg.
13196
f6bd5427
MA
131972001-11-26 Marc Autret <autret_m@epita.fr>
13198
d2079671 13199 * src/reader.c (parse_include_decl): New, not yet implemented.
f6bd5427
MA
13200 (read_declarations): Add case tok_include.
13201 * src/getargs.h (include): Add its extern definition.
13202 * src/getargs.c (include): New const char *.
13203 (getargs): Add case '-I'.
13204 * src/options.c (option_table): Add include as command line and
13205 percent option.
13206 * src/lex.h (token_t): Add tok_include.
13207
2ca209c1
AD
132082001-11-26 Akim Demaille <akim@epita.fr>
13209
13210 * src/reader.c (readgram): Make sure rules for mid-rule actions
13211 have a lineno equal to that of their host rule.
13212 Reported by Hans Aberg.
13213 * tests/regression.at (Rule Line Numbers): New.
13214
0e41b407
AD
132152001-11-26 Akim Demaille <akim@epita.fr>
13216
13217 * src/LR0.c (allocate_itemsets): kernel_size contains ints, not
13218 size_ts.
13219
132202001-11-26 Akim Demaille <akim@epita.fr>
13221
13222 * src/complain.c, src/complain.h (error): Remove, provided by
13223 lib/error.[ch].
13224
e0c40012
AD
132252001-11-26 Akim Demaille <akim@epita.fr>
13226
13227 * src/reader.c (read_declarations): Don't abort on tok_illegal,
13228 issue an error message.
13229 * tests/regression.at (Invalid %directive): New.
13230 Reported by Hans Aberg.
13231
5e147124
AD
132322001-11-26 Akim Demaille <akim@epita.fr>
13233
13234 * configure.in: Invoke AC_FUNC_OBSTACK and AC_FUNC_ERROR_AT_LINE.
13235 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
13236
a034c8b8
AD
132372001-11-26 Akim Demaille <akim@epita.fr>
13238
13239 * src/conflicts.c (conflicts_print): Don't complain at all when
13240 there are no reduce/reduce conflicts, and as many shift/reduce
13241 conflicts as expected.
13242 * tests/regression.at (%expect right): Adjust.
13243
c64a20f3
AD
132442001-11-23 Akim Demaille <akim@epita.fr>
13245
13246 * lib/alloca.c: Update, from fileutils.
13247
5b0d29bb
AD
132482001-11-23 Akim Demaille <akim@epita.fr>
13249
13250 * lib/Makefile.am (libbison_a_LIBADD): Add @ALLOCA@.
13251
722c4bfe
AD
132522001-11-23 Akim Demaille <akim@epita.fr>
13253
13254 * src/system.h: Include alloca.h.
13255 * src/main.c (main) [C_ALLOCA]: Call alloca (0).
13256
6255b435
AD
132572001-11-23 Akim Demaille <akim@epita.fr>
13258
13259 * src/print_graph.c (print_actions): Remove `rule', unused.
13260 * src/LR0.c (kernel_size): Contain `int' instead of `size_t' to
13261 pacify GCC's signed < unsigned warnings.
13262 * src/closure.c (itemsetsize): Likewise.
13263 * src/reader.c (symbol_list_new): Static.
13264
b29b2ed5
AD
132652001-11-23 Akim Demaille <akim@epita.fr>
13266
13267 Attaching lineno to buckets is stupid, since only one copy of each
13268 symbol is kept, only the line of the first occurrence is kept too.
13269
13270 * src/symtab.h, src/symtab.c (bucket): Remove the line member.
13271 * src/reader.c (rline_allocated): Remove, unused.
13272 (symbol_list): Have a `line' member.
13273 (symbol_list_new): New.
13274 (readgram): Use it.
13275 * src/print.c (print_grammar): Output the rule line numbers.
13276 * tests/regression.at (Solved SR Conflicts)
13277 (Unresolved SR Conflicts): Adjust.
13278 Reported by Hans Aberg.
13279
a81b1d4a
MA
132802001-11-22 Marc Autret <autret_m@epita.fr>
13281
13282 * src/bison.simple [YYERROR_VERBOSE]: Force its value to be 1 or 0.
13283
c1ecb3c1
MA
132842001-11-22 Marc Autret <autret_m@epita.fr>
13285
13286 * src/muscle_tab.c (muscle_init): Remove initialization of
13287 skeleton muscle.
13288 * src/output.c (output_master_parser): Do it here.
13289
fbe01355
AD
132902001-11-20 Akim Demaille <akim@epita.fr>
13291
13292 * po/sv.po: New.
13293 * configure.in (ALL_LINGUAS): Adjust.
13294 * po/POTFILE.in: Remove `nullable.c' and `derives.c' which no
13295 longer contains strings to translate.
13296
81e895c0
AD
132972001-11-19 Akim Demaille <akim@epita.fr>
13298
13299 * src/conflicts.c (conflicts_print): Add a missing \n.
13300
6bb1878b
AD
133012001-11-19 Akim Demaille <akim@epita.fr>
13302
13303 * src/nullable.c (nullable_print): New.
13304 (set_nullable): Call it when tracing.
13305 Better locality of variables.
13306
d9ec2d07
AD
133072001-11-19 Akim Demaille <akim@epita.fr>
13308
13309 * src/print.c (print_actions): Better locality of variables.
13310
720e5c1b
AD
133112001-11-19 Akim Demaille <akim@epita.fr>
13312
13313 * src/derives.c (print_derives): Fix and enrich.
13314 * src/closure.c (print_fderives): Likewise.
13315
fb908786
AD
133162001-11-19 Akim Demaille <akim@epita.fr>
13317
13318 * src/closure.c (itemsetend): Remove, replaced with...
13319 (itemsetsize): new.
13320
125ecb56
AD
133212001-11-19 Akim Demaille <akim@epita.fr>
13322
13323 * src/LR0.c (kernel_end): Remove, replaced with...
13324 (kernel_size): new.
13325
d8cf039f
AD
133262001-11-19 Akim Demaille <akim@epita.fr>
13327
13328 * src/conflicts.c (set_conflicts): Use arrays instead of pointers
13329 to clarify.
13330
7bec0760
AD
133312001-11-19 Akim Demaille <akim@epita.fr>
13332
13333 * src/closure.c (closure): Use arrays instead of pointers to clarify.
13334
c87d4863
AD
133352001-11-19 Akim Demaille <akim@epita.fr>
13336
13337 * src/closure.c, src/derives.c, src/nullable.c: Adjust various
13338 trace messages.
13339 * src/LR0.c: Likewise.
13340 (allocate_itemsets): Use arrays instead of pointers to clarify.
13341
9bfe901c
AD
133422001-11-19 Akim Demaille <akim@epita.fr>
13343
13344 * src/getargs.c (statistics_flag): Replace with...
13345 (trace_flag): New.
13346 (longopts): Accept --trace instead of --statistics.
13347 * src/getargs.h, src/options.c: Adjust.
13348 * src/LR0.c, src/closure.c, src/derives.c, src/nullable.c,
13349 * src/reduce.c: Use trace_flags instead of the CPP conditional TRACE.
13350
97db7bd4
AD
133512001-11-19 Akim Demaille <akim@epita.fr>
13352
cc72668c 13353 * src/LR0.c (new_itemsets, get_state): Use more arrays and fewer
97db7bd4
AD
13354 pointers to clarify the code.
13355 (save_reductions, save_shifts): Factor common parts of alternatives.
13356
2c5f66ed
AD
133572001-11-19 Akim Demaille <akim@epita.fr>
13358
13359 * src/LR0.c (new_state, get_state): Complete TRACE code.
13360 * src/closure.c: Include `reader.h' to get `tags', needed by the
13361 trace code.
13362 Rename the conditional DEBUG as TRACE.
13363 Output consistently TRACEs to stderr, not stdout.
13364 * src/derives.c: Likewise.
13365 * src/reduce.c: (inaccessable_symbols): Using if is better style
13366 than goto.
13367 Use `#if TRACE' instead of `#if 0' for tracing code.
13368
300f275f
AD
133692001-11-19 Akim Demaille <akim@epita.fr>
13370
13371 * src/system.h (LIST_FREE, shortcpy): New.
13372 * src/LR0.c: Use them.
13373 * src/output.c (free_itemsets, free_reductions, free_shifts):
13374 Remove, replaced by LIST_FREE.
13375
f59c437a
AD
133762001-11-19 Akim Demaille <akim@epita.fr>
13377
13378 * src/state.h (CORE_ALLOC, SHIFTS_ALLOC, ERRS_ALLOC)
13379 (REDUCTIONS_ALLOC): New.
13380 * src/LR0.c, src/conflicts.c: Use them to de-obfuscate memory
13381 allocation.
13382
6986fd9e
AD
133832001-11-19 Akim Demaille <akim@epita.fr>
13384
13385 * src/LR0.c (new_state): Complete trace code.
13386 * src/nullable.c (set_nullable): Don't translate traces.
13387
4bc30f78
AD
133882001-11-19 Akim Demaille <akim@epita.fr>
13389
13390 * src/print_graph.c (print_core): Better locality of variables.
13391 * src/print.c (print_core): Likewise.
13392
08a946e0
AD
133932001-11-19 Akim Demaille <akim@epita.fr>
13394
13395 * src/vcg.c: You do the output, so you are responsible of the
13396 handling of VCG syntax, in particular: use quotearg.
13397 * src/print_graph.c: Don't.
13398 (print_actions): Don't output the actions as part of the nodes,
13399 since that's the job of the edges.
13400 (print_state): Don't output by hand: fill the node description,
9bfe901c 13401 and ask for its output.
08a946e0 13402
f0473484
AD
134032001-11-19 Akim Demaille <akim@epita.fr>
13404
cc72668c
AD
13405 * src/bison.simple (yyparse): When verbosely reporting an error,
13406 no longer put additional quotes around token names.
f0473484
AD
13407 * tests/calc.at: Adjust.
13408
e41dc700
AD
134092001-11-19 Akim Demaille <akim@epita.fr>
13410
13411 * src/symtab.h, src/symtab.c: `line' is a new member of `bucket'.
13412 * src/reader.c (record_rule_lines, rline, rline_allocated): Remove.
13413 * src/output.c: Adjust.
13414
652a871c
AD
134152001-11-19 Akim Demaille <akim@epita.fr>
13416
13417 * src/gram.h (rprec, rprecsym, rassoc): Remove, now part of...
13418 (rule_t): this.
13419 * src/conflicts.c, src/reader.c, src/reduce.c: Adjust.
13420
b2ed6e58
AD
134212001-11-19 Akim Demaille <akim@epita.fr>
13422
13423 * src/gram.h (rule_t): New.
13424 (rule_table): New.
13425 (rrhs, rlhs): Remove, part of state_t.
13426 * src/print_graph.c, src/closure.c, src/conflicts.c, src/derives.c,
13427 * src/lalr.c, src/nullable.c, src/output.c, src/print.c,
13428 * src/reader.c, src/reduce.c: Adjust.
13429
edad7067
AD
134302001-11-19 Akim Demaille <akim@epita.fr>
13431
13432 * src/reader.c (symbols_output): New, extracted from...
13433 (packsymbols): Here.
13434 (reader): Call it.
13435
3feec034
AD
134362001-11-19 Akim Demaille <akim@epita.fr>
13437
13438 * src/lalr.c (set_maxrhs, maxrhs): Remove, replaced with...
13439 (maxrhs): this new function.
13440
ddcd5fdf
AD
134412001-11-19 Akim Demaille <akim@epita.fr>
13442
cc72668c 13443 * src/lalr.c (F): New macro to access the variable F.
ddcd5fdf
AD
13444 Adjust.
13445
bb527fc2
AD
134462001-11-19 Akim Demaille <akim@epita.fr>
13447
cc72668c 13448 * src/lalr.h (LA): New macro to access the variable LA.
bb527fc2
AD
13449 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
13450 * src/lalr.c: Adjust.
13451
a845a697
AD
134522001-11-19 Akim Demaille <akim@epita.fr>
13453
13454 * src/lalr.c (initialize_LA): Only initialize LA. Let...
13455 (set_state_table): handle the `lookaheads' members.
13456
f004bf6a
AD
134572001-11-19 Akim Demaille <akim@epita.fr>
13458
cc72668c
AD
13459 * src/lalr.h (lookaheads): Removed array, whose contents is now
13460 a member of...
f004bf6a
AD
13461 (state_t): this structure.
13462 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
13463 Adjust.
13464
de326cc0
AD
134652001-11-19 Akim Demaille <akim@epita.fr>
13466
cc72668c
AD
13467 * src/lalr.h (consistent): Removed array, whose contents is now
13468 a member of...
de326cc0
AD
13469 (state_t): this structure.
13470 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
13471 Adjust.
13472
90b4416b
AD
134732001-11-19 Akim Demaille <akim@epita.fr>
13474
cc72668c
AD
13475 * src/lalr.h (reduction_table, shift_table): Removed arrays, whose
13476 contents are now members of...
90b4416b
AD
13477 (state_t): this structure.
13478 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
13479 Adjust.
13480
9703cc49
AD
134812001-11-19 Akim Demaille <akim@epita.fr>
13482
13483 * src/lalr.h (state_t): New.
13484 (state_table): Be a state_t * instead of a core **.
13485 (accessing_symbol): Remove, part of state_t.
13486 * src/lalr.c: Adjust.
13487 (set_accessing_symbol): Merge into...
13488 (set_state_table): this.
13489 * src/print_graph.c, src/conflicts.c: Adjust.
13490
d803322e
AD
134912001-11-14 Akim Demaille <akim@epita.fr>
13492
13493 * tests/calc.at, tests/output.at, tests/regression.at,
13494 * tests/testsuite.at, tests/torture.at: Rely on Autotest 2.52g:
13495 now the tests are run in private dirs, therefore AC_CLEANUP and
13496 family can be simplified to 0-ary.
13497 * tests/atlocal.in: Now that we run `elsewhere' than in tests/,
13498 use abs. path to find config.h.
13499 * tests/calc.at (AT_CHECK_CALC): Don't try to check the compiler's
13500 stderr, there can be way too much random noise.
13501 Instead pass -Werror to GCC and rely on the exit status.
13502 Reported by Wolfram Wagner.
13503
3d76b07d
AD
135042001-11-14 Akim Demaille <akim@epita.fr>
13505
13506 * src/bison.simple (yyparse): Let yyls1, yyss1 and yyvs1 be
13507 defined only if yyoverflow is defined, to avoid `warning: unused
13508 variable `yyvs1''.
13509 Reported by The Test Suite.
13510
09b503c8
AD
135112001-11-14 Akim Demaille <akim@epita.fr>
13512
13513 * src/print.c: Include reduce.h.
13514 Reported by Hans Aberg.
13515
135162001-11-14 Akim Demaille <akim@epita.fr>
13517
13518 * src/lex.c, src/lex.h (token_buffer, unlexed_token_buffer):
13519 Revert a previous patch: these are really const.
13520 * src/conflicts.c (conflict_report): Additional useless pair of
13521 braces to pacify GCC's warnings for `if () if () {} else {}'.
13522 * src/lex.c (parse_percent_token): Replace equal_offset with
13523 arg_offset.
13524 arg is const.
13525 Be sure to strdup `arg' when used, since there is no reason for
13526 token_buffer not to change.
13527
0f37a994
AD
135282001-11-14 Akim Demaille <akim@epita.fr>
13529
13530 * src/system.h (EXIT_SUCCESS, EXIT_FAILURE): Ensure a proper
13531 definition.
13532 * src/main.c (main): Use them.
13533 Suggested by Hans Aberg.
13534
d39d93b8
AD
135352001-11-12 Akim Demaille <akim@epita.fr>
13536
13537 * src/system.h (ngettext): Now that we use ngettext, be sure to
13538 provide a default definition when NLS are not used.
13539
9edcd895
AD
135402001-11-12 Akim Demaille <akim@epita.fr>
13541
13542 * doc/bison.texinfo: Use `$' as shell prompt, not `%'.
13543 Use @kbd to denote user input.
13544 (Language and Grammar): ANSIfy the example.
13545 Adjust its layout for info/notinfo.
13546 (Location Tracking Calc): Output error messages to stderr.
13547 Output locations in a more GNUtically correct way.
13548 Fix a couple of Englishos.
13549 Adjust @group/@end group pairs.
13550
7da99ede
AD
135512001-11-12 Akim Demaille <akim@epita.fr>
13552
e3aa65c5 13553 %expect was not functioning at all.
7da99ede
AD
13554
13555 * src/conflicts.c (expected_conflicts): Set to -1.
13556 (conflict_report): Use ngettext.
13557 (conflicts_print): Check %expect and make its violation an error.
13558 * doc/bison.texinfo (Expect Decl): Adjust.
13559 * configure.in (AM_GNU_GETTEXT): Ask for ngettext.
13560 * tests/regression.at (%expect not enough, %expect right)
13561 (%expect too much): New.
13562
ba9dda1a
AD
135632001-11-12 Akim Demaille <akim@epita.fr>
13564
13565 * tests/regression.at (Conflicts): Rename as...
13566 (Unresolved SR Conflicts): this.
13567 (Solved SR Conflicts): New.
13568
337c5bd1
AD
135692001-11-12 Akim Demaille <akim@epita.fr>
13570
13571 * src/reduce.c (print_results): Rename as...
13572 (reduce_output): This.
13573 Output to OUT, passed as argument, instead of output_obstack.
13574 (dump_grammar): Likewise.
13575 (reduce_free): New.
13576 Also free V1.
13577 (reduce_grammar): No longer call reduce_output, since...
13578 * src/print.c (print_results): do it.
13579 * src/main.c (main): Call reduce_free;
13580
c73a41af
AD
135812001-11-12 Akim Demaille <akim@epita.fr>
13582
13583 * src/conflicts.c (print_reductions): Accept OUT as argument.
13584 Output to it, not to output_obstack.
13585 * src/print.c (print_actions): Adjust.
13586
0df87bb6
AD
135872001-11-12 Akim Demaille <akim@epita.fr>
13588
13589 * src/conflicts.c (count_sr_conflicts, count_rr_conflicts): Return
13590 the result instead of using...
13591 (src_total, rrc_total, src_count, rrc_count): Remove.
13592 (any_conflicts): Remove.
13593 (print_conflicts): Split into...
13594 (conflicts_print, conflicts_output): New.
13595 * src/conflicts.h: Adjust.
13596 * src/main.c (main): Invoke both conflicts_output and conflicts_print.
0f37a994 13597 * src/print.c (print_grammar): Issue `\n' between two rules.
0df87bb6
AD
13598 * tests/regression.at (Conflicts): New.
13599 Reported by Tom Lane.
13600
e4d3d4de
AD
136012001-11-12 Akim Demaille <akim@epita.fr>
13602
13603 * tests/regression.at (Invalid input): Remove, duplicate with
13604 ``Invalid input: 1''.
13605
6d7d248e
AD
136062001-11-12 Akim Demaille <akim@epita.fr>
13607
13608 * tests/torture.at (AT_DATA_STACK_TORTURE)
13609 (Exploding the Stack Size with Alloca)
13610 (Exploding the Stack Size with Malloc): New.
13611
e9e4c321
AD
136122001-11-12 Akim Demaille <akim@epita.fr>
13613
13614 * src/bison.simple (YYSTACK_REALLOC): New.
13615 (yyparse) [!yyoverflow]: Use it and free the old stack.
0f37a994 13616 Reported by Per Allansson.
e9e4c321 13617
5f7e0832
AD
136182001-11-12 Pascal Bart <pascal.bart@epita.fr>
13619
13620 * src/bison.simple: Define type yystype instead of YYSTYPE, and
13621 define CPP macro, which substitute YYSTYPE by yystype.
13622 * src/reader.c (parse_union_decl): Output yystype/YYSTYPE as we do
13623 with yyltype/YYLTYPE. This allows inclusion of the generated
13624 header within the parser if the compiler, such as GGC, accepts
13625 multiple equivalent #defines.
13626 From Akim.
13627
e3f1699f
AD
136282001-11-05 Akim Demaille <akim@epita.fr>
13629
13630 * src/reader.c (symbols_output): New, extracted from...
13631 (packsymbols): here.
13632 (reader): Adjust.
13633
65be0866
AD
136342001-11-05 Akim Demaille <akim@epita.fr>
13635
13636 * src/lex.c (parse_percent_token): s/quotearg/quote/.
13637
e4d910bf
AD
136382001-11-05 Akim Demaille <akim@epita.fr>
13639
13640 * tests/regression.at (AT_TEST_CPP_GUARD_H): Adjust the clean up
13641 pattern.
13642
951366c1
AD
136432001-11-05 Akim Demaille <akim@epita.fr>
13644
13645 * src/options.h (struct option_table_struct): set_flags is void*.
13646 * src/options.c (longopts): Support `--output' and `%output'.
13647 (usage): Adjust.
13648 * src/lex.h (tok_setopt): Remove, replaced with...
13649 (tok_intopt, tok_stropt): these new guys.
13650 * src/lex.c (getopt.h): Not needed.
13651 (token_buffer, unlexed_token_buffer): Not const.
13652 (percent_table): Promote `-' over `_' in directive names.
13653 Active `%name-prefix', `file-prefix', and `output'.
13654 (parse_percent_token): Accept possible arguments to directives.
13655 Promote `-' over `_' in directive names.
13656
d8988b2f
AD
136572001-11-04 Akim Demaille <akim@epita.fr>
13658
13659 * doc/bison.texinfo (Decl Summary): Split the list into
13660 `directives for grammars' and `directives for bison'.
13661 Sort'em.
13662 Add description of `%name-prefix', `file-prefix', and `output'.
13663 Promote `-' over `_' in directive names.
13664 (Bison Options): s/%locactions/%locations/. Nice Freudian slip.
13665 Simplify the description of `--name-prefix'.
13666 Promote `-' over `_' in directive names.
13667 Promote `--output' over `--output-file'.
13668 Fix the description of `--defines'.
13669 * tests/output.at: Exercise %file-prefix and %output.
13670
6468d18e
AD
136712001-11-02 Akim Demaille <akim@epita.fr>
13672
13673 * doc/refcard.tex: Update.
13674
6b7e85b9
AD
136752001-11-02 Akim Demaille <akim@epita.fr>
13676
13677 * src/symtab.h (SUNDEF): New.
13678 * src/symtab.c (bucket_new): Init user_token_number to SUNDEF to
13679 stand for `uninitialized', instead of 0.
13680 * src/reader.c (packsymbols, parse_thong_decl): Adjust.
13681 * src/lex.c (lex): Adjust.
13682
13683 * tests/calc.at (_AT_DATA_CALC_Y): Declare a token for EOF.
13684 Number it 0.
13685 Let yylex return it instead of a plain 0.
13686 Reported by Dick Streefland.
13687
cd5aafcf
AD
136882001-11-02 Akim Demaille <akim@epita.fr>
13689
13690 * tests/regression.at (Mixing %token styles): New test.
13691
037ca2f1
AD
136922001-11-02 Akim Demaille <akim@epita.fr>
13693
13694 * src/reader.c (parse_thong_decl): Formatting changes.
13695 (token_translations_init): New, extracted from...
13696 (packsymbols): Here.
13697 Adjust.
13698
270a173c
AD
136992001-11-01 Akim Demaille <akim@epita.fr>
13700
13701 * tests/regression.at (AT_TEST_CPP_GUARD_H): New.
13702 Check that `9foo.y' produces correct cpp guards.
13703 * src/files.c (compute_header_macro): Prepend `BISON_' to CPP
13704 guards.
13705 Reported by Wwp.
13706
561f9a30
AD
137072001-11-01 Akim Demaille <akim@epita.fr>
13708
13709 * tests/regression.at (Invalid input: 2): New.
13710 * src/lex.c (unlexed_token_buffer): New.
13711 (lex, unlex): Adjust: when unlexing, be sure to save token_buffer
13712 too.
13713 Reported by Wwp.
13714
f987e9d2
AD
137152001-11-01 Akim Demaille <akim@epita.fr>
13716
13717 * tests/calc.at: Catch up with 1.30.
13718 * configure.in: Bump to 1.49a.
13719 Adjust to newer Autotest.
13720
0846f581
PB
137212001-10-19 Pascal Bart <pascal.bart@epita.fr>
13722
13723 * src/conflicts.c: Move global variables rrc_total and src_total ...
13724 (print_conflicts): here.
13725 * src/output.c (output): Free global variable user_toknums.
13726 * src/lex.c (token_obstack): Become static.
13727
3c1a79b3
AD
137282001-10-18 Akim Demaille <akim@epita.fr>
13729
13730 * tests/atlocal.in (GCC): Add.
13731 * tests/calc.at: s/m4_match/m4_bmatch/.
13732 s/m4_patsubst/m4_bpatsubst/.
13733 (AT_CHECK_CALC): Check the compiler's stderr only if it's GCC.
13734 * configure.in: AC_SUBST(GCC).
13735
5d52e7d0
MA
137362001-10-14 Marc Autret <autret_m@epita.fr>
13737
13738 * src/options.c (create_long_option_table): Fix.
13739
631aa1d3
AD
137402001-10-10 Akim Demaille <akim@epita.fr>
13741
13742 * src/bison.simple: Be sure to set YYSTACK_USE_ALLOCA.
13743
f6ec6d13
AD
137442001-10-04 Akim Demaille <akim@epita.fr>
13745
13746 * src/reader.c (parse_union_decl): Push the caracters in
13747 union_obstack, not attrs_obstack.
13748
342b8b6e
AD
137492001-10-04 Akim Demaille <akim@epita.fr>
13750
13751 Merge in the branch 1.29.
13752
13753 * src/reader.c (packsymbols): Use a temporary obstack for
13754 `%%tokendef', since output_stack is already used elsewhere.
13755
13756 2001-10-02 Akim Demaille <akim@epita.fr>
13757
13758 Bump 1.29d.
13759
13760 2001-10-02 Akim Demaille <akim@epita.fr>
13761
13762 Version 1.29c.
13763
13764 2001-10-02 Akim Demaille <akim@epita.fr>
13765
13766 * tests/regression.at (Invalid CPP headers): New.
13767 From Alexander Belopolsky.
13768 * src/files.c (compute_header_macro): Map non alnum chars to `_'.
13769
13770 2001-10-02 Akim Demaille <akim@epita.fr>
13771
13772 * tests/regression.at (Invalid input): New.
13773 * src/lex.c (lex): Be sure to set `token_buffer' in any case.
13774 Reported by Shura.
13775
13776 2001-10-02 Akim Demaille <akim@epita.fr>
13777
13778 * tests/calc.at: Now that --debug works, the tests must be adjusted.
13779
13780 2001-10-02 Akim Demaille <akim@epita.fr>
13781
13782 * src/output.c (output_parser): Assert `skeleton'.
13783 * src/files.c (skeleton_find): Look harder for skeletons on DOSish
13784 systems.
13785 From Shura.
13786
13787 2001-10-01 Marc Autret <autret_m@epita.fr>
13788
13789 * src/lex.h: Echo modifications.
13790 * src/lex.c (unlex): Parameter is now token_t.
13791 From Hans Aberg.
13792
13793 2001-10-01 Marc Autret <autret_m@epita.fr>
13794
13795 * src/main.c: Include lex.h.
13796 From Hans Aberg.
13797
13798 2001-09-29 Akim Demaille <akim@epita.fr>
13799
13800 * src/getargs.c (longopts): `--debug' is `-t', not `-d'.
13801
13802 2001-09-28 Akim Demaille <akim@epita.fr>
13803
13804 * tests/testsuite.at: Update to newer Autotest.
13805 * tests/Makefile.am (EXTRA_DIST): bison is not to be shipped.
13806
13807 2001-09-27 Akim Demaille <akim@epita.fr>
13808
13809 Position independent wrapper.
13810
13811 * tests/bison: Remove.
13812 * tests/bison.in: New.
13813 * configure.in: Adjust.
13814
13815 2001-09-27 Paul Eggert <eggert@twinsun.com>
13816
13817 Port quotearg fixes from tar 1.13.24.
13818
13819 * lib/quotearg.c: BSD/OS 4.1 wchar.h requires FILE and struct
13820 tm to be declared.
13821 (HAVE_MBSINIT): Undef if !HAVE_MBRTOWC.
13822 (mbsinit): Define to 1 if !defined mbsinit && !HAVE_MBSINIT.
13823
13824 * m4/Makefile.am (EXTRA_DIST): Add mbrtowc.m4.
13825 * m4/mbrtowc.m4: New file.
13826 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Check for mbsinit and stddef.h.
13827 Use jm_FUNC_MBRTOWC instead of AC_CHECK_FUNCS(mbrtowc).
13828
13829 2001-09-27 Akim Demaille <akim@epita.fr>
13830
13831 Bump to 1.29c.
13832
13833 2001-09-27 Akim Demaille <akim@epita.fr>
13834
13835 Version 1.29b.
13836
13837 2001-09-25 Akim Demaille <akim@epita.fr>
13838
13839 * src/system.h: Include `xalloc.h'.
13840 Remove it from the C files.
13841 * src/files.c (output_files): Free the obstacks.
13842 * src/lex.c (init_lex): Rename as...
13843 (lex_init): this.
13844 (lex_free): New.
13845 * src/main.c (main): Use it.
13846
13847 2001-09-24 Marc Autret <autret_m@epita.fr>
13848
13849 * src/vcg.c (open_edge, close_edge, open_node, close_node): Change
13850 to output informations in fout (FILE*).
13851 (open_graph, close_graph): Likewise.
13852 (output_graph, output_edge, output_node): Likewise.
13853 * src/vcg.h: Update function prototypes.
13854 * src/print_graph.c (print_graph): Open output graph file.
13855 (print_actions): Adjust.
13856 * src/files.h: Remove extern declaration.
13857 * src/files.c: Remove graph_obstack declaration.
13858 (open_files): Remove graph_obstack initialization.
13859 (output_files): Remove graph_obstack saving.
13860
13861 2001-09-24 Marc Autret <autret_m@epita.fr>
13862
13863 * src/files.c (compute_output_file_names): Fix.
13864
13865 2001-09-24 Marc Autret <autret_m@epita.fr>,
13866 Akim Demaille <akim@epita.fr>
13867
13868 * src/reader.c (reader): Remove call to free_symtab ().
13869 * src/main.c (main): Call it here.
13870 Include symtab.h.
13871 * src/conflicts.c (initialize_conflicts): Rename as...
13872 (solve_conflicts): this.
13873 * src/print.c (print_core, print_actions, print_state)
13874 (print_grammar): Dump to a file instead a `output_obstack'.
13875 (print_results): Dump `output_obstack', and then proceed with the
13876 FILE *.
13877 * src/files.c (compute_output_file_names, close_files): New.
13878 (output_files): Adjust.
13879 * src/main.c (main): Adjust.
13880
13881 2001-09-23 Marc Autret <autret_m@epita.fr>
13882
13883 * src/files.c (compute_header_macro): Computes header macro name
13884 from spec_defines_file when given.
13885
13886 2001-09-23 Marc Autret <autret_m@epita.fr>
13887
13888 * src/files.c (output_files): Add default extensions.
13889
13890 2001-09-22 Akim Demaille <akim@epita.fr>
13891
13892 * src/conflicts.c (finalize_conflicts): Rename as...
13893 (free_conflicts): this.
13894
13895 2001-09-22 Akim Demaille <akim@epita.fr>
13896
13897 * src/gram.c (gram_free): Rename back as...
13898 (dummy): this.
13899 (output_token_translations): Free `token_translations'.
13900 * src/symtab.c (free_symtab): Free the tag field.
13901
13902 2001-09-22 Akim Demaille <akim@epita.fr>
13903
13904 Remove `translations' as it is always set to true.
13905
13906 * src/gram.h: Adjust.
13907 * src/reader.c (packsymbols, parse_token_decl): Adjust
13908 * src/print.c (print_grammar): Adjust.
13909 * src/output.c (output_token_translations): Adjust.
13910 * src/lex.c (lex): Adjust.
13911 * src/gram.c: Be sure the set pointers to NULL.
13912 (dummy): Rename as...
13913 (gram_free): this.
13914
13915 2001-09-22 Akim Demaille <akim@epita.fr>
13916
13917 * configure.in: Invoke AM_LIB_DMALLOC.
13918 * src/system.h: Use dmalloc.
13919 * src/LR0.c: Be sure to have pointers initialized to NULL.
13920 (allocate_itemsets): Allocate kernel_items only if needed.
13921
13922 2001-09-22 Akim Demaille <akim@epita.fr>
13923
13924 * configure.in: Bump to 1.29b.
13925 * tests/Makefile.am (DISTCLEANFILES): Add package.m4.
13926 * tests/calc.at (_AT_DATA_CALC_Y): #undef malloc so that we don't
13927 need xmalloc.c in calc.y.
13928 From Pascal Bart.
13929
13930 2001-09-21 Akim Demaille <akim@epita.fr>
13931
13932 Version 1.29a.
13933 * Makefile.maint, config/config.guess, config/config.sub,
13934 * config/missing: Update from masters.
13935 * tests/Makefile.am ($(srcdir)/$(TESTSUITE)): No longer depend
13936 upon package.m4.
13937 * configure.in (ALL_LINGUAS): Add `tr'.
13938
13939 2001-09-21 Akim Demaille <akim@epita.fr>
13940
13941 * tests/Makefile.am (package.m4): Move to...
13942 ($(srcdir)/$(TESTSUITE)): here.
13943
13944 2001-09-20 Akim Demaille <akim@epita.fr>
13945
13946 * src/complain.c: No longer try to be standalone: use system.h.
13947 Don't assume __STDC__ is defined to 1. Just test if it is defined.
13948 * src/complain.h: Likewise.
13949 * src/reduce.c (useless_nonterminals, inaccessable_symbols):
13950 Remove the unused variable `n'.
13951 From Albert Chin-A-Young.
13952
13953 2001-09-18 Marc Autret <autret_m@epita.fr>
13954
13955 * doc/bison.1: Update.
13956 * doc/bison.texinfo (Bison Options): Update --defines and --graph
13957 descriptions.
13958 (Option Cross Key): Update.
13959 Add --graph.
13960
13961 2001-09-18 Marc Autret <autret_m@epita.fr>
13962
13963 * tests/regression.at: New test (comment in %union).
13964
13965 2001-09-18 Marc Autret <autret_m@epita.fr>
13966
13967 * src/reader.c (parse_union_decl): Do not output '/'. Let copy_comment
13968 do that.
13969 Reported by Keith Browne.
13970
13971 2001-09-18 Marc Autret <autret_m@epita.fr>
13972
13973 * tests/output.at: Add tests for --defines and --graph.
13974
13975 2001-09-18 Marc Autret <autret_m@epita.fr>
13976
13977 * tests/output.at: Removes tests of %{header,src}_extension features.
13978
13979 2001-09-18 Akim Demaille <akim@epita.fr>
13980
13981 * tests/Makefile.am (package.m4): New.
13982 * tests/calc.at (_AT_CHECK_CALC): Just run `calc input'.
13983 (_AT_CHECK_CALC_ERROR): Likewise.
13984 Factor the `, ' part of verbose error messages.
13985
13986 2001-09-18 Marc Autret <autret_m@epita.fr>
13987
13988 * src/getargs.c (longopts): Declare --defines and --graph as options
13989 with optional arguments.
13990 * src/files.h: Add extern declarations.
13991 * src/files.c (spec_graph_file, spec_defines_file): New.
13992 (output_files): Update.
13993 Remove CPP-outed code.
13994
13995 2001-09-18 Marc Autret <autret_m@epita.fr>
13996
13997 Turn off %{source,header}_extension feature.
13998
13999 * src/files.c (compute_exts_from_gf): Update.
14000 (compute_exts_from_src): Update.
14001 (output_files): CPP-out useless code.
14002 * src/files.h: Remove {header,source}_extension extern declarations.
14003 * src/reader.c (parse_dquoted_param): CPP-out.
14004 (parse_header_extension_decl): Remove.
14005 (parse_source_extension_decl): Remove.
14006 (read_declarations): Remove cases tok_{hdrext,srcext}.
14007 * src/lex.c (percent_table): Remove {header,source}_extension entries.
14008 * src/lex.h (token_t): Remove tok_hdrext and tok_srcext.
14009
14010 2001-09-10 Akim Demaille <akim@epita.fr>
14011
14012 * tests/output.at (AT_CHECK_BISON_FLAGS, AT_CHECK_BISON_PERCENT):
14013 (AT_CHECK_BISON_PERCENT_FLAGS): Merge into...
14014 (AT_CHECK_OUTPUT): this.
14015 Merely check ls' exit status, its output is useless.
14016
14017 2001-09-10 Akim Demaille <akim@epita.fr>
14018
14019 * tests/calc.at: Use m4_match.
14020 (_AT_DATA_CALC_Y): Check `yyin != NULL', not `stdin != NULL'.
14021
14022 2001-09-10 Marc Autret <autret_m@epita.fr>,
14023 Akim Demaille <akim@epita.fr>
14024
14025 * src/vcg.h (graph_s): color, textcolor, bordercolor are now
14026 enum color_e.
14027 * src/print_graph.c (print_graph): Initalize graph.layoutalgorithm
14028 to `normal'.
14029 * src/reader.c (parse_token_decl): Initialize token with tok_eof.
14030 * src/lex.h: Adjust prototype.
14031 (token_t): Add `tok_undef'.
14032 * src/lex.c (struct percent_table_struct): Retval is now a token_t.
14033 (parse_percent_token): Now returns token_t.
14034 Add default statement in switch.
14035 (lex): Separate `c' as an input variable, from the token_t result
14036 part.
14037 (unlexed): Is a token_t.
14038
14039 2001-09-10 Akim Demaille <akim@epita.fr>
14040
14041 * configure.in: Bump to 1.29a.
14042
14043 2001-09-07 Akim Demaille <akim@epita.fr>
14044
14045 Version 1.29.
14046
14047 2001-08-30 Akim Demaille <akim@epita.fr>
14048
14049 * tests/atgeneral.m4, tests/atconfig.in, tests/suite.at: Remove.
14050 * m4/atconfig.m4: Remove.
14051 * tests/testsuite.at, tests/atlocal.in, tests/output.at,
14052 * tests/bison: New.
14053 * tests/regression.at, tests/calc.at: Use m4_define, AT_BANNER,
14054 m4_if, m4_patsubst, and m4_regexp.
14055 * tests/calc.at (_AT_CHECK_CALC, _AT_CHECK_CALC_ERROR): Use an
14056 `input' file instead of echo.
14057
14058 2001-08-29 Akim Demaille <akim@epita.fr>
14059
14060 Bump to 1.28e.
14061
14062 2001-08-29 Akim Demaille <akim@epita.fr>
14063
14064 Version 1.28d.
14065
14066 2001-08-29 Paul Eggert <eggert@twinsun.com>
14067
14068 * src/bison.simple (yyparse): Don't take the address of an
14069 item before the start of an array, as that doesn't conform to
14070 the C Standard.
14071
14072 2001-08-29 Robert Anisko <anisko_r@epita.fr>
14073
14074 * doc/bison.texinfo (Location Tracking Calc): New node.
14075
14076 2001-08-29 Paul Eggert <eggert@twinsun.com>
14077
14078 * src/output.c (output): Do not define const, as this now
14079 causes more problems than it cures.
14080
14081 2001-08-29 Akim Demaille <akim@epita.fr>
14082
14083 * doc/bison.texinfo: Modernize `@node' and `@top' use: just name
14084 the nodes.
14085 Be sure to tag the `detailmenu'.
14086
14087 2001-08-29 Akim Demaille <akim@epita.fr>
14088
14089 * Makefile.maint (do-po-update): Wget refuses to overwrite files:
14090 download in a tmp dir.
14091
14092 2001-08-28 Marc Autret <autret_m@epita.fr>
14093
14094 * config/depcomp: New file.
14095
14096 2001-08-28 Marc Autret <autret_m@epita.fr>
14097
14098 * doc/bison.1 (mandoc): Adjust.
14099 From Juan Manuel Guerrero.
14100
14101 2001-08-28 Marc Autret <autret_m@epita.fr>
14102
14103 * src/print_graph.c (print_state): Fix.
14104
14105 2001-08-27 Marc Autret <autret_m@epita.fr>
14106
14107 * src/vcg.h (classname_s, infoname_s, node_s): Constify the
14108 char * members.
14109 Echo modifications to the functions prototypes.
14110 * src/vcg.c (add_classname, add_infoname): Adjust arguments.
14111
14112 2001-08-27 Marc Autret <autret_m@epita.fr>
14113
14114 * src/vcg.c: Include `xalloc.h'.
14115 (add_colorentry): New.
14116 (add_classname): New.
14117 (add_infoname): New.
14118 * src/vcg.h: Add new prototypes.
14119
14120 2001-08-27 Akim Demaille <akim@epita.fr>
14121
14122 * Makefile.maint: Sync. again with CVS Autoconf.
14123
14124 2001-08-27 Akim Demaille <akim@epita.fr>
14125
14126 * Makefile.maint: Formatting changes.
14127 (po-update, cvs-update, update): New targets.
14128 (AMTAR): Remove.
14129
14130 2001-08-27 Akim Demaille <akim@epita.fr>
14131
14132 * Makefile.am (AUTOMAKE_OPTIONS): 1.5.
14133 * Makefile.maint: Sync. with CVS Autoconf.
14134
14135 2001-08-27 Marc Autret <autret_m@epita.fr>
14136
14137 * src/vcg.h (struct infoname_s): New.
14138 (struct colorentry_s): New.
14139 (graph_s): New fields {vertical,horizontal}_order in structure.
14140 Add `infoname' field.
14141 Add `colorentry' field;
14142 * src/vcg_defaults.h (G_VERTICAL_ORDER): New.
14143 (G_HORIZONTAL_ORDER): New.
14144 (G_INFONAME): New.
14145 (G_COLORENTRY): New.
14146 * src/vcg.c (output_graph): Add output of {vertical,horizontal}_order.
14147 Add output of `infoname'.
14148 Add output of `colorentry'.
14149
14150 2001-08-27 Marc Autret <autret_m@epita.fr>
14151
14152 * src/reader.c (parse_dquoted_param): Rename variable `index' to `i'.
14153 This one shadowed a global parameter.
14154
14155 2001-08-24 Marc Autret <autret_m@epita.fr>
14156
14157 * src/print_graph.c (node_output_size): Declared POSIX `size_t' type,
14158 instead of `unsigned'.
14159 (print_state): Do not call obstack_object_size () in obstack_grow ()
14160 to avoid macro variables shadowing.
14161
14162 2001-08-23 Marc Autret <autret_m@epita.fr>
14163
14164 * src/lex.c (percent_table): Typo: s/naem/name/.
14165 Add graph option.
14166 Normalize new options declarations.
14167
14168 2001-08-20 Pascal Bart <pascal.bart@epita.fr>
14169
14170 * tests/suite.at: Exercise %header_extension and %source_extension.
14171
14172 2001-08-16 Marc Autret <autret_m@epita.fr>
14173
14174 * src/reader.c (parse_dquoted_param): New.
14175 (parse_header_extension_decl): Use it.
14176 (parse_source_extension_decl): Likewise.
14177
14178 2001-08-16 Marc Autret <autret_m@epita.fr>
14179
14180 * src/vcg.c: Remove includes of `complain.h' and `xalloc.h'.
14181 (get_xxxx_str): Use assert () instead of complain ().
14182 Remove return invokations in default cases.
14183 (get_decision_str): Modify default behaviour. Remove second argument.
14184 Echo modifications on calls.
14185 (output_graph): Fix.
14186
14187 2001-08-16 Marc Autret <autret_m@epita.fr>
14188
14189 * src/getargs.c (usage): Update with ``-g, --graph''.
14190
14191 2001-08-16 Marc Autret <autret_m@epita.fr>
14192
14193 * doc/bison.texinfo (Bison Options): Add items `-g', `--graph'.
14194 (Option Cross Key): Likewise.
14195 * doc/bison.1: Update.
14196
1c8c2190
PB
141972001-09-25 Pascal Bart <pascal.bart@epita.fr>
14198
14199 * src/output.c (output_master_parser): Don't finish action_obstack.
14200 (output_parser): Don't care about the muscle action, here.
14201 (prepare): Copy the action_obstack in the action muscle.
14202 (output): Free action_obstack.
14203
180d45ba
PB
142042001-09-23 Pascal Bart <pascal.bart@epita.fr>
14205
14206 * src/reader.c (parse_union_decl): Add new obstack union_obstack. Which
14207 will contain `%union' declaration.
14208 (parse_union_decl): Delete #line directive output.
14209 (parse_union_decl): Substitute /attrs_obstack/union_obstack for all
14210 informations about %union.
14211 (parse_union_decl): Copy the union_obstack in the muscle stype.
14212 * src/bison.simple: Add new #line directive.
14213 Add typdef %%stype YYSTYPE.
14214
c51d1a19
PB
142152001-09-23 Pascal Bart <pascal.bart@epita.fr>
14216
14217 * src/bison.simple: Add new `#line' directive.
14218
6f9344da
PB
142192001-09-22 Pascal Bart <pascal.bart@epita.fr>
14220
14221 * src/bison.simple: New `#line' directive.
14222 * src/output.c (output_parser): Support new dynamic muscle input_line.
14223
652def80
MA
142242001-09-22 Marc Autret <autret_m@epita.fr>
14225
14226 * src/output.c (output_master_parser): New.
14227 (output_parser): Be more re-entrant.
14228
25b222fa
MA
142292001-09-21 Marc Autret <autret_m@epita.fr>
14230
14231 * src/reader.c (copy_definition, parse_union_decl): Update and use
14232 `linef' muscle.
14233 (copy_action): Likewise.
14234 Use obstack_1grow ().
14235 * src/muscle_tab.c (muscle_init): Add muscle `linef'.
14236
6bc35ae5
MA
142372001-09-21 Marc Autret <autret_m@epita.fr>
14238
14239 * src/options.c (option_table): Adjust.
14240 * src/lex.c (parse_percent_token): Fix.
14241
c0629aa1
PB
142422001-09-20 Pascal Bart <pascal.bart@epita.fr>
14243
14244 * src/options.c (symtab.h): Include it, need by lex.h.
342b8b6e 14245
82b6d266
PB
142462001-09-20 Pascal Bart <pascal.bart@epita.fr>
14247
14248 * src/lex.c (parse_percent_token): Change type of variable `tx', which
14249 is now an option_table_struct*.
14250 (option_strcmp): New function option_strcmp.
14251 (parse_percent_token): Call option_strcmp.
14252 * src/getargs.c (xalloc.h, options.h): Include it.
14253 (getargs): Call create_long_option_table.
14254 (getargs): Free longopts at the end of the function.
14255 (shortopts): Move in options.c.
14256 * src/options.c (create_long_option_table): New function. Convert
14257 information from option_table to option structure.
14258 * src/reader.c (options.h): Include it.
14259
14260 * src/Makefile.am: Adjust.
14261 * src/options.c (option_table): Create from longopts and percent_table.
14262 * src/getargs.c (longopts): Delete.
14263 * src/lex.c (struct percent_table_struct): Delete.
14264 (percent_table): Delete.
14265 (options.h): Include it.
14266 * src/options.c: Create.
14267 * src/options.h: Create.
14268 Declare enum opt_access_e.
14269 Define struct option_table_struct.
14270
75f5aaea
MA
142712001-09-20 Marc Autret <autret_m@epita.fr>
14272
14273 * doc/bison.texinfo: Adjust terminologies about prologue and epilogue
14274 sections of Bison.
14275
f508cb0a
PB
142762001-09-19 Pascal Bart <pascal.bart@epita.fr>
14277
14278 * src/bison.simple: s/%%filename/%%skeleton.
14279 * src/muscle_tab.c (getargs.h): Include it.
14280 (muscle_init): Insert new muscle skeleton.
14281
13105fc1
PB
142822001-09-18 Pascal Bart <pascal.bart@epita.fr>
14283
14284 * src/output.c (output_parser): Delete unused variable actions_dumped.
14285
b0c4483e
PB
142862001-09-07 Pascal Bart <pascal.bart@epita.fr>
14287
14288 * src/output.c (output): Delete call to reader_output_yylsp.
14289 * src/reader.c (reader): Likewise.
ba0fe3c7 14290 * src/reader.h: Delete declaration of reader_output_yylsp.
342b8b6e 14291
11d82f03
MA
142922001-09-02 Marc Autret <autret_m@epita.fr>
14293
14294 * src/reader.c: Include muscle_tab.h.
14295 (parse_union_decl): Update.
14296 (parse_macro_decl): Rename parse_muscle_decl.
14297 Update to use renamed functions and variable.
14298 (read_declarations, copy_action, read_additionnal_code, : Updated
14299 with correct variables and functions names.
14300 (packsymbols, reader): Likewise.
342b8b6e 14301
11d82f03 14302 * src/reader.h (muscle_obstack): Extern declaration update.
342b8b6e 14303
11d82f03
MA
14304 * src/output.c: Include muscle_tab.h
14305 In all functions using macro_insert, change by using muscle_insert ().
14306 (macro_obstack): Rename muscle_obstack.
14307 Echo modifications in the whole file.
14308 (MACRO_INSERT_INT): Rename MUSCLE_INSERT_INT.
14309 (MACRO_INSERT_STRING): Rename MUSCLE_INSERT_STRING.
14310 (MACRO_INSERT_PREFIX): Rename MUSCLE_INSERT_PREFIX.
14311
14312 * src/muscle_tab.h: Update double inclusion macros.
14313 (macro_entry_s): Rename muscle_entry_s.
14314 Update prototypes.
342b8b6e 14315
11d82f03
MA
14316 * src/muscle_tab.c: Include muscle_tab.h.
14317 Rename macro_tabble to muscle_table.
14318 (mhash1, mhash2, mcmp): Use muscle_entry.
14319 (macro_init): Rename muscle_init. Update.
14320 (macro_insert): Rename muscle_insert. Update.
14321 (macro_find): Rename muscle_find. Update.
14322
14323 * src/main.c: Include muscle_tab.h.
14324 (main): Call muscle_init ().
14325 * src/Makefile.am (bison_SOURCES): Echo modifications.
14326
93a37297
MA
143272001-09-02 Marc Autret <autret_m@epita.fr>
14328
f753cd62 14329 Now the files macro_tab.[ch] are named muscle_tab.[ch].
342b8b6e 14330
f753cd62
MA
14331 * src/muscle_tab.c, src/muscle_tab.h: Add files.
14332
143332001-09-02 Marc Autret <autret_m@epita.fr>
14334
14335 * src/macrotab.c, src/macrotab.h: Remove.
93a37297 14336
682d48cd
PB
143372001-09-01 Pascal Bart <pascal.bart@epita.fr>
14338
342b8b6e 14339 * src/reader.c (copy_guard): Use muscle to specify the `#line'
682d48cd
PB
14340 filename.
14341
087c8fda
MA
143422001-09-01 Marc Autret <autret_m@epita.fr>
14343
14344 * tests/calc.at (exp): Now, YYERROR_VERBOSE need to be set
14345 to an explicit value to activate the feature. We do it here.
14346
dda680cb
PB
143472001-08-31 Pascal Bart <pascal.bart@epita.fr>
14348
14349 * src/output.c (prepare): Delete the `filename' muscule insertion.
14350 * src/reader.c (copy_action): Use `filename' muscule with `#line'.
14351 (parse_union_decl): Likewise.
14352 * src/macrotab.c (macro_init): Initialize filename by infile.
14353
9e644e64
MA
143542001-08-31 Marc Autret <autret_m@epita.fr>
14355
14356 * src/bison.simple (YYLSP_NEEDED): New definition.
14357 * src/output.c (prepare): Add macro insertion of `locations_flag'
14358
17da6427
PB
143592001-08-31 Pascal Bart <pascal.bart@epita.fr>
14360
14361 * src/output.c (prepare): Delete insertion of previous muscles,
14362 and insert the `prefix' muscles.
14363 * src/macrotab.c (macro_init): Likewise.
14364 (macro_init): Initialization prefix directive by `yy'.
342b8b6e 14365 * src/bison.simple: Substitute all %%yylex, %%yychar, %%yylval,
17da6427
PB
14366 %%yydebug, %%yyerror, %%yynerrs and %%yyparse by yylex, yychar,
14367 yylval, yydebug, yyerror, yynerrs and yyparse.
342b8b6e 14368 New directive `#define' to substitute yydebug, ... with option
17da6427
PB
14369 name_prefix.
14370
e8cb70b9
PB
143712001-08-31 Pascal Bart <pascal.bart@epita.fr>
14372
14373 * src/main.c (main): Standardize.
14374 * src/output.c (output_table_data, output_parser): Likewise.
14375 * src/macrotab.h, src/macrotab.c, src/bison.simple: Likewise.
14376
63c2d5de
MA
143772001-08-31 Pascal Bart <pascal.bart@epita.fr>, Marc Autret <autret_m@epita.fr>
14378
342b8b6e 14379 * src/reader.c (read_additionnal_code): Rename %%user_code to
63c2d5de
MA
14380 %%epilogue.
14381 * src/output.c (output): Rename %%declarations to %%prologue.
14382 * src/bison.simple: Echo modifications.
342b8b6e 14383
d8cb5183
MA
143842001-08-31 Marc Autret <autret_m@epita.fr>
14385
14386 * src/reader.c (readgram): CleanUp.
14387 (output_token_defines): Likewise.
14388 (packsymbols): Likewise.
14389 (reader): Likewise.
14390 * src/output.c (output): CPP-out useless code.
14391
6c686258
PB
143922001-08-31 Pascal Bart <pascal.bart@epita.fr>
14393
342b8b6e 14394 * src/reader.c (reader): Delete obsolete call to function
6c686258
PB
14395 output_trailers and output_headers.
14396 * src/output.h: Remove obsolete functions prototypes of output_headers
14397 and output_trailers.
14398
8f451ef7
PB
143992001-08-30 Pascal Bart <pascal.bart@epita.fr>
14400
14401 * src/main.c: Include macrotab.h.
342b8b6e 14402 * src/macrotab.h (macro_entry_s): Constify fields.
8f451ef7
PB
14403 Adjust functions prototypes.
14404 * src/macrotab.c (macro_insert): Constify key and value.
14405 (macro_find): Constify key.
14406 (macro_insert): Include 'xalloc.h'
14407 (macro_insert): Use XMALLOC.
14408 (macro_find): Constify return value.
14409 * src/output.c (output_table_data): Rename table to table_data.
14410 (output_parser): Constify macro_key, macro_value.
14411
997b6fd0 144122001-08-30 Marc Autret <autret_m@epita.fr>
2ba3b73c
MA
14413
14414 * src/reader.c (parse_skel_decl): New.
342b8b6e 14415 (read_declarations): Add case `tok_skel', call parse_skel_decl ().
2ba3b73c
MA
14416 * src/lex.h (token_t): New token `tok_skel'.
14417 * src/lex.c (percent_table): Add skeleton option entry.
14418 Standardize.
14419
ff48177d
MA
144202001-08-29 Marc Autret <autret_m@epita.fr>
14421
14422 * src/bison.simple: Add %%user_code directive at the end.
14423 * src/reader.c (read_additionnal_code): New.
14424 (reader): Use it.
14425 * src/output.c (output_program): Remove.
14426 (output): Update.
14427
b33160bf
MA
144282001-08-28 Marc Autret <autret_m@epita.fr>
14429
14430 * src/output.c (output_actions): Clean up.
4e5caae2 14431 (output_gram): CPP-out useless code.
b33160bf
MA
14432 * src/reader.c (reader): Clean up, CPP-out useless code.
14433
d1a2daf7
PB
144342001-08-28 Pascal Bart <pascal.bart@epita.fr>
14435
342b8b6e 14436 * src/output.c (output): Copy attrs_obstack in the '%%definitions'
535c0e75 14437 directive.
d1a2daf7
PB
14438 * src/bison.simple: Add `%%definitions'.
14439
2b763dfe
MA
144402001-08-28 Marc Autret <autret_m@epita.fr>
14441
14442 * config/depcomp: New file.
14443
f1a87ef6
PE
144442001-08-27 Paul Eggert <eggert@twinsun.com>
14445
14446 * src/bison.simple (yyparse): Don't take the address of an
14447 item before the start of an array, as that doesn't conform to
14448 the C Standard.
14449
82e236e2
RA
144502001-08-27 Robert Anisko <robert.anisko@epita.fr>
14451
f1a87ef6 14452 * src/output.c (output): Remove the initialization of the macro
82e236e2
RA
14453 obstack. It was done too late here.
14454
14455 * src/reader.c (parse_macro_decl): Fix. Use of the macro obstack was
14456 completely wrong.
14457 (reader): Initialize the macro obstack here, since we need it to grow
14458 '%define' directives.
14459
14460 * src/reader.h: Declare the macro obstack as extern.
14461
b0cfa28a
RA
144622001-08-27 Robert Anisko <robert.anisko@epita.fr>
14463
14464 * src/output.c (output_parser): Fix. Store single '%' characters in
14465 the output obstack instead of throwing them away.
14466
6fc74234
AD
144672001-08-27 Akim Demaille <akim@epita.fr>
14468
14469 * Makefile.am (AUTOMAKE_OPTIONS): 1.5.
14470
9c76d118
RA
144712001-08-25 Robert Anisko <robert.anisko@epita.fr>
14472
14473 * lib/Makefile.am: Adjust.
14474
a8289c62
RA
144752001-08-25 Robert Anisko <robert.anisko@epita.fr>
14476
14477 * src/bison.simple: Update and add '%%' directives.
14478
b6610515
RA
144792001-08-25 Robert Anisko <robert.anisko@epita.fr>
14480
14481 * src/reader.c (reader): Remove calls to 'output_headers' and
14482 'output_trailers'. Remove some C output.
14483 (readgram): Disable a piece of code that was writing a default
14484 definition for 'YYSTYPE'.
14485 (reader_output_yylsp): Remove.
14486 (packsymbols): Output token defintions to a macro.
14487 (copy_definition): Disable C output.
6fc74234 14488
b6610515
RA
14489 * src/reader.c (parse_macro_decl): New function used to parse macro
14490 declarations.
14491 (copy_string2): Put the body of copy_string into this new function.
14492 Add a parameter to let the caller choose whether he wants to copy the
14493 string delimiters or not.
14494 (copy_string): Be a simple call to copy_string2 with the last argument
14495 bound to true.
14496 (read_declarations): Add case for macro definition.
14497 (copy_identifier): New.
6fc74234 14498 (parse_macro_decl): Read macro identifiers using copy_identifier
b6610515
RA
14499 rather than lex.
14500
26f609ff
RA
145012001-08-25 Robert Anisko <robert.anisko@epita.fr>
14502
14503 * src/output.c (prepare): Add prefixed names.
14504 (output_parser): Output semantic actions.
14505 (output_parser): Fix bug on '%%line' directives.
6fc74234 14506
26f609ff
RA
14507 * src/output.c (output_headers): Remove. The C code printed by this
14508 function should now be in the skeletons.
14509 (output_trailers): Remove.
14510 (output): Disable call to 'reader_output_yylsp'.
14511 (output_rule_data): Do not output tables to the table obstack.
14512
14513 * src/output.c: Remove some C dedicated output.
14514 Improve the use of macro and output obstacks.
14515 (output_defines): Remove.
6fc74234 14516
26f609ff
RA
14517 * src/output.c (output_token_translations): Associate 'translate'
14518 table with a macro. No output to the table obstack.
14519 (output_gram): Same for 'rhs' and 'prhs'.
14520 (output_stos): Same for 'stos'.
14521 (output_rule_data): Same for 'r1' and 'r2'.
14522 (token_actions): Same for 'defact'.
14523 (goto_actions): Same for 'defgoto'.
14524 (output_base): Same for 'pact' and 'pgoto'.
14525 (output_table): Same for 'table'.
14526 (output_check): Same for 'check'.
6fc74234 14527
26f609ff
RA
14528 * src/output.c (output_table_data): New function.
14529 (output_short_table): Remove.
14530 (output_short_or_char_table): Remove.
6fc74234 14531
26f609ff
RA
14532 * src/output.c (output_parser): Replace most of the skeleton copy code
14533 with something new. Skeletons are now processed character by character
14534 rather than line by line, and Bison looks for '%%' macros. This is the
14535 first step in making Bison's output process (a lot) more flexible.
14536 (output_parser): Use the macro table.
14537
6f43b113
RA
145382001-08-25 Robert Anisko <robert.anisko@epita.fr>
14539
14540 * src/main.c (main): Initialize the macro table.
14541
dd3127cf
RA
145422001-08-25 Robert Anisko <robert.anisko@epita.fr>
14543
14544 * src/lex.c (percent_table): Add tok_define.
14545 * src/lex.h: Add tok_define.
14546
aa321494
RA
145472001-08-25 Robert Anisko <robert.anisko@epita.fr>
14548
14549 * src/macrotab.c: New file.
14550 * src/macrotab.h: New file.
14551 * src/Makefile.am: Update.
14552
68bd3b6b
RA
145532001-08-25 Robert Anisko <robert.anisko@epita.fr>
14554
14555 * lib/hash.c: New file.
14556 * lib/hash.h: New file.
14557 * lib/Makefile.am: Update.
14558
45f8dd1e
AD
145592001-08-15 Akim Demaille <akim@epita.fr>
14560
14561 Version 1.28c.
14562
40a64a7a 145632001-08-15 Marc Autret <autret_m@epita.fr>
0b8afb77
AD
14564
14565 * src/reader.c (readgram): Indent output macro YYSTYPE.
14566 (packsymbols): Likewise.
14567 (output_token_defines): Likewise.
14568 * src/files.c: Standardize.
14569 (compute_header_macro): New.
14570 (defines_obstack_save): New. Use compute_header_macro.
14571 (output_files): Update. Use defines_obstack_save.
14572
f9a8293a
AD
145732001-08-15 Akim Demaille <akim@epita.fr>
14574
14575 * doc/bison.texinfo (Table of Symbols): Document
14576 YYSTACK_USE_ALLOCA.
14577
150ca7a7
AD
145782001-08-15 Akim Demaille <akim@epita.fr>
14579
14580 * missing: Update from CVS Automake.
14581 * config/config.guess, config/config.sub, config/texinfo.tex:
14582 Update from gnu.org.
14583
69b5cec4
AD
145842001-08-15 Akim Demaille <akim@epita.fr>
14585
14586 * Makefile.maint: Sync with CVS Autoconf.
14587
f2b5126e
PB
145882001-08-14 Pascal Bart <pascal.bart@epita.fr>
14589
69b5cec4 14590 * doc/bison.texinfo: Include GNU Free Documentation License from
f2b5126e
PB
14591 `fdl.texi'.
14592 * doc/fdl.texi: Add to package.
14593
4ecbf796
MA
145942001-08-14 Marc Autret <autret_m@epita.fr>
14595
14596 Turn on %{source,header}_extension features.
14597
69b5cec4 14598 * src/lex.c (percent_table): Un-CPP out header_extension and
4ecbf796
MA
14599 source_extension.
14600 * src/files.c (compute_exts_from_gf): Compare pointers with NULL.
69b5cec4 14601 (compute_exts_from_src): Remove conditions. It restores priorities
4ecbf796
MA
14602 between options.
14603
95fb5662
MA
146042001-08-14 Marc Autret <autret_m@epita.fr>
14605
14606 * src/files.c (compute_base_names): Add extensions computing when
14607 `--file-prefix' used.
14608 Standardize function calls.
14609
78d09da9
MA
146102001-08-13 Marc Autret <autret_m@epita.fr>
14611
69b5cec4 14612 * src/bison.simple (YYSTACK_USE_ALLOCA): Changed to allow users
78d09da9
MA
14613 defining it (defined but null disables alloca).
14614
5a009f2c
MA
146152001-08-13 Marc Autret <autret_m@epita.fr>
14616
14617 * src/bison.simple (_yy_memcpy): CPP reformat.
14618
1e41465a
PB
146192001-08-13 Pascal Bart <pascal.bart@epita.fr>
14620
14621 * tests/atconfig.in (CPPFLAGS): Fix.
14622
c67a198d
PB
146232001-08-10 Pascal Bart <pascal.bart@epita.fr>
14624
79282c6c 14625 * doc/bison.texinfo: Include GNU General Public License from
c67a198d
PB
14626 `gpl.texi'.
14627 * doc/gpl.texi: Add to package.
14628
09a6de7e
MA
146292001-08-10 Marc Autret <autret_m@epita.fr>
14630
14631 * src/print_graph.h: Fix.
14632 * src/reader.c (read_declarations): Use parse_header_extension_decl ().
14633
b77b9ee0
AD
146342001-08-10 Akim Demaille <akim@epita.fr>
14635
14636 * src/system.h: Provide default declarations for stpcpy, strndup,
14637 and strnlen.
14638
3e259915
MA
146392001-08-10 Robert Anisko <anisko_r@epita.fr>
14640
14641 * doc/bison.texinfo (Locations): Update @$ stuff.
14642
ca96bc2d
MA
146432001-08-09 Robert Anisko <anisko_r@epita.fr>
14644
14645 * src/bison.simple (YYLLOC_DEFAULT): Update.
14646 (yyparse): Adjust.
14647
fdc6758b
MA
146482001-08-08 Marc Autret <autret_m@epita.fr>
14649
b77b9ee0 14650 * doc/bison.texinfo: Change @samp{$<@dots{}>} to
fdc6758b
MA
14651 @samp{$<@dots{}>@var{n}} in Section Actions in Mid-Rule.
14652 Reported by Fabrice Bauzac.
957d4dbf 14653
600cad3b
MA
146542001-08-08 Marc Autret <autret_m@epita.fr>
14655
14656 * src/vcg_default.h: Use NULL instead of 0 to initialize pointers.
14657 * src/vcg.c (output_node): Fix.
14658 * src/vcg.h: Cleanup.
14659 * src/print_graph.c: Add comments.
b77b9ee0 14660 (node_output_size): New global variable. Simplify the formatting of
600cad3b 14661 the VCG graph output.
b77b9ee0 14662 (print_actions): Unused code is now used. It notifies the final state
600cad3b 14663 and no action states in the VCG graph. It also give the reduce actions.
b77b9ee0 14664 The `shift and goto' edges are red and the `go to state' edges are
600cad3b
MA
14665 blue.
14666 Get the current node name and node_obstack by argument.
14667 (node_obstack): New variable.
14668 (print_state): Manage node_obstack.
14669 (print_core): Use node_obstack given by argument.
14670 A node is not only computed here but in print_actions also.
14671 (print_graph): CPP out useless code instead of commenting it.
14672
976e528f
AD
146732001-08-07 Pascal Bart <pascal.bart@epita.fr>
14674
14675 * tests/atconfig.in (CPPFLAGS): Fix.
14676
20e8e5ca
AD
146772001-08-07 Akim Demaille <akim@epita.fr>
14678
14679 * src/print_graph.c (quote): New.
14680 (print_core): Use it.
14681
957d4dbf 146822001-08-06 Akim Demaille <akim@epita.fr>, Marc Autret <autret_m@epita.fr>
3e3da797 14683
3e3da797
AD
14684 * src/vcg.c (complain.h): Include it.
14685 Unepitaize `return' invocations.
c4b66126 14686 [NDEBUG] (main): Remove.
79282c6c 14687 * src/vcg.h (node_t, edge_t, graph_t): Constify the char * members.
c4b66126
AD
14688 * src/files.c (open_files): Initialize graph_obstack.
14689 * src/print_graph.c (print_actions): CPP out useless code.
14690 (print_core): Don't output the last `\n' in labels.
14691 Use `quote'.
14692 * src/files.c (output_files): Output the VCG file.
14693 * src/main.c (main): Invoke print_graph ();
3e3da797 14694
957d4dbf 146952001-08-06 Marc Autret <autret_m@epita.fr>
22c2cbc0
AD
14696
14697 Automaton VCG graph output.
14698 Using option ``-g'' or long option ``--graph'', you can generate
14699 a gram_filename.vcg file containing a VCG description of the LALR (1)
14700 automaton of your grammar.
14701
14702 * src/main.c: Call to print_graph() function.
14703 * src/getargs.h: Update.
14704 * src/getargs.c (options): Update to catch `-g' and `--graph' options.
14705 (graph_flag): New flag.
14706 (longopts): Update.
14707 (getargs): Add case `g'.
14708 * src/files.c (graph_obstack): New obstack struct.
14709 (open_files): Initialize new obstack.
14710 (output_files): Saves graph_obstack if required.
14711 * src/files.h (graph_obstack): New extern declaration.
14712 * src/Makefile.am: Add new source files.
14713
927c1557 147142001-08-06 Marc Autret <autret_m@epita.fr>
ce4d5ce0
AD
14715
14716 * src/print_graph.c, src/print_graph.h (graph): New.
14717 * src/vcg.h: New file.
14718 * src/vcg.c: New file, VCG graph handling.
14719
7333d403
AD
147202001-08-06 Marc Autret <autret_m@epita.fr>
14721
14722 Add of %source_extension and %header_extension which specify
14723 the source or/and the header output file extension.
14724
14725 * src/files.c (compute_base_names): Remove initialisation of
14726 src_extension and header_extension.
14727 (compute_exts_from_gf): Update.
14728 (compute_exts_from_src): Update.
14729 (output_files): Update.
14730 * src/reader.c (parse_header_extension_decl): New.
14731 (parse_source_extension_decl): New.
14732 (read_declarations): New case statements for the new tokens.
14733 * src/lex.c (percent_table): Add entries for %source_extension
14734 and %header_extension.
14735 * src/lex.h (token_e): New tokens tok_hdrext and tok_srcext.
14736
84163231
AD
147372001-08-06 Marc Autret <autret_m@epita.fr>
14738
14739 * configure.in: Bump to 1.28c.
14740 * doc/bison.texinfo: Texinfo thingies.
14741
8303fc42
AD
147422001-08-04 Pascal Bart <pascal.bart@epita.fr>
14743
14744 * tests/atconfig.in (CPPFLAGS): Add.
14745 * tests/calc.at (AT_CHECK): Use CPPFLAGS.
14746
70a84437
AD
147472001-08-03 Akim Demaille <akim@epita.fr>
14748
14749 Version 1.28b.
14750
2ce10144
AD
147512001-08-03 Akim Demaille <akim@epita.fr>
14752
14753 * tests/Makefile.am (check-local): Ship testsuite.
14754 * tests/calc.at (_AT_DATA_CALC_Y): Prototype all the functions.
14755 Include `string.h'.
14756
1e3e4bc1
AD
147572001-08-03 Akim Demaille <akim@epita.fr>
14758
14759 * configure.in: Try using -Wformat when compiling.
14760
42b45b7f
AD
147612001-08-03 Akim Demaille <akim@epita.fr>
14762
14763 * configure.in: Bump to 1.28b.
14764
8f13fe33
AD
147652001-08-03 Akim Demaille <akim@epita.fr>
14766
14767 * src/complain.c: Adjust strerror_r portability issues.
14768
b37ba92c
AD
147692001-08-03 Akim Demaille <akim@epita.fr>
14770
14771 Version 1.28a.
14772
b0ce6046
AD
147732001-08-03 Akim Demaille <akim@epita.fr>
14774
14775 * src/getargs.c, src/getarg.h (skeleton)): Constify.
14776 * src/lex.c (literalchar): Avoid name clashes on `buf'.
14777 * src/getargs.c: Include complain.h.
14778 * src/files.c, src/files.h (skeleton_find): Avoid name clashes.
14779 * lib/quotearg.c, lib/quotearg.h: Update from fileutils 4.1.
14780
d01c415b
AD
147812001-08-03 Akim Demaille <akim@epita.fr>
14782
14783 * src/reader.c (readgram): Display hidden chars in error messages.
14784
459dd1a6
AD
147852001-08-03 Akim Demaille <akim@epita.fr>
14786
14787 Update to gettext 0.10.39.
14788
53b74c0c
AD
147892001-08-03 Akim Demaille <akim@epita.fr>
14790
14791 * lib/strspn.c: New.
14792
234a3be3
AD
147932001-08-01 Marc Autret <autret_m@epita.fr>
14794
14795 * doc/bison.texinfo: Update.
14796 * doc/bison.1 (mandoc): Update.
14797 * src/system.h (EXT_GUARD_C, EXT_STYPE_H): Remove .c and .h.
14798 * src/files.c: Support output files extensions computing.
14799 (src_extension): New static variable.
14800 (header_extension): New static variable.
14801 (tr): New function.
14802 (get_extension_index): New function, gets the index of an extension
14803 filename in a string.
14804 (compute_exts_from_gf): New function, computes extensions from the
14805 grammar file extension.
14806 (compute_exts_from_src): New functions, computes extensions from the
14807 C source file extension, file given by ``-o'' option.
14808 (compute_base_names): Update.
14809 (output_files): Update.
14810
847bf1f5
AD
148112001-08-01 Robert Anisko <anisko_r@epita.fr>
14812
d995fee7 14813 * doc/bison.texi: Document @$.
847bf1f5
AD
14814 (Locations): New section.
14815
d074a105
AD
148162001-07-18 Akim Demaille <akim@epita.fr>
14817
14818 * Makefile.maint, GNUmakefile: New, from Autoconf 2.52.
14819 * config/prev-version.txt, config/move-if-change: New.
14820 * Makefile.am: Adjust.
14821
3419715d
AD
148222001-07-08 Pascal Bart <pascal.bart@epita.fr>
14823
14824 * src/bison.simple (yyparse): Suppress warning `comparaison
14825 between signed and unsigned'.
14826
62ab6972
AD
148272001-07-05 Pascal Bart <pascal.bart@epita.fr>
14828
14829 * src/getargs.h (raw_flag): Remove.
14830 * src/getargs.c: Die on `-r'/`--raw'.
14831 * src/lex.c (parse_percent_token): Die on `%raw'.
14832 * src/reader.c (output_token_defines): Suppress call to `raw_flag'.
14833 * tests/calc.at: Suppress test with option `--raw'.
14834
1e24cc5b
AD
148352001-07-14 Akim Demaille <akim@epita.fr>
14836
14837 * config/: New.
14838 * configure.in: Require Autoconf 2.50.
14839 Update to gettext 0.10.38.
14840
32dfccf8
AD
148412001-03-16 Akim Demaille <akim@epita.fr>
14842
14843 * doc/bison.texinfo: ANSIfy the examples.
14844
cd5bd6ac
AD
148452001-03-16 Akim Demaille <akim@epita.fr>
14846
14847 * getargs.c (skeleton): New variable.
14848 (longopts): --skeleton is a new option.
14849 (shortopts, getargs): -S is a new option.
14850 * getargs.h: Declare skeleton.
14851 * output.c (output_parser): Use it.
14852
5141b016
AD
148532001-03-16 Akim Demaille <akim@epita.fr>
14854
14855 * m4/strerror_r.m4: New.
14856 * m4/error.m4: Run AC_FUNC_STRERROR_R.
14857 * lib/error.h, lib/error.c: Update.
14858
447992b9
AD
148592001-03-16 Akim Demaille <akim@epita.fr>
14860
14861 * src/getargs.c (longopts): Clean up.
14862
274d42ce
AD
148632001-02-21 Akim Demaille <akim@epita.fr>
14864
14865 * src/reader.c (gensym): `gensym_count' is your own.
14866 Use a static buf to create the symbol name, as token_buffer is no
14867 longer a buffer.
14868
22c821f3
AD
148692001-02-08 Akim Demaille <akim@epita.fr>
14870
14871 * src/conflicts.c (conflict_report): Be sure not to append to res
14872 between two calls, which could happen if both first sprintf were
14873 skipped, but not the first cp += strlen.
14874
18569462
AD
148752001-02-08 Akim Demaille <akim@epita.fr>
14876
14877 * lib/memchr.c, lib/stpcpy.c, lib/strndup.c, lib/strnlen.c:
14878 New, from fileutils 4.0.37.
14879 * configure.in: Require Autoconf 2.49c. I took some time before
14880 making this decision. This is the only way out for portability
14881 issues in Bison, it would mean way too much duplicate effort to
14882 import in Bison features implemented in 2.49c since 2.13.
14883 AC_REPLACE_FUNCS and AC_CHECK_DECLS the functions above.
14884
0d8f3c8a
AD
148852001-02-02 Akim Demaille <akim@epita.fr>
14886
14887 * lib/malloc.c, lib/realloc.c: New, from the fileutils 4.0.37.
66075dcf 14888 * lib/xalloc.h, lib/xmalloc.c: Update.
0d8f3c8a 14889
f17bcd1f
AD
148902001-01-19 Akim Demaille <akim@epita.fr>
14891
14892 Get rid of the ad hoc handling of token_buffer in the scanner: use
14893 the obstacks.
14894
14895 * src/lex.c (token_obstack): New.
14896 (init_lex): Initialize it. No longer call...
14897 (grow_token_buffer): this. Remove it.
14898 Adjust all the places which used it to use the obstack.
14899
511e79b3
AD
149002001-01-19 Akim Demaille <akim@epita.fr>
14901
14902 * src/lex.h: Rename all the tokens:
14903 s/\bENDFILE\b/tok_eof/g;
14904 s/\bIDENTIFIER\b/tok_identifier/g;
14905 etc.
14906 Let them be enums, not #define, to ease debugging.
14907 Adjust all the code.
14908
0d6508ef
AD
149092001-01-18 Akim Demaille <akim@epita.fr>
14910
14911 * src/lex.h (MAXTOKEN, maxtoken, grow_token_buffer): Remove, private.
14912 * src/lex.c (maxtoken, grow_token_buffer): Static.
14913
6deb4447
AD
149142001-01-18 Akim Demaille <akim@epita.fr>
14915
14916 Since we now use obstacks, more % directives can be enabled.
14917
14918 * src/lex.c (percent_table): Also accept `%yacc',
14919 `%fixed_output_files', `%defines', `%no_parser', `%verbose', and
14920 `%debug'.
14921 Handle the actions for `%semantic_parser' and `%pure_parser' here,
14922 instead of returning a token.
14923 * src/lex.h (SEMANTIC_PARSER, PURE_PARSER): Remove, unused.
14924 * src/reader.c (read_declarations): Adjust.
14925 * src/files.c (open_files): Don't call `compute_base_names', don't
14926 compute `attrsfile' since they depend upon data which might be
14927 *in* the input file now.
14928 (output_files): Do it here.
14929 * src/output.c (output_headers): Document the fact that this patch
14930 introduces a guaranteed SEGV for semantic parsers.
14931 * doc/bison.texinfo: Document them.
14932 * tests/suite.at: Exercise these %options.
14933
ff4423cc
AD
149342000-12-20 Akim Demaille <akim@epita.fr>
14935
14936 Also handle the output file (--verbose) with obstacks.
14937
14938 * files.c (foutput): Remove.
14939 (output_obstack): New.
14940 Adjust all dependencies.
14941 * src/conflicts.c: Return a string.
14942 * src/system.h (obstack_grow_string): Rename as...
14943 (obstack_sgrow): this. Be ready to work with non literals.
14944 (obstack_fgrow4): New.
14945
956dba3a
AD
149462000-12-20 Akim Demaille <akim@epita.fr>
14947
14948 * src/files.c (open_files): Fix the computation of short_base_name
14949 in the case of `-o foo.tab.c'.
14950
337bab46
AD
149512000-12-20 Akim Demaille <akim@epita.fr>
14952
14953 * src/reader.c (copy_string, copy_comment, copy_comment2, copy_at)
14954 (copy_dollar): Now that everything uses obstacks, get rid of the
14955 FILE * parameters.
14956
5d3214b8
AD
149572000-12-20 Akim Demaille <akim@epita.fr>
14958
14959 * src/files.c (open_files): Actually the `.output' file is based
14960 on the short_base_name, not base_name.
14961 * tests/suite.at (Checking output file names): Adjust.
14962
29092a57
AD
149632000-12-20 Akim Demaille <akim@epita.fr>
14964
14965 * src/bison.s1: Remove, we now use directly...
14966 * src/bison.simple: this.
14967 * src/Makefile.am: Use pkgdata instead of data.
14968
ea5607fd
AD
149692000-12-20 Akim Demaille <akim@epita.fr>
14970
14971 * src/files.c (guard_obstack): New.
14972 (open_files): Initialize it.
14973 (output_files): Dump it...
14974 * src/files.h: Export it.
14975 * src/reader.c (copy_guard): Use it.
14976
27110317
AD
149772000-12-19 Akim Demaille <akim@epita.fr>
14978
14979 * src/files.c (outfile, defsfile, actfile): Removed as global
14980 vars.
14981 (open_files): Don't compute them.
14982 (output_files): Adjust.
14983 (base_name, short_base_name): Be global.
14984 Adjust dependencies.
14985
19c50364
AD
149862000-12-19 Akim Demaille <akim@epita.fr>
14987
14988 * src/files.c (strsuffix): New.
14989 (stringappend): Be just like strcat but allocate.
14990 (base_names): Eve out from open_files.
14991 Try to simplify the rather hairy computation of base_name and
14992 short_base_name.
14993 (open_files): Use it.
14994 * tests/suite.at (Checking output file names): New test.
14995
573c1d9f
AD
149962000-12-19 Akim Demaille <akim@epita.fr>
14997
14998 * src/system.h (obstack_grow_literal_string): Rename as...
14999 (obstack_grow_string): this.
15000 * src/output.c (output_parser): Recognize `%% actions' instead of
15001 `$'.
15002 * src/bison.s1: s/$/%% actions/.
15003 * src/bison.hairy: Likewise.
15004
ef7ddedd
AD
150052000-12-19 Akim Demaille <akim@epita.fr>
15006
15007 * src/output.c (output_parser): Compute the `#line' lines when
15008 there are.
15009 * src/Makefile.am (bison.simple): Be a simple copy of bison.s1.
15010 Suggested by Hans Aberg.
15011
ff61dabd
AD
150122000-12-19 Akim Demaille <akim@epita.fr>
15013
15014 Let the handling of the skeleton files be local to the procedures
15015 that use it.
15016
15017 * src/files.c (xfopen, xfclose, skeleton_find, guardfile): No
15018 longer static.
15019 (fparser, open_extra_files): Remove.
15020 (open_files, output_files): Don't take care of fparser.
15021 * src/files.h: Adjust.
15022 * src/output.c (output_parser): Open and close the file to the
15023 skeleton.
15024 * src/reader.c (read_declarations): When %semantic_parser, open
15025 fguard.
15026
55b96341
AD
150272000-12-19 Akim Demaille <akim@epita.fr>
15028
15029 * src/file.h (BISON_SIMPLE, BISON_HAIRY): Move from here...
15030 * src/system.h (BISON_SIMPLE, BISON_HAIRY): ... to here.
15031
358c15b7
AD
150322000-12-19 Akim Demaille <akim@epita.fr>
15033
15034 * src/files.c (open_files): Yipee! We no longer need all the code
15035 looking for `/tmp' since we have no tmp file.
15036
7de3329e
AD
150372000-12-19 Akim Demaille <akim@epita.fr>
15038
15039 * src/system.h (EXT_TAB, EXT_OUTPUT, EXT_STYPE_H, EXT_GUARD_C):
15040 New macros.
15041 * src/files.c (open_files): Less dependency on MSDOS etc.
15042
3abcd459
AD
150432000-12-14 Akim Demaille <akim@epita.fr>
15044
15045 * src/bison.s1 (YYLLOC_DEFAULT): New macro.
15046 Provide a default definition.
15047 Use it when executing the default @ action.
15048 * src/reader.c (reader_output_yylsp): No longer include
15049 `timestamp' and `text' in the default YYLTYPE.
15050
2a91a95e
AD
150512000-12-12 Akim Demaille <akim@epita.fr>
15052
15053 * src/reader.c (copy_definition, parse_union_decl, copy_action)
15054 (copy_guard): Quote the file names.
15055 Reported by Laurent Mascherpa.
15056
14d3eb9b
AD
150572000-12-12 Akim Demaille <akim@epita.fr>
15058
15059 * src/output.c (output_headers, output_program, output): Be sure
15060 to escape special characters when outputting filenames.
15061 (ACTSTR_PROLOGUE, ACTSTR_EPILOGUE): Remove.
15062 (output_headers): Don't depend on them, Use ACTSTR.
15063
d7045ec6
AD
150642000-11-17 Akim Demaille <akim@epita.fr>
15065
15066 * lib/obstack.h: Formatting changes.
15067 (obstack_grow, obstack_grow0): Don't cast WHERE at all: it
15068 prevents type checking.
15069 (obstack_ptr_grow, obstack_ptr_grow_fast): When assigning, don't
15070 cast the value to (void *): assigning a `foo *' to a `void *'
15071 variable is valid.
15072 (obstack_int_grow, obstack_int_grow_fast): Don't cast AINT to int.
15073 * src/reader.c (parse_union_decl): Typo: use obstack_1grow to
15074 append characters.
15075
6fd54b73
AD
150762000-11-17 Akim Demaille <akim@epita.fr>
15077
15078 * tests/Makefile.am (suite.m4, regression.m4, calc.m4): Rename
15079 as...
15080 (suite.m4, regression.m4, calc.m4): these.
15081 * tests/atgeneral.m4: Update from CVS Autoconf.
15082
4c50eae6
AD
150832000-11-17 Akim Demaille <akim@epita.fr>
15084
15085 * tests/regression.m4 (%union and --defines): New test,
15086 demonstrating a current bug in the obstack implementation.
15087
a35f64ea
AD
150882000-11-17 Akim Demaille <akim@epita.fr>
15089
15090 * src/bison.s1 (_YY_DECL_VARIABLES, YY_DECL_VARIABLES): New
15091 macros.
15092 Use them to declare the variables which are global or local to
15093 `yyparse'.
15094
7de23534
AD
150952000-11-17 Akim Demaille <akim@epita.fr>
15096
15097 * acconfig.h: Remove, no longer used.
15098
aa7815f5
AD
150992000-11-07 Akim Demaille <akim@epita.fr>
15100
15101 * src: s/Copyright (C)/Copyright/g.
15102
5af1f549
AD
151032000-11-07 Akim Demaille <akim@epita.fr>
15104
15105 * src/reader.c (reader): #define YYLSP_NEEDED to 1 instead of just
15106 defining.
15107 * src/bison.s1: s/#ifdef YYLSP_NEEDED/#if YYLSP_NEEDED/.
15108
553e2b22
AD
151092000-11-07 Akim Demaille <akim@epita.fr>
15110
15111 * src/bison.s1 (YYLEX): Use #if instead of #ifdef.
15112 Merge in a single CPP if/else.
15113
8a4f41d6
AD
151142000-11-07 Akim Demaille <akim@epita.fr>
15115
15116 * src/output.c (output): Remove useless variables.
15117 * lib/obstack.c (obstack_grow, obstack_grow0): Rename the second
15118 argument `data' for consistency with the prototypes.
15119 Qualify it `const'.
15120 (obstack_copy, obstack_copy0): Rename the second argument as
15121 `address' for consistency. Qualify it `const'.
15122 * lib/obstack.h (obstack_copy, obstack_copy0, obstack_grow)
15123 (obstack_grow0, obstack_ptr_grow, obstack_ptr_grow_fast): Qualify
15124 `const' their input argument (`data' or `address').
15125 Adjust the corresponding macros to include `const' in casts.
15126
095a3fb5
AD
151272000-11-03 Akim Demaille <akim@epita.fr>
15128
15129 * src/Makefile.am (INCLUDES): s/PFILE/BISON_SIMPLE/.
15130 s/PFILE1/BISON_HAIRY/.
15131 Adjust dependencies.
15132
d1cdce7c
AD
151332000-11-03 Akim Demaille <akim@epita.fr>
15134
090c5ebf 15135 For some reason, this was not applied.
d1cdce7c
AD
15136
15137 * src/files.c [VMS]: No longer include `ssdef.h', no longer define
15138 `unlink': it's no longer used.
15139
9311529b
AD
151402000-11-03 Akim Demaille <akim@epita.fr>
15141
15142 * src/files.c (skeleton_find): New function, eved out of...
15143 (open_files, open_extra_files): here.
15144
d8880f69
AD
151452000-11-03 Akim Demaille <akim@epita.fr>
15146
15147 Don't use `atexit'.
15148
15149 * src/files.c (obstack_save): New function.
15150 (done): Rename as...
15151 (output_files): this.
15152 Use `obstack_save'.
15153 * src/main.c (main): Don't use `atexit' to register `done', since
15154 it no longer has to remove tmp files, just call `output_files'
15155 when there are no errors.
15156
0dbb648e
AD
151572000-11-02 Akim Demaille <akim@epita.fr>
15158
15159 * src/files.c [VMS]: No longer include `ssdef.h', no longer define
15160 `unlink': it's no longer used.
15161 * src/files.h: Formatting changes.
15162
896fe5c1
AD
151632000-11-02 Akim Demaille <akim@epita.fr>
15164
15165 Remove the last uses of mktemp and unlink/delete.
15166
15167 * src/files.c (fdefines, ftable): Removed.
15168 (defines_ostack, table_obstack): New.
15169 Adjust dependencies of the former into uses of the latter.
15170 * src/output.c (output_short_or_char_table, output_short_table):
15171 Convert to using obstacks.
15172 * src/reader.c (copy_comment2): Accept one FILE * and two
15173 obstacks.
15174 (output_token_defines, reader_output_yylsp): Use obstacks.
15175 * src/system.h (obstack_fgrow3): New.
1f65350a 15176 * po/POTFILES.in: Adjust.
896fe5c1 15177
dd60faec
AD
151782000-11-01 Akim Demaille <akim@epita.fr>
15179
15180 Change each use of `fattrs' into a use of `attrs_obstack'.
15181
15182 * src/reader.c (copy_at): Typo: s/yylloc/yyloc/.
15183 * src/files.c (fattrs): Remove.
15184 (attrs_obstack): New.
15185 Adjust all dependencies.
15186 (done): If SEMANTIC_PARSER, dump attrs_obstack into attrsfile.
15187
8c7ebe49
AD
151882000-11-01 Akim Demaille <akim@epita.fr>
15189
15190 Introduce obstacks.
15191 Change each use of `faction' into a use of `action_obstack'.
15192
15193 * lib/obstack.h, lib/obstack.c: New files.
15194 * src/files.c (faction): Remove.
15195 (action_obstack): New.
15196 Adjust all dependencies.
15197
77aee789
AD
151982000-10-20 Akim Demaille <akim@epita.fr>
15199
15200 * lib/quote.h (PARAMS): New macro. Use it.
15201
43591cec
AD
152022000-10-16 Akim Demaille <akim@epita.fr>
15203
15204 * src/output.c (output_short_or_char_table): New function.
15205 (output_short_table, output_token_translations): Use it.
15206 (goto_actions): Use output_short_table.
15207
1e9798d5
AD
152082000-10-16 Akim Demaille <akim@epita.fr>
15209
15210 * src/symtab.c (bucket_new): New function.
15211 (getsym): Use it.
15212
15213 * src/output.c (output_short_table): New argument to display the
15214 comment associated with the table.
15215 Adjust dependencies.
15216 (output_gram): Use it.
15217 (output_rule_data): Nicer output layout for YYTNAME.
15218
f282676b
AD
152192000-10-16 Akim Demaille <akim@epita.fr>
15220
15221 * src/lex.c (read_typename): New function.
15222 (lex): Use it.
15223 * src/reader.c (copy_dollar): Likewise.
15224
550a72a3
AD
152252000-10-16 Akim Demaille <akim@epita.fr>
15226
15227 * src/reader.c (copy_comment2): Expect the input stream to be on
15228 the `/' which is suspected to open a comment, instead of being
15229 called after `//' or `/*' was read.
15230 (copy_comment, copy_definition, parse_union_decl, copy_action)
15231 (copy_guard): Adjust.
15232
131e2fef
AD
152332000-10-16 Akim Demaille <akim@epita.fr>
15234
15235 * src/reader.c (parse_expect_decl): Use `skip_white_space' and
15236 `read_signed_integer'.
15237
79282c5a
AD
152382000-10-16 Akim Demaille <akim@epita.fr>
15239
15240 * src/reader.c (copy_dollar): New function.
15241 (copy_guard, copy_action): Use it.
15242
ff4a34be
AD
152432000-10-16 Akim Demaille <akim@epita.fr>
15244
15245 * lib/quote.h, lib/quote.c, lib/quotearg.h, lib/quotearg.c:
15246 * m4/prereq.m4, m4/c-bs-a.m4, m4/mbstate.m4:
15247 New files, from Fileutils 4.0.27.
15248 * src/main.c (printable_version): Remove.
15249 * src/lex.c, src/reader.c: Use `quote'.
15250
152512000-10-04 Akim Demaille <akim@epita.fr>
15252
15253 * lib/error.c, lib/error.h: New files, needed by xmalloc.c.
15254
14ded682
AD
152552000-10-04 Akim Demaille <akim@epita.fr>
15256
15257 * doc/bison.texinfo: Various typos spotted by Neil Booth.
15258
8e03724b
AD
152592000-10-04 Akim Demaille <akim@epita.fr>
15260
15261 When a literal string is used to define two different tokens,
15262 `bison -v' segfaults.
15263 Reported by Piotr Gackiewicz, and fixed by Neil Booth.
15264
15265 * tests/regression.m4: New file.
15266 Include the core of the sample provided by Piotr Gackiewicz.
15267 * src/reader.c (parse_token_decl): Diagnose bad cases, and proceed
15268 properly.
15269
a9e64249
AD
152702000-10-04 Akim Demaille <akim@epita.fr>
15271
15272 * src/reader.c (parse_expect_decl): Keep `count' within the size
15273 of `buffer'.
15274 From Neil Booth.
15275
da9abf43
AD
152762000-10-02 Paul Eggert <eggert@twinsun.com>
15277
15278 * bison.s1 (yyparse): Assign the default value
15279 unconditionally, to avoid a GCC warning and make the parser a
15280 tad smaller.
15281
c33638bb
AD
152822000-10-02 Akim Demaille <akim@epita.fr>
15283
15284 * src/getargs.c (getargs): Don't dump `--help' on unrecognized
15285 options.
15286
444c570a
AD
152872000-10-02 Akim Demaille <akim@epita.fr>
15288
15289 * src/derives.c, src/print.c, src/reduce.c: To ease the
15290 translation, move some `\n' out of the translated strings.
15291
89cab50d
AD
152922000-10-02 Akim Demaille <akim@epita.fr>
15293
15294 The location tracking mechanism is precious for parse error
15295 messages. Nevertheless, it is enabled only when `@n' is used in
15296 the grammar, which is a different issue (you can use it in error
15297 message, but not in the grammar per se). Therefore, there should
15298 be another means to enable it.
15299
15300 * src/getargs.c (getargs): Support `--locations'.
15301 (usage): Report it.
15302 * src/getargs.h (locationsflag): Export it.
15303 * src/lex.c (percent_table): Support `%locations'.
15304 * src/reader.c (yylsp_needed): Remove this variable, now replaced
15305 with `locationsflag'.
15306 * doc/bison.texinfo: Document `--locations' and `%locations'.
15307 Sort the options.
15308 * tests/calc.m4: Test it.
15309
15310 For regularity of the names, replace each
15311 (nolineflag, toknumflag, rawtokenumflag, noparserflag): with...
15312 (no_lineflag, token_tableflag, rawflag, no_parserflag): this.
15313 In addition replace each `flag' with `_flag'.
15314
d6c2cba0
AD
153152000-10-02 Akim Demaille <akim@epita.fr>
15316
15317 Also test parse error messages, including with YYERROR_VERBOSE.
15318
15319 * tests/calc.m4 (calc.y): Add support for `exp = exp' (non
15320 associative).
15321 Use it to check the computations.
15322 Use it to check `nonassoc' is honored.
15323 (AT_DATA_CALC_Y): Equip `calc.y' with YYERROR_VERBOSE when passed
15324 `--yyerror-verbose'.
15325 (_AT_CHECK_CALC): Adjust to this option.
15326 (_AT_CHECK_CALC_ERROR): New macro to check parse error messages.
15327
5a35a6cb
AD
153282000-10-02 Akim Demaille <akim@epita.fr>
15329
15330 Test also `--verbose', `--defines' and `--name-prefix'. Testing
15331 the latter demonstrates a flaw in the handling of non debugging
15332 parsers introduced by myself on 2000-03-16: `#define yydebug 0'
15333 was used in order to simplify:
15334
15335 #if YYDEBUG
15336 if (yydebug)
15337 {
15338 ...
15339 }
15340 #endif
15341
15342 into
15343
15344 if (yydebug)
15345 {
15346 ...
15347 }
15348
15349 unfortunately this leads to a CPP conflict when
15350 `--name-prefix=foo' is used since it produces `#define yydebug
15351 foodebug'.
15352
15353 * src/bison.s1 [!YYDEBUG]: Do not define yydebug.
15354 (YYDPRINTF): New macro.
15355 Spread its use.
15356 * tests/calc.m4 (AT_CHECK_CALC): Do require a title, build it from
15357 the bison options.
15358 Also test `--verbose', `--defines' and `--name-prefix'.
15359
71da9eea
AD
153602000-10-02 Akim Demaille <akim@epita.fr>
15361
15362 Improve the readability of the produced parsers.
15363
15364 * src/bison.s1: Formatting changes.
15365 Improve the comment related to the `$' mark.
15366 (yydefault): Don't fall through to `yyresume': `goto' there.
15367 * src/output.c (output_parser): When the `$' is met, skip the end
15368 of its line.
15369 New variable, `number_of_dollar_signs', to check there's exactly
15370 one `$' in the parser skeleton.
15371
95e36146
AD
153722000-10-02 Akim Demaille <akim@epita.fr>
15373
15374 * lib/xstrdup.c: New file, from the fileutils.
15375 * src/reader.c (parse_token_decl, get_type_name, parse_type_decl)
15376 (parse_assoc_decl, parse_thong_decl, get_type): Use `xstrdup'
15377 instead of strlen + xmalloc + strcpy.
15378 * src/symtab.c (copys): Remove, use xstrdup instead.
15379
d7020c20
AD
153802000-10-02 Akim Demaille <akim@epita.fr>
15381
15382 * src/gram.h (associativity): New enum type which replaces the
15383 former CPP macros `RIGHT_ASSOC', `LEFT_ASSOC' and `NON_ASSOC' with
15384 `right_assoc', `left_assoc' and `non_assoc'.
15385 Adjust all dependencies.
15386 * src/reader.c: Formatting changes.
15387 (LTYPESTR): Don't define it, use it as a literal in
15388 `reader_output_yylsp'.
15389 * src/symtab.h (symbol_class): New enum type which replaces the
15390 former CPP macros `SUNKNOWN', `STOKEN and `SNTERM' with
15391 `sunknown', `stoken and `snterm'.
15392
1916f98e
AD
153932000-10-02 Akim Demaille <akim@epita.fr>
15394
15395 * src/getargs.c (fixed_outfiles): Rename as...
15396 (yaccflag): for consistency and accuracy.
15397 Adjust dependencies.
15398
d7913476
AD
153992000-10-02 Akim Demaille <akim@epita.fr>
15400
15401 Use the more standard files `xalloc.h' and `xmalloc.c' instead of
15402 Bison's `allocate.c' and `alloc.h'. This patch was surprisingly
15403 difficult and introduced a lot of core dump. It turns out that
15404 Bison used an implementation of `xmalloc' based on `calloc', and
15405 at various places it does depend upon the initialization to 0. I
15406 have not tried to isolate the pertinent places, and all the former
15407 calls to Bison's `xmalloc' are now using `XCALLOC'. Someday,
15408 someone should address this issue.
15409
15410 * src/allocate.c, src/alloc.h, m4/bison-decl.m4: Remove.
15411 * lib/xmalloc.c, lib/xalloc.h, m4/malloc.m4, m4/realloc.m4: New
15412 files.
15413 Adjust dependencies.
15414 * src/warshall.h: New file.
15415 Propagate.
15416
340ef489
AD
154172000-10-02 Akim Demaille <akim@epita.fr>
15418
15419 Various anti-`extern in *.c' changes.
15420
15421 * src/system.h: Include `assert.h'.
15422
b2ca4022
AD
154232000-10-02 Akim Demaille <akim@epita.fr>
15424
15425 * src/state.h (nstates, final_state, first_state, first_shift)
15426 (first_reduction): Move their exportation from here...
15427 * src/LR0.h: to here.
15428 Adjust dependencies.
15429 * src/getargs.c (statisticsflag): New variable.
15430 Add support for `--statistics'.
15431 Adjust dependencies.
15432
15433 Remove a lot of now useless `extern' statements in most files.
15434
403b315b
AD
154352000-10-02 Akim Demaille <akim@epita.fr>
15436
15437 * src/LR0.h: New file.
15438 Propagate its use.
15439
07a58c13
AD
154402000-10-02 Akim Demaille <akim@epita.fr>
15441
15442 * src/print.h: New file.
15443 Propagate its use.
15444 * src/print.c: Formatting and ordering changes.
15445 (verbose, terse): Replace with...
15446 (print_results): this new function.
15447 Adjust dependencies.
15448
0619caf0
AD
154492000-10-02 Akim Demaille <akim@epita.fr>
15450
15451 * src/conflicts.c (conflict_report): New function.
15452 (conflict_log, verbose_conflict_log): Replace with...
15453 (print_conflicts): this function.
15454 Adjust dependencies.
15455 * src/conflicts.h: New file.
15456 Propagate its inclusion.
15457
3519ec76
AD
154582000-10-02 Akim Demaille <akim@epita.fr>
15459
15460 * src/nullable.h: New file.
15461 Propagate its inclusion.
15462 * src/nullable.c: Formatting changes.
15463
015acc48
AD
154642000-10-02 Akim Demaille <akim@epita.fr>
15465
15466 * src/reduce.h: New file.
15467 Propagate its inclusion.
15468 * src/reduce.c: Topological sort and other formatting changes.
15469 (bool, TRUE, FALSE): Move their definition to...
15470 * src/system.h: here.
15471
8963a27b
AD
154722000-10-02 Akim Demaille <akim@epita.fr>
15473
15474 * src/files.c: Formatting changes.
15475 (tryopen, tryclose, openfiles): Rename as...
15476 (xfopen, xfclose, open_files): this.
15477 (stringappend): static.
15478 * src/files.h: Complete the list of exported symbols.
15479 Propagate its use.
15480
a70083a3
AD
154812000-10-02 Akim Demaille <akim@epita.fr>
15482
15483 * src/reader.h: New file.
15484 Propagate its use instead of tedious list of `extern' and
15485 prototypes.
15486 * src/reader.c: Formatting changes, topological sort,
15487 s/register//.
15488
abadc117
AD
154892000-10-02 Akim Demaille <akim@epita.fr>
15490
15491 * src/lex.h: Prototype `lex.c' exported functions.
15492 * src/reader.c: Adjust.
15493 * src/lex.c: Formatting changes.
15494 (safegetc): Rename as...
15495 (xgetc): this.
15496
720d742f
AD
154972000-10-02 Akim Demaille <akim@epita.fr>
15498
15499 * src/lalr.h: New file.
15500 Propagate its inclusion instead of prototypes and `extern'.
15501 * src/lalr.c: Formatting changes, topological sorting etc.
15502
f2acea59
AD
155032000-10-02 Akim Demaille <akim@epita.fr>
15504
15505 * src/output.c (token_actions): Introduce a temporary array,
15506 YYDEFACT, that makes it possible for this function to use
15507 output_short_table.
15508
d019d655
AD
155092000-10-02 Akim Demaille <akim@epita.fr>
15510
15511 `user_toknums' is output as a `short[]' in `output.c', while it is
15512 defined as a `int[]' in `reader.c'. For consistency with the
15513 other output tables, `user_toknums' is now defined as a table of
15514 shorts.
15515
15516 * src/reader.c (user_toknums): Be a short table instead of an int
15517 table.
15518 Adjust dependencies.
15519
15520 Factor the short table outputs.
15521
15522 * src/output.c (output_short_table): New function.
15523 * src/output.c (output_gram, output_stos, output_rule_data)
15524 (output_base, output_table, output_check): Use it.
15525
6c89f1c1
AD
155262000-10-02 Akim Demaille <akim@epita.fr>
15527
15528 * src/output.c (output): Topological sort of the functions, in
15529 order to get rid of the `static' prototypes.
15530 No longer use `register'.
15531 * src/output.h: New file.
15532 Propagate its inclusion in files explicitly prototyping functions
15533 from output.c.
15534
d9efd181
AD
155352000-09-21 Akim Demaille <akim@epita.fr>
15536
15537 * src/atgeneral.m4: Update from Autoconf.
15538
c29240e7 155392000-09-21 Akim Demaille <akim@epita.fr>
2fa6973e
AD
15540
15541 * src/closure.h: New file.
15542 * src/closure.c: Formatting changes, topological sort over the
15543 functions, use of closure.h.
15544 (initialize_closure, finalize_closure): Rename as...
15545 (new_closure, free_closure): these. Adjust dependencies.
15546 * src/LR0.c: Formatting changes, topological sort, use of
15547 cloture.h.
15548 (initialize_states): Rename as...
15549 (new_states): this.
15550 * src/Makefile.am (noinst_HEADERS): Adjust.
15551
499daa50
AD
155522000-09-20 Akim Demaille <akim@epita.fr>
15553
15554 * src/acconfig.h: Don't protect config.h against multiple
15555 inclusion.
15556 Don't define PARAMS.
15557 * src/system.h: Define PARAMS.
15558 Remove some of the ad-hoc CPP magic for DOS, VMS etc.: this is the
15559 purpose of config.h. system.h must not try to fix wrong
15560 definitions in config.h.
15561
cc84fd5d
AD
155622000-09-20 Akim Demaille <akim@epita.fr>
15563
15564 * src/derives.h: New file.
15565 * src/main.c, src/derives.h: Use it.
15566 Formatting changes.
15567 * src/Makefile.am (noinst_HEADERS): Adjust.
15568
db5b3a89
AD
155692000-09-20 Akim Demaille <akim@epita.fr>
15570
15571 * tests/atgeneral.m4: Update from Autoconf.
15572 * tests/calc.m4 (_AT_DATA_CALC_Y, AT_DATA_CALC_Y, _AT_CHECK_CALC)
15573 (AT_CHECK_CALC): New macros.
15574 Use these macros to test bison with options `', `--raw',
15575 `--debug', `--yacc', `--yacc --debug'.
15576
ceed8467
AD
155772000-09-19 Akim Demaille <akim@epita.fr>
15578
15579 * src/output.c: Formatting changes.
15580 * src/machine.h: Remove, leaving its contents in...
15581 * src/system.h: here.
15582 Include stdio.h.
15583 Adjust all dependencies on stdio.h and machine.h.
15584 * src/getargs.h: New file.
15585 Let all `extern' declarations about getargs.c be replaced with
15586 inclusion of `getargs.h'.
15587 * src/Makefile.am (noinst_HEADERS): Adjust.
15588
15589 * tests/calc.m4 (yyin): Be initialized in main, not on the global
15590 scope.
15591 (yyerror): Returns void, not int.
15592 * doc/bison.texinfo: Formatting changes.
15593
05a1d24b
AD
155942000-09-19 Akim Demaille <akim@epita.fr>
15595
15596 * tests/calc.m4 (calc.y): Do not assign to stdin, as it's not
15597 portable.
15598
cbd25751
AD
155992000-09-18 Akim Demaille <akim@epita.fr>
15600
15601 * configure.in: Append WARNING_CFLAGS to CFLAGS.
15602 * src/Makefile.am (INCLUDES): Don't.
15603 Be ready to fetch headers in lib/.
15604
13863333
AD
156052000-09-18 Akim Demaille <akim@epita.fr>
15606
15607 * doc/bison.texinfo: Update the copyright.
15608 ANSIfy and GNUify the examples.
15609 Remove the old menu.
15610
0d533154
AD
156112000-09-18 Akim Demaille <akim@epita.fr>
15612
15613 First set of tests: use the `calc' example from the documentation.
15614
15615 * src/bison.s1 (yyparse): Condition the code using `yytname' which
15616 is defined only when YYDEBUG is.
15617 * m4/atconfig.m4 (AT_CONFIG): Adjust to Autoconf 2.13.
15618 * src/files.c (tryopen, tryclose): Formatting changes.
15619 Move to the top and be static.
15620 * src/reader.c (read_signed_integer): Likewise.
15621 * tests/calc.m4: New file.
15622 * Makefile.am, suite.m4: Adjust.
15623 * m4/atconfig.m4: Set BISON_SIMPLE and BISON_HAIRY.
15624
e79137ac
AD
156252000-09-18 Akim Demaille <akim@epita.fr>
15626
15627 Add support for an Autotest test suite for Bison.
15628
15629 * m4/m4.m4, m4/atconfig.m4: New files.
15630 * m4/Makefile.am (EXTRA_DIST): Adjust.
15631 * tests/suite.m4, tests/Makefile.am, tests/atgeneral.m4: New
15632 files.
15633 * src/getargs.c: Display a more standard --version message.
15634 * src/reader.c (reader): Formatting changes.
15635 No longer depend upon VERSION_STRING.
15636 * configure.in: No longer use `dnl'.
15637 Set up the test suite and the new directory `tests/.
15638 (VERSION_STRING): Remove.
15639
27821bff
AD
156402000-04-14 Akim Demaille <akim@epita.fr>
15641
15642 * src/reader.c (copy_comment2): New function, same as former
15643 `copy_comment', but outputs into two FILE *.
15644 (copy_comment): Use it.
15645 (parse_union_decl): Use it.
15646 (get_type, parse_start_decl): Use the same `invalid' message.
15647 (parse_start_decl, parse_union_decl): Use the same `multiple'
15648 message.
15649 (parse_union_decl, copy_guard, copy_action): Use the same
15650 `unmatched' message.
15651 * m4/Makefile.am (EXTRA_DIST): Add `warning.m4'.
15652
cfe5fbc0
AD
156532000-03-31 Akim Demaille <akim@epita.fr>
15654
15655 * src/files.c (tryopen, tryclose): Move to the top.
15656 Be static.
15657
cb7db13e
AD
156582000-03-31 Akim Demaille <akim@epita.fr>
15659
15660 * src/main.c (main): Don't call `done', exit does it.
15661
a0f6b076
AD
156622000-03-31 Akim Demaille <akim@epita.fr>
15663
36281465
AD
15664 * allocate.c: s/return (foo)/return foo/.
15665 * lalr.c: Likewise.
15666 * LR0.c: Likewise.
15667 * output.c: Likewise.
15668 * reader.c: Likewise.
15669 * symtab.c: Likewise.
15670 * vmsgetargs.c: Likewise.
15671
156722000-03-31 Akim Demaille <akim@epita.fr>
15673
15674 Clean up the error reporting functions.
a0f6b076
AD
15675
15676 * src/report.c: New file.
15677 * src/report.h: Likewise.
15678 * src/Makefile.am: Adjust.
15679 * m4/error.m4: New file.
15680 * m4/Makefile.am: Adjust.
15681 * configure.in (jm_PREREQ_ERROR): Call it.
15682 * src/main.c (int_to_string, banner, fatal_banner, warn_banner):
15683 Remove.
15684 (fatal, fatals): Remove. All callers use complain.c::fatal.
15685 (warn, warni, warns, warnss, warnss): Remove. All callers use
15686 complain.c::complain.
15687 (toomany): Remove, use fatal instead.
15688 * src/files.c (done): No argument, use complain_message_count.
15689 * src/main.c (main): Register `done' to `atexit'.
15690
15691 * src/getargs.c (usage): More `fputs', less `fprintf'.
15692
18539825
AD
156932000-03-28 Akim Demaille <akim@epita.fr>
15694
15695 * lib/: New directory.
15696 * Makefile.am (SUBDIRS): Adjust.
15697 * configure.in: Adjust.
15698 (LIBOBJS): Although not used yet, AC_SUBST it, otherwise it's
15699 useless.
15700 * src/alloca.c: Moved to lib/.
15701 * src/getopt.c: Likewise.
15702 * src/getopt1.c: Likewise.
15703 * src/getopt.h: Likewise.
15704 * src/ansi2knr.c: Likewise.
15705 * src/ansi2knr.1: Likewise.
15706 * src/Makefile.am: Adjust.
15707 * lib/Makefile.am: New file.
15708
9f306f2a
AD
157092000-03-28 Akim Demaille <akim@epita.fr>
15710
15711 * src/getargs.c (usage): Refresh the help message.
15712
0ba347b6
AD
157132000-03-17 Akim Demaille <akim@epita.fr>
15714
15715 * src/getopt1.c: Updated from textutils 2.0e
15716 * src/getopt.c: Likewise.
15717 * src/getopt.h: Likewise.
15718
dbe7f271
AD
157192000-03-17 Akim Demaille <akim@epita.fr>
15720
15721 * src/Makefile.am (bison.simple): Fix the awk program: quote only
15722 the file name, not the whole `#line LINE FILE'.
15723
75bbe78d
AD
157242000-03-17 Akim Demaille <akim@epita.fr>
15725
15726 On syntax errors, report the token on which we choked.
15727
aa5fd0ee
AD
15728 * src/bison.s1 (yyparse): In the label yyerrlab, when
15729 YYERROR_VERBOSE, add yychar in msg.
75bbe78d 15730
7b306f52
AD
157312000-03-17 Akim Demaille <akim@epita.fr>
15732
aa5fd0ee 15733 * src/reader.c (copy_at): New function.
7b306f52
AD
15734 (copy_guard): Use it.
15735 (copy_action): Use it.
15736
e87b5700
AD
157372000-03-17 Akim Demaille <akim@epita.fr>
15738
15739 Be kind to translators, save some useless translations.
15740
aa5fd0ee 15741 * src/main.c (banner): New function.
e87b5700
AD
15742 (fatal_banner): Use it.
15743 (warn_banner): Use it.
15744
ae3c3164
AD
157452000-03-17 Akim Demaille <akim@epita.fr>
15746
aa5fd0ee
AD
15747 * src/reader.c (copy_definition): Use copy_string and
15748 copy_comment. Removed now unused `match', `ended',
15749 `cplus_comment'.
ae3c3164
AD
15750 (copy_comment, copy_string): Moved, to be visible from
15751 copy_definition.
15752
4dc58e7c
AD
157532000-03-17 Akim Demaille <akim@epita.fr>
15754
aa5fd0ee
AD
15755 * src/reader.c (copy_string): Declare `static inline'. No
15756 problems with inline, since it is checked by configure.
4dc58e7c
AD
15757 (copy_comment): Likewise.
15758
0a6384c4
AD
157592000-03-17 Akim Demaille <akim@epita.fr>
15760
aa5fd0ee 15761 * src/reader.c (packsymbols): Formatting changes.
0a6384c4 15762
3cef001a
AD
157632000-03-17 Akim Demaille <akim@epita.fr>
15764
aa5fd0ee 15765 * src/reader.c (copy_comment): New function, factored out from:
3cef001a
AD
15766 (copy_action): Use it. Removed now unused `match', `ended',
15767 `cplus_comment'.
15768 (copy_guard): Likewise.
15769
ca36d2ef
AD
157702000-03-17 Akim Demaille <akim@epita.fr>
15771
aa5fd0ee 15772 * src/reader.c (copy_string): New function, factored out from:
ca36d2ef
AD
15773 (copy_action): Use it.
15774 (copy_guard): Likewise.
15775
6666f98f
AD
157762000-03-17 Akim Demaille <akim@epita.fr>
15777
15778 Change the handling of @s so that they behave exactly like $s.
15779 There is now a pseudo variable @$ (readble and writable), location
15780 of the lhs of the rule (by default ranging from the location of
15781 the first symbol of the rhs, to the location of the last symbol,
15782 or, if the rhs is empty, YYLLOC).
15783
15784 * src/bison.s1 [YYLSP_NEEDED] (yyloc): New variable, twin of
15785 yyval.
15786 (yyparse): When providing a default semantic action, provide a
15787 default location action.
15788 (after the $): No longer change `*YYLSP', just stack YYLOC the
15789 same way you stack YYVAL.
15790 * src/reader.c (read_declarations): Use warns.
15791 (copy_guard, case '@'): Also recognize `@$', expanded as `YYLOC'.
15792 (copy_action, case '@'): Likewise.
15793 Use a standard error message, to save useless work from
15794 translators.
15795
41aca2e0
AD
157962000-03-17 Akim Demaille <akim@epita.fr>
15797
aa5fd0ee
AD
15798 * src/bison.s1: Formatting and cosmetics changes.
15799 * src/reader.c: Likewise.
41aca2e0
AD
15800 Update the Copyright notice.
15801
dc08c1d5
AD
158022000-03-17 Akim Demaille <akim@epita.fr>
15803
aa5fd0ee
AD
15804 * src/bison.s1 (#line): All set to `#line' only, since the
15805 Makefile now handles them.
dc08c1d5 15806
9ee3c97b
AD
158072000-03-16 Akim Demaille <akim@epita.fr>
15808
15809 * src/output.c (output_rule_data): Output the documentation of
15810 some of the tables.
15811 (Copyright notice): Update.
15812 Formatting changes.
15813
0de741ca
AD
158142000-03-16 Akim Demaille <akim@epita.fr>
15815
15816 * src/bison.s1 [!YYDEBUG]: Define yydebug to 0. This allows to
15817 remove most `#if YYDEBUG != 0', since `if (yydebug)' is enough.
15818 One `#if YYDEBUG' remains, since it uses variables which are
15819 defined only if `YYDEBUG != 0'.
15820
bb10be54
AD
158212000-03-16 Akim Demaille <akim@epita.fr>
15822
15823 * src/bison.s1 (yyparse): Reorganize the definitions of the stacks
15824 and related variables so that the similarities are highlighted.
15825
b07b484a
AD
158262000-03-16 Akim Demaille <akim@epita.fr>
15827
15828 * src/bison.s1: Properly indent CPP directives.
15829
361f60b3
AD
158302000-03-16 Akim Demaille <akim@epita.fr>
15831
15832 * src/bison.s1: Properly indent the `alloca' CPP section.
15833
8c44d3ec
AD
158342000-03-16 Akim Demaille <akim@epita.fr>
15835
15836 Do not hard code values of directories in `configure.in'.
15837 Update the `configure' tool chain.
15838
15839 * configure.in (XPFILE, XPFILE1, LOCALEDIR): Remove, handled by
15840 src/makefile.am.
15841 (VERSION_STRING): Use the third arg of AC_DEFINE_UNQUOTED.
15842 (AC_OUTPUT): Add m4/Makefile.
15843 Bump to bison 1.28a, 1.29 has never been released.
15844 * acconfig.h (XPFILE, XPFILE1, LOCALEDIR): Remove, since they are
15845 handled via src/Makefile.am.
15846 (VERSION_STRING, PROTOTYPES, ENABLE_NLS, HAVE_CATGETS,
15847 HAVE_GETTEXT, HAVE_LC_MESSAGES, HAVE_STPCPY): Remove, handled by
15848 autoheader.
15849 * Makefile.am (SUBDIRS): Add m4.
15850 (ACLOCAL_AM_FLAGS): New variable.
15851 (AUTOMAKE_OPTIONS): Add check-news.
15852 * src/Makefile.am (bison.simple): Use awk to replace #line lines with
15853 the proper line number and file name.
15854 (DEFS): Propagate the location of bison library files and of the
15855 locale files.
15856 (INCLUDES): Added `-I ..' so that one can compile with srcdir !=
15857 builddir.
15858 * acinclude.m4: Remove, replaced by the directory m4.
15859 * m4/Makefile.am (EXTRA_DIST): New variable.
15860 * m4/gettext.m4: New file, from the fileutils.
15861 * m4/lcmessage.m4: Likewise
15862 * m4/progtest.m4: Likewise.
15863 * m4/bison-decl.m4: New file, extracted from former acinclude.m4.
15864
f95997e7
AD
158652000-03-10 Akim Demaille <akim@epita.fr>
15866
15867 * src/closure.c:
15868 Formatting changes of various comments.
15869 Respect the GNU coding standards at various places.
15870 Don't use `_()' when no translation is needed.
15871
158721999-12-13 Jesse Thilo <jthilo@gnu.org>
15873
15874 * src/files.c:
15875 OS/2 honors TMPDIR environment variable.
15876
158771999-12-13 Jesse Thilo <jthilo@gnu.org>
15878
15879 * doc/bison.texinfo: Tweaked spelling and grammar.
15880 Updated ISBN.
15881 Removed reference to price of printed copy.
15882 Mention BISON_SIMPLE and BISON_HAIRY.
15883
158841999-12-13 Jesse Thilo <jthilo@gnu.org>
15885
15886 * configure.in, NEWS:
15887 Bison 1.29 released.
15888
158891999-10-27 Jesse Thilo <jthilo@gnu.org>
15890
15891 * doc/.cvsignore, doc/Makefile.am, doc/refcard.tex:
15892 Added reference card.
15893
158941999-07-26 Jesse Thilo <jthilo@gnu.org>
15895
15896 * po/ru.po: Added Russian translation.
15897
158981999-07-26 Jesse Thilo <jthilo@gnu.org>
15899
15900 * configure.in: Added Russian translation.
15901
159021999-07-06 Jesse Thilo <jthilo@gnu.org>
15903
15904 * configure.in, NEWS, README:
15905 Released version 1.28.
15906
159071999-06-14 Jesse Thilo <jthilo@gnu.org>
15908
15909 * src/system.h:
15910 Squashed redefinition warning on some systems.
15911
15912 * src/getargs.c, src/Makefile.am, src/reader.c, src/version.c:
15913 Have configure build version string instead of relying on ANSI string
15914 concatentation.
15915
159161999-06-14 Jesse Thilo <jthilo@gnu.org>
15917
15918 * po/POTFILES.in: Got rid of version.c.
15919
159201999-06-14 Jesse Thilo <jthilo@gnu.org>
15921
15922 * acconfig.h, configure.in:
15923 Have configure build version string instead of relying on ANSI string
15924 concatentation.
15925
159261999-06-08 Jesse Thilo <jthilo@gnu.org>
15927
15928 * doc/bison.1:
15929 Dropped mention of `+' for long-named options.
15930
159311999-05-30 Jesse Thilo <jthilo@gnu.org>
15932
15933 * src/files.c: Added <unistd.h> for unlink().
15934
15935 * src/Makefile.am, src/system.h:
15936 I18n fixes.
15937
159381999-05-30 Jesse Thilo <jthilo@gnu.org>
15939
15940 * README: Added a FAQ list.
15941
15942 * configure.in, acconfig.h:
15943 I18n fixes.
15944
159451999-05-30 Jesse Thilo <jthilo@gnu.org>
15946
15947 * doc/FAQ, doc/Makefile.am:
15948 Added a FAQ list.
15949
159501999-05-19 Jesse Thilo <jthilo@gnu.org>
15951
15952 * src/alloc.h, src/symtab.h, src/version.c:
15953 Protected inclusion of "config.h" with HAVE_CONFIG_H.
15954
159551999-04-18 Jesse Thilo <jthilo@gnu.org>
15956
15957 * src/.cvsignore, src/Makefile.am:
15958 Reorganized: sources in `src', documentation in `doc'.
15959
15960 * src/lex.c (literalchar):
15961 fixed the code for escaping double quotes (thanks
15962 Jonathan Czisny.)
15963
159641999-04-18 Jesse Thilo <jthilo@gnu.org>
15965
15966 * po/de.po, po/es.po, po/fr.po, po/nl.po, po/POTFILES.in:
15967 Adjusted paths to reflect directory reorganization.
15968
159691999-04-18 Jesse Thilo <jthilo@gnu.org>
15970
15971 * doc/.cvsignore, doc/Makefile.am:
15972 Reorganized: sources in `src', documentation in `doc'.
15973
159741999-04-18 Jesse Thilo <jthilo@gnu.org>
15975
15976 * configure.in:
15977 Updated AC_INIT file to reflect directory reorganization.
15978
15979 * configure.in, .cvsignore, Makefile.am, POTFILES.in:
15980 Reorganized: sources in `src', documentation in `doc'.
15981
159821999-04-13 Jesse Thilo <jthilo@gnu.org>
15983
15984 * src/allocate.c:
15985 Don't declare calloc() and realloc() if not necessary.
15986
159871999-04-13 Jesse Thilo <jthilo@gnu.org>
15988
15989 * configure.in, acconfig.h, acinclude.m4:
15990 Don't declare calloc() and realloc() if not necessary.
15991
159921999-03-23 Jesse Thilo <jthilo@gnu.org>
15993
15994 * po/.cvsignore: Added i18n support.
15995
159961999-03-23 Jesse Thilo <jthilo@gnu.org>
15997
15998 * acconfig.h, configure.in, Makefile.am:
15999 Added i18n support.
16000
160011999-03-22 Jesse Thilo <jthilo@gnu.org>
16002
16003 * src/bison.s1: Fixed #line numbers.
16004
160051999-03-15 Jesse Thilo <jthilo@gnu.org>
16006
16007 * po/es.po, po/fr.po, po/nl.po, po/de.po:
16008 Added PO files from Translation Project.
16009
160101999-03-03 Jesse Thilo <jthilo@gnu.org>
16011
16012 * Makefile.am:
16013 Added support for non-ANSI compilers (ansi2knr).
16014
160151999-02-16 Jesse Thilo <jthilo@gnu.org>
16016
16017 * configure.in: Bumped version number to 1.27.
16018
16019 * Makefile.am:
16020 Added `bison.simple' to list of files removed by `make distclean'.
16021
160221999-02-12 Jesse Thilo <jthilo@gnu.org>
16023
16024 * src/files.c, src/files.h:
16025 Defined locations of parser files in config.h instead of Makefile.
16026
160271999-02-12 Jesse Thilo <jthilo@gnu.org>
16028
16029 * acconfig.h, acinclude.m4, configure.in, Makefile.am:
16030 Defined locations of parser files in config.h instead of Makefile.
16031
160321999-02-09 Jesse Thilo <jthilo@gnu.org>
16033
16034 * Makefile.am:
16035 Removed inappropriate use of $< macro.
16036
160371999-02-05 Jesse Thilo <jthilo@gnu.org>
16038
16039 * po/Makefile.in.in, po/POTFILES.in:
16040 Add `po' directory skeleton.
16041
160421999-01-27 Jesse Thilo <jthilo@gnu.org>
16043
16044 * README: Document help-bison list.
16045
16046 * configure.in: Add check for mkstemp().
16047
160481999-01-20 Jesse Thilo <jthilo@gnu.org>
16049
16050 * src/conflicts.c, src/LR0.c, src/output.c, src/reader.c:
16051 Hush a few compiler warnings.
16052
16053 * src/files.c:
16054 Add tryclose(), which verifies that fclose was successful.
16055 Hush a couple of compiler warnings.
16056
160571999-01-20 Jesse Thilo <jthilo@gnu.org>
16058
16059 * Makefile.am, OChangeLog:
16060 ChangeLog is now automatically generated. Include the old version as
16061 OChangeLog.
16062
160631999-01-14 Jesse Thilo <jthilo@gnu.org>
16064
16065 * 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:
16066 Update FSF address.
16067
160681999-01-14 Jesse Thilo <jthilo@gnu.org>
16069
16070 * doc/bison.texinfo: Fix formatting glitch.
16071
16072 * doc/bison.texinfo: Update FSF address.
16073
160741999-01-14 Jesse Thilo <jthilo@gnu.org>
16075
16076 * acconfig.h: Update FSF address.
16077
160781999-01-08 Jesse Thilo <jthilo@gnu.org>
16079
16080 * src/system.h:
16081 Don't define PACKAGE here, since config.h defines it.
16082
160831998-12-30 Jesse Thilo <jthilo@gnu.org>
16084
16085 * src/reader.c: Update copyright date.
16086
16087 * src/main.c:
16088 Ditch sprintf to statically-sized buffers in fatal/warn functions in
16089 favor of output directly to stderr (avoids buffer overruns).
16090
16091 * src/reader.c: Some checks for premature EOF.
16092
16093 * 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:
16094 Use prototypes if the compiler understands them.
16095
16096 * src/files.c: Honor TMPDIR on Unix hosts.
16097 Use prototypes if the compiler understands them.
16098
16099 * src/reader.c:
16100 Fix a couple of buffer overrun bugs.
16101 Use prototypes if the compiler understands them.
16102
16103 * src/system.h: Include unistd.h and ctype.h.
16104 Use #ifdef instead of #if for NLS symbols.
16105
161061998-12-30 Jesse Thilo <jthilo@gnu.org>
16107
16108 * doc/bison.texinfo:
16109 Delete comment "consider using @set for edition number, etc..." since
16110 we now are doing so.
16111
161121998-12-30 Jesse Thilo <jthilo@gnu.org>
16113
16114 * configure.in:
16115 Use prototypes if the compiler understands them.
16116
16117 * NEWS: Document 1.26 highlights.
16118
16119 * Makefile.am: Require Automake 1.3 or later.
16120
16121 * acconfig.h:
16122 Use prototypes if the compiler understands them.
16123
161241998-12-29 Jesse Thilo <jthilo@gnu.org>
16125
16126 * src/version.c:
16127 Use VERSION symbol from automake for version number.
16128
161291998-12-29 Jesse Thilo <jthilo@gnu.org>
16130
16131 * acconfig.h, configure.in, version.cin:
16132 Use VERSION symbol from automake for version number.
16133
161341998-11-28 Jesse Thilo <jthilo@gnu.org>
16135
16136 * Makefile.am:
16137 Distribute original version of simple parser (bison.s1), not built
16138 version (bison.simple).
16139
161401998-11-28 Jesse Thilo <jthilo@gnu.org>
16141
16142 * doc/bison.texinfo: Add info dir entry.
16143
16144 * doc/bison.texinfo:
16145 Let automake put version number into documentation.
16146
161471998-11-26 Jesse Thilo <jthilo@gnu.org>
16148
16149 * src/bison.cld, src/build.com, src/vmshlp.mar:
16150 Add non-RCS files from /gd/gnu/bison.
16151
161521998-11-26 Jesse Thilo <jthilo@gnu.org>
16153
16154 * doc/bison.1:
16155 Document the BISON_HAIRY and BISON_SIMPLE variables.
16156
161571998-11-25 Jesse Thilo <jthilo@gnu.org>
16158
16159 * src/version.c: Build version.c automatically.
16160
16161 * src/reader.c:
16162 Fix token numbering (used to start at 258, not 257).
16163
16164 * src/system.h: Include config.h.
16165
16166 * src/getargs.c: Update bug report address.
16167
16168 * src/alloca.c, src/getopt1.c, src/getopt.c, src/getopt.h:
16169 Get latest copies of alloca.c, getopt.c, getopt.h, getopt1.c from gnu.org.
16170
161711998-11-25 Jesse Thilo <jthilo@gnu.org>
16172
16173 * Makefile.am:
16174 Rename bison.simple to bison.s1 (bison.simple is then built from bison.s1).
16175
16176 * configure.in, version.cin:
16177 Build version.c automatically.
16178
16179 * AUTHORS: Add AUTHORS file.
16180
16181 * README: Update bug report address.
16182
16183 * bison.simple:
16184 Rename bison.simple to bison.s1 (bison.simple is then built from bison.s1).
16185
16186 * configure.in, Makefile.am, Makefile.in, stamp-h.in:
16187 Add automake stuff.
16188
161891998-11-25 Jesse Thilo <jthilo@gnu.org>
16190
16191 * doc/bison.texinfo: Clean up some formatting.
16192
161931998-05-05 Richard Stallman <rms@gnu.org>
16194
16195 * doc/bison.texinfo:
16196 Explain better why to make a pure parser.
16197
161981998-01-05 Richard Stallman <rms@gnu.org>
16199
16200 * src/files.c (openfiles):
16201 [_WIN32 && !__CYGWIN32__] Use TEMP or Temp to
16202 find a temporary directory, if possible. Do not unlink files while
16203 they are open.
16204
162051997-08-25 Richard Stallman <rms@gnu.org>
16206
16207 * src/reader.c (stack_offset;):
16208 Change some warni to warns.
16209
16210 * src/lex.c (literalchar): Use warns, not warni.
16211
162121997-06-28 Richard Stallman <rms@gnu.org>
16213
16214 * src/bison.s1: Add a Bison version comment.
16215
16216 * src/main.c (fatal, warn, berror):
16217 Use program_name.
16218
162191997-06-28 Richard Stallman <rms@gnu.org>
16220
16221 * Makefile.in (bison_version): New variable.
16222 (dist): Use that variable.
16223 (bison.s1): Substitute the Bison version into bison.simple.
16224
16225 * bison.simple: Add a Bison version comment.
16226
162271997-06-18 Richard Stallman <rms@gnu.org>
16228
16229 * src/main.c (fatal, warn, berror):
16230 Make error messages standard.
16231 (toomany): Improve error message text.
16232
16233 * 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:
16234 new.h renamed to alloc.h.
16235
162361997-06-18 Richard Stallman <rms@gnu.org>
16237
16238 * Makefile.in: new.h renamed to alloc.h.
16239
162401997-05-24 Richard Stallman <rms@gnu.org>
16241
16242 * src/lex.c (literalchar):
16243 Fix the code for escaping \, " and '.
16244
16245 (lex): Avoid trouble when there are many chars
16246 to discard in a char literal with just several chars in it.
16247
162481997-05-17 Richard Stallman <rms@gnu.org>
16249
16250 * src/bison.s1:
16251 Use malloc, if using alloca is troublesome.
16252 (YYSTACK_USE_ALLOCA): New flag macro.
16253 Define it for some systems and compilers.
16254 (YYSTACK_ALLOC): New macro.
16255 (yyparse): Use YYSTACK_ALLOC to allocate stack.
16256 If it was malloc'd, free it.
16257
162581997-05-17 Richard Stallman <rms@gnu.org>
16259
16260 * bison.simple:
16261 Use malloc, if using alloca is troublesome.
16262 (YYSTACK_USE_ALLOCA): New flag macro.
16263 Define it for some systems and compilers.
16264 (YYSTACK_ALLOC): New macro.
16265 (yyparse): Use YYSTACK_ALLOC to allocate stack.
16266 If it was malloc'd, free it.
16267
162681997-04-23 Richard Stallman <rms@gnu.org>
16269
16270 * src/bison.s1:
16271 (alloca) [__hpux]: Always define as __builtin_alloca.
16272
162731997-04-23 Richard Stallman <rms@gnu.org>
16274
16275 * bison.simple:
16276 (alloca) [__hpux]: Always define as __builtin_alloca.
16277
162781997-04-22 Richard Stallman <rms@gnu.org>
16279
16280 * src/bison.s1:
16281 [__hpux]: Include alloca.h (right for HPUX 10)
16282 instead of declaring alloca (right for HPUX 9).
16283
16284 * src/bison.s1 (__yy_memcpy):
16285 Declare arg `count' as unsigned int.
16286 (yyparse): Cast third arg to __yy_memcpy to unsigned int.
16287
162881997-04-22 Richard Stallman <rms@gnu.org>
16289
16290 * bison.simple:
16291 [__hpux]: Include alloca.h (right for HPUX 10)
16292 instead of declaring alloca (right for HPUX 9).
16293
16294 * bison.simple (__yy_memcpy):
16295 Declare arg `count' as unsigned int.
16296 (yyparse): Cast third arg to __yy_memcpy to unsigned int.
16297
162981997-01-03 Richard Stallman <rms@gnu.org>
16299
16300 * src/allocate.c: [__STDC__ or _MSC_VER]:
16301 Declare calloc and realloc to return void *.
16302
163031997-01-02 Richard Stallman <rms@gnu.org>
16304
16305 * src/system.h:
16306 [_MSC_VER]: Include stdlib.h and process.h.
16307 [_MSC_VER] (getpid): Define as macro--translate it to _getpid.
16308
16309 * src/main.c (main): Return FAILURE as a value.
16310 (printable_version): Declare arg as int, not char.
16311
163121997-01-02 Richard Stallman <rms@gnu.org>
16313
16314 * Makefile.in (dist):
16315 Explicitly check for symlinks, and copy them.
16316
163171996-12-19 Richard Stallman <rms@gnu.org>
16318
16319 * src/files.c:
16320 [_MSC_VER] (XPFILE, XPFILE1): Define, if not already defined.
16321
163221996-12-18 Paul Eggert <eggert@gnu.org>
16323
16324 * src/bison.s1 (yyparse):
16325 If __GNUC__ and YYPARSE_PARAM are both defined,
16326 declare yyparse to have a void * argument.
16327
163281996-12-18 Paul Eggert <eggert@gnu.org>
16329
16330 * bison.simple (yyparse):
16331 If __GNUC__ and YYPARSE_PARAM are both defined,
16332 declare yyparse to have a void * argument.
16333
163341996-12-17 Richard Stallman <rms@gnu.org>
16335
16336 * src/reduce.c (nbits): Add some casts.
16337
163381996-08-12 Richard Stallman <rms@gnu.org>
16339
16340 * src/bison.s1: Test _MSDOS as well as _MSDOS_.
16341
163421996-08-12 Richard Stallman <rms@gnu.org>
16343
16344 * bison.simple: Test _MSDOS as well as _MSDOS_.
16345
163461996-07-31 Richard Stallman <rms@gnu.org>
16347
16348 * src/bison.s1:
16349 [__sun && __i386]: Include alloca.h.
16350
163511996-07-31 Richard Stallman <rms@gnu.org>
16352
16353 * bison.simple:
16354 [__sun && __i386]: Include alloca.h.
16355
163561996-07-30 Richard Stallman <rms@gnu.org>
16357
16358 * src/bison.s1: Comment change.
16359
16360 * src/bison.s1: Test _MSDOS_, not MSDOS.
16361
163621996-07-30 Richard Stallman <rms@gnu.org>
16363
16364 * bison.simple: Comment change.
16365
16366 * bison.simple: Test _MSDOS_, not MSDOS.
16367
163681996-06-01 Richard Stallman <rms@gnu.org>
16369
16370 * 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:
16371 Insert `_' macro around many string constants.
16372
16373 * src/main.c:
16374 Insert `_' macro around many string constants.
16375
16376 (main): Call setlocale, bindtextdomain and textdomain.
16377
16378 * src/system.h: [HAVE_LOCALE_H]: Include locale.h.
16379 [! HAVE_LOCALE_H] (setlocale): Define as no-op.
16380 [ENABLE_NLS]: Include libintl.h.
16381 [ENABLE_NLS] (gettext): Define.
16382 [! ENABLE_NLS] (bintextdomain, textdomain, _): Consolation definitions.
16383 (N_, PACKAGE, LOCALEDIR): New macros.
16384
163851996-06-01 Richard Stallman <rms@gnu.org>
16386
16387 * POTFILES.in: New file.
16388
16389 * Makefile.in (allocate.o):
16390 Define target explicitly.
16391
16392 * Makefile.in (CFLAGS): Set to @CFLAGS@.
16393 (LDFLAGS): Set to @LDFLAGS@.
16394 (configure): Run autoconf only if preceding `cd' succeeds.
16395 (bison.s1): Redirect output to temporary file then move the
16396 temporary to the target, rather than redirecting directly to bison.s1.
16397 (clean): Remove config.status and config.log.
16398 (distclean): Don't remove config.status here.
16399
164001996-05-12 Richard Stallman <rms@gnu.org>
16401
16402 * src/bison.s1:
16403 (__yy_memcpy) [__cplusplus]: Reorder declarations of variables f and t.
16404
164051996-05-12 Richard Stallman <rms@gnu.org>
16406
16407 * bison.simple:
16408 (__yy_memcpy) [__cplusplus]: Reorder declarations of variables f and t.
16409
164101996-05-11 Richard Stallman <rms@gnu.org>
16411
16412 * src/bison.s1 (__yy_memcpy):
16413 Really reorder the args, as was supposedly done on Feb 14 1995.
16414 (yyparse): Calls changed accordingly.
16415
164161996-05-11 Richard Stallman <rms@gnu.org>
16417
16418 * Makefile.in (dist): Don't use $(srcdir).
16419
16420 * bison.simple (__yy_memcpy):
16421 Really reorder the args, as was supposedly done on Feb 14 1995.
16422 (yyparse): Calls changed accordingly.
16423
164241996-01-27 Richard Stallman <rms@gnu.org>
16425
16426 * src/output.c (output_rule_data):
16427 Test YYERROR_VERBOSE in the conditional
16428 around the definition of ttyname.
16429
164301995-12-29 Richard Stallman <rms@gnu.org>
16431
16432 * src/bison.s1:
16433 Fix line numbers in #line commands.
16434
164351995-12-29 Richard Stallman <rms@gnu.org>
16436
16437 * bison.simple:
16438 Fix line numbers in #line commands.
16439
164401995-12-27 Richard Stallman <rms@gnu.org>
16441
16442 * src/bison.s1 (YYPARSE_PARAM_DECL):
16443 In C++, make it always null.
16444 (YYPARSE_PARAM_ARG): New macro.
16445 (yyparse): Use YYPARSE_PARAM_ARG.
16446
164471995-12-27 Richard Stallman <rms@gnu.org>
16448
16449 * bison.simple (YYPARSE_PARAM_DECL):
16450 In C++, make it always null.
16451 (YYPARSE_PARAM_ARG): New macro.
16452 (yyparse): Use YYPARSE_PARAM_ARG.
16453
164541995-11-29 Richard Stallman <rms@gnu.org>
16455
16456 * doc/bison.texinfo:
16457 Describe literal string tokens, %raw, %no_lines, %token_table.
16458
164591995-11-29 Daniel Hagerty <hag@gnu.org>
16460
16461 * doc/bison.texinfo: Fixed update date
16462
164631995-10-16 Richard Stallman <rms@gnu.org>
16464
16465 * src/version.c: Version 1.25.
16466
164671995-10-16 Richard Stallman <rms@gnu.org>
16468
16469 * NEWS: *** empty log message ***
16470
164711995-10-16 Richard Stallman <rms@gnu.org>
16472
16473 * doc/bison.1, doc/bison.rnh:
16474 Add new options.
16475
164761995-10-15 Richard Stallman <rms@gnu.org>
16477
16478 * src/vmsgetargs.c, src/getargs.c:
16479 Added -n, -k, and -raw switches.
16480 (noparserflag, toknumflag, rawtoknumflag): New variables.
16481
16482 * src/symtab.h (SALIAS):
16483 New #define for adding aliases to %token.
16484 (struct bucket): Added `alias' field.
16485
16486 * src/reduce.c (reduce_grammar):
16487 Revise error message.
16488 (print_notices): Remove final `.' from error message.
16489
16490 * src/reader.c (reader_output_yylsp):
16491 New function.
16492 (readgram): Use `#if 0' around code that accepted %command
16493 inside grammar rules: The documentation doesn't allow it,
16494 and it will fail since the %command processors scan for the next %.
16495 (parse_token_decl): Extended the %token
16496 declaration to allow a multi-character symbol as an alias.
16497 (parse_thong_decl): New function.
16498 (read_declarations): Added %thong declarations.
16499 (read_declarations): Handle NOOP to deal with allowing
16500 % declarations as another means to specify the flags.
16501 (readgram): Allow %prec prior to semantics embedded in a rule.
16502 (skip_to_char, read_declarations, copy_definition)
16503 (parse_token_decl, parse_start_decl, parse_type_decl)
16504 (parse_assoc_decl, parse_union_decl, parse_expect_decl)
16505 (get_type_name, copy_guard, copy_action, readgram)
16506 (get_type, packsymbols): Revised most error messages.
16507 Changed `fatal' to `warnxxx' to avoid aborting for error.
16508 Revised and use multiple warnxxx functions to avoid using VARARGS1.
16509 (read_declarations): Improve the error message for
16510 an invalid character. Do not abort.
16511 (read_declarations, copy_guard, copy_action): Use
16512 printable_version to avoid unprintable characters in printed output.
16513 (parse_expect_decl): Error if argument to %expect exceeds 10 digits.
16514 (parse_token_decl, parse_assoc_decl, parse_type_decl, get_type):
16515 Allow the type of a non-terminal can be given
16516 more than once, as long as all specifications give the same type.
16517
16518 * src/output.c:
16519 (output_headers, output_trailers, output, output_gram)
16520 (output_rule_data): Implement noparserflag variable.
16521 Implement toknumflag variable.
16522 (output): Call reader_output_yylsp to output LTYPESTR.
16523
16524 * src/main.c (main):
16525 If reader sees an error, don't process the grammar.
16526 (fatals): Updated to not use VARARGS1.
16527 (printable_version, int_to_string, warn, warni, warns, warnss)
16528 (warnsss): New error reporting functions. Avoid abort for error.
16529
16530 * src/lex.h:
16531 Added THONG and NOOP for alias processing.
16532 Added SETOPT for the new code that allows setting options with %flags.
16533
16534 * src/lex.c:
16535 Include getopt.h. Add some extern decls.
16536 (safegetc): New function to deal with EOF gracefully.
16537 (literalchar); new function to deal with reading \ escapes.
16538 (lex): Use literalchar.
16539 (lex): Implemented "..." tokens.
16540 (literalchar, lex, parse_percent_token): Made tokenbuffer
16541 always contain the token. This includes growing the token
16542 buffer while reading an integer.
16543 (parse_percent_token): Replaced if-else statement with percent_table.
16544 (parse_percent_token): Added % declarations as another
16545 way to specify the flags -n, -l, and -r. Also added hooks for
16546 -d, -k, -y, -v, -t, -p, -b, -o, but implementation requires
16547 major changes to files.c.
16548 (lex) Retain in the incoming stream a character following
16549 an incorrect '/'.
16550 (skip_white_space, lex): Revised most error messages
16551 and changed fatal to warn to avoid aborting.
16552 (percent_table): Added %thong declarations.
16553
16554 * src/gram.h: Comment changes.
16555
16556 * src/files.c (openfiles, open_extra_files, done):
16557 Add faction flag
16558 and actfile file. Handle noparserflag. Both for -n switch.
16559
16560 * src/conflicts.c (resolve_sr_conflict):
16561 Remove use of alloca.
16562
165631995-06-01 Jim Meyering <meyering@gnu.org>
16564
16565 * doc/bison.texinfo: *** empty log message ***
16566
165671995-05-06 Richard Stallman <rms@gnu.org>
16568
16569 * src/bison.s1: Comment change.
16570
165711995-05-06 Richard Stallman <rms@gnu.org>
16572
16573 * bison.simple: Comment change.
16574
165751995-05-03 Richard Stallman <rms@gnu.org>
16576
16577 * src/version.c: Version now 1.24.
16578
16579 * src/bison.s1: Change distribution terms.
16580
16581 * src/version.c: Version now 1.23.
16582
165831995-05-03 Richard Stallman <rms@gnu.org>
16584
16585 * doc/bison.texinfo:
16586 Rewrite "Conditions for Using Bison".
16587 Update version to 1.24.
16588
165891995-05-03 Richard Stallman <rms@gnu.org>
16590
16591 * bison.simple: Change distribution terms.
16592
165931995-02-23 Richard Stallman <rms@gnu.org>
16594
16595 * src/files.c: Test __VMS_POSIX as well as VMS.
16596
165971995-02-14 Jim Meyering <meyering@gnu.org>
16598
16599 * src/bison.s1 (__yy_memcpy):
16600 Renamed from __yy_bcopy to avoid
16601 confusion. Reverse FROM and TO arguments to be consistent with
16602 those of memcpy.
16603
166041995-02-14 Jim Meyering <meyering@gnu.org>
16605
16606 * bison.simple (__yy_memcpy):
16607 Renamed from __yy_bcopy to avoid
16608 confusion. Reverse FROM and TO arguments to be consistent with
16609 those of memcpy.
16610
166111994-11-10 David J. MacKenzie <djm@gnu.org>
16612
16613 * NEWS: reformat
16614
16615 * NEWS: New file.
16616
16617 * Makefile.in (DISTFILES): Include NEWS.
16618
16619 * Makefile.in (DISTFILES):
16620 Include install-sh, not install.sh.
16621
16622 * configure.in: Update to Autoconf v2 macro names.
16623
166241994-10-05 David J. MacKenzie <djm@gnu.org>
16625
16626 * Makefile.in: fix typo
16627
16628 * Makefile.in (prefix, exec_prefix):
16629 Let configure set them.
16630
166311994-09-28 David J. MacKenzie <djm@gnu.org>
16632
16633 * Makefile.in: Set datadir to $(prefix)/share.
16634
166351994-09-15 Richard Stallman <rms@gnu.org>
16636
16637 * src/bison.s1:
16638 Update copyright notice and GPL version.
16639
166401994-09-15 Richard Stallman <rms@gnu.org>
16641
16642 * bison.simple:
16643 Update copyright notice and GPL version.
16644
166451994-07-12 Richard Stallman <rms@gnu.org>
16646
16647 * src/reduce.c, src/reader.c:
16648 entered into RCS
16649
166501994-05-05 David J. MacKenzie <djm@gnu.org>
16651
16652 * Makefile.in: entered into RCS
16653
166541994-03-26 Richard Stallman <rms@gnu.org>
16655
16656 * src/bison.s1: entered into RCS
16657
166581994-03-26 Richard Stallman <rms@gnu.org>
16659
16660 * bison.simple: entered into RCS
16661
166621994-03-25 Richard Stallman <rms@gnu.org>
16663
16664 * src/main.c: entered into RCS
16665
166661994-03-24 Richard Stallman <rms@gnu.org>
16667
16668 * src/conflicts.c: entered into RCS
16669
166701994-01-02 Richard Stallman <rms@gnu.org>
16671
16672 * Makefile.in: *** empty log message ***
16673
166741993-11-21 Richard Stallman <rms@gnu.org>
16675
16676 * src/bison.s1: *** empty log message ***
16677
166781993-11-21 Richard Stallman <rms@gnu.org>
16679
16680 * doc/bison.texinfo: entered into RCS
16681
16682 * doc/bison.texinfo: *** empty log message ***
16683
166841993-11-21 Richard Stallman <rms@gnu.org>
16685
16686 * bison.simple: *** empty log message ***
16687
166881993-10-25 David J. MacKenzie <djm@gnu.org>
16689
16690 * doc/bison.texinfo: *** empty log message ***
16691
166921993-10-19 Richard Stallman <rms@gnu.org>
16693
16694 * src/bison.s1: *** empty log message ***
16695
166961993-10-19 Richard Stallman <rms@gnu.org>
16697
16698 * bison.simple: *** empty log message ***
16699
167001993-10-14 Richard Stallman <rms@gnu.org>
16701
16702 * src/bison.s1: *** empty log message ***
16703
167041993-10-14 Richard Stallman <rms@gnu.org>
16705
16706 * bison.simple: *** empty log message ***
16707
167081993-09-14 David J. MacKenzie <djm@gnu.org>
16709
16710 * doc/bison.texinfo: *** empty log message ***
16711
167121993-09-13 Noah Friedman <friedman@gnu.org>
16713
16714 * Makefile.in: *** empty log message ***
16715
167161993-09-10 Richard Stallman <rms@gnu.org>
16717
16718 * src/conflicts.c: *** empty log message ***
16719
16720 * src/system.h: entered into RCS
16721
167221993-09-10 Richard Stallman <rms@gnu.org>
16723
16724 * doc/bison.1: entered into RCS
16725
167261993-09-06 Noah Friedman <friedman@gnu.org>
16727
16728 * src/version.c: entered into RCS
16729
167301993-09-06 Noah Friedman <friedman@gnu.org>
16731
16732 * Makefile.in: *** empty log message ***
16733
167341993-07-30 David J. MacKenzie <djm@gnu.org>
16735
16736 * Makefile.in: *** empty log message ***
16737
167381993-07-24 Richard Stallman <rms@gnu.org>
16739
16740 * src/bison.s1: *** empty log message ***
16741
167421993-07-24 Richard Stallman <rms@gnu.org>
16743
16744 * bison.simple: *** empty log message ***
16745
167461993-07-08 David J. MacKenzie <djm@gnu.org>
16747
16748 * Makefile.in: *** empty log message ***
16749
167501993-07-04 Richard Stallman <rms@gnu.org>
16751
16752 * src/bison.s1: *** empty log message ***
16753
167541993-07-04 Richard Stallman <rms@gnu.org>
16755
16756 * bison.simple: *** empty log message ***
16757
167581993-06-26 David J. MacKenzie <djm@gnu.org>
16759
16760 * src/getargs.c: entered into RCS
16761
167621993-06-26 David J. MacKenzie <djm@gnu.org>
16763
16764 * doc/bison.texinfo: *** empty log message ***
16765
16766 * doc/bison.1: New file.
16767
167681993-06-25 Richard Stallman <rms@gnu.org>
16769
16770 * src/getargs.c: New file.
16771
167721993-06-16 Richard Stallman <rms@gnu.org>
16773
16774 * src/bison.s1: *** empty log message ***
16775
167761993-06-16 Richard Stallman <rms@gnu.org>
16777
16778 * bison.simple: *** empty log message ***
16779
167801993-06-03 Richard Stallman <rms@gnu.org>
16781
16782 * src/bison.s1: New file.
16783
167841993-06-03 Richard Stallman <rms@gnu.org>
16785
16786 * doc/bison.texinfo: *** empty log message ***
16787
167881993-06-03 Richard Stallman <rms@gnu.org>
16789
16790 * bison.simple: New file.
16791
167921993-05-19 Richard Stallman <rms@gnu.org>
16793
16794 * doc/bison.texinfo: New file.
16795
167961993-05-07 Noah Friedman <friedman@gnu.org>
16797
16798 * Makefile.in: *** empty log message ***
16799
168001993-04-28 Noah Friedman <friedman@gnu.org>
16801
16802 * src/reader.c: *** empty log message ***
16803
168041993-04-23 Noah Friedman <friedman@gnu.org>
16805
16806 * src/alloc.h: entered into RCS
16807
168081993-04-20 David J. MacKenzie <djm@gnu.org>
16809
16810 * src/version.c: *** empty log message ***
16811
16812 * src/files.c, src/allocate.c:
16813 entered into RCS
16814
16815 * src/reader.c: *** empty log message ***
16816
16817 * src/lex.c: entered into RCS
16818
16819 * src/conflicts.c: New file.
16820
16821 * src/symtab.c: entered into RCS
16822
16823 * src/alloc.h: New file.
16824
16825 * src/LR0.c: entered into RCS
16826
168271993-04-18 Noah Friedman <friedman@gnu.org>
16828
16829 * src/reader.c: New file.
16830
16831 * src/version.c: *** empty log message ***
16832
168331993-04-18 Noah Friedman <friedman@gnu.org>
16834
16835 * Makefile.in: *** empty log message ***
16836
168371993-04-17 Noah Friedman <friedman@gnu.org>
16838
16839 * Makefile.in: *** empty log message ***
16840
168411993-04-15 Richard Stallman <rms@gnu.org>
16842
16843 * src/main.c, src/files.c:
16844 New file.
16845
168461993-04-15 Noah Friedman <friedman@gnu.org>
16847
16848 * configure.in: entered into RCS
16849
16850 * configure.in: *** empty log message ***
16851
16852 * configure.in: New file.
16853
168541993-04-14 Richard Stallman <rms@gnu.org>
16855
16856 * Makefile.in: New file.
16857
168581993-04-13 Richard Stallman <rms@gnu.org>
16859
16860 * src/version.c: New file.
16861
168621993-03-25 Richard Stallman <rms@gnu.org>
16863
16864 * src/output.c: entered into RCS
16865
168661992-09-25 Richard Stallman <rms@gnu.org>
16867
16868 * configure.bat: entered into RCS
16869
168701992-06-22 Richard Stallman <rms@gnu.org>
16871
16872 * src/vmsgetargs.c: entered into RCS
16873
168741992-06-22 Richard Stallman <rms@gnu.org>
16875
16876 * doc/bison.rnh: entered into RCS
16877
168781992-04-20 David J. MacKenzie <djm@gnu.org>
16879
16880 * README: entered into RCS
16881
168821992-01-22 Richard Stallman <rms@gnu.org>
16883
16884 * src/machine.h: entered into RCS
16885
168861991-12-21 Richard Stallman <rms@gnu.org>
16887
16888 * src/lalr.c, src/closure.c:
16889 entered into RCS
16890
168911991-12-20 Richard Stallman <rms@gnu.org>
16892
16893 * src/state.h: entered into RCS
16894
168951991-12-18 Richard Stallman <rms@gnu.org>
16896
16897 * src/print.c, src/nullable.c, src/derives.c:
16898 entered into RCS
16899
169001991-11-03 David J. MacKenzie <djm@gnu.org>
16901
16902 * src/warshall.c, src/types.h, src/symtab.h, src/lex.h, src/gram.c, src/gram.h, src/files.h:
16903 entered into RCS
16904
169051988-09-09 Richard Stallman <rms@gnu.org>
16906
16907 * src/bison.hairy: entered into RCS
16908
169091987-12-16 Richard Stallman <rms@gnu.org>
16910
16911 * REFERENCES: entered into RCS
dc546b0f 16912
f294a2c2 16913
04098407 16914 -----
f294a2c2 16915
04098407 16916 Copyright (C) 1987, 1988, 1991, 1992, 1993, 1994, 1995, 1996,
e2a21b6f
PE
16917 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free
16918 Software Foundation, Inc.
f294a2c2 16919
04098407
PE
16920 Copying and distribution of this file, with or without
16921 modification, are permitted provided the copyright notice and this
16922 notice are preserved.
e9071366
AD
16923
16924$Id$