]> git.saurik.com Git - bison.git/blame - ChangeLog
Suppress signed/unsigned comparison warnings for yycheck.
[bison.git] / ChangeLog
CommitLineData
06e8700a
JD
12006-08-09 Joel E. Denny <jdenny@ces.clemson.edu>
2
3 Suppress signed/unsigned comparison warnings for yycheck.
4 * data/c.m4 (b4_safest_int_type): New macro.
5 * data/glr.c, data/lalr1.cc: Wherever you compare yycheck[i] against
6 a signed int type, cast it to b4_safest_int_type first.
7 * data/yacc.c: Likewise.
8 (b4_safest_int_type): Overwrite the one from c.m4 since b4_int_type is
9 also overwritten.
10
9c437126
PE
112006-08-09 Ralf Wildenhues <Ralf.Wildenhues@gmx.de> (tiny change)
12
13 * doc/bison.texinfo: Fix some typos.
14
284d8a13
PE
152006-08-02 Paul Eggert <eggert@cs.ucla.edu>
16
17 * m4/.cvsignore: Add inttypes_h.m4,lib-ld.m4, lib-prefix.m4,
18 po.m4, stdint_h.m4, uintmax_t.m4, ulonglong.m4, warning.m4.
19
20 * bootstrap (gnulib_tool): Stop using --assume-autoconf;
21 the latest gnulib does this a different way.
22 (get_translations): Sharuzzaman Ahmat Raslan reported that the ms
23 translation was patched, so stop omitting it.
24
ec5479ce
JD
252006-07-29 Joel E. Denny <jdenny@ces.clemson.edu>
26
27 Enable declaration of default %printer/%destructor. Make the parser
28 use these for all user-declared grammar symbols for which the user does
29 not declare a specific %printer/%destructor. Thus, the parser uses it
30 for token 0 if the user declares it but not if Bison generates it as
31 $end. Discussed starting at
32 <http://lists.gnu.org/archive/html/bison-patches/2006-02/msg00064.html>,
33 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00091.html>,
34 and
35 <http://lists.gnu.org/archive/html/bison-patches/2006-07/msg00019.html>.
36 * NEWS (2.3+): Mention.
37 * doc/bison.texinfo (Actions in Mid-Rule): It's no longer impossible to
38 declare a %destructor for a mid-rule's semantic value. It's just
39 impossible to declare one specific to it.
40 (Freeing Discarded Symbols): Mention that @$ can be used in %destructor
41 code. Describe default %destructor form.
42 * src/parse-gram.y (grammar_declaration): Parse default
43 %printer/%destructor declarations.
44 * src/output.c (symbol_destructors_output): Use symbol_destructor_get
45 and symbol_destructor_location_get rather than accessing the destructor
46 and destructor_location members of struct symbol.
47 (symbol_printers_output): Likewise but for %printer's.
48 * src/reader.c (symbol_should_be_used): Likewise but for %destructor's
49 again.
50 * src/symtab.c (default_destructor, default_destructor_location,
51 default_printer, default_printer_location): New static global
52 variables to record the default %destructor and %printer.
53 (symbol_destructor_get, symbol_destructor_location_get,
54 symbol_printer_get, symbol_printer_location_get): New functions to
55 compute the appropriate %destructor and %printer for a symbol.
56 (default_destructor_set, default_printer_set): New functions to set the
57 default %destructor and %printer.
58 * src/symtab.h: Prototype all those new functions.
59 * tests/actions.at (Default %printer and %destructor): New test to
60 check that the right %printer and %destructor are called, that they're
61 not called for $end, and that $$ and @$ work correctly.
62 (Default %printer and %destructor for user-declared end token): New
63 test to check that the default %printer and %destructor are called for
64 a user-declared end token.
65 * tests/input.at (Default %printer and %destructor redeclared, Unused
66 values with default %destructor): New tests to check related grammar
67 warnings and errors.
68
868d2d96
JD
692006-07-29 Joel E. Denny <jdenny@ces.clemson.edu>
70
71 Clean up handling of %destructor for the end token (token 0).
72 Discussed starting at
73 <http://lists.gnu.org/archive/html/bison-patches/2006-07/msg00019.html>
74 and
75 <http://lists.gnu.org/archive/html/help-bison/2006-07/msg00013.html>.
76
77 Make the skeletons consistent in how they pop the end token and invoke
78 its %destructor.
79 * data/glr.c (yyrecoverSyntaxError, yyparse): Don't pop the start
80 state, which has token number 0, since this would invoke the
81 %destructor for the end token.
82 * data/lalr1.cc (yy::parser::parse): Don't check for the final state
83 until after shifting the end token, or else it won't be popped.
84 * data/yacc.c (yyparse): Likewise.
85
86 * data/glr.c (yyparse): Clear the lookahead after shifting it even when
87 it's the end token. Upon termination, destroy an unshifted lookahead
88 even when it's the end token.
89 * data/lalr1.cc (yy::parser::parse): Likewise.
90 * data/yacc.c (yyparse): Likewise.
91
92 * src/reader.c (packgram): Don't check rule 0. This suppresses unused
93 value warnings for the end token when the user gives the end token a
94 %destructor.
95
96 * tests/actions.at (Printers and Destructors): Test all the above.
97
62a9592d
PE
982006-07-24 Paul Eggert <eggert@cs.ucla.edu>
99
100 Update to latest gnulib and gettext versions.
101 * bootstrap (gnulib-modules): Remove hard-locale, stdio-safer.
102 Add fopen-safer.
103 (gnulib_files): Add m4/warning.m4. Don't worry about files
104 overwritten by autopoint.
105 Replace gt_INTL_SUBDIR_CORE with an empty body in m4/gettext_gl.m4.
106 Suppress "id", "ms", "tr" translations for now, since gettext 0.15
107 rejects them.
108 Don't use autoreconf; instead, invoke autopoint etc. by hand,
109 so that we can remove the intl files at a better time.
110 (intl_files_to_remove): Remove aclocal.m4, since it gets
111 rebuilt anyway. Remove m4/inttypes_h.m4, m4/inttypes.m4,
112 m4/isc-posix.m4, m4/lib-ld.m4, m4/lib-prefix.m4, m4/po.m4,
113 m4/stdint_h.m4, m4/uintmax_t.m4, m4/ulonglong.m4.
114 Add m4/inttypes-h.m4, m4/lock.m4, m4/visibility.m4.
115 Remove datarootdir hack; no longer needed.
116 * configure.ac: Use gl_WARNING_CFLAGS rather than BISON_WARNING.
117 (AM_GNU_GETTEXT_VERSION): Bump from 0.12 to 0.15.
118 * lib/.cvsignore: Remove hard-locale.c, hard-locale.h, strdup.c,
119 strdup.h.
120 * m4/.cvsignore: Remove hard-locale.m4, strdup.m4.
121 * m4/warning.m4: Remove from CVS, since we now use gnulib's version.
122
10d6970f
PE
1232006-07-20 Paul Eggert <eggert@cs.ucla.edu>
124
125 * bootstrap: Adjust to today's change to gnulib-tool by invoking
126 it with --assume-autoconf='latest-stable'.
127
50a33993
JD
1282006-07-13 Joel E. Denny <jdenny@ces.clemson.edu>
129
130 * src/parse-gram.y (grammar_declaration): Don't confuse Doxygen (at
131 least 1.4.7 and 1.4.4) by putting a #line between `typedef union
132 YYSTYPE' and `{'.
133 * src/muscle_tab.h (muscle_grow): Replace the header comments with
134 those from muscle_tab.c since the old ones are misleading.
135
2ce4ed68
AD
1362006-07-13 Akim Demaille <akim@epita.fr>
137
138 Support %define "KEY" {VALUE}.
139 * src/scan-code.h, src/scan-code.l (translate_action)
140 (translate_rule_action, translate_symbol_action, translate_code):
141 Return char *, not const char *.
142 * src/parse-gram.y (declaration): Rename as...
143 (prologue_declaration): this.
144 (string_content): Remove this nonterminal, use STRING.
145 (braceless, content, content.opt): New nonterminal.
146 Use them.
147 (%define): Now accept content.opt, i.e., accept also BRACED_CODE
148 as value.
149 * src/scan-gram.l (getargs.h): Don't include it.
150
db7e5eb5
PE
1512006-07-12 Paul Eggert <eggert@cs.ucla.edu>
152
153 * data/lalr1.cc (YYCDEBUG): Use 'if (yydebug_) (*yycdebug_)'
154 rather than a for-loop that declares a local bool variable. This
155 should work around a compatibility problem with a Cray x1e C++
156 compiler reported by Hung Nguyen in
157 <http://lists.gnu.org/archive/html/help-bison/2006-07/msg00022.html>.
158 The for-loop was introduced in the 2004-11-17 change but I don't
159 know why it was needed.
160
a5d80ba5
AD
1612006-07-12 Akim Demaille <akim@epita.fr>
162
163 * data/c.m4: Comment changes.
164
23eb2a69
AD
1652006-07-10 Akim Demaille <akim@lrde.epita.fr>
166
167 * src/complain.c (error_message, ERROR_MESSAGE): New.
168 To factor...
169 (fatal_at, fatal, warn_at, warn, complain_at, complain): these.
170 * src/complain.h, src/complain.c (warning_issued): Remove, unused.
171
ddc8ede1
PE
1722006-07-09 Paul Eggert <eggert@cs.ucla.edu>
173
174 * NEWS: Instead of %union, you can define and use your own union type
175 YYSTYPE if your grammar contains at least one <type> tag.
176 Your YYSTYPE need not be a macro; it can be a typedef.
177 * doc/bison.texinfo (Value Type, Multiple Types, Location Type):
178 (Union Decl, Decl Summary): Document this.
179 * data/glr.c (YYSTYPE): Implement this.
180 * data/glr.cc (YYSTYPE): Likewise.
181 * data/lalr1.cc (YYSTYPE): Likewise.
182 * data/yacc.c (YYSTYPE): Likewise.
183 * src/output.c (prepare): Output tag_seen_flag.
184 * src/parse-gram.y (declaration, grammar_declaration):
185 Use 'union_seen' rather than 'typed' to determine whether
186 %union has been seen, since grammars can now be typed without
187 %union.
188 (symbol_declaration, type.opt, symbol_def):
189 Keep track of whether a tag has been seen.
190 * src/reader.c (union_seen, tag_seen): New vars.
191 (typed): remove.
192 * src/reader.h (union_seen, tag_seen, typed): Likewise.
193 * src/scan-code.l (untyped_var_seen): New variable.
194 (handle_action_dollar): Adjust to above changes.
195 (handle_action_dollar, handle_action_at):
196 Improve overflow checking for outlandish numbers.
197 * tests/input.at (AT_CHECK_UNUSED_VALUES): Redo test to
198 avoid new diagnostics generated by above changes.
199 * tests/regression.at (YYSTYPE typedef): Add test to check
200 for type tags without %union.
201
202 * src/symlist.c (symbol_list_length): Return int, not unsigned
203 int, since callers expect int. This may need to get revisited
204 once we have proper integer overflow checking.
205
206 * src/scan-gram.h (gram_scanner_cursor): Remove decl, since this
207 object is now static.
208
209 * src/getargs.c (flags_argmatch): Return void, not int,
210 to pacify ./configure --enable-gcc-warnings.
211
212 * src/flex-scanner.h (STRING_FREE): Don't use FLEX_PREFIX (last_string)
213 since last_string is already defined to FLEX_PREFIX (last_string).
214
7b42569e
AD
2152006-07-09 Akim Demaille <akim@lrde.epita.fr>
216
217 Implement --warnings/-W.
218 * src/getargs.c (report_argmatch, trace_argmatch): Remove,
219 replaced by...
220 (flags_argmatch, FLAGS_ARGMATCH): this new function and macro.
221 Adjust callers.
222 * src/getargs.h, src/getargs.c (warnings, warnings_flags)
223 (warnings_args, warnings_types): New.
224 (getargs, short_options, long_options): Accept -W/--warnings.
225 Sort the options by alphabetical order, upper case letter right
226 before its lower case.
227
3b452f4e
JD
2282006-07-09 Joel E. Denny <jdenny@ces.clemson.edu>
229
230 Change %merge result type clash warnings to errors. Discussed at
231 <http://lists.gnu.org/archive/html/bison-patches/2006-07/msg00026.html>.
232 * src/reader.c (record_merge_function_type): Use complain_at.
233 * tests/glr-regression.at (Missed %merge type warnings when LHS type is
234 declared later): Update test case results.
235
b8a41559
AD
2362006-07-09 Akim Demaille <akim@lrde.epita.fr>
237
238 * src/getargs.h, src/getargs.c: Swap --report and --trace handling
239 to be in alphabetical order.
240 (trace_args): Spelling fixes.
241
cd9e1ba2
PE
2422006-07-09 Paul Eggert <eggert@cs.ucla.edu>
243
244 * data/yacc.c (YYID, yy_stack_print): Prefix local vars with "yy"
245 so they don't collide with user-defined macros.
246 (yy_stack_print): Don't assume that yytype_int16 promotes to int;
247 this was never guaranteed, and now that we're using gnulib stdint,
248 which defines int_fast16_t to long int, the problem is exposed.
249
cb48f191
PE
2502006-07-08 Paul Eggert <eggert@cs.ucla.edu>
251
b8445a15
PE
252 * data/c.m4 (b4_basename): Simplify a bit, since we don't
253 need the full POSIX semantics (and weren't implementing them
254 anyway).
255
cb48f191
PE
256 Adjust to Autoconf 2.60 and today's gnulib.
257 * bootstrap (gnulib_modules): Add stdint.
258 Remove special case for m4/onceonly_2_57.m4, since gnulib-tool
259 no longer copies it.
260 (intl_files_to_remove): Remove m4/longlong.m4 and m4/wchar_t.m4,
261 since stdint needs the former and wcwidth (which is now required
262 by mbswidth) needs the latter.
263 Append 'datarootdir = @datarootdir@' to po/Makefile.in.in, to
264 work around a compatibility glitch between gettext 0.14.6 and
265 Autoconf 2.60.
266 * configure.ac (AC_PREREQ): Require Autoconf 2.60.
267 Do not check for uintptr_t, since new stdint module does the right
268 thing.
269 * lib/.cvsignore: Remove alloca.c, alloca.h, alloca_.h.
270 Add stdint.h, stdint_.h, wcwidth.h.
271 * m4/.cvsignore: Remove alloca.m4, onceonly.m4.
272 Add absolute-header.m4, double-slash-root.m4, longlong.m4,
273 stdint.m4, wchar_t.m4, wcwidth.m4.
274 * src/files.c: Include <dirname.h> and <stdio-safer.h> in the
275 usual order for ../lib/*.h files.
276 (file_name_split): Use last_component, not base_name, to adjust
277 to gnulib changes.
278 * src/parse-gram.h: Include <strverscmp.h> in the usual order
279 for ../lib/*.h files.
280 (YYTYPE_INT16, YYTYPE_INT8, YYTYPE_UINT16, YYTYPE_UINT8):
281 Define unconditionally, since we now assume the stdint module.
282 * src/scan-skel.l: Include <dirname.h>.
283 (BASE_QPUTS): Use last_component, not base_name.
284 * src/system.h: Include <unlocked-io.h> in the usual order
285 for ../lib/*.h files. Include <stdint.h> unconditionally,
286 since we now use the stdint module.
287 (uintptr_t): Declare if UINTPTR_MAX is not defined, not
288 HAVE_UINTPTR_T, since we now use the stdint module.
289 (base_name): Remove decl, since files now include <dirname.h>
290 to get the decl.
291
cd48d21d
AD
2922006-07-08 Akim Demaille <akim@lrde.epita.fr>
293
294 * data/c.m4 (b4_location_initial_column, b4_location_initial_line):
295 New, default to 1.
296 * data/yacc.c, data/glr.c, data/location.cc: Use them.
297 * NEWS, doc/bison.texinfo: The initial column and line are 1 by
298 default.
299 * tests/calc.at: Adjust.
300
8ec0a172
AD
3012006-07-08 Akim Demaille <akim@lrde.epita.fr>
302
b8445a15 303 * data/c.m4 (b4_basename): New.
8ec0a172
AD
304 (b4_syncline): Also output the location of its invocation (from
305 the skeleton).
306 (b4_user_action, b4_define_user_action, b4_user_actions)
307 (b4_user_initial_action, b4_user_post_prologue, b4_user_start_header)
308 (b4_user_stype): New.
309 * data/yacc.c, data/glr.c, data/lalr1.cc, data/glr.cc: Use them.
310
4a678af8
JD
3112006-07-07 Joel E. Denny <jdenny@ces.clemson.edu>
312
313 In the grammar file, the first column is 1 not 0 on the first line as
314 on every other line.
315 * src/parse-gram.y (%initial-action): Initialize @$ correctly.
316 * tests/input.at (Torturing the Scanner): Update output.
317
318 * src/scan-gram.l (scanner_cursor): Declare it static.
319
dd60572a
JD
3202006-07-07 Joel E. Denny <jdenny@ces.clemson.edu>
321
322 In warnings, say "previous declaration" rather than "first
323 declaration".
324 * src/symtab.c (redeclaration): Do that here.
325 * src/reader.c (record_merge_function_type): In the case of a result
326 type clash, report the previous declaration rather than the very first
327 one in the grammar file.
328 * tests/glr-regression.at (Missed %merge type warnings when LHS type is
329 declared later): Add a third declaration to check this behavior.
330 * tests/input.at (Incompatible Aliases): Update output.
331
2073e1b6
AD
3322006-06-27 Akim Demaille <akim@epita.fr>
333
334 * doc/Doxyfile.in: New.
335 * doc/Makefile.am: Use it.
336 * src/lalr.h, src/symtab.h: Initial doxygenation.
337
8ee5b538
JD
3382006-06-26 Joel E. Denny <jdenny@ces.clemson.edu>
339
340 Don't miss %merge result type warnings just because the LHS types are
fab044e6
JD
341 declared after the %merge. This continues the effort of the previous
342 patch.
8ee5b538
JD
343 * src/reader.c (get_merge_function): Don't set the merger type yet.
344 (record_merge_function_type): New function for setting the merger type
345 and checking for clashes.
346 (grammar_current_rule_merge_set): Set the location of the %merge for
347 the current rule.
348 (packgram): Invoke record_merge_function_type for each rule now that
349 all symbol type declarations have been parsed.
350 * src/reader.h (merger_list.type_declaration_location): New member
351 storing the location of the first %merge from which the type for this
352 merging function was derived.
353 * src/symlist.h (symbol_list.merger_declaration_location): New member
354 storing the location of a rule's %merge, if any.
355 * tests/glr-regression.at (Missed %merge type warnings when LHS type is
356 declared later): New test to catch the error fixed by the above patch.
357
ffa4ba3a
JD
3582006-06-26 Joel E. Denny <jdenny@ces.clemson.edu>
359
360 Get action warnings (grammar_rule_check) right even when symbol
fab044e6
JD
361 declarations appear after the rules. Discussed at
362 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00108.html>
363 and
364 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00151.html>.
365 Don't mistake the type of $$ in a midrule to be that of its parent
366 rule's $$.
ffa4ba3a
JD
367 * src/reader.c (grammar_current_rule_end): Don't invoke
368 grammar_rule_check yet since not all symbol declarations may have been
369 parsed yet.
370 (grammar_midrule_action): Likewise.
371 Don't record whether the midrule's $$ has been used yet since actions
372 haven't been translated yet.
373 Record the midrule's parent rule and its RHS index within the parent
374 rule.
375 (grammar_current_rule_action_append): Don't translate the action yet
376 since not all symbol declarations may have been parsed yet and, thus,
377 warnings about types for $$, $n, @$, and @n can't be reported yet.
378 (packgram): Translate the action and invoke grammar_rule_check now that
379 all symbol declarations have been parsed.
380 * src/scan-code.l (handle_action_dollar): Now that this is invoked
381 after parsing the entire grammar file, the symbol list here in the case
382 of a midrule is actually the midrule's empty RHS, so reference its
383 parent rule's RHS where necessary.
384 On the other hand, now that you can already know it's a midrule, you
385 aren't forced to think $$ has the same type as its parent rule's $$.
386 (handle_action_at): In the case of a midrule, reference the parent rule
387 where necessary.
388 * src/symlist.c (symbol_list_new): Initialize new midrule-related
389 members.
390 (symbol_list_length): Now that this is invoked after all rules have
391 been parsed, a NULL symbol (rather than a NULL symbol list node)
392 terminates a rule. symbol_list_print already does this correctly.
393 * src/symlist.h (symbol_list.midrule_parent_rule,
394 symbol_list.midrule_parent_rhs_index): New members so that midrules can
395 remember their relationships with their parents.
396 * tests/input.at (Type Clashes): Extend to catch the midrule $$ error
397 fixed by the above patch.
398 (_AT_UNUSED_VALUES_DECLARATIONS, AT_CHECK_UNUSED_VALUES): New m4 macros
399 implementing...
400 (Unused values): ... this old test case and...
401 (Unused values before symbol declarations): ... this new test case.
402 This one is the same as `Unused values' except that all symbol
403 declarations appear after the rules in order to catch the rest of the
404 errors fixed by the above patch.
405
e256e17f
JD
4062006-06-26 Joel E. Denny <jdenny@ces.clemson.edu>
407
300a1930
JD
408 More cleanup.
409 * src/reader.c (current_rule): Declare it static since it's no longer
410 used outside this file.
411 (grammar_current_rule_action_append): Remove redundant arguments from
412 translate_rule_action invocation.
413 * src/reader.h (current_rule): Remove this unused extern.
414 * src/scan-code.h (translate_rule_action): Remove redundant arguments.
415 * src/scan-code.l (translate_rule_action): Likewise.
e256e17f 416
381ecb06
JD
4172006-06-25 Joel E. Denny <jdenny@ces.clemson.edu>
418
419 Clean up yesterday's patch.
420 * parse-gram.y (rhs): Move grammar_midrule_action invocation from here
421 to...
422 * src/reader.c (grammar_current_rule_action_append): ... here for
423 consistency with grammar_current_rule_symbol_append.
424 * tests/regression.at (Braced code in declaration in rules section):
425 Make yyerror and yylex static as usual.
426
4210cd0b
JD
4272006-06-24 Joel E. Denny <jdenny@ces.clemson.edu>
428
429 Fix bug that mistakes braced code in a declaration in the rules section
430 to be a rule action. Mentioned at
431 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00105.html>.
432 * src/scan-gram.l: Move midrule action detection from the start of the
433 scanning of any braced code to...
434 * src/parse-gram.y (rhs): ... the parsing of braced code as a rule
435 action. For readability, use $2 and @2 rather than the equivalent
436 global variables.
437 * tests/regression.at (Braced code in declaration in rules section):
438 New test to catch the error fixed by the above patch.
439
440 Work on code readability some.
441 * src/scan-code.l (current_rule): Get rid of this misleading and
442 redundant declaration: it's actually extern'ed in reader.h.
443 (YY_DECL, code_lex, handle_action_dollar, handle_action_at,
444 translate_action): Add a rule argument and use it instead of the global
445 current_rule.
446 (translate_rule_action): This already receives current_rule through an
447 argument, so pass it on to translate_action instead of assigning
448 current_rule to current_rule.
449 (translate_symbol_action, translate_code): Pass rule = NULL to
450 translate_action.
451
34f98f46
JD
4522006-06-23 Joel E. Denny <jdenny@ces.clemson.edu>
453
454 Rename %before-definitions to %start-header and %after-definitions to
455 %end-header. Don't use these declarations to separate pre-prologue
456 blocks from post-prologue blocks. Add new order-independent
457 declarations %before-header and %after-header as alternatives to the
458 traditional Yacc pre-prologue and post-prologue blocks. Discussed at
459 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00110.html>.
460 * NEWS (2.3+): Update for these changes.
461 * data/glr.c (b4_before_definitions): Update to...
462 (b4_start_header): ... this.
463 (b4_after_definitions): Update to...
464 (b4_end_header): ... this.
465 * data/glr.cc: Likewise.
466 * data/lalr1.cc: Likewise.
467 * data/yacc.c: Likewise.
468 * doc/bison.texinfo (The prologue): Update names, and replace remaining
469 prologue blocks with %*-header declarations.
470 (Calc++ Parser): Likewise.
471 (Bison Declaration Summary): Update names.
472 (Bison Symbols): Update description.
473 * src/parse-gram.y (PERCENT_AFTER_DEFINITIONS): Update to...
474 (PERCENT_END_HEADER): ... this.
475 (PERCENT_BEFORE_DEFINITIONS): Update to...
476 (PERCENT_START_HEADER): ... this.
477 (PERCENT_AFTER_HEADER, PERCENT_BEFORE_HEADER): New tokens.
478 (declaration): Update token names and m4 macro names.
479 When parsing %end-header and %start-header, invoke translate_code
480 before muscle_code_grow, and no longer set global booleans to remember
481 whether these declarations have been seen.
482 Parse new %after-header and %before-header.
483 * src/reader.c (before_definitions, after_definitions): Remove.
484 (prologue_augment): Accept a new bool argument to specify whether to
485 augment the pre-prologue or post-prologue.
486 * src/reader.h (before_definitions, after_definitions): Remove these
487 extern's.
488 (prologue_augment): Add new bool argument.
489 * src/scan-gram.l (PERCENT_AFTER_DEFINITIONS): Update to...
490 (PERCENT_END_HEADER): ... this.
491 (PERCENT_BEFORE_DEFINITIONS): Update to...
492 (PERCENT_START_HEADER): ... this.
493 (PERCENT_AFTER_HEADER, PERCENT_BEFORE_HEADER): New tokens.
494 * tests/actions.at (Printers and Destructors): Update names.
495
31b2b07e
JD
4962006-06-22 Joel E. Denny <jdenny@ces.clemson.edu>
497
498 Add comparison operators for C++ location classes. Discussed at
499 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00092.html>.
500 * data/c++.m4 (b4_define_location_comparison): New boolean %define
501 declaration indicating whether filename_type has an operator==. If
502 filename_type is `std::string', it defaults to `1', `0' otherwise.
503 * data/location.cc: Iff b4_define_location_comparison is `1', add
504 operator== and operator!= for class position and for class location.
505
506 Some minor fixes.
507 * src/scan-action.l: Remove unused file.
508 * src/symtab.c (symbol_printer_set): Use printer_location not
509 destructor_location.
510 * src/symtab.h (struct symbol): Replace incorrect source comment for
511 printer members.
512 * tests/input.at (Incompatible Aliases): Update output with correct
513 printer location.
514
9bc0dd67
JD
5152006-06-20 Joel E. Denny <jdenny@ces.clemson.edu>
516
517 Don't put the pre-prologue in the header file. For the yacc.c code
518 file and the glr.c header and code files, move the pre-prologue before
519 the token definitions. Add new %before-definitions and
520 %after-definitions to declare code that will go in both the header file
521 and code file. Discussed at
522 <http://lists.gnu.org/archive/html/bison-patches/2005-12/msg00000.html>,
523 <http://lists.gnu.org/archive/html/bison-patches/2006-01/msg00016.html>,
524 and
525 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00055.html>.
526 * NEWS (2.3+): Describe these changes.
527 * data/glr.c (b4_pre_prologue): Move from within to before...
528 (b4_shared_declarations): ... this.
529 Add new b4_before_definitions before b4_token_enums.
530 Add new b4_after_definitions at the end.
531 * data/glr.cc (b4_pre_prologue): Replace with...
532 (b4_before_definitions): ... this in the header file.
533 (b4_after_definitions): New near the end of the header file.
534 * data/lalr1.cc (b4_pre_prologue): Move from the header file to the
535 code file right before including the header file.
536 (b4_before_definitions): New in the previous position of
537 b4_pre_prologue in the header file.
538 (b4_after_definitions): New near the end of the header file.
539 * data/yacc.c: Clean up some m4 quoting especially in the header file.
540 (b4_token_enums_defines): In the code file, move to right before
541 YYSTYPE for consistency with the header file.
542 (b4_before_definitions): New right before b4_token_enums_defines in
543 both the header and code file.
544 (b4_after_definitions): New right after YYLTYPE and yylloc in both the
545 header and code file.
546 * doc/bison.texinfo (Prologue): Show use of %before-definitions instead
547 of prologues for %union dependencies.
548 (Bison Declaration Summary): In %defines description, mention the
549 effect of %before-definitions and %after-definitions on the header
550 file.
551 (Calc++ Parser): Forward declare driver in a %before-definitions rather
552 than in the pre-prologue so that make check succeeds.
553 (Bison Symbols): Add entries for %before-definitions and
554 %after-definitions.
555 * src/parse-gram.y (PERCENT_BEFORE_DEFINITIONS): New token for
556 %before-definitions.
557 (PERCENT_AFTER_DEFINITIONS): New token for %after-definitions.
558 (declaration): Parse those declarations and append to
559 b4_before_definitions and b4_after_definitions, respectively.
560 * src/reader.c (before_definitions, after_definitions): New bools to
561 track whether those declarations have been seen.
562 (prologue_augment): Add to the post-prologue if %union,
563 %before-definitions, or %after-definitions has been seen.
564 * src/reader.h (before_definitions, after_definitions): New extern's.
565 * src/scan-gram.l: Scan the new declarations.
566 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Place the second
567 prologue block in a %before-definitions or a %after-definitions based
568 on whether the %union is declared.
569 * tests/regression.at (Early token definitions with --yacc, Early token
570 definitions without --yacc): Move tests for token definitions into the
571 post-prologue since token names are no longer defined in the
572 pre-prologue.
573
203b9274
AD
5742006-06-20 Akim Demaille <akim@epita.fr>
575
576 * src/symtab.h, src/symtab.c (symbol_from_uniqstr): New.
577 (symbol_get): Use it.
578 * src/parse-gram.y: Use it.
579
a7ee59cf
JD
5802006-06-19 Joel E. Denny <jdenny@ces.clemson.edu>
581
582 * src/scan-gram.l: Remove unused declaration of last_string_1 so the
583 build succeeds when configured with --enable-gcc-warnings.
584
5a2baae7
PE
5852006-06-19 Paul Eggert <eggert@cs.ucla.edu>
586
33ad1a9c
PE
587 * src/parse-gram.y (char_name): New function.
588 (CHAR, STRING, string_content): For %printer, properly escape.
589 (ID): Prefer fputs to fprintf.
590 (id): Reindent to be consistent with other rules.
591 Properly quote char.
592
5a2baae7
PE
593 The Translation Project changed its way of publishing translations
594 to maintainers. I haven't received any responses to my request
595 for supporting the old way, or for documenting the new way. I
596 have modified 'bootstrap' to use screen scraping
597 (in this case, HTML scraping). This is unreliable and inelegant,
598 but I don't see any better way. Yuck.
599 * bootstrap (TP_URL, WGET_COMMAND): New vars.
600 (get_translations): New function, which uses HTML scraping to
601 deduce locations of latest translations.
602 Use this function to grab both bison and bison-runtime .po files.
603 Don't bother priming the pump for the runtime-po domain any more,
604 as it's now translated better than bison is.
605
58d7a1a1
AD
6062006-06-19 Akim Demaille <akim@epita.fr>
607
608 * src/scan-gram.l: No longer "parse" things after `%union' until
609 `{'. Rather, return a single "%union" token.
610 No longer make symbols: return strings, and leave the conversion
611 to symbols to the parser.
612 (SC_PRE_CODE, token_type): Remove.
613 * src/parse-gram.y (%union): New field `character'.
614 Sort tokens.
615 (CHAR): New token.
616 (ID, ID_COLON): Now that the scanner no longer makes them
617 identifiers, adjust all uses to invoke symbol_get.
618 (id_colon): New, wraps the conversion from string to symbol.
619 (%union): Accept a possible union_name.
620 (symbol): Now can be a char.
621 * data/c.m4 (b4_union_name): Leave a default value.
622 * data/glr.c, data/yacc.c: Use it.
623
b931235e
JD
6242006-06-11 Joel E. Denny <jdenny@ces.clemson.edu>
625
626 For associating token numbers with token names for "yacc.c", don't use
627 #define statements unless `--yacc' is specified; always use enum
628 yytokentype. Most important discussions start at:
629 <http://lists.gnu.org/archive/html/bison-patches/2005-09/msg00053.html>,
630 <http://lists.gnu.org/archive/html/bison-patches/2005-12/msg00052.html>,
631 and
632 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00043.html>.
633 * NEWS (2.3+): Mention.
634 * data/c.m4 (b4_yacc_if): New.
635 (b4_token_enums_defines): Use b4_yacc_if to decide whether to add the
636 token #define's.
637 * doc/bison.texinfo (Bison Options): Describe the effect of `--yacc'
638 on token name definitions.
639 * src/getargs.c (usage): Capitalize `Yacc' in English.
640 * src/output.c (prepare): Define b4_yacc_flag.
641 * tests/regression.at (Early token definitions): Test that tokens names
642 are defined before the pre-prologue not just before the post-prologue.
643 Remove this test case and copy to...
644 (Early token definitions with --yacc): ... this to test #define's.
645 (Early token definitions without --yacc): ... and this to test enums.
646
9e6e7ed2
PE
6472006-06-11 Paul Eggert <eggert@cs.ucla.edu>
648
649 * NEWS: Reword the post-2.3 change to not be so optimistic about
650 removing the old "look-ahead" spelling.
651 Update previous look-ahead/lookahead change reports.
652 * REFERENCES: look-ahead -> lookahead (since that's
653 what he actually wrote).
654 * doc/refcard.tex: look ahead -> lookahead,
655 look-ahead -> lookahead
656
742e4900
JD
6572006-06-09 Joel E. Denny <jdenny@ces.clemson.edu>
658
659 For consistency, use `lookahead' instead of `look-ahead' or
660 `look_ahead'. Discussed starting at
661 <http://lists.gnu.org/archive/html/bison-patches/2006-01/msg00049.html>
662 and then at
663 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00017.html>.
664 * NEWS: For the next release, note the change to `--report'.
665 * TODO, doc/bison.1: Update English.
666 * doc/bison.texinfo: Update English.
667 (Understanding Your Parser, Bison Options): Document as
668 `--report=lookahead' rather than `--report=look-ahead'.
669 * src/conflicts.c: Update English in comments.
670 (lookahead_set): Rename from look_ahead_set.
671 (flush_reduce): Rename argument look_ahead_tokens to lookahead_tokens.
672 (resolve_sr_conflict): Rename local look_ahead_tokens to
673 lookahead_tokens, and update other uses.
674 (flush_shift, set_conflicts, conflicts_solve, count_sr_conflicts,
675 count_rr_conflicts, conflicts_free): Update uses.
676 * src/getargs.c (report_args): Move "lookahead" before alternate
677 spellings.
678 (report_types): Update uses.
679 (usage): For `--report' usage description, state `lookahead' spelling
680 rather than `look-ahead'.
681 * src/getargs.h (report.report_lookahead_tokens): Rename from
682 report_look_ahead_tokens.
683 * src/lalr.c: Update English in comments.
684 (compute_lookahead_tokens): Rename from compute_look_ahead_tokens.
685 (state_lookahead_tokens_count): Rename from
686 state_look_ahead_tokens_count.
687 Rename local n_look_ahead_tokens to n_lookahead_tokens.
688 (lookahead_tokens_print): Rename from look_ahead_tokens_print.
689 Rename local n_look_ahead_tokens to n_lookahead_tokens.
690 Update other uses.
691 Update English in output.
692 (add_lookback_edge, initialize_LA, lalr, lalr_free): Update uses.
693 * src/print.c: Update English in comments.
694 (lookahead_set): Rename from look_ahead_set.
695 (print_reduction): Rename argument lookahead_token from
696 look_ahead_token.
697 (print_core, state_default_rule, print_reductions, print_results):
698 Update uses.
699 * src/print_graph.c: Update English in comments.
700 (print_core): Update uses.
701 * src/state.c: Update English in comments.
702 (reductions_new): Update uses.
703 (state_rule_lookahead_tokens_print): Rename from
704 state_rule_look_ahead_tokens_print, and update other uses.
705 * src/state.h: Update English in comments.
706 (reductions.lookahead_tokens): Rename from look_ahead_tokens.
707 (state_rule_lookahead_tokens_print): Rename from
708 state_rule_look_ahead_tokens_print.
709 * src/tables.c: Update English in comments.
710 (conflict_row, action_row): Update uses.
711 * tests/glr-regression.at
712 (Incorrect lookahead during deterministic GLR,
713 Incorrect lookahead during nondeterministic GLR): Rename
714 print_look_ahead to print_lookahead.
715 * tests/torture.at: Update English in comments.
716 (AT_DATA_LOOKAHEAD_TOKENS_GRAMMAR): Rename from
717 AT_DATA_LOOK_AHEAD_TOKENS_GRAMMAR.
718 (Many lookahead tokens): Update uses.
719 * data/glr.c: Update English in comments.
720 * lalr1.cc: Likewise.
721 * yacc.c: Likewise.
722 * src/conflicts.h: Likewise.
723 * src/lalr.h: Likewise.
724 * src/main.c: Likewise.
725 * src/output.c: Likewise.
726 * src/parse-gram.c: Likewise.
727 * src/tables.h: Likewise.
728 * tests/calc.at: Likewise.
729
3c40d0b5
JD
7302006-06-08 Joel E. Denny <jdenny@ces.clemson.edu>
731
732 * src/flex-scanner.h (yytext): Remove stray `*/' in #define.
733
5d278082
PE
7342006-06-07 Paul Eggert <eggert@cs.ucla.edu>
735
736 * TODO: Add request from Nelson H. F. Beebe to be able to install
737 Bison without installing the yacc script.
738
9e668899
JD
7392006-06-07 Joel E. Denny <jdenny@ces.clemson.edu>
740
741 * src/flex-scanner.h: For the sake of Flex 2.5.4, don't #define yyleng
742 and yytext if they're already #define'd.
743 * src/flex-scanner.h, src/location.h: Move #include "system.h" to...
744 * src/scan-code-c.c: ... here.
745 * src/scan-code.l, src/scan-gram.l: ... and here. Also #include
746 <config.h>.
747
0c8e079f
JD
7482006-06-07 Joel E. Denny <jdenny@ces.clemson.edu>
749
750 Get Bison to build again when configured with --enable-gcc-warnings.
751 * src/location.c, src/location.h, src/main.c, src/scan-code.l: Add some
752 missing #include's.
753 * src/scan-code.l (handle_action_dollar, handle_action_at): Rename
754 loc argument as it shadows a global.
755 * src/scan-gram.l: Remove stray comma that prevents boundary_set
756 invocation.
757
758 * src/.cvsignore: Add scan-code.c.
759
2346344a
AD
7602006-06-07 Akim Demaille <akim@epita.fr>
761
762 * src/scan-gram.l: Move the "add a trailing ; to actions" code
763 to...
764 * src/scan-code.l: here.
765 * tests/input.at (Torturing the Scanner): Fix another location
766 error.
767
4862bdfd
AD
7682006-06-07 Akim Demaille <akim@epita.fr>
769
770 * src/Makefile.am (BUILT_SOURCES): Fix the trailing backslash.
771
e9071366
AD
7722006-06-06 Akim Demaille <akim@epita.fr>
773
774 Extract the parsing of user actions from the grammar scanner.
775 As a consequence, the relation between the grammar scanner and
776 parser is much simpler. We can also split "composite tokens" back
777 into simple tokens.
778 * src/gram.h (ITEM_NUMBER_MAX, RULE_NUMBER_MAX): New.
779 * src/scan-gram.l (add_column_width, adjust_location): Move to and
780 rename as...
781 * src/location.h, src/location.c (add_column_width)
782 (location_compute): these.
783 Fix the column count: the initial column is 0.
784 (location_print): Be robust to ending column being 0.
785 * src/location.h (boundary_set): New.
786 * src/main.c: Adjust to scanner_free being renamed as
787 gram_scanner_free.
788 * src/output.c: Include scan-code.h.
789 * src/parse-gram.y: Include scan-gram.h and scan-code.h.
790 Use boundary_set.
791 (PERCENT_DESTRUCTOR, PERCENT_PRINTER, PERCENT_INITIAL_ACTION)
792 (PERCENT_LEX_PARAM, PERCENT_PARSE_PARAM): Remove the {...} part,
793 which is now, again, a separate token.
794 Adjust all dependencies.
795 Whereever actions with $ and @ are used, use translate_code.
796 (action): Remove this nonterminal which is now useless.
797 * src/reader.c: Include assert.h, scan-gram.h and scan-code.h.
798 (grammar_current_rule_action_append): Use translate_code.
799 (packgram): Bound check ruleno, itemno, and rule_length.
800 * src/reader.h (gram_in, gram__flex_debug, scanner_cursor)
801 (last_string, last_braced_code_loc, max_left_semantic_context)
802 (scanner_initialize, scanner_free, scanner_last_string_free)
803 (gram_out, gram_lineno, YY_DECL_): Move to...
804 * src/scan-gram.h: this new file.
805 (YY_DECL): Rename as...
806 (GRAM_DECL): this.
807 * src/scan-code.h, src/scan-code.l, src/scan-code-c.c: New.
808 * src/scan-gram.l (gram_get_lineno, gram_get_in, gram_get_out):
809 (gram_get_leng, gram_get_text, gram_set_lineno, gram_set_in):
810 (gram_set_out, gram_get_debug, gram_set_debug, gram_lex_destroy):
811 Move these declarations, and...
812 (obstack_for_string, STRING_GROW, STRING_FINISH, STRING_FREE):
813 these to...
814 * src/flex-scanner.h: this new file.
815 * src/scan-gram.l (rule_length, rule_length_overflow)
816 (increment_rule_length): Remove.
817 (last_braced_code_loc): Rename as...
818 (gram_last_braced_code_loc): this.
819 Adjust to the changes of the parser.
820 Move all the handling of $ and @ into...
821 * src/scan-code.l: here.
822 * src/scan-gram.l (handle_dollar, handle_at): Remove.
823 (handle_action_dollar, handle_action_at): Move to...
824 * src/scan-code.l: here.
825 * src/Makefile.am (bison_SOURCES): Add flex-scanner.h,
826 scan-code.h, scan-code-c.c, scan-gram.h.
827 (EXTRA_bison_SOURCES): Add scan-code.l.
828 (BUILT_SOURCES): Add scan-code.c.
829 (yacc): Be robust to white spaces.
830
831 * tests/conflicts.at, tests/input.at, tests/reduce.at,
832 * tests/regression.at: Adjust the column numbers.
833 * tests/regression.at: Adjust the error message.
7891a7c4 834
184e42f0
JD
8352006-06-06 Joel E. Denny <jdenny@ces.clemson.edu>
836
837 * src/getargs.c (usage): Mention GLR not just LALR(1) in --help output.
838 Use Akim's wording from
839 <http://lists.gnu.org/archive/html/bison-patches/2006-05/msg00056.html>.
840
7891a7c4
JD
8412006-06-06 Joel E. Denny <jdenny@ces.clemson.edu>
842
843 Between Bison releases, manually append `+' to the previous Bison
844 release number, and use that as a signal to automatically print the
845 ChangeLog's CVS Id keyword from --version. Discussed starting at
846 <http://lists.gnu.org/archive/html/bison-patches/2006-05/msg00028.html>.
847 * ChangeLog: Add Id header.
848 * configure.ac (AC_INIT): Append `+' to `2.3'.
849 * src/.cvsignore: Add revision.c.
850 * src/Makefile.am (bison_SOURCES): Add revision.c and revision.h.
851 (BUILT_SOURCES): Add revision.c.
852 (revision.c): New target rule. This file defines a new global variable
853 named revision. It initializes it with either the Id from ChangeLog
854 or, if VERSION doesn't contain `+', with the empty string.
855 * src/getargs.c (version): Print the value of revision.
856 * src/revision.h: Extern revision.
857
4ad3ed84
PE
8582006-06-05 Paul Eggert <eggert@cs.ucla.edu>
859
860 * NEWS: Version 2.3.
861 * configure.ac (AC_INIT): Likewise.
862
02103984
PE
8632006-05-30 Paul Eggert <eggert@cs.ucla.edu>
864
865 * data/glr.c (YYRECOVERING): Define to be a function-like macro
866 with no arguments, not as an object-like macro. This is for
867 compatibility with data/yacc.c. Problem reported by John P. Hartmann in
868 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00059.html>.
869 * doc/bison.texinfo (Action Features, Error Recovery, Table of Symbols):
870 Document this.
871
2c08afa5
JD
8722006-05-30 Joel E. Denny <jdenny@ces.clemson.edu>
873
874 * src/getargs.c (usage): Back out yesterday's modification of the
875 --help output so that we don't have to wait for translation before
876 releasing 2.3.
877
6077da58
PE
8782006-05-29 Paul Eggert <eggert@cs.ucla.edu>
879
880 * doc/bison.texinfo (Introduction): Don't say "GLR grammar".
881 Problem reported by Akim Demaille.
882
2a26b6c2
JD
8832006-05-29 Joel E. Denny <jdenny@ces.clemson.edu>
884
885 * src/getargs.c (usage): Mention GLR not just LALR(1) in --help output.
886
aefef0d6
PE
8872006-05-26 Paul Eggert <eggert@cs.ucla.edu>
888
889 * data/yacc.c (yy_reduce_print): Omit trailing white space in
890 generated source code. Problem reported by Frans Englich in
891 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00049.html>.
892
fcd8e201
PE
8932006-05-22 Paul Eggert <eggert@cs.ucla.edu>
894
895 * Makefile.maint (gzip_rsyncable, GZIP_ENV): Compute within the
896 shell, not within 'make', so that 'make' by an ordinary builder
897 (using GNU make) does not worry about configuring gzip. This also
898 works around a bug reported independently by Keith Thompson and by
899 Georg Schwarz, whereby gzip 1.2.4 --help would output usage on
900 stderr rather than stdout, messing up the build logs.
901
7b5cdcbd
JD
9022006-05-21 Joel E. Denny <jdenny@ces.clemson.edu>
903
904 * data/yacc.c (yyparse): Wrap the final return from yyparse inside YYID
905 to make sure that YYID will never be unused. This fixes a 'make
906 maintainer-check' failure caused by the recent changes to the 'Trivial
907 grammars' test case, which caused g++ 4.1.0 to complain that YYID was
908 not used.
909 * data/glr.c (yyparse): Wrap yyparse's return inside YYID just in case.
910
5ad0a449
JD
9112006-05-21 Joel E. Denny <jdenny@ces.clemson.edu>
912
913 * data/glr.c (yyresolveLocations): Remove bogus YYASSERT that the
914 state before an empty RHS is always resolved here. Only the location
915 of that state is guaranteed to be resolved, and that's enough. This
916 fixes the remaining bug reported by Derek M. Jones in
917 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00027.html>.
918 * tests/glr-regression.at (Uninitialized location when reporting
919 ambiguity): Test the above case.
920 Also, the embedded comments in this test case claim it checks the case
921 of an empty RHS that has inherited the initial location. However, the
922 corresponding LHS was already resolved, so yyresolveLocations didn't
923 actually have reason to modify it. Fix this by forcing
924 nondeterministic operation at the beginning of the parse.
925
50cce58e
PE
9262006-05-20 Paul Eggert <eggert@cs.ucla.edu>
927
928 * data/c.m4 (b4_yy_symbol_print_generate):
929 (b4_yy_symbol_print_generate): Use 'YYSTYPE const' rather than
930 'const YYSTYPE', and similarly for YYLTYPE. This fixes one
931 of the bugs reported today by Derek M Jones in
932 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00027.html>.
933 * doc/bison.texinfo (Value Type): Document that YYSTYPE must be
934 defined to be a type name without parens or brackets.
935 (Location Type): Similarly for YYLTYPE.
936 * tests/regression.at (Trivial grammars): Put in a test for this
937 bug that will be caught by 'make maintainer-check' (though not,
938 alas, by 'make check' unless your compiler is picky).
939
ab8d9dc5
PE
9402006-05-19 Paul Eggert <eggert@cs.ucla.edu>
941
0d2c8934 942 * NEWS: Version 2.2.
ab8d9dc5
PE
943 * configure.ac (AC_INIT): Likewise.
944
9138c575
JD
9452006-05-17 Joel E. Denny <jdenny@ces.clemson.edu>
946
947 * data/glr.c (yyreportTree): Make room in yystates for the state
948 preceding the RHS. This fixes the segmentation fault reported by Derek
949 M. Jones in
950 <http://lists.gnu.org/archive/html/help-bison/2006-05/msg00035.html>.
951 (yyreportTree, yypdumpstack): Subtract 1 from yyrule before printing
952 to the user. Reported for yyreportTree by Derek M. Jones later in the
953 same thread.
954 * THANKS: Add Derek M. Jones.
955 Update my email address.
956 Fix typo in Steve Murphy's name.
957
276f48df
PE
9582006-05-14 Paul Eggert <eggert@cs.ucla.edu>
959
d6645148
PE
960 * data/glr.c (yyreportSyntaxError): Fix off-by-one error in
961 checking against YYLAST that caused the parser to miss a potential
962 alternative in its diagnostic.
963 Problem reported by Maria Jose Moron Fernandez in
964 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00024.html>.
965 * data/lalr1.cc (yysyntax_error_): Likewise.
966 * data/yacc.c (yysyntax_error): Likewise.
967 * tests/regression.at (_AT_DATA_DANCER_Y): Use static array for
968 tokens, in case we run into an older C compiler.
969 (_AT_DATA_EXPECT2_Y, AT_CHECK_EXPECT2): New macros.
970 Use them to check for the off-by-one error fixed above.
971
276f48df
PE
972 * data/yacc.c (yytnamerr): Fix typo: local var should be of type
973 YYSIZE_T, not size_t.
974 * tests/regression.at (Trivial grammars): New test, to catch
975 the error fixed by the above patch.
976
cd8b5791
AD
9772006-05-14 Akim Demaille <akim@lrde.epita.fr>
978
979 * doc/bison.texinfo (C++ Bison Interface): Clarify the naming
980 scheme.
981 Reported by Steve Murphy.
982
34376418
AD
9832006-05-14 Akim Demaille <akim@lrde.epita.fr>
984
985 * data/glr.cc, data/lalr1.cc: Using %defines is mandatory.
986 * data/glr.cc: b4_location_flag is now b4_locations_flag.
987
327afc7c
AD
9882006-05-14 Akim Demaille <akim@lrde.epita.fr>
989
990 Implement --trace=m4.
991 * src/getargs.c (trace_types, trace_args): Accept trace_m4.
992 * src/output.c (output_skeleton): When set, pass -dV to m4.
993
994 Factor the handling of flags in m4.
995 * src/output.c (prepare): Rename the muscle names debug, defines,
996 error_verbose to debug_flag, defines_flag, error_verbose_flag.
997 * data/c.m4: Adjust.
998 (_b4_define_flag_if, b4_define_flag_if, b4_defines_if): New.
999 Use b4_define_flag_if to define other b4_FLAG_if macros.
1000 (b4_location_if): As a consequence, rename as...
1001 (b4_locations_if): this, for consistency.
1002 Adjust all the skeletons.
1003
ba9ecd19
AD
10042006-05-14 Akim Demaille <akim@lrde.epita.fr>
1005
1006 * etc/bench.pm: Shorten bench names.
1007
4e83ea15
AD
10082006-05-14 Akim Demaille <akim@lrde.epita.fr>
1009
1010 * src/output.h, src/output.c (error_verbose): Move to...
1011 * src/getargs.h, src/getargs.c: here.
1012 Sort the flags.
1013 Adjust dependencies.
1014
6e93d810
PE
10152006-05-13 Paul Eggert <eggert@cs.ucla.edu>
1016
1017 * data/c.m4 (b4_copyright): Put the special exception for Bison
1018 skeletons here, so we don't have to put it in each skeleton. All
b15296ff
PE
1019 uses changed. Suggested by Akim Demaille. Also, wrap the
1020 copyright notice, in case it is longer than 80 columns. Replace
1021 comma by newline after title.
6e93d810 1022
eaea13f5
PE
10232006-05-11 Paul Eggert <eggert@cs.ucla.edu>
1024
1025 * doc/bison.texinfo (Calc++ Scanner): The flex behavior is an
1026 incompatibility, not a bug. Mention that it wasn't fixed as of
1027 flex 2.5.33.
1028
3cf084ec
AD
10292006-05-11 Akim Demaille <akim@lrde.epita.fr>
1030
1031 * examples/extexi: Enforce the precedence of concatenation over
1032 >>.
0a9f1c7d 1033 Reported by Tommy Nordgren.
3cf084ec 1034
32c96bd7
AD
10352006-05-11 Akim Demaille <akim@lrde.epita.fr>
1036
1037 * data/lalr1.cc (yytranslate_): Rename token as t to avoid clashes
1038 with the member "token".
f94705b2 1039 Reported by Martin Nylin.
32c96bd7 1040
eaea13f5
PE
10412006-05-08 Paul Eggert <eggert@cs.ucla.edu>
1042
1043 * data/glr.c: Switch to Bison 2.2 special-exception language in
1044 the copyright notice. Use more-regular format for titles and
1045 copyright notices.
1046 * data/glr.cc: Likewise.
1047 * data/location.cc: Likewise.
1048 * data/yacc.cc: Likewise.
1049 * doc/bison.texinfo (Conditions): Document this.
1050 * NEWS: likewise. Upgrade version to 2.2.
1051
6e2d1146
AD
10522006-04-27 Akim Demaille <akim@lrde.epita.fr>
1053
1054 * data/glr.cc: Remove dead code.
1055
47671055
PE
10562006-04-25 Paul Eggert <eggert@cs.ucla.edu>
1057
1058 * bootstrap: Comment out the AM_CPPFLAGS line, since we don't use
1059 that variable and the line breaks the bootstrap. Problem reported
1060 by Juan M. Guerrero.
1061
ed2e6384
AD
10622006-04-24 Akim Demaille <akim@lrde.epita.fr>
1063
1064 * doc/bison.texinfo (Multiple start-symbols): New.
1065
3cedc2dc
AD
10662006-04-24 Akim Demaille <akim@lrde.epita.fr>
1067
1068 * etc/README, etc/bench.pl: New.
1069
b2ddc3f3
AD
10702006-04-03 Akim Demaille <akim@lrde.epita.fr>
1071
1072 * src/scan-gram.l: Be robust to BRACED_CODE appearing before any
1073 rule.
1074 Reported by Mickael Labau.
1075 * tests/input.at (Torturing the Scanner): Test it.
1076
91e3ac9a
PE
10772006-03-16 Paul Eggert <eggert@cs.ucla.edu>
1078
1079 * doc/bison.texinfo (Decl Summary): Don't mention yylloc twice.
1080 Problem reported by Bob Rossi.
1081
10822006-03-13 Paul Eggert <eggert@cs.ucla.edu>
1083
1084 * doc/bison.texinfo: Remove @shorttitlepage stuff; it wasn't used
1085 and didn't really work.
1086 For the index, use @ifnotinfo, not @iftex.
1087 Minor cleanups of spacing and terminology.
1088
5cf61e93
AD
10892006-03-12 Akim Demaille <akim@lrde.epita.fr>
1090
1091 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Fix the definition
1092 of AT_NAME_PREFIX when %name-prefix is not used.
1093
aa08666d
AD
10942006-03-12 Akim Demaille <akim@lrde.epita.fr>
1095
1096 Apply --prefix to C++ skeletons too: they change the namespace.
1097 The test suite already exercize these cases.
1098 * data/c++.m4 (b4_namespace): New.
1099 * data/lalr1.cc, data/glr.cc, data/location.cc: Use it instead of `yy'.
1100 * data/lalr1.cc (yytnameerr_): Move its definition into the namespace.
1101 * data/yacc.c, data/glr.c: Remove a useless `[]'.
1102 * doc/bison.texinfo: Document it.
1103 (Option Cross Key): Use @multitable in all formats. It looks
1104 nicer, even in TeX outputs.
1105 (Rules): Use the same code whatever the output type is.
1106 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS)
1107 (_AT_BISON_OPTION_POPDEFS): Support AT_NAME_PREFIX.
1108 * tests/calc.at: Use it, instead of hard coding `yy'.
91e3ac9a 1109
45567173
AD
11102006-03-10 Akim Demaille <akim@lrde.epita.fr>
1111
1112 * TODO: Remove dead items.
1113
e9d8f881 11142006-03-10 Akim Demaille <akim@lrde.epita.fr>
55ba27be
AD
1115
1116 * doc/FAQ: Remove, merged into...
1117 * doc/bison.texinfo (FAQ): this.
1118 * doc/Makefile.am (EXTRA_DIST): Adjust.
1119
c095d689
AD
11202006-03-10 Akim Demaille <akim@lrde.epita.fr>
1121
1122 * data/c.m4 (b4_token_enum): Always define the enum of tokens,
1123 even if empty.
1124 * data/lalrl1.cc, data/glr.cc (parser::token_type): New.
1125 * doc/bison.texinfo (Calc++ Scanner): Use it.
1126
6e0f8287
PE
11272006-03-09 Paul Eggert <eggert@cs.ucla.edu>
1128
1129 Fix two nits reported by twlevo, plus one more that I discovered.
1130
1131 * src/assoc.h (assoc_to_string): Give a name to the arg, as
1132 this is the usual Bison style.
1133 * src/location.h (location_print): Likewise.
1134
1135 * src/reader.h (token_name): Likewise.
1136
d6b771c3
PE
11372006-03-08 Paul Eggert <eggert@cs.ucla.edu>
1138
1139 Fix some nits reported by twlevo.
1140 * doc/FAQ: Remove ancient Y2K FAQ, replacing it with "secure"
1141 and "POSIX". Use more-modern syntax for URLs. Mention C++
1142 and ask for Java. Don't hardwire OS version numbers. Add
1143 copyright notice.
1144 * m4/.cvsignore: Add unistd_h.m4, for latest gnulib.
1145 * src/conflicts.c (solved_conflicts_obstack): Now static.
1146
1e137b71
JD
11472006-03-08 Joel E. Denny <jdenny@ces.clemson.edu>
1148
1149 * doc/bison.texinfo (Introduction): Mention GLR and C++ as on the web
1150 page. Say "you can use it" not "you may use it" as on the web page;
1151 we're describing capabilities not granting permission.
1152
73f2e47e
PE
11532006-03-06 Paul Eggert <eggert@cs.ucla.edu>
1154
6d05403d
PE
1155 * data/glr.c (yyresolveLocations): Rename local variables to avoid
1156 shadowing warnings. Use usual patter for iterating through RHS.
1157 * tests/glr-regression.at
1158 (Uninitialized location when reporting ambiguity):
1159 Modify yylex so that it uses its argument, rather than trying
1160 to rely on ARGSUSED (which doesn't work for gcc with warnings).
1161 const char -> char const.
1162
73f2e47e
PE
1163 * tests/Makefile.am ($(srcdir)/package.m4, maintainer-check-valgrind):
1164 Don't use tabs inside commands; it messes up 'ps'.
1165 Problem reported by twlevo.
1166
8710fc41
JD
11672006-03-06 Joel E. Denny <jdenny@ces.clemson.edu>
1168
1169 * tests/glr-regression.at (Uninitialized location when reporting
1170 ambiguity): New test case.
1171 * data/glr.c (yyresolveLocations): New function, which uses
1172 YYLLOC_DEFAULT.
1173 (yyresolveValue): Invoke yyresolveLocations before reporting an
1174 ambiguity.
1175 * doc/bison.texinfo (Default Action for Locations): Note
1176 YYLLOC_DEFAULT's usage for ambiguity locations.
1177 (GLR Semantic Actions): Cross-reference those notes.
1178
ae952af2
JD
11792006-03-04 Joel E. Denny <jdenny@ces.clemson.edu>
1180
1181 * tests/glr-regression.at (Leaked semantic values when reporting
1182 ambiguity): Remove unnecessary union and type declarations.
1183 (Leaked lookahead after nondeterministic parse syntax error): New test
1184 case.
1185 * data/glr.c (yyparse): Check for zero stacks remaining before
1186 attempting to shift the lookahead so that you don't lose it.
1187
35ee866a
JD
11882006-03-02 Joel E. Denny <jdenny@ces.clemson.edu>
1189
1190 Avoid memory leaks by not invoking longjmp in yyreportAmbiguity.
1191 * tests/glr-regression.at (Leaked semantic values when reporting
1192 ambiguity): New test case.
1193 * data/glr.c (yyreportAmbiguity): Invoke yyyerror directly and return
1194 yyabort rather than invoking yyFail, which invokes longjmp. Remove the
1195 now unnecessary yystackp parameter.
1196 (yyresolveValue): Return yyreportAmbiguity's result. Now the necessary
1197 destructors can be called.
1198
1199 * tests/glr-regression.at: Don't invoke bison with `-t' unnecessarily
1200 in existing testcases.
1201
520181ab
JD
12022006-03-02 Joel E. Denny <jdenny@ces.clemson.edu>
1203
1204 Don't leak semantic values for parent RHS when a user action cuts the
1205 parser, and clean up related code a bit.
1206 * tests/glr-regression.at (Leaked merged semantic value if user action
35ee866a
JD
1207 cuts parse): Rename to...
1208 (Leaked semantic values if user action cuts parse): ... this. Add check
520181ab
JD
1209 for leaked parent RHS values.
1210 * data/glr.c (yydestroyGLRState): In debugging output, distinguish
1211 between an unresolved state (non-empty chain of semantic options) and
1212 an incomplete one (signaled by an empty chain).
ae952af2 1213 (yyresolveStates): Document the interface. Move all manipulation of a
520181ab
JD
1214 successfully or unsuccessfully resolved yyGLRState to...
1215 (yyresolveValue): ... here so that yyresolveValue always leaves a
1216 yyGLRState with consistent data and thus is easier to understand.
1217 Remove the yyvalp and yylocp parameters since they are always just
1218 taken from the yys parameter. When reporting a discarded merged value
1219 in debugging output, note that it is incompletely merged. Document the
1220 interface.
1221 (yyresolveAction): If resolving any of the RHS states fails, destroy
1222 them all rather than leaking them. Thus, as long as user actions are
1223 written to clean up the RHS correctly, yyresolveAction always cleans up
1224 the RHS of a semantic option. Document the interface.
1225
18d9185c
PE
12262006-02-27 Paul Eggert <eggert@cs.ucla.edu>
1227
1228 * data/glr.c (yyexpandGLRStack): Catch an off-by-one error that
1229 led to a segmentation fault in GNU Pascal. Problem reported
1230 by Waldek Hebisch.
1231
841a7737
JD
12322006-02-21 Joel E. Denny <jdenny@ces.clemson.edu>
1233
1234 * doc/bison.texinfo (Mid-Rule Actions): Explain how to bury a
1235 mid-rule action inside a nonterminal symbol in order to declare a
1236 destructor for its semantic value.
1237
fc3f467f
PE
12382006-02-16 Paul Eggert <eggert@cs.ucla.edu>
1239
1240 * data/yacc.c [(! defined yyoverflow || YYERROR_VERBOSE) && !
1241 YYSTACK_USE_ALLOCA && ! defined YYSTACK_ALLOC && defined
1242 __cplusplus && ! defined _STDLIB_H && !
1243 ((defined YYMALLOC || defined malloc) && (defined YYFREE ||
1244 defined free))]: Include <stdlib.h> rather than rolling our own
1245 declarations of malloc and free, to avoid problems with
1246 incompatible declarations (using 'throw') C++'s stdlib.h. This
1247 should fix Debian bug 340012
1248 <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=340012>,
1249 reported by Guillaume Melquiond.
1250
a3af26dd
PE
12512006-02-13 Paul Eggert <eggert@cs.ucla.edu>
1252
4d7bc38c
PE
1253 * NEWS: Clarify symbols versus types in unused-value warnings.
1254
a3af26dd
PE
1255 * configure.ac (AC_INIT): Bump version number.
1256
4e26c69e
PE
12572006-02-13 Paul Eggert <eggert@cs.ucla.edu>
1258
1259 * NEWS: Version 2.1a.
1260 * tests/headers.at (AT_TEST_CPP_GUARD_H): Declare yyerror and yylex,
1261 since C99 requires this.
1262
498e897c
PE
12632006-02-11 Paul Eggert <eggert@cs.ucla.edu>
1264
1265 * m4/c-working.m4: New file.
1266 * configure.ac (BISON_TEST_FOR_WORKING_C_COMPILER): Use it.
1267
57bb17ca
PE
12682006-02-10 Paul Eggert <eggert@cs.ucla.edu>
1269
1270 * Makefile.maint: Merge from coreutils.
1271
0be105dc
PE
12722006-02-09 Paul Eggert <eggert@cs.ucla.edu>
1273
1274 More portability fixes for problems summarized by Nelson H. F. Beebe.
1275
1276 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Catch a
1277 configuration screwup "./configure CC=/opt/SUNWspro/bin/c89
1278 CFLAGS="-xarch=generic64" CXX=/opt/SUNWspro/bin/CC
1279 LDFLAGS="-xarch=generic64" with Sun C 5.7 on Solaris 10; this
1280 messes up because C++ code is compiled in 32-bit mode but linked
1281 in 64-bit mode.
1282
6fc0c024
PE
12832006-02-08 Paul Eggert <eggert@cs.ucla.edu>
1284
1285 More portability fixes for problems summarized by Nelson H. F. Beebe.
1286
7870f699
PE
1287 * doc/bison.texinfo (Calc++ Scanner): Work around a bug in flex
1288 2.5.31. This resembles the 2005-10-10 patch to src/scan-skel.l.
1289
6fc0c024
PE
1290 * examples/calc++/Makefile.am (check_PROGRAMS): Renamed from
1291 nodist_PROGRAMS, since we don't need to actually compile the
1292 example if we're just doing a plain 'make'. This avoids bothering
1293 the installer unnecessarily about problems due to weird C++
1294 compilers.
1295
fe6c2fde
PE
12962006-02-06 Paul Eggert <eggert@cs.ucla.edu>
1297
1298 More portability fixes for problems summarized by Nelson H. F. Beebe.
1299
1300 * tests/headers.at (AT_TEST_CPP_GUARD_H): Use #include <...> rather
1301 than #include "...", and compile with -I'.'. The old method was
1302 not portable, according to Posix and the C standard, and it does
1303 not work with Sun C 5.7, where previous #line directives affect
1304 the working directory used in later #include "..." directives.
1305
927b425b
JMG
13062006-02-06 Juan Manuel Guerrero <juan.guerrero@gmx.de>
1307
1308 Various DJGGP specific issues in /djgpp
1309
d9735e9e
PE
13102006-02-02 Paul Eggert <eggert@cs.ucla.edu>
1311
1312 More portability fixes for problems summarized by Nelson H. F. Beebe.
1313
1314 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check that
1315 '#include <map>' works and that you can apply ++ to iterators.
1316
5a6755af
PE
13172006-02-01 Paul Eggert <eggert@cs.ucla.edu>
1318
67a0dc4f
PE
1319 Work around portability problems summarized by Nelson H. F. Beebe in
1320 <http://lists.gnu.org/archive/html/bug-bison/2005-09/msg00021.html>.
1321
8c86f0ef
PE
1322 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check
1323 that '#include <string>' works.
1324
de35dd59
PE
1325 * data/lalr1.cc (yytranslate_): No longer inline, to work around a
1326 porting problem to g++ 3.4.3 on Darwin 7.9.0, where g++ complained
1327 "warning: sorry: semantics of inline function static data `const
1328 unsigned char translate_table[262]' are wrong (you'll wind up with
1329 multiple copies)".
1330
67a0dc4f
PE
1331 * lib/bbitset.h (struct bitset_vtable): Rename members not, and,
1332 or, xor to not_, and_, or_, and xor_, respectively. This works
1333 around a bug in GCC 3.4.3 on Irix 6.5, which apparently has a
1334 random system header somewhere that includes the equivalent of
1335 <iso646.h>.
1336
5a6755af
PE
1337 * tests/headers.at (AT_TEST_CPP_GUARD_H): Don't assume that "$CC
1338 -E" works; it apparently doesn't work with PathScale EKO Compiler
67a0dc4f 1339 Suite Version 2.0.
5a6755af 1340
3f001415
JD
13412006-01-30 Joel E. Denny <jdenny@ces.clemson.edu>
1342
1343 During deterministic GLR operation, user actions should be able to
1344 influence the parse by changing yychar. To make this easier to fix and
1345 to make glr.c easier to evolve in general, don't maintain yytoken in
1346 parallel with yychar; just compute yytoken when needed.
1347 * tests/glr-regression.at (Incorrect lookahead during deterministic
1348 GLR): Check that setting yychar in a user action has the intended
1349 effect.
1350 * data/glr.c (yyGLRStack): Remove yytokenp member.
1351 (yyclearin): Don't set *yytokenp.
1352 (yyprocessOneStack, yyreportSyntaxError, yyrecoverSyntaxError): Examine
1353 yychar rather than *yytokenp to determine the current lookahead.
1354 Compute yytoken locally when needed.
1355 (yyparse): Likewise. Remove the local yytoken that yytokenp used to
1356 point to.
1357
1358 * doc/bison.texinfo (Bison Options): Remove stray sentence fragment
1359 after `--report' documentation.
1360
e2a8c0f5
PE
13612006-01-30 Paul Eggert <eggert@cs.ucla.edu>
1362
1363 * src/parse-gram.y (grammar_declaration): Location of printer
1364 symbol is @1, not list->location. Bug reported by twlevo.
1365 * tests/input.at (Incompatible Aliases): Adjust to above change.
1366
6b702268
PE
13672006-01-29 Paul Eggert <eggert@cs.ucla.edu>
1368
27622431
PE
1369 * tests/input.at (AT_CHECK_UNUSED_VALUES): Remove. Instead, do
1370 all the test at once. This makes the output easier to read in the
1371 normal case.
1372
6b702268
PE
1373 Fix a longstanding bug uncovered by bro-0.9a9/src/parse.y, which I
1374 got from <http://bro-ids.org/download.html>. The bug is that
1375 when two actions appeared in succession, the second one was
1376 scanned before the first one was added to the grammar rule
1377 as a midrule action. Bison then output the incorrect warning
1378 "parse.y:905.17-906.36: warning: unused value: $3".
1379 * src/parse-gram.y (BRACED_CODE, action): These are no longer
1380 associated with a value.
1381 (rhs): Don't invoke grammar_current_rule_action_append.
1382 (action): Invoke it here instead.
1383 * src/reader.c (grammar_midrule_action): Now extern.
1384 (grammar_current_rule_action_append): Don't invoke
1385 grammar_midrule_action; that is now the scanner's job.
1386 * src/reader.h (last_string, last_braced_code_loc):
1387 (grammar_midrule_action): New decls.
1388 * src/scan-gram.l (last_string): Now extern, sigh.
1389 (last_braced_code_loc): New extern variable.
1390 (<INITIAL>"{"): Invoke grammar_midrule_action if the current
1391 rule already has an action.
1392 (<SC_BRACED_CODE>"}"): Set last_braced_code_loc before returning.
1393 * tests/input.at (AT_CHECK_UNUSED_VALUES):
1394 Add some tests to check that the above changes fixed the bug.
1395
d40ba6c2
PE
13962006-01-27 Paul Eggert <eggert@cs.ucla.edu>
1397
1398 * src/reader.c (symbol_should_be_used): Renamed from symbol_typed_p.
1399 All used changed. Check whether the symbol has a destructor,
1400 not whether it is typed.
1401 * tests/input.at (AT_CHECK_UNUSED_VALUES): Add a destructor, so
1402 that the values are still reported as unused. All line numbers
1403 adjusted.
1404
401aace6
PE
14052006-01-23 Paul Eggert <eggert@cs.ucla.edu>
1406
1407 Work around a bug in bro 0.8, which underparenthesizes its
1408 definition of YYLLOC_DEFAULT.
1409 * data/glr.c: Change all uses of YYLLOC_DEFAULT to parenthesize
1410 their arguments.
1411 * data/lalr1.cc: Likewise.
1412 * data/yacc.cc: Likewise.
1413
06f01bc4
PE
14142006-01-22 Paul Eggert <eggert@cs.ucla.edu>
1415
401aace6
PE
1416 Work around a bug in Pike 7.0, and give the Pike folks a
1417 better way to override the usual int widths.
1418 * data/yacc.c (b4_int_type): Use yytype_uint8, etc., so that the
1419 user can override the types.
1420 (short): #undef, to work around a bug in Pike 7.0.
1421 (yytype_uint8, yytype_int8, yytype_uint16, yytype_int16): New types.
1422 (union yyalloc.yyss): Use yytype_int16 rather than short.
1423 All uses changed.
1424 (yysigned_char): Remove.
1425 * src/parse-gram.y (YYTYPE_UINT8, YYTYPE_INT8, YYTYPE_UINT16):
1426 (YYTYPE_INT16): New macros, to test the new facility in yacc.c.
1427 * tests/regression.at (Web2c Actions): Adjust to above changes.
1428
1429 * src/reader.c (check_and_convert_grammar): New function.
1430 (reader): Close the input file even if something went wrong during
1431 parsing. Minor file descriptor leak reported by twlevo.
1432
06f01bc4
PE
1433 * src/assoc.c (assoc_to_string): Use a default: abort (); case
1434 to pacify gcc -Wswitch-default.
1435 * src/scan-gram.l (adjust_location): Use a default: break; case
1436 to pacify gcc -Wswitch-default.
1437 * src/scan-skel.h (skel_get_lineno, skel_get_in, skel_get_out):
1438 (skel_get_leng, skel_get_text, skel_set_lineno, skel_set_in):
1439 (skel_set_out, skel_get_debug, skel_set_debug, skel_lex_destroy):
1440 Move these decls to scan-skel.l, since they don't need to be
1441 visible elsewhere.
1442 * src/scan-skel.l: Accept the above decls.
1443 (skel_lex): New decl, to pacify GCC when unpatched flex 2.5.31
1444 is used.
1445
02650b7f
PE
14462006-01-21 Paul Eggert <eggert@cs.ucla.edu>
1447
1448 * Makefile.cfg (local-checks-to-skip): Add changelog-check,
1449 since we don't want to insist on a version number at the start
1450 of the changelog every time.
1451 * Makefile.maint: Sync from coreutils a bit better.
1452 (sc_trailing_blank): Renamed from sc_trailing_space.
1453 All uses changed.
1454 (sc_no_if_have_config_h, sc_require_config_h):
1455 (sc_prohibit_assert_without_use): New rules.
1456 (sc_obsolete_symbols): Don't catch Makefile.maint itself.
1457 (sc_dd_max_sym_length): Fix leading spaces in rule.
1458 (sc_system_h_headers): Prefix with @.
1459 (sc_useless_cpp_parens, m4-check): Output line numbers.
1460 (changelog-check): Allow version only in head.
1461 * data/c.m4: Use "defined FOO" instead of "defined (FOO)", to
1462 satisfy new Makefile.maint rule.
1463 * data/glr.c: Likewise.
1464 * data/glr.cc: Likewise.
1465 * data/lalr1.cc: Likewise.
1466 * data/yacc.c: Likewise.
1467 * lib/ebitsetv.c: Likewise.
1468 * lib/lbitset.c: Likewise.
1469 * lib/subpipe.c: Likewise.
1470 * lib/timevar.c: Likewise.
1471 * src/system.h: Likewise.
1472 * data/yacc.c (YYSTYPE): Don't generate trailing spaces in output.
1473 * djgpp/Makefile.maint: Add copyright notice.
1474 * djgpp/README.in: Likewise.
1475 * djgpp/config.bat: Likewise.
1476 * djgpp/config.site: Likewise.
1477 * djgpp/config_h.sed: Likewise.
1478 * djgpp/djunpack.bat: Likewise.
1479 * djgpp/config.sed: Fix copyright notice to match standard format.
1480 * djgpp/subpipe.h: Likewise.
1481 * lib/bitsetv-print.c: Likewise.
1482 * lib/bitsetv.c: Likewise.
1483 * lib/subpipe.h: Likewise.
1484 * lib/timevar.c: Likewise.
1485 * lib/timevar.h: Likewise.
1486 * djgpp/subpipe.c: Use standard recipe for config.h.
1487 * lib/abitset.c: Likewise.
1488 * lib/bitset.c: Likewise.
1489 * lib/bitset_stats.c: Likewise.
1490 * lib/bitsetv-print.c: Likewise.
1491 * lib/bitsetv.c: Likewise.
1492 * lib/ebitsetv.c: Likewise.
1493 * lib/get-errno.c: Likewise.
1494 * lib/lbitset.c: Likewise.
1495 * lib/subpipe.c: Likewise.
1496 * lib/timevar.c: Likewise.
1497 * lib/vbitset.c: Likewise.
1498 * tests/local.at: Likewise.
1499 * src/scan-gram.l: Don't include verify.h, since system.h does
1500 that for us.
1501 * .x-sc_require_config_h: New file.
1502 * .x-sc_unmarked_diagnostics: New file.
1503
287c78f6
PE
15042006-01-20 Paul Eggert <eggert@cs.ucla.edu>
1505
287c78f6
PE
1506 Be a bit more systematic about using 'abort'.
1507 * lib/abitset.c (abitset_test): Remove ATTRIBUTE_UNUSED; not needed.
1508 * lib/bitset.c (bitset_bytes, bitset_init, bitset_op4_cmp):
1509 Put 'default: abort ();' before some other case, to satisfy older
1510 pedantic compilers.
1511 * lib/bitset_stats.c (bitset_stats_init): Likewise.
1512 * lib/ebitset.c (ebitset_elt_find, ebitset_op3_cmp): Likewise.
1513 * lib/lbitset.c (lbitset_elt_find, lbitset_op3_cmp): Likewise.
1514 * src/conflicts.c (resolve_sr_conflict): Likewise.
68cae94e
PE
1515 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str):
1516 (get_decision_str, get_orientation_str, get_node_alignment_str):
1517 (get_arrow_mode_str, get_crossing_type_str, get_view_str):
1518 (get_linestyle_str, get_arrowstyle_str): Likewise.
1519 * src/conflicts.c (resolve_sr_conflict):
1520 Use a default case rather than one for the one remaining enum
1521 value, to catch invalid enum values as well.
1522 * src/lalr.c (set_goto_map, map_goto):
1523 Prefer "assert (FOO);" to "if (!FOO) abort ();".
1524 * src/nullable.c (nullable_compute, token_definitions_output):
1525 Likewise.
1526 * src/reader.c (packgram, reader): Likewise.
1527 * src/state.c (transitions_to, state_new, state_reduction_find):
1528 Likewise.
1529 * src/symtab.c (symbol_user_token_number_set, symbol_make_alias):
1530 (symbol_pack): Likewise.
1531 * src/tables.c (conflict_row, pack_vector): Likewise.
287c78f6
PE
1532 * src/scan-skel.l (QPUTS): Remove unnecessary parens.
1533 (BASE_QPUTS, "@output ".*\n): Remove unnecessary asserts.
68cae94e
PE
1534 * src/system.h: Don't include <assert.h>.
1535 (assert): New macro.
1536
1537 * doc/bison.texinfo (Prologue, Rules, Actions, Union Decl, Action Decl):
1538 (Destructor Decl, Parser Function, Pure Calling):
1539 Describe rules for braces inside C code more carefully.
287c78f6 1540
c66dfadd
PE
15412006-01-19 Paul Eggert <eggert@cs.ucla.edu>
1542
c21493b8
PE
1543 Fix some porting glitches found by Nelson H. F. Beebe.
1544 * lib/abitset.c (abitset_resize): Rewrite to avoid warnings from
1545 compilers that don't understand that abort () does not return.
1546 * src/state.c (transitions_to): Likewise.
1547 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check
1548 that '#include <cstdlib>' works.
1549 * src/system.h (INT8_MIN, INT16_MIN, INT32_MIN, INT8_MAX):
1550 (INT16_MAX, UINT8_MAX, INT32_MAX, UINT16_MAX, UINT32_MAX):
1551 #undef if ! defined __STDC_VERSION__ || __STDC_VERSION__ < 199901,
1552 for the benefit of some pre-C99 compilers.
1553
b6e3facf
PE
1554 * bootstrap: Undo changes to gnulib files that autoreconf made.
1555
c66dfadd
PE
1556 Minor fixups to get 'make maintainer-check' to work.
1557 * configure.ac: Don't use -Wnested-externs, as it's incompatible
1558 with the new verify.h implementation.
1559 * data/c.m4 (b4_yy_symbol_print_generate): YYUSE (yyoutput).
1560 * data/glr.c (YYUSE): Depend on __GNUC__ as well.
1561 * data/yacc.c (YYUSE): Likewise.
1562 * data/lalr1.cc (yysyntax_error_): YYUSE (yystate).
1563 * lib/subpipe.c (end_of_output_subpipe): The args are unused.
1564 * src/parse-gram.y (declaration): Don't pass a string constant
1565 to a function that expects char *, since GCC might complain
1566 about the constant value.
1567 * src/reader.c (symbol_typed_p): Add parens to pacify GCC.
1568 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): #undef yylloc and yylval
1569 before #defining them.
1570 * tests/glr-regression.at
1571 (Incorrectly initialized location for empty right-hand side in GLR):
1572 In yyerror, use the msg arg.
1573 (Corrupted semantic options if user action cuts parse):
1574 (Incorrect lookahead during deterministic GLR):
1575 (Incorrect lookahead during nondeterministic GLR):
1576 Don't name a local var 'index'; it shadows string.h's 'index'.
1577
ed94ef2a
AD
15782006-01-19 Akim Demaille <akim@epita.fr>
1579
1580 * tests/calc.at (_AT_DATA_CALC_Y): Initialize the whole initial
1581 location, not just parts of it.
1582
e9ad4aec
PE
15832006-01-18 Paul Eggert <eggert@cs.ucla.edu>
1584
d6ca7905
PE
1585 * NEWS: Document the fact that multiple %unions are now allowed.
1586 * doc/bison.texinfo (Union Decl): Likewise.
51cbef6f
PE
1587 * TODO: This feature is now implemented, so remove it from
1588 the wishlist.
d6ca7905 1589
ef1b70e0
PE
1590 * Makefile.maint: Merge with coreutils Makefile.maint.
1591 (CVS_LIST): Use build-aux version if available.
1592 (VERSION_REGEXP): New macro.
1593 (syntax-check-rules): Add sc_no_if_have_config_h,
1594 sc_prohibit_assert_without_use, sc_require_config_h,
1595 sc_useless_cpp_parens.
1596 (sc_obsolete_symbols): Check for O_NDELAY.
1597 (sc_dd_max_sym_length): Track coreutils.
1598 (sc_unmarked_diagnostics): Look in all files, not just *.c.
1599 (sc_useless_cpp_parens): New rule.
1600 (news-date-check): Look for version or today's date.
1601 (changelog-check): Don't require version number near head.
1602 (copyright-check): Use current year instead of hardwiring 2005.
1603 (my-distcheck): Depend on $(release_archive_dir)/$(prev-tgz).
1604 (announcement): Add --gpg-key-ID.
1605
1606 * djgpp/config.sed: Add copyright notice, and replace "filesystem"
1607 with "file system".
1608
2073ce56 1609 Avoid undefined behavior that addressed just before the start of an
e9ad4aec
PE
1610 array. Problem reported by twlevo.
1611 * src/reader.c (packgram): Prepend a new sentinel before ritem.
1612 * src/lalr.c (build_relations): Rely on new sentinel.
1613 * src/gram.c (gram_free): Adjust to new sentinel.
1614
b7691f15
JD
16152006-01-12 Joel E. Denny <jdenny@ces.clemson.edu>
1616
1617 * data/glr.c (yyGLRStateSet): Rename yylookaheadStatuses to
1618 yylookaheadNeeds. All uses updated.
1619 (yysplitStack): Rename local yynewLookaheadStatuses to
1620 yynewLookaheadNeeds.
1621 * data/glr-regression.at (Incorrect lookahead during nondeterministic
1622 GLR): In comments, change `lookahead status' to `lookahead need'.
1623
ddee1b06
PH
16242006-01-11 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
1625
1626 * data/glr.c (yysplitStack): A little stylistic rewrite.
1627
12f4614d
PH
16282006-01-11 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
1629
1630 * data/glr.c (yyaddDeferredAction): Flesh out the comment.
1631
32c29292
JD
16322006-01-11 Joel E. Denny <jdenny@ces.clemson.edu>
1633
1634 * doc/bison.texinfo: Fix some typos.
1635 (GLR Semantic Actions): New subsection discussing special
1636 considerations because GLR semantic actions might be deferred.
1637 (Actions): Mention look-ahead usage of yylval.
1638 (Actions and Locations): Mention look-ahead usage of yylloc.
1639 (Special Features for Use in Actions): Add YYEOF entry and mention it
1640 in the yychar entry.
1641 In the yychar entry, remove mention of the local yychar case (pure
1642 parser) since this is irrelevant information when writing semantic
1643 actions and since it's already discussed in `Bison Symbols' where
1644 yychar is otherwise described as an external variable.
1645 In the yychar entry, don't call it the `current' look-ahead since it
1646 isn't when semantic actions are deferred.
1647 In the yychar and yyclearin entries, add note about deferred semantic
1648 actions.
1649 Add yylloc and yylval entries discussing look-ahead usage.
1650 (Look-Ahead Tokens): When discussing yychar, don't call it the
1651 `current' look-ahead, and do mention yylval and yylloc.
1652 (Error Recovery): Cross-reference `Action Features' when mentioning
1653 yyclearin.
1654 (Bison Symbols): In the yychar entry, don't call it the `current'
1655 look-ahead.
1656 In the yylloc and yylval entries, mention look-ahead usage.
1657
de366a2f 16582006-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
2781dbd1
JD
1659
1660 * tests/glr-regression.at: Update copyright year to 2006.
1661
bf70fa87
JD
16622006-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
1663
1664 * data/glr.c (yyGLRStateSet): Add yybool* yylookaheadStatuses member to
1665 use during nondeterministic operation to track which stacks have
1666 actually needed the current lookahead.
1667 (yyinitStateSet, yyfreeStateSet, yyremoveDeletes, yysplitStack):
1668 Allocate, deallocate, resize, and otherwise shuffle space for
1669 yylookaheadStatuses in parallel with yystates member of yyGLRStateSet.
1670 (yysplitStack, yyprocessOneStack, yyparse): Set lookahead status
1671 appropriately during nondeterministic operation.
1672 (yySemanticOption): Add int yyrawchar, YYSTYPE yyval, and YYLTYPE yyloc
1673 members to store the current lookahead to be used by the deferred
1674 user action.
1675 (yyaddDeferredAction): Add size_t yyk parameter specifying the stack
1676 from which the RHS is taken. Set the lookahead members of the new
1677 yySemanticOption according to the lookahead status for stack yyk.
1678 (yyglrShiftDefer, yyglrReduce): Pass yyk parameter on to
1679 yyaddDeferredAction.
1680 (yyresolveAction): Set yychar, yylval, and yylloc to the lookahead
1681 members of yySemanticOption before invoking yyuserAction, and then set
1682 them back to their current values afterward.
1683 (yyparse): Set yychar = YYEMPTY where yytoken = YYEMPTY.
1684 (yyreportAmbiguity): Add /*ARGSUSED*/ to pacify lint.
1685 * tests/glr-regression.at: Remove `.' from the ends of recent test case
1686 titles for consistency.
1687 (Leaked merged semantic value if user action cuts parse): In order to
1688 suppress lint warnings, use arguments in merge function, and assign
1689 char value < 128 in main.
1690 (Incorrect lookahead during deterministic GLR): New test case.
1691 (Incorrect lookahead during nondeterministic GLR): New test case.
1692
05449a2c
JD
16932006-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
1694
de366a2f 1695 * data/c.m4 (b4_yy_symbol_print_generate): In yy_symbol_print, accept
05449a2c
JD
1696 !yyvaluep as signal that no semantic value is available to print.
1697 * data/glr.c (yydestroyGLRState): If state is not resolved, don't try
1698 to print a semantic value.
1699
4158e0a1 17002006-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
fd2493f7 1701
4158e0a1
JD
1702 * tests/glr-regression.at: For consistency with my newer test cases,
1703 don't thank myself.
1704
d659304d
JD
17052006-01-05 Joel E. Denny <jdenny@ces.clemson.edu>
1706
1707 * data/glr.c (yyresolveValue): When merging semantic options, if at
1708 least one user action succeeds but a later one cuts the parse, then
1709 destroy the semantic value before returning rather than leaking it.
1710 (yyresolveStates): If a user action cuts the parse and thus
1711 yyresolveValue fails, ignore the (unset) semantic value rather than
1712 corrupting the yyGLRState, and empty the semantic options list since
1713 the user actions should have called all necessary destructors.
1714 Simplify code with YYCHK.
1715 * tests/glr-regression.at (Corrupted semantic options if user action
1716 cuts parse): New test case.
1717 (Undesirable destructors if user action cuts parse): New test case.
1718 Before applying any of this patch, this test case never actually failed
1719 for me... but only because the corrupted semantic options usually
1720 masked this bug.
1721 (Leaked merged semantic value if user action cuts parse): New test
1722 case.
1723
6ec2c0f2
AD
17242006-01-05 Akim Demaille <akim@epita.fr>
1725
1726 * src/reader.c, src/symlist.h, src/symlist.c: s/mid_rule/midrule/.
1727
1b9c21fb
PE
17282006-01-04 Paul Eggert <eggert@cs.ucla.edu>
1729
1730 * data/c.m4 (b4_c_modern): New macro, with a new provision for
1731 _MSC_VER. Problem reported by Cenzato Marco.
1732 (b4_c_function_def): Use it.
1733 * data/yacc.c (YYMODERN_C): Remove. All uses replaced by
1734 b4_c_modern.
1735 (yystrlen, yystpcpy, yyparse): Use b4_c_function... macros rather
1736 than rolling our own.
1737
84866159
AD
17382006-01-04 Akim Demaille <akim@epita.fr>
1739
1740 Also warn about non-used mid-rule values.
1741 * src/symlist.h, src/symlist.c (symbol_list): Add a mid_rule
1742 member.
1743 (symbol_list_new): Adjust.
1744 * src/reader.c (symbol_typed_p): New.
1745 (grammar_rule_check): Use it.
1746 (grammar_midrule_action): Bind a mid-rule LHS to its rule.
1747 Check its rule.
1748 * tests/input.at (AT_CHECK_UNUSED_VALUES): New.
1749 Use it.
1750 * tests/actions.at (Exotic Dollars): Adjust.
1751
378f4bd8
AD
17522006-01-04 Akim Demaille <akim@epita.fr>
1753
1754 * src/reader.c (grammar_midrule_action): If $$ is set in a
1755 mid-rule, move the `used' bit to its lhs.
1756 * tests/input.at (Unused values): New.
1757 * tests/actions.at (Exotic Dollars): Adjust: exp is not typed.
1758
e2a21b6f
PE
17592006-01-03 Paul Eggert <eggert@cs.ucla.edu>
1760
54662697
PE
1761 * doc/bison.texinfo (Bison Options): Say more accurately what
1762 --yacc does.
1763 * src/parse-gram.y (rules_or_grammar_declaration): Don't complain
1764 about declarations in the grammar when in Yacc mode, as POSIX does
1765 not require a diagnostic when the grammar uses extensions.
1766
1767 * src/reduce.c (reduce_grammar): Remove unnecessary cast to bool.
1768
073f9288
PE
1769 Warn about dubious constructions like "%token T T".
1770 Reported by twlevo.
1771 * src/symtab.h (struct symbol.declared): New member.
1772 * src/symtab.c (symbol_new): Initialize it to false.
1773 (symbol_class_set): New arg DECLARING, specifying whether
1774 this is a declaration that we want to warn about, if there
1775 is more than one of them. All uses changed.
1776
1221b78a
PE
1777 * data/glr.c, data/glr.cc, data/lalr1.cc, data/yacc.c:
1778 Allow multiple %union directives, whose contents concatenate.
1779 * src/parse-gram.y (grammar_declaration): Likewise.
1780 Use muscle_code_grow, so that we don't need stype_line any more.
1781 All uses changed.
1782
1783 * src/muscle_tab.c (muscle_grow): Fix comment.
1784
e2a21b6f
PE
1785 * ChangeLog, data/c.m4, data/glr.c, data/glr.cc, data/location.cc:
1786 * data/yacc.c, src/getargs.c, src/output.c, tests/cxx-type.at:
1787 Update copyright year to 2006.
1788
8f7e3cf9
AD
17892006-01-03 Akim Demaille <akim@epita.fr>
1790
1791 Have glr.cc pass (some of) the calc.at tests.
1792 * data/glr.cc (b4_parse_param_orig): New.
1793 (b4_parse_param): Improve its definition, and bound it more
1794 clearly in the skeleton.
1795 (b4_epilogue): Append, instead of prepending, in order to keep
1796 #line consistency.
1797 Simplify the generation of auxiliary functions: locations and
1798 purity are mandated.
1799 (b4_global_tokens_and_yystype): Honor it.
1800 * data/location.cc (c++.m4): Don't include it.
1801 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Define AT_GLR_CC_IF
1802 and AT_SKEL_CC_IF.
1803 * tests/calc.at (AT_CHECK_CALC): Rely on AT_SKEL_CC_IF instead of
1804 AT_LALR1_CC_IF.
1805 Be sure to initialize the first position's filename.
1806 (AT_CHECK_CALC_LALR1_CC): Add %location and %defines, they are
1807 mandated anyway.
1808 (AT_CHECK_CALC_GLR_CC): New.
1809 Use it to exercise glr.cc as a lalr1.cc drop-in replacement.
1810
3953ed88
AD
18112006-01-02 Akim Demaille <akim@epita.fr>
1812
1813 * src/output.c (output_skeleton): Don't hard wire the inclusion of
1814 c.m4.
0a96ba81 1815 * data/c++.m4, data/glr.c, data/yacc.c: Include c.m4.
3953ed88
AD
1816 * data/glr.cc: Do not include stack.hh.
1817
9ecafbbf
AD
18182006-01-02 Joel E. Denny <jdenny@ces.clemson.edu>
1819
1820 * data/glr.c: Reformat whitespace with tabs.
1821 (b4_lpure_formals): Remove this unused m4 macro.
1822 * tests/cxx-type.at: Reformat whitespace with tabs.
1823 (_AT_TEST_GLR_CXXTYPES): In union Node, rename node_info to nodeInfo
1824 since it's a member. Rename type to isNterm for clarity.
1825
c4d497a0
AD
18262005-12-29 Akim <akim@sulaco.local>
1827
1828 Let glr.cc catch up with symbol_value_print.
1829 * data/glr.cc (b4_yysymprint_generate): Replace by...
1830 (b4_yy_symbol_print_generate): this.
1831 (yy_symbol_print, yy_symbol_value_print): Declare them.
1832
4517da37
PE
18332005-12-28 Paul Eggert <eggert@cs.ucla.edu>
1834
1835 * src/location.h (boundary): Note that a line or column equal
1836 to INT_MAX indicates an overflow.
1837 * src/scan-gram.l: Include verify.h. Don't include get-errno.h.
1838 (rule_length_overflow, increment_rule_length, add_column_width):
1839 New functions.
1840 (<INITIAL>{id}, <SC_ESCAPED_STRING>"\"", <SC_ESCAPED_CHARACTER>"'"):
1841 (<SC_BRACED_CODE>"}"):
1842 Use increment_rule_length rather than incrementing it by hand.
1843 (adjust_location, handle_syncline): Diagnose overflow.
1844 (handle_action_dollar, handle_action_at):
1845 Fix bug with monstrosities like $-2147483648.
1846 Remove now-unnecessary checks.
1847 (scan_integer): Verify assumptions and remove now-unnecessary checks.
1848 (convert_ucn_to_byte): Verify assumptions.
1849 (handle_syncline): New arg LOC. All callers changed.
1850 Don't store through a value derived from char const * pointer.
1851
1852 * src/reader.c (grammar_rule_check): Rewrite slightly to avoid
1853 GCC warnings.
1854
e3233bf6
PE
18552005-12-27 Paul Eggert <eggert@cs.ucla.edu>
1856
1857 * src/reader.c (grammar_midrule_action, grammar_symbol_append):
1858 Remove unnecessary forward static decls.
1859
8f3596a6
AD
18602005-12-27 Akim Demaille <akim@epita.fr>
1861
1862 * src/reader.c (grammar_current_rule_check): Also check that $$
1863 is used.
1864 Take the rule to check as argument, hence rename as...
1865 (grammar_rule_check): this.
1866 * src/reader.h, src/reader.c (grammar_rule_begin, grammar_rule_end):
1867 Rename as...
1868 (grammar_rule_begin, grammar_rule_end): these, for consistency.
1869 (grammar_midrule_action, grammar_symbol_append): Now static.
1870 * tests/torture.at (input): Don't rely on the default action
1871 being always performed.
1872 * tests/calc.at: "Set" $$ even when the action is "cut" with
1873 YYERROR or other.
1874 * tests/actions.at (Exotic Dollars): Instead of using unused
1875 values, check that the warning is issued.
1876
721be13c
PE
18772005-12-22 Paul Eggert <eggert@cs.ucla.edu>
1878
1879 * NEWS: Improve wording for unused-value warnings.
1880
a0af42fc
AD
18812005-12-22 Akim Demaille <akim@epita.fr>
1882
1883 * data/lalr1.cc, data/yacc.c, data/glr.c, data/c.m4
1884 (b4_yysymprint_generate): Rename as...
1885 (b4_yy_symbol_print_generate): this.
1886 Generate yy_symbol_print instead of yysymprint.
1887 Generate also yy_symbol_value_print, and use it.
1888
affac613
AD
18892005-12-22 Akim Demaille <akim@epita.fr>
1890
721be13c 1891 * NEWS: Warn about unused values.
affac613
AD
1892 * src/symlist.h, src/symlist.c (symbol_list, symbol_list_new): Add
1893 a `used' member.
1894 (symbol_list_n_get, symbol_list_n_used_set): New.
1895 (symbol_list_n_type_name_get): Use symbol_list_n_get.
1896 * src/scan-gram.l (handle_action_dollar): Flag used symbols.
1897 * src/reader.c (grammar_current_rule_check): Check that values are
1898 used.
1899 * src/symtab.c (symbol_print): Accept 0.
1900 * tests/existing.at: Remove the type information.
1901 Empty the actions.
1902 Remove useless actions (beware of mid-rule actions: perl -000
1903 -pi -e 's/\s*\{\}(?=[\n\s]*[|;])//g').
1904 * tests/actions.at (Exotic Dollars): Use unused values.
1905 * tests/calc.at: Likewise.
1906 * tests/glr-regression.at (No users destructors if stack 0 deleted):
1907 Likewise.
1908
1909 * src/gram.c (rule_useful_p, rule_never_reduced_p): Use
1910 rule_useful_p.
1911
9d9b8b70
PE
19122005-12-21 Paul Eggert <eggert@cs.ucla.edu>
1913
8bb4c753
PE
1914 Undo 2005-12-01 tentative license wording change. The wording is
1915 still being reviewed by the lawyers, and we don't want to wait for
1916 them before publishing a test release. For now, revert to the
1917 previous wording.
1918 * NEWS: Undo 2005-12-01 change.
1919 * data/glr.c: Revert to previous license wording.
1920 * data/glr.cc: Likewise.
1921 * data/lalr1.cc: Likewise.
1922 * data/location.cc: Likewise.
1923 * data/yacc.c: Likewise.
1924
9d9b8b70
PE
1925 * NEWS: Reword %destructor vs YYABORT etc.
1926 * data/glr.c: Use American spacing, for consistency.
1927 * data/glr.cc: Likewise.
1928 * data/lalr1.cc: Likewise.
1929 * data/yacc.c: Likewise.
1930 * data/yacc.c: Reformat comments slightly.
1931 * doc/bison.texinfo: Replace "non-" with "non" when that makes sense,
1932 for consistency. Fix some spelling errors and reword recently-included
1933 text slightly.
1934 * tests/cxx-type.at: Cast results of malloc, for C++.
1935
2c3b392a
AD
19362005-12-21 Joel E. Denny <address@hidden>
1937
1938 * tests/cxx-type.at: Construct a tree, count the parents of shared
1939 nodes, and free each node once and only once. Previously, the memory
1940 for semantic values was leaked instead.
1941
d6cff4dc
AD
19422005-12-21 Joel E. Denny <address@hidden>
1943
1944 * data/glr.c (struct yyGLRStack): If pure, add yyval and yyloc members.
1945 (yylval, yylloc): If pure, #define to yystackp->yyval and
1946 yystackp->yyloc similar to yychar and yynerrs.
1947 (yyparse): If pure, remove local yylval and yylloc. Add local
1948 yystackp to accommodate pure definitions of yylval and yylloc.
1949 (b4_lex_param, b4_lyyerror_args, b4_lpure_args): If pure, change
1950 yylvalp and yyllocp to &yylval and &yylloc.
1951 (nerrs, char, lval, lloc): If pure, add #define's for b4_prefix[]
1952 namespace. Previously, nerrs and char were missing, but lval and lloc
1953 weren't necessary.
1954 (yyprocessOneStack, yyreportSyntaxError, yyrecoverSyntaxError): Remove
1955 yylvalp and yyllocp parameters since, if pure, these are now always
1956 accessible through yystackp. If not pure, they are still accessible
1957 globally.
1958 * data/glr.c, data/yacc.c (YYLLOC_DEFAULT): Change `if (N)' to
1959 `if (YYID (N))' to pacify lint.
1960
a85284cf
AD
19612005-12-21 Akim Demaille <akim@epita.fr>
1962
1963 YYACCEPT, YYERROR, and YYABORT, as user actions, should not
1964 destroy the RHS symbols of a rule.
1965 * data/yacc.c (yylen): Initialize to 0.
1966 Keep its value to the number of items to possibly shift.
1967 In particular, a regular successful parse that ends on YYFINAL by
1968 a (internal) YYACCEPT must not have yylen != 0.
1969 (yyerrorlab, yyreturn): Pop the RHS.
1970 Reorder a bit to emphasize the `shifting' bits of code.
1971 (YYPOPSTACK): Now accept a number of items to pop.
1972 * data/lalr1.cc: Likewise.
1973 * data/glr.c: Formatting changes.
1974 Use goto instead of fall through.
1975 * doc/bison.texinfo (Destructor Decl): Complete.
1976
d508c281
JMG
19772005-12-20 Juan Manuel Guerrero <juan.guerrero@gmx.de>
1978
1979 * Makefile.am: DJGPP specific files added to EXTRA_DIST.
1980 * djgpp/Makefile.maint: Fix PACKAGE variable computation.
1981 * djgpp/config.bat: Replace every occurence of the file name
1982 scan-gram-c.c with c-scan-gram.c. The same for scan-skel-c.c with
1983 c-scan-skel.c to conform with the 8.3 file name restriction on MSDOS.
1984 * djgpp/config.sed: Replace every occurence of the file name
1985 scan-gram-c.c with c-scan-gram.c. The same for scan-skel-c.c with
1986 c-scan-skel.c to conform with the 8.3 file name restriction on MSDOS.
1987 * djgpp/djunpack.bat: DJGPP specific file.
1988 * djgpp/fnchange.lst: DJGPP specific file.
1989 * djgpp/README.in: Add new information about how to unpack the bison
1990 source on MSDOS and other systems which have 8.3 file name restrictions
1991 using djunpack.bat and fnchange.lst.
1992
3e7a2cd9
PE
19932005-12-12 Paul Eggert <eggert@cs.ucla.edu>
1994
1995 * bootstrap (build_cvs_prefix): Remove; unused.
1996 (CVS_PREFIX): Adjust to yesterday's Savannah reorganization
1997 when getting gnulib.
1998
19992005-12-12 "Joel E. Denny" <jdenny@ces.clemson.edu>
2000
2001 * data/glr.c: Reorder typedef declarations for structs to match order
2002 of struct declarations.
2003 Rename yystack everywhere to yystackp except in yyparse where it's not
2004 a pointer.
2005 (yyglrShift): Change parameter YYSTYPE yysval to YYSTYPE* yyvalp for
2006 consistency.
2007 (yyis_table_ninf): Change 0 to YYID (0) to pacify lint.
2008 (yyreportSyntaxError): Add /*ARGSUSED*/ to pacify lint.
2009 (yyparse): Change while (yytrue) to while ( YYID (yytrue)) to pacify
2010 lint.
2011
877519f8
PE
20122005-12-09 Paul Eggert <eggert@cs.ucla.edu>
2013
0eca5a39
PE
2014 * tests/sets.at (Accept): Fix typos in regular expression used to
2015 sed out the final state number.
2016
2cec9080
PE
2017 Work around portability problem on Solaris 10: flex-generated
2018 files include <stdio.h> before <config.h>, which messes up
2019 because the latter defines __EXTENSIONS__. Address the problem
2020 by creating two new little files that include <config.h> first,
2021 then include the flex-generated files. Rewrite everyone else
2022 to include <config.h> first, as well.
2023 * lib/timevar.c: Always include "config.h".
2024 * src/Makefile.am (bison_SOURCES): Replace scan-gram.l with
2025 scan-gram-c.c, and scan-skel.l with scan-skel-c.c.
2026 (EXTRA_bison_SOURCES): New macro.
2027 * src/scan-gram-c.c, src/scan-skel-c.c: New files.
2028 * src/system.h: Don't include config.h.
2029 * src/LR0.c: Include <config.h> first.
2030 * src/assoc.c: Likewise.
2031 * src/closure.c: Likewise.
2032 * src/complain.c: Likewise.
2033 * src/conflicts.c: Likewise.
2034 * src/derives.c: Likewise.
2035 * src/files.c: Likewise.
2036 * src/getargs.c: Likewise.
2037 * src/gram.c: Likewise.
2038 * src/lalr.c: Likewise.
2039 * src/location.c: Likewise.
2040 * src/main.c: Likewise.
2041 * src/muscle_tab.c: Likewise.
2042 * src/nullable.c: Likewise.
2043 * src/output.c: Likewise.
2044 * src/parse-gram.y: Likewise.
2045 * src/print.c: Likewise.
2046 * src/print_graph.c: Likewise.
2047 * src/reader.c: Likewise.
2048 * src/reduce.c: Likewise.
2049 * src/relation.c: Likewise.
2050 * src/state.c: Likewise.
2051 * src/symlist.c: Likewise.
2052 * src/symtab.c: Likewise.
2053 * src/tables.c: Likewise.
2054 * src/uniqstr.c: Likewise.
2055 * src/vcg.c: Likewise.
2056
877519f8
PE
2057 * src/parse-gram.y: Fix minor problems uncovered by lint.
2058 (current_lhs, current_lhs_location): Now static.
2059 (current_assoc): Remove unused variable.
2060
2061 Cleanups so that Bison-generated parsers have less lint.
2062 * data/c.m4 (b4_yydestruct_generate, b4_yysymprint_generate):
2063 Prepend /*ARGSUSED*/, for lint's sake.
2064 * data/glr.c (YYUSE): Properly parenthesize, and use an alternate
2065 definition if 'lint' is defined.
2066 (YYID): New macro (or function, if lint).
2067 All uses of /*CONSTCOND*/0 replaced by YYID(0).
2068 * data/yacc.c: Likewise.
2069 * data/glr.c (yyuserAction, yyuserMerge, yy_reduce_print):
2070 (yyrecoverSyntaxError): Prepend /*ARGSUSED*/.
2071 * data/glr.cc (YYLLOC_DEFAULT): Omit /*CONSTCOND*/ since this code
2072 is C++ only.
2073 * data/lalr1.cc (YYUSE): Just use a cast, since this code is C++ only.
2074 * data/yacc.c (YYSTACK_FREE) [defined YYSTACK_ALLOC]:
2075 Use YYID(0) rather than 0, for lint.
2076 (yystrlen): Rewrite to avoid lint warning about ptrdiff_t overflow.
2077 (yysyntax_error): Rewrite to avoid lint warnings about parenthesization.
2078
f5228370
PE
20792005-12-07 Paul Eggert <eggert@cs.ucla.edu>
2080
2081 * tests/glr-regression.at
2082 (Improper handling of embedded actions and dollar(-N) in GLR parsers):
2083 Close memory leak reported by twlevo.
2084
69ce078b
PE
20852005-12-06 "Joel E. Denny" <jdenny@ces.clemson.edu>
2086
6ff99711
PE
2087 * data/glr.c (yyprocessOneStack, yyparse): Synchronize the shift for
2088 all stacks.
2089 (yyparse): Iterate another stack in order to call user destructors.
69ce078b
PE
2090 * tests/glr-regression.at (No users destructors if stack 0 deleted):
2091 New test case.
2092 (Duplicated user destructor for lookahead): This test now is expected
2093 to succeed.
2094
af3412cd
PE
20952005-12-01 Paul Eggert <eggert@cs.ucla.edu>
2096
32b5b719 2097 * NEWS: Document the following change.
af3412cd
PE
2098 * data/yacc.c: Say "parser skeleton" rather than "file", since
2099 it's no longer just a file.
2100 * data/glr.c: Grant a special exception for C GLR parsers, that
2101 reads like the already-existing exception for C LALR(1) parsers.
2102 * data/glr.cc: Likewise.
2103 * data/lalr1.cc: Likewise.
2104 * data/location.cc: Likewise.
2105 * data/yacc.c: Reword the "written by" statement to clarify that
2106 it was the parser skeleton, not the entire output file.
2107 * data/glr.c: Written by Paul Hilfinger.
2108 * data/glr.cc: Written by Akim Demaille.
2109 * data/lalr1.cc: Likewise.
2110
035aa4a0
PE
21112005-11-18 Paul Eggert <eggert@cs.ucla.edu>
2112
d9963c85
PE
2113 * data/yacc.c (yy_reduce_print, YY_REDUCE_PRINT):
2114 Fix typos in previous change that broke 'make check'.
2115 YY_REDUCE_PRINT cannot be a pseudo-varargs macro; that isn't
2116 supported in C.
2117 * tests/calc.at (_AT_CHECK_CALC,_AT_CHECK_CALC_ERROR):
2118 Don't check NUM-STDERR-LINES, since the output format is fluctuating.
2119 We can revert this once things settle down.
2120
035aa4a0
PE
2121 * src/conflicts.c (conflicts_print): Don't print file name twice
2122 when %expect fails because there were no conflicts.
2123 * doc/bison.texinfo (Expect Decl): Tighten up wording in previous
2124 change.
2125 * tests/conflicts.at (%expect not enough, %expect too much):
2126 (%expect with reduce conflicts): Adjust to new behavior.
2127
21282005-11-18 Akim Demaille <akim@epita.fr>
2129
2130 * src/conflicts.c (conflicts_print): Unsatisfied %expectation are
2131 errors.
2132 * NEWS: Document this.
2133 * doc/bison.texinfo (Expect Decl): Likewise.
2134
d1ff7a7c
AD
21352005-11-16 Akim Demaille <akim@epita.fr>
2136
2137 Generalize the display of semantic values and locations in traces.
2138 * data/glr.c (yy_reduce_print): Fix indices (again).
2139 * data/c++.m4 (b4_rhs_value, b4_rhs_location): Don't expect
2140 literal integers.
2141 * data/lalr1.cc (yyreduce_print): Rename as...
2142 (yy_reduce_print): this.
2143 Display values and locations.
2144 * data/yacc.c (yy_reduce_print): Likewise.
2145 (YY_REDUCE_PRINT): Adjust to pass the required arguments.
2146 (yysymprint): Move higher to be visible from yy_reduce_print).
2147 (yyparse): Adjust.
2148 * tests/calc.at: Adjust the expected length of the traces.
2149
6de5398d
AD
21502005-11-14 Akim Demaille <akim@epita.fr>
2151
2152 * data/glr.c (yy_reduce_print): The loop was quite wrong: type are
2153 from 1 to N, while values and location start at 0.
2154 (b4_rhs_location, b4_rhs_value): Add parens around $1 and $2.
2155
a1373f55
AD
21562005-11-14 Akim Demaille <akim@epita.fr>
2157
2158 * data/glr.c (yy_reduce_print): Fix the $ number.
2159
613d8952
AD
21602005-11-14 Akim Demaille <akim@epita.fr>
2161
2162 "Use" parse parameters.
2163 * data/c.m4 (b4_parse_param_for, b4_parse_param_use): New.
2164 * data/glr.c, data/glr.cc: Use them.
2165 * data/glr.c (YYUSE): Have a C++ definition that supports
2166 non-pointer types.
2167
b2741627
AD
21682005-11-14 Akim Demaille <akim@epita.fr>
2169
2170 * data/glr.c (yyexpandGLRStack): Declare only if defined.
2171
5059b5c8
AD
21722005-11-14 Akim Demaille <akim@epita.fr>
2173
42249483
AD
2174 * data/glr.cc: New.
2175 * data/m4sugar/m4sugar.m4 (m4_prepend): New.
5059b5c8 2176
4626a15d
AD
21772005-11-12 Akim Demaille <akim@epita.fr>
2178
2179 Let position and location be PODs.
2180 * data/location.cc (position::initialize, location::initialize): New.
2181 (position::position, location::location): Define only if
2182 b4_location_constructors is defined.
2183 * data/lalr1.cc (b4_location_constructors): Define it for backward
2184 compatibility.
2185 * doc/bison.texinfo (Initial Action Decl): Use initialize.
2186
21872005-11-12 Akim Demaille <akim@epita.fr>
98ae9643
AD
2188
2189 * data/lalr1.cc: Move the body of the ctor and dtor into the
2190 parser file (instead of the header).
2191 Wrap the implementations in a "namespace yy".
2192
21932005-11-12 Akim Demaille <akim@epita.fr>
2194
2195 Have glr.c include its header file when created.
2196 * data/glr.c (b4_shared_declarations): New.
2197 Output them verbatim in the parser if !%defines, otherwise
2198 output then in the header file, and include it instead.
2199
1989d947
AD
22002005-11-11 Akim Demaille <akim@epita.fr>
2201
2202 * data/glr.c: Comment changes.
2203
22042005-11-11 Akim Demaille <akim@epita.fr>
62b08cfc
AD
2205
2206 When yydebug, report semantic and location values for reductions.
2207 * data/glr.c (yy_reduce_print): Report the semantic values and the
2208 locations.
2209 (YY_REDUCE_PRINT): Adjust.
2210 (yyglrReduce): Use them.
2211 (b4_rhs_value, b4_rhs_location): Remove m4_eval invocations.
2212 * data/c.m4 (b4_yysymprint_generate): Specify the const arguments.
2213 * tests/calc.at (_AT_CHECK_CALC_ERROR): Remove the reduction
2214 traces.
2215
02998094
AD
22162005-11-10 Akim Demaille <akim@epita.fr>
2217
2218 * data/glr.c (yynewGLRStackItem, YY_RESERVE_GLRSTACK): New.
2219 (yyaddDeferredAction, yyglrShift, yyglrShiftDefer): Use them.
2220 (yyexpandGLRStack, YYRELOC): Define only when YYSTACKEXPANDABLE.
2221
5210672f
PE
22222005-11-09 Albert Chin-A-Young <china@thewrittenword.com>
2223
2224 * m4/cxx.m4, examples/Makefile.am: Don't build
2225 examples/calc++ if no C++ compiler is available. (trivial change)
2226
a8991a1d
AD
22272005-11-09 Akim Demaille <akim@epita.fr>
2228
2229 * src/scan-skel.l: Use a couple of asserts.
2230
36b5e963
AD
22312005-11-03 Akim Demaille <akim@epita.fr>
2232
2233 In some (weird) cases, the final state number is incorrect.
2234 Reported by Alexandre Duret-Lutz.
2235 * src/LR0.c (state_list_append): Remove the computation of
2236 final_state.
2237 (save_reductions): Do it here.
2238 (get_state): Alpha conversion.
2239 (generate_states): Use a for loop.
2240 * src/gram.h (item_number_is_rule_number)
2241 (item_number_is_symbol_number): New.
2242 * src/state.c: Use assert.
2243 * src/system.h: Include assert.h.
2244 * tests/sets.at (Accept): New.
2245
44e7ead1
PH
22462005-10-30 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
2247
2248 * data/glr.c (yyfill): Adjust comment.
36b5e963 2249 (yyresolveAction): Initialize default location properly
44e7ead1
PH
2250 for empty right-hand sides.
2251 (yydoAction): Ditto.
2252 Add comment explaining apparently dead code.
36b5e963
AD
2253 * tests/glr-regression.at
2254 (Incorrectly initialized location for empty right-hand side in GLR):
44e7ead1 2255 New test.
36b5e963 2256
e10a80ee
PE
22572005-10-30 Paul Eggert <eggert@cs.ucla.edu>
2258
2259 * bootstrap (cleanup_gnulib): New function. Use it to clean up
2260 gnulib when interrupted. This fixes some race conditions and
2261 works around some portability problems (one noted by Paul
2262 Hilfinger).
2263
067b32ee
AD
22642005-10-22 Akim <akim@epita.fr>
2265
2266 * Makefile.cfg: Adjust to config -> build-aux.
2267 Reported by twledo.
2268
4b367315
AD
22692005-10-21 Akim Demaille <akim@epita.fr>
2270
2271 * data/c.m4 (b4_yydestruct_generate, b4_yysymprint_generate): Pass
2272 the %parse-params.
2273 * data/glr.c (YY_SYMBOL_PRINT, yydestroyGLRState): Adjust.
2274 * data/yacc.c (b4_Pure_if): Rename as...
2275 (b4_yacc_pure_if): this.
2276 (YY_SYMBOL_PRINT, yyparse): Adjust.
2277 * doc/bison.texinfo: Formatting changes.
2278
24cc23d9
AD
22792005-10-21 Akim Demaille <akim@epita.fr>
2280
2281 Finish the transition config -> build-aux.
2282 * configure.ac, Makefile.am: Use build-aux.
2283 * config/prev-version, config/announce-gen, config/Makefile.am:
2284 Move to...
2285 * build-aux/prev-version, build-aux/announce-gen,
2286 * build-aux/Makefile.am: here.
2287
d4476375
AD
22882005-10-14 Akim Demaille <akim@epita.fr>
2289
2290 * examples/calc++/test: Use set -x only when VERBOSE.
2291
302c0aee
PE
22922005-10-13 Paul Eggert <eggert@cs.ucla.edu>
2293
2294 * NEWS: Bison now warns if it finds a stray `$' or `@' in an action.
2295 * src/scan-gram.l (<SC_BRACED_CODE>[$@]): Implement this.
2296
7625ec2c
AD
22972005-10-13 Akim Demaille <akim@epita.fr>
2298
2299 * src/scan-skel.l: Output the base name parts of the parser and
2300 header file names.
302c0aee 2301 * tests/output.at (AT_CHECK_OUTPUT): Support subdirectories, and
7625ec2c
AD
2302 additional checks.
2303 Use this to exercise C++ outputs in subdirs.
2304 Reported by Oleg Smolsky.
2305
ba0fe3c7
PE
23062005-10-12 Paul Eggert <eggert@cs.ucla.edu>
2307
2308 * data/c.m4 (b4_c_function_def): Look at __C99_FUNC__, not at
2309 __STDC_VERSION__, as IBM cc 7.0 doesn't define the latter either.
2310 Problem reported by John P. Hartmann.
2311 * data/yacc.c (YYMODERN_C): Likewise. Don't define if the user has
2312 already defined it.
2313
9b8a5ce0
AD
23142005-10-12 Akim Demaille <akim@epita.fr>
2315
2316 * src/parse-gram.y (version_check): Exit 63 to please missing
2317 (stands for "version mismatch).
2318 * tests/input.at, doc/bison.texinfo: Adjust.
2319
4f6e011e
PE
23202005-10-10 Paul Eggert <eggert@cs.ucla.edu>
2321
2322 Work around portability problems with Visual Age C compiler
2323 (xlc and xlC_r) reported by John P. Hartmann.
2324 * data/location.cc (initial_column, initial_line): Remove.
2325 All uses replaced by 0 and 1.
2326 * src/scan-gram.l (gram_wrap): Redefine to avoid bug in flex 2.5.31
2327 that xlc complains about.
2328 * src/scan-skel.l (skel_wrap): Likewise.
4d7aa45e 2329 * data/c.m4 (b4_c_function_def): Look at __STDC_VERSION__ as well
ba0fe3c7 2330 as __STDC__.
4d7aa45e
PE
2331 * data/yacc.c (YYMODERN_C): New macro, which also looks at
2332 __STDC_VERSION__. Use it everywhere instead of looking at
2333 __STDC__ and __cplusplus.
4f6e011e 2334
a1b3bf8c
AD
23352005-10-10 Akim Demaille <akim@epita.fr>
2336
2337 * examples/calc++/test: Be quiet unless VERBOSE.
2338
412e44aa
PE
23392005-10-05 Paul Eggert <eggert@cs.ucla.edu>
2340
2a4647a3
PE
2341 * data/c.m4 (yydestruct, yysymprint):
2342 Use YYUSE instead of casting to void.
2343 * data/glr.c (YYUSE): New macro.
2344 (yyuserMerge, yyreportAmbiguity, yyreportSyntaxError):
2345 Use it instead of rolling our own.
2346 (YYLLOC_DEFAULT, YYCHK, YYDPRINTF, YY_SYMBOL_PRINT, YY_REDUCE_PRINT):
2347 (YYCHK1):
2348 Use /*CONSTCOND*/ to suppress lint warnings.
2349 * data/lalr1.cc (YYLLOC_DEFAULT, YY_SYMBOL_PRINT, YY_REDUCE_PRINT):
2350 (YY_STACK_PRINT): Use 'false' not '0'.
2351 (YYUSE): New macro.
2352 (yysymprint_, yydestruct_): Use it instead of rolling our own.
2353 * data/yacc.c (YYUSE): New macro.
2354 (YYCOPY, YYSTACK_RELOCATE, YYBACKUP, YYLLOC_DEFAULT):
2355 (YYDPRINTF, YY_SYMBOL_PRINT, YY_STACK_PRINT, YY_REDUCE_PRINT):
2356 (yyerrorlab): Use /*CONSTCOND*/ to suppress lint warnings.
2357
2358
412e44aa
PE
2359 * data/m4sugar/m4sugar.m4 (_m4_map): New macro.
2360 (m4_map, m4_map_sep): Use it. Handle the empty list correctly.
2361
88c6637f
PE
23622005-10-04 Paul Eggert <eggert@cs.ucla.edu>
2363
2f4f028d
PE
2364 Undo the parts of the unlocked-I/O change that substituted
2365 putc or puts for printf. This might hurt performance a bit,
2366 but some people prefer the printf style.
2367 * data/c.m4 (yysymprint): Prefer printf to puts and putc.
2368 * data/glr.c (YYFPUTC, YYFPUTS, YYDPUTS): Remove.
2369 All uses replaced by YYFPRINTF and YYDPRINTF.
2370 * data/yacc.c: Likewise.
2371 * lib/bitset.c (bitset_print): Likewise.
2372 * lib/bitsetv.c (bitsetv_dump, debug-bitsetv): Prefer printf to
2373 putc and puts.
2374 * lib/lbitset.c (debug_lbitset): Likewise.
2375 * src/closure.c (print_firsts, print_fderives): Likewise.
2376 * src/gram.c (grammar_dump): Likewise.
2377 * src/lalr.c (look_ahead_tokens_print): Likewise.
2378 * src/output.c (escaped_output): Likewise.
2379 (user_actions_output): Break apart two printfs.
2380 * src/parse-gram.y (%printer): Prefer printf to putc and puts.
2381 * src/reduce.c (reduce_print): Likewise.
2382 * src/state.c (state_rule_look_ahead_tokens_print): Likewise.
2383 * src/system.h: Include unlocked-io.h rathe than stdio.h.
2384
88c6637f
PE
2385 * data/glr.c (yyuserMerge, yyreportAmbiguity, yyreportSyntaxError):
2386 Use assignments rather than casts-to-void to suppress
2387 unused-variable warnings. This pacifies 'lint'.
2388 * data/lalr1.cc (yysymprint_, yydestruct_): Use a call to suppress
2389 unused-variable warnings.
2390
fb32e373
JMG
23912005-10-03 Juan Manuel Guerrero <juan.guerrero@gmx.de>
2392
2393 * Makefile.am: DJGPP specific files added to EXTRA_DIST.
2394
edb8f44f
PE
23952005-10-02 Paul Eggert <eggert@cs.ucla.edu>
2396
fb9c0b33
PE
2397 Use unlocked I/O for a minor performance improvement on hosts like
2398 GNU/Linux and Solaris that support unlocked I/O. The basic idea
2399 is to use the gnlib unlocked-io module, and to prefer putc and
2400 puts to printf when either will work (since the latter doesn't
2401 come in an unlocked flavor).
2402 * bootstrap (gnulib_modules): Add unlocked-io.
2403 * data/c.m4 (yysymprint): Prefer puts and putc to printf.
2404 * data/glr.c (YYFPUTC, YYFPUTS, YYDPUTS): New macros.
2405 Prefer them to YYFPRINTF and YYDPRINTF if either will do,
2406 and similarly for puts and putc and printf.
2407 * data/yacc.c: Likewise.
2408 * lib/bitset.c (bitset_print): Likewise.
2409 * lib/bitset.h [USE_UNLOCKED_IO]: Include unlocked-io.h.
2410 * lib/bitsetv.c (bitsetv_dump, debug-bitsetv): Prefer putc and puts
2411 to printf.
2412 * lib/lbitset.c (debug_lbitset): Likewise.
2413 * src/closure.c (print_firsts, print_fderives): Likewise.
2414 * src/gram.c (grammar_dump): Likewise.
2415 * src/lalr.c (look_ahead_tokens_print): Likewise.
2416 * src/output.c (escaped_output): Likewise.
2417 (user_actions_output): Coalesce two printfs.
2f4f028d 2418 * src/parse-gram.y (%printer): Prefer putc and puts to printf.
fb9c0b33
PE
2419 * src/reduce.c (reduce_print): Likewise.
2420 * src/state.c (state_rule_look_ahead_tokens_print): Likewise.
2f4f028d 2421 * src/system.h: Include unlocked-io.h rather than stdio.h.
fb9c0b33 2422
edb8f44f
PE
2423 * data/lalr1.cc: Don't put an unmatched ' in a dnl comment, as
2424 this confuses xgettext.
2425
b50d2359
AD
24262005-10-02 Akim Demaille <akim@epita.fr>
2427
2428 * bootstrap (gnulib_modules): Add strverscmp.
2429 * lib/.cvsignore: Add strverscmp.c, strverscmp.h.
2430 * m4/.cvsignore: Add strverscmp.m4.
2431 * src/parse-gram.y (%require): New token, new rule.
2432 (version_check): New.
2433 * src/scan-gram.l (%require): Adjust.
2434 * tests/input.at (AT_REQUIRE): New.
2435 Use it.
2436 * doc/bison.texinfo (Require Decl): New.
2437 (Calc++ Parser): Use %require.
2438
21667f64
AD
24392005-10-02 Akim Demaille <akim@epita.fr>
2440
2441 * data/location.cc: New.
2442
2b81e969
AD
24432005-10-02 Paul Eggert <eggert@cs.ucla.edu>,
2444 Akim Demaille <akim@epita.fr>
2445
2446 Make sure -odir/foo.cc creates dir/location.hh etc.
2447 * src/files.h (spec_outfile, parser_file_name, spec_name_prefix)
2448 (spec_file_prefix, spec_verbose_file, spec_graph_file)
2449 (spec_defines_file): Now const.
2450 (dir_prefix): New.
2451 (short_base_name): Remove.
2452 * src/files.c: Adjust.
2453 (dirname.h): Include.
2454 (base_name): Don't prototype it.
2455 (finput): Remove, duplicates gram_in.
2456 (full_base_name, short_base_name): Replace by...
2457 (all_but_ext, all_but_tab_ext): these.
2458 (compute_base_names): Rename as...
2459 (compute_file_name_parts): this.
2460 Update to compute the new variables, including dir_prefix.
2461 Adjust dependencies.
2462 * src/output.c (prepare): Output them.
2463 * src/reader.c: Adjust to use gram_in, not finput.
2464 * src/scan-skel.l (@dir_prefix@): New.
2465
ad6a9b97
JMG
24662005-10-02 Juan Manuel Guerrero <juan.guerrero@gmx.de>
2467
2468 * lib/subpipe.c: New function end_of_output_subpipe() added
2469 to allow support for non-posix systems. This is a no-op function
2470 for posix systems.
2471
2472 * lib/subpipe.h: New function end_of_output_subpipe() added
2473 to allow support for non-posix systems. This is a no-op function
2474 for posix systems.
2475
2476 * src/output.c (output_skeleton): Use end_of_output_subpipe() to
2477 handle the lack of pipe/fork functionality on non-posix systems.
2478
2479 * djgpp/Makefile.maint: DJGPP specific file.
2480
2481 * djgpp/README.in: DJGPP specific file.
2482
2483 * djgpp/config.bat: DJGPP specific configuration file.
2484
2485 * djgpp/config.sed: DJGPP specific configuration file.
2486
2487 * djgpp/config.site: DJGPP specific configuration file.
2488
2489 * djgpp/config_h.sed: DJGPP specific configuration file.
2490
2491 * djgpp/subpipe.c: DJGPP specific replacement file for lib/subpipe.c.
2492
2493 * djgpp/subpipe.h: DJGPP specific replacement file for lib/subpipe.h.
2494
fc695704
AD
24952005-10-02 Akim Demaille <akim@epita.fr>
2496
2497 * data/location.cc: New, extract from...
2498 * data/lalr1.cc: here.
2499 (location.hh): Include it after the user prologue, in case the
2500 filename type is defined by the user.
2501 Forward declation location and position before the pre-prologue.
2502 (yyresult_): Rename as...
2503 (yyresult): this, it's a local variable, not an attribute.
2504 * data/Makefile.am (dist_pkgdata_DATA): Adjust.
2505
25062005-10-01 Akim Demaille <akim@epita.fr>
5215c87f
AD
2507
2508 * examples/extexi: Restore the #line generation.
2509
fb9712a9
AD
25102005-09-30 Akim Demaille <akim@epita.fr>,
2511 Alexandre Duret-Lutz <adl@gnu.org>
2512
2513 Move the token type and YYSTYPE in the parser class.
2514 * data/lalr1.cc (stack.hh, location.hh): Include earlier.
2515 (parser::token): New, from the moved free definition of tokens.
2516 (parser::semantic_value): Now a full definition instead of an
2517 indirection to YYSTYPE.
2518 (b4_post_prologue): No longer included in the header file, but
2519 in the implementation file.
2520 * doc/bison.texi (C+ Language Interface): Update.
2521 * src/parse-gram.y: Support unary %define.
2522 * tests/actions.at: Define global_tokens_and_yystype for backward
2523 compatibility until we update the tests.
2524 * tests/calc.at: Idem.
2525 (first_line, first_column, last_line, last_column): Define for lalr1.cc
2526 to simplify the code.
2527
55f0c7b1
PE
25282005-09-29 Paul Eggert <eggert@cs.ucla.edu>
2529
2530 Port to SunOS 4.1.4, which lacks strtoul and strerror.
2531 Ah, the good old days! Problem reported by Peter Klein.
2532 * bootstrap (gnulib_modules): Add strerror, strtoul.
2533 * lib/.cvsignore: Add strerror.c, strtol.c, strtoul.c
2534 * m4/.cvsignore: Add strerror.m4, strtol.m4, strtoul.m4.
2535
fb9712a9 25362005-09-29 Akim Demaille <akim@epita.fr>
d4fb5e3c
AD
2537
2538 * data/c.m4 (b4_error_verbose_if): New.
2539 * data/lalr1.cc: Use it.
2540 (YYERROR_VERBOSE_IF): Remove.
2541 (yyn_, yylen_, yystate_, yynerrs_, yyerrstatus_): Remove as
2542 parser members, replaced by...
2543 (yyn, yylen, yystate, yynerss, yyerrstatus): these parser::parse
2544 local variables.
2545 (yysyntax_error_): Takes the state number as argument.
2546 (yyreduce_print_): Use the argument yyrule, not the former
2547 attribute yyn_.
2548
8a6f72f3
PE
25492005-09-26 Paul Eggert <eggert@cs.ucla.edu>
2550
2551 * bootstrap (gnulib_modules): Add verify.
2552 * lib/.cvsignore: Add verify.h.
2553 * src/getargs.c: Use ARGMATCH_VERIFY rather than verify.
2554 * src/system.h (verify): Remove.
2555 Include verify.h instead.
2556 * src/tables.c (tables_generate): Use new API for 'verify'.
2557
0d50976f
PE
25582005-09-21 Paul Eggert <eggert@cs.ucla.edu>
2559
ebc3737e
PE
2560 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Do not use
2561 local variables whose names begin with 'yy'.
2562 * tests/calc.at (_AT_DATA_CALC_Y): Likewise.
2563 Trivial changes from Joel E. Denny.
2564
0d50976f
PE
2565 * bootstrap (gnulib_modules): Remove alloca. Bison doesn't need
2566 it itself.
2567 * src/main.c (main) [C_ALLOCA]: Don't flush alloca'ed memory; we
2568 don't use alloca any more.
2569
2570 * data/yacc.c [YYSTACK_USE_ALLOCA && !defined __GNUC__ && ! defined
2571 __BUILTIN_VA_ARG_INCR && ! defined _AIX && ! defined _MSC_VER &&
62c4328e 2572 defined _ALLOCA_H]: Don't include <stdlib.h>; not needed in this case.
0d50976f
PE
2573 * tests/torture.at (Exploding the Stack Size with Alloca): Adjust
2574 to match yacc.c, to test more hosts.
2575
a05b79df
PE
25762005-09-20 Paul Eggert <eggert@cs.ucla.edu>
2577
55289366
PE
2578 * data/yacc.c (YYSIZE_T): Reindent to make it clearer. This
2579 doesn't affect behavior.
2580 (YYSTACK_ALLOC) [YYSTACK_USE_ALLOCA]: Improve support for
2581 Solaris, AIX, MSC.
2582 (_STDLIB_H): Renamed from YYINCLUDED_STDLIB_H. All uses changed.
2583 This works a bit better with glibc, if user code has already included
2584 stdlib.h.
2585 * doc/bison.texinfo (Bison Parser): Document that users can't
2586 arbitrarily use malloc and free for other purposes. Document
2587 that <alloca.h> and <malloc.h> might be included.
2588 (Table of Symbols): Under YYSTACK_USE_ALLOCA, Don't claim that the
2589 user must declare alloca.
2590
a05b79df
PE
2591 * HACKING (release): Forwarn the Translation Project about
2592 stable releses.
2593
3ab2ca22
AD
25942005-09-20 Akim Demaille <akim@epita.fr>
2595
2596 * data/glr.c: Use b4_token_enums, not b4_token_enums_defines.
2597
a9739e7c
PE
25982005-09-19 Paul Eggert <eggert@cs.ucla.edu>
2599
a702593e
PE
2600 * data/yacc.c (YYSIZE_MAXIMUM): New macro.
2601 (YYSTACK_ALLOC_MAXIMUM): Use it.
2602 (yysyntax_error): New function.
2603 (yyparse) [YYERROR_VERBOSE]: Don't leak memory indefinitely if
2604 multiple syntax errors are reported, and alloca is being used.
2605 Instead, reallocate buffers twice as big each time, so that
2606 we waste at most half the allocated memory. Start with a small
2607 (128-byte) buffer that will suffice in most cases anyway.
2608 Use yysyntax_error to do most of the work.
2609
2610 * doc/bison.texinfo (Error Reporting, Table of Symbols):
2611 yynerrs is the number of errors reported, not the number of
2612 errors encountered.
2613
a9739e7c
PE
2614 * tests/glr-regression.at (Duplicated user destructor for lookahead):
2615 Mark it as expected to fail.
2616 Cast result of malloc; problem reported by twlevo@xs4all.nl.
2617 * tests/actions.at, tests/calc.at, tests/glr-regression.at:
2618 Don't start user-code symbols with "yy", to avoid name space problems.
2619
f479c6c6
AD
26202005-09-19 Akim Demaille <akim@epita.fr>
2621
2622 Remove the traits, failed experiment.
2623 It never proved useful, and anyway because of the current
2624 definition, it was not possible to have several specialization of
2625 this traits, making it useless.
2626 * data/lalr1.cc (yy:traits): Remove.
2627 Inline its definitions in the parser class.
2628
e2586f82
AD
26292005-09-19 Akim Demaille <akim@epita.fr>
2630
2631 * tests/atlocal.in (LIBS): Pass INTLLIBS to address failures on at
2632 least Mac OSX with a /usr/local install of gettext.
2633
2e8cf949
AD
26342005-09-19 Akim Demaille <akim@epita.fr>
2635
2636 * data/lalr1.cc (yyparse): Rename yylooka and yyilooka as yychar
2637 and yytoken for similarity with the other skeletons.
2638
c7fb0b90
AD
26392005-09-19 Akim Demaille <akim@epita.fr>
2640
4e26c69e 2641 * NEWS, configure.ac: update version number to 2.1a.
c7fb0b90 2642
1bd0deda
PE
26432005-09-16 Paul Eggert <eggert@cs.ucla.edu>
2644
2645 * NEWS: Version 2.1.
2646
2647 * NEWS: Remove notice of yytname change, since it was never in an
2648 official release.
2649 * data/glr.c (yydestroyGLRState): Rename local var to avoid shadowing
2650 diagnostic.
2651 * src/output.c (prepare): Likewise.
2652 * data/lalr1.cc (YYERROR_VERBOSE_IF): New macro.
2653 (yysyntax_error_): Use it to avoid GCC warning when YYERROR_VERBOSE
2654 is not defined. This is an awful hack, but it's enough for now.
2655 All callers changed.
2656 * tests/glr-regression-at (make_value): Args are const pointers now,
2657 to avoid GCC warning.
2658 (Duplicated user destructor for lookahead): New test. Currently
2659 skipped. It fails on my host but I'm not sure it'll always fail.
2660
26612005-09-16 Akim Demaille <akim@epita.fr>
c1432f65
AD
2662
2663 * src/symtab.h (struct symbol): Declare the printer and destructor
2664 as const, to avoid accidental calls to free.
2665 (symbol_destructor_set, symbol_printer_set): Adjust.
2666 * src/symtab.c: Adjust.
2667
1bd0deda 26682005-09-16 Akim Demaille <akim@epita.fr>
cf147260
AD
2669
2670 * data/c.m4 (b4_token_enums): New.
2671 (b4_token_defines): Rename as...
2672 (b4_token_enums_defines): this.
2673 (b4_token_defines): New, output only the #defines.
2674 * data/yacc.c, data/glr.c: Adjust.
2675 * data/lalr1.cc: Use b4_token_enums instead of b4_token_enums_defines.
2676 * data/c.m4 (b4_yydestruct_generate, b4_yysymprint_generate): Define
2677 as default values.
2678
dbcdae2d
AD
26792005-09-16 Akim Demaille <akim@epita.fr>
2680
2681 * data/lalr1.cc (yylex_): Remove, inline its code.
2682 (yyreport_syntax_error_): Remove, replaced by...
2683 (yysyntax_error_): this which returns a string and leaves to the
2684 caller the call to the users' error function.
2685 (yylooka_, yyilooka_, yylval, yylloc, yyerror_range_, yyval, yyloc):
2686 Move from members of the parser object...
2687 (yylooka, yyilooka, yylval, yylloc, yyerror_range, yyval, yyloc):
2688 to local variables of the parse function.
2689
70d8f291
AD
26902005-09-16 Akim Demaille <akim@epita.fr>
2691
2692 * doc/bison.texinfo (Calc++ Parser): Don't promote defining YYEOF
2693 since it's in Bison's name space.
2694
b47dbebe
PE
26952005-09-15 Paul Eggert <eggert@cs.ucla.edu>
2696
ae199bf1
PE
2697 * data/glr.c (yyresolveValue): Add default case to pacify
2698 gcc -Wswitch-default. Problem reported by twlevo@xs4all.nl.
2699
b47dbebe
PE
2700 * NEWS: Document when yyparse started to return 2.
2701 * doc/bison.texinfo (Parser Function): Document when yyparse
2702 returns 2.
2703
2704 * data/lalr1.cc: Revert part of previous change, as it's incompatible.
2705 (b4_filename_type): Renamed back from b4_file_name_type. All uses
2706 changed.
2707 (class position): file_name -> filename (reverting). All uses changed.
2708
27092005-09-14 Paul Eggert <eggert@cs.ucla.edu>
2710
2711 * examples/calc++/Makefile.am ($(calc_sources_generated)): Don't
2712 do anything if $@ exists. This reverts part of the 2005-07-07
2713 patch.
2714
00292f66
PE
27152005-09-11 Paul Eggert <eggert@cs.ucla.edu>
2716
2717 * Makefile.am (EXTRA_DIST): Do not distribute REFERENCES; it
2718 contains obsolete information and isn't worth distributing as a
2719 separate file anyway.
2720 * data/glr.c [defined YYSETJMP]: Don't include <setjmp.h>.
2721 (YYJMP_BUF, YYSETJMP, YYLONGJMP) [!defined YYSETJMP]: New macros.
2722 All uses of jmp_buf, setjmp, longjmp changed to use these instead.
2723 (yyparse): Abort if user code uses longjmp to throw an unexpected
2724 value.
2725
a420f962
PE
27262005-09-09 Paul Eggert <eggert@cs.ucla.edu>
2727
00292f66
PE
2728 * data/c.m4 (b4_identification): Define YYBISON_VERSION.
2729 Suggested by twlevo@xs4all.nl.
2730
127287e9
PE
2731 * data/glr.c (YYCHK1): Do not assume YYE is in range.
2732 This avoids a diagnostic from gcc -Wswitch-enum.
2733 Problem reported by twlevo@xs4all.nl.
2734
a420f962
PE
2735 * doc/bison.texinfo: Don't use "filename", as per GNU coding
2736 standards. Use "file name" or "file" or "name", depending on
2737 the context.
2738 (Invocation): The output of "bison hack/foo.y" goes to foo.tab.c,
2739 not to hack/foo.tab.c.
2740 (Calc++ Top Level): 2nd arg of main is not const.
48b16bbc
PE
2741 * data/glr.c: b4_filename -> b4_file_name.
2742 * data/lalr1.cc: Likewise. Also, b4_filename_type -> b4_file_name_type.
2743 All uses changed.
2744 (class position): filename -> file_name. All uses changed.
2745 * data/yacc.c: b4_filename -> b4_file_name.
2746 * lib/bitset.h: filename -> file_name in local vars.
2747 * lib/bitset_stats.c: Likewise.
2748 * src/files.c: Likewise.
2749 * src/scan-skel.l ("@output ".*\n): Likewise.
2750 * src/files.c (file_name_split): Renamed from filename_split.
2751 * src/muscle_tab.c (muscle_init): Output b4_file_name, not b4_filename.
a420f962
PE
2752
27532005-09-08 Paul Eggert <eggert@cs.ucla.edu>
2754
2755 * lib/.cvsignore: Add pipe-safer.c, stdio--.h, unistd--.h,
2756 to accommodate latest gnulib.
2757
2758 * tests/glr-regression.at (Duplicate representation of merged trees):
2759 Add casts to pacify g++. Problem reported by twlevo@xs4all.nl.
2760
2761 * bootstrap: Add comment as to why the AM_LANGINFO_CODESET hack is
2762 needed.
2763
42a6501d
PE
27642005-08-26 Paul Eggert <eggert@cs.ucla.edu>
2765
2766 * data/glr.c (yydestroyGLRState): Renamed from yydestroyStackItem.
2767 All uses changed. Invoke user destructor after an error during a
2768 split parse (trivial change from Joel E. Denny).
2769
2770 * tests/glr-regression.at
2771 (User destructor after an error during a split parse): New test case.
2772 Problem reported by Joel E. Denny in:
2773 http://lists.gnu.org/archive/html/bison-patches/2005-08/msg00029.html
2774
ef9a1faf
PE
27752005-08-25 Paul Eggert <eggert@cs.ucla.edu>
2776
5b4aaf78
PE
2777 * README-cvs: Give URLs for recommended tools.
2778 Mention Gzip version problem, and bootstrapping issues.
2779 Remove troubleshooting section, as it's somewhat obsolete.
2780
b5240ba5
PE
2781 * bootstrap (no_cache): New var, to accommodate different wget
2782 variants. Use it instead of '-C off'. Problem reported by
2783 twlevo@xs4all.nl.
2784
ef9a1faf
PE
2785 * data/glr.c (yydestroyStackItem): New function.
2786 (yyrecoverSyntaxError, yyreturn): Use it to improve quality of
2787 debugging information. Problem reported by Joel E. Denny.
2788
e6efa9da
AD
27892005-08-25 Akim Demaille <akim@epita.fr>
2790
2791 * tests/local.at (AT_COMPILE_CXX): Pass $LINKS too.
2792
adc90f13
PE
27932005-08-24 Paul Eggert <eggert@cs.ucla.edu>
2794
2795 * data/glr.c (yyrecoverSyntaxError, yyreturn):
2796 Don't invoke destructor on unresolved entries.
2797 * tests/glr-regression.at
2798 (User destructor for unresolved GLR semantic value): New test case.
2799 Problem reported by Joel E. Denny in:
2800 http://lists.gnu.org/archive/html/bison-patches/2005-08/msg00016.html
2801
f9315de5
PE
28022005-08-21 Paul Eggert <eggert@cs.ucla.edu>
2803
15d29c1f
PE
2804 * lib/.cvsignore: Remove realloc.c, strncasecmp.c, xstrdup.c.
2805 Add strnlen.c.
2806 * m4/.cvsignore: Remove codeset.m4, gettext.m4, lib-ld.m4,
2807 lib-prefix.m4, po.m4.
2808
dd5f2af2
PE
2809 * data/glr.c (yyreturn): Use "Cleanup:" rather than "Error:"
2810 in yydestruct diagnostic, since it might not be an error.
2811 Problem reported by Joel Denny near end of
2812 <http://lists.gnu.org/archive/html/help-bison/2005-07/msg00040.html>.
6250acbd 2813 * data/lalr1.cc (yyerturn): Likewise.
dd5f2af2
PE
2814 * data/yacc.c (yyreturn): Likewise.
2815 * tests/calc.at (_AT_CHECK_CALC_ERROR): Adjust to the above change.
2816
2817 * src/files.c: Remove obsolete FIXME comment.
2818
2819 * data/glr.c (YY_SYMBOL_PRINT): Append a newline, for consistency
2820 with the other templates, and to fix bogus run-on messages such
2821 as the one reported at the end of
2822 <http://lists.gnu.org/archive/html/help-bison/2005-07/msg00040.html>.
2823 All callers changed to avoid the newline.
2824 (yyprocessOneStack): Output two lines rather than one, to accommodate
2825 the above change. This changes the debug output format slightly.
2826
f9315de5
PE
2827 * data/glr.c (yyresolveValue): Fix redundant parse tree problem
2828 reported by Joel E. Denny in
2829 <http://lists.gnu.org/archive/html/bison-patches/2005-08/msg00004.html>
2830 (trivial change).
2831 * tests/glr-regression.at (Duplicate representation of merged trees):
2832 New test, from Joel E. Denny in:
2833 <http://lists.gnu.org/archive/html/help-bison/2005-07/msg00013.html>.
2834 * THANKS: Add Joel E. Denny.
2835
2836 * configure.ac (AC_INIT): Bump to 2.0c.
2837
04098407
PE
28382005-07-24 Paul Eggert <eggert@cs.ucla.edu>
2839
2840 * NEWS: Version 2.0b.
2841
ca5d2013
PE
2842 * Makefile.am (SUBDIRS): Put examples before tests, so that
2843 "make check" doesn't finish with "All 1 tests passed".
2844
3d54b576
PE
2845 * tests/regression.at (Token definitions): Don't rely on
2846 AT_PARSER_CHECK for data that contains backslashes. It currently
2847 uses 'echo', and 'echo' isn't portable if its argument contains
2848 backslashes. Problem found on OpenBSD 3.4. Also, do not assume
2849 that the byte '\0xff' is not printable in the C locale; it is,
2850 under OpenBSD 3.4 (!). Luckily, '\0x80' through '\0x9e' are
2851 not printable, so use '\0x81' to test.
2852
d53ae497
PE
2853 * data/glr.c (YYOPTIONAL_LOC): Define even if it's not a recent
2854 version of GCC, since the macro is used with non-GCC compilers.
2855
fc01665e
PE
2856 Fix core dump reported by Pablo De Napoli in
2857 <http://lists.gnu.org/archive/html/bug-bison/2005-07/msg00053.html>.
2858 * tests/regression.at (Invalid inputs with {}): New test.
2859 * src/parse-gram.y (token_name): Translate type before using
2860 it as an index.
2861
04098407
PE
2862 * data/glr.c (ATTRIBUTE_UNUSED): Remove, since it infringes on
2863 the user's name space. All uses changed to __attribute__
2864 ((__unused__)).
2865 (yyFail, yyMemoryExhausted, yyreportAmbiguity):
2866 Add __attribute__ ((__noreturn__)).
2867
2868 * etc/clcommit: Remove. We weren't using it, and it failed
2869 "make maintainer-distcheck".
2870 * Makefile.maint: Merge from coreutils.
2871 (CVS_LIST, CVS_LIST_EXCEPT): New macros.
2872 (syntax-check-rules): Change list of rules as described below.
2873 (sc_cast_of_alloca_return_value, sc_dd_max_sym_length):
2874 (sc_file_system, sc_obsolete_symbols, sc_prohibit_atoi_atof):
2875 (sc_prohibit_jm_in_m4, sc_root_tests, sc_tight_scope):
2876 (sc_trailing_space): New rules.
2877 (sc_xalloc_h_in_src): Remove.
2878 (sc_cast_of_argument_to_free, sc_cast_of_x_alloc_return_value):
2879 (sc_space_tab, sc_error_exit_success, sc_changelog):
2880 (sc_system_h_headers, sc_sun_os_names, sc_unmarked_diagnostics):
2881 (makefile-check, po-check, author_mark_check):
2882 (makefile_path_separator_check, copyright-check):
2883 Use grep -n, to make it easier to find violations.
2884 Use CVS_LIST and CVS_LIST_EXCEPT.
2885 (header_regexp, h_re): Remove.
2886 (dd_c): New macro.
2887 (sc_dd_max_sym_length, .re-list, news-date-check): New rules.
2888 (my-distcheck): Use more-modern GCC flags.
2889 (signatures, %.asc): Remove.
2890 (rel-files, announcement): Remove signatures.
2891 Restore old updating code, even though we don't use it, so
2892 that we're the same as coreutils.
2893 (alpha, beta, major): Depend on news-date-check.
2894 Make the upload commands.
2895
2896 * data/c.m4, data/lalr1.cc, data/yacc.c: Normalize white space.
2897 * lib/abitset.h, lib/bbitset.h, lib/bitset.h: Likewise.
2898 * lib/bitset_stats.c, lib/ebitset.h, lib/lbitset.c: Likewise.
2899 * lib/libitset.h, lib/timevar.c, lib/vbitset.h: Likewise.
2900 * src/Makefile.am, src/gram.c, src/muscle_tab.h: Likewise.
2901 * src/parse-gram.y, src/system.h, src/tables.c, src/vcg.c: Likewise.
2902 * src/vcg_defaults.h, tests/cxx-type.at, tests/existing.at: Likewise.
2903 * tests/sets.at: Likewise.
2904
2905 * data/m4sugar/m4sugar.m4: Sync from Autoconf, except that
2906 we comment out the Autoconf version number.
2907 * doc/bison.texinfo (Calc++ Scanner): Don't use atoi, as
2908 it's error-prone and "make maintainer-distcheck" rejects it.
2909
2910 * lib/subpipe.c: Include <fcntl.h> without checking for HAVE_FCNTL_H.
2911 Indent calls to "error" to pacify "make maintainer-distcheck",
2912 when the calls are not intended to be translated.
2913 * m4/subpipe.m4 (BISON_PREREQ_SUBPIPE): Don't check for fcntl.h.
2914
2915 * src/Makefile.am (DEFS): Use +=, to pacify
2916 "make maintainer-distcheck".
2917 (bison_SOURCES): Add scan-skel.h.
2918 (sc_tight_scope): New rule, from coreutils.
2919
2920 * src/files.c (src_extension, header_extension):
2921 Now static, not extern.
2922 * src/getargs.c (short_options): Likewise.
2923 * src/muscle_tab.c (muscle_table): Likewise.
2924 * src/parse-gram.y (current_class, current_type, current_prec):
2925 Likewise.
2926 * src/reader.c (grammar_end, previous_rule_end): Likewise.
2927 * src/getargs.h: Redo comments to pacify "make maintainer-distcheck".
2928 * src/main.c (main): Cast bindtextdomain and textdomain calls to
2929 void, to avoid warning when NLS is disabled.
2930 * src/output.c: Include scan-skel.h.
2931 (scan_skel): Remove decl, since scan-skel.h does this.
2932 (output_skeleton):
2933 Indent calls to "error" to pacify "make maintainer-distcheck".
2934 * src/print_graph.c: Don't include <obstack.h>, as system.h does this.
2935 * src/reader.h (gram_end, gram_lineno): New decls to pacify
2936 "make maintainer-distcheck".
2937 * src/scan-skel.l (skel_lex, skel_get_lineno, skel_get_in):
2938 (skel_get_out, skel_get_leng, skel_get_text, skel_set_lineno):
2939 (skel_set_in, skel_set_out, skel_get_debug, skel_set_debug):
2940 (skel_lex_destroy, scan_skel): Move these decls to...
2941 * src/scan-skel.h: New file.
2942 * src/uniqstr.c (uniqstr_assert):
2943 Indent calls to "error" to pacify "make maintainer-distcheck".
2944
2945 * tests/Makefile.am ($(srcdir)/package.m4): Use $(VAR),
2946 not @VAR@.
2947
2948 * tests/torture.at: Revamp to avoid misuse of atoi that
2949 "make maintainer-distcheck" complained about.
2950
2951 * examples/extexi (message): Don't print a message more than once,
2952 and omit line-number decoration that makes Emacs compile think
2953 that informative messages are worth worrying about.
2954
29552005-07-22 Paul Eggert <eggert@cs.ucla.edu>
2956
2957 * configure.ac: Update version number.
2958
2959 * Makefile.am (SUBDIRS): Add examples; somehow this got removed
2960 accidentally.
2961 * examples/calc++/calc++-parser.yy: Remove from CVS, as it's
2962 autogenerated by the maintainer.
2963 * examples/calc++/.cvsignore: Add *.yy.
2964
2965 * lib/bitset.c (bitset_alloc): Don't cast xcalloc result.
2966 * lib/bitset_stats.c (bitset_stats_init): Likewise.
2967 * lib/bitsetv.c (bitsetv_alloc): Likewise.
2968
2969 * po/POTFILES.in: Add lib/xalloc-die.c; remove lib/xmalloc.c.
2970
2971 * src/relation.c (relation_transpose): Rewrite to avoid bogus complaint
2972 from maintainer-distcheck about casting the argument of 'free'.
2973
2974 * NEWS: Mention recent yytname changes.
2975 * THANKS: Add Anthony Heading, twlevo@xs4all.nl.
2976
2977 * bootstrap: For translations that have not yet been upgraded to
2978 the new runtime-po domain, prime the pump by extracting the
2979 relevant strings from the obsolete translations. This code can be
2980 removed once the bison-runtime domain has been translated by each
2981 team.
2982
2983 * src/scan-gram.l (<SC_PRE_CODE>.): Don't double-quote token names,
2984 now that token names are already quoted.
2985
2986 Fix problem reported by Anthony Heading.
2987 * data/glr.c (YYTOKEN_TABLE): New macro.
2988 (yytname): Define if YYTOKEN_TABLE.
2989 * data/yacc.c (YYTOKEN_TABLE, yytname): Likewise.
2990 * data/lalr1.cc (YYTOKEN_TABLE, yytname_): Likewise.
2991 (YYERROR_VERBOSE): Define the same way the other skeletons do.
2992 * src/output.c (prepare_symbols): Output token_table_flag.
2993
0ffda363
PE
29942005-07-21 Paul Eggert <eggert@cs.ucla.edu>
2995
2996 * data/glr.c (yyinitGLRStack, yyreturn): Don't call malloc
2997 again if the first call fails.
2998
2999 * data/glr.c (yytnamerr): New function.
3000 (yyreportSyntaxError): Use it to dequote most string literals.
3001 * data/lalr1.c (yytname_): Renamed from yyname_, for compatibility
3002 with other skeletons. All uses changed.
3003 (yytnameerr_): New function.
3004 (yyreport_syntax_error): Use it to dequote most string literals.
3005 * data/yacc.c (yytnamerr): New function.
3006 (yyerrlab): Use it to decode most string literals.
3007 * doc/bison.texinfo (Decl Summary, Calling Convention):
3008 Clarify quoting convention of yytname.
3009 * src/output.c (prepare_symbols): Quote all names. This undoes
3010 the 2005-04-17 change, which is now accomplished (mostly) via
3011 changes in the parsers as described above.
3012 * tests/regression.at (Token definitions, Web2c Actions):
3013 Undo most 2005-04-17 change here, too.
3014
30152005-07-20 Paul Eggert <eggert@cs.ucla.edu>
3016
3017 Fix more problems reported by twlevo@xs4all.nl.
3018 * tests/cxx-type.at: Don't pipe output of ./types through sed to
3019 remove trailing spaces. This loses the exit status of ./types,
3020 and isn't needed since ./types shouldn't be emitting trailing
3021 spaces.
3022 * data/glr.c (yyreturn): Don't pop stack if yyinitStateSet failed,
3023 as the stack isn't valid in that case.
3024
3025 * src/scan-gram.l (gram_get_lineno, gram_get_in, gram_get_out):
3026 (gram_get_leng, gram_get_text, gram_set_lineno, gram_set_in):
3027 (gram_set_out, gram_get_debug, gram_set_debug, gram_lex_destroy):
3028 Add declarations to pacify "gcc -Wmissing-prototypes" when flex 2.5.31
3029 is used.
3030 * src/scan-skel.l (skel_get_lineno, skel_get_in, skel_get_out):
3031 (skel_get_leng, skel_get_text, skel_set_lineno, skel_set_in):
3032 (skel_set_out, skel_get_debug, skel_set_debug, skel_lex_destroy):
3033 Likewise.
3034
3035 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Work even with
3036 overly-picky compilers that reject 'char *foo = "bar";'.
3037
3038 * src/symtab.c (SYMBOL_ATTR_PRINT, symbol_print): Direct output
3039 to FILE * parameter, not to stderr. This fixes a typo introduced
3040 in the 2005-07-12 change.
3041
3042 * lib/subpipe.c (create_subpipe): Rewrite slightly to avoid
3043 warnings from GCC 4.
3044
3045 * data/glr.c (yyexpandGLRStack, yyaddDeferredAction, yyexpandGLRStack):
3046 (yyglrShiftDefer, yysplitStack):
3047 Remove unused parameters b4_pure_formals. All uses changed.
3048 (yyglrShift): Remove unused parameters b4_user_formals.
3049 All uses changed.
3050 (yyglrReduce): Removed unused parameter yylocp. All uses changed.
3051
6100a9aa
PE
30522005-07-18 Paul Eggert <eggert@cs.ucla.edu>
3053
258b75ca
PE
3054 Destructor cleanups and regularization among the three skeletons.
3055 * NEWS: Document the behavior changes.
3056 * data/glr.c (yyrecoverSyntaxError): Don't bother to pop the
3057 stack before failing, as the cleanup code will do it for us now.
3058 * data/lalr1.cc (yyerrlab): Likewise.
3059 * data/glr.c (yyparse): Pop everything off the stack before
3060 freeing it, so that destructors get called properly.
3061 * data/lalr1.cc (yyreturn): Likewise.
3062 * data/yacc.c (yyreturn): Pop and destroy the start symbol, too.
3063 This is more consistent.
3064 * doc/bison.texinfo (Destructor Decl): Mention more reasons
3065 why destructors might be called. 1.875 -> 2.1.
3066 (Destructor Decl, Decl Summary, Table of Symbols):
3067 Some English-language cleanups for %destructor.
3068 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
3069 Add output line for destructor of start symbol.
3070 * tests/calc.at (AT_CHECK_CALC): Add one to line counts,
3071 because of that same extra output line.
3072
1a059451
PE
3073 * NEWS: Document minor wording changes in diagnostics of
3074 Bison-generated parsers.
3075 * data/glr.c (yyMemoryExhausted): Renamed from yyStackOverflow.
3076 Remove unused formals. All uses changed.
3077 (yyreportAmbiguity): "ambiguity detected" -> "syntax is ambiguous".
3078 (yyparse): Rename yyoverflowlab to yyexhaustedlab.
3079 * data/yacc.c (yyparse): "parser stack overflow" -> "memory exhausted".
3080 Rename yyoverflowab to yyexhaustedlab.
3081 When memory exhaustion occurs during syntax-error reporting,
3082 report it separately rather than in a single diagnostic; this
3083 eases translation.
3084 * doc/bison.texinfo (Memory Management): Renamed from Stack Overflow.
3085 (Memory Exhausted): Renamed from Parser Stack Overflow.
3086 Revamp wording slightly to prefer "memory exhaustion".
3087 * tests/actions.at: "parser stack overflow" -> "memory exhausted".
3088
97460c78
PE
3089 * data/c.m4 (b4_yysymprint_generate): Use YYFPRINTF, not fprintf.
3090
30757c8c
PE
3091 Add i18n support to the GLR skeleton. Partially fix the C++
3092 skeleton; a C++ expert needs to finish this. Remove debugging
3093 msgids; there's little point to having them translated, since they
3094 can be understood only by someone who can read the
3095 (English-language) source code.
3096
3097 Generate runtime-po/bison-runtime.pot automatically, so that we
3098 don't have to worry about garbage getting in that file. We'll
3099 make sure after the next official release that old msgids don't
3100 get lost. See
3101 <http://lists.gnu.org/archive/html/bison-patches/2005-07/msg00119.html>.
3102
3103 * runtime-po/Makefile.in.in, runtime-po/bison-runtime.pot: Remove.
3104 Now auto-generated.
3105 * PACKAGING: Don't claim that Gawk, GCC, Perl use this method yet.
3106 Fix typos in explanations of the runtime file.
3107 * bootstrap: Change gettext keyword from YYI18N to YY_.
3108 Use standard Makefile.in.in in runtime-po, since we'll arrange
3109 for backward-compatible bison-runtime.po files in a different way.
3110 * data/glr.c (YY_): New macro, from yacc.c.
3111 (yyuserAction, yyreportAmbiguity, yyreportSyntaxError, yyparse):
3112 Translate messages intended for users.
3113 (yyreportSyntaxError): Change "virtual memory" to "memory" to match
3114 the wording in the other skeletons. We don't know that the memory
3115 is virtual.
3116 * data/lalr1.cc (YY_): Renamed from _. All uses changed.
3117 Use same method that yacc.c uses.
3118 Don't translate debugging messages.
3119 (yy::yyreport_syntax_error): Put in a FIXME for the i18n stuff;
3120 it doesn't work (yet), and requires C++ expertise to fix.
3121 * data/yacc.c (YY_): Renamed from YY18N. All uses changed.
3122 Move defn to a more logical place, to be consistent with other
3123 skeletons.
3124 Don't translate debugging messages.
3125 Don't assume line numbers fit in unsigned int; use unsigned long fmts.
3126 * doc/bison.texinfo: Mention <libintl.h>. Change glibc cross reference
3127 to gettext cross reference. Add indexing terms. Mention YYENABLE_NLS.
3128 * runtime-po/POTFILES.in: Add data/glr.c, data/lalr1.cc.
3129
ac8c5689
PE
3130 Fix yyerror / yylex test glitches noted by twlevo@xs4all.nl.
3131 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Have yyerror return
3132 void, not int.
3133 * tests/glr-regression.at (Badly Collapsed GLR States):
3134 Likewise.
3135 (Improper handling of embedded actions and dollar(-N) in GLR parsers):
3136 yylex should return 0 at EOF rather than aborting.
3137
6100a9aa
PE
3138 Improve tests for stack overflow in GLR parser.
3139 Problem reported by twlevo@xs4all.nl.
3140 * data/glr.c (struct yyGLRStack): Remove yyerrflag member.
3141 All uses removed.
3142 (yyStackOverflow): Just longjmp, but with value 2 so that caller
3143 can handle the problem.
3144 (YYCHK1): Use goto (a la yacc.c) rather than setting a flag.
3145 (yyparse): New local variable yyresult to record the result.
3146 Use result of setjmp to set it, rather than storing itinto
3147 struct.
3148 (yyDone): Remove label.
3149 (yyacceptlab, yyabortlab, yyoverflowlab, yyreturn): New labels,
3150 to mimic yacc.c. Do not discard lookahead if it's EOF (possible
3151 if YYABORT is used).
3152 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Exit with
3153 yyparse status; put status > 1 into diagnostic.
3154 Check that status==2 works.
3155 * tests/calc.at, tests/cxx-type.at, tests/glr-regression.at:
3156 Use exit status 3 for failure to open (which shouldn't happen).
3157
15f40952
PE
31582005-07-17 Paul Eggert <eggert@cs.ucla.edu>
3159
67fd79c4
PE
3160 * tests/conflicts.at (%nonassoc and eof): Don't exit with status
3161 1 on syntax error; just let yyparse do its thing.
3162 * tests/glr-regression.at (Badly Collapsed GLR States): Likewise.
3163 * tests/torture.at (AT_DATA_STACK_TORTURE): Likewise.
3164 (Exploding the Stack Size with Alloca):
3165 (Exploding the Stack Size with Malloc):
3166 Expect exit status 2, not 1, since the parser is supposed to blow
3167 its stack. Problem reported by twlevo@xs4all.nl.
3168
15f40952
PE
3169 * data/glr.c (yyparse): Don't assume that the initial calls
3170 to YYMALLOC succeed; in that case, yyparse incorrectly returned 0.
3171 Print a stack-overflow message and fail instead.
3172 Initialize the line-number information before creating the stack,
3173 so that the stack-overflow message can report line zero safely.
3174
f32c66b5
PE
31752005-07-14 Paul Eggert <eggert@cs.ucla.edu>
3176
a22ff96f 3177 Fix problems reported by twlevo@xs4all.nl.
e2688cd9
PE
3178 * data/glr.c (YYSTACKEXPANDABLE): Don't define if already defined.
3179 (yyuserMerge): Provide a default case if b4_mergers is empty.
3180 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Define YYSTACKEXPANDABLE.
3181 * tests/glr-regression.at
3182 (Improper handling of embedded actions and dollar(-N) in GLR parsers):
c70fdfcd 3183 Add casts to pacify C++ compilers.
1beb0b24
PE
3184 * tests/glr-regression.at (Improper merging of GLR delayed action
3185 sets): Declare yylex before using it.
f32c66b5 3186 * tests/Makefile.am (maintainer-check-g++): Fix a stray
a22ff96f
PE
3187 $(GXX) that escaped the renaming of GXX to CXX. Remove bogus
3188 test for valgrind; valgrind is independent of g++.
3189 (maintainer-check-posix): Add _POSIX2_VERSION=200112, to check
3190 for compatibility with POSIX 1003.1-2001 (if running coreutils).
3191 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Port to stricter C++.
3192 Use a destructor, so that we can expand the stack. Change
3193 YYSTYPE to char * so that we can free it. Cast result of malloc.
f32c66b5 3194
d741bd1b
PE
31952005-07-13 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
3196
3197 * data/glr.c (yyuserAction): Fix uninitialized variable that caused
3198 a valgrind failure. Problem reported by twlevo@xs4all.nl.
3199
0410a6e0
PE
32002005-07-13 Paul Eggert <eggert@cs.ucla.edu>
3201
3202 * PACKAGING: New file, suggested by Bruno Haible and taken from
3203 similar wording in gettext's PACKAGING file.
3204 * NEWS: Mention PACKAGING.
3205 * Makefile.am (EXTRA_DIST): Add PACKAGING.
3206
f7ab6a50
PE
32072005-07-12 Paul Eggert <eggert@cs.ucla.edu>
3208
baf785db 3209 * NEWS: Document recent i18n improvements.
f7ab6a50
PE
3210 * bootstrap: Get runtime translations into runtime-po.
3211 Create runtime-po files automatically, if possible.
3212 * configure.ac: Invoke BISON_I18N, so that we eat our own dog food.
3213 * data/yacc.c: Rewrite inclusion of <libintl.h> so that ENABLE_NLS
3214 does not infringe on the user's name space.
3215 (YYENABLE_NLS): Renamed from ENABLE_BISON_NLS.
3216 * doc/bison.texinfo (Internationalization): Revamp the English
3217 and Texinfo syntax a bit, to try to make it clearer.
3218 (Bison Options, Option Cross Key): Mention --print-localedir.
3219 * m4/bison-i18n.m4 (BISON_I18N): Rename ENABLE_BISON_NLS to
3220 YYENABLE_NLS. Quote a bit more.
3221 * runtime-po/.cvsignore: New file.
3222 * runtime-po/Makefile.in.in (mostlyclean): Remove *.old.pot.
3223 * runtime-po/Rules-quot: Remove; now created by bootstrap.
3224 * runtime-po/quot.sed: Likewise.
3225 * runtime-po/boldquot.sed: Likewise.
3226 * runtime-po/en@quot.header: Likewise.
3227 * runtime-po/en@boldquot.header: Likewise.
3228 * runtime-po/insert-header.sin: Likewise.
3229 * runtime-po/remove-potcdate.sin: Likewise.
3230 * runtime-po/Makevars: Likewise.
3231 * runtime-po/LINGUAS: Likewise.
3232 * runtime-po/de.po: Likewise; we will rely on the translation project
3233 to maintain this, so "bootstrap" should get it.
0410a6e0 3234 * src/getarg.c (PRINT_LOCALEDIR_OPTION): Let the C compiler determine
f7ab6a50
PE
3235 its value.
3236 * src/main.c (main): Bind the bison-runtime domain, too.
3237
32382005-07-12 Bruno Haible <bruno@clisp.org>
3239
3240 * data/yacc.c: Include <libintl.h> when NLS is enabled.
3241 (YYI18N): Renamed from _. Use dgettext when NLS is enabled.
3242 * po/POTFILES.in: Remove autogenerated file src/parse-gram.c.
3243 * runtime-po: New directory.
3244 * runtime-po/Makefile.in.in: New file, copied from po/, with modified
3245 $(DOMAIN).pot-update rule, so that old messages are never dropped.
3246 * runtime-po/Rules-quot: New file, copied from po/.
3247 * runtime-po/quot.sed: Likewise.
3248 * runtime-po/boldquot.sed: Likewise.
3249 * runtime-po/en@quot.header: Likewise.
3250 * runtime-po/en@boldquot.header: Likewise.
3251 * runtime-po/insert-header.sin: Likewise.
3252 * runtime-po/remove-potcdate.sin: Likewise.
3253 * runtime-po/Makevars: New file.
3254 * runtime-po/POTFILES.in: New file.
3255 * runtime-po/LINGUAS: New file.
3256 * runtime-po/bison-runtime.pot: New file.
3257 * runtime-po/de.po: New file.
3258 * m4/bison.m4: New file.
3259 * Makefile.am (SUBDIRS): Add runtime-po.
3260 (aclocaldir, aclocal_DATA): New variables.
3261 * configure.ac: Add AC_CONFIG_FILES of runtime-po/Makefile.in.
3262 Define aclocaldir.
3263 * src/getargs.c (usage): Document --print-localedir option.
3264 (PRINT_LOCALEDIR_OPTION): New enum item.
3265 (long_options): Add --print-localedir option.
3266 (getargs): Handle --print-localedir option.
3267 * doc/bison.texinfo (Bison Parser): Remove paragraph about _().
3268 (Internationalization): New section.
3269
22dda0f0
AD
32702005-07-12 Akim Demaille <akim@epita.fr>
3271
3272 * src/symtab.h, src/symtab.c (symbol_print): Swap the arguments,
3273 for consistency with the rest of the code.
3274 * src/symlist.h, src/symlist.c (symbol_list_print): Ditto.
3275 Add separators.
3276
82b248ad
AD
32772005-07-12 Akim Demaille <akim@epita.fr>
3278
3279 * src/parse-gram.y: Use %printer instead of YYPRINT.
3280
fa0e9314
AD
32812005-07-12 Akim Demaille <akim@epita.fr>
3282
867a3e00
AD
3283 * src/symtab.h, src/symtab.c (symbol_print): New.
3284 * src/symlist.h, src/symlist.c (symbol_list_print): New.
3285 * src/symlist.c (symbol_list_n_type_name_get): Report the culprit.
3286
32872005-07-12 Akim Demaille <akim@epita.fr>
3288
3289 * data/glr.c (b4_syncline): Fix (swap) the definitions of
fa0e9314
AD
3290 b4_at_dollar and b4_dollar_dollar.
3291
e054b190
PE
32922005-07-11 Paul Eggert <eggert@cs.ucla.edu>
3293
3294 * doc/bison.texinfo (Mystery Conflicts): Add reference to DeRemer
3295 and Pennello's paper.
3296
34160ec4
PE
32972005-07-09 Paul Eggert <eggert@cs.ucla.edu>
3298
407d4a75
PE
3299 * data/yacc.c (yyparse): Undo previous patch. Instead,
3300 set yylsp[0] and yyvsp[0] only if the initial action
3301 sets yylloc and yylval, respectively.
3302
34160ec4
PE
3303 * data/yacc.c (yyparse): In the initial action, set
3304 yylsp[0] and yyvsp[0] rather than yylloc and yylval.
3305 This avoids the use of undefined variables if the initial
3306 action does not set yylloc and/or yylval.
3307
c3d5a4a7
PE
33082005-07-07 Paul Eggert <eggert@cs.ucla.edu>
3309
b34d96c1
PE
3310 * examples/calc++/calc++-driver.cc, examples/calc++/calc++-driver.hh:
3311 * examples/calc++/calc++-scanner.ll, examples/calc++/calc++.cc:
3312 Remove from CVS. These files are automatically generated.
3313 * examples/extexi: Clarify that this file is now part of Bison,
3314 not GNU M4, and that it works with any POSIX-compatible Awk.
3315 * examples/calc++/Makefile.am (run_extexi): Remove; not used.
3316 ($(calc_extracted)): Renamed from $(calc_sources_extracted),
3317 so that we also get calc++-parser.yy. Geneate it.
3318 Use $(AWK), not gawk, since any conforming Awk will do.
3319 Put comment before action, since older 'make' can't handle comment
3320 in action.
3321 $(BUILT_SOURCES): List all built sources, not just some of them.
3322 $(MAINTAINERCLEANFILES): Remove *.stamp, and all built sources.
3323 $($(srcdir)/calc++-parser.stamp): Work even if POSIXLY_CORRECT.
3324 $($(calc_sources_generated)): Remove unnecessary test for existence
3325 of target. (This had a shell syntax error anyway; a stray "x".)
3326 (calc_extracted): List $(srcdir)/calc++-parser.yy, not
3327 calc++-parser.yy.
3328 * examples/.cvsignore, examples/calc++/.cvsignore: New files.
3329
c3d5a4a7
PE
3330 * bootstrap (gnulib_modules): Add gettext, now that it's no longer
3331 implied by the other modules.
3332
828c373b
AD
33332005-07-06 Akim Demaille <akim@epita.fr>
3334
3335 Bind examples/calc++ to the package.
3336 * examples/calc++/Makefile: Remove, replaced by...
3337 * examples/calc++/Makefile.am: ... this new file.
3338 * examples/calc++/test: Remove input.
3339 * examples/calc++/compile: Remove.
3340 * examples/Makefile.am: New.
3341 * configure.ac, Makefile.am: Adjust.
3342 * doc/Makefile.am (clean-local): New, for more recent texi2dvis.
3343
63cb01d6
PE
33442005-07-05 Paul Eggert <eggert@cs.ucla.edu>
3345
fd2df2ed
PE
3346 * data/glr.c (yyFail): Drastically simplify; since the format argument
3347 never had any % directives, we can simply pass it to yyerror.
3348 (yyparse): Use "t a; a=b;" rather than "t a = b;" when a will
3349 be modified later, as that is the usual style in glr.c.
3350 Problems reported by Paul Hilfinger.
3351
63cb01d6
PE
3352 Rewrite GLR parser to catch more buffer overrun, storage exhaustion,
3353 and size overflow errors.
3354 * data/glr.c: Include <stdio.h> etc. after user prolog, not before,
3355 in case the user prolog sets feature-test macros like _GNU_SOURCE.
3356 (YYSIZEMAX): New macro.
3357 (yystpcpy): New function, taken from yacc.c.
3358 (struct yyGLRStack.yyspaceLeft): Now size_t, not int.
3359 (yyinitGLRStack, yyfreeGLRstack): Remove unnecessary forward decls,
3360 so that we don't have to maintain their signatures.
3361 (yyFail): Check for buffer overflow, by using vsnprintf rather
3362 than vsprintf. Allocate a bigger buffer if possible.
3363 Report an error if buffer allocation fails.
3364 (yyStackOverflow): New function.
3365 (yyinitStateSet, yyinitGLRStack): Return a boolean indicating whether
3366 the initialization was successful. It might fail if storage was
3367 exhausted.
3368 (yyexpandGLRStack): Add more checks for storage allocation failure.
3369 Use yyStackOverflow to report failures.
3370 (yymarkStackDeleted, yyglrShift, yyglrShiftDefer, yydoAction):
3371 (yysplitStack, yyprocessOneStack, yyparse, yypstack):
3372 Don't assume stack number fits in int.
3373 (yysplitStack): Check for storage allocation failure.
3374 (yysplitStack, yyprocessOneStack): Add pure_formals, so that we
3375 can print diagnostics on storage allocation failure. All callers
3376 changed.
3377 (yyresolveValue): Use yybool for boolean.
3378 (yyreportSyntaxError): Check for size-calculation overflow.
3379 This code is taken from yacc.c.
3380 (yyparse): Check for storage allocation errors when allocating
3381 the initial stack.
3382
1c59e0a1
AD
33832005-07-05 Akim Demaille <akim@epita.fr>
3384
3385 Extract calc++ from the documentation.
3386 * doc/bison.texinfo (Calc++): Add the extraction marks.
3387 * examples/extexi: New, from the aborted GNU Programming 2E.
3388 Separate the different paragraph of a file with empty lines.
3389 * examples/Makefile: Use it to extract the whole calc++ example.
3390
8a0adb01
AD
33912005-06-24 Akim Demaille <akim@epita.fr>
3392
3393 * doc/bison.texinfo (C++ Parser Interface): Use defcv to define
3394 class typedefs.
3395
12545799
AD
33962005-06-22 Akim Demaille <akim@epita.fr>
3397
3398 * doc/bison.texinfo (C++ Language Interface): First stab.
3399 (C++ Parsers): Remove.
3400
99be0235
AD
34012005-06-22 Akim Demaille <akim@epita.fr>
3402
3403 * data/lalr1.cc (yylex_): Honor %lex-param.
3404
0ffd4fd1
AD
34052005-06-22 Akim Demaille <akim@epita.fr>
3406
3407 Start a set of simple examples.
3408 * examples/calc++/Makefile, examples/calc++/calc++-driver.cc,
3409 * examples/calc++/calc++-driver.hh,
3410 * examples/calc++/calc++-parser.yy,
3411 * examples/calc++/calc++-scanner.ll, examples/calc++/calc++.cc,
3412 * examples/calc++/compile, examples/calc++/test: New.
3413
0925ebb4
PE
34142005-06-09 Paul Eggert <eggert@cs.ucla.edu>
3415
3416 * data/yacc.c (malloc, free) [defined __cplusplus]: Wrap inside
3417 extern "C" {}. This fixes a problem reported by Paul Hilfinger,
3418 which stems from the 2005-05-27 patch.
3419
43d3b664
PH
34202005-06-06 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
3421
3422 * data/glr.c: Modify treatment of unused parameters to permit use
3423 of g++ (which doesn't allow __attribute__ ((unused)) for parameters).
3424
3062864d
PE
34252005-05-30 Paul Eggert <eggert@cs.ucla.edu>
3426
3427 Fix infringement on user name space reported by Janos Zoltan Szabo.
3428 * data/yacc.c (yyparse): strlen -> yystrlen.
3429
989b5b8e
AD
34302005-05-30 Akim Demaille <akim@epita.fr>
3431
3432 * data/lalr1.cc (_): New.
3433 Translate the various messages.
3434
bedf57f5
PE
34352005-05-27 Paul Eggert <eggert@cs.ucla.edu>
3436
3437 Fix infringement on user name space reported by Bruno Haible.
3438 * data/yacc.c (YYSIZE_T): Define first, so that later decls can use it.
3439 Prefer GCC's __SIZE_TYPE__ if available, so that we don't infringe on
3440 the user's name space.
3441 (alloca): Include <stdlib.h> to get it, if it's not built in.
3442 (YYMALLOC, YYFREE): Define only if needed.
3443 (malloc, free): Declare, but only if needed, as this infringes on
3444 the user name space.
3445
4d1801f1
PE
34462005-05-25 Paul Eggert <eggert@cs.ucla.edu>
3447
3448 Fix BeOS, FreeBSD, MacOS porting problems reported by Bruno Haible.
3449 * lib/bitset.c (bitset_print): Don't assume size_t can be printed
3450 with %d format.
3451 * lib/ebitset.c (min, max): Undef before defining.
3452 * lib/vbitset.c (min, max): Likewise.
3453 * lib/subpipe.c (create_subpipe): Save local variables in case
3454 vfork clobbers them.
3455
34562005-05-24 Bruno Haible <bruno@clisp.org>
3457
3458 * tests/synclines.at (AT_SYNCLINES_COMPILE): Add support for the
3459 error message syntax used by gcc-4.0.
3460
b94a9e1e
PE
34612005-05-23 Paul Eggert <eggert@cs.ucla.edu>
3462
85ac3861
PE
3463 * README: Mention m4 1.4.3. Remove obsolete advice about
3464 Sun Forte Developer 6 update 2, VMS, and MS-DOS.
3465
b94a9e1e
PE
3466 * bootstrap: Remove workaround for problem I encountered with
3467 gettext 0.14.1; it seems to be fixed now.
3468
51c30d21
PE
34692005-05-22 Paul Eggert <eggert@cs.ucla.edu>
3470
009ce67d
PE
3471 * NEWS: Version 2.0a.
3472
f2a97c62
PE
3473 * src/files.c: Include "stdio-safer.h"; this fixes a typo in
3474 the previous change.
3475
c8775f93
PE
3476 Various maintainer cleanups.
3477 * .cvsignore: Add a.exe, a.out, b.out,, conf[0-9]*, confdefs*,
3478 conftest*, for benefit of CVS commands run at the same time as
3479 "configure". Add build-aux, since "bootstrap" now creates it and
3480 its subfiles.
3481 * Makefile.cfg (move_if_change): Remove.
3482 * Makefile.maint: Remove the update stuff; we now use "bootstrap".
3483 (ftp-gnu, www-gnu, move_if_change, local_updates, update):
3484 (po_repo, do-po-update, po-update, wget_files, get-targets):
3485 (config.guess-url_prefix, config.sub-url_prefix):
3486 (ansi2knr.c-url_prefix, texinfo.tex-url_prefix):
3487 (standards.texi-url_prefix, make-stds.texi-url_prefix, taget, url):
3488 ($(get-targets), cvs-files, automake_repo, wget-update, cvs-update):
3489 Remove.
3490 * configure.ac (AC_CONFIG_AUX_DIR): Change from config to build-aux;
3491 this is now the recommended name.
3492 * config/.cvsignore: Remove config.guess, config.rpath, config.sub,
3493 depcomp, install-sh, mdate-sh, missing, mkinstalldirs, texinfo.tex,
3494 ylwrap. These files now go into build-aux.
3495 * config/move-if-change: Remove.
3496 * config/prev-version.txt: Bump from 1.75 to 2.0.
3497
3ea5f0ec
PE
3498 * bootstrap: Add stdio-safer, unistd-safer modules.
3499 Remove m4/glibc2.m4 (introduced by latest gnulib, but
3500 we don't need it).
3501 * lib/.cvsignore: Add dup-safer.c, fd-safer.c,
3502 fopen-safer.c, stdio-safer.h, unistd-safer.h.
3503 * lib/subpipe.c: Include "unistd-safer.h".
3504 (create_subpipe): Make sure all the newly-created
3505 file descriptors are > 2, so that diagnostics don't
3506 get sent down them (which might cause Bison to hang, in theory).
3507 * m4/.cvsignore: Add stdio-safer.m4, unistd-safer.m4.
3508 * src/files.c (xfopen): Use fopen_safer, not fopen.
3509
51c30d21
PE
3510 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Port
3511 yesterday's yacc.c fix.
3512
cea1469d
PE
35132005-05-21 Paul Eggert <eggert@cs.ucla.edu>
3514
3ea5f0ec
PE
3515 * data/glr.c, data/lalr1.cc: Update copyright date.
3516
cea1469d
PE
3517 Fix a destructor bug reported by Wolfgang Spraul in
3518 <http://lists.gnu.org/archive/html/bug-bison/2005-05/msg00042.html>.
3519 * data/yacc.c (yyabortlab): Don't call destructor, and
3520 don't set yychar to EMPTY.
3521 (yyoverflowlab): Don't call destructor.
3522 (yyreturn): Call destructor, if yychar is neither YYEOF nor YYEMPTY.
3523 * tests/calc.at (AT_CHECK_CALC): Expect one fewer output lines,
3524 since we no longer output the message "discarding lookahead token
3525 end of input ()".
3526
5e6f62f2
PH
35272005-05-20 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
3528
3529 * data/glr.c (YY_SYMBOL_PRINT): Don't print newline at end to
3530 fix a small glitch in debugging output.
3531 (yyprocessOneStack, yyrecoverSyntaxError, yyparse): Print newline
3532 after YY_SYMBOL_PRINT where needed.
3533
3534 (struct yyGLRState): Add some comments.
3535 (struct yySemanticOption): Add some comments.
3536 (union yyGLRStackItem): Add comment.
3537
3538 (yymergeOptionSets): Correct this to properly perform the union,
3539 avoiding infinite reported by Michael Rosien.
3540 Update comment.
3541
3542 * tests/glr-regression.at: Add test for GLR merging error reported
3543 by M. Rosien.
cea1469d 3544
0fb669f9
PE
35452005-05-13 Paul Eggert <eggert@cs.ucla.edu>
3546
3547 * COPYING, ChangeLog, GNUmakefile, HACKING, Makefile.am,
3548 Makefile.cfg, Makefile.maint, NEWS, README, README-alpha,
3549 README-cvs, TODO, bootstrap, configure.ac, data/Makefile.am,
3550 data/README, data/c.m4, data/glr.c, data/lalr1.cc, data/yacc.c,
3551 data/m4sugar/m4sugar.m4, doc/Makefile.am, doc/bison.texinfo,
3552 doc/fdl.texi, doc/gpl.texi, doc/refcard.tex, lib/Makefile.am,
3553 lib/abitset.c, lib/abitset.h, lib/bbitset.h, lib/bitset.c,
3554 lib/bitset.h, lib/bitset_stats.c, lib/bitset_stats.h,
3555 lib/bitsetv-print.c, lib/bitsetv-print.h, lib/bitsetv.c,
3556 lib/bitsetv.h, lib/ebitset.c, lib/ebitset.h, lib/get-errno.c,
3557 lib/get-errno.h, lib/lbitset.c, lib/lbitset.h, lib/libiberty.h,
3558 lib/main.c, lib/subpipe.c, lib/subpipe.h, lib/timevar.c,
3559 lib/timevar.def, lib/timevar.h, lib/vbitset.c, lib/vbitset.h,
3560 lib/yyerror.c, m4/cxx.m4, m4/m4.m4, m4/subpipe.m4, m4/timevar.m4,
3561 m4/warning.m4, src/LR0.c, src/LR0.h, src/Makefile.am, src/assoc.c,
3562 src/assoc.h, src/closure.c, src/closure.h, src/complain.c,
3563 src/complain.h, src/conflicts.c, src/conflicts.h, src/derives.c,
3564 src/derives.h, src/files.c, src/files.h, src/getargs.c,
3565 src/getargs.h, src/gram.c, src/gram.h, src/lalr.c, src/lalr.h,
3566 src/location.c, src/location.h, src/main.c, src/muscle_tab.c,
3567 src/muscle_tab.h, src/nullable.c, src/nullable.h, src/output.c,
3568 src/output.h, src/parse-gram.c, src/parse-gram.h,
3569 src/parse-gram.y, src/print.c, src/print.h, src/print_graph.c,
3570 src/print_graph.h, src/reader.c, src/reader.h, src/reduce.c,
3571 src/reduce.h, src/relation.c, src/relation.h, src/scan-gram.l,
3572 src/scan-skel.l, src/state.c, src/state.h, src/symlist.c,
3573 src/symlist.h, src/symtab.c, src/symtab.h, src/system.h,
3574 src/tables.c, src/tables.h, src/uniqstr.c, src/uniqstr.h,
3575 src/vcg.c, src/vcg.h, src/vcg_defaults.h, tests/Makefile.am,
3576 tests/actions.at, tests/c++.at, tests/calc.at, tests/conflicts.at,
3577 tests/cxx-type.at, tests/existing.at, tests/glr-regression.at,
3578 tests/headers.at, tests/input.at, tests/local.at, tests/output.at,
3579 tests/reduce.at, tests/regression.at, tests/sets.at,
3580 tests/synclines.at, tests/testsuite.at, tests/torture.at:
3581 Update FSF postal mail address.
3582
51f4735e
PE
35832005-05-11 Paul Eggert <eggert@cs.ucla.edu>
3584
3585 * tests/local.at (AT_COMPILE_CXX): Treat LDFLAGS like AT_COMPILE does.
3586 Problem reported by Ralf Menzel.
3587
80ce3401
PE
35882005-05-01 Paul Eggert <eggert@cs.ucla.edu>
3589
3590 * tests/actions.at: Test that stack overflow invokes destructors.
3591 From Marcus Holland-Moritz.
3592 * data/yacc.c (yyerrlab): Move the code that destroys the stack
3593 from here....
3594 (yyreturn): to here. That way, destructors are called properly
3595 even if the stack overflows, or the user calls YYACCEPT or
3596 YYABORT. Stack-overflow problem reported by Marcus Holland-Moritz.
3597 (yyoverflowlab): Destroy the lookahead.
3598
35992005-04-24 Paul Eggert <eggert@cs.ucla.edu>
3600
3601 * data/yacc.c (YYSTACK_ALLOC_MAXIMUM): Add more-descriptive comment.
3602
72f000b0
PE
36032005-04-17 Paul Eggert <eggert@cs.ucla.edu>
3604
3605 * NEWS: Bison-generated C parsers no longer quote literal strings
3606 associated with tokens.
3607 * src/output.c (prepare_symbols): Don't escape strings,
3608 since users don't want to see C escapes.
3609 * tests/calc.at (AT_CHECK_CALC): Adjust to lack of quotes
3610 in diagnostics.
c19683bb 3611 * tests/input.at (Torturing the Scanner): Likewise.
72f000b0
PE
3612 * tests/regression.at (Token definitions, Web2c Actions): Likewise.
3613
1094323f
PE
36142005-04-16 Paul Eggert <eggert@cs.ucla.edu>
3615
3616 * tests/torture.at (AT_INCREASE_DATA_SIZE): Skip the test if
3617 the data size is known to be too small and we can't increase it.
3618 This works around an HP-UX 11.00 glitch reported by Andrew Benham.
3619
ca407bdf
PE
36202005-04-15 Paul Eggert <eggert@cs.ucla.edu>
3621
3622 * src/parse-gram.y: Include quotearg.h.
3623 (string_as_id): Quote $1 before using it as a key, since the
3624 lexer no longer quotes it for us.
3625 (string_content): Don't strip quotes, since lexer no longer
3626 quotes it for us.
3627 * src/scan-gram.l: Include quotearg.h.
3628 ("\""): Omit quote.
3629 ("'"<SC_ESCAPED_CHARACTER>): Quote symbol before using it as
3630 a key, since the rest of the lexer doesn't quote it.
3631 * src/symtab.c (symbol_get): Don't quote symbol; caller does it now.
3632 * tests/regression.at (Token definitions): Check for backslashes
3633 in token strings.
3634
3635 * data/yacc.c (YYSTACK_ALLOC_MAXIMUM): New macro.
3636 (YYSIZE_T): Define to unsigned long int when using an older compiler.
3637 (yyparse): Revamp code to generate long syntax error message, to
3638 make it easier to translate, and to avoid problems with arithmetic
3639 overflow. Change "virtual memory" to "memory" in diagnostic, since
3640 we don't know whether the memory is virtual.
3641
1ce59070
PE
36422005-04-13 Paul Eggert <eggert@cs.ucla.edu>
3643
3644 * NEWS: Bison-generated C parsers now use the _ macro to
3645 translate strings.
3646 * data/yacc.c (_) [!defined _]: New macro.
3647 All English strings wrapped inside this macro.
3648 * doc/bison.texinfo (Bison Parser): Document _.
3649 * po/POTFILES.in: Include src/parse-gram.c, since it now
3650 includes translateable strings that parse-gram.y doesn't.
3651
a749a695
PE
36522005-04-12 Paul Eggert <eggert@cs.ucla.edu>
3653
3654 * src/symtab.c (symbol_make_alias): Call symbol_type_set,
3655 reverting the 2004-10-11 change to this function.
3656 (symbol_check_alias_consistency): Don't call symbol_type_set
3657 if the type name is already correct.
3658 * tests/input.at (Typed symbol aliases): New test, from Tim Van Holder.
3659
8fb1053b
PE
36602005-03-25 Paul Eggert <eggert@cs.ucla.edu>
3661
3662 * tests/regression.at (Token definitions): Don't use a token named
3663 c, as that generates a "#define c ..." that runs afoul of buggy
3664 stdlib.h that uses the identifier c as a member of struct
3665 drand48_data. Problem reported by Horst Wente.
3666
ff498c4a
PE
36672005-03-21 Paul Eggert <eggert@cs.ucla.edu>
3668
3669 * bootstrap: Change translation URL from
3670 http://www2.iro.umontreal.ca/~gnutra/po/maint/bison/ to
3671 http://www.iro.umontreal.ca/translation/maint/bison/ to avoid
3672 redirection glitches. Problem reported by twlevo@xs4all.nl.
3673
65211d70
PE
36742005-03-20 Paul Eggert <eggert@cs.ucla.edu>
3675
3676 * tests/local.at (AT_COMPILE, AT_COMPILE_CXX): Don't put options
3677 after operands; POSIX says this isn't portable for the c99 command.
3678
9577fb1f
PE
36792005-03-18 Paul Eggert <eggert@cs.ucla.edu>
3680
3681 * tests/glr-regression.at (glr-regr2a.y): Try to dump core
3682 immediately if a data overrun has occurred; this may help us track
3683 down what may be a spurious failure on MacOS.
3684
78b178f7
PE
36852005-03-17 Paul Eggert <eggert@cs.ucla.edu>
3686
a2599d0f
PE
3687 Respond to problems reported by twlevo@xs4all.nl.
3688
3689 * bootstrap: Use "trap - 0" rather than the unportable "trap 0".
3690
78b178f7
PE
3691 * src/vcg.h: Comment fix.
3692 * src/vcg_defaults.h: Parenthesize macro bodies to make them safe.
3693 (G_CMAX): Change to -1 instead of INT_MAX.
3694
3695 * data/yacc.c (yyparse): Omit spaces before #line.
78b178f7 3696
7296e729
PE
36972005-03-15 Paul Eggert <eggert@cs.ucla.edu>
3698
3699 * src/tables.c (state_number_to_vector_number): Put it inside an
3700 "#if 0", since it's not currently used. Problem reported by
3701 Roland McGrath.
3702
05ac60f3
PE
37032005-03-06 Paul Eggert <eggert@cs.ucla.edu>
3704
3705 * src/output.c (escaped_output): Renamed from
3706 escaped_file_name_output, since we now use it for symbol tags as
3707 well. All uses changed.
3708 (symbol_destructors_output, symbol_printers_output):
3709 Escape symbol tags too.
3710 Problem reported by Matyas Forstner in
3711 <http://lists.gnu.org/archive/html/bug-bison/2005-03/msg00009.html>.
3712
3713 * src/muscle_tab.c (muscle_code_grow): Don't quote numbers; it's
3714 not needed.
3715 * src/output.c (user_actions_output, token_definitions_output,
3716 symbol_destructors_output, symbol_printers_output): Likewise.
3717 * src/reader.c (prologue_augment): Likewise.
3718 * src/scan-gram.l (handle_action_dollar, handle_action_at): Likewise.
3719
3720 * src/vcg.c (output_edge): Don't quote linestyle arg.
3721 Problem reported by twlevo@xs4all.nl.
3722
7eb453ac
PE
37232005-02-28 Paul Eggert <eggert@cs.ucla.edu>
3724
3725 * doc/bison.texinfo (Semantic Tokens): Fix scoping problem in
3726 example, reported by Derek M Jones. Also, make the example even
3727 more outrageous, to better illustrate how bad the problem is.
3728
4c04c52a
PE
37292005-02-24 Paul Eggert <eggert@cs.ucla.edu>
3730
3731 * doc/bison.texinfo (Mfcalc Symtab): Correct the prototype for
3732 putsym. Typo reported by Sebastian Piping.
3733
a61e1620
PE
37342005-02-23 Paul Eggert <eggert@cs.ucla.edu>
3735
3736 * doc/bison.texinfo (Language and Grammar): some -> same
3737 (Epilogue): int he -> in the
3738 Typos reported by Sebastian Piping via Justin Pence.
3739
9ec93868
PE
37402005-02-07 Paul Eggert <eggert@cs.ucla.edu>
3741
3742 * tests/glr-regression.at (Improper handling of embedded actions
3743 and dollar(-N) in GLR parsers): Renamed from "Improper handling of
3744 embedded actions and $-N in GLR parsers", work around an Autoconf bug
3745 with dollar signs in test names.
3746 * tests/input.at (Invalid dollar-n): Renamed from "Invalid \$n",
3747 for a similar reason.
3748
73ce7e7e
PE
37492005-01-28 Paul Eggert <eggert@cs.ucla.edu>
3750
3751 * src/vcg.c (output_graph): G_VIEW -> normal_view in case someone
3752 wants to redefine G_VIEW.
3753
2e72b98e
PE
37542005-01-27 Paul Eggert <eggert@cs.ucla.edu>
3755
3756 * src/vcg.c (get_view_str): Remove case for normal_view.
3757 Problem reported by twlevo@xs4all.nl.
3758
e0d634e5
PE
37592005-01-24 Paul Eggert <eggert@cs.ucla.edu>
3760
ccf830a4
PE
3761 * configure.ac (O0CFLAGS, O0CXXFLAGS): Fix quoting bug.
3762 Problem reported by twlevo@xs4all.nl.
3763
e0d634e5
PE
3764 * doc/bison.texinfo: Change @dircategory from "GNU programming
3765 tools" to "Software development". Requested by Richard Stallman
3766 via Karl Berry.
3767
7bbc8cb0
PE
37682005-01-23 Paul Eggert <eggert@cs.ucla.edu>
3769
3770 * tests/c++.at (AT_CHECK_DOXYGEN): Don't use options after operands.
3771 Problem reported by twlevo@xs4all.nl.
3772
08b770bc
PE
37732005-01-21 Paul Eggert <eggert@cs.ucla.edu>
3774
3775 * data/yacc.c (YYCOPY, yystpcpy, yyparse): Remove "register"
3776 keyword; it's not needed with modern compilers, and it doesn't
3777 affect correctness with older compilers. Suggested by
3778 twlevo@xs4all.nl.
3779
95f22ad2
PE
37802005-01-17 Paul Eggert <eggert@cs.ucla.edu>
3781
3782 * data/glr.c (yyuserAction): Add "default: break;" case to pacify
3783 gcc -Wswitch-default.
3784 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Likewise.
3785 * data/yacc.c (yyparse): Likewise.
3786
d229d15c
PE
37872005-01-12 Paul Eggert <eggert@cs.ucla.edu>
3788
3789 * src/system.h (OUTPUT_EXT, TAB_EXT): Define only if not defined
3790 already. Let config.h define any nonstandard values.
3791
ecadd90f
PE
37922005-01-10 Paul Eggert <eggert@cs.ucla.edu>
3793
3794 * tests/calc.at (_AT_DATA_CALC_Y): Use alarm (100), not alarm (10),
3795 for the benefit of slower hosts. Problem reported by
3796 Nelson H. F. Beebe.
3797
213744b5
PE
37982005-01-07 Paul Eggert <eggert@cs.ucla.edu>
3799
3800 * data/yacc.c (yyparse): Pacify non-GCC compilers about yyerrorlab
3801 being defined and not used.
3802 * data/lalr1.cc (yyparse): Likewise.
3803 Use "if (false)" rather than "if (0)".
3804
249d3236
PE
38052005-01-05 Paul Eggert <eggert@cs.ucla.edu>
3806
3807 * TODO: Mention that we should allow NUL bytes in tokens.
3808
987cc1fb
PE
38092005-01-02 Paul Eggert <eggert@cs.ucla.edu>
3810
3811 * src/scan-skel.l (<<EOF>>): Don't close standard output.
3812 Problem reported by Hans Aberg.
3813
08fe02d9
PE
38142005-01-01 Paul Eggert <eggert@cs.ucla.edu>
3815
3816 * src/getargs.c (version): Happy new year; update overall
3817 program copyright date from 2004 to 2005.
3818
3819 * src/scan-skel.l ("@output ".*\n): Don't close standard output.
3820 Problem reported by Hans Aberg.
3821 * tests/output.at (AT_CHECK_OUTPUT): New arg SHELLIO.
3822 (Output file names.): Add a test for the case when standard output
3823 is closed.
3824
010c0266
PE
38252004-12-26 Paul Eggert <eggert@cs.ucla.edu>
3826
3827 * doc/bison.texinfo (@copying): Update FDL version number to 1.2,
3828 to fix an oversight in the Bison 2.0 manual.
3829
da12206a
PE
38302004-12-25 Paul Eggert <eggert@cs.ucla.edu>
3831
3832 * NEWS: Version 2.0. Reformat the existing news items since
3833 1.875, so that related items are grouped together.
3a4734aa 3834 * configure.ac (AC_INIT): Bump version to 2.0.
da12206a
PE
3835 * src/parse-gram.c, src/parse-gram.h: Regenerate with 2.0.
3836
c935d934
PE
3837 * tests/torture.at (Exploding the Stack Size with Alloca): Set
3838 YYSTACK_USE_ALLOCA to 1 if __GNUC__ or alloca are defined;
3839 otherwise, we're not testing alloca. Unfortunately there's no
3840 simple way to consult HAVE_ALLOCA here.
3841
da12206a
PE
3842 * data/lalr1.cc (yydestruct_): Pacify unused variable warning
3843 for yymsg, too.
3844
3845 * src/LR0.c (new_itemsets): Use memset rather than zeroing by
3846 hand. This avoids a warning about comparing int to size_t when
3847 GCC warnings are enabled.
3848
0a2c5137
PE
38492004-12-22 Paul Eggert <eggert@cs.ucla.edu>
3850
d7e14fc0
PE
3851 * NEWS: Bison-generated parsers no longer default to using the
3852 alloca function (when available) to extend the parser stack, due
3853 to widespread problems in unchecked stack-overflow detection.
3854 * data/glr.c (YYMAXDEPTH): Remove undef when zero. It's the user's
3855 responsibility to set it to a positive value. This lets the user
3856 specify a value that is not a preprocessor constant.
3857 * data/yacc.c (YYMAXDEPTH): Likewise.
3858 (YYSTACK_ALLOC): Define only if YYSTACK_USE_ALLOCA is nonzero.
3859 * doc/bison.texinfo (Stack Overflow): YYMAXDEPTH no longer needs
3860 to be a compile-time constant. However, explain the constraints on it.
3861 Also, explain the constraints on YYINITDEPTH.
3862 (Table of Symbols): Explain that alloca is no longer the default.
3863 Explain the user's responsibility if they define YYSTACK_USE_ALLOCA
3864 to 1.
3865
0a2c5137
PE
3866 * doc/bison.texinfo (Location Default Action): Mention that n must
3867 be zero when k is zero. Suggested by Frank Heckenbach.
3868
e019c247
AD
38692004-12-22 Akim Demaille <akim@epita.fr>
3870
3871 * data/lalr1.cc (parser::token_number_type, parser::rhs_number_type)
3872 (parser::state_type, parser::semantic_type, parser::location_type):
3873 Private, not public.
3874 (parser::parse): Return ints, not bool.
3875 Returning a bool introduces a problem: 0 corresponds to false, and
3876 it seems weird to return false on success. Returning true changes
3877 the conventions for yyparse.
3878 Alternatively we could return void and send an exception.
3879 There is no clear consensus (yet?).
3880 (state_stack, semantic_stack, location_stack): Rename as...
3881 (state_stack_type, semantic_stack_type, location_stack_type): these.
3882 Private, not public.
3883 * tests/c++.at: New.
3884 * tests/testsuite.at, tests/Makefile.am: Adjust.
3885
72731bb7
AD
38862004-12-21 Akim Demaille <akim@epita.fr>
3887
3888 * data/lalr1.cc (parser::parse): Return a bool instead of an int.
3889
9a0d8bec
AD
38902004-12-21 Akim Demaille <akim@epita.fr>
3891
3892 Don't impose std::string for filenames.
3893
3894 * data/lalr1.cc (b4_filename_type): New.
3895 (position::filename): Use it.
3896 (parser.hh): Move the inclusion of stack.hh and location.hh below
3897 the user code, so that needed headers for the filename type can be
3898 included first.
72731bb7
AD
3899 Forward declare them before the user code.
3900 * tests/Makefile.am (check-local, installcheck-local): Pass
3901 TESTSUITEFLAGS to the TESTSUITE.
9a0d8bec 3902
99880de5
AD
39032004-12-20 Akim Demaille <akim@epita.fr>
3904
3905 Use more STL like names: my_class instead of MyClass.
3906
3907 * data/lalr1.cc (LocationStack, LocationType, RhsNumberType)
3908 (SemanticStack, SemanticType, StateStack, StateType)
3909 (TokenNumberType, Stack, Slice, Traits, Parser::location)
3910 (Parser::value): Rename as...
3911 (location_stack, location_type, rhs_number_type, semantic_stack)
3912 (semantic_type, state_stack, state_type, token_number_type, stack)
3913 (slice, traits, parser::yylloc, parser::yylval): these.
3914
3915 * tests/calc.at, tests/regression.at, tests/actions.at: Adjust.
3916
9bec482e
PE
39172004-12-19 Paul Eggert <eggert@cs.ucla.edu>
3918
3919 * data/glr.c (YYLLOC_DEFAULT): Use GNU spacing conventions.
3920 * data/yacc.c (YYLLOC_DEFAULT): Likewise.
3921
f6fbd3da
PE
39222004-12-17 Paul Eggert <eggert@cs.ucla.edu>
3923
3924 Remove uses of 'short int' and 'unsigned short int'. This raises
3925 some arbitrary limits. It uses more memory but nowadays that's
3926 not much of an issue.
3927
3928 This change does not affect the generated parsers; that's a different
3929 task, as some users will want to conserve memory there.
3930
3931 Ideally we should use size_t to represent all object counts, and
3932 something like ptrdiff_t to represent signed differences of object
3933 counts; but that will require more code-cleanup than I have the
3934 time to do right now.
3935
3936 * src/LR0.c (allocate_itemsets, new_itemsets, save_reductions):
3937 Use size_t, not int or short int, to count objects.
3938 * src/closure.c (nritemset, closure): Likewise.
3939 * src/closure.h (nritemset, closure): Likewise.
3940 * src/nullable.c (nullable_compute): Likewise.
3941 * src/print.c (print_core): Likewise.
3942 * src/print_graph.c (print_core): Likewise.
3943 * src/state.c (state_compare, state_hash): Likewise.
3944 * src/state.h (struct state): Likewise.
3945 * src/tables.c (default_goto, goto_actions): Likewise.
3946
3947 * src/gram.h (rule_number, rule): Use int, not short int.
3948 * src/output.c (prepare_rules): Likewise.
3949 * src/state.h (state_number, STATE_NUMBER_MAXIMUM, transitions,
3950 errs, reductions): Likewise.
3951 * src/symtab.h (symbol_number, SYMBOL_NUMBER_MAXIMUM, struct symbol):
3952 Likewise.
3953 * src/tables.c (vector_number, tally, action_number,
3954 ACTION_NUMBER_MINIMUM): Likewise.
3955 * src/output.c (muscle_insert_short_int_table): Remove.
3956
efeed023
AD
39572004-12-17 Akim Demaille <akim@epita.fr>
3958
3959 * data/lalr1.cc: Extensive Doxygenation.
3960 (error_): Rename as...
3961 (error): this, since it is visible to the user.
3962 Adjust callers.
3963 (Parser::message): Now an automatic variable from...
3964 (Parser::yyreport_syntax_error_): here.
3965 * tests/actions.at, tests/calc.at, tests/regression.at: Adjust to
3966 Parser::error.
3967 * tests/input.at: Escape $.
3968
bc82c5a5
PE
39692004-12-16 Paul Eggert <eggert@cs.ucla.edu>
3970
3971 * data/glr.c (b4_lhs_value, b4_rhs_value, b4_rhs-location):
3972 Parenthesize rhs to avoid obscure problems with mistakes like
3973 "foo$$bar = foo$1bar;". Problem reported by twlevo at xs4all.
3974 * data/lalr1.cc (b4_lhs_value, b4_rhs_value, b4_lhs_location,
3975 b4_rhs_location): Likewise.
3976 * data/yacc.c (b4_lhs_value, b4_rhs_value, b4_lhs_location,
3977 b4_rhs_location): Likewise.
3978
fd19f271
AD
39792004-12-16 Akim Demaille <akim@epita.fr>
3980
3981 * data/lalr1.cc (yyreport_syntax_error_): Catch up with glr.c and
3982 yacc.c: be sure to stay within yycheck_.
3983 * tests/actions.at: Re-enable C++ tests.
3984
10454ea4
AD
39852004-12-16 Akim Demaille <akim@epita.fr>
3986
3987 * src/print_graph.c (print_graph): Remove layoutalgorithm uses for
3988 real.
3989
c5b95ccf
AD
39902004-12-16 Akim Demaille <akim@epita.fr>
3991
3992 Use #define to handle the %name-prefix.
3993
3994 * data/glr.c, data/yacc.c: Comment changes.
3995 * data/lalr1.cc (yylex): Use #define to select the name of yylex,
3996 so that one can refer to yylex in the parser file, and have it
3997 renamed, as is the case with other skeletons.
3998
617a8f12
AD
39992004-12-16 Akim Demaille <akim@epita.fr>
4000
4001 Move lalr1.cc internals into yy*.
4002
4003 * data/lalr1.cc (semantic_stack_, location_stack_, state_stack_)
4004 (semantic_stack_, location_stack_, pact_, pact_ninf_, defact_)
4005 (pgoto_, defgoto_, table_, table_ninf_, check_, stos_, r1_, r2_)
4006 (name_, rhs_, prhs_, rline_, token_number_, eof_, last_, nnts_)
4007 (empty_, final_, terror_, errcode_, ntokens_)
4008 (user_token_number_max_, undef_token_, n_, len_, state_, nerrs_)
4009 (looka_, ilooka_, error_range_, nerrs_):
4010 Rename as...
4011 (yysemantic_stack_, yylocation_stack_, yystate_stack_)
4012 (yysemantic_stack_, yylocation_stack_, yypact_, yypact_ninf_)
4013 (yydefact_, yypgoto_, yydefgoto_, yytable_, yytable_ninf_)
4014 (yycheck_, yystos_, yyr1_, yyr2_, yyname_, yyrhs_, yyprhs_)
4015 (yyrline_, yytoken_number_, yyeof_, yylast_, yynnts_, yyempty_)
4016 (yyfinal_, yyterror_, yyerrcode_, yyntokens_)
4017 (yyuser_token_number_max_, yyundef_token_, yyn_, yylen_, yystate_)
4018 (yynerrs_, yylooka_, yyilooka_, yyerror_range_, yynerrs_):
4019 these.
4020
1e547e6e
PE
40212004-12-15 Paul Eggert <eggert@cs.ucla.edu>
4022
4023 Fix some problems reported by twlevo at xs4all.
4024 * src/symtab.c (symbol_new): Report an error if the input grammar
4025 contains too many symbols. This is better than calling abort() later.
4026 * src/vcg.h (enum layoutalgorithm): Remove. All uses removed.
4027 (struct node, struct graph):
4028 Rename member expand to stretch. All uses changed.
4029 (struct graph): Remove member layoutalgorithm. All uses removed.
4030 * src/vcg.c (get_layoutalgorithm_str): Remove. All uses removed.
4031 * src/vcg_defaults.h (G_STRETCH): Renamed from G_EXPAND.
4032 All uses changed.
4033 (N_STRETCH): Rename from N_EXPAND. All uses changed.
4034
735d6bd4
AD
40352004-12-15 Akim Demaille <akim@epita.fr>
4036
4037 * data/lalr1.cc: Normalize /** \brief ... */ to ///.
4038 Add more Doxygen comments.
4039 (symprint_, stack_print_, reduce_print_, destruct_, pop)
4040 (report_syntax_error_, translate_): Rename as...
4041 (yysymprint_, yystack_print_, yyreduce_print_, yydestruct_)
4042 (yypop_, yyreport_syntax_error_, yytranslate_): this.
4043
2e1f5829
AD
40442004-12-15 Akim Demaille <akim@epita.fr>
4045
4046 * data/lalr1.cc (lex_): Rename as...
4047 (yylex_): this.
4048 Move the trace here.
4049 Take the %name-prefix into account.
4050 Reported by Alexandre Duret-Lutz.
4051
a3cb6248
AD
40522004-12-15 Akim Demaille <akim@epita.fr>
4053
4054 Simplify the C++ parser constructor.
4055
4056 * data/lalr1.cc (debug_): Rename as...
4057 (yydebug_): so that the parser's internals are always in the yy*
4058 pseudo namespace.
4059 Adjust uses.
4060 (b4_parse_param_decl): Remove the leading comma as it is now only
4061 called as unique argument list.
4062 (Parser::Parser): Remove the constructor accepting a location and
4063 an initial debugging level.
4064 Remove from the other ctor the argument for the debugging level.
4065 (debug_level_type, debug_level, set_debug_level): New.
4066
4067 * tests/actions.at, tests/calc.at, tests/regression.at: Adjust
4068 constructor calls.
4069
07fed891
AD
40702004-12-15 Akim Demaille <akim@epita.fr>
4071
4072 Remove b4_root related material: failure experiment
a3cb6248 4073 (which goal was to allow to derive from a class).
07fed891
AD
4074
4075 * data/lalr1.cc (b4_root, b4_param, b4_constructor): Remove
4076 definitions and uses.
4077
e603eaa5
PE
40782004-12-14 Paul Eggert <eggert@cs.ucla.edu>
4079
4080 * data/glr.c (struct yyGLRStack): yyerror_range now has 3 items,
4081 not 2, since it's not portable to subtract 1 from the start of an
4082 array. The new item 0 is never set or used. All uses changed.
4083
4084 (yyrecoverSyntaxError): Use YYLLOC_DEFAULT instead of assuming
4085 the default definition of YYLLOC_DEFAULT. Problem reported
4086 by Frank Heckenbach.
4087
fafb007d
PE
40882004-12-12 Paul Eggert <eggert@cs.ucla.edu>
4089
4090 * data/glr.c (YYRHSLOC): Don't have two definitions, one for
4091 the normal case and one for the error case. Just use the
4092 first one uniformly. Problem reported by Frank Heckenbach.
4093 (YYLLOC_DEFAULT): Use the conventions of yacc.c, so we can
4094 use exactly the same macro in both places.
4095 (yyerror_range): Now of type yyGLRStackItem, not YYLTYPE,
4096 so that the normal-case YYRHSLOC works for the error case too.
4097 All uses changed.
4098 * data/yacc.c (YYRHSLOC): New macro, taken from glr.c.
4099 (YYLLOC_DEFAULT): Use the same macro as glr.c.
4100 * doc/bison.texinfo (Location Default Action): Don't claim that
4101 we have an array of locations. Use the same macro for both glr
4102 and lalr parsers. Mention YYRHSLOC. Mention what happens when
4103 the index is 0.
4104
48814dcd
PE
41052004-12-10 Paul Eggert <eggert@cs.ucla.edu>
4106
a4e1a53b
PE
4107 * HACKING: Update email addresses to send announcements to.
4108
48814dcd
PE
4109 * configure.ac (AC_INIT): Bump version to 1.875f.
4110
337116ba
PE
41112004-12-10 Paul Eggert <eggert@cs.ucla.edu>
4112
4113 * NEWS: Version 1.875e.
4114 * src/parse-gram.c, src/parse-gram.h: Regenerate with 1.875e.
4115
4116 * src/scan-skel.l: Include "complain.h", for "fatal".
4117
4118 * src/relation.h (relation_print, relation_digraph):
4119 Relation sizes are of type relation_node, not size_t (this is
4120 merely a doc fix, since the two types are equivalent).
4121 (relation_transpose): Relation sizes are of type relation_node,
4122 not int.
4123 * src/relation.c: Likewise.
4124 (top, infinity): Now of type relation_node, not int.
4125 (traverse, relation_transpose): Use relation_node, not int.
4126
4127 * data/glr.c (yyuserAction, yyrecoverSyntaxError): Mark args
4128 with ATTRIBUTE_UNUSED if they're not used, to avoid GCC warning.
4129 (yyparse): Remove unused local introduced in 2004-10-25 patch.
4130
4131 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): New arg
68b082af 4132 specifying whether the test should be skipped. Use it tp
337116ba 4133 specify that the [%defines %skeleton "lalr1.cc"] tests currently
68b082af 4134 fail on some hosts, and should be skipped.
337116ba 4135
da2a7671
PE
41362004-12-08 Paul Eggert <eggert@cs.ucla.edu>
4137
4138 * src/system.h (CALLOC, MALLOC, REALLOC): Remove. All callers
4139 changed to use xcalloc, xnmalloc, xnrealloc, respectively,
4140 unless otherwise specified below.
4141
4142 * src/LR0.c (allocate_itemsets): Use xnmalloc, not xcalloc,
4143 to allocate kernel_base, kernel_items, kernel_size, since
4144 they needn't be initialized to 0.
4145 (allocate_storgae): Likewise, for shiftset, redset, shift_symbol.
4146 * src/closure.c (new_closure): Likewise, for itemset.
4147 * src/derives.c (derives_compute): Likewise, for delts, derives, q.
4148 * src/lalr.c (set_goto_map): Likewise, for temp_map.
4149 (initialize_F): Likewise, for reads, edge, reads[i], includes[i].
4150 (build_relations): Likewise for edge, states1, includes.
4151 * src/nullable.c (nullable_compute): Likewise, for squeue, relts.
4152 * src/reader.c (packgram): Likewise, for ritem, rules.
4153 * src/reduce.c (nonterminals_reduce): Likewise for nontermmap.
4154 * src/relation.c (relation_digraph): Likewise for VERTICES.
4155 (relation_transpose): Likewise for new_R, end_R.
4156 * src/symtab.c (symbols_token_translations_init): Likewise for
4157 token_translations.
4158 * src/tables.c (save_row): Likewise for froms, tos, conflict_tos.
4159 (token_actions): Likewise for yydefact, actrow, conflrow,
4160 conflict_list.
4161 (save_column): Likewise for froms[symno], tos[symno].
4162 (goto_actions): Likewise for state_count.
4163 (pack_table): Likewise for base, pos, check.
4164 (tables_generate): Likewise for width.
4165
4166 * src/LR0.c (set_states): Don't reuse kernel_size and kernel_base
4167 for initial core. Just have a separate core, so we needn't worry
4168 about whether kernel_size and kernel_base are initialized.
4169
4170 * src/LR0.c (shift_symbol, redset, shiftset, kernel_base,
4171 kernel_size, kernel_items): Remove unnecessary initialization.
4172 * src/conflicts.c (conflicts): Likewise.
4173 * src/derives.c (derives): Likewise.
4174 * src/muscle_tablc (muscle_insert): Likewise.
4175 * src/relation.c (relation_digraph): Likewise.
4176 * src/tables.c (froms, tos, conflict_tos, tally, width, actrow, order,
4177 conflrow, conflict_table, conflict_list, table, check):
4178 Likewise.
4179
4180 * src/closure.c (new_closure): Arg is of type unsigned int, not int.
4181 This is because all callers pass unsigned int.
4182 * src/closure.h (new_closure): Likewise.
4183
4184 * src/lalr.c (initialize_F): Initialize reads[i] in all cases.
4185 (build_relations): Initialize includes[i] in all cases.
4186 * src/reader.c (packgram): Always initialize rules[ruleno].prec
4187 and rules[ruleno].precsym. Initialize members in order.
4188 * src/relation.c (relation_transpose): Always initialize new_R[i]
4189 and end_R[i].
4190 * src/table.c (conflict_row): Initialize 0 at end of conflict_list.
4191
4192 * src/output.c (prepare_actions): Pass 0 instead of conflict_list[0];
4193 conflict_list[0] was always 0, but now it isn't initialized.
4194
4195 * src/table.c (table_grow): When conflict_table grew, the grown
4196 area wasn't cleared. Fix this.
4197
4198 * lib/.cvsignore: Add strdup.c, strdup.h.
4199 * m4/.cvsignore: Add strdup.m4.
4200
00baeeac
PE
42012004-12-07 Paul Eggert <eggert@cs.ucla.edu>
4202
4203 * src/lalr.h (GOTO_NUMBER_MAXIMUM): New macro.
4204 * src/lalr.c (set_goto_map): Don't allow ngotos to equal
4205 GOTO_NUMBER_MAXIMUM, since we occasionally compute
4206 ngotos + 1 without checking for overflow.
4207 (build_relations): Use END_NODE, not -1, to denote end of edges.
4208 * src/lalr.c (set_goto_map, map_goto, initialize_F, add_loopback_edge,
4209 build_relations): Use goto_number, not int, for goto numbers.
4210 * src/tables.c (save_column, default_goto): Likewise.
4211
be3d9d42
AD
42122004-11-23 Akim Demaille <akim@epita.fr>
4213
4214 * data/lalr1.cc (YYSTYPE): Define it as is done for C, instead
4215 of #defining from yystype.
4216 Don't typedef yystype, C++ does not need it.
4217 This lets it possible to forward declare it as union.
4218
78e526d5
PE
42192004-11-23 Paul Eggert <eggert@cs.ucla.edu>
4220
4221 * bootstrap (gnulib_modules): Add extensions.
4222 Problem reported by Jim Meyering.
4223
afbb696d
PE
42242004-11-22 Paul Eggert <eggert@cs.ucla.edu>
4225
4226 * src/LR0.c, src/closure.c, src/derives.c, src/gram.c,
4227 src/lalr.c, src/nullable.c, src/relation.c, src/scan-skel.l,
4228 src/system.h, src/tables.c: XFREE -> free, to accommodate
4229 recent change to gnulib xalloc.h.
78e526d5 4230 Problem reported by Jim Meyering.
afbb696d 4231
c1f8f16a
AD
42322004-11-17 Akim Demaille <akim@epita.fr>
4233
4234 * data/lalr1.cc (symprint_): Use cdebug_ to avoid warnings.
4235
db7e5eb5 42362004-11-17 Akim Demaille <akim@epita.fr>,
9a1e9989
AD
4237 Alexandre Duret-Lutz <adl@gnu.org>
4238
4239 * data/lalr1.cc (Parser::yycdebug_): New, a pointer, to allow
4240 changes.
4241 (YYCDEBUG): Adjust.
4242 Use it instead of cdebug_.
4243 (Parser::debug_stream, Parser::set_debug_stream): New.
4244 (Parser::symprint_): Define cdebug_ for temporary backward
4245 compatibility.
4246 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Use
4247 debug_stream ().
4248
68e11668
AD
42492004-11-17 Akim Demaille <akim@epita.fr>
4250
4251 * data/lalr1.cc (Parser:print_): Remove, use %printer instead.
4252 * tests/regression.at (_AT_DATA_DANCER_Y): Adjust.
4253 * tests/calc.at (_AT_DATA_CALC_Y): Ditto.
4254 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise.
4255
97cbc73e
PE
42562004-10-27 Paul Eggert <eggert@cs.ucla.edu>
4257
4258 * data/glr.c (yyloc_default): Remove; not used.
4259 Problem reported by Frank Heckenbach.
4260
e342c3be
AD
42612004-10-25 Akim Demaille <akim@epita.fr>
4262
4263 * data/glr.c (YYRHSLOC): Move its definition next to its uses.
4264 Introduce another definition to address simple location arrays.
4265 (yyGLRStack): New member: yyerror_range.
4266 (yyrecoverSyntaxError, yyparse): Update it.
4267 (yyrecoverSyntaxError): Use it when shifting the error token to
4268 have an accurate range, equivalent to the one computed by both
4269 yacc.c and lalr1.cc.
4270 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Change its yylex so
4271 that column numbers start at column 0, as per GNU Coding
4272 Standards, the others tests, and the doc.
4273 (_AT_RESOLVED_GLR_OUTPUT_WITH_LOC, _AT_AMBIG_GLR_OUTPUT_WITH_LOC):
4274 Adjust to the above change (first column is 0).
4275 And adjust the location of the "<error>", now covering the whole
4276 line.
4277
93602feb 42782004-10-22 Akim Demaille <akim@epita.fr>
04098407 4279 and Paul Eggert <eggert@cs.ucla.edu>
93602feb
PE
4280
4281 Remove some arbitrary limits on goto numbers and relations.
4282 * src/lalr.c (goto_map, ngotos, from_state, to_state): Omit
4283 initial values, since they're never used.
4284 (set_goto_map): ngotos is now unsigned, so test for overflow
4285 by seeing whether it wraps around to zero.
4286 * src/lalr.h (goto_number): Now size_t, not short int.
4287 (GOTO_NUMBER_MAXIMUM): Remove.
4288 * src/relation.c (relation_print, traverse, relation_transpose):
4289 Check for END_NODE rather than looking at sign.
4290 * src/relation.h (END_NODE): New macro.
4291 (relation_node): Now size_t, not short int.
4292
dba08b04
PE
42932004-10-22 Paul Eggert <eggert@cs.ucla.edu>
4294
4295 * doc/bison.texinfo (Language and Grammar): In example, "int" is a
4296 keyword, not an identifier. Problem reported by Baron Schwartz in
4297 <http://lists.gnu.org/archive/html/bug-bison/2004-10/msg00017.html>.
4298
df09ef2e
AD
42992004-10-11 Akim Demaille <akim@epita.fr>
4300
4301 * src/symtab.c (symbol_check_alias_consistency): Also check
4302 type names, destructors, and printers.
4303 Reported by Alexandre Duret-Lutz.
4304 Recode the handling of associativity and precedence in terms
4305 of symbol_precedence_set.
4306 Accept no redeclaration at all, not even equal to the previous
4307 value.
4308 (redeclaration): New.
4309 Use it to factor redeclaration complaints.
4310 (symbol_make_alias): Don't set the type of the alias, let
4311 symbol_check_alias_consistency do it as for other features.
4312 * src/symtab.h (symbol): Add new member prec_location, and
4313 type_location.
4314 * src/symtab.c (symbol_precedence_set, symbol_type_set): Set them.
4315 * tests/input.at (Incompatible Aliases): New.
4316
146bc99d
PE
43172004-10-09 Paul Eggert <eggert@cs.ucla.edu>
4318
4319 .cvsignore fixes to accommodate gnulib changes,
4320 and the practice of naming build directories "_build".
4321 * .cvsignore: Add "_*". Sort.
4322 * lib/.cvsignore: Add getopt_.h, xalloc-die.c.
4323 * m4/.cvsignore: Add "*_gl.m4".
4324
e503aa60
AD
43252004-10-06 Akim Demaille <akim@epita.fr>
4326
4327 * src/parse-gram.y (add_param): Fix the truncation of trailing
4328 spaces.
4329
b4a20338
AD
43302004-10-05 Akim Demaille <akim@epita.fr>
4331
4332 In Bison 1.875's yacc.c, YYLLOC_DEFAULT was called regardless
4333 whether the reducion was empty or not. This leaves room to
4334 improve the use of YYLLOC_DEFAULT in such a case.
4335 lalr1.cc is still experimental, so changing this is acceptable.
4336 And finally, there are probably not many users who changed the
4337 handling of locations in GLR, so changing is admissible too.
4338
4339 * data/glr.c, data/lalr1.cc, data/yacc.c (YYLLOC_DEFAULT): On an
4340 empty reduction, set @$ to an empty location ending the previously
4341 stacked symbol.
4342 Adjust uses to make sure the code is triggered on empty
4343 reductions.
4344 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust the
4345 expected output: empty reductions have empty locations.
4346
f85a5e6f
AD
43472004-09-29 Akim Demaille <akim@epita.fr>
4348
4349 * data/lalr1.cc: Move towards a more standard C++ coding style
4350 for templates: Class < T > -> Class<T>.
4351
b203fc2c
AD
43522004-09-29 Akim Demaille <akim@epita.fr>
4353
4354 * data/lalr1.cc: Reinstall the former ctor, for sake of
4355 compatibility, but warn it will be removed.
4356 Move towards a more standard C++ coding style (i.e., type *var ->
4357 type* var).
4358
5b7e1e73
PE
43592004-09-27 Paul Eggert <eggert@cs.ucla.edu>
4360
3fee967f
PE
4361 * src/parse-gram.y (add_param): Rewrite to avoid strchr,
4362 since it's less likely to work if NULs are involved in the future.
5b7e1e73 4363
0dcca5c2
AD
43642004-09-27 Akim Demaille <akim@epita.fr>
4365
4366 * data/yacc.c (YY_LOCATION_PRINT): Fix its default declaration.
4367
6dde1c82
AD
43682004-09-27 Akim Demaille <akim@epita.fr>
4369
4370 * data/lalr1.cc (b4_parse_param_decl_1): New.
b203fc2c 4371 (b4_parse_param_decl): Use it to have different names between attribute
6dde1c82
AD
4372 and argument names.
4373 (b4_cc_constructor_call): Likewise.
4374
b233d555
AD
43752004-09-24 Akim Demaille <akim@epita.fr>
4376
4377 * src/parse-gram.y (add_param): Strip the leading and trailing
4378 blanks from a formal argument declaration.
4379 (YY_LOCATION_PRINT): New.
4380
619404e3
AD
43812004-09-24 Akim Demaille <akim@epita.fr>
4382
4383 * data/c.m4 (b4_yysymprint_generate): Move the YYINPUT invocation
4384 after the location.
4385
dd8d9022
AD
43862004-09-24 Akim Demaille <akim@epita.fr>
4387
4388 * doc/bison.texinfo (Table of Symbols): Sort.
4389
0092f063
AD
43902004-09-21 Akim Demaille <akim@epita.fr>
4391
4392 * data/yacc.c, data/glr.c (b4_at_dollar, b4_dollar_dollar): Remove
4393 the useless parentheses.
4394 Suggested by Paul Eggert.
4395
451364ed
AD
43962004-09-20 Akim Demaille <akim@epita.fr>
4397
4398 Let the initial-action act on the look-ahead, and use it for the
4399 "initial push" (corresponding to an hypothetical beginning-of-file).
4400 And let lalr1.cc honor %initial-action.
4401
4402 * doc/bison.texinfo (Initial Action Decl): Clarify, and add an
4403 example.
4404 * data/lalr1.cc (Parser::initlocation_): Remove, bad experiment.
4405 (Parser::Parser): Remove the ctor that used to initialize it.
4406 (Parser::parse): Like in the other skeletons, issue the "starting
4407 parse" message before any action.
4408 Honor %initial-action.
4409 Initialize the stacks with the lookahead.
4410 * data/yacc.c: Let $$ and @$ in %initial-action designate the
4411 look-ahead.
4412 Push them in the stacks.
4413 * tests/actions.at, tests/calc.at: Adjust the C++ ctor invocations.
4414
18d192f0
AD
44152004-09-20 Akim Demaille <akim@epita.fr>
4416
4417 * doc/bison.texinfo (Initial Action Decl): New.
4418
b8458aa5
AD
44192004-09-20 Akim Demaille <akim@epita.fr>
4420
4421 * data/yacc.c (YY_LOCATION_PRINT): Use YYLTYPE_IS_TRIVIAL as a
4422 clearer criterion to define it.
4423 (parse): Initialize the initial location when YYLTYPE_IS_TRIVIAL.
4424 When reducing on an empty RHS, use the latest stacked location as
4425 location.
4426 yylloc is not always available.
4427 * data/glr.c: Likewise.
4428 Also, honor initial-actions.
4429
3fc16193
AD
44302004-09-20 Akim Demaille <akim@epita.fr>
4431
4432 * data/yacc.c (YY_LOCATION_PRINT): New.
4433 Define when we know YYLTYPE's structure, i.e., when the default
4434 YYLLOC_DEFAULT is used.
4435 * data/c.m4 (b4_yysymprint_generate): Use it.
4436 * data/lalr1.cc (YYLLOC_DEFAULT): Stop relying on the initial
4437 value of the result.
4438 (error_start_): Replace with...
4439 (error_range_): this location array.
4440 This allows to replace code relying on the implementation of
4441 locations by portable code.
4442 * data/yacc.c (yylerrsp): Replace with...
4443 (yyerror_range): this.
4444 Every time a token is popped, update yyerror_range[0], to have an
4445 accurate location for the error token.
4446 * data/glr.c (YY_LOCATION_PRINT): New.
4447 (yyprocessOneStack): Fix an invocation of YY_SYMBOL_PRINT:
4448 deference a pointer.
4449 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): No longer
4450 report the location in %printers.
4451
4452 * src/scan-skel.l: Instead of abort, report error messages to ease
4453 understanding skeleton scanning failures.
4454
ecfe33e7
AD
44552004-09-16 Akim Demaille <akim@epita.fr>
4456
4457 * data/lalr1.cc (Stack::Iterator, Stack::ConstIterator): Rename as...
4458 (iterator, const_iterator): these, to be more in the C++ spirit.
4459 Also, return reverse iterators so that when displaying the stack
4460 we display its bottom first.
4461 (Parser::stack_print_, Parser::reduce_print_): Match the messages
4462 from yacc.c.
4463 We should probably use vector here though.
4464
1576d44d
AD
44652004-09-16 Akim Demaille <akim@epita.fr>
4466
4467 Have more complete shift traces.
4468
4469 * data/yacc.c, data/lalr1.c, data/glr.c: Use YY_SYMBOL_PRINT
4470 to report Shifts instead of ad hoc YYDPRINTF invocations,
4471 including for the error token.
4472 * data/lalr1.cc (symprint_): Output the location.
4473 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): In C++, don't
4474 output the location within the %printer.
4475 Activate GLR tests, at least to make sure they compile properly.
4476 They still don't pass though.
4477 * tests/calc.at: Adjust expect verbose output, since now "Entering
4478 state..." is on a different line than the "Shifting" message.
4479
9c66f418
AD
44802004-09-08 Akim Demaille <akim@epita.fr>
4481
4482 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Move the
4483 Bison directive from the Bison file to the invocation of this
4484 macro, so that these directives are passed to
4485 AT_BISON_OPTION_PUSHDEFS to get correct help macros.
4486 Use these helping macros (e.g., AT_LOC, AT_VAL and so forth).
4487 Move the AT_SETUP/AT_CLEANUP outside, to report as test title
4488 the extra Bison directives instead of the whole series.
4489 Change the grammar so that there are recoverable errors, and
4490 unrecoverable errors. Now we can have the parser give up before
4491 consuming the whole input. As a result we now can observe that
4492 the lookahead is freed when needed.
4493 Change the parser source to parse argv[1] instead of a hard coded
4494 string.
4495 Simplify yylex, and give a value and location to EOF.
4496 Simplify some invocations of AT_CHECK_PRINTER_AND_DESTRUCTOR that
4497 passed directives already coded in the file.
4498 Add some tests to check the location of "error".
4499 For some tests, the C++ parser is correct, and not yacc.c.
4500 For other tests, they provide different, but unsatisfying, values,
4501 so keep the C++ value so that at least one parser is "correct"
4502 according to the test suite.
4503 (Actions after errors): Remove, this is subsumed by the
4504 AT_CHECK_PRINTER_AND_DESTRUCTOR series.
4505
52d5733f
AD
45062004-09-06 Akim Demaille <akim@epita.fr>
4507
4508 * data/lalr1.cc: Adjust the indentation of the labels.
04098407 4509 (Parser::pop): New.
52d5733f
AD
4510 Use it.
4511
a0e68930
AD
45122004-09-06 Akim Demaille <akim@epita.fr>
4513
4514 * data/yacc.cc, data/glr.cc (yydestruct): Accept an additional
4515 argument, an informative message.
4516 Call YY_SYMBOL_PRINT.
4517 Adjust all callers: integrate the associated YY_SYMBOL_PRINT.
4518 * data/lalr1.cc (destruct_): Likewise.
4519 In addition, no longer depend on b4_yysymprint_generate and
4520 b4_yydestruct_generate to generate these functions, do it "by
4521 hand".
4522
e757bb10
AD
45232004-09-03 Akim Demaille <akim@epita.fr>
4524
4525 * data/glr.c, data/lalr1.cc, data/yacc.c: When YYABORT was
4526 invoked, yydestruct the lookahead.
4527 * tests/calc.at (Calculator $1): Update the expected lengths of
4528 traces: there is an added line for the discarded lookahead.
4529 * doc/bison.texinfo (Destructor Decl): Some rewording.
4530 Define "discarded" symbols.
4531
0fe1f06d
AD
45322004-09-02 Akim Demaille <akim@epita.fr>
4533
4534 * data/lalr1.cc (translate_, destruct_): No reason to be static.
4535
284acc8b
AD
45362004-09-02 Akim Demaille <akim@epita.fr>
4537
4538 * data/glr.c, yacc.c (YYDSYMPRINT): Remove, not used.
4539 (YYDSYMPRINTF): Rename as...
4540 (YY_SYMBOL_PRINT): this.
4541 * data/lalr1.cc (YY_SYMBOL_PRINT): New, modeled after the previous
4542 two.
4543 Use it instead of direct symprint_ calls.
4544 (yybackup): Tweak the "Now at end of input" case to match yacc.c's
4545 one.
4546
a5eb1ed2
AD
45472004-09-02 Akim Demaille <akim@epita.fr>
4548
b7c72fe1
AD
4549 * data/lalr1.cc (b4_yysymprint_generate): New.
4550 (symprint_): New member function, defined when YYDEBUG.
4551 Use it consistently instead of token/nterm debugging output by
4552 hand.
a5eb1ed2
AD
4553 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust
4554 %printer calls to use cdebug_ when using lalr1.cc.
4555
417141dd
AD
45562004-08-30 Florian Krohm <florian@edamail.fishkill.ibm.com>
4557
4558 * data/glr.c: Guard the declarations of yypstack and yypdumpstack
4559 with #ifdef YYDEBUG.
4560
2fa09258
AD
45612004-08-26 Akim Demaille <akim@epita.fr>
4562
4563 * doc/bison.texinfo (Implementing Loops): Rename as...
4564 (Implementing Gotos/Loops): this.
4565
9378b508
PE
45662004-08-13 Paul Eggert <eggert@cs.ucla.edu>
4567
4568 Adjust to latest gnulib.
4569 * bootstrap (gnulib_modules): Add xalloc-die.
4570 Set LC_ALL=C so that file names sort consistently.
4571 Prefer the gnulib copies of gettext.m4, glibc21.m4,
4572 inttypes_h.m4, lib-ld.m4, lib-prefix.m4, po.m4, stdint_h.m4,
4573 uintmax_t.m4, ulonglong.m4.
4574 (intl_files_to_remove): Add gettext.m4, lib-ld.m4, lib-prefix.m4,
4575 po.m4 since we are now using _gl.m4 instead.
4576
87a8ad5c
PE
45772004-08-10 Florian Krohm <florian@edamail.fishkill.ibm.com>
4578
4579 * src/scan-action.l: Remove. Scanning of semantic actions is
4580 handled in scan-gram.l.
4581
dca81a78
PE
45822004-08-07 Florian Krohm <florian@edamail.fishkill.ibm.com>
4583
4584 * src/scan-gram.l (handle_syncline): Use uniqstr_new not xstrdup.
4585
4586 * src/location.h (struct): The file member is a uniqstr.
4587 (equal_boundaries): Use UNIQSTR_EQ for comparison.
4588
c9cbf7c5
PE
45892004-07-22 Paul Eggert <eggert@cs.ucla.edu>
4590
4591 Fix bug with non-%union parsers that have printers or destructors,
4592 which led to a Bison core dump. Reported by Peter Fales in
4593 <http://lists.gnu.org/archive/html/bug-bison/2004-07/msg00014.html>.
2fa09258 4594
c9cbf7c5
PE
4595 * data/c.m4 (b4_symbol_actions): Don't assume %union was used.
4596 * data/lalr1.cc (yystype) [defined YYSTYPE]: Define to YYSTYPE,
4597 not to our own type.
4598 * src/output.c (symbol_destructors_output, symbol_printers_output):
4599 Don't assume %union.
4600 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR,
4601 AT_CHECK_PRINTER_AND_DESTRUCTOR): New argument
4602 UNION-FLAG. All callers changed.
4603 (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Don't assume %union.
4604 Use type char, not unsigned int, when declaring an array of char;
4605 this lets us remove a cast.
4606 (Printers and Destructors): Add non-%union test cases.
4607
fa7e68c3
PE
46082004-06-21 Paul Eggert <eggert@cs.ucla.edu>
4609
4610 * doc/bison.texinfo: Minor editorial changes, mostly to the new
4611 GLR writeups. E.g., avoid frenchspacing and the future tense,
4612 change "lookahead" to "look-ahead", and change "wrt" to "with
4613 respect to".
2fa09258 4614
fa7e68c3
PE
46152004-06-21 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
4616
4617 * doc/bison.texinfo (Merging GLR Parses, Compiler Requirements):
4618 New sections, split off from the GLR Parsers section. Put the new
4619 Simple GLR Parser near the start of the GLR section, for clarity.
4620 Rewrite connective text.
4621
99a9344e
PE
46222004-06-21 Frank Heckenbach <frank@g-n-u.de>
4623
4624 * doc/bison.texinfo (Simple GLR Parsers): New section.
4625
8dd162d3
PE
46262004-06-21 Paul Eggert <eggert@cs.ucla.edu>
4627
4628 * NEWS, TODO, doc/bison.texinfo:
4629 Use "look-ahead" instead of "lookahead", to be consistent.
4630 * REFERENCES: Fix incorrect reference to DeRemer and Pennello,
4631 while we're fixing "look-ahead".
4632 * src/conflicts.c (shift_set): Renamed from shiftset.
4633 (look_ahead_set): Renamed from lookaheadset.
4634 * src/print.c: Likewise.
4635 * src/getargs.c (report_args): Add "look-ahead" as the new canonical
4636 name for "lookahead".
4637 (report_types, usage): Likewise.
4638 * src/getargs.h (report_look_ahead_tokens): Renamed from
4639 report_lookaheads.
4640 * src/lalr.c (compute_look_ahead_tokens): Renamed from
4641 compute_lookaheads.
4642 (state_look_ahead_tokens_count): Renamed from state_lookaheads_count.
4643 (look_ahead_tokens_print): Renamed from lookaheads_print.
4644 * src/state.c (state_rule_look_ahead_tokens_print): Renamed from
4645 state_rule_lookaheads_print.
4646 * src/state.h: Likewise.
4647 (reductions.look_ahead_tokens): Renamed from lookaheads.
4648 * tests/torture.at (AT_DATA_LOOK_AHEAD_TOKENS_GRAMMAR): Renamed from
4649 AT_DATA_LOOKAHEADS_GRAMMAR.
4650
57a90331
PE
46512004-06-03 Paul Eggert <eggert@cs.ucla.edu>
4652
4653 * README: Update location of patched M4 distribution.
4654
8ed3234a
PE
46552004-05-30 Albert Chin-A-Young <china@thewrittenword.com>
4656
4657 Don't assume the C++ compiler takes the same arguments as the C compiler
4658 (trivial change).
4659 * configure.ac (O0CXXFLAGS): New var.
4660 * tests/atlocal.in (CXXFLAGS): Use it.
4661
07971983
PE
46622004-05-29 Paul Eggert <eggert@cs.ucla.edu>
4663
4664 Fix some "make check" problems with C++ reported by
4665 Albert Chin-A-Young for Tru64 C++ in this thread:
4666 http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00049.html
4667
4668 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check for std::cerr.
4669 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
4670 Output to a .cc file for C++, not to a .c file.
4671 * tests/calc.at (AT_CHECK_CALC): Likewise.
4672 * tests/regression.at (AT_CHECK_DANCER): Likewise.
4673 * tests/local.at (AT_COMPILE_CXX): Default to OUTPUT.cc, not OUTPUT.c.
4674
29058652
PE
46752004-05-28 Albert Chin-A-Young <china@thewrittenword.com>
4676
4677 * tests/calc.at, tests/actions.at: Workaround for SGI
4678 C++ compiler. (trivial change)
4679
62cb8a99
PE
46802004-05-27 Paul Eggert <eggert@cs.ucla.edu>
4681
fd418816
PE
4682 Spent a few hours checking out which prerequisite versions the
4683 current sources actually require. I went all the way back to
4684 Gettext 0.10.40, Automake 1.4, and Autoconf 2.57 and investigated
4685 a seemingly endless set of combinations of versions more recent
4686 than that. The bottom line is that the current sources require
4687 fairly recent versions of the build tools, and it'll be some work
4688 to change this.
4689 * configure.ac (AC_PREREQ): Increase from 2.58 to 2.59.
4690 (AM_INIT_AUTOMAKE): Increase from 1.7 to 1.8.
4691 (AM_GNU_GETTEXT_VERSION): Increase from 0.11.5 to 0.12.
4692 Add comments explaining why those particular versions are
4693 currently needed.
2fa09258 4694
62cb8a99
PE
4695 * src/parse-gram.y (lloc_default): Rewrite to avoid compiler bug
4696 in SGI MIPSpro 7.4.1m. Problem reported by Albert Chin-A-Young in
161a71f3 4697 <http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00037.html>.
62cb8a99
PE
4698
4699 * configure.ac (AC_PREREQ): Bump to 2.58, since 2.57 doesn't work
4700 (it fails with a Autoconf-without-aclocal-m4 diagnostic).
4701
caa52c10
PE
47022004-05-26 Paul Eggert <eggert@cs.ucla.edu>
4703
4704 * configure.ac (AM_GNU_GETTEXT_VERSION): Lower it from 0.14.1 to
4705 0.11.5. Suggested by Bruno Haible.
4706 * bootstrap: Remove gettext version checking.
4707
4708 * doc/bison.texinfo (Decl Summary): Also mention that %union
4709 can depend on prerequisite types. Problem reported by Tim
4710 Van Holder.
4711
4bfd5e4e
PE
47122004-05-25 Paul Eggert <eggert@cs.ucla.edu>
4713
2cef3017
PE
4714 * README: Mention GNU m4 1.4 bugs and Akim's patched version.
4715 * README-alpha: Don't tell people not to package this.
4716
b9c85d5c
PE
4717 * bootstrap: Don't assume $(...) works; use `...` instead.
4718 Problem reported by Paul Hilfinger. Also, diagnose non-GNU
4719 gettext better.
4720
4bfd5e4e
PE
4721 * doc/bison.texinfo (Decl Summary, Bison Options): Clarify what's
4722 put into the -d output file, and mention what to do if YYSTYPE is
4723 defined as a macro.
4724
6a36ff94
PE
47252004-05-24 Paul Eggert <eggert@cs.ucla.edu>
4726
6712933e
PE
4727 Undo change made earlier today: it caused autopoint to not bring
4728 in ABOUT-NLS. Ouch. Instead, substitute our own diagnostic for
4729 autopoint's.
4730
4731 * bootstrap: Check that gettext version matches what's in
4732 configure.ac. Warn users to ignore robots.txt ERROR 404.
4733 * bootstrap: Undo today's earlier change (logged below).
4734 * configure.ac (AM_GNU_GETTEXT_VERSION): Likewise.
b9c85d5c 4735
6a36ff94
PE
4736 The gettext version checking is causing more trouble than it's
4737 curing; remove it. Problem reported by Paul Hilfinger.
4738
4739 * bootstrap: Issue a warning that one can expect a message
4740 'AM_GNU_GETTEXT is used, but not AM_GNU_GETTEXT_VERSION'.
4741 * configure.ac (AM_GNU_GETTEXT_VERSION): Remove.
4742
209ea708
PE
47432004-05-23 Paul Eggert <eggert@cs.ucla.edu>
4744
4745 Ensure that the C++ compiler used for testing actually works on a
4746 simple test program; if not, skip the C++-related tests. Problem
4747 reported by Vin Shelton in:
161a71f3 4748 http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00026.html
209ea708
PE
4749
4750 * m4/cxx.m4: New file.
4751 * configure.ac (BISON_TEST_FOR_WORKING_CXX_COMPILER): Add.
4752 * tests/atlocal.in (BISON_CXX_WORKS): Add.
4753 * tests/local.at (AT_COMPILE_CXX): Use it.
4754
41ca2549
PE
47552004-05-21 Paul Eggert <eggert@cs.ucla.edu>
4756
383e69dc
PE
4757 * data/glr.c (yylloc): Output this macro even if locations are not
4758 being generated, as the GLR parser needs it even in that case.
4759 Problem reported by Troy A. Johnson
4760 <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=195946>.
4761
41ca2549
PE
4762 * configure.ac (AC_INIT): Update to 1.875e.
4763
e476c87d
PE
47642004-05-21 Paul Eggert <eggert@cs.ucla.edu>
4765
4766 * NEWS: Version 1.875d.
4767 * configure.ac (AC_INIT): Likewise.
4768 * src/parse-gram.c, src/parse-gram.h: Regenerate with 1.875d.
4769
4770 * configure.ac (--enable-gcc-warnings): Do not enable -Wshadow,
4771 -Wmissing-prototypes, or -Wstrict-prototypes for C++. The current
4772 lalr1.cc runs afoul of the first, and the last two are no longer
4773 supported by GCC 3.4.0.
4774 * README: Mention GNU m4 1.4 or later; mention m4 patches.
4775 * HACKING: Use ./bootstrap, not "make update" to import foreign files.
4776
233a88ad
PE
47772004-05-06 Paul Eggert <eggert@cs.ucla.edu>
4778
4779 * src/muscle_tab.c (hash_muscle): Accept and return size_t, not
4780 unsigned int, for compatibility with latest gnulib hash module.
4781 * src/state.c (state_hash, state_hasher): Likewise.
4782 * src/symtab.c (hash_symbol, hash_symbol_hasher): Likewise.
4783 * src/uniqstr.c (hash_uniqstr): Likewise.
e476c87d 4784
12ffdd28
PE
47852004-05-03 Paul Eggert <eggert@cs.ucla.edu>
4786
4787 * NEWS: Unescaped newlines are no longer allowed in char & strings.
4788
4789 * src/scan-gram.l (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER,
4790 SC_CHARACTER,SC_STRING>): Reject unescaped newlines in
4791 character and string literals.
4792 (unexpected_end): New function.
4793 (unexpected_eof): Use it.
4794 (unexpected_newline): New function.
4795 (<INITIAL,SC_AFTER_IDENTIFIER,SC_PRE_CODE>): Coalesce duplicate
4796 actions.
e476c87d 4797
12ffdd28
PE
4798 * NEWS: Document %expect-rr.
4799
4800 * bootstrap (--gnulib-srcdir=*, --cvs-user=*):
4801 Fix typo by replacing $1 with $option.
4802 Remove more 'intl'-related files.
9668e2be 4803 Don't DEFUN AM_INTL_SUBDIR twice.
12ffdd28
PE
4804
4805 * lib/.cvsignore: Add strndup.h. Remove memchr.c, memcmp.c,
4806 memrchr.c, strcasecmp.c, strchr.c, strrchr.c, strspn.c, strtol.c,
4807 strtoul.c.
4808 * m4/.cvsignore: Add exitfail.m4, extensions.m4, gnulib.m4,
4809 hard-locale.m4, mbstate_t.m4, strerror_r.m4, strndup.m4,
4810 xstrndup.m4. Remove glibc21.m4, intdiv0.m4, inttypes-pri.m4,
4811 inttypes.m4, inttypes_h.m4, isc-posix.m4, lcmessage.m4,
4812 stdint_h.m4, uintmax_t.m4, ulonglong.m4.
4813 * src/.cvsignore: Add *.output.
4814
4815 * src/parse-gram.y: Put copyright notice inside %{ %} so it
4816 gets copied to the output file.
e476c87d 4817
1f65350a
PE
48182004-04-28 Paul Eggert <eggert@twinsun.com>
4819
4820 Get files from the gnulib and po repositories, instead of relying
4821 on them being in our CVS. Upgrade to latest versions of gnulib
4822 and Automake.
4823
4824 * Makefile.am (SUBDIRS): Remove m4; Automake now does m4.
4825 * bootstrap: Bootstrap from gnulib and po repositories.
4826 Much of this code was stolen from GNU diff and GNU tar's bootstrap.
4827 * README-cvs: Document these changes. Remove version numbers from
4828 mentions of build tools, since they change so often. Mention Flex.
4829
4830 * configure.ac (AC_CONFIG_MACRO_DIR): Add, with m4 as arg.
4831 (gl_USE_SYSTEM_EXTENSIONS): Add.
12ffdd28
PE
4832 (AC_GNU_SOURCE, AC_AIX, AC_MINIX):
4833 Remove; no longer needed, as gl_USE_SYSTEM_EXTENSIONS
1f65350a 4834 does this for us.
12ffdd28
PE
4835 (AC_ISC_POSIX): Remove; we no longer support this
4836 ancient OS, as it gets in the way of latest Autoconf & gnulib.
1f65350a
PE
4837 (AC_HEADER_STDC): Remove: we now assume C89 or better.
4838 (AC_CHECK_HEADERS_ONCE): Use instead of AC_CHECK_HEADERS.
4839 Do not check for C89 headers, except for locale.h which is used
4840 by the Yacc library and must port to K&R hosts.
4841 (AC_CHECK_FUNCS_ONCE): Use instead of AC_CHECK_FUNCS.
4842 Do not check for C89 functions, except for setlocale which is
4843 used by the Yacc library.
4844 (AC_CHECK_DECLS, AC_REPLACE_FUNCS): Remove; no longer needed.
4845 (gl_DIRNAME, gl_ERROR, gl_FUNC_ALLOCA, gl_FUNC_MEMCHR,
4846 gl_FUNC_MEMRCHR, gl_FUNC_STPCPY, gl_FUNC_STRNLEN, gl_FUNC_STRTOL,
4847 gl_GETOPT, gl_HASH, gl_MBSWIDTH, gl_OBSTACK, gl_QUOTE,
4848 gl_QUOTEARG, gl_XALLOC, jm_FUNC_GLIBC_UNLOCKED_IO, jm_FUNC_MALLOC,
4849 AM_GNU_GETTEXT): Remove; now done by:
4850 (GNULIB_AUTOCONF_SNIPPET): Add. "bootstrap" builds this for us.
4851 (AC_CONFIG_FILES): Remove m4/Makefile, as Automake now does this
4852 for us.
4853
4854 * lib/Makefile.am: Include gnulib.mk, built for us by "bootstrap".
4855 (BUILT_SOURCES, EXTRA_DIST, MOSTLYCLEANFILES):
4856 Define to empty, as gnulib.mk will do the rest for us.
4857 ($(libbison_a_OBJECTS), stdbool.h): Remove, as gnulib.mk does this
4858 for us.
4859 (libbison_a_SOURCES): Define to $(lib_SOURCES) now.
4860 (lib_SOURCES): New symbol, containing only the non-gnulib libs.
4861
4862 * src/files.c: Include gnulib's xstrndup.h.
4863
4864 * src/system.h (MALLOC): Use xnmalloc, for better overflow checking.
4865 (REALLOC): Use xnrealloc, for likewise.
4866 (xstrndup, stpcpy): Remove decls, as gnulib does this for us now.
4867 (strnlen, memrchr): Remove decls; functions no longer used.
4868 Include <stpcpy.h>.
4869
4870 * config/depcomp, config/install-sh, lib/alloca.c, lib/argmatch.c,
4871 lib/argmatch.h, lib/basename.c, lib/dirname.c, lib/dirname.h,
4872 lib/error.c, lib/error.h, lib/getopt.c, lib/getopt.h,
4873 lib/getopt1.c, lib/gettext.h, lib/hash.c, lib/hash.h,
4874 lib/malloc.c, lib/mbswidth.c, lib/mbswidth.h, lib/memchr.c,
4875 lib/memcmp.c, lib/memrchr.c, lib/obstack.c, lib/obstack.h,
4876 lib/quote.c, lib/quote.h, lib/quotearg.c, lib/quotearg.h,
4877 lib/realloc.c, lib/stdbool_.h, lib/stpcpy.c, lib/strcasecmp.c,
4878 lib/strchr.c, lib/strncasecmp.c, lib/strnlen.c, lib/strrchr.c,
4879 lib/strspn.c, lib/strtol.c, lib/strtoul.c, lib/unlocked-io.h,
4880 lib/xalloc.h, lib/xmalloc.c, lib/xstrdup.c, lib/xstrndup.c,
4881 m4/Makefile.am, m4/alloca.m4, m4/dirname.m4, m4/dos.m4,
4882 m4/error.m4, m4/getopt.m4, m4/hash.m4, m4/malloc.m4,
4883 m4/mbrtowc.m4, m4/mbswidth.m4, m4/memchr.m4, m4/memcmp.m4,
4884 m4/memrchr.m4, m4/obstack.m4, m4/onceonly.m4, m4/prereq.m4,
4885 m4/quote.m4, m4/quotearg.m4, m4/realloc.m4, m4/stdbool.m4,
4886 m4/stpcpy.m4, m4/strnlen.m4, m4/strtol.m4, m4/strtoul.m4,
4887 m4/unlocked-io.m4, m4/xalloc.m4, po/LINGUAS, po/Makefile.in.in,
4888 po/Makevars, po/da.po, po/de.po, po/es.po, po/et.po, po/fr.po,
4889 po/hr.po, po/id.po, po/it.po, po/ja.po, po/ms.po, po/nl.po,
4890 po/pt_BR.po, po/ro.po, po/ru.po, po/sv.po, po/tr.po:
4891 Remove, as these files are now generated automatically
4892 by bootstrap or automake.
4893
4894 * po/ChangeLog: Remove: all but one entry was a duplicate
4895 of this file, and I moved that 2000-11-02 entry here.
4896
4897 * config/.cvsignore: Add Makefile, depcomp, install-sh.
4898 * lib/.cvsignore: Add alloca.c, alloca.h, alloca_.h, argmatch.c,
4899 argmatch.h, basename.c, dirname.c, dirname.h, error.c, error.h,
4900 exit.h, exitfail.c, exitfail.h, getopt.c, getopt.h, getopt1.c,
4901 getopt_int.h, gettext.h, gnulib.mk, hard-locale.c, hard-locale.h,
4902 hash.c, hash.h, malloc.c, mbswidth.c, mbswidth.h, memchr.c,
4903 memcmp.c, memrchr.c, obstack.c, obstack.h, quote.c, quote.h,
4904 quotearg.c, quotearg.h, realloc.c, stdbool_.h, stpcpy.c, stpcpy.h,
4905 strcasecmp.c, strchr.c, stripslash.c, strncasecmp.c, strndup.c,
4906 strnlen.c, strrchr.c, strspn.c, strtol.c, strtoul.c,
4907 unlocked-io.h, xalloc.h, xmalloc.c, xstrdup.c, xstrndup.c,
4908 xstrndup.h.
4909 * m4/.cvsignore: Remove Makefile, Makefile.in. Add alloca.m4,
4910 dirname.m4, dos.m4, error.m4, getopt.m4, hash.m4, mbrtowc.m4,
4911 mbswidth.m4, obstack.m4, onceonly.m4, quote.m4, quotearg.m4,
4912 stdbool.m4, stpcpy.m4, strnlen.m4, unlocked-io.m4, xalloc.m4.
4913 * po/.cvsignore: Add *.po, LINGUAS, Makefile.in.in, Makevars.
4914 * src/.cvsignore: Remove *_.c.
4915
4916
4917 * Makefile.maint (GZIP_ENV): Don't use --rsyncable if gzip doesn't
4918 support it. (The latest stable gzip doesn't.)
4919
49202004-04-27 Paul Eggert <eggert@twinsun.com>
4921
4922 * data/lalr1.cc (Parser::stos_) [! YYDEBUG]: Define even in this
4923 case, as stos_ is now used by destructors due to the 2004-02-09
4924 change.
4925
4926 Remove more K&R C support.
4927 * lib/libiberty.y (PARAMS): Remove. All uses removed.
4928 * lib/subpipe.c (errno): Remove decl.
4929 Include <stdlib.h> unconditionally.
4930 (EXIT_FAILURE): Remove macro.
4931 * src/complain.c (vfprintf, strerror): Remove.
4932 * src/system.h: Include limits.h, stdlib.h, string.h, locale.h
4933 unconditionally.
4934 (EXIT_FAILURE, EXIT_SUCCESS, setlocale): Remove defns.
4935 Use latest Autoconf recommendations for including inttypes.h, stdint.h.
4936 (strchr, strspn, memchr): Remove decls.
4937 * tests/calc.at (_AT_DATA_CALC_Y): Include stdlib.h, string.h
4938 unconditionally. Do not declare perror.
4939 * tests/conflicts.at (%nonassoc and eof): Include stdlib.h
4940 unconditionally.
4941
4942 * src/complain.c (_): Remove useless defn, as system.h defines this.
4943
4944 * lib/bitset.h (__INT_TO_PTR): Remove; workaround no longer needed
4945 with latest obstack.h.
4946 * lib/ebitset.c (ebitset_elt_alloc): Don't bother to cast args
4947 to procedure types, as obstack.h now does that for us.
4948 * lib/lbitset.c (lbitset_elt_alloc): Likewise.
4949
4950 * lib/subpipe.h [HAVE_SYS_TYPES_H]: Include <sys/types.h>,
4951 so that this include file can stand alone.
4952 * lib/subpipe.c: Do not include <sys/types.h>, as subpipe.h
4953 does this now. Include subpipe.h first after config.h, to
4954 test whether it can stand alone.
4955
4956 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Don't
4957 declare yyerror when using lalr.cc, as GCC 3.4.0 warns about the
4958 unused declaration.
4959
4960 * tests/synclines.at (%union synch line): Put a dummy member in
4961 the union, because empty unions aren't allowed in C. Caught
4962 by GCC 3.4.0.
4963
4f16766c
PE
49642004-04-13 Jim Meyering <jim@meyering.net>
4965
4966 * src/conflicts.c (conflicts_print): Correct format string typo:
4967 use `%%' to produce literal `%'. (trivial change)
4968
779e7ceb
PE
49692004-03-30 Paul Eggert <eggert@twinsun.com>
4970
4971 * src/getargs.c (version): Update copyright year to 2004.
4972
4973 * data/c.m4 (b4_int_type): Use 'short int' rather than
4974 'short', and similarly for 'long', 'unsigned', etc.
4975 * data/glr.c (YYTRANSLATE, yyconfl, yySymbol, yyItemNum,
4976 yygetLRActions, yyprocessOneStack, yyrecoverSyntaxError,
4977 yy_yypstack, yydumpstack): Likewise.
4978 * data/lalr1.cc (user_token_number_max_, user_token_number_max_,
4979 translate_, seq_, [], pop, Slice, range_, operator+, operator+=):
4980 Likewise.
4981 * data/yacc.c (b4_int_type, yyss, YYSTACK_BYTES, yysigned_char,
4982 yy_stack_print, yyparse): Likewise.
4983 * doc/bison.texinfo (Prologue, Multiple Types): Likewise.
4984 * lib/bbitset.h (bitset_word, BITSET_WORD_BITS): Likewise.
4985 * lib/bitset.c (bitset_print): Likewise.
4986 * lib/bitset_stats.c (bitste_log_histogram_print): Likewise.
4987 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
4988 * lib/bitsetv.c (bitsetv_dump): Likewise.
4989 * lib/ebitset.c (EBITSET_ELT_BITS, ebitset_elt_alloc): Likewise.
4990 * lib/lbitset.c (LBITSET_ELT_BITS, lbitset_elt_alloc, debug_lbitset):
4991 Likewise.
4992 * src/LR0.c (allocate_itemsets): Likewise.
4993 * src/gram.h (rule_number, rule): Likewise.
4994 * src/lalr.h (goto_number): Likewise.
4995 * src/nullable.c (nullable_compute): Likewise.
4996 * src/output.c (prepare_rules): Likewise.
4997 * src/relation.c (relation_print, relation_digraph): Likewise.
4998 * src/relation.h (relation_node): Likewise.
4999 * src/state.h (state_number, transitions, errs, reductions,
5000 struct state): Likewise.
5001 * src/symtab.h (symbol_number, struct symbol): Likewise.
5002 * src/tables.c (vector_number, tally, action_number,
5003 default_goto, goto_actions): Likewise.
5004 * tests/existing.at (GNU Cim Grammar): Likewise.
5005 * tests/regression.at (Web2c Actions): Likewise.
5006
5007 * src/output.c (muscle_insert_short_int_table): Renamed from
5008 muscle_insert_short_table. All uses changed.
5009
d6328241
PH
50102004-03-25 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
5011
5012 * src/parse-gram.y: Define PERCENT_EXPECT_RR.
5013 (declaration): Replace expected_conflicts with expected_sr_conflicts.
5014 Add %expect-rr rule.
4f16766c 5015
d6328241
PH
5016 * src/scan-gram.l: Recognize %expect-rr.
5017
4f16766c 5018 * src/conflicts.h (expected_sr_conflicts): Rename from
d6328241 5019 expected_conflicts.
4f16766c 5020 (expected_rr_conflicts): Declare.
d6328241
PH
5021
5022 * src/conflicts.c (expected_sr_conflicts): Rename from
5023 expected_conflicts.
5024 (expected_rr_conflicts): Define.
5025 (conflicts_print): Check r/r conflicts against expected_rr_conflicts
5026 for GLR parsers.
5027 Use expected_sr_conflicts in place of expected_conflicts.
5028 Warn if expected_rr_conflicts used in non-GLR parser.
4f16766c 5029
d6328241 5030 * doc/bison.texinfo: Add documentation for %expect-rr.
4f16766c 5031
1452af69
PE
50322004-03-08 Paul Eggert <eggert@gnu.org>
5033
5034 Add support for hex token numbers. Suggested by Odd Arild Olsen in
161a71f3 5035 <http://lists.gnu.org/archive/html/bison-patches/2004-03/msg00000.html>.
1452af69
PE
5036
5037 * NEWS: Document hexadecimal tokens, no NUL bytes, %destructor
5038 in lalr1.cc.
5039 * doc/bison.texinfo (Token Decl): Add hexadecimal token numbers.
5040 * src/scan-gram.l (scan_integer): New function.
5041 ({int}): Use it.
5042 (0[xX][0-9abcdefABCDEF]+): New pattern, to support hex numbers.
5043 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>, \\x[0-9abcdefABCDEF]+,
5044 handle_action_dollar, handle_action_at, convert_ucn_to_byte):
5045 Say "long int", not "long", for uniformity with GNU style.
5046
006d217d
PE
50472004-02-25 Paul Eggert <eggert@twinsun.com>
5048
5049 * tests/local.at (AT_COMPILE, AT_COMPILE_CXX): Ignore stdout from
5050 compilers. This fixes a problem with Intel's C++ compiler being
5051 chatty, reported by Guido Trentalancia in
161a71f3 5052 <http://lists.gnu.org/archive/html/bug-bison/2004-02/msg00030.html>.
006d217d 5053
c2729758
ADL
50542004-02-09 Alexandre Duret-Lutz <adl@gnu.org>
5055
5056 Support %destructor and merge error locations in lalr1.cc.
5057
5058 * data/lalr1.cc (b4_cxx_destruct_def): New macro.
5059 (Parser::stos_): Define unconditionally.
5060 (Parser::destruct_): New method. Generate its body with
5061 b4_yydestruct_generate.
5062 (Parser::error_start_): New attribute.
5063 (Parser::parse) <yyerrlab, yyerrlab1>: Call destruct_ on erroneous
5064 token which are discarded.
5065 (Parser::parse) <yyerrlab, yyerrorlab, yyerrlab1>: Update
5066 error_start_ when erroneous token are discarded.
5067 (Parser::parse) <yyerrlab1>: Compute the location of the error
5068 token so that it covers all the discarded tokens.
5069 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust so
5070 it can be called with `%skeleton "lalr1.cc"', and do that.
5071
dd0e0635
PE
50722004-02-02 Paul Eggert <eggert@twinsun.com>
5073
5074 * src/Makefile.am (AM_CPPFLAGS): New macro. It mentions
5075 $(top_srcdir)/lib and ../lib. This fixes a bug reported
5076 by Paul Hilfinger; the old INCLUDES value didn't mention ../lib.
5077 There's no need to mention top_builddir since Automake does that
5078 for us.
5079 (INCLUDES): Remove, as Automake says it's obsolescent.
5080 Contents migrated into AM_CPPFLAGS as described above.
5081 * lib/Makefile.am (INCLUDES): Remove; obsolescent.
5082
50832004-01-14 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
5084
5085 * data/glr.c (yytokenName): Bullet-proof against YYEMPTY token.
5086 (yyreportSyntaxError): Handle case where lookahead token is
5087 YYEMPTY.
5088
be16239b
PH
50892004-01-13 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
5090
5091 * data/glr.c: Put casts on uses of YYREALLOC and YYMALLOC so that
5092 resulting parsers are compilable with C++.
5093
5fa90832
PE
50942003-12-23 Paul Eggert <eggert@twinsun.com>
5095
5096 * config/depcomp, config/install-sh: Sync with Automake 1.8.
5097 * src/output.c (output_skeleton): Rename local var.
5098 * tests/input.at (Torturing the Scanner): Don't use \x0 or \0 in
5099 Bison tokens, as this runs afoul of the 2003-10-07 change that
5100 disallowed NUL bytes in character constants or string literals.
5101
5102 * tests/local.at: Require Autoconf 2.59's Autotest.
5103 * tests/testsuite.at: Don't include local.at, since we now assume
5104 Autoconf 2.59 or later. Autoconf 2.59 had some problems with
5105 including it.
5106 * tests/Makefile.am ($(TESTSUITE)): Remove warning about ignoring
5107 multiple inclusion warnings.
dd0e0635 5108
b165c324
AD
51092003-12-02 Akim Demaille <akim@epita.fr>
5110
5111 * doc/bison.texinfo (How Can I Reset the Parser): More about start
5112 conditions.
5113 From Bruno Haible.
5114
26e06a21
ADL
51152003-11-18 Alexandre Duret-Lutz <adl@gnu.org>
5116
5117 * doc/bison.texinfo (Bison Options): Escape `@' in `$@'.
5118
92ac3705
PE
51192003-10-07 Paul Eggert <eggert@twinsun.com>
5120
6a5ecb38
PE
5121 * tests/Makefile.am (clean-local): Don't run 'testsuite --clean'
5122 if testsuite doesn't exist.
5123
92ac3705
PE
5124 * doc/bison.texinfo (Symbols): NUL bytes are not allowed in string
5125 literals, unfortunately.
5126 * src/scan-gram.l (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>):
5127 Complain about NUL bytes in character constants or string literals.
5128
91d2c560
PE
51292003-10-05 Paul Eggert <eggert@twinsun.com>
5130
5131 * NEWS: Don't document %no-default-prec, as it's still
5132 too experimental.
5133 * doc/bison.texinfo: Document %no-default-prec only if
5134 the defaultprec flag is set. Normally it's not.
5135
0cc3da3a
PE
51362003-10-04 Paul Eggert <eggert@twinsun.com>
5137
5138 * data/glr.c (b4_rhs_value, b4_rhs_location): Yield a
5139 non-modifiable lvalue, instead of a modifiable one.
5140 * doc/bison.texinfo (Actions): Document that $$ can
5141 be assigned to. Do not claim that $$ and $N are
5142 array element references: user code should not rely on this.
5143
22fccf95
PE
51442003-10-01 Paul Eggert <eggert@twinsun.com>
5145
5146 * src/parse-gram.h (PERCENT_NO_DEFAULT_PREC): New token.
5147 (grammar_declaration): Use it.
5148 * src/scan-gram.l: New token %no-default-prec.
5149 * tests/conflicts.at: Revamp tests to use %no-default-prec.
5150 * NEWS, doc/bison.texinfo: Document the above.
5151
fc8f2965
AD
51522003-10-01 Akim Demaille <akim@epita.fr>
5153
5154 VCG no longer supports long_straight_phase.
5155
5156 * src/vcg.c, src/vcg.h: Remove the handling of long_straight_phase.
5157 * src/print_graph.c (print_graph): Adjust.
5158
39a06c25
PE
51592003-09-30 Frank Heckenbach <frank@g-n-u.de>
5160 and Paul Eggert <eggert@twinsun.com>
5161
5162 * doc/bison.texinfo (Decl Summary, Contextual Precedence,
5163 Table of Symbols): Document %default-prec.
5164 * src/parse-gram.y (PERCENT_DEFAULT_PREC): New token.
5165 (grammar_declaration): Set default_prec on %default-prec.
5166 * src/scan-gram.l (%default-prec): New token.
5167 * src/reader.h (default_prec): New flag.
5168 * src/reader.c: Likewise.
5169 (packgram): Handle it.
5170 * tests/conflicts.at (%default-prec without %prec,
5171 %default-prec with %prec, %default-prec 1): New tests.
fc8f2965 5172
39a06c25
PE
51732003-09-30 Paul Eggert <eggert@twinsun.com>
5174
5175 * tests/testsuite.at: Include local.at, not input.at, fixing
5176 a typo in the 2003-08-25 patch.
5177
62b6aef9
AD
51782003-08-27 Akim Demaille <akim@epita.fr>
5179
5180 * data/lalr1.cc (yyparse) [__GNUC__]: "Use" yyerrorlab to pacify
5181 GCC warnings.
5182
89e1cc61
AD
51832003-08-26 Akim Demaille <akim@epita.fr>
5184
5185 * config/announce-gen (print_changelog_deltas): Neutralize "<#" as
5186 "<\#" to avoid magic from Gnus when posting parts of this script.
5187
a08460b0
AD
51882003-08-26 Akim Demaille <akim@epita.fr>
5189
5190 * data/lalr1.cc (Parser::report_syntax_error_): New, extracted from
5191 (Parser::parse): here.
5192 Adjust: nerrs and errstatus is now replaced by...
5193 (Parser::nerrs_, Parser::errstatus_): New.
5194
603f1cfd
AD
51952003-08-25 Akim Demaille <akim@epita.fr>
5196
5197 * config/announce-gen, Makefile.cfg: New.
5198 * Makefile.am: Adjust.
5199 * GNUmakefile, Makefile.maint: Update from CVS Autoconf, but
5200 keeping local WGET and WGETFLAGS modifications from Paul Eggert.
5201
cd3684cf
AD
52022003-08-25 Akim Demaille <akim@epita.fr>
5203
5204 When reducing initial empty rules, Bison parser read an initial
5205 location that is not defined. This results in garbage, and that
5206 affects Bison's own parser. Therefore we need (i) to extend Bison
5207 to support a means to initialize this location, and (ii) to use
5208 this CVS Bison to fix CVS Bison's parser.
5209
5210 * src/reader.h, reader.c (epilogue_augment): Remove, replace
5211 with...
5212 * src/muscle_tab.h, src/muscle_tab.c (muscle_code_grow): this.
5213 * src/parse-gram.y: Adjust.
5214 (%initial-action): New.
5215 (%error-verbose): Since we require CVS Bison, there is no reason
5216 not to use it.
5217 * src/scan-gram.l: Adjust.
5218 * src/Makefile.am (YACC): New, to make sure we use our own parser.
5219 * data/yacc.c (yyparse): Use b4_initial_action.
5220
4e03e201
AD
52212003-08-25 Akim Demaille <akim@epita.fr>
5222
5223 * doc/bison.texinfo: Don't promote stdout for error messages.
5224
8c182d05
AD
52252003-08-25 Akim Demaille <akim@epita.fr>
5226
5227 * data/lalr1.cc (Parser::reduce_print_): Remove unused yyi.
5228 From Alexandre Duret-Lutz.
5229
6a60c4cf
PE
52302003-08-25 Akim Demaille <akim@epita.fr>
5231
5232 Version 1.875c.
5233
25f66e1a
AD
52342003-08-25 Akim Demaille <akim@epita.fr>
5235
5236 * data/lalr1.cc (Parser::stack_print_, YY_STACK_PRINT): New.
5237 Use them.
5238
5348bfbe
AD
52392003-08-25 Akim Demaille <akim@epita.fr>
5240
5241 * data/lalr1.cc (Parser::reduce_print_): New.
5242 Use it.
5243
47301314
AD
52442003-08-25 Akim Demaille <akim@epita.fr>
5245
5246 Have lalr1.cc catch with Paul Eggert's patch to fix the infinite
5247 error recovery loops. This patch is based on
161a71f3 5248 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00000.html>.
47301314
AD
5249 Also, augment the similarity between lalr1.cc and yacc.c.
5250 Note: the locations of error recovery rules are not correct yet.
5251
5252 * data/lalr1.cc: Comment changes to augment the similarity between
5253 lalr1.cc and yacc.c.
5254 (YYERROR): Goto to yyerrorlab, not yyerrlab1.
5255 (yyerrlab1): Remove, but where it used to be (now the bottom part of
5256 yyerrlab), when hitting EOF, pop the whole stack here instead of
5257 merely falling thru the default error handling mechanism.
5258 (yyerrorlab): New label, with the old contents of YYERROR,
5259 plus the following change: pop the stack of rhs corresponding
5260 to the production that invoked YYERROR. That is how Yacc
5261 behaves (required by POSIX).
5262 * tests/calc.at (AT_CHECK_CALC_LALR1_CC): No longer expected to
5263 fail.
5264
1f7a61ff
AD
52652003-08-25 Akim Demaille <akim@epita.fr>
5266
5267 Tune local.at so that people can "autom4te -l autotest calc.at -o
5268 calc" for instance, to extract a sub test suite.
5269
5270 * tests/testsuite.at: Move the initialization, Autotest version
5271 requirement, and AT_TESTED invocation into...
5272 * tests/local.at: here.
5273 * tests/testsuite.at: Include it for compatibility with Autoconf
5274 2.57.
5275 * tests/Makefile.am ($(TESTSUITE)): Report that the warning should
5276 be ignore.
5277
327b5b56
PE
52782003-08-04 Paul Eggert <eggert@twinsun.com>
5279
5280 Rework code slightly to avoid gcc -Wtraditional warnings.
5281 * data/glr.c (yyuserMerge): Return void, not YYSTYPE.
5282 The returned value is now stored in *YY0. All callers changed.
5283 * src/output.c (merge_output): Adjust to the above change.
5284
0051e3ed
PE
52852003-07-26 Paul Eggert <eggert@twinsun.com>
5286
5287 * data/glr.c (YYASSERT): New macro.
5288 (yyfillin, yydoAction, yyglrReduce, yysplitStack,
5289 yyresolveStates, yyprocessOneStack):
5290 Use `YYASSERT (FOO);' rather than `if (! (FOO)) abort ();'.
5291 Derived from a suggestion by Frank Heckenbach.
1f7a61ff 5292
137437c6
PE
52932003-07-25 Paul Eggert <eggert@twinsun.com>
5294
5b620e06
PE
5295 * data/glr.c (yyglrReduce): Don't use C89 string concatenation,
5296 for portability to K&R C (after ansi2knr, presumably). See
161a71f3 5297 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00041.html>
5b620e06
PE
5298 by Frank Heckenbach, though I have omitted the structure-initialization
5299 part of his glr-knr.diff patch since I recall that the Portable
5300 C Compiler didn't require that change.
5301
137437c6
PE
5302 Let the user specify how to allocate and free memory.
5303 Derived from a suggestion by Frank Heckenbach in
161a71f3 5304 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00041.html>.
137437c6
PE
5305 * data/glr.c (YYFREE, YYMALLOC, YYREALLOC): New macros.
5306 All uses of free, malloc, realloc changed to use these macros,
5307 and unnecessary casts removed.
5308 * data/yacc.c (YYFREE, YYMALLOC): Likewise.
5309
ddb85ca5
PE
53102003-07-06 Matthias Mann <MatthiasMann@gmx.de>
5311
5312 * data/lalr1.cc (operator<<(std::ostream&, const Position&)):
5313 use s.empty() rather than s == "" to test for empty string; see
161a71f3 5314 <http://lists.gnu.org/archive/html/bison-patches/2003-07/msg00003.html>
ddb85ca5
PE
5315 (trivial change)
5316
39910e09
AD
53172003-06-25 Akim Demaille <akim@epita.fr>
5318
5319 * config/depcomp, config/install-sh: Update from masters.
5320
0ae99356
PE
53212003-06-20 Paul Eggert <eggert@twinsun.com>
5322
5323 * data/glr.c (YYLLOC_DEFAULT): Parenthesize arguments as needed,
5324 and return properly parenthesized result.
5325 * data/lalar1.cc (YYLLOC_DEFAULT): Likewise.
5326 * data/yacc.c (YYLLOC_DEFAULT): Likewise.
5327 Remove unnecessary parentheses from uses.
5328 * doc/bison.texinfo (Location Default Action): Describe the
5329 conventions for parentheses.
5330
cd05d13c
PE
53312003-06-19 Paul Eggert <eggert@twinsun.com>
5332
81fd08ca
PE
5333 * data/glr.c (yyremoveDeletes, yy_reduce_print, yyglrReduce,
5334 yyreportTree): Do not assume that size_t is the same width as int,
5335 when printing sizes. Print sizes using an unsigned format.
5336 Problem reported by Frank Heckenbach in
161a71f3 5337 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00035.html>.
4dcf140b 5338
cd05d13c
PE
5339 Port to Forte Developer 7 C compiler.
5340 * data/glr.c (struct YYLTYPE): If locations are not being used,
5341 declare a single dummy member, as empty structs do not conform
5342 to the C standard.
5343 (YYERROR, YYBACKUP): Do not use "do { ...; return foo; } while (0)";
5344 the Forte Developer 7 C compiler complains that end-of-loop
5345 code is not reached.
5346
4dcf140b
PE
53472003-06-17 Paul Eggert <eggert@twinsun.com>
5348
5349 * lib/libiberty.h (PARAMS): Spell argument as Args, not as X, to
5350 avoid warnings from picky compilers about redefinition of PARAMS.
5351
8dd76bee
PE
53522003-06-17 Paul Eggert <eggert@twinsun.com>
5353
5354 Version 1.875b.
5355
5356 * NEWS: Document 1.875b.
5357
5358 * lib/bbitset.h: Do not include config.h; that's the includer's job.
5359 Do not include <sys/types.h>; shouldn't be needed on a C89 host.
5360 * lib/bitset.h (bitset_compatible_p): Indent as per GNU standard.
5361 Don't use 'index' in comments, as it's a builtin fn on some hosts.
5362 * lib/bitset_stats.c: Include gettext.h unconditionally, as
5363 per recent gettext manual's suggestion.
5364 * lib/ebitset.c (ebitset_resize, ebitset_unused_clear):
5365 Use prototypes, not old-style definitions.
5366 * lib/lbitset.c (lbitset_unused_clear): Likewise.
5367 * lib/vbitset.c (vbitset_resize, vbitset_ones, vbitset_zero,
5368 vbitset_empty_p, vbitset_copy1, vbitset_not, vbitset_equal_p,
5369 vbitset_subset_p, vbitset_disjoint_p, vbitset_and, vbitset_and_cmp,
5370 vbitset_andn, vbitset_andn_cmp, vbitset_or, vbitset_or_cmp,
5371 vbitset_xor, vbitset_xor_cmp, vbitset_and_or, vbitset_and_or_cmp,
5372 vbitset_andn_or, vbitset_andn_or_cmp, vbitset_or_and,
5373 vbitset_or_and_cmp, vbitset_copy): Likewise.
5374
5375 * lib/libiberty.h: Do not include config.h; that's the includer's job.
5376 Do not include <stdlib.h>.
5377 (PARAMS): Define unconditionally for C89.
5378 (ATTRIBUTE_NORETURN): Remove.
5379 (ATTRIBUTE_UNUSED): Define unconditionally.
5380
5381 Upgrade to 2003-06-08 libbitset, submitted by Michael Hayes in:
161a71f3 5382 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00005.html>
8dd76bee
PE
5383 * lib/Makefile.am (bitsets_sources): Add vbitset.c, vbitset.h.
5384 * lib/vbitset.c, lib/vbitset.h: New files.
5385 * lib/abitset.c, lib/bbitset.h, lib/bitset.c, lib/bitset.h,
5386 lib/bitset_stats.c, lib/ebitset.c, lib/lbitset.c: Import
5387 from libbitset.
5388
5389 * doc/bison.texinfo (How Can I Reset the Parser): Renamed from
5390 `How Can I Reset @code{yyparse}', since texinfo does not allow
5391 arbitrary @ in node names.
5392
5393 * m4/Makefile.am (EXTRA_DIST): Add the following files, which
5394 shouldn't be needed according to the gettext 0.12.1 documentation
5395 but which seem to be needed anyway: codeset.m4 glibc21.m4
f8e8262e 5396 intdiv0.m4 inttypes-pri.m4 inttypes.m4 inttypes_h.m4 isc-posix.m4
8dd76bee 5397 lcmessage.m4 nls.m4 po.m4 stdint_h.m4 uintmax_t.m4 ulonglong.m4.
f8e8262e 5398 * po/Makefile.in.in: Upgrade to gettext 0.12.1 version.
cd05d13c 5399
8dd76bee
PE
5400 * lib/.cvsignore: Add stdbool.h.
5401 * m4/.cvsignore: Add nls.m4, po.m4.
5402
5403 Upgrade to CVS gnulib.
5404 * stdbool_.h: File renamed from stdbool.h.in.
5405 * configure.ac (AM_STDBOOL_H): Invoke this instead of
5406 AC_HEADER_STDBOOL.
5407 (AM_GNU_GETTEXT): Put brackets around args, as latest manual suggests.
5408 (AM_GNU_GETTEXT_VERSION): Update to 0.12.1.
5409 * lib/Makefile.am (EXTRA_DIST): Add stdbool_.h.
5410 (MOSTLYCLEANFILES): New var.
5411 ($(libbison_a_OBJECTS)): Depend on $(STDBOOL_H).
5412 (stdbool.h): New rule.
5413 * lib/dirname.c, lib/dirname.h, lib/hash.c, lib/hash.h,
5414 lib/malloc.c, lib/obstack.h, lib/quote.c, lib/realloc.c,
5415 lib/strcasecmp.c, lib/xalloc.h, m4/alloca.m4, m4/onceonly.m4,
5416 m4/quote.m4: Upgrade to today's gnulib.
5417
5418 * tests/calc.at (AT_CHECK_CALC): New option EXPECTED-TO-FAIL.
5419 (AT_CHECK_CALC_LALR1_CC): Use it, since the C++ LALR parser fails
5420 the tests right now.
5421 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Ensure yylex and
5422 yyerror are declared before use; C99 requires this.
5423
25005f6a
PH
54242003-06-09 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
5425
5426 * data/glr.c (YYERROR): Update definition to reset yyerrState to 0
5427 first.
5428 (yyrecoverSyntaxError): Correct the logic for setting and testing
5429 yyerrState.
5430 Correct comment on handling EOF.
5431 Allow states with only a default reduction, rather than failing
8dd76bee 5432 (I can't quite reconstruct why these were not allowed before).
25005f6a 5433
137437c6 5434 Fixes to avoid problem that $-N rules in GLR parsers can cause
25005f6a 5435 buffer overruns, corrupting state.
8dd76bee
PE
5436
5437 * src/output.c (prepare_rules): Output max_left_semantic_context
25005f6a
PH
5438 definition.
5439 * src/reader.h (max_left_semantic_context): New variable declaration.
5440 * src/scan-gram.l (max_left_semantic_context): Define.
5441 (handle_action_dollar): Update max_left_semantic_context.
5442 * data/glr.c (YYMAXLEFT): New definition.
5443 (yydoAction): Increase size of yyrhsVals by YYMAXLEFT.
5444 (yyresolveAction): Ditto.
5445
5446 Fixes to problems with location handling in GLR parsers reported by
5447 Frank Heckenbach (2003/06/05).
5448
5449 * data/glr.c (YYLTYPE): Make trivial if locations not used.
5450 (YYRHSLOC): Add parentheses, and define only if locations used.
5451 (YYLLOC_DEFAULT): Add parentheses, and give trivial definition if
5452 locations not used.
5453 (yyuserAction): Use YYLLOC_DEFAULT to set *yylocp.
5454 (yydoAction): Remove redundant initialization of *yyvalp and *yylocp.
8dd76bee 5455
25005f6a
PH
5456 * tests/cxx-type.at: Exercise location information; update tests
5457 to differentiate output with and without locations.
8dd76bee 5458 Remove forward declarations of yylex and yyerror---caused errors
25005f6a
PH
5459 because default YYLTYPE not yet defined.
5460 Change semantic actions to compute strings, rather than printing
5461 them directly (to test proper passing of semantics values). Change
5462 output to prefix notation and update test data and expected results.
5463 (yylex): Track locations.
5464 (stmtMerge): Return value rather than printing, and include arguments
5465 in value.
8dd76bee 5466
711f40b7
PE
54672003-06-03 Paul Eggert <eggert@twinsun.com>
5468
5469 Avoid warnings generated by GCC 2.95.4 when Bison is
5470 configured with --enable-gcc-warnings.
5471 * data/lalr1.cc (yy::]b4_parser_class_name[::parse,
5472 yy::]b4_parser_class_name[::translate_,
5473 yy::Stack::operator[] (unsigned),
5474 yy::Stack::operator[] (unsigned) const,
5475 yy::Slice::operator[] (unsigned),
5476 yy::Slice::operator[] (unsigned) const):
5477 Rename local vars to avoid warnings.
5478 * tests/glr-regression.at (Improper handling of embedded actions
5479 and $-N in GLR parsers): Remove unused local variable from yylex.
5480 * tests/regression.at (_AT_DATA_DANCER_Y): Declare yylex to take
5481 (void) as arg when not pure, since we now assume C89 when building
5482 Bison. Pacify GCC by using parameter.
5483
ac695f7d
PE
54842003-06-02 Paul Eggert <eggert@twinsun.com>
5485
5486 * data/lalr1.cc (yy::Position::lines, yy::Position::columns,
5487 yy::Location::lines, yy::Location::columns): Rename arguments
5488 to avoid shadowing; this removes a warning generated by GCC 3.3.
5489
26ec81e0
PE
54902003-06-01 Paul Eggert <eggert@twinsun.com>
5491
5492 Don't pass C-only warning optins (e.g., -Wmissing-declarations)
5493 to g++, as GCC 3.3 complains if you do it.
5494 * configure.ac (WARNING_CXXFLAGS): New subst. Set it to
5495 everything that WARNING_CFLAGS has, except omit warnings
5496 not suitable for C++.
5497 (AC_PROG_CXX): Use this instead of AC_CHECK_PROGS([CXX], [g++]).
5498 * tests/atlocal.in (CXXFLAGS): New var.
5499 * tests/local.at (AT_COMPILE_CXX): Use it instead of CFLAGS.
5500
5501 Fix a GLR parser bug I reported in February; see
161a71f3 5502 <http://lists.gnu.org/archive/html/bison-patches/2003-02/msg00008.html>.
26ec81e0
PE
5503 The problem was that GLR parsers did not conform to the C standard,
5504 because actions like { $1 = $2 + $3; } expanded to expressions
5505 that invoked YYFILL in separate subexpressions, and YYFILL assigned
5506 to a local variable. The C standard says that expressions
5507 like (var = f ()) + (var = f ()) have undefined behavior.
5508 Another problem was that GCC sometimes issues warnings that
5509 yyfill and its parameters are unused.
5510
5511 * data/glr.c (yyfillin): Renamed from the old yyfill. Mark
5512 as possibly unused.
5513 (yyfill): New function.
5514 (YYFILL): Use it.
5515 (yyuserAction): Change type of yynormal to bool, so that it matches
5516 the new yyfill signature. Mark it as possibly unused.
5517
5518
5519 Follow up on a bug I reported in February, where a Bison-generated
5520 parser can loop. Provide a test case and a fix for yacc.c. I
5521 don't have a fix for lalr1.cc or for glr.c, unfortunately.
5522 The original bug report is in:
161a71f3 5523 <http://lists.gnu.org/archive/html/bison-patches/2003-02/msg00044.html>
26ec81e0
PE
5524
5525 * data/yacc.c (YYERROR): Now just 'goto yyerrorlab', since the
5526 macro's size was becoming unwieldy.
5527 (yyerrlab): Do not discard an empty lookahead symbol, as this
5528 might destroy garbage.
5529 (yyerrorlab): New label, with the old contents of YYERROR,
5530 plus the following change: pop the stack of rhs corresponding
5531 to the production that invoked YYERROR. That is how Yacc
5532 behaves, and POSIX requires this behavior.
5533 (yyerrlab1): Use YYPOPSTACK instead of its definiens.
5534 * tests/calc.at (_AT_DATA_CALC_Y): Include unistd.h if available.
5535 Define 'alarm' to do nothing if unistd.h is not available.
5536 Add a new rule "exp: '-' error;" to test the above change to
5537 data/yacc.c. Use 'alarm' to abort any test taking longer than
5538 10 seconds, as it's probably looping.
5539 (AT_CHECK_CALC): Test recovery from error in new grammar rule.
5540 Also, the new yacc.c generates two fewer diagnostics for an
5541 existing test.
5542
d0829076
PE
55432003-05-24 Paul Eggert <eggert@twinsun.com>
5544
c6ae27df
PE
5545 * data/glr.c (YYSTACKEXPANDABLE): Do not evaluate
5546 YYSTYPE_IS_TRIVIAL or YYSTYPE_IS_TRIVIAL unless they are defined.
5547 This fixes a problem reported by John Bowman when the Compaq/HP
5548 Alpha cxx compiler happy (e.g. using cxx -D__USE_STD_IOSTREAM
5549 -ansi -Wall -gall).
5550 * data/yacc.c (union yyalloc): Likewise.
5551 (YYCOPY): Do not evaluate __GNUC__ unless it is defined.
26ec81e0 5552
d0829076
PE
5553 Switch from 'int' to 'bool' where that makes sense.
5554
5555 * lib/abitset.c (abitset_test, abitset_empty_p, abitset_equal_p,
5556 abitset_subset_p, abitset_disjoint_p, abitset_and_cmp,
5557 abitset_andn_cmp, abitset_or_cmp, abitset_xor_cmp, abitset_and_or,
5558 abitset_and_or_cmp, abitset_andn_or_cmp, abitset_or_and_cmp):
5559 Return or accept bool, not int. All callers changed.
5560 * lib/bbitset.h: (bitset_toggle_, bitset_copy_, bitset_and_or_cmp_,
5561 bitset_andn_or_cmp_, bitset_or_and_cmp_): Likewise.
5562 * lib/bitset.c (bitset_only_set_p, bitset_print, bitset_toggle_,
5563 bitset_copy_, bitset_op4_cmp, bitset_and_or_cmp_, bitset_andn_or_cmp_,
5564 bitset_or_and_cmp_): Likewise.
5565 * lib/bitset.h (bitset_test, bitset_only_set_p): Likewise.
5566 * lib/bitset_stats.c (bitset_stats_print, bitset_stats_toggle,
5567 bitset_stats_test, bitset_stats_empty_p, bitset_stats_disjoint_p,
5568 bitset_stats_equal_p, bitset_stats_subset_p, bitset_stats_and_cmp,
5569 bitset_stats_andn_cmp, bitset_stats_or_cmp, bitset_stats_xor_cmp,
5570 bitset_stats_and_or_cmp, bitset_stats_andn_or_cmp,
5571 bitset_stats_or_and_cmp): Likewise.
5572 * lib/ebitset.c (ebitset_elt_zero_p, ebitset_equal_p, ebitset_copy_cmp,
5573 ebitset_test, ebitset_empty_p, ebitset_subset_p, ebitset_disjoint_p,
5574 ebitset_op3_cmp, ebitset_and_cmp, ebitset_andn_cmp, ebitset_or_cmp,
5575 ebitset_xor_cmp): Likewise.
5576 * lib/lbitset.c (lbitset_elt_zero_p, lbitset_equal_p, lbitset_copy_cmp,
5577 lbitset_test, lbitset_empty_p, lbitset_subset_p, lbitset_disjoint_p,
5578 lbitset_op3_cmp, lbitset_and_cmp, lbitset_andn_cmp, lbitset_or_cmp,
5579 lbitset_xor_cmp): Likewise.
5580 * lib/bbitset.h: Include <stdbool.h>.
5581 (struct bitset_vtable): The following members now return bool, not
5582 int: toggle, test, empty_p, disjoint_p, equal_p, subset_p,
5583 and_cmp, andn_cmp, or_cmp, xor_cmp, and_or_cmp, andn_or_cmp,
5584 or_and_cmp).
5585 * src/conflicts.c (count_rr_conflicts): Likewise.
5586 * lib/bitset_stats.h (bitset_stats_enabled): Now bool, not int.
5587 All uses changed.
5588 * lib/ebitset.c (ebitset_obstack_init): Likewise.
5589 * lib/lbitset.c (lbitset_obstack_init): Likewise.
5590 * src/getargs.c (debug_flag, defines_flag, locations_flag,
5591 no_lines_flag, no_parser_flag, token_table_flag, yacc_flag,
5592 graph_flag): Likewise.
5593 * src/getargs.h (debug_flag, defines_flag, locations_flag,
5594 no_lines_flag, no_parser_flag, token_table_flag, yacc_flag,
5595 graph_flag): Likewise.
5596 * src/output.c (error_verbose): Likewise.
5597 * src/output.h (error_verbose): Likewise.
5598 * src/reader.c (start_flag, typed): Likewise.
5599 * src/reader.h (typed): Likewise.
5600 * src/getargs.c (LOCATIONS_OPTION): New constant.
5601 (long_options, getargs): Use it.
5602 * src/lalr.c (build_relations): Use bool, not int.
5603 * src/nullable.c (nullable_compute): Likewise.
5604 * src/print.c (print_reductions): Likewise.
5605 * src/tables.c (action_row, pack_vector): Likewise.
5606 * src/muscle_tab.h (MUSCLE_INSERT_BOOL): New macro.
5607 * src/output.c (prepare): Use it.
5608 * src/output.c (token_definitions_output,
5609 symbol_destructors_output, symbol_destructors_output): Use string,
5610 not boolean integer, to keep track of whether to output separator.
5611 * src/print_graph.c (print_core): Likewise.
5612 * src/state.c (state_rule_lookaheads_print): Likewise.
5613
5614 * config/install-sh: Sync from automake 1.7.5.
5615
6b2584b7
PE
56162003-05-14 Paul Eggert <eggert@twinsun.com>
5617
5618 * src/parse-gram.y (rules_or_grammar_declaration): Require a
5619 semicolon after a grammar declaration, in the interest of possible
5620 future changes to the Bison input language.
5621 Do not allow a stray semicolon at the start of the grammar.
5622 (rhses.1): Allow one or more semicolons after any rule, including
5623 just before "|" as required by POSIX.
5624 * tests/input.at (Torturing the Scanner): Add tests for ";|" in a
5625 grammar.
5626
caf37a36
ADL
56272003-05-14 Alexandre Duret-Lutz <adl@gnu.org>
5628
5629 %parse-param support for lalr1.cc.
5630
5631 * data/lalr1.cc (b4_parse_param_decl, b4_parse_param_cons,
5632 b4_cc_constructor_calls, b4_cc_constructor_call,
5633 b4_parse_param_vars, b4_cc_var_decls, b4_cc_var_decl): New m4
5634 definitions.
5635 (yy::b4_parser_class_name::b4_parser_class_name): Take extra
5636 parse-param arguments.
5637 (yy::b4_parser_class_name): Declare instance variables to
5638 hold parse-param arguments.
5639 * tests/calc.at: s/value/semantic_value/ because value clashes
5640 with a member of yy::b4_parser_class_name. Adjust C++ code
5641 to handle %parse-param. Enable %parse-param test in C++.
5642
3ab37077
PE
56432003-05-12 Paul Eggert <eggert@twinsun.com>
5644
5645 * doc/bison.texinfo (How Can I Reset @code{yyparse}): Reword the
5646 English a bit. Fix fclose typo. Change "const char" to "char
5647 const", and use ANSI C rather than K&R for "main". Suggest
5648 YY_FLUSH_BUFFER over yyrestart (as that is what Flex recommends)
5649 and suggest yy_switch_to_buffer.
5650
56512003-05-05 Paul Eggert <eggert@twinsun.com>
163ab321
PE
5652
5653 * lib/bitset.h (__INT_TO_PTR): Define to a value that presumes
5654 C89. This avoids a diagnostic on compilers that define __STDC__
5655 to 0, fixing a problem with Tru64 cc reported by Martin Mokrejs in
161a71f3 5656 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00041.html>.
163ab321 5657
e743727f
PE
56582003-05-03 Paul Eggert <eggert@twinsun.com>
5659
5660 * lib/bitset.h (BITSET_FOR_EACH, BITSET_FOR_EACH_REVERSE):
5661 Do not overrun array bounds.
5662 This should fix a bug reported today by Olatunji Oluwabukunmi in
161a71f3 5663 <http://lists.gnu.org/archive/html/bug-bison/2003-05/msg00004.html>.
e743727f 5664
916708d5
AD
56652003-04-29 Akim Demaille <akim@epita.fr>
5666
5667 * src/gram.h, src/gram.c (pure_parser, glr_parser): Move to...
5668 * src/getargs.c, src/getargs.h: here, as bool, not int.
5669 (nondeterministic_parser): New.
5670 * src/parse-gram.y, src/scan-gram.l: Support
5671 %nondeterministic-parser.
5672 * src/output.c (prepare): Use nondeterministic_parser instead
5673 of glr_parser where appropriate.
5674 * src/tables.c (conflict_row, action_row, save_row)
5675 (token_actions, token_actions, pack_vector): Ditto.
5676
a06ea4aa
AD
56772003-04-29 Akim Demaille <akim@epita.fr>
5678
5679 * doc/bison.texinfo (C++ Parsers, Implementing Loops): New.
5680
211074ca
AD
56812003-04-29 Akim Demaille <akim@epita.fr>
5682
5683 * tests/calc.at: Also test yacc.c and glr.c (but not lalr1.cc yet)
5684 with %pure-parser and %locations to exercise the patch from Yakov
5685 Markovitch below.
5686
6175ffe3
PE
56872003-04-28 Tim Van Holder <tim.van.holder@pandora.be>
5688
5689 * data/yacc.c: (b4_lex_param): Corrected for the case where
5690 %lex-param is provided and %pure-parser isn't.
5691
b1e95857
PE
56922003-04-27 Paul Eggert <eggert@twinsun.com>
5693
5694 Avoid gcc -Wundef warnings reported by Gerald Pfeifer in
161a71f3 5695 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00044.html>.
b1e95857
PE
5696 * data/yacc.c (YYSTACK_ALLOC): Don't evaluate YYSTACK_USE_ALLOCA
5697 if it is not defined.
5698 (YYMAXDEPTH): Don't evaluate YYMAXDEPTH if it is not defined.
5699
acda9df6
PE
57002003-04-26 Paul Eggert <eggert@twinsun.com>
5701
3470c57b
PE
5702 * data/lalr1.cc (yy::Parser::pact_ninf_, yy::Parser::table_ninf_):
5703 Declare to be of type suitable for the ninf value itself, not of
5704 type suitable for the corresponding table, since the latter might
5705 be unsigned but the ninf value might be negative. This fixes a
5706 bug reported by Alexandre Duret-Lutz in
161a71f3 5707 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00017.html>.
3470c57b 5708
acda9df6
PE
5709 * configure.ac (AC_FUNC_ERROR_AT_LINE): Remove, since gl_ERROR
5710 invokes it. We shouldn't invoke it twice because it will attempt
5711 to put error.o in the archive twice. This fixes a glitch reported
5712 by Martin Mokrejs in
161a71f3 5713 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00041.html>.
acda9df6 5714
b5250f26
PE
57152003-04-21 Paul Eggert <eggert@twinsun.com>
5716
5717 * m4/error.m4: Update from Bruno Haible's 2003-04-14 patch
5718 to gnulib.
5719
089ac0f1
PE
57202003-04-21 Yakov Markovitch <Markovitch@iso.ru>
5721
5722 * data/glr.c (yyexpandGLRStack) [!YYSTACKEXPANDABLE]:
5723 Fix obvious typo that results in uncompilable GLR parsers
5724 when both %pure-parser and %locations are used. (trivial change)
5725
5ededac6
PE
57262003-04-17 Paul Eggert <eggert@twinsun.com>
5727
1b8f2fff
PE
5728 * src/scan-gram.l: Add %option nounput, since we no longer use unput.
5729 (unexpected_eof): Renamed from unexpected_end_of_file, for brevity.
5730 Do not insert the expected token via unput, as this runs afoul
5731 of a POSIX-compatibility bug in flex 2.5.31.
5732 All uses changed to BEGIN the parent state,
5733 since we no longer insert the expected token via unput.
5734 * tests/regression.at (Invalid inputs): Remove cascaded diagnostic
5735 that is no longer emitted after the above change.
5736
5ededac6
PE
5737 * src/conflicts.c (set_conflicts): Resolve all conflicts, not just
5738 the first one. This change is from Paul Hilfinger, and it fixes
5739 regression reported by Werner Lemberg in
161a71f3 5740 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00026.html>.
5ededac6
PE
5741
5742 (resolve_sr_conflict): Don't invoke state_errs_set
5743 unless one or more tokens have been explicitly made errors.
5744 Otherwise, the above change causes Bison to abort.
5745
5746 * tests/existing.at (GNU pic Grammar): New test case, taken from
5747 Lemberg's email.
5748
b8be9132
AD
57492003-03-31 Akim Demaille <akim@epita.fr>
5750
5751 * doc/Makefile.am (AM_MAKEINFOFLAGS): Don't split the info file.
5752
d423d460
AD
57532003-03-31 Akim Demaille <akim@epita.fr>
5754
5755 * src/output.c (prepare_symbols): Avoid trailing spaces in the
5756 output.
5757
c7e441b4
AD
57582003-03-31 Akim Demaille <akim@epita.fr>
5759
5760 * doc/bison.texinfo (Strings are Destroyed): s/losses/loses/.
5761 From Paul Hilfinger.
5762
231897ad
AD
57632003-03-29 Akim Demaille <akim@epita.fr>
5764
5765 * m4/error.m4: Do not put under dynamic conditions some code which
5766 expansion is under static control.
5767
5b066063
AD
57682003-03-29 Akim Demaille <akim@epita.fr>
5769
5770 * doc/bison.texinfo (How Can I Reset @code{yyparse}): New.
5771
22a74fec
AD
57722003-03-29 Akim Demaille <akim@epita.fr>
5773
5774 * doc/bison.texinfo (Strings are Destroyed): New.
5775
0eee27e7
PE
57762003-03-13 Paul Eggert <eggert@twinsun.com>
5777
5778 * .cvsignore: Add configure.lineno.
5779 * src/.cvsignore: Add yacc.
5780 * tests/.cvsignore: Add testsuite.log.
5781 * doc/fdl.texi: Sync with latest FSF version.
5782
f61aad93
PE
57832003-03-12 Paul Eggert <eggert@twinsun.com>
5784
537636c7
PE
5785 * scan-gram.l (YY_USER_INIT): Initialize code_start, too.
5786 (<INITIAL><<EOF>>, <SC_PRE_CODE><<EOF>>): Set *loc to the scanner
5787 cursor, instead of leaving it undefined. This fixes a bug
5788 reported by Tim Van Holder in
161a71f3 5789 <http://lists.gnu.org/archive/html/bug-bison/2003-03/msg00023.html>.
537636c7
PE
5790 * tests/input.at (Torturing the Scanner): Test the scanner on
5791 an empty input file, which was Tim Van Holder's test case.
5792
5793 * m4/timevar.m4 (BISON_PREREQ_TIMEVAR): When checking whether
5794 <sys/resource.h> can be included, include sys/time.h and
5795 sys/times.h first, if available. This works around the SunOS
5796 4.1.4 porting bug reported by Bruce Becker in
161a71f3 5797 <http://lists.gnu.org/archive/html/bug-bison/2003-03/msg00018.html>.
537636c7
PE
5798
5799 * m4/subpipe.m4 (BISON_PREREQ_SUBPIPE): Don't
5800 AC_CHECK_HEADERS([sys/wait.h]), as this interferes with
5801 AC_HEADER_SYS_WAIT.
5802
f61aad93
PE
5803 Merge changes from gnulib. This was prompted because the CVS
5804 snapshot didn't build on Solaris 7 due to strnlen problems.
5805
5806 These changes need to be merged back into gnulib:
5807 * lib/hash.c: Include <stdbool.h> unconditionally.
5808 * m4/onceonly.m4 (m4_quote): New macro.
5809 (AC_CHECK_HEADERS_ONCE, AC_CHECK_FUNCS_ONCE, AC_CHECK_DECLS_ONCE):
5810 Quote AC_FOREACH variable-expansions properly.
5811 The 2003-01-03 obstack.h change also needs merging.
5812 {end of changes requiring merging}
5b066063 5813
f61aad93
PE
5814 * lib/stdbool.h.in, m4/alloca.m4, m4/dirname.m4, m4/dos.m4,
5815 m4/getopt.m4, m4/hash.m4, m4/malloc.m4, m4/memchr.m4,
5816 m4/memrchr.m4, m4/obstack.m4, m4/onceonly.m4, m4/quote.m4,
5817 m4/quotearg.m4, m4/realloc.m4, m4/stpcpy.m4, m4/strnlen.m4,
5818 m4/strtol.m4, m4/strtoul.m4, m4/unlocked-io.m4, m4/xalloc.m4:
5819 New files, imported from gnulib.
5820 * m4/Makefile.am (EXTRA_DIST): Add the new m4/*.m4 files mentioned
5821 above.
5822
5823 * lib/mbswidth.c, m4/error.m4, m4/mbrtowc.m4, m4/mbswidth.m4,
5824 m4/memcmp.m4, m4/prereq.m4, m4/stdbool.m4: Update to current
5825 gnulib sources.
5826
5827 * configure.ac (gl_DIRNAME, gl_GETOPT, gl_HASH, gl_QUOTE, gl_XALLOC):
5828 Add.
5829 (gl_ERROR): New, replacing jm_PREREQ_ERROR.
5830 (gl_FUNC_ALLOCA): New, replacing AC_FUNC_ALLOCA.
5831 (gl_FUNC_STPCPY): New, replacing AC_REPLACE_FUNCS(stpcpy).
5832 (gl_FUNC_STRNLEN): New, replacing AC_FUNC_STRNLEN.
5833 (gl_MBSWIDTH): New, replacing jm_PREREQ_MBSWIDTH.
5834 (gl_OBSTACK): New, replacing AC_FUNC_OBSTACK.
5835 (gl_QUOTEARG): New, replacing jm_PREREQ_QUOTEARG.
5836 (jm_FUNC_GLIBC_UNLOCKED_IO, gl_FUNC_STPCPY, gl_FUNC_STRTOL): New.
5837 (jm_FUNC_MALLOC): New, replacing AC_FUNC_MALLOC.
5838 (jm_FUNC_REALLOC): New, replacing AC_FUNC_REALLOC.
5839 (jm_PREREQ_ARGMATCH): Remove.
5840 (AC_REPLACE_FUNCS): Remove memchr, memrchr, stpcpy, strtol, strtoul.
5841 * lib/Makefile.am (libbison_a_SOURCES): Add argmatch.c, argmatch.h.
5842
5843 * src/system.h: Include <stdbool.h> unconditionally.
5844
5845 * lib/bbitset.h: Include <limits.h> unconditionally. We have been
5846 assuming at least C89 in the bitset code for some time now.
5847
d2ffe116
AD
58482003-03-03 Akim Demaille <akim@epita.fr>
5849
5850 * ro.po: New.
5851
052826fd
AD
58522003-03-02 Akim Demaille <akim@epita.fr>
5853
5854 * doc/bison.texinfo (Table of Symbols): Reactivate the
5855 documentation for %lex-param, and %parse-param.
5856
c4749565
AD
58572003-03-02 Akim Demaille <akim@epita.fr>
5858
5859 * data/yacc.c, data/glr.c, data/lal1.cc: Use similar code to
5860 generate verbose error messages.
5861 Use the number of tokens as an upper bound in yytname, as it
5862 cannot be a non terminal.
5863
d5286af1
AD
58642003-03-02 Akim Demaille <akim@epita.fr>
5865
5866 * tests/regression.at (_AT_DATA_DANCER_Y): Fix the expected error
5867 message.
5868
22e304a6
AD
58692003-03-02 Akim Demaille <akim@epita.fr>
5870
22e304a6
AD
5871 * tests/regression.at (_AT_DATA_DANCER_Y, AT_CHECK_DANCER): New.
5872 Use them to exercise yycheck overrun.
5873 Based on Andrew Suffield's grammar.
5874
67a25fed
AD
58752003-03-02 Akim Demaille <akim@epita.fr>
5876
5877 Create tests/local.at for Bison generic testing macros.
5878
5879 * tests/calc.at (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): Move to...
5880 * tests/local.at (AT_BISON_OPTION_PUSHDEFS, AT_BISON_OPTION_POPDEFS):
5881 This new file.
5882 * tests/calc.at (AT_CHECK_CALC): Adjust.
5883 * tests/testsuite.at (AT_DATA_GRAMMAR_PROLOGUE, AT_DATA_GRAMMAR)
5884 (AT_COMPILE, AT_COMPILE_CXX, AT_PARSER_CHECK): Move to...
5885 * tests/local.at: here.
5886 (AT_COMPILE_CXX): Tags the tests using it as c++.
5887 Ignore the test if CXX is not functional.
5888
9c2b381f
PE
58892003-03-01 Paul Eggert <eggert@twinsun.com>
5890
5891 * src/scan-gram.l (code_start): Initialize it to scanner_cursor,
5892 not loc->end, since loc->end might contain garbage and this leads
5893 to undefined behavior on some platforms.
5894 (id_loc, token_start): Use (IF_LINTed) initial values that do not
5895 depend on *loc, so that the reader doesn't give the the false
5896 impression that *loc is initialized.
5897 (<INITIAL>"%%"): Do not bother setting code_start, since its value
5898 does not survive the return.
5899
0433ba88
AD
59002003-03-01 Akim Demaille <akim@epita.fr>
5901
5902 * src/scan-gram.l (code_start): Always initialize it when entering
5903 into yylex, as SC_EPILOGUE is activated *before* the corresponding
5904 yylex invocation. An alternative would be making it static, but
5905 then it starts with the second %%'s beginning, instead of its end.
5906
b305ea69
PE
59072003-02-28 Paul Eggert <eggert@twinsun.com>
5908
5909 * lib/mbswidth.c: Include <wchar.h> before "mbswidth.h", to work
5910 around a UnixWare 7.1.1 porting bug reported by John Hughes in
161a71f3 5911 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00030.html>.
b305ea69 5912
c3d25e01
PE
59132003-02-26 Paul Eggert <eggert@twinsun.com>
5914
5915 * README: Mention compiler bug in Sun Forte Developer 6 update 2.
5916 Remove Sequent/Pyramid discussion (nobody uses them any more).
5917 Merge VMS and MS-DOS discussion; these ports may well be dead
5918 but let's keep mentioning them for now. Put <> around email
5919 addresses. Add copyright notice.
5920
c267ffbc
PE
59212003-02-24 Paul Eggert <eggert@twinsun.com>
5922
5923 * data/glr.c (yy_reduce_print): yylineno -> yylno,
5924 to avoid collision with flex use of yylineno.
5925 Problem reported by Bruce Lilly in
161a71f3 5926 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00016.html>.
c267ffbc
PE
5927 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Likewise.
5928 * data/yacc.c (yy_reduce_print): Likewise.
5929
5930 * config/depcomp: Sync with Automake 1.7.3.
5931
f939fc12
AD
59322003-02-21 Akim Demaille <akim@epita.fr>
5933
5934 * data/lalr1.cc: Use temporary variables instead of casts to
5935 change integer types.
5936 Suggested by Paul Eggert.
5937
95923bd6
AD
59382003-02-21 Akim Demaille <akim@epita.fr>
5939
5940 * doc/bison.texinfo: Use "location" consistently to refer to @n,
5941 to avoid confusions with lalr1.cc's notion of Position.
5942 Suggested by Paul Eggert.
5943
2cdc240e
AD
59442003-02-20 Akim Demaille <akim@epita.fr>
5945
5946 * data/lalr1.cc (position.hh): Make sure "columns" never pushes
5947 before initial_columns.
5948 (location.hh): Use consistent variable names when defining the
5949 operator<<.
5950 Use "last" so that we subtract from Positions, not from unsigned.
5951
5d003116
AD
59522003-02-20 Akim Demaille <akim@epita.fr>
5953
5954 * data/lalr1.cc (position.hh): New subfile, including the extended
5955 and Doxygen'ed documentation of class Position.
5956 (location.hh): Use it.
5957 Document a` la Doxygen.
ba1ecc07 5958 With the help of Benoit Perrot.
5d003116 5959
d02b25f9
AD
59602003-02-20 Akim Demaille <akim@epita.fr>
5961
5962 * tests/calc.at (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): Define
5963 AT_YACC_IF.
5964 Redefine AT_YYERROR_SEES_LOC_IF using it.
5965 (_AT_DATA_CALC_Y): Don't declare yyerror when lalr1.cc, as it is
5966 not defined.
5967 Don't use the location in yy::Parser::error_ and
5968 yy::Parser::print_ when not %locations.
5969 Activate more lalr1.cc tests.
5970
0d1c3a04
AD
59712003-02-19 Akim Demaille <akim@epita.fr>
5972
5973 * data/lalr1.cc: When displaying a line number, be sure to make it
5974 an int.
5975
60a777aa
AD
59762003-02-19 Akim Demaille <akim@epita.fr>
5977
5978 * data/lalr1.cc (b4_stack_depth_init, yy::Parser::initdepth_):
5979 Remove, useless.
5980 (YYABORT, YYACCEPT, YYERROR): New.
5981 * tests/calc.at: Renable the lalr1.cc test.
5982
0b86fc41
AD
59832003-02-19 Akim Demaille <akim@epita.fr>
5984
5985 * tests/calc.at (AT_CHECK_CALC): Check different scenarios of
5986 error recovery, mixing with/without pops and discarding of the
5987 lookahead.
5988 Exercise YYERROR.
5989 Disable the lalr1.cc tests as currently it doesn't support YYERROR.
5990
da99a5dc
PE
59912003-02-17 Paul Eggert <eggert@twinsun.com>
5992
5993 * tests/atlocal.in (LDFLAGS, LIBS): New vars.
5994 * tests/testsuite.at (AT_COMPILE): Use them.
5995 This fixes the testsuite problem reported by Robert Lentz in
161a71f3 5996 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00011.html>.
da99a5dc 5997
93b8c255
PE
59982003-02-12 Paul Eggert <eggert@twinsun.com>
5999
6000 * data/yacc.c (yyerrlab) [YYERROR_VERBOSE]:
6001 Avoid subscript error in yycheck. Bug reported by Andrew Suffield in
161a71f3 6002 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00003.html>.
93b8c255
PE
6003 * data/glr.c (yyreportSyntaxError) [YYERROR_VERBOSE]: Likewise.
6004 Check for malloc failure, for consistency with yacc.c.
6005 (yytname_size): Remove, for consistency with yacc.c.
6006
6007 The bug still remains in data/lalr1.cc, as I didn't have time
6008 to fix it there.
6009
7548fed2
AD
60102003-02-06 Akim Demaille <akim@epita.fr>
6011
6012 * configure.ac (GXX): Rename as...
6013 (CXX): this, to keep the original Autoconf semantics.
6014 Require 2.57.
6015 * data/lalr1.cc: Fix b4_copyright invocations.
6016 If YYDEBUG is not defined, don't depend upon name_ being defined.
6017 (location.hh): Include string and iostream.
6018 (Position::filename): New member.
6019 (Position::Position ()): New.
6020 (operator<< (Position)): New.
6021 (operator- (Position, int)): New.
6022 (Location::first, Location::last): Rename as...
6023 (Location::begin, Location::end): these, to mock the conventional
6024 iterator names.
6025 (operator<< (Location)): New.
6026 * tests/atlocal.in (CXX): New.
6027 * tests/testsuite.at (AT_COMPILE_CXX): New.
6028 * tests/calc.at (_AT_DATA_CALC_Y): Adjust yyerror to report the
6029 locations in a more synthetic way.
6030 (AT_CHECK_PUSHDEFS): AT_YYERROR_SEES_LOC_IF is positive if
6031 lalr1.cc is used.
6032 Adjust the C locations to match those from Emacs: first column is
6033 column 0.
6034 Change all the expected results.
6035 Conform to the GCS: simplify the locations when applicable.
6036 (LOC, VAL, YYLLOC_FORMAL, YYLLOC_ARG, USE_YYLLOC, LEX_FORMALS)
6037 (LEX_ARGS, USE_LEX_ARGS, LEX_PRE_FORMALS, LEX_PRE_ARGS): Replace
6038 these CPP macros with the m4 macros new defined by...
6039 (AT_CHECK_PUSHDEFS): this, i.e.:
6040 (AT_LALR1_CC_IF, AT_PURE_LEX_IF, AT_LOC, AT_VAL, AT_LEX_FORMALS)
d02b25f9 6041 (AT_LEX_ARGS, AT_USE_LEX_ARGS, AT_LEX_PRE_FORMALS, AT_LEX_PRE_ARGS)
7548fed2
AD
6042 New macros.
6043 (AT_CHECK_POPDEFS): Undefine them.
6044 (AT_CHECK_CALC_LALR1_CC): New.
6045 Use it for the first lalr1.cc test.
6046
43a176ef
AD
60472003-02-04 Akim Demaille <akim@epita.fr>
6048
6049 * data/lalr1.cc (YYLLOC_DEFAULT): Fix its definition: be based on
6050 Location as is defined.
6051
fc049e9c
AD
60522003-02-04 Akim Demaille <akim@epita.fr>
6053
6054 * data/lalr1.cc: If YYDEBUG is not defined, don't depend upon
6055 name_ being defined.
6056
a737b216
PE
60572003-02-03 Paul Eggert <eggert@twinsun.com>
6058
6059 * src/gram.h (start_symbol): Remove unused decl.
6060
6061 Use more-consistent naming conventions for local vars.
6062
6063 * src/derives.c (derives_compute): Change type of local var from
6064 int to rule_number.
6065 * src/gram.c (grammar_rules_partial_print): Likewise.
6066 * src/print.c (print_core): Likewise.
6067 * src/reduce.c (reduce_grammar_tables): Likewise.
6068
6069 * src/gram.c (grammar_dump): Change name of item_number *
6070 local var from r to rp.
6071 * src/nullable.c (nullable_compute): Likewise.
6072
6073 * src/gram.h (ISTOKEN, ISVAR): Use i, not s, for int var.
6074
6075 * src/gram.h (symbol_number_as_item_number): Use sym, not s,
6076 for symbol or symbol_number var.
6077 * src/reader.c (grammar_start_symbol_set): Likewise.
6078 * src/reader.h (grammar_start_symbol_set, grammar_symbol_append):
6079 Likewise.
6080 * src/state.c (transitions_to): Likewise.
6081 * src/state.h: Likewise.
6082 * src/tables.c (symbol_number_to_vector_number): Likewise.
6083
6084 * src/muscle_tab.h (MUSCLE_OBSTACK_SGROW): Use p, not s, for
6085 char * var.
6086
6087 * src/parse-gram.y (lloc_default): Use loc, not r, for YYLTYPE
6088 var.
6089
6090 * src/scan-gram.l (no_cr_read): Use bytes_read, not s, for size
6091 var.
6092
6093 * src/system.h (xstrndup, strchr, strspn, strnlen, memchr, memrchr):
6094 Use str, not s, for char * var. Use ch, not c, for character var.
6095 Use size for size var.
6096
6097 * src/uniqstr.c (uniqstr_new, uniqstr_assert): Use str, not s, for
6098 char * var.
6099 (uniqstr_print, uniqst_print_processor): Use ustr, not s, for
6100 uniqstr var.
6101 * src/uniqstr.h: Likewise.
6102
6103 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str,
6104 get_layoutalgorithm_str, get_decision_str, get_orientation_str,
6105 get_node_alignment_str, get_arrow_mode_str, get_crossing_type_str,
6106 get_view_str, get_linestyle_str, get_arrowstyle_str): Rename
6107 param to have same name as that of enum, so that we don't use
6108 "s" to stand for a non-state.
6109
68e93ad5
AD
61102003-02-02 Akim Demaille <akim@epita.fr>
6111
6112 * src/scan-skel.l: Scan more than one inert character per yylex
6113 invocation.
6114
92898986
PE
61152003-02-01 Paul Eggert <eggert@twinsun.com>
6116
6117 Version 1.875a.
6118
1d9d5d71
PE
6119 * po/LINGUAS: Add ms.
6120
0435d061
AD
61212003-01-30 Akim Demaille <akim@epita.fr>
6122
6123 * doc/Makefile.am (CLEANFILES): Add bison.fns for distcheck.
6124
6029a57f
PH
61252003-01-29 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
6126
6127 * tests/cxx-type.at: Correct apparent typo in Bison input: $$ instead
6128 of $1.
0435d061
AD
6129
6130 Changes in response to error report by S. Eken: GLR mode does not
6029a57f 6131 handle negative $ indices or $ indices in embedded rules correctly.
161a71f3 6132 See <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00076.html>.
0435d061 6133
6029a57f
PH
6134 * data/glr.c (b4_rhs_value): Change to use YYFILL macro.
6135 (b4_rhs_location): Ditto.
0435d061 6136 (yyfill): New function to copy from stack tree into array
6029a57f 6137 incrementally.
0435d061
AD
6138 (yyuserAction): Modify to allow incremental move of semantic values
6139 to rhs array when in GLR mode.
6140 Define YYFILL to use in user-defined actions to fill semantic array
6029a57f
PH
6141 as needed.
6142 Remove dummy use of yystack, as there is now a guaranteed use.
6143 (yydoAction): Modify to allow incremental move of semantic values
6144 to rhs array when in GLR mode.
6145 (yyresolveAction): Ditto.
6146 (yyglrShiftDefer): Update comment.
0435d061 6147 (yyresolveStates): Use X == NULL for pointers, not !X.
6029a57f
PH
6148 (yyglrReduce): Ditto.
6149 (yydoAction): Ditto
0435d061 6150
6029a57f
PH
6151 * tests/glr-regr1.at: Rename to ...
6152 * tests/glr-regression.at: Add new regression test for the problems
6153 described above (adapted from S. Eken).
6154 Update copyright notice.
6155 * tests/testsuite.at: Rename glr-regr1.at to glr-regression.at.
6156 * tests/Makefile.am: Ditto.
6157
6cee6297
PE
61582003-01-28 Paul Eggert <eggert@twinsun.com>
6159
6160 * data/lalr1.cc: Do not use @output_header_name@ unless
6161 b4_defines_flag is set. This fixes two bugs reported by
6162 Tim Van Holder in
161a71f3
PE
6163 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00071.html>
6164 and <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00073.html>.
6cee6297 6165
b2a836b5
PE
61662003-01-21 Paul Eggert <eggert@twinsun.com>
6167
6168 * data/yacc.c (YYERROR): Move code from yyerrlab1 to here, so that
6169 we don't need to worry about yyerrlab1 being reported as an
6170 "unused label" by non-GCC C compilers. The downside is that if
6171 locations are used then a couple of statements are duplicated each
6172 time YYERROR is invoked, but the upside is that the warnings
6173 should vanish.
6174 (yyerrlab1): Move code to YERROR.
6175 (yyerrlab2): Remove. Change uses back to yyerrlab1.
6176 This reverts some of the 2002-12-27 change.
6177
4196b931
PE
61782003-01-17 Paul Eggert <eggert@twinsun.com>
6179
6180 * src/output.c (symbol_printers_output): Fix typo that led
6181 to core dump. Problem reported by Antonio Rus in
161a71f3 6182 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00058.html>.
4196b931 6183
3ae831b4
AD
61842003-01-13 Akim Demaille <akim@epita.fr>,
6185 Quoc Peyrot <chojin@lrde.epita.fr>,
6186 Robert Anisko <anisko_r@lrde.epita.fr>
6187
6188 * data/lalr1.cc (parse::yyerrlab1): When popping the stack, stop
6189 when the stacks contain one element, as the loop would otherwise
6190 free the last state, and then use the top state (the one we just
6191 popped). This means that the initial elements will not be freed
6192 explicitly, as is the case in yacc.c; it is not a problem, as
6193 these elements have fake values.
6194
e3aa65c5
PE
61952003-01-11 Paul Eggert <eggert@twinsun.com>
6196
6197 * NEWS: %expect-violations are now just warnings, reverting
6198 to Bison 1.30 and 1.75 behavior. This fixes the GCC 3.2
6199 bootstrapping problem reported by Matthias Klose; see
161a71f3 6200 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00053.html>.
e3aa65c5
PE
6201 * src/conflicts.c (conflicts_print): Likewise.
6202 * tests/conflicts.at (%expect not enough, %expect too much,
6203 %expect with reduce conflicts): Likewise.
6204 * doc/bison.texinfo (Expect Decl): Document this. Also mention
6205 that the warning is enabled if the number of conflicts changes
6206 (not necessarily increases).
6207
6208 * src/getargs.c (version): Update copyright year.
6209
f0057011
AD
62102003-01-09 Akim Demaille <akim@epita.fr>
6211
6212 * src/Makefile.am, lib/Makefile.am: Use $(VAR) instead of @VAR@.
6213
1ee6d2a0
PE
62142003-01-08 Paul Eggert <eggert@twinsun.com>
6215
6216 * Makefile.maint (WGETFLAGS):
6217 New macro, containing "-C off" to disable proxy caches.
6218 All uses of $(WGET) changed to $(WGET) $(WGETFLAGS).
6219 (rel-check): Use $(WGET) instead of wget.
6220
d4fd77c4
PE
62212003-01-06 Paul Eggert <eggert@twinsun.com>
6222
6223 * doc/bison.texinfo (Generalized LR Parsing): Add a reference to
6224 the GLR paper of Scott, Johnstone and Hussain.
6225
464c6927
PE
62262003-01-04 Paul Eggert <eggert@twinsun.com>
6227
d600ee67
PE
6228 * configure.ac (AC_ARG_ENABLE): Add --disable-yacc.
6229 (YACC_SCRIPT, YACC_LIBRARY): New vars to AC_SUBST.
6230 * lib/Makefile.am (lib_LIBRARIES): liby.a -> @YACC_LIBRARY@.
6231 (EXTRA_LIBRARIES): New var, for liby.a.
6232 * src/Makefile.am (bin_SCRIPTS): yacc -> @YACC_SCRIPT@.
6233 (EXTRA_SCRIPTS): New var, for yacc.
6234
464c6927
PE
6235 * data/yacc.c (yyerrlab1): Omit attribute if __cplusplus is defined,
6236 since GNU C++ (as of 3.2.1) does not allow attributes on labels.
6237 Problem reported by Nelson H. F. Beebe.
6238
62392003-01-03 Paul Eggert <eggert@twinsun.com>
6240
6241 * lib/obstack.h (__INT_TO_PTR) [__STDC__]: Cast result to
6242 (void *) to avoid diagnostic with native c89 on SGI IRIX 6.5
6243 when compiling Bison 1.875's `bitset bset = obstack_alloc
6244 (bobstack, bytes);'. Problem reported by Nelson H. F. Beebe.
6245
6246 * src/scan-skel.l (QPUTS): Omit redundant `;' from macro definition.
6247 ([^@\n]): Renamed from [^@\n]+ so that the token buffer does not
6248 grow to a huge size with typical invocation.
d600ee67 6249
464c6927
PE
6250 * lib/hash.c (_Bool, bool, false, true, __bool_true_false_are_defined):
6251 Use the pattern recommended by Autoconf 2.57, except also protect
6252 against double-definition.
6253 * src/system.h: Likewise.
6254 Portability issues reported by Nelson H. F. Beebe.
d600ee67 6255
464c6927
PE
6256 * data/glr.c (yybool): Renamed from bool, to avoid collisions in C.
6257 All uses changed. Provide a definition in both C and C++.
6258 (yytrue, yyfalse): Define even if defined (__cplusplus).
6259
6260 * lib/bitset_stats.c (bitset_stats_list): Remove unused var.
6261 Reported by Nelson H. F. Beebe.
d600ee67 6262
464c6927
PE
6263 * src/scan-skel.l ("@oline@"): Output lineno+1, not lineno.
6264
0f42c7d5
PE
62652003-01-02 Paul Eggert <eggert@twinsun.com>
6266
6267 * data/yacc.c (yyerrlab1): Append `;' after attribute, to
6268 pacify the buggy "smart preprocessor" in MacOS 10.2.3.
6269 Bug reported by Nelson H. F. Beebe.
6270
dc546b0f
PE
62712003-01-01 Paul Eggert <eggert@twinsun.com>
6272
6273 * Version 1.875.
6274
2c09b6a7
PE
62752002-12-30 Paul Eggert <eggert@twinsun.com>
6276
6277 * src/scan-gram.l (<INITIAL,SC_AFTER_IDENTIFIER,SC_PRE_CODE>","):
6278 Moved here from...
6279 (<INITIAL>","): Here. This causes stray "," to be treated
6280 more uniformly.
6281
dc546b0f 6282 * src/scan-gram.l (<SC_BRACED_CODE>"}"): Output ";" before the
2c09b6a7
PE
6283 last brace in braced code when not in Yacc mode, for compatibility
6284 with Bison 1.35. This resurrects the 2001-12-15 patch to
6285 src/reader.c.
6286
6287 * src/reader.h (YYDECL): Use YYSTYPE, not its deprecated alias
6288 yystype. This follows up the 2002-12-24 YYSTYPE bug fix.
6289
535c0f63
PE
62902002-12-28 Paul Eggert <eggert@twinsun.com>
6291
6292 * src/symtab.c (symbol_make_alias): Set type of SYMVAL to be
6293 that of SYM's type. This fixes Debian bug 168069, reported by
6294 Thomas Olsson.
d600ee67 6295
963fcc17
PE
62962002-12-28 Paul Eggert <eggert@twinsun.com>
6297
6298 Version 1.75f.
6299
6300 Switch back to the Yacc style of conflict reports, undoing some
6301 of the 2002-07-30 change.
6302 * doc/bison.texinfo (Understanding): Use Yacc style for
6303 conflict reports. Also, use new way of locating rules.
6304 * src/conflicts.c (conflict_report):
6305 Renamed from conflict_report_yacc, removing the old
6306 'conflict_report'. Translate the entire conflict report at once,
6307 so that we don't assume that "," has the same interpretation in
6308 all languages.
6309 (conflicts_output): Use Yacc-style conflict report for each state,
6310 instead of our more-complicated style.
6311 (conflicts_print): Use Yacc-style conflict report, except print
6312 the input file name when not emulating Yacc.
6313 * tests/conflicts.at (Unresolved SR Conflicts, Defaulted
6314 Conflicted Reduction, %expect not enough, %expect too much,
6315 %expect with reduce conflicts): Switch to Yacc-style conflict reports.
6316 * tests/existing.at (GNU Cim Grammar): Likewise.
6317 * tests/glr-regr1.at (Badly Collapsed GLR States): Likewise.
6318
6319 * src/complain.c (warn_at, warn, complain_at, complain, fatal_at,
6320 fatal): Don't invoke fflush; it's not needed and it might even be
6321 harmful for stdout, as stdout might not be open.
6322 * src/reduce.c (reduce_print): Likewise.
6323
b1efe548
PE
63242002-12-27 Paul Eggert <eggert@twinsun.com>
6325
6326 Fix a bug where error locations were not being recorded correctly.
6327 This problem was originally reported by Paul Hilfinger in
161a71f3 6328 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00086.html>.
b1efe548
PE
6329
6330 * data/yacc.c (yyparse): New local var yylerrsp, to record the
6331 top of the location stack's error locations.
6332 (yyerrlab): Set it. When discarding a token, push its location
6333 onto yylerrsp so that we don't lose track of the error's end.
6334 (yyerrlab1): Now is only the target of YYERROR, so that we can
6335 properly record the location of the action that failed. For GCC
6336 2.93 and later, insert an __attribute__ ((__unused__)) to avoid
6337 GCC warning about yyerrlab1 being unused if YYERROR is unused.
6338 (yyerrlab2): New label, which yyerrlab now falls through to.
6339 Compute the error's location by applying YYLLOC_DEFAULT to
6340 the locations of all the symbols that went into the error.
6341 * doc/bison.texinfo (Location Default Action): Mention that
6342 YYLLOC_DEFAULT is also invoked for syntax errors.
6343 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
6344 Error locations include the locations of all the tokens that were
6345 discarded, not just the last token.
d600ee67 6346
983c5c2c
PE
63472002-12-26 Paul Eggert <eggert@twinsun.com>
6348
b1efe548
PE
6349 * src/files.c: Include quote.h.
6350 (compute_output_file_names): Warn if we detect conflicting
6351 outputs to the same file. This should catch the misunderstanding
6352 exemplified by Debian Bug 165349, reported by Bruce Stephens..
6353
6354 * src/conflicts.c (conflicts_print): If the user specifies
6355 "%expect N", report an error if there are any reduce/reduce
6356 conflicts. This is what the manual says should happen.
6357 This fixes Debian bug 130890, reported by Anthony DeRobertis.
6358 * tests/conflicts.at (%expect with reduce conflicts): New test.
6359
983c5c2c
PE
6360 Don't use m4_include on relative file names, as it doesn't work as
6361 desired if there happens to be a file with that name under ".".
d600ee67 6362
983c5c2c
PE
6363 * m4sugar/version.m4: Remove; it was included but it wasn't used.
6364 * data/Makefile.am (dist_m4sugar_DATA): Remove m4sugar/version.m4.
6365 * data/m4sugar/m4sugar.m4: Don't include m4sugar/version.m4.
6366 * data/glr.c, data/lalr1.cc, data/yacc.c: Don't include c.m4.
6367 * src/output.c (output_skeleton): Use full path names when
6368 specifying a file to include; don't rely on include path, as
6369 it's unreliable when the working file contains a file with
6370 that name.
d600ee67 6371
983c5c2c
PE
63722002-12-25 Paul Eggert <eggert@twinsun.com>
6373
6374 Remove obsolete references to bison.simple and bison.hairy.
6375 Problem mentioned by Aubin Mahe in
161a71f3 6376 <http://lists.gnu.org/archive/html/help-bison/2002-12/msg00010.html>.
983c5c2c
PE
6377 * data/glr.c: Comment fix.
6378 * doc/bison.1: Remove references. Also, mention "yacc".
6379
6380 * src/getargs.c (getargs) [MSDOS]: Don't assume optarg != NULL
6381 with -g option.
6382
6383 * src/parse-gram.y (declaration): Use enum "report_states" rather
6384 than its numeric value 1.
6385
6386 * src/scan-skel.l ("@output ".*\n): Close any old yyout before
6387 opening a new one. This fixes Debian bug 165349, reported by
6388 Bruce Stephens.
6389
23f2d9dc
PE
63902002-12-24 Paul Eggert <eggert@twinsun.com>
6391
6392 Version 1.75e.
6393
6394 * Makefile.maint (cvs-update): Don't assume that the shell
6395 supports $(...), as Solaris sh doesn't.
6396
6397 * src/parse-gram.y (lloc_default): Remove test for empty
6398 nonterminals at the end, since it didn't change the result.
6399
64002002-12-24 Paul Eggert <eggert@twinsun.com>
33167b8b
PE
6401
6402 If the user does not define YYSTYPE as a macro, Bison now declares it
6403 using typedef instead of defining it as a macro. POSIX requires this.
6404 For consistency, YYLTYPE is also declared instead of defined.
6405
6406 %union directives can now have a tag before the `{', e.g., the
6407 directive `%union foo {...}' now generates the C code
6408 `typedef union foo { ... } YYSTYPE;'; this is for Yacc compatibility.
6409 The default union tag is `YYSTYPE', for compatibility with Solaris 9
6410 Yacc. For consistency, YYLTYPE's struct tag is now `YYLTYPE'
6411 instead of `yyltype'.
6412
6413 `yystype' and `yyltype' are now obsolescent macros instead of being
6414 typedefs or tags; they are no longer documented and will be
6415 withdrawn in a future release.
6416
6417 * data/glr.c (b4_location_type): Remove.
6418 (YYSTYPE): Renamed from yystype.
6419 (YYSTYPE_IS_DECLARED): New macro, used to prevent double-typedef.
6420 (struct YYLTYPE): Renamed from struct yyltype.
6421 (YYLTYPE): Renamed from yyltype.
6422 (yyltype, yystype): New (and obsolescent) macros,
6423 for backward compatibility.
6424 * data/yacc.c: Likewise.
6425
6426 * data/yacc.c (YYSTYPE): Declare as union YYSTYPE if the user
6427 does not specify a union tag. This is for compatibility with
6428 Solaris 9 yacc.
6429
6430 * src/parse-gram.y (add_param): 2nd arg is now char * not char
6431 const *, since it is now modified by stripping surrounding { }.
6432 (current_braced_code): Remove.
6433 (PERCENT_DESTRUCTOR, PERCENT_PRINTER, PERCENT_UNION,
6434 PERCENT_LEX_PARAM, PERCENT_PARSE_PARAM): Change names to include
6435 trailing " {...}". Now of type <chars>.
6436 (grammar_declaration): Adjust to bundled tokens.
6437 (code_content): Remove; stripping is now done by add_param.
6438 (print_token_value): Print contents of bundled tokens.
6439 (token_name): New function.
6440
6441 * src/reader.h (braced_code, current_braced_code): Remove.
6442 (token_name): New decl.
6443
6444 * src/scan-gram.l (handle_dollar, handle_at): Now takes int
6445 token_type, not braced_code code_kind. All uses changed.
6446 (SC_PRE_CODE): New state, for scanning after a keyword that
6447 has (or usually has) an immediately-following braced code.
6448 (token_type): New local var, to keep track of which token type
6449 to return when scanning braced code.
6450 (<INITIAL>"%destructor", <INITIAL>"%lex-param",
dc546b0f 6451 <INITIAL>"%parse-param", <INITIAL>"%printer",
33167b8b
PE
6452 <INITIAL>"%union"): Set token type and BEGIN SC_PRE_CODE
6453 instead of returning a token type immediately.
6454 (<INITIAL>"{"): Set token type.
6455 (<SC_BRACED_CODE>"}"): Use it.
6456 (handle_action_dollar, handle_action_at): Now returns bool
6457 indicating success. Fail if ! current_rule; this prevents a core dump.
6458 (handle_symbol_code_dollar, handle_symbol_code_at):
6459 Remove; merge body into caller.
6460 (handle_dollar, handle_at): Complain in invalid contexts.
6461
6462 * NEWS, doc/bison.texinfo: Document the above.
6463 * NEWS: Fix years and program names in copyright notice.
6464
879ca4f8
PE
64652002-12-17 Paul Eggert <eggert@twinsun.com>
6466
6467 * NEWS, doc/bison.texinfo (Parser Function, Pure Calling, Error
6468 Reporting, Table of Symbols): Omit mentions of %lex-param and
6469 %parse-param from the documentation for now.
6470
1c5fe69d
PE
64712002-12-15 Paul Eggert <eggert@twinsun.com>
6472
6473 Undo most of the 2002-11-12 yychar -> yytoken patch, as it broke
6474 GCC 3.2.1 (which depends on yychar == YYEMPTY when there is no
6475 lookahead symbol, and which sets yychar in parser actions) and it
7ea9026a
PE
6476 disagreed with the Bison documentation. Bug
6477 reported by Andrew Walrond.
d600ee67 6478
1c5fe69d
PE
6479 * data/yacc.c (YYTRANSLATE): Don't check for negative argument,
6480 as the caller now does that.
6481 (yyclearin, YYBACKUP, yyparse): Use yychar, not yytoken.
6482 (YYEMPTY): Parenthesize right hand side, since others use it.
6483 (yyparse): Don't assume that our generated code is the only code
6484 that sets yychar.
6485
d1de5372
PE
64862002-12-13 Paul Eggert <eggert@twinsun.com>
6487
6488 Version 1.75d.
6489
6490 POSIX requires a "yacc" command.
6491 * src/Makefile.am (bin_SCRIPTS): New macro, for yacc.
6492 (MOSTLYCLEANFILES): Add yacc.
6493 (yacc): New rule.
1c5fe69d 6494 * doc/bison.texinfo (Invocation, Bison Options): Mention yacc
d1de5372
PE
6495 as an alias for bison y.
6496
6497 * po/LINGUAS: Add da.
d600ee67 6498
d1de5372
PE
6499 * src/getargs.c (__GNU_LIBRARY__) [lint]: Define to work around
6500 problem with latest <getopt.h>.
6501 (HACK_FOR___GNU_LIBRARY___PROTOTYPE): New macro.
6502
6503 * doc/fdl.texi: Upgrade to 1.2.
6504 * lib/alloca.c, lib/error.c, lib/getopt.c, lib/getopt.h
6505 lib/getopt1.c, lib/gettext.h, lib/memrchr.c, lib/obstack.c,
6506 lib/obstack.h, lib/strnlen.c, lib/unlocked-io.h: Sync with
6507 gnulib.
6508 * config/install-sh: Sync with autotools.
6509
6510 Fix a bad interaction with flex 2.5.23 reported by Bruce Lilly in
161a71f3 6511 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00114.html>.
d1de5372
PE
6512 * data/yacc.c (YYLTYPE, struct yyltype): Do not define unless
6513 locations are requested.
6514 (union yyalloc): Do not depend on YYLTYPE_IS_TRIVIAL unless
6515 locations are requested.
6516
d0f3fe23
PE
65172002-12-12 Paul Eggert <eggert@twinsun.com>
6518
6519 Remove unportable casts and storage allocation tricks.
6520 While we're at it, remove almost all casts, since they
6521 usually aren't needed and are a sign of trouble.
6522
6523 * configure.ac (AC_CHECK_TYPES): Check for uintptr_t.
6524
6525 * src/derives.c (derives_compute): Do not subtract NTOKENS from
6526 the pointer DSET returned by malloc; this isn't portable.
6527 Instead, always use DSET[i - NTOKENS] rather than DSET[i].
6528 Similarly for DERIVES.
6529 * src/lalr.c (set_goto_map): Likewise, for GOTO_MAP and TEMP_MAP.
6530 * src/nullable.c (nullable_compute): Likewise, for RSETS and NULLABLE.
6531 * src/reduce.c (reduce_grammar_tables): Likewise, for nontermmap
6532
6533 * src/derives.c (derives_compute): Do not bother invoking
6534 int_of_rule_number, since rule numbers are integers.
6535
6536 * src/files.c (concat2, tr, compute_base_name): Use xmalloc (N)
6537 rather than XMALLOC (char, N).
6538
6539 * src/files.c (filename_split): Rewrite to avoid cast.
6540
6541 * src/gram.h (symbol_number_as_item_number,
6542 item_number_as_symbol_number, rule_number_as_item_number,
6543 item_number_as_rule_number):
6544 Now inline functions rather than macros, to avoid casts.
6545 * src/state.h (state_number_as_int): Likewise.
6546 * src/tables.c (state_number_to_vector_number,
6547 symbol_number_to_vector_number): Likewise.
6548
6549 * src/gram.h (int_of_rule_number): Remove; no longer used.
6550
6551 * src/lalr.c (add_lookback_edge): Use malloc rather than calloc,
6552 since the resulting storage is always stored into.
6553
6554 * src/main.c (alloca) [C_ALLOCA]: Add decl here, the only place
6555 where it's needed.
6556
6557 * src/muscle_tab.c (muscle_m4_output):
6558 Now inline. Return bool, not int.
6559 * src/state.c (state_compare): Likewise.
6560 * src/symtab.c (symbol_check_defined,
6561 symbol_check_alias_consistency, symbol_pack, symbol_translation,
6562 hash_compare_symbol, hash_symbol):
6563 Likewise.
6564 * src/uniqstr.c (uniqstr_print): Likewise.
6565 * src/muscle_tab.c (muscle_m4_output_processor):
6566 New function, to avoid casts.
6567 * src/state.c (state_comparator, stage_hasher): Likewise.
6568 * src/symtab.c (symbol_check_defined_processor,
6569 symbol_check_alias_consistency_processor, symbol_pack_processor,
6570 symbol_translation_processor, hash_symbol_comparator,
6571 hash_symbol_hasher): Likewise.
6572 * src/uniqstr.c (uniqstr_print_processor): Likewise.
6573 * src/muscle_tab.c (muscles_m4_output):
6574 Use new functions instead of casting old functions unportably.
6575 * src/state.c (state_hash_new): Likewise.
6576 * src/symtab.c (symbols_new, symbols_do, symbols_check_defined,
6577 symbols_token_translations_init):
6578 Likewise.
6579 * src/uniqstr.c (uniqstrs_new, hash_initialize, uniqstrs_do): Likewise.
6580
6581 * src/output.c (GENERATE_MUSCLE_INSERT_TABLE): Use long local
6582 var instead of casting to long, to avoid casts.
6583 (prepare_states): Use MALLOC rather than alloca, so that we don't
6584 have to worry about alloca.
6585 * src/state.c (state_hash_lookup): Likewise.
6586
6587 * src/scan-gram.l (<SC_ESCAPED_CHARACTER>"'"): Use unsigned char
6588 local var instead of casting to unsigned char, to avoid casts.
6589
6590 * src/state.c (TRANSITIONS_ALLOC, ERRS_ALLOC, REDUCTIONS_ALLOC,
6591 STATE_ALLOC): Remove.
6592 (transitions_new, errs_new, reductions_new, state_new): Use malloc
6593 rather than calloc, and use offsetof to avoid allocating slightly
6594 too much storage.
6595 (state_new): Initialize all members.
6596
6597 * src/state.c (state_hash): Use unsigned accumulator, not signed.
6598
6599 * src/symtab.c (symbol_free): Remove; unused.
6600 (symbol_get): Remove cast in lhs of assignment.
6601 (symbols_do): Now static. Accept generic arguments, not
6602 hashing-related ones.
6603
6604 * src/symtab.h: (NUMBER_UNDEFINED): Remove unnecessary cast.
6605 (symbol_processor): Remove.
6606 (symbols_do): Remove decl; now static.
6607
6608 * src/system.h (alloca): Remove; decl no longer needed.
6609 (<stddef.h>): Include, for offsetof.
6610 (<inttypes.>, <stdint.h>): Include if available.
6611 (uintptr_t): New type, if system lacks it.
6612 (CALLOC, MALLOC, REALLOC): New macros.
6613 All uses of XCALLOC, XMALLOC, and XREALLOC changed to use these
6614 new macros.
6615
6616 * src/tables.c (table_size): Now int, to pacify GCC.
6617 (table_grow, table_ninf_remap): Use signed table size.
6618 (save_row): Don't bother initializing locals when not needed.
6619 (default_goto, goto_actions, pack_vector): Remove unnecessary casts.
6620 * src/uniqstr.c (hash_compare_uniqstr): Likewise.
6621
6622 * src/vcg.h: Correct misspellings.
6623
6624 * src/vcg_defaults.h (G_CMAX): Now INT_MAX.
6625
6626
6627 * src/getargs.c (getargs): Don't assume EOF == -1.
6628
26b4a969
PE
66292002-12-09 Paul Eggert <eggert@twinsun.com>
6630
6631 Change identifier spellings to avoid collisions with names
6632 that are reserved by POSIX.
6633
6634 Don't use names ending in _t, since POSIX reserves them.
6635 For consistency, remove _e and _s endings -- they're weren't
6636 needed to remove ambiguity. All uses changed.
6637 * src/uniqstr.h (uniqstr): Renamed from uniqstr_t, which in
6638 turn was just renamed from struniq_t.
6639 * src/uniqstr.c (uniqstr_processor): Renamed from struniq_processor,
6640 which in turn was just renamed from struniq_processor_t.
6641 (hash_compare_uniqstr): Renamed from hash_compare_struniq, which
6642 in turn was renamed from hash_compare_struniq_t.
6643 * src/LR0.c (struct state_list): Renamed from struct state_list_s.
6644 (state_list): Renamed from state_list_t.
6645 * src/assoc.h (assoc): Renamed from assoc_t.
6646 * src/conflicts.c (enum conflict_resolution): Renamed from
6647 enum conflict_resolution_e.
6648 * src/derives.c (struct rule_list): Renamed from struct rule_list_s.
6649 (rule_list): Renamed from rule_list_t.
6650 * src/getargs.h (enum trace): Renamed from enum trace_e.
6651 (enum report): Renamed from enum report_e.
6652 * src/gram.h (item_number): Renamed from item_number_t.
6653 (rule_number): Renamed from rule_number_t.
6654 (struct rule_s): Remove the "rule_s" part; not used.
6655 (rule): Renamed from rule_t.
6656 (rule_filter): Renamed from rule_filter_t.
6657 * src/lalr.c (struct goto_list): Renamed from struct goto_list_s.
6658 (goto_list): Renamed from goto_list_t.
6659 * src/lalr.h (goto_number): Renamed from goto_number_t.
6660 * src/location.h (location): Renamed from location_t.
6661 * src/muscle_tab.c (muscle_entry): Renamed from muscle_entry_t,
6662 and moved here from:
6663 * src/muscle_tab.h (muscle_entry_t): here.
6664 * src/nullable.c (struct rule_list): Renamed from struct rule_list_s.
6665 (rule_list): Renamed from rule_list_t.
6666 * src/print_graph.c (static_graph): Renamed from graph.
6667 * src/reader.h (braced_code): Renamed from braced_code_t.
6668 Remove brace_code_e tag.
6669 * src/relation.h (relation_node): Renamed from relation_node_t.
6670 (relation_nodes): Renamed from relation_nodes_t.
6671 (relation): Renamed from relation_t.
6672 * src/state.h (state_number): Renamed from state_number_t.
6673 (struct state): Renamed from struct state_s.
6674 (state): Renamed from state_t.
6675 (transitions): Renamed from transitions_t. Unused (and
6676 misspelled) transtion_s tag removed.
6677 (errs): Renamed from errs_t. Unused errs_s tag removed.
6678 (reductions): Renamed from reductions_t. Unused tag
6679 reductions_s removed.
6680 * src/symlist.h (symbol_list): Renamed from symbol_list_t.
6681 (struct symbol_list): Renamed from struct symbol_list_s.
6682 * src/symtab.h (symbol_number): Renamed from symbol_number_t.
6683 (struct symbol): Renamed from struct symbol_s.
6684 (symbol): Renamed from symbol_t.
6685 * src/tables.c (vector_number): Renamed from vector_number_t.
6686 (action_number): Renamed from action_t.
6687 * src/tables.h (base_number): Renamed from base_t.
6688 * src/vcg.h (enum color): Renamed from enum color_e.
6689 (enum textmode): Renamed from enum textmode_e.
6690 (enum shape): Renamed from enum shape_e.
6691 (struct colorentry): Renamed from struct colorentry_s.
6692 (struct classname): Renamed from struct classname_s.
6693 (struct infoname): Renamed from struct infoname_s.
6694 (enum layoutalgorithm): Renamed from enum layoutalgorithm_e.
6695 (enum decision): Renamed from enum decision_e.
6696 (enum orientation): Renamed from enum orientation_e.
6697 (enum alignment): Renamed from enum alignment_e.
6698 (enum arrow_mode): Renamed from enum arrow_mode_e.
6699 (enum crossing_type): Renamed from enum crossing_type_e.
6700 (enum view): Renamed from enum view_e.
6701 (struct node): Renamed from struct node_s.
6702 (node): Renamed from node_t.
6703 (enum linestyle): Renamed from enum linestyle_e.
6704 (enum arrowstyle): Renamed from enum arrowstyle_e.
6705 (struct edge): Renamed from struct edge.
6706 (edge): Renamed from edge_t.
6707 (struct graph): Renamed from struct graph_s.
6708 (graph): Renamed from graph_t.
6709 * tests/calc.at (_AT_DATA_CALC_Y, Simple LALR Calculator):
6710 Rename value_t -> value.
6711 * tests/input.at (Torturing the Scanner): Rename value_t -> value,
6712 value_t_as_yystype -> value_as_yystype.
6713
6714 Don't include <errno.h> in the mainstream code, since it
6715 reserves E[A-Z0-9]* and we want to use symbols like 'EQUALS'.
6716 * lib/get-errno.c, lib/get-errno.h: New files.
6717 * lib/Makefile.am (libbison_a_SOURCES): Add get-errno.h,
6718 get-errno.c.
6719 * src/files.c (xfopen, xfclose): Use get_errno instead of errno.
6720 * src/output.c (output_skeleton): Likewise.
6721 * src/scan-gram.l (<INITIAL>{int}): Use set_errno and get_errno
6722 instead of errno.
6723 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>\\x[0-9abcdefABCDEF]+):
6724 Likewise.
6725 (handle_action_dollar, handle_action_at): Likewise.
6726 * src/system.h: Do not include <errno.h>.
6727 (TAB_EXT): Renamed from EXT_TAB.
6728 (OUTPUT_EXT): Renamed from EXT_OUTPUT.
6729
6730 Avoid str[a-z]*, since <string.h> reserves that name space.
6731 Change all instances of "struniq" in names to "uniqstr", and
6732 likewise for "STRUNIQ" and "UNIQSTR".
6733 * src/uniqstr.c: Renamed from src/struniq.c.
6734 * src/uniqstr.h: Renamed from src/struniq.h.
6735 * src/Makefile.am (bison_SOURCES): Adjust to these renamings.
6736 * src/files.c (strsuffix): Remove; unused.
6737 (concat2): Renamed from stringappend. Now static.
6738 * src/files.h (strsuffix, stringappend): Remove; unused.
6739 * src/parse-gram.y (<chars>): Renamed from <string>.
6740 (<uniqstr>): Renamed from <struniq>.
6741 * src/scan-gram.l (obstack_for_string): Renamed from string_obstack.
6742 * src/vcg.h (struct node_s.expand): Renamed from struct node_s.stretch.
6743 (struct graph_s.expand): Renamed from struct graph_s.stretch.
6744 * src/vcg_defaults.h (G_EXPAND): Renamed from G_STRETCH.
6745 (G_LONG_STRAIGHT_PHASE): Renamed from G_STRAIGHT_PHASE.
6746 (N_EXPAND): Renamed from N_STRETCH.
6747
6748 Avoid *_MAX and *_MIN, since <limits.h> reserves that name space.
6749 * data/yacc.c (YYSTACK_GAP_MAXIMUM): Renamed from YYSTACK_GAP_MAX.
6750 * src/gram.h (ITEM_NUMBER_MAX, ITEM_NUMBER_MIN, RULE_NUMBER_MAX):
6751 Remove; unused.
6752 * src/lalr.h (GOTO_NUMBER_MAXIMUM): Renamed from GOTO_NUMBER_MAX.
6753 * src/state.h (STATE_NUMBER_MAXIMUM): Renamed from STATE_NUMBER_MAX.
6754 * src/symtab.h (SYMBOL_NUMBER_MAXIMUM): Renamed from SYMBOL_NUMBER_MAX.
6755 * src/tables.c (VECTOR_NUMBER_MAX, VECTOR_NUMBER_MIN): Remove; unused.
6756 (BASE_MAXIMUM): Renamed from BASE_MAX.
6757 (BASE_MINIMUM): Renamed from BASE_MIN.
6758 (ACTION_MAX): Remove; unused.
6759 (ACTION_NUMBER_MINIMUM): Renamed from ACTION_MIN.
6760 Unnecessary casts removed from above defines.
6761
6762
6763 Fix misspelling in names.
6764 * src/vcg.h (enum_alignment_e): Renamed from enum_alignement_e.
6765 * src/vcg_defaults.h (G_NODE_ALIGNMENT): Renamed from
6766 G_NODE_ALIGNEMENT.
6767
6768
6769 * lib/timevar.c (timevar_report): Renamed from time_report,
6770 for consistency with other names.
6771 * lib/timevar.h (timevar_report): New decl.
6772 * src/system.h (time_report): Remove; decl is now in lib/timevar.h.
6773
6774
6775 Sort include-file uses.
6776
6777 Reorder all include files under src to be in the order "system.h".
6778 then the ../lib include files in angle brackets (alphabetized),
6779 then the . include files in double-quotes (alphabetized). Fix
6780 dependency breakages encountered in this process, as follows:
6781 * src/closure.h, src/derives.h, src/state.h: Include "gram.h".
6782 * src/complain.c: Don't include stdlib.h, string.h _LIBC stuff.
6783 * src/state.h: Include "symtab.h".
6784
996b1c7e
PE
67852002-12-08 Paul Eggert <eggert@twinsun.com>
6786
6787 * data/glr.c, data/lalr1.cc, data/yacc.c: Do not use __file__,
6788 since this causes problems when __file__ contains character
6789 sequences like "@" that are treated specially by src/scan-skel.l.
6790 Instead, just use the file's basename. This fixes the bug
6791 reported by Martin Mokrejs in
161a71f3 6792 <http://lists.gnu.org/archive/html/bug-bison/2002-12/msg00007.html>.
996b1c7e 6793
e19c4e5d
PE
67942002-12-06 Paul Eggert <eggert@twinsun.com>
6795
6796 Add support for rules that do not have trailing semicolons, as
6797 POSIX requires. Improve the quality of locations in Bison
6798 diagnostics.
26b4a969 6799
e19c4e5d
PE
6800 * src/location.c: Include <quotearg.h>.
6801 (empty_location): Now const.
6802 (location_print): New function. Follow the recommendation of the
6803 GNU Coding Standards for locations that span file boundaries.
6804 * src/location.h: Do not include <quotearg.h>; no longer needed.
6805 (boundary): New type.
6806 (location_t): Use it. This allows locations to span file boundaries.
6807 All member uses changed: file -> start.file or end.file (as needed),
6808 first_line -> start.line, first_column -> start.column,
6809 last_line -> end.line, last_column -> end.column.
6810 (equal_boundaries): New function.
6811 (LOCATION_RESET, LOCATION_STEP): Remove.
6812 (LOCATION_PRINT): Remove. All callers changed to use location_print.
6813 (empty_location): Now const.
6814 (location_print): New decl.
6815 * src/parse-gram.y (lloc_default): New function, which handles
6816 empty locations more accurately.
6817 (YYLLOC_DEFAULT): Use it.
6818 (%token COLON): Remove.
6819 (%token ID_COLON): New token.
26b4a969 6820 (rules): Use it.
e19c4e5d
PE
6821 (declarations, rules): Remove trailing semicolon.
6822 (declaration, rules_or_grammar_declaration):
6823 Allow empty (";") declaration.
6824 (symbol_def): Remove empty actions; no longer needed.
6825 (rules_or_grammar_declaration): Remove trailing semicolon.
6826 (semi_colon.opt): Remove.
6827 * src/reader.h: Include location.h.
6828 (scanner_cursor): New decl.
6829 * src/reduce.c (nonterminals_reduce): Use warn_at rather than
6830 rolling our own.
6831 * src/scan-gram.l (YY_USER_INIT): Initialize scanner_cursor instead
6832 of *loc.
6833 (STEP): Remove. No longer needed, now that adjust_location does
6834 the work. All uses removed.
6835 (scanner_cursor): New var.
6836 (adjust_location): Renamed from extend_location. It now sets
6837 *loc and adjusts the scanner cursor. All uses changed.
6838 Don't bother testing for CR.
6839 (handle_syncline): Remove location arg; now updates scanner cursor.
6840 All callers changed.
6841 (unexpected_end_of_file): Now accepts start boundary of token or
6842 comment, not location. All callers changed. Update scanner cursor,
6843 not the location.
6844 (SC_AFTER_IDENTIFIER): New state.
6845 (context_state): Renamed from c_context. All uses changed.
6846 (id_loc, code_start, token_start): New local vars.
6847 (<INITIAL,SC_AFTER_IDENTIFIER>): New initial context. Move all
6848 processing of Yacc white space and equivalents here.
6849 (<INITIAL>{id}): Save id_loc. Begin state SC_AFTER_IDENTIFIER
6850 instead of returning ID immediately, since we need to search for
6851 a subsequent colon.
6852 (<INITIAL>"'", "\""): Save token_start.
6853 (<INITIAL>"%{", "{", "%%"): Save code_start.
6854 (<SC_AFTER_IDENTIFIER>): New state, looking for a colon.
6855 (<SC_YACC_COMMENT>, <SC_COMMENT>, <SC_LINE_COMMENT>):
6856 BEGIN context_state at end, not INITIAL.
6857 (<SC_ESCAPED_STRING>"\"", <SC_ESCAPED_CHARACTER>"'",
6858 <SC_BRACED_CODE>"}", <SC_PROLOGUE>"%}", <SC_EPILOGUE><<EOF>>):
6859 Return correct token start.
6860 (<SC_BRACED_CODE,SC_PROLOGUE,SC_EPILOGUE>): Save start boundary when
6861 the start of a character, string or multiline comment is found.
6862 * tests/conflicts.at (S/R in initial, Defaulted Conflicted
6863 Reduction): Adjust reported locations to match the more-precise
6864 results now expected.
6865 * tests/input.at (Invalid $n, Invalid @n, Type Clashes): Likewise.
6866 * tests/reduce.at (Useless Rules, Reduced Automaton,
6867 Underivable Rules): Likewise.
6868 * tests/regression.at (Invalid inputs): No longer `expecting ";"
6869 or "|"' now that so many other tokens are allowed by the new grammar.
6870
6871 * src/complain.h (current_file): Remove duplicate decl;
6872 current_file is now owned by files.h.
6873 * src/complain.c, src/scan-gram.l: Include files.h.
6874
68752002-12-06 Paul Eggert <eggert@twinsun.com>
26b4a969 6876
e19c4e5d
PE
6877 * data/glr.c (yy_reduce_print): Don't assume that yyrline[yyrule]
6878 promotes to int; it might be unsigned int.
6879 * data/yacc.c (yy_reduce_print): Likewise.
6880
6881 * doc/bison.texinfo (Table of Symbols): YYERROR_VERBOSE should
6882 be #defined in the prologue, not in the Bison declarations.
6883 This fixes Debian Bug 102878, reported by Shaul Karl.
26b4a969 6884
b64755e3
PE
68852002-12-02 Paul Eggert <eggert@twinsun.com>
6886
6887 * configure.ac (AC_REPLACE_FUNCS): Add strtoul.
6888 * lib/strtoul.c: New file, from gnulib.
6889 This fixes a porting bug reported by Peter Klein in
161a71f3 6890 <http://lists.gnu.org/archive/html/bug-bison/2002-12/msg00000.html>.
b64755e3 6891
6e746484
PE
68922002-11-30 Paul Eggert <eggert@twinsun.com>
6893
b64755e3
PE
6894 * src/scan-gram.l (no_cr_read, extend_location): Move to epilogue,
6895 and put only a forward declaration in the prologue. This is for
6896 consistency with the other scanner helper functions.
6897
6ba55592
PE
6898 Type clashes now generate warnings, not errors, since it
6899 appears that POSIX may allow some grammars with type clashes.
6900 * src/reader.c (grammar_current_rule_check): Warn about
6901 type clashes instead of complaining.
6902 * tests/input.at (Type Clashes): Expect warnings, not complaints.
6903
6e746484
PE
6904 Add Yacc library, since POSIX requires it.
6905 * doc/bison.texinfo (Yacc Library): New node. Regenerate top menu.
6906 * lib/Makefile.am (lib_LIBRARIES, liby_a_SOURCES): New macros.
6907 * lib/main.c, lib/yyerror.c: New files.
6908
6909 gram_error can be static; it need not be extern.
6910 * src/reader.h (gram_error): Remove decl.
6911 * src/parse-gram.y (gram_error): Now static. Add static decl.
6912 (print_token_value): Omit parameter names from forward decl,
6913 for consistency.
6914
88510f9c
PE
69152002-11-29 Paul Eggert <eggert@twinsun.com>
6916
6e746484
PE
6917 * doc/bison.texinfo: Emphasize that yylex and yyerror must
6918 be declared before being used. E.g., one should typically
6919 declare them in the prologue. Use GNU coding style in examples.
6920 Put "const" consistently after the type it modifies. Mention
6921 that C99 supports "inline". Mention that yyerror traditionally
6922 returns "int".
6923
88510f9c
PE
6924 %parse-param and %lex-param now take just one argument, the
6925 declaration; the argument name is deduced from the declaration.
6926
6927 * doc/bison.texinfo (Parser Function, Pure Calling, Error
6928 Reporting, Table of Symbols): Document this.
6929 * src/parse-gram.y (add_param): New function.
6930 (COMMA): Remove.
6931 (declaration): Implement new rule for %parse-param and %lex-param.
6932 * src/scan-gram.l: "," now elicits a warning, rather than being
6933 a token; this is more compatible with byacc.
6934 * tests/calc.at (Simple LALR Calculator): Adopt new convention.
6935
bb92250c
PE
69362002-11-27 Paul Eggert <eggert@twinsun.com>
6937
6938 Rename identifiers to avoid real and potential collisions.
6939
6940 * data/c.m4 (b4_yysymprint_generate): yyout -> yyoutput,
6941 to avoid collision with lex macro described by Bruce Lilly in
161a71f3 6942 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00114.html>.
bb92250c
PE
6943 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise.
6944 * doc/bison.texinfo (Prologue, Tracing): yyprint -> print_token_value.
6945 * src/parse-gram.y (print_token_value): Renamed from yyprint.
6946 All uses changed.
6947 (YYPARSE_PARAM, YYLEX_PARAM, yycontrol): Remove. All uses changed.
6948 The name "yycontrol" violates the name space rules, and this stuff
6949 wasn't being used anyway.
6950 (input): Remove action; this stuff wasn't being used.
6951 (gram_error): Rename local variable yylloc -> loc.
6952 * src/reader.h (struct gram_control_s, gram_control_t): Remove.
6953 (YY_DECL): Don't use "yy" at start of local variables.
6954 All uses changed, e.g., yylloc -> loc.
6955 * src/scan-gram.l (STEP): Renamed from YY_STEP. All uses changed.
6956 (STRING_GROW): Renamed from YY_OBS_GROW. All uses changed.
6957 (STRING_FINISH): Renamed from YY_OBS_FINISH. All uses changed.
6958 (STRING_FREE): Renamed from YY_OBS_FREE. All uses changed.
6959
6960 * src/parse-gram.y (gram_error): loc is now const *.
6961 * src/reader.h (gram_error): Likewise.
6962
3af4feb2
PE
69632002-11-24 Paul Eggert <eggert@twinsun.com>
6964
6965 Version 1.75c.
6966
6967 * tests/actions.at (Actions after errors): Use an output format
6968 more similar to that of the Printers and Destructors test.
6969 Test the position of the ';' token too.
6970 (Printers and Destructors): Likewise.
6971 (Printers and Destructors: %glr-parser): Remove for now, to avoid
6972 unnecessarily alarming people when the test fails.
6973
6974 * data/yacc.c (yyerrlab1): Move this label down, so that the
6975 parser does not discard the lookahead token if the user code
6976 invokes YYERROR. This change is required for POSIX conformance.
6977
6978 * lib/error.c: Sync with gnulib.
6979
69802002-11-22 Paul Eggert <eggert@twinsun.com>
6981
6982 * lib/quotearg.c, lib/quotearg.h: Sync with gnulib.
6983 * lib/mbswidth.c, lib/mbswidth.h: Likewise.
6984 * lib/xmalloc.c: Likewise.
26b4a969 6985
58004308
PE
69862002-11-20 Paul Eggert <eggert@twinsun.com>
6987
6988 * lib/argmatch.c, lib/argmatch.h: Sync with gnulib.
6989
69902002-11-20 Paul Eggert <eggert@twinsun.com>
26b4a969 6991
58004308
PE
6992 Avoid use of <assert.h>, as the GNU Coding Standards hint that one
6993 should use `if (! x) abort ();' rather than `assert (x);', and
6994 anyway it's one less thing to worry about configuring.
6995
6996 * data/glr.c, lib/hash.c, src/system.h: Do not include <assert.h>.
6997 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise,
6998 and replace all instances of assert with abort.
6999 * tests/calc.at (_AT_DATA_CALC_Y): Likewise.
7000 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Likewise.
7001
7002 * data/glr.c (yydoAction, yyglrReduce, yysplitStack, yyresolveStates,
7003 yyresolveAction, yyprocessOneStack): Use abort rather than assert.
7004 * lib/hash.c (hash_lookup, hash_get_first, hash_get_next,
7005 hash_find_entry, hash_rehash, hash_insert): Likewise.
7006 * src/conflicts.c (resolve_sr_conflict): Likewise.
7007 * src/lalr.c (set_goto_map, map_goto): Likewise.
7008 * src/nullable.c (nullable_compute): Likewise.
7009 * src/output.c (prepare_rules, token_definitions_output): Likewise.
7010 * src/reader.c (packgram, reader): Likewise.
7011 * src/state.c (state_new, state_free, state_transitions_set,
7012 state_reduction_find): Likewise.
7013 * src/symtab.c (symbol_user_token_number_set, symbol_make_alias,
7014 symbol_pack): Likewise.
7015 * src/tables.c (conflict_row, pack_vector): Likewise.
7016 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str,
7017 get_layoutalgorithm_str, get_decision_str, get_orientation_str,
7018 get_node_alignement_str, get_arrow_mode_str, get_crossing_type_str,
7019 get_view_str, get_linestyle_str, get_arrowstyle_str): Likewise.
7020
7021 * lib/argmatch.h (ARRAY_CARDINALITY): Do not bother to #undef.
7022 (ARGMATCH_CONSTRAINT): New macro.
7023 (ARGMATCH_ASSERT): Use it.
7024
7025 * src/system.h (verify): New macro.
7026 * src/getargs.c (trace_argmatch, report_argmatch): Use verify
7027 rather than assert.
7028 * src/tables.c (tables_generate): Likewise.
7029
7030 * src/struniq.c (struniq_assert): Now returns void, and aborts
7031 if the assertion is false.
7032 (struniq_assert_p): Remove.
7033 * src/struniq.h: Likewise.
7034
76ae8198
PE
70352002-11-18 Paul Eggert <eggert@twinsun.com>
7036
7037 * data/glr.c (yygetLRActions): Replace `yyindex' with
7038 `yytable[yyindex]' to fix typo introduced in my 2002-11-09 patch.
7039 This fixes the regression with Sun ONE Studio 7 cc that I reported in
161a71f3 7040 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00077.html>.
76ae8198 7041
d3c4e709
AD
70422002-11-18 Akim Demaille <akim@epita.fr>
7043
7044 * doc/bison.texinfo (Tracing): `yyprint' shouldn't prepend a
7045 space.
7046 From Tim Van Holder.
7047
8d8a7238
PE
70482002-11-17 Paul Eggert <eggert@twinsun.com>
7049
7050 Pacify Sun ONE Studio 7 lint. Also, rename "ParseError"
7051 to "SyntaxError" for consistency with my 2002-11-15 change.
7052
7053 * data/glr.c (YYDPRINTF, YYDSYMPRINT, YYDSYMPRINTF) [!YYDEBUG]: Do
7054 not define to {}, since this breaks the common use of `YYDPRINTF
7055 ((...));' if a single statement is desired (e.g. before `else').
7056 Work around GCC warnings by surrounding corresponding calls with
7057 {} if needed.
7058 (yyhasResolvedValue): Remove unused function.
7059 (yymergeOptionSets, yyresolvStack): Use `continue;' for empty
7060 loop body.
7061 (yyreportSyntaxError): Renamed from yyreportParseError.
7062 (yyrecoverSyntaxError): Renamed from yyrecoverParseError.
7063 All uses changed.
7064 * tests/calc.at (_AT_DATA_CALC_Y): Make vars static instead of
7065 extern when possible. Remove unused initializations.
7066
b0937b22
AD
70672002-11-16 Akim Demaille <akim@epita.fr>
7068
7069 Augment the similarity between GLR and LALR traces.
7070
7071 * data/yacc.c (yy_stack_print, YY_STACK_PRINT, yy_reduce_print)
7072 (YY_REDUCE_PRINT): New.
7073 (yyparse): Use them.
7074 * data/glr.c (yy_reduce_print): Use YYFPRINTF, no need for
7075 YYDPRINT here.
7076 (yyglrReduce, yyrecoverParseError, yyparse): Don't report the
7077 state reached after the reduction/recovery, since...
7078 (yyparse, yyprocessOneStack): Report the state we are entering in.
7079
c5e3e510
AD
70802002-11-16 Akim Demaille <akim@epita.fr>
7081
7082 * src/getargs.h, src/getargs.c (trace_e, trace_args, trace_types):
7083 Add support for --trace=skeleton.
7084 * src/scan-skel.l: %option debug.
7085 Scan strings of non-@ or \n instead of character by character.
7086 (scan_skel): Handle trace_skeleton.
7087 (QPUTS): New.
7088 (@output_parser_name@, @output_header_name@): ``Restore'' their
7089 support (used to be M4 macros).
7090 * data/yacc.c: Quote larger chunks, a la glr.c.
7091 * data/lalr1.cc: Likewise.
7092 The header guards are no longer available, so use some other
7093 string than `YYLSP_NEEDED'.
7094
4c6cc1db
AD
70952002-11-16 Akim Demaille <akim@epita.fr>
7096
7097 Make the ``Printers and Destructors'' test more verbose, taking
7098 `yacc.c''s behavior as (possibly wrong) reference.
7099
7100 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Use printf
7101 instead of fprint on stdout.
7102 Set and report the last_line of the symbols.
7103 Consistently display values and locations.
7104
6d9e8019
PE
71052002-11-16 Paul Eggert <eggert@twinsun.com>
7106
7107 * data/yacc.c: Avoid over-quoting of __line__ and __file__.
7108
6e649e65
PE
71092002-11-15 Paul Eggert <eggert@twinsun.com>
7110
b25d88f6
PE
7111 * tests/actions.at (Actions after errors): New test case.
7112
6e649e65
PE
7113 * data/glr.c, data/lalr1.cc, data/yacc.cc, doc/bison.texinfo,
7114 src/conflicts.c, src/parse-gram.y, src/tables.c, src/tables.h,
7115 tests/action.at, tests/calc.at, tests/conflicts.at,
7116 tests/cxx-type.at, tests/regression.at:
7117 "parse error" -> "syntax error" for POSIX compatibility.
7118 "parsing stack overflow..." -> "parser stack overflow" so
7119 that code matches Bison documentation.
7120
0f39aab9
AD
71212002-11-15 Akim Demaille <akim@epita.fr>
7122
7123 * src/parse-gram.y (declaration): Have %parse-param and %lex-param
7124 take two BRACED_CODE, not two string_content.
7125 Free the scanner's obstack when we are done.
7126 (code_content): New.
7127 * tests/calc.at: Adjust.
7128 * doc/bison.texinfo: Adjust.
7129 Also, make sure to include the `,' for these declarations.
7130
761c1926
AD
71312002-11-15 Tim Van Holder <tim.van.holder@pandora.be>
7132
7133 * m4/prereq.m4: Removed the commented jm_PREREQ_HASH
7134 definition; avoids potential autoreconf problems.
7135
b0f98b10
AD
71362002-11-15 Akim Demaille <akim@epita.fr>
7137
7138 Always check the value returned by yyparse.
7139
7140 * tests/calc.at (_AT_DATA_CALC_Y): Have `main' exit with the value
7141 returned by yyparse.
7142 (_AT_CHECK_CALC_ERROR): Take the expected exit value as argument.
7143 Adjust calls.
7144 * tests/glr-regr1.at (glr-regr1.y): Have `main' exit with the value
7145 returned by yyparse.
7146
970785f1
PH
71472002-11-14 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
7148
7149 * data/glr.c (yyFail): Always set yyerrflag. Corrects regression
7150 on input.at test.
7151
8fcc7db1
PE
71522002-11-14 Paul Eggert <eggert@twinsun.com>
7153
7ec1b48e
PE
7154 * src/output.c (output_skeleton): Call xfopen instead of
7155 duplicating xfopen's body.
7156
cfff7583 7157 Fix bugs reported by Nelson H. F. Beebe in
161a71f3 7158 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00078.html>.
cfff7583 7159
8fcc7db1
PE
7160 * tests/headers.at (AT_TEST_CPP_GUARD_H): Don't assume that
7161 "$CC -E foo.h" is allowed, as this doesn't work with the Portland
7162 Group compiler. Instead, use "$CC -E bar.c". Include the .h
7163 file twice in the grammar, as an extra check.
7164
7165 * tests/input.at (Torturing the Scanner): Surround the
7166 backslash-newline tests with "#if 0", to make it less likely that
7167 we'll run into compiler bugs. Bring back solitary \ inside
7168 comment, but add a closing comment to work around HP C bug. Don't
e3aa65c5 7169 test backslash-newline in C character constant.
8fcc7db1 7170
4e8d992c
AD
71712002-11-14 Akim Demaille <akim@epita.fr>
7172
7173 * tests/synclines.at (AT_SYNCLINES_COMPILE): Ignore the exit
7174 status of the compiler.
f32b346d 7175 Calling `exit 1' is no longer needed.
4e8d992c
AD
7176 Reported by Nelson H. F. Beebe.
7177
9501dc6e
AD
71782002-11-14 Akim Demaille <akim@epita.fr>
7179
7180 * tests/atlocal.in (CPPFLAGS): We have config.h.
7181 * tests/testsuite.at (AT_DATA_GRAMMAR_PROLOGUE, AT_DATA_GRAMMAR):
7182 New.
7183 * tests/actions.at, tests/calc.at, tests/conflicts.at,
7184 * tests/cxx-type.at, tests/glr-regr1.at, tests/headers.at,
7185 * tests/regression.at, tests/torture.at: Use them for all the
7186 grammars that are to be compiled.
7187 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Rename as...
7188 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): this.
7189 * doc/bison.texinfo (GLR Parsers): Document `inline'.
7190
18b519c0
AD
71912002-11-14 Akim Demaille <akim@epita.fr>
7192
7193 * doc/bison.texinfo: Various formatting changes (alignments in
7194 samples, additional @group/@end group, GCS in samples.
7195 Use @deffn instead of simple @table to define the directives,
7196 macros, variables etc.
7197
9a86cdb9
PE
71982002-11-13 Paul Eggert <eggert@twinsun.com>
7199
daa33def 7200 Fix some bugs reported by Albert Chin-A-Young in
161a71f3 7201 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00066.html>.
18b519c0 7202
daa33def 7203 * tests/input.at (Torturing the Scanner): Don't invoke "cc a.c b.c
8fcc7db1 7204 -o c"; the HP C compiler chatters during compilation.
daa33def
PE
7205 Instead, invoke "cc -c a.c -o a.o; cc -c b.c -o b.o; cc a.o b.o -o c".
7206 * tests/headers.at (export YYLTYPE): Likewise.
7207
7208 * tests/input.at (Torturing the Scanner): Remove lines containing
8fcc7db1 7209 solitary backslashes, as they tickle a bug in the HP C compiler.
daa33def 7210
9a86cdb9
PE
7211 * tests/glr-regr1.at (Badly Collapsed GLR States): Avoid //
7212 comments, since they're not portable. Use GNU coding style.
7213
9c1e26bd
AD
72142002-11-13 Akim Demaille <akim@epita.fr>
7215
7216 * data/yacc.c: Leave bigger chunks of quoted text.
7217 (YYDSYMPRINTF): New.
7218 Use it to report symbol activities.
7219 * data/glr.c (YYDSYMPRINTF): New.
7220 Use it.
7221
87f721cc
PE
72222002-11-12 Paul Eggert <eggert@twinsun.com>
7223
7224 Version 1.75b.
7225
7226 * data/glr.c (yydoAction): Return YYRESULTTAG, not int.
7227 (yyglrReduce): Return yyok, not 0.
7228 This should avoid the enumerated-type warnings reported
464c6927 7229 by Nelson H. F. Beebe in
161a71f3 7230 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00057.html>.
87f721cc
PE
7231
7232 * lib/bbitset.h (BITSET_INLINE): Remove.
7233 * lib/bitset.h [! BITSET_INLINE]: Remove.
7234 (bitset_set, bitset_reset, bitset_test): Rename local vars
7235 to avoid shadowing warnings by GCC.
7236
7237 * data/glr.c (inline): Remove #define. It's the user's
7238 responsibility to #define it away, just like 'const'.
464c6927 7239 This fixes one of the bugs reported by Nelson H. F. Beebe in
161a71f3 7240 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00058.html>.
18b519c0 7241
87f721cc
PE
7242 * Makefile.maint (po-check): Scan .l and .y files instead of the
7243 .c and the .h files that they generate. This fixes the bug
7244 reported by Tim Van Holder in:
161a71f3 7245 <http://lists.gnu.org/archive/html/bison-patches/2002-11/msg00062.html>
87f721cc
PE
7246 Look for N_ as well as for _. Try to avoid matching #define for
7247 N_ and _.
7248 * po/POTFILES.in: Remove src/parse-gram.c, src/scan-gram.c,
7249 src/system.h. Add src/parse-gram.y, src/scan-gram.l.
7250 * src/scan-gram.l: Revamp regular expressions so that " and '
7251 do not confuse xgettext.
7252
7253 * src/struniq.h (struniq_new): Do not declare the return type
7254 to be 'const'; this violates the C standard.
7255 * src/struniq.c (struniq_new): Likewise.
7256
be14ade5
AD
72572002-11-12 Albert Chin-A-Young <china@thewrittenword.com>
7258
7259 * src/Makefile.am (LDADD): Link $(LIBINTL) last to avoid the
7260 duplicate definition of optind on Tru64 UNIX 4.0D with the Compaq
7261 linker.
7262
05291fbc
AD
72632002-11-12 Akim Demaille <akim@epita.fr>
7264
7265 * Makefile.maint: Sync with Autoconf:
7266 (local_updates): New.
7267
1f5fd52e
AD
72682002-11-12 Akim Demaille <akim@epita.fr>
7269
7270 * po/POTFILES.in (src/lalr.c, src/state.c): Remove
7271
283f1e64
AD
72722002-11-12 Akim Demaille <akim@epita.fr>
7273
7274 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Display the
7275 locations.
7276
886b69d1
AD
72772002-11-12 Akim Demaille <akim@epita.fr>
7278
7279 * data/c.m4 (b4_yysymprint_generate): Pass *yyvaluep to YYPRINT,
7280 not yyvalue.
7281
3df37415
AD
72822002-11-12 Akim Demaille <akim@epita.fr>
7283
7284 * tests/actions.at (AT_CHECK_PRINTER_AND_DESTRUCTOR): New.
7285 Use it to test the GLR parser.
7286
7bd6c77e
AD
72872002-11-12 Akim Demaille <akim@epita.fr>
7288
7289 * tests/regression.at (input.y): s/YYEOF/MYEOF/, as the skeleton
7290 defines it.
7291 * data/glr.c (yystos): New.
7292 (b4_yysymprint_generate, b4_yydestruct_generate): Invoke.
7293 (YYDSYMPRINT): New.
7294 (yyval): Don't define it, it is handled via M4.
7295 (yyrecoverParseError): Free verbosely the discarded symbols.
7296 * data/yacc.c (yysymprint): Remove, rather...
7297 (b4_yysymprint_generate): invoke.
7298 * data/c.m4 (b4_yysymprint_generate): New.
7299 Accept pointers as arguments, as opposed to the version from
7300 yacc.c.
7301 (b4_yydestruct_generate): Likewise.
7302 * tests/cations.at (Printers and Destructors): Use Bison directives
7303 instead of CPP macros.
7304 Don't rely on internal details.
7305
b0400cc6
AD
73062002-11-12 Akim Demaille <akim@epita.fr>
7307
7308 * data/c.m4 (b4_yydestruct_generate, b4_symbol_actions): New.
7309 * data/yacc.c: Rename yychar1 as yytoken, as in glr.c.
7310 Don't work on yychar (i.e., do set it to YYEMPTY, don't match
7311 it against YYEMPTY and so forth), work on yytoken (i.e., set
7312 it to YYEMPTY etc.).
7313 (yydestruct): Replace with a b4_yydestruct_generate invocation.
7314 (b4_symbol_actions): Remove.
7315 * data/glr.c (YYTRANSLATE): As for yacc.c, if negative, it stands
7316 for 0, end-of-input.
7317
72f889cc
AD
73182002-11-12 Akim Demaille <akim@epita.fr>
7319
7320 * doc/bison.texinfo (Destructor Decl): New.
7321
b1ae9233
AD
73222002-11-12 Akim Demaille <akim@epita.fr>
7323
7324 * src/tables.c (tables_generate): Use free for pointers that
7325 cannot be NULL, not XFREE.
7326 (pack_vector): Use assert, not fatal, for bound violations.
7327 * src/state.c (state_new): Likewise.
7328 * src/reader.c (reader): Likewise.
7329 * src/lalr.c (set_goto_map): Likewise.
72f889cc 7330 * src/location.h (LOCATION_PRINT): If first_line is 0, just issue
b1ae9233
AD
7331 the file name.
7332
7ec2d4cd
AD
73332002-11-12 Akim Demaille <akim@epita.fr>
7334
7335 * src/scan-gram.l, src/reader.h (scanner_last_string_free):
7336 Restore.
7337 * src/scan-gram.l (last_string): Is global to the file, not to
7338 yylex.
7339 * src/parse-gram.y (input): Don't append the epilogue here,
7340 (epilogue.opt): do it here, and free the scanner's obstack.
7341 * src/reader.c (epilogue_set): Rename as...
7342 (epilogue_augment): this.
7343 * data/c.m4 (b4_epilogue): Defaults to empty.
7344
573a6cd3
AD
73452002-11-12 Akim Demaille <akim@epita.fr>
7346
7347 * src/getargs.c (long_options): Remove duplicates.
7348 * src/vmsgetargs.c, src/build.com, src/bison.cld, src/vmshlp.mar:
7349 Remove.
7350 * doc/bison.rnh: Remove.
7351 * doc/bison.texinfo (VMS Invocation): Remove.
7352
95612cfa
AD
73532002-11-12 Akim Demaille <akim@epita.fr>
7354
7355 * src/struniq.h, src/struniq.c (struniq_t): Is const.
7356 (STRUNIQ_EQ, struniq_assert, struniq_assert_p): New.
7357
7358 Use struniq for symbols.
7359
7360 * src/symtab.h (symbol_t): The tag member is a struniq.
7361 (symbol_type_set): Adjust.
7362 * src/symtab.c (symbol_new): Takes a struniq.
7363 (symbol_free): Don't free the tag member.
7364 (hash_compare_symbol_t, hash_symbol_t): Rename as...
7365 (hash_compare_symbol, hash_symbol): these.
7366 Use the fact that tags as struniqs.
7367 (symbol_get): Use struniq_new.
7368 * src/symlist.h, src/symlist.c (symbol_list_n_type_name_get):
7369 Returns a strniq.
7370 * src/reader.h (merger_list, grammar_currentmerge_set): The name
7371 and type members are struniqs.
7372 * src/reader.c (get_merge_function)
7373 (grammar_current_rule_merge_set): Adjust.
7374 (TYPE, current_type): Are struniq.
7375
7376 Use struniq for file names.
7377
7378 * src/files.h, src/files.c (infile): Split into...
7379 (grammar_file, current_file): these.
7380 * src/scan-gram.c (YY_USER_INIT, handle_syncline): Adjust.
7381 * src/reduce.c (reduce_print): Likewise.
7382 * src/getargs.c (getargs): Likewise.
7383 * src/complain.h, src/complain.c: Likewise.
7384 * src/main.c (main): Call struniqs_new early enough to use it for
7385 file names.
7386 Don't free the input file name.
7387
3e6656f9
AD
73882002-11-12 Akim Demaille <akim@epita.fr>
7389
7390 * src/symtab.c (symbol_free): Remove dead deactivated code:
7391 type_name are properly removed.
7392 Don't use XFREE to free items that cannot be NULL.
7393 * src/struniq.h, src/struniq.c: New.
7394 * src/main.c (main): Initialize/free struniqs.
7395 * src/parse-gram.y (%union): Add astruniq member.
7396 (yyprint): Adjust.
7397 * src/scan-gram.l (<{tag}>): Return a struniq.
7398 Free the obstack bit that used to store it.
7399 * src/symtab.h (symbol_t): The 'type_name' member is a struniq.
7400
7672019c
PE
74012002-11-11 Paul Eggert <eggert@twinsun.com>
7402
7403 Revamp to fix many (but not all) of the C- and M4-related quoting
7404 problems. Among other things, this fixes the Bison bug reported
7405 by Jan Hubicka when processing the Bash grammar; see:
161a71f3 7406 <http://lists.gnu.org/archive/html/bison-patches/2002-11/msg00039.html>
7672019c
PE
7407
7408 Use new @ escapes consistently. Represent brackets with @{ and @}
7409 rather than @<:@ and @:>@, since this works a bit better with dumb
7410 editors like vi. Represent @ with @@, since @ is now consistently
7411 an escape. Use @oline@ and @ofile@ rather than __oline__ and
7412 __ofile__, to avoid unexpected expansions. Similarly, use @output
7413 rather than #output.
7414
7415 * data/c.m4 (b4_copyright): Omit file name from comment, since
7416 the file name could contain "*/".
7417 (b4_synclines_flag): Don't quote the 2nd argument; it should already
7418 be quoted. All uses changed.
7419
7420 * data/glr.c: Use new @ escapes consistently.
7421 (b4_input_suffix, b4_output_parser_suffix, b4_output_parser_name,
7422 b4_output_header_suffix, b4_output_header_name, b4_header_guard):
7423 Remove, since they couldn't handle arbitrary characters in file
7424 names.
7425 * data/lalr1.cc: Likewise.
7426 * data/yacc.c: Likewise.
7427
7428 * src/files.c (output_infix): Remove; all uses removed.
7429 * src/files.h: Likewise.
7430
7431 * data/glr.c: Remove use of "#ifdef b4_header_guard", since it
7432 mishandled funny characters in file names, and anyway it isn't
7433 needed any more.
7434 * data/yacc.c: Likewise.
7435 * data/lalr1.cc: Use YYSLP_NEEDED instead of b4_header_guard.
7436
7437 * data/glr.c (YYSTYPE_IS_TRIVIAL): Define when the .h file would.
7438 * data/yacc.c: Likewise.
7439
7440 * src/muscle_tab.c: Include quotearg.h, since we need to quote C
7441 strings now.
7442 (muscle_init): Quote filename as a C string.
7443 * src/muscle_tab.h (MUSCLE_GROW_STRING_PAIR): Remove; unused.
7444 (MUSCLE_OBSTACK_SGROW, MUSCLE_INSERT_C_STRING): New macros.
7445 * src/output.c (escaped_file_name_output): New function.
7446 (prepare_symbols): Quote tokens for M4.
7447 (prepare): Don't insert output_infix, output_prefix,
7448 output_parser_name, output_header_name; this is now down by scan-skel.
7449 Insert skeleton as a C string.
7450
7451 * src/output.c (user_actions_output, symbol_destructors_output,
7452 symbol_printers_output): Quote filenames for C and M4.
7453 * src/reader.c (prologue_augment, epilogue_set): Likewise.
7454
7455 * src/scan-gram.l (<SC_CHARACTER>): Don't worry about any backslash
7456 escapes other than \\ and \'; this simplifies the code.
7457 (<SC_STRING>): Likewise, for \\ and \".
7458 (<SC_COMMENT,SC_LINE_COMMENT,SC_STRING,SC_CHARACTER,SC_BRACED_CODE,
7459 SC_PROLOGUE,SC_EPILOGUE>): Escape $ and @, too.
7460 Use new escapes @{ and @} for [ and ].
7461
7462 * src/scan-skel.l (yylineno, yyoutname): Remove static vars, replacing
7463 them with auto vars.
7464 Switch to new escape scheme, where @ is the escape character uniformly.
7465 Abort if a stray escape character is found. Avoid unbounded input
7466 buffer when parsing non-escaped text.
7467
7468 * tests/input.at (Torturing the Scanner): Add tests that @oline@,
7469 __oline__, #output, $@, and @{ do not have unintended meanings.
7470
acea4f3b
PE
74712002-11-09 Paul Eggert <eggert@twinsun.com>
7472
7473 Fix the test failure due to GCC warnings described in
161a71f3 7474 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00000.html>.
acea4f3b
PE
7475 * data/glr.c (yyis_pact_ninf, yyis_table_ninf): New macros, which
7476 evaluate to 0 if it's impossible for NINF to be in the respective
7477 table.
7478 (yygetLRActions, yyrecoverParseError): Use them.
7479
7480 * src/scan-gram.l (unexpected_end_of_file): Fix bug: columns were
7481 counted in the token inserted at end of file. Now takes
7482 location_t *, not location_t, so that the location can be
7483 adjusted. All uses changed.
7484
7485 * tests/regression.at (Invalid inputs): Adjust wording in
7486 diagnostic to match the new behavior.
7487
7488 * tests/torture.at (AT_DATA_TRIANGULAR_GRAMMAR,
7489 AT_DATA_HORIZONTAL_GRAMMAR, AT_DATA_LOOKAHEADS_GRAMMAR,
7490 AT_DATA_STACK_TORTURE): Replace `assert (x);' with `if (! (x))
7491 abort ();'. This reduces the runtime of the "Many lookaheads"
7492 test from 27.6 to 2.7 minutes on a 440 MHz Ultrasparc III running
7493 GCC 3.2.
7494
20ef1ad5
PE
74952002-11-07 Paul Eggert <eggert@twinsun.com>
7496
7497 * src/parse-gram.y (CHARACTER): Remove unused token.
7498 All uses removed.
7499
7500 * src/scan-gram.l: Remove stack option. We no longer use the
7501 stack, since the stack was never deeper than 1; instead, use the
7502 new auto var c_context to record the stacked value.
7503
7504 Remove nounput option. At an unexpected end of file, we now unput
7505 the minimal input necessary to end cleanly; this simplifies the
7506 code.
7507
7508 Avoid unbounded token sizes where this is easy.
7509
7510 (unexpected_end_of_file): New function.
7511 Use it to systematize the error message on unexpected EOF.
7512 (last-string): Now auto, not static.
7513 (YY_OBS_FREE): Remove unnecessary do while (0) wrapper.
7514 (scanner_last_string_free): Remove; not used.
7515 (percent_percent_count): Move decl to just before use.
7516 (SC_ESCAPED_CHARACTER): Return ID at unexpected end of file,
7517 not the (never otherwised-used) CHARACTER.
7518
93724f13
AD
75192002-11-07 Akim Demaille <akim@epita.fr>
7520
7521 Let yyerror always receive the msg as last argument, so that
7522 yyerror can be variadic.
7523
7524 * data/yacc.c (b4_yyerror_args): New.
7525 Use it when calling yyerror.
7526 * data/glr.c (b4_yyerror_args, b4_lyyerror_args): New.
7527 Use it when calling yyerror.
7528 * doc/bison.texinfo (Error Reporting): Adjust.
7529 * tests/calc.at (_AT_DATA_CALC_Y): Adjust.
7530 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Adjust.
7531
6e40b4eb
AD
75322002-11-06 Akim Demaille <akim@epita.fr>
7533
7534 #line should have quoted strings.
7535 Ideally, this should be done by m4_quotearg.
7536
7537 * src/scan-skel.l: Include quotearg.h.
7538 Quote __ofile__.
7539 * src/output.c (symbol_printers_output)
7540 (symbol_destructors_output): Quote the file name.
7541
2dfbfc12
AD
75422002-11-06 Akim Demaille <akim@epita.fr>
7543
7544 * tests/regression.at (Invalid inputs): Adjust to the recent
7545 messages.
7546
437c2d80
AD
75472002-11-06 Akim Demaille <akim@epita.fr>
7548
7549 Restore --no-lines.
7550 Reported by Jim Kent.
7551
7552 * data/c.m4 (b4_syncline): New.
7553 * data/glr.c, data/yacc.c, data/lalr1.cc: Use it.
7554 * src/reader.c (prologue_augment, epilogue_set): Use b4_syncline.
7555 * src/output.c (user_actions_output): Likewise.
7556 (prepare): Define 'b4_synclines_flag'.
2dfbfc12 7557 * src/muscle_tab.c (muscle_init): Don't define b4_linef.
437c2d80 7558
900c5db5
AD
75592002-11-06 Akim Demaille <akim@epita.fr>
7560
7561 * src/main.c (main): Free `infile'.
7562 * src/scan-gram.l (handle_syncline): New.
7563 Recognize `#line'.
7564 * src/output.c (user_actions_output, symbol_destructors_output)
7565 (symbol_printers_output): Use the location's file name, not
7566 infile.
7567 * src/reader.c (prologue_augment, epilogue_set): Likewise.
7568
e183b123 75692002-11-05 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
51b4a04c 7570
e183b123 7571 * src/tables.c (matching_state): Don't allow states to match if
51b4a04c 7572 either has GLR conflict entries.
e183b123 7573
193eb6b7
PE
75742002-11-05 Paul Eggert <eggert@twinsun.com>
7575
e183b123
PE
7576 * src/scan-gram.l: Use more accurate diagnostics, e.g.
7577 "integer out of range" rather than "invalid value".
7578 * tests/input.at (Invalid $n, Invalid @n): Change expected wording
7579 accordingly.
7580
193eb6b7
PE
7581 Scan <% and %> digraphs in C code as POSIX 1003.1-2001 requires.
7582 Also, remove one static variable in the scanner.
7583
7584 * src/scan-gram.l (braces_level): Now auto, not static.
7585 Initialize to zero if the compiler is being picky.
7586 (INITIAL): Clear braces_level instead of incrementing it.
7587 (SC_BRACED_CODE): Treat <% and %> as { and } when inside C code,
7588 as POSIX 1003.1-2001 requires.
7589 * src/system.h (IF_LINT): New macro, taken from coreutils.
7590 * configure.ac: Define "lint" if --enable-gcc-warnings.
7591
29c01725
AD
75922002-11-05 Akim Demaille <akim@epita.fr>
7593
7594 * src/scan-gram.l: When it starts with `%', complain about the
7595 whole directive, not just that `invalid character: %'.
7596
8aeac3ca
AD
75972002-11-04 Akim Demaille <akim@epita.fr>
7598
7599 * Makefile.maint: Update from Autoconf.
7600 (update, cvs-update, po-update, do-po-update): New.
7601
793a58bb
AD
76022002-11-04 Akim Demaille <akim@epita.fr>
7603
7604 * tests/glr-regr1.at (Badly Collapsed GLR States): Prototype yylex
7605 and yyerror.
7606 Have yyerror `use' its arguments.
7607 * tests/calc.at (AT_CHECK_PUSHDEFS): AT_YYERROR_SEES_LOC_IF
7608 returns true when location & yacc & pure & parse-param.
7609 (_AT_DATA_CALC_Y): Let yyerror ``use'' its arguments.
7610
c4d720cd
AD
76112002-11-04 Akim Demaille <akim@epita.fr>
7612
7613 * src/location.h (LOCATION_PRINT): Use quotearg slot 3 to avoid
7614 clashes.
7615 * src/scan-gram.l: Use [\'] instead of ['] to pacify
7616 font-lock-mode.
7617 Use complain_at.
7618 Use quote, not quote_n since LOCATION_PRINT no longer uses the
7619 slot 0.
7620
613a0dc5
PE
76212002-11-03 Paul Eggert <eggert@twinsun.com>
7622
7623 * src/reader.c (get_merge_function, grammar_current_rule_check):
7624 Use consistent diagnostics for reporting type name clashes.
7625 Quote the types with <>, for consistency with Yacc.
7626 * tests/input.at (Type Clashes): Adjust to diagnostic changes.
7627
2a8d363a
AD
76282002-11-03 Akim Demaille <akim@epita.fr>
7629
7630 * data/c.m4 (b4_identification, b4_user_args, b4_parse_param):
7631 New.
7632 * data/yacc.m4 (b4_pure_args, b4_Pure_args): New.
7633 (b4_parse_param): Remove.
7634 Use b4_identification.
7635 Propagate b4_pure_args where needed to pass them to yyerror.
7636 * data/glr.m4 (b4_parse_param): Remove.
7637 (b4_user_formals, b4_pure_args, b4_pure_formals, b4_lpure_args)
7638 (b4_lpure_formals): New.
7639 Use b4_identification.
7640 (YY_USER_FORMALS, YY_USER_ARGS): Remove, replaced by
7641 b4_user_formals and b4_user_args.
7642 (yyexpandGLRStack, yyFail, yyaddDeferredAction, yyglrShiftDefer)
7643 (yyreportAmbiguity): When using a pure parser, also need
7644 the location, and the parse-params.
7645 Adjust callers.
7646 (yyuserAction, yyglrShift, yyreportParseError, yyrecoverParseError):
7647 When using a pure parser, also need the parse-params.
7648 Adjust callers.
7649 * tests/calc.at: Test pure (%pure-parser) and absolutely pure
7650 (%pure-parser + %parse-param) LALR and GLR parsers.
7651 (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): New, define AT_PARAM_IF,
7652 AT_LOCATION_IF, AT_PURE_IF, AT_GLR_IF, AAT_PURE_AND_LOC_IF,
7653 AT_GLR_OR_PARAM_IF, AT_YYERROR_ARG_LOC_IF, AT_YYERROR_SEES_LOC_IF.
7654 (_AT_DATA_CALC_Y): Equip for purity of yyerror.
7655 (_AT_CHECK_CALC_ERROR): Use AT_YYERROR_SEES_LOC_IF.
7656 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Equip for yyerror purity.
7657 * doc/bison.texinfo: Untabify the whole file.
7658 (Parser Function): Document %parse-param, deprecate YYPARSE_PARAM.
7659 (Pure Calling): Document %lex-param, deprecate YYLEX_PARAM.
7660 (Error Reporting): Adjust to these new directives.
7661 Document %error-verbose, deprecate YYERROR_VERBOSE.
7662
9e32add8
AD
76632002-11-03 Akim Demaille <akim@epita.fr>
7664
7665 * tests/calc.at: Change all the AT_CHECK_CALC_LALR and
7666 AT_CHECK_CALC_GLR invocations to use % directives, instead of
7667 command line options.
7668 * tests/cxx-type.at: Formatting changes.
7669
b02d90a5
PE
76702002-11-03 Paul Eggert <eggert@twinsun.com>
7671
7672 * src/scan-gram.l: Revamp to fix POSIX incompatibilities,
7673 to count columns correctly, and to check for invalid inputs.
9e32add8 7674
b02d90a5
PE
7675 Use mbsnwidth to count columns correctly. Account for tabs, too.
7676 Include mbswidth.h.
7677 (YY_USER_ACTION): Invoke extend_location rather than LOCATION_COLUMNS.
7678 (extend_location): New function.
7679 (YY_LINES): Remove.
7680
7681 Handle CRLF in C code rather than in Lex code.
7682 (YY_INPUT): New macro.
7683 (no_cr_read): New function.
7684
7685 Scan UCNs, even though we don't fully handle them yet.
7686 (convert_ucn_to_byte): New function.
7687
7688 Handle backslash-newline correctly in C code.
7689 (SC_LINE_COMMENT, SC_YACC_COMMENT): New states.
7690 (eols, blanks): Remove. YY_USER_ACTION now counts newlines etc.;
7691 all uses changed.
7692 (tag, splice): New EREs. Do not allow NUL or newline in tags.
7693 Use {splice} wherever C allows backslash-newline.
7694 YY_STEP after space, newline, vertical-tab.
7695 ("/*"): BEGIN SC_YACC_COMMENT, not yy_push_state (SC_COMMENT).
9e32add8 7696
b02d90a5
PE
7697 (letter, id): Don't assume ASCII; e.g., spell out a-z.
7698
7699 ({int}, handle_action_dollar, handle_action_at): Check for integer
7700 overflow.
9e32add8 7701
b02d90a5
PE
7702 (YY_STEP): Omit trailing semicolon, so that it's more like C.
7703
7704 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>): Allow \0 and \00
7705 as well as \000. Check for UCHAR_MAX, not 255.
7706 Allow \x with an arbitrary positive number of digits, as in C.
7707 Check for overflow here.
7708 Allow \? and UCNs, for compatibility with C.
7709
7710 (handle_symbol_code_dollar): Use quote_n slot 1 to avoid collision
7711 with quote slot used by complain_at.
7712
7713 * tests/input.at: Add tests for backslash-newline, m4 quotes
7714 in symbols, long literals, and funny escapes in strings.
7715
7716 * configure.ac (jm_PREREQ_MBSWIDTH): Add.
7717 * lib/Makefile.am (libbison_a_SOURCES): Add mbswidth.h, mbswidth.c.
7718 * lib/mbswidth.h, lib/mbswidth.c: New files, from GNU gettext.
7719 * m4/Makefile.am (EXTRA_DIST): Add mbswidth.m4.
7720 * m4/mbswidth.m4: New file, from GNU coreutils.
7721
7722 * doc/bison.texinfo (Grammar Outline): Document // comments.
7723 (Symbols): Document that trigraphs have no special meaning in Bison,
7724 nor is backslash-newline allowed.
7725 (Actions): Document that trigraphs have no special meaning.
7726
7727 * src/location.h (LOCATION_COLUMNS, LOCATION_LINES): Remove;
7728 no longer used.
7729
77302002-11-02 Paul Eggert <eggert@twinsun.com>
7731
7732 * src/reader.c: Don't include quote.h; not needed.
7733 (get_merge_function): Reword warning to be consistent with
7734 type clash diagnostic in grammar_current_rule_check.
7735
7736 * lib/quotearg.c (quotearg_buffer_restyled): Fix off-by-two
7737 bug in trigraph handling.
7738
7739 * src/output.c (prepare_symbols): When printing token names,
7740 escape "[" as "@<:@" and likewise for "]".
7741
7742 * src/system.h (errno): Remove declaration, as we are now
7743 assuming C89 or better, and C89 guarantees errno.
7744
762b212b
PE
77452002-10-30 Paul Eggert <eggert@twinsun.com>
7746
7747 * lib/bitset_stats.c (bitset_stats_read, bitset_stats_write):
7748 Check for close failures.
7749 * src/files.h (xfclose): Return void, not int, since it always
7750 returned zero.
7751 * src/files.c (xfclose): Likewise. Report I/O error if ferror
7752 indicates one.
7753 * src/output.c (output_skeleton): Use xfclose rather than fclose
7754 and ferror. xfclose now checks ferror.
7755
7756 * data/glr.c (YYLEFTMOST_STATE): Remove.
7757 (yyreportTree): Use a stack-based leftmost state. This avoids
7758 our continuing battles with bogus warnings about initializers.
7759
56100c60
AD
77602002-10-30 Akim Demaille <akim@epita.fr>
7761
7762 * src/system.h: Don't use #ifdef/#ifndef on HAVE_ values, only
7763 #if.
7764
51b4a04c
PH
77652002-10-29 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
7766
7767 * tests/glr-regr1.at: New test for reported regressions.
7768 * tests/testsuite.at: Add glr-regr1.at test.
7769 * tests/Makefile.am: Add glr-regr1.at test.
e183b123 7770
bf1ebda2
PE
77712002-10-24 Paul Eggert <eggert@twinsun.com>
7772
5c16c6b1
PE
7773 Version 1.75a.
7774
bf1ebda2
PE
7775 * tests/calc.at (_AT_DATA_CALC_Y): Remove unused strcat declaration.
7776 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Include stdlib.h, since
7777 we use malloc. Don't assume 'A' through 'Z' are contiguous.
7778 Don't assume strdup exists; POSIX says its an XSI extension.
7779 Check for buffer overflow on input.
7780
b526ee61
AD
77812002-10-24 Akim Demaille <akim@epita.fr>
7782
7783 * src/output.c (output_skeleton): Don't disable M4sugar comments
7784 too soon: it results in comments being expanded.
7785 * data/yacc.c, data/glr.c, data/lalr1.cc: Do it right before the
7786 first output.
7787
f1886bb2
AD
77882002-10-24 Akim Demaille <akim@epita.fr>
7789
7790 * data/yacc.c (m4_int_type): New.
7791 * data/c.m4 (m4_int_type): Don't use yysigned_char, but `signed
7792 char' as only yacc.c wants K&R portability.
7793 * data/glr.c (yysigned_char): Remove.
7794 * data/lalr1.cc: Rename the trailing b4_name as b4_parser_class_name.
7795 Reported by Quoc Peyrot.
7796
c5576256
PE
77972002-10-23 Paul Eggert <eggert@twinsun.com>
7798
7799 * src/main.c (main): With --trace=time, report times even if a
7800 non-fatal error occurs. Formerly, the times were reported in some
7801 such cases but not in others.
7802 * src/reader.c (reader): Just return if a complaint has been issued,
7803 instead of exiting, so that 'main' can report times.
7804
27b0ffea
AD
78052002-10-22 Akim Demaille <akim@epita.fr>
7806
7807 * src/system.h: Include sys/types.
7808 Reported by Bert Deknuydt.
7809
223a7883
PE
78102002-10-23 Paul Eggert <eggert@twinsun.com>
7811
7812 * configure.ac (AC_PROG_LEX): Use instead of AM_PROG_LEX.
7813 Suggested by Art Haas.
7814
78152002-10-22 Paul Eggert <eggert@twinsun.com>
7816
7817 * src/complain.c (exit) [! (STDC_HEADERS || _LIBC)]: Remove exit
7818 decl; not needed any more.
7819 * src/main.c (main): Use return to exit, undoing yesterday's change.
7820 The last OS that we could find where this wouldn't work is
7821 SunOS 3.5, and that's too old to worry about now.
7822
7823 * data/glr.c (struct yyltype): Define members even when not
7824 doing locations. This is more consistent with yacc.c, and it
7825 works around the following bug reports:
161a71f3
PE
7826 http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00106.html
7827 http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00111.html
27b0ffea 7828
223a7883
PE
7829 * doc/bison.texinfo: Minor spelling and typographical fixes. Use
7830 @acronym consistently. Standardize on "Yacc" instead of "YACC",
7831 "Algol" instead of "ALGOL". Give a bit more history about BNF.
7832
8b76775a
AD
78332002-10-22 Akim Demaille <akim@epita.fr>
7834
7835 * data/README: New.
7836
6db10d14
PE
78372002-10-21 Paul Eggert <eggert@twinsun.com>
7838
7839 Be consistent about 'bool'; the old code used an enum in one
7840 module and an int in another, and this violates the C standard.
7841 * m4/stdbool.m4: New file, from coreutils 4.5.3.
7842 * configure.ac (AC_HEADER_STDBOOL): Add.
7843 * m4/Makefile.am (EXTRA_DIST): Add stdbool.m4.
7844 * src/muscle_tab.c (hash_compare_muscles): (a ? FALSE : TRUE) -> (! a)
7845 * src/symtab.c (hash_compare_symbol_t): Likewise.
7846 * src/system.h (bool, false, true): Use a definition consistent
7847 with ../lib/hash.c. All uses changed.
7848
7849 * src/complain.c (warning_issued): Renamed from warn_message_count,
7850 so that we needn't worry about integer overflow (!).
7851 Now of type bool. All uses changed.
7852 (complaint_issued): Renamed from complain_message_count; likewise.
7853
7854 * src/main.c (main): Use exit to exit with failure.
27b0ffea 7855
6db10d14
PE
7856 * src/complain.c (fatal_at, fatal): Use EXIT_FAILURE and EXIT_SUCCESS
7857 rather than 1 and 0.
7858 * src/main.c (main): Likewise.
7859 * src/getargs.c (getargs): Likewise.
7860 * src/reader.c (reader): Likewise.
7861
7862 * src/getarg.c (getargs): Remove duplicate code for
7863 "Try `bison --help'".
7864
7865 * src/files.c (xfopen, xfclose): Use EXIT_FAILURE rather than 2.
7866 What was that "2" for?
7867
7868 * src/complain.h (fatal, fatal_at): Add __attribute__((__noreturn__)).
7869 * src/getargs.c (usage): Likewise.
7870
7871 * src/getargs.c (getargs): When there are too few operands, report
7872 the last one. When there are too many, report the first extra
7873 one. This is how diffutils does it.
7874
92a060fd
PE
78752002-10-20 Paul Eggert <eggert@twinsun.com>
7876
7877 Remove K&R vestiges.
7878 * configure.ac (AC_C_CONST, AM_C_PROTOTYPES): Remove.
7879 * src/complain.c (VA_START): Remove. Assume prototypes.
7880 (vfprintf) [! (HAVE_VPRINTF || defined vfprintf)]: New macro.
7881 (private_strerror, warn_at, warn, complain_at, complain, fatal_at,
7882 fatal): Assume prototypes.
7883 * src/complain.h: Assume prototypes.
7884 * src/system.h (PARAMS): Remove.
7885 Include <limits.h> unconditionally, since it's guaranteeed even
7886 for a freestanding C89 compiler.
7887 (SHRT_MIN, SHRT_MAX): Remove, since C89 guarantees them.
7888 * src/vmsgetargs.c (getargs, cli_present, cli_get_value): Prototype.
8b76775a 7889
e7cb57c0
AD
78902002-10-20 Akim Demaille <akim@epita.fr>
7891
7892 * src/muscle_tab.c (muscle_grow): Remove trailing debugging code.
7893 * data/glr.c (YY_USER_FORMALS, YY_USER_ARGS): New.
7894 (yyuserAction, yydoAction, yyglrReduce, yyresolveValue)
7895 (yyresolveStates, yyresolveAction, yyresolveStack)
7896 (yyprocessOneStack): Use them.
7897 (yy_reduce_print): New.
7898 * tests/calc.at (_AT_DATA_CALC_Y): Exercise %parse-param.
7899
0245f82d
AD
79002002-10-20 Akim Demaille <akim@epita.fr>
7901
7902 * data/c.m4 (b4_c_ansi_args): Recognize functions with no
7903 arguments and output `void'.
7904 (b4_c_function): Rename as...
7905 (b4_c_function_def): this.
7906 (b4_c_function_decl, b4_c_ansi_function_def)
7907 (b4_c_ansi_function_decl): New.
7908 Change the interpretation of the arguments: before `int, foo', now
7909 `int foo, foo'.
7910 * data/yacc.c (yyparse): Prototype and define thanks to these.
7911 Adjust b4_c_function_def uses.
7912 * data/glr.c (yyparse): Likewise, but ANSI only.
7913
39912f52
AD
79142002-10-20 Akim Demaille <akim@epita.fr>
7915
7916 * src/output.c (prepare): Move the definition of `tokens_number',
7917 `nterms_number', `undef_token_number', `user_token_number_max'
7918 to...
7919 (prepare_tokens): Here.
7920 (prepare_tokens): Rename as...
7921 (prepare_symbols): this.
7922 (prepare): Move the definition of `rules_number' to...
7923 (prepare_rules): here.
7924 (prepare): Move the definition of `last', `final_state_number',
7925 `states_number' to...
7926 (prepare_states): here.
7927 * data/yacc.c, data/lalr1.cc, data/glr.c: Normalize `>' into `<'.
7928
20c1e2ad
AD
79292002-10-20 Akim Demaille <akim@epita.fr>
7930
7931 * src/tables.h, src/tables.c, src/output.c: Comment changes.
7932
21964f43
AD
79332002-10-20 Akim Demaille <akim@epita.fr>
7934
7935 * data/yacc.c, data/yacc.c (b4_location_if, b4_pure_if): Move to...
7936 * data/c.m4: here.
7937
66d30cd4
AD
79382002-10-20 Akim Demaille <akim@epita.fr>
7939
7940 * src/output.c (prepare): Use MUSCLE_INSERT_STRING.
7941 * src/muscle_tab.c (muscle_pair_list_grow): Rename `val as
7942 `pair'.
7943 (muscle_init): Move the `b4_ltype', `b4_maxdepth', `b4_initdepth',
7944 `name' to...
7945 * data/glr.c, data/lalr1.cc, data/yacc.c (b4_location_type)
7946 (b4_stack_depth_init, b4_stack_depth_max, b4_parser_class_name):
7947 These.
7948
95f2c9fe
PE
79492002-10-19 Paul Eggert <eggert@twinsun.com>
7950
7951 Do not create a temporary file, as that involves security and
7952 cleanup headaches. Instead, use a pair of pipes.
7953 Derived from a suggestion by Florian Krohm.
7954 * lib/subpipe.c, lib/subpipe.h, m4/subpipe.m4: New files.
7955 * lib/mkstemp.c, lib/readpipe.c, lib/tempname.c, m4/mkstemp.m4: Remove.
7956 * configure.ac (UTILS_FUNC_MKSTEMP, jm_PREREQ_TEMPNAME): Remove.
7957 (BISON_PREREQ_SUBPIPE): Add.
7958 * lib/Makefile.am (libbison_a_SOURCES): Remove readpipe.c.
7959 Add subpipe.h, subpipe.c.
7960 * m4/Makefile.am (EXTRA_DIST): Remove mkstemp.m4. Add subpipe.m4.
7961 * po/POTFILES.in: Add lib/subpipe.c.
7962 * src/output.c: Include "subpipe.h".
7963 (m4_invoke): Remove decl.
7964 (scan_skel): New decl.
7965 (output_skeleton): Use pipe rather than temporary file for m4 input.
7966 Check that m4sugar.m4 is readable, to avoid deadlock.
7967 Check for pipe I/O error.
7968 * src/scan-skel.l (readpipe): Remove decl.
7969 (scan_skel): New function, to be used in place of m4_invoke.
7970 Read from stream rather than file.
66d30cd4 7971
95f2c9fe
PE
7972 * lib/timevar.c (TICKS_TO_MSEC, CLOCKS_TO_MSEC): Do not cast to
7973 float, as this generates a warning on Solaris 8 + GCC 3.2 with
7974 --enable-gcc-warnings. Instead, divide into 1.0 rather than 1;
7975 this generates a more-accurate value anyway.
7976
7977 * lib/timevar.c (timervar_accumulate): Rename locals to
7978 avoid confusion with similarly-named more-global.
7979 * src/muscle_tab.c (muscle_pair_list_grow): Likewise.
7980
7981 * src/output.c (prepare): Use xstrdup to convert char const *
7982 to char *, to avoid GCC warning.
7983
c19988b7
AD
79842002-10-19 Akim Demaille <akim@epita.fr>
7985
7986 * tests/calc.at (_AT_DATA_CALC_Y): Define VAL, LOC, LEX_FORMALS,
7987 LEX_PRE_FORMALS, LEX_ARGS, LEX_PRE_ARGS, USE_LEX_ARGS.
7988 Use them to have `calc.y' ready for %pure-parser.
7989 * data/yacc.c (YYLEX): Pass a yylex return type to
7990 b4_c_function_call.
7991
ae7453f2
AD
79922002-10-19 Akim Demaille <akim@epita.fr>
7993
7994 Prototype support of %lex-param and %parse-param.
7995
7996 * src/parse-gram.y: Add the definition of the %lex-param and
7997 %parse-param tokens, plus their rules.
7998 Drop the `_' version of %glr-parser.
7999 Add the "," token.
8000 * src/scan-gram.l (INITIAL): Scan them.
8001 * src/muscle_tab.c: Comment changes.
8002 (muscle_insert, muscle_find): Rename `pair' as `probe'.
8003 * src/muscle_tab.h (MUSCLE_INSERT_PREFIX): Remove unused.
8004 (muscle_entry_s): The `value' member is no longer const.
8005 Adjust all dependencies.
8006 * src/muscle_tab.c (muscle_init): Adjust: use
8007 MUSCLE_INSERT_STRING.
8008 Initialize the obstack earlier.
8009 * src/muscle_tab.h, src/muscle_tab.c (muscle_grow)
8010 (muscle_pair_list_grow): New.
8011 * data/c.m4 (b4_c_function_call, b4_c_args): New.
8012 * data/yacc.c (YYLEX): Use b4_c_function_call to honor %lex-param.
8013 * tests/calc.at: Use %locations, not --locations.
8014 (AT_CHECK_CALC_GLR): Use %glr-parser, not %glr_parser.
8015
0e575721
AD
80162002-10-19 Akim Demaille <akim@epita.fr>
8017
8018 * src/getargs.c (usage): Take status as argument and exit
8019 accordingly.
8020 Report the traditional `Try ... --help' message when status != 0.
8021 (usage, version): Don't take a FILE * as arg, it is pointless.
8022 (getargs): When there is an incorrect number of arguments, make it
8023 an error, and report it GNUlically thanks to `usage ()'.
8024
724ce7f5
PE
80252002-10-18 Paul Eggert <eggert@twinsun.com>
8026
3a781eb2
PE
8027 * data/glr.c (yyreportParseError): Don't assume that sprintf
8028 yields the length of the printed string, as this is not true
8029 on SunOS 4.1.4. Reported by Peter Klein.
8030
724ce7f5
PE
8031 * tests/calc.at (_AT_DATA_CALC_Y): #undef memcmp and realloc.
8032 * tests/conflicts.at (%nonassoc and eof): Likewise.
8033 Fixes SunOS 4.1.4 test failure reported by Peter Klein.
8034
473d0a75
AD
80352002-10-17 Akim Demaille <akim@epita.fr>
8036
8037 * src/getargs.h (trace_e): Add trace_scan, and trace_parse.
8038 * src/getargs.c (trace_types, trace_args): Adjust.
8039 * src/reader.c (grammar_current_rule_prec_set)
8040 (grammar_current_rule_dprec_set, grammar_current_rule_merge_set):
8041 Standardize error messages.
8042 And s/@prec/%prec/!
8043 (reader): Use trace_flag to enable scanner/parser debugging,
8044 instead of an adhoc scheme.
8045 * src/scan-gram.l: Remove trailing debugging code.
8046
e76d2469
PE
80472002-10-16 Paul Eggert <eggert@twinsun.com>
8048
93e2236a
PE
8049 * src/muscle_tab.h (MUSCLE_TAB_H_): Was misspelled as
8050 MUSCLE_TAB_H.
8051
e76d2469
PE
8052 * NEWS: Officially drop support for building Bison with K&R C,
8053 since it didn't work anyway and it's not worth worrying about.
8054 * Makefile.maint (wget_files): Remove ansi2knr.c.
8055 (ansi2knr.c-url_prefix): Remove.
8056 * lib/.cvsignore: Remove ansi2knr, ansi2knr.*.
8057 * lib/Makefile.am (AUTOMAKE_OPTIONS): Remove.
8058 * src/Makefile.am (AUTOMAKE_OPTIONS): Remove.
8059
5bd1c419
PE
80602002-10-15 Paul Eggert <eggert@twinsun.com>
8061
8062 Stop using the "enum_" trick for K&R-style function definitions;
8063 it confused me, and I was the author! Instead, assume that people
8064 who want to use K&R C compilers (when using these modules in GCC,
8065 perhaps?) will run ansi2knr.
8066
8067 * lib/bbitset.h: (enum_bitset_ops, enum_bitset_type): Remove.
8068 All uses of "enum_" changed to "enum ".
8069 * lib/ebitset.c (enum_ebitset_find_mode): Likewise.
8070 * lib/lbitset.c (enum_lbitset_find_mode): Likewise.
e76d2469 8071
5bd1c419
PE
8072 * lib/abitset.c (abitset_and, abitset_and_cmp, abitset_and_or,
8073 abitset_and_or_cmp, abitset_andn, abitset_andn_cmp,
8074 abitset_andn_or, abitset_andn_or_cmp, abitset_bytes, abitset_copy,
8075 abitset_copy1, abitset_disjoint_p, abitset_empty_p,
8076 abitset_equal_p, abitset_init, abitset_list, abitset_list_reverse,
8077 abitset_not, abitset_ones, abitset_or, abitset_or_and,
8078 abitset_or_and_cmp, abitset_or_cmp, abitset_reset, abitset_set,
8079 abitset_size, abitset_small_list, abitset_subset_p, abitset_test,
8080 abitset_unused_clear, abitset_xor, abitset_xor_cmp, abitset_zero):
8081 Use function prototypes; this removes the need for declaring
8082 static functions simply to provide their prototypes.
8083 * lib/bitset.c (bitset_alloc, bitset_and_or_, bitset_and_or_cmp_,
8084 bitset_andn_or_, bitset_andn_or_cmp_, bitset_bytes, bitset_copy_,
8085 bitset_count_, bitset_create, bitset_dump, bitset_first,
8086 bitset_free, bitset_init, bitset_last, bitset_next,
8087 bitset_obstack_alloc, bitset_obstack_free, bitset_only_set_p,
8088 bitset_op4_cmp, bitset_or_and_, bitset_or_and_cmp_, bitset_prev,
8089 bitset_print, bitset_release_memory, bitset_toggle_,
8090 bitset_type_choose, bitset_type_get, bitset_type_name_get,
8091 debug_bitset): Likewise.
8092 * lib/bitset.h (bitset_set, bitset_reset, bitset_test): Likewise.
8093 * lib/bitset_stats.c (bitset_log_histogram_print,
8094 bitset_percent_histogram_print, bitset_stats_and,
8095 bitset_stats_and_cmp, bitset_stats_and_or,
8096 bitset_stats_and_or_cmp, bitset_stats_andn, bitset_stats_andn_cmp,
8097 bitset_stats_andn_or, bitset_stats_andn_or_cmp, bitset_stats_copy,
8098 bitset_stats_count, bitset_stats_disable, bitset_stats_disjoint_p,
8099 bitset_stats_dump, bitset_stats_empty_p, bitset_stats_enable,
8100 bitset_stats_equal_p, bitset_stats_free, bitset_stats_init,
8101 bitset_stats_list, bitset_stats_list_reverse, bitset_stats_not,
8102 bitset_stats_ones, bitset_stats_or, bitset_stats_or_and,
8103 bitset_stats_or_and_cmp, bitset_stats_or_cmp, bitset_stats_print,
8104 bitset_stats_print_1, bitset_stats_read, bitset_stats_reset,
8105 bitset_stats_set, bitset_stats_size, bitset_stats_subset_p,
8106 bitset_stats_test, bitset_stats_toggle, bitset_stats_type_get,
8107 bitset_stats_write, bitset_stats_xor, bitset_stats_xor_cmp,
8108 bitset_stats_zero): Likewise.
8109 * lib/bitsetv.c (bitsetv_alloc, bitsetv_create, bitsetv_free,
8110 bitsetv_zero, bitsetv_ones, bitsetv_transitive_closure,
8111 bitsetv_dump, debug_bitsetv): Likewise.
8112 * lib/ebitset.c (ebitset_and, ebitset_and_cmp, ebitset_andn,
8113 ebitset_andn_cmp, ebitset_bytes, ebitset_copy, ebitset_copy_,
8114 ebitset_copy_cmp, ebitset_disjoint_p, ebitset_elt_add,
8115 ebitset_elt_alloc, ebitset_elt_calloc, ebitset_elt_find,
8116 ebitset_elt_free, ebitset_elt_last, ebitset_elt_remove,
8117 ebitset_elt_zero_p, ebitset_elts_grow, ebitset_empty_p,
8118 ebitset_equal_p, ebitset_free, ebitset_init, ebitset_list,
8119 ebitset_list_reverse, ebitset_not, ebitset_ones, ebitset_op3_cmp,
8120 ebitset_or, ebitset_or_cmp, ebitset_release_memory, ebitset_reset,
8121 ebitset_set, ebitset_size, ebitset_subset_p, ebitset_test,
8122 ebitset_weed, ebitset_xor, ebitset_xor_cmp, ebitset_zero):
8123 Likewise.
8124 * lib/lbitset.c (debug_lbitset, lbitset_and, lbitset_and_cmp,
8125 lbitset_andn, lbitset_andn_cmp, lbitset_bytes, lbitset_copy,
8126 lbitset_copy_cmp, lbitset_disjoint_p, lbitset_elt_alloc,
8127 lbitset_elt_calloc, lbitset_elt_find, lbitset_elt_free,
8128 lbitset_elt_link, lbitset_elt_unlink, lbitset_elt_zero_p,
8129 lbitset_empty_p, lbitset_equal_p, lbitset_free, lbitset_init,
8130 lbitset_list, lbitset_list_reverse, lbitset_not, lbitset_ones,
8131 lbitset_op3_cmp, lbitset_or, lbitset_or_cmp, lbitset_prune,
8132 lbitset_release_memory, lbitset_reset, lbitset_set, lbitset_size,
8133 lbitset_subset_p, lbitset_test, lbitset_weed, lbitset_xor,
8134 lbitset_xor_cmp, lbitset_zero): Likewise.
e76d2469 8135
ae26e1f0
AD
81362002-10-14 Akim Demaille <akim@epita.fr>
8137
8138 Version 1.75.
8139
d43baf71
AD
81402002-10-14 Akim Demaille <akim@epita.fr>
8141
8142 * tests/Makefile.am (maintainer-check-posix): New.
8143
7ebc83e3
AD
81442002-10-14 Akim Demaille <akim@epita.fr>
8145
8146 * data/glr.c [YYDEBUG] (YYLEFTMOST_STATE): Initialize the yyloc
8147 member.
8148
05846dae
AD
81492002-10-14 Akim Demaille <akim@epita.fr>
8150
8151 * src/tables.c (table_ninf_remap): base -> tab.
8152 Reported by Matt Rosing.
8153
1318e37d
PE
81542002-10-14 Paul Eggert <eggert@twinsun.com>
8155
447fbb17
PE
8156 * tests/action.at, tests/calc.at, tests/conflicts.at,
8157 tests/cxx-type.at, tests/headers.at, tests/input.at,
8158 tests/regression.at, tests/synclines.at, tests/torture.at:
8159 Say "bison -o foo.c foo.y", not "bison foo.y -o foo.c",
8160 so that the tests still work even if POSIXLY_CORRECT is set.
8161 * doc/bison.texinfo (Rpcalc Compile, Invocation): Likewise.
05846dae 8162
1318e37d
PE
8163 * data/c.m4 (b4_int_type): Use yysigned_char instead of signed char,
8164 for portability to K&R hosts. Fix typo: signed char is guaranteed
8165 only to 127, not to 128.
8166 * data/glr.c (yysigned_char): New type.
8167 * data/yacc.c (yysigned_char): Likewise.
8168 * tests/regression.at (Web2c Actions): signed char -> yysigned_char.
8169
cc0f0794
PE
81702002-10-13 Paul Eggert <eggert@twinsun.com>
8171
5038f418
PE
8172 * data/yacc.c (yyparse): Rewrite to avoid "comparison is always
8173 true due to limited range of data type" warning from GCC.
8174
cc0f0794
PE
8175 * data/c.m4 (b4_token_defines): Protect against double-inclusion
8176 by wrapping enum yytokentype's definition inside #ifndef
8177 YYTOKENTYPE. This undoes a bug I introduced on 2002-10-12.
8178
6fed0802
AD
81792002-10-13 Akim Demaille <akim@epita.fr>
8180
8181 * data/glr.c (yyglrShiftDefer, yyaddDeferredAction, yydoAction):
8182 Un yy- yyrhs to avoid the name clash with the global YYRHS.
8183
32f0598d
AD
81842002-10-13 Akim Demaille <akim@epita.fr>
8185
8186 * Makefile.maint: Update from Autoconf 2.54.
8187 * m4/strerror_r.m4 (AC_FUNC_STRERROR_R): Remove, shipped with 2.54.
8188
7ea9a33f
AD
81892002-10-13 Akim Demaille <akim@epita.fr>
8190
8191 * src/print.c (print_state): Separate the list of solved conflicts
8192 from the other items.
8193 * tests/conflicts.at (Resolved SR Conflicts): Adjust.
8194
ea99527d
AD
81952002-10-13 Akim Demaille <akim@epita.fr>
8196
8197 Let nondeterministic skeletons be usable with deterministic
8198 tables.
8199
8200 With the patch, GAWK compiled by GCC without -O2 passes its test
8201 suite using a GLR parser driven by LALR tables. It fails with -O2
8202 because `struct stat' gives two different answers on my machine:
8203 88 (definition of an auto var) and later 96 (memset on this var).
8204 Hence the stack is badly corrumpted. The headers inclusion is to
8205 blame: if I move the awk.h inclusion before GLR's system header
8206 inclusion, the two struct stat have the same size.
8207
8208 * src/tables.c (pack_table): Always create conflict_table.
8209 (token_actions): Always create conflict_list.
8210 * data/glr.c (YYFLAG): Remove, unused.
8211
f377f69f
AD
82122002-10-13 Akim Demaille <akim@epita.fr>
8213
8214 * configure.ac (AC_GNU_SOURCE): Use it instead of hand written code.
8215 (O0FLAGS): New.
8216 (VALGRIND, GXX): New.
8217 * tests/atlocal.in (CFLAGS): Use O0FLAGS.
8218 * tests/bison.in: Run $PREBISON a pre-command.
8219 * tests/Makefile.am (maintainer-check, maintainer-check-valgrind)
8220 (maintainer-check-g++): New.
8221 * Makefile.am (maintainer-check): New.
8222
2a1fe6ed
AD
82232002-10-13 Akim Demaille <akim@epita.fr>
8224
8225 * data/glr.c: Formatting changes.
8226 Tweak some trace messages to match yacc.c's.
8227
f50adbbd
AD
82282002-10-13 Akim Demaille <akim@epita.fr>
8229
8230 GLR parsers sometimes raise parse errors instead of performing the
8231 default reduction.
8232 Reported by Charles-Henry de Boysson.
8233
8234 * tests/calc.at (_AT_CHECK_CALC, _AT_CHECK_CALC_ERROR): Don't
ba0fe3c7 8235 check the length of the traces when %glr.
f50adbbd
AD
8236 (_AT_CHECK_CALC_ERROR): Also skip `^Stack' lines, coming from
8237 GLR's traces.
8238 (AT_CHECK_CALC_LALR, AT_CHECK_CALC_GLR): New.
8239 Test GLR parsers.
8240 * data/glr.c (YYLEFTMOST_STATE): Fix its value.
8241 (yyltype): Remove the yy prefix from the member names.
8242 (yytable): Complete its comment.
8243 (yygetLRActions): Map error action number from YYTABLE from
8244 YYTABLE_NINF to 0.
8245 (yyisErrorAction): No longer compare YYACTION to YYPACT_NINF
8246 (which was a bug: it should have been YYTABEL_NINF, and yet it was
8247 not satisfying as we could compare an YYACTION computed from
8248 YYDEFACT to YYTABLE_NINF although they are unrelated): 0 is the
8249 only value for error actions.
8250 (yyreportParseError): In verbose parse error messages, don't issue
8251 `error' in the list of expected tokens.
8252 * data/yacc.c (yyparse) <yybackup>: Rewrite the decoding of the
8253 next action to perform to match glr.c's decoding.
8254 (yytable): Complete its comment.
8255
bcbad5b9
PE
82562002-10-13 Paul Eggert <eggert@twinsun.com>
8257
8258 Fix problem reported by Henrik Grubbstroem in
161a71f3 8259 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00098.html>:
bcbad5b9
PE
8260 "nonterm: { $$ = 123; } { $$ = $1; };" was wrongly rejected,
8261 because the Bison parser reads the second action before reducing
8262 the first one.
8263 * src/scan-gram.l (rule_length): New static var.
8264 Use it to keep track of the rule length in the scanner, since
8265 we can't expect the parser to be in lock-step sync with the scanner.
8266 (handle_action_dollar, handle_action_at): Use this var.
8267 * tests/actions.at (Exotic Dollars): Test for the problem.
05846dae 8268
14904b89
PE
82692002-10-12 Paul Eggert <eggert@twinsun.com>
8270
1fe611e5
PE
8271 * lib/timevar.c [! IN_GCC && HAVE_SYS_TIME_H]: Include <sys/time.h>.
8272 * m4/timevar.m4 (BISON_PREREQ_TIMEVAR): Check for <sys/time.h>.
8273 Include <sys/time.h> when checking for clock_t and struct tms.
8274 Use same include order as source.
8275 This is for the SunOS 4.1.4 porting bug reported by Peter Klein in
161a71f3 8276 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00016.html>.
05846dae 8277
1fe611e5
PE
8278 * lib/timevar.c: Update copyright date and clarify comments.
8279 (get_time) [IN_GCC]: Keep the GCC version for reference.
05846dae 8280
1fe611e5
PE
8281 * lib/timevar.c, lib/timevar.h, lib/timevar.def: Import
8282 GCC version as of today, then merge Bison's changes.
8283 Change "GCC" to "Bison" in copyright notice. timevar.def's
8284 author is Akim, so change that too.
8285
98194095
PE
8286 * src/reader.c (grammar_current_rule_check):
8287 Don't worry about the default action if $$ is untyped.
8288 Prevents bogus warnings reported by Jim Gifford in
161a71f3 8289 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00015.html>.
98194095 8290
14904b89
PE
8291 * data/c.m4 (b4_token_enum): Do not define YYTOKENTYPE.
8292 * data/glr.c, data/lalr1.cc, data/yacc.c:
8293 Output token definitions before the first part of user declarations.
8294 Fixes compatibility problem reported by Jim Gifford for kbd in
161a71f3 8295 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00014.html>.
14904b89 8296
ff6dca18
PE
82972002-10-11 Paul Eggert <eggert@twinsun.com>
8298
8299 * data/yacc.c (yyreport_parse_error): Remove, putting its body into...
8300 (yyparse): here. This undoes some of the 2002-07-25 change.
8301 Compatibility problem reported by Ralf S. Engelschall with
8302 OSSP cfg <http://www.ossp.org/pkg/lib/cfg/>.
8303
eb714592
AD
83042002-10-11 Akim Demaille <akim@epita.fr>
8305
8306 * tests/regression.at Characters Escapes): New.
8307 * src/scan-gram.l (SC_ESCAPED_CHARACTER): Accept \' in strings and
8308 characters.
8309 Reported by Jan Nieuwenhuizen.
8310
b7195100
AD
83112002-10-11 Akim Demaille <akim@epita.fr>
8312
8313 * po/id.po: New.
8314
f28a0f2d
PE
83152002-10-10 Paul Eggert <eggert@twinsun.com>
8316
8317 Portability fixes for bitsets; this also avoids several GCC
8318 warnings.
8319
8320 * lib/abitset.c: Include <stddef.h>, for offsetof.
8321 * lib/lbitset.c: Likewise.
8322
8323 * lib/abitset.c (abitset_bytes): Return a size that is aligned
8324 properly for vectors of objects. Do not assume that adding a
8325 header size to a multiple of a word size yields a value that is
8326 properly aligned for the whole union.
8327 * lib/bitsetv.c (bitsetv_alloc): Likewise.
8328
8329 * lib/bitset_stats.c (bitset_stats_bytes): Adjust to new,
8330 unique names for structures.
8331 * lib/ebitset.c (ebitset_bytes): Likewise.
8332 * lib/lbitset.c (lbitset_bytes): Likewise.
8333
8334 * lib/abitset.c (abitset_ones, abitset_zero, abitset_empty_p,
8335 abitset_copy1, abitset_not, abitset_equal_p, abitset_subset_p,
8336 abitset_disjoint_p, abitset_and, abitset_and_cmp, abitset_andn,
8337 abitset_andn_cmp, abitset_or, abitset_or_cmp, abitset_xor,
8338 abitset_xor_cmp, abitset_and_or, abitset_and_or_cmp,
8339 abitset_andn_or, abitset_andn_or_cmp, abitset_or_and,
8340 abitset_or_and_cmp, abitset_copy): Supply prototype decls,
8341 to improve the type-checking that GCC can do.
8342 * lib/bitset.c (bitset_op4_cmp): Likewise.
8343 * lib/bitset_stats.c (bitset_stats_count,
8344 bitset_stats_empty_p, bitset_stats_ones, bitset_stats_zero,
8345 bitset_stats_copy, bitset_stats_disjoint_p,
8346 bitset_stats_equal_p, bitset_stats_not, bitset_stats_subset_p,
8347 bitset_stats_and, bitset_stats_and_cmp, bitset_stats_andn,
8348 bitset_stats_andn_cmp, bitset_stats_or, bitset_stats_or_cmp,
8349 bitset_stats_xor, bitset_stats_xor_cmp, bitset_stats_and_or,
8350 bitset_stats_and_or_cmp, bitset_stats_andn_or,
8351 bitset_stats_andn_or_cmp, bitset_stats_or_and,
8352 bitset_stats_or_and_cmp): Likewise.
8353 * lib/lbitset.c (lbitset_and, lbitset_and_cmp, lbitset_andn,
8354 lbitset_andn_cmp, lbitset_or, lbitset_or_cmp, lbitset_xor,
8355 lbitset_xor_cmp, lbitset_empty_p, lbitset_ones, lbitset_not,
8356 lbitset_subset_p, lbitset_disjoint_p, debug_lbitset): Likewise.
8357
8358 * lib/abitset.h: Include bitset.h, not bbitset.h.
8359 * lib/ebitset.h: Likewise.
8360 * lib/lbitset.h: Likewise.
8361
8362 * lib/bbitset.h: (enum_bitset_ops, enum_bitset_type): New types.
8363 All instances of parameters of type enum bitset_opts are now of
8364 type enum_bitset_opts, to conform to the C Standard, and similarly
8365 for enum_bitset_type.
8366 * lib/ebitset.c (enum_ebitset_find_mode): Likewise.
8367 * lib/lbitset.c (enum_lbitset_find_mode): Likewise.
8368
8369 Do not use "struct bitset_struct" to mean different things in
8370 different modules. Not only is this confusing, it violates
8371 the C Standard, which requires that structure types in different
8372 modules must be compatible if one is to be passed to the other.
8373 * lib/bbitset.h (bitset): Now points to a union, not to a struct.
8374 All instances of "struct bitset_struct *" replaced with "bitset".
8375 * lib/bitset.h (struct bitset_struct): Remove, replacing with....
8376 (union bitset_union, struct abitset_struct, struct ebitset_struct,
8377 struct lbitset_struct, struct bitset_stats_struct): New types.
8378 All uses of struct bitset_struct changed to union bitset_union,
8379 etc.
ba0fe3c7 8380 * lib/abitset.c (struct abitset_struct, abitset,
f28a0f2d
PE
8381 struct bitset_struct): Remove.
8382 * lib/bitset_stats.c (struct bitset_stats_struct, bitset_stats,
8383 struct bitset_struct): Remove.
8384 * lib/ebitset.c (struct ebitset_struct, ebitset, struct
8385 bitset_struct): Remove.
8386 * lib/lbitset.c (struct lbitset_struct, lbitset, bitset_struct):
8387 Likewise.
8388
8389 Do not call a function of type T using a call that assumes the
8390 function is of a different type U. Standard C requires that a
8391 function must be called with a type that is compatible with its
8392 definition.
8393 * lib/bbitset.h (bitset_and_or_, bitset_andn_or_, bitset_or_and_):
8394 New decls.
8395 * lib/bitset.c (bitset_and_or_, bitset_andn_or_, bitset_or_and_):
8396 New functions.
8397 * lib/ebitset.c (PFV): Remove.
8398 * lib/lbitset.c (PFV): Likewise.
8399 * lib/ebitset.c (ebitset_and, ebitset_andn, ebitset_or,
8400 ebitset_xor, ebitset_copy, ebitset_ones, ebitset_empty_p): New
8401 decls.
8402 (ebitset_and, ebitset_andn, ebitset_or, ebitset_xor): New functions.
8403 (ebitset_vtable): Use them.
8404 * lib/lbitset.c (lbitset_and, lbitset_andn, lbitset_or,
8405 lbitset_xor): New functions.
8406 (lbitset_vtable): Use them.
8407
8408 * lib/bitset.h (bitset_next, bitset_prev, bitset_only_set_p):
8409 Declare.
8410
8411 * lib/bitsetv.c (bitsetv_alloc): Add a cast to (void *) to avoid a
8412 GCC warning.
8413 * lib/lbitset.c (LBITSET_CURRENT1): Likewise.
8414 Use offsetof, for simplicity.
8415
6fbe4984
PE
84162002-10-06 Paul Eggert <eggert@twinsun.com>
8417
8418 * lib/bitset.h (bitset_reset): Do not assume that bitset_word is
8419 the same width as int. This reapplies a hunk of the 2002-08-12 patch
161a71f3 8420 <http://lists.gnu.org/archive/html/bison-patches/2002-08/msg00007.html>,
6fbe4984
PE
8421 which was inadvertently undone by the 2002-09-30 patch.
8422 * lib/lbitset.c (debug_lbitset): Do not assume that bitset_word is
8423 the same width as int.
8424
420f93c8
PE
84252002-10-04 Paul Eggert <eggert@twinsun.com>
8426
8427 Version 1.50.
8428
8429 * configure.ac (AC_INIT), NEWS: Increment version number.
8430
8431 * doc/bison.texinfo: Minor spelling, grammar, and white space
8432 fixes.
8433 (Symbols): Mention that any negative value returned from yylex
8434 signifies end-of-input. Warn about negative chars. Mention
8435 the portable Standard C character set.
8436
8437 The GNU coding standard says CFLAGS and YFLAGS are reserved
8438 for the installer to set.
8439 * lib/Makefile.am (AM_CFLAGS): Renamed from CFLAGS.
8440 * src/Makefile.am (AM_CFLAGS): Likewise.
8441 (AM_YFLAGS): Renamed from YFLAGS.
8442
8443 Fix some MAX and MIN problems.
8444 * src/gram.h (ITEM_NUMBER_MIN): MIN_MAX -> INT_MIN.
8445 * src/lalr.h (GOTO_NUMBER_MAX): INT_MAX -> SHRT_MAX.
8446 * src/symtab.h (SYMBOL_NUMBER_MAX): New macro.
8447 * src/reader.c (reader): Use it.
8448
8449 * tests/regression.at (Braces parsing): Use grep, not fgrep, as
8450 POSIX 1003.1-2001 has removed fgrep.
8451
84522002-10-04 Michael Hayes <m.hayes@elec.canterbury.ac.nz>
8453
8454 * lib/bbitset.h (BITSET_WINDEX_MAX): Redefine so that it cannot be
8455 interpreted as signed.
8456 * lib/ebitset.c (ebitset_list): Fix bug.
8457
ff68026d
PE
84582002-10-01 Paul Eggert <eggert@twinsun.com>
8459
8460 More fixes for 64-bit hosts and large bitsets.
8461
8462 * lib/abitset.c (struct abitset_struct.n_bits, abitset_small_list,
8463 abitset_size, abitset_list, abitset_list_reverse, abitset_list):
8464 Use bitset_bindex, not int or unsigned int or size_t, to count bits.
8465 * lib/bbitset.h (struct bitset_vtable.size, struct bitset_vtable.count,
8466 struct bitset_vtable.list, struct bitset_vtable.list_reverse,
8467 bitset_count_, bitset_next, bitset_prev, bitset_first, bitset_last,
8468 bitset_count_): Likewise.
8469 * lib/bitset.h (bitset_iterator.num, bitset_iterator.i,
8470 bitset_first, bitset_last): Likewise.
8471 * lib/bitset_stats.c (bitset_stats_size, bitset_stats_list,
8472 bitset_stats_list_reverse, bitset_stats_size,
8473 bitset_stats_count, bitset_stats_list, bitset_stat_list_reverse):
8474 Likewise.
8475 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
8476 * lib/bitsetv.c (bitsetv_alloc, bitsetv_create, bitsetv_free,
8477 bitsetv_zero, bitsetv_ones, bitsetv_transitive_closure,
8478 bitsetv_reflexive_transitive_closure): Likewise.
8479 * lib/bitsetv.h (bitsetv_alloc, bitsetv_create): Likewise.
8480 * lib/ebitset.c (ebitset_size, ebitset_list, ebitset_list_reverse):
8481 Likewise.
8482 * lib/lbitset.c (lbitset_size, lbitset_list, lbitset_list_merge):
8483 Likewise.
420f93c8 8484
ff68026d
PE
8485 * lib/abitset.c (abitset_ones, abitset_zero, abitset_bytes):
8486 Use size_t, not unsigned int, to count bytes.
8487 * lib/abitset.h (abitset_bytes): Likewise.
8488 * lib/bitset.c (bitset_bytes, bitset_alloc, bitset_obstack_alloc):
8489 Likewise.
8490 * lib/bitset.h (bitset_bytes): Likewise.
8491 * lib/bitset_stats.c (bitset_stats_bytes, bitset_stats_init): Likewise.
8492 * lib/bitset_stats.h (bitset_stats_bytes): Likewise.
8493 * lib/bitsetv.c (bitsetv_alloc): Likewise.
8494 * lib/ebitset.c (ebitset_bytes): Likewise.
8495 * lib/ebitset.h (ebitset_bytes): Likewise.
8496 * lib/lbitset.c (lbitset_bytes): Likewise.
8497 * lib/lbitset.h (lbitset_bytes): Likewise.
420f93c8 8498
ff68026d
PE
8499 * lib/abitset.c (abitset_empty_p, abitset_not, abitset_equal_p,
8500 abitset_subset_p, abitset_disjoint_p, abitset_and,
8501 abitset_and_cmp, abitset_andn, abitset_andn_cmp, abitset_or,
8502 abitset_or_cmp, abitset_xor, abitset_xor_cmp, abitset_and_or,
8503 abitset_and_or_cmp, abitset_andn_or, abitset_andn_or_cmp,
8504 abitset_or_and, abitset_or_and_cmp):
8505 Use bitset_windex instead of unsigned int.
8506 * lib/bitsetv.c (bitsetv_dump, debug_bitsetv): Likewise.
8507 * lib/ebitset.c (struct ebitset_struct.size, ebitset_elts_grow,
8508 ebitset_elt_add, ebitset_elt_remove, ebitset_weed,
8509 ebitset_elt_find, ebitset_list_reverse, ebitset_list, ebitset_init):
8510 Likewise.
8511 * lib/lbitset.c (lbitset_ones, lbitset_not): Likewise.
420f93c8 8512
ff68026d
PE
8513 * lib/bitset.c (bitset_print):
8514 Use proper printf formats for widths of integer types.
8515 * lib/bitset_stats.c (bitset_percent_histogram_print,
8516 bitset_log_histogram_print, bitset_stats_print_1): Likewise.
8517 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
8518 * lib/bitsetv.c (bitsetv_dump, debug_bitsetv): Likewise.
8519 * lib/lbitset.c (lbitset_bytes): Likewise.
420f93c8 8520
ff68026d
PE
8521 * lib/bbitset.h (BITSET_BINDEX_MAX, BITSET_WINDEX_MAX,
8522 BITSET_SIZE_MAX): New macros.
8523 (BITSET_INDEX_MAX): Remove. It wasn't right, since it assumed that
8524 sizeof (bitset_word) == sizeof (bitset_windex). All uses changed
8525 to BITSET_WINDEX_MAX.
8526
8527 * lib/bitset.c (bitset_next, bitset_prev, bitset_first,
8528 bitset_last): Return BITSET_BINDEX_MAX (not -1) for no value,
8529 since we now return the bitset_bindex type (not int).
8530
8531 * lib/bitsetv.c (bitsetv_alloc): Check for arithmetic overflow
8532 when computing sizes.
8533 * lib/ebitset.c (ebitset_elts_grow): Likewise.
8534
8535 * lib/lbitset.c (lbitset_elt_find): Simplify windex calculation
8536 and avoid cast to unsigned.
8537
6aa452a6
AD
85382002-09-30 Akim Demaille <akim@epita.fr>
8539
8540 * lib/abitset.c, lib/bbitset.h, lib/bitset.c, lib/bitset.h,
8541 * lib/bitset_stats.c, lib/bitsetv.c, lib/ebitset.c, lib/lbitset.c:
8542 Updates from Michael Hayes.
8543
927f7817
AD
85442002-09-30 Art Haas <ahaas@neosoft.com>
8545
8546 * configure.ac: Update AC_OUTPUT and AM_CONFIG_HEADER
8547 invocations.
8548 * tests/cxx-type.at (declarator): Don't rely on NDEBUG being not
8549 defined.
8550
9738f41e
AD
85512002-09-27 Akim Demaille <akim@epita.fr>
8552
8553 Version 1.49c.
8554
a5c75d7f
AD
85552002-09-27 Akim Demaille <akim@epita.fr>
8556
8557 * configure.ac (AM_INIT_AUTOMAKE): We _need_ 1.7.
8558 (Because of AC_LIBSOURCE).
8559
8280e179
AD
85602002-09-27 Akim Demaille <akim@epita.fr>
8561
8562 Playing with Autoscan.
8563
8564 * configure.ac: Remove the old LIBOBJ tweaks.
8565 (AC_REPLACE_FUNCS): Add strrchr and strtol.
8566 * lib/strrchr.c: New.
8567 * lib/strtol.c: New, from the Coreutils 4.5.1.
8568
ae64af35
AD
85692002-09-27 Akim Demaille <akim@epita.fr>
8570
8571 Playing with Autoscan.
8572
8573 * m4/prereq.m4 (jm_PREREQ_ARGMATCH, jm_FUNC_ARGMATCH): New.
8574 * lib/Makefile.am (libbison_a_SOURCES): No longer include
8575 argmatch.c and argmatch.h, since they are AC_LIBSOURCE'd.
8576 * lib/strcasecmp.c, lib/strncasecmp.c, lib/memcmp.c: New, from the
8577 Coreutils 4.5.1.
8578
d1a1114f
AD
85792002-09-24 Akim Demaille <akim@epita.fr>
8580
8581 * doc/bison.texinfo (Stack Overflow): xref to Recursion.
8582 (Frequently Asked Questions, Parser Stack Overflow): New.
8583
b906441c
AD
85842002-09-13 Akim Demaille <akim@epita.fr>
8585
8586 Playing with autoscan.
8587
8588 * src/reader.c (get_merge_function): Use xstrdup, not strdup.
8589 * src/files.c (skeleton_find): Remove, unused.
8590 * m4/memcmp.m4: New, from the Coreutils 4.5.1.
8591 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Run jm_FUNC_MEMCMP.
8592
bd701811
AD
85932002-09-13 Akim Demaille <akim@epita.fr>
8594
8595 * configure.ac (AM_INIT_AUTOMAKE): Require Automake 1.6.3.
8596 * Makefile.am (AUTOMAKE_OPTIONS): Don't.
8597
e0a13e7b
AD
85982002-09-13 Akim Demaille <akim@epita.fr>
8599
8600 * configure.ac: Require 2.54.
8601 s/jm_FUNC_MALLOC/AC_FUNC_MALLOC/.
8602 s/jm_FUNC_REALLOC/AC_FUNC_REALLOC/.
8603 * m4/c-bs-a.m4, m4/malloc.m4, m4/mbstate_t.m4, m4/realloc.m4:
8604 Remove, provided by Autoconf macros.
8605
c97011bf
AD
86062002-09-12 Akim Demaille <akim@epita.fr>
8607
8608 * m4/prereq.m4: Update, from Coreutils 4.5.1.
8609
d862b1be
AD
86102002-09-12 Akim Demaille <akim@epita.fr>
8611
8612 * m4/prereq.m4: Update, from Fileutils 4.1.5.
8613 * configure.ac (jm_PREREQ_TEMPNAME): Invoke it.
8614 Reported by Martin Mokrejs.
8615
3d38c03a
AD
86162002-09-10 Akim Demaille <akim@epita.fr>
8617
8618 * src/parse-gram.y: Associate a human readable string to each
8619 token type.
8620 * tests/regression.at (Invalid inputs): Adjust.
8621
b6347355
AD
86222002-09-10 Gary V. Vaughan <gary@gnu.org>
8623
8624 * tests/Makefile.am ($(srcdir)/package.m4): Bison now ships
8625 with an Autoconf-2.5x style configure.ac.
8626
09ba4ab2
PE
86272002-09-06 Paul Eggert <eggert@twinsun.com>
8628
8629 * doc/bison.texinfo (Conditions): Make explicit that the GPL
8630 exception applies only to yacc.c. This is a modification of a
8631 patch originally suggested by Akim Demaille.
8632
21846f69
AD
86332002-09-06 Akim Demaille <akim@epita.fr>
8634
09ba4ab2
PE
8635 * data/c.m4 (b4_copyright): Move the GPL exception comment from
8636 here to...
8637 * data/yacc.c: here.
8638
21846f69
AD
8639 * data/lalr1.cc (struct yyltype): Don't define it, since we use
8640 LocationType.
8641 (b4_ltype): Default to yy::Location from location.hh.
8642
c0ad8bf3
AD
86432002-09-04 Jim Meyering <jim@meyering.net>
8644
8645 * data/yacc.c: Guard the declaration of yytoknum also with
8646 `#ifdef YYPRINT', so it is declared only when used.
8647
3a93251e
AD
86482002-09-04 Akim Demaille <akim@epita.fr>
8649
8650 * configure.in: Rename as...
8651 * configure.ac: this.
8652 Bump to 1.49c.
8653
427c0dda
AD
86542002-09-04 Akim Demaille <akim@epita.fr>
8655
8656 * src/assoc.c, src/closure.c, src/gram.c, src/injections.c,
8657 * src/lalr.c, src/LR0.c, src/relation.c, src/tables.c: Don't
8658 translate maintainer only messages.
8659
6a254321
PE
86602002-08-12 Paul Eggert <eggert@twinsun.com>
8661
645e30d1
PE
8662 Version 1.49b.
8663
6a254321
PE
8664 * Makefile.am (SUBDIRS): Remove intl.
8665 (DISTCLEANFILES): Remove.
8666 * NEWS: Mention that GNU M4 is now required. Clarify what is
8667 meant by "larger grammars". Mention the pt_BR translation.
8668 * configure.in (AC_CHECK_DECLS): Add getenv, getopt.
8669 (AM_GNU_GETTEXT_VERSION): New macro, replacing GETTEXT_VERSION var.
8670 Bump version from 0.11.2 to 0.11.5.
8671 (BISON_PREREQ_STAGE): Remove.
8672 (AM_GNU_GETTEXT): Use external gettext.
8673 (AC_OUTPUT): Remove intl/Makefile.
8674
8675 * config/depcomp, config/install-sh: Sync with Automake 1.6.3.
8676
8677 * data/glr.c: Include string.h, for strlen.
8678 (yyreportParseError): Use size_t for yysize.
8679 (yy_yypstack): No longer nested inside yypstates, as nested
8680 functions are not portable. Do not assume size_t is the
8681 same width as int.
8682 (yypstates): Do not assume that ptrdiff_t is the same width
8683 as int, and similarly for yyposn and YYINDEX.
8684
8685 * data/yacc.c: Fix comment about `$$ = $1': it can copy garbage.
8686
8687 * lib/Makefile.am (INCLUDES): Do not include from the intl
8688 directory, which has been removed.
8689 * src/Makefile.am (INCLUDES): Likewise.
8690
8691 * lib/Makefile.am (libbison_a_SOURCES): Add unlocked-io.h.
8692 (bitsets_sources, additional_bitsets_sources, timevars_sources):
8693 New vars.
8694
8695 * lib/Makefile.am (libbison_a_SOURCES): Avoid +=, a GNU make extension.
8696 * tests/Makefile.am (EXTRA_DIST): Likewise.
8697
8698 * lib/abitset.c (abitset_reverse_list, ebitset_reverse_list):
8699 Do not assume that bitset_windex is the same width as unsigned.
8700
8701 * lib/abitset.c (abitset_unused_clear): Do not assume that
8702 bitset_word is the same width as int.
8703 * lib/bbitset.h (BITSET_INDEX_MAX, BITSET_MSB): Likewise.
8704 * lib/bitset.h (bitset_set, bitset_reset): Likewise.
8705 * lib/bitset_stats.c (bitset_stats_set, bitset_stats_reset): Likewise.
8706 * lib/ebitset.c (ebitset_set, ebitset_reset): Likewise.
8707 * lib/lbitset.c (lbitset_set, lbitset_reset): Likewise.
8708
8709 * lib/abitset.c (abitset_op1): Use -1, not ~0, as memset arg (for
8710 portability to one's complement hosts!).
8711 * lib/ebitset.c (ebitset_op1): Likewise.
8712 * lib/lbitset.c (lbitset_op1): Likewise.
8713
8714 * lib/argmatch.c, lib/quotearg.c, quotearg.h: Sync with GNU tar.
8715 * lib/argmatch.h, lib/basename.c, lib/dirname.c, lib/dirname.h,
8716 lib/hash.c, lib/hash.h, lib/strnlen.c, lib/xmalloc.c:
8717 Sync with fileutils.
8718 * lib/error.c, lib/getopt.c, lib/getopt.h, lib/getopt1.c,
8719 lib/gettext.h: Sync with diffutils.
8720
8721 * lib/memrchr.c, lib/mkstemp.c, lib/strchr.c, lib/strnlen.c,
8722 lib/strspn.c, lib/tempname.c: Use GPL, not LGPL.
8723
8724 * lib/obstack.c, lib/obstack.h: Sync with fileutils, except use
8725 PROTOTYPES to check for prototypes, and "defined __STDC__" to
8726 check for void *.
8727
8728 * lib/bbitset.h (BITSET_WORD_BITS): Now of type unsigned, not
8729 size_t; the old version tried to do this but casted improperly.
8730 (bitset_bindex, bitset_windex): Now size_t, not unsigned long.
8731 (bitset_test): Now returns int, not unsigned long.
8732
8733 * lib/bitset_stats.c: Include "gettext.h".
8734 (_): New macro.
8735 (bitset_stats_set, bitset_stats_reset, bitset_stats_test): Don't
8736 name locals "index", as it generates unnecessary warnings on some
8737 hosts that have an "index" function.
8738
8739 * lib/bitset_stats.c (bitset_stats_print_1, bitset_stats_print,
8740 bitset_stats_read, bitset_stats_write): Wrap strings in _() if
8741 they need translation.
8742 * src/LR0.c (state_list_append, new_itemsets, get_state,
8743 append_states, generate_states): Likewise.
8744 * src/assoc.c (assoc_to_string): Likewise.
8745 * src/closure.c (print_closure, set_firsts, closure): Likewise.
8746 * src/gram.c (grammar_dump): Likewise.
8747 * src/injections.c (injections_compute): Likewise.
8748 * src/lalr.c (lookaheads_print): Likewise.
8749 * src/relation.c (relation_transpose): Likewise.
8750 * src/scan-gram.l: Likewise.
8751 * src/tables.c (table_grow, pack_vector): Likewise.
8752
8753 * m4/Makefile.am (EXTRA_DIST): Remove codeset.m4,
8754 glibc21.m4, isc-posix.m4 lcmessage.m4, stage.m4.
8755 * m4/malloc.m4, m4/realloc.m4: Sync with diffutils.
8756 * m4/mbstate_t.m4: Sync with fileutils.
8757 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): AC_MBSTATE_T -> AC_TYPE_MBSTATE_T.
8758
8759 * po/LINGUAS: Add pt_BR.
8760 * po/POTFILES.in: Add src/assoc.c, src/closure.c, src/gram.c,
8761 src/main.c, src/relation.c, src/state.c, lib/bitset_stats.c,
8762 lib/timevar.c.
8763 Use src/parse-gram.y instead of src/parse-gram.c, as the gettext
8764 manual recommends.
8765 Similarly, use src/scan-gram.l instead of src/scan-gram.c.
8766
8767 * src/complain.c (strerror_r): Remove decl; not needed.
8768 (strerror): Use same pattern as ../lib/error.c.
8769
8770 * src/files.c, src/files.h (compute_header_macro): Remove; unused.
8771
8772 * src/gram.c (grammar_dump): Do not assume ptrdiff_t fits in int.
8773
8774 * src/main.c (main): Cast result of bindtextdomain and textdomain
8775 to void, to avoid a GCC warning when --disable-nls is in effect.
8776
8777 * src/scan-gram.l: Use strings rather than escapes when possible,
8778 to minimize the number of warnings from xgettext.
8779 (handle_action_dollar, handle_action_at): Don't use isdigit,
8780 as it mishandles negative chars and it may not work as expected
8781 outside the C locale.
8782
8783 * src/symtab.c (symbol_get): Don't cast LHS of an assignment;
8784 this is a GCC extension and is not portable to other compilers.
8785
8786 * src/system.h (alloca): Use same pattern as ../lib/error.c.
8787 Do not include <ctype.h>; no longer needed.
8788 Do not include <malloc.h>; no longer needed (and generates
8789 warnings on OpenBSD 3.0).
8790
8791 * tests/cxx-type.at (yylex): Do not pass signed char to isupper;
8792 it's not portable.
8793
8794 * tests/regression.at: Do not use 'cc -c input.c -o input';
8795 Sun C rejects this. Instead, use 'cc -c input.c -o input.o'.
8796
8797 * tests/synclines.at (AC_SYNCLINES_COMPILE): Accept any nonzero
8798 exit status as failure, not just exit status 1. Sun C exits
8799 with status 2 sometimes.
8800
8801 * tests/torture.at (AT_INCREASE_DATA_SIZE): New macro.
8802 Use it for the two large tests.
8803
c8f002c7
AD
88042002-08-02 Akim Demaille <akim@epita.fr>
8805
8806 * src/conflicts.c (conflicts_output): Don't output rules never
8807 reduced here, since anyway that computation doesn't work.
8808 * src/gram.h, src/gram.h (rule_filter_t, rule_useful_p)
8809 (rule_useless_p, rule_never_reduced_p): New.
8810 (grammar_rules_partial_print): Use a filter instead of a range.
8811 Display the title only if needed.
8812 (grammar_rules_print): Adjust.
8813 (grammar_rules_never_reduced_report): New.
8814 * src/tables.c (action_row): Move the computation of rules never
8815 reduced to...
8816 (token_actions): here.
8817 * src/main.c (main): Make the parser before making the report, so
8818 that rules never reduced are computed.
8819 Call grammar_rules_never_reduced_report.
8820 * src/print.c (print_results): Report rules never reduced.
8821 * tests/conflicts.at, tests/reduce.at: Adjust.
8822
cd08e51e
AD
88232002-08-01 Akim Demaille <akim@epita.fr>
8824
8825 Instead of attaching lookaheads and duplicating the rules being
8826 reduced by a state, attach the lookaheads to the reductions.
8827
8828 * src/state.h (state_t): Remove the `lookaheads',
8829 `lookaheads_rule' member.
8830 (reductions_t): Add a `lookaheads' member.
8831 Use a regular array for the `rules'.
8832 * src/state.c (reductions_new): Initialize the lookaheads member
8833 to 0.
8834 (state_rule_lookaheads_print): Adjust.
8835 * src/state.h, src/state.c (state_reductions_find): New.
8836 * src/conflicts.c (resolve_sr_conflict, set_conflicts)
8837 (count_rr_conflicts): Adjust.
8838 * src/lalr.c (LArule): Remove.
8839 (add_lookback_edge): Adjust.
8840 (state_lookaheads_count): New.
8841 (states_lookaheads_initialize): Merge into...
8842 (initialize_LA): this.
8843 (lalr_free): Adjust.
8844 * src/main.c (main): Don't free nullable and derives too early: it
8845 is used by --verbose.
8846 * src/print.c, src/print_graph.c, src/tables.c: Adjust.
8847
bb0027a9
AD
88482002-08-01 Akim Demaille <akim@epita.fr>
8849
8850 * src/derives.h, src/derives.c (derives): A `rule_t***' instead of
8851 `rule_number_t**'.
8852 (set_derives, free_derives): Rename as...
8853 (derives_compute, derives_free): this.
8854 Adjust all dependencies.
8855 * src/nullable.c (set_nullable, free_nullable): Rename as...
8856 (nullable_compute, nullable_free): these.
8857 (rule_list_t): Store rule_t *, not rule_number_t.
8858 * src/state.c (state_rule_lookaheads_print): Directly compare rule
8859 pointers, instead of their numbers.
8860 * src/main.c (main): Call nullable_free, and derives_free earlier,
8861 as they were lo longer used.
8862
3325ddc4
AD
88632002-08-01 Akim Demaille <akim@epita.fr>
8864
8865 * lib/timevar.c (get_time): Include children time.
8866 * src/lalr.h (LA, LArule): Don't export them: used with the
8867 state_t.
8868 * src/lalr.c (LA, LArule): Static.
8869 * src/lalr.h, src/lalr.c (lalr_free): New.
8870 * src/main.c (main): Call it.
8871 * src/tables.c (pack_vector): Check whether loc is >= to the
8872 table_size, not >.
8873 (pack_tables): Don't free froms, tos, conflict_tos, and pos...
8874 (tables_generate): do it, since that's also it which allocates
8875 them.
8876 Don't free LA and LArule, main does.
8877
c6f1a33c
AD
88782002-07-31 Akim Demaille <akim@epita.fr>
8879
8880 Separate parser tables computation and output.
8881
8882 * src/output.c (nvectors, base_t, base, base_ninf, conflict_table)
8883 (conflict_list, conflict_list_cnt, table, check, table_ninf)
8884 (yydefgoto, yydefact, high): Move to...
8885 * src/tables.h, src/tables.c: here.
8886 * src/output.c (vector_number_t, VECTOR_NUMBER_MAX)
8887 (VECTOR_NUMBER_MIN, state_number_to_vector_number)
8888 (symbol_number_to_vector_number, nvectors, BASE_MAX, BASE_MIN)
8889 (froms, tos, conflict_tos, tally, width, action_t, ACTION_MAX)
8890 (ACTION_MIN, actrow, order, nentries, pos, conflrow)
8891 (conflict_list_free, table_size, lowzero, table_grow, conflict_row)
8892 (action_row, save_row, token_actions, save_column, default_goto)
8893 (goto_actions, sort_actions, matching_state, pack_vector)
8894 (table_ninf_remap, pack_table, prepare_actions): Move to...
8895 * src/tables.c: here.
8896 * src/tables.h, src/tables.c(tables_generate, tables_free): New.
8897 * src/output.c (token_actions, output_base, output_conflicts)
8898 (output_check): Merge into...
8899 (prepare_actions): this.
8900 (actions_output): Rename as...
8901 (user_actions_output): this.
8902 * src/main.c (main): Call tables_generate and tables_free.
8903
1509d42f
AD
89042002-07-31 Akim Demaille <akim@epita.fr>
8905
8906 Steal GCC's --time-report support.
8907
8908 * lib/timevar.c, lib/timevar.h, lib/timevar.def: New,
8909 stolen/adjusted from GCC.
8910 * m4/stage.m4: Remove time related checks.
8911 * m4/timevar.m4: New.
8912 * configure.in: Adjust.
8913 * src/system.h: Adjust to using timevar.h.
8914 * src/getargs.h, src/getargs.c: Support trace_time for
8915 --trace=time.
8916 * src/main.c (stage): Remove.
8917 (main): Replace `stage' invocations with timevar calls.
8918 * src/output.c: Insert pertinent timevar calls.
8919
273a74fa
AD
89202002-07-31 Akim Demaille <akim@epita.fr>
8921
8922 Let --trace have arguments.
8923
8924 * src/getargs.h (enum trace_e): New.
8925 * src/getargs.c (trace_args, trace_types, trace_argmatch): New.
8926 (long_options, short_options): --trace/-T takes an optional
8927 argument.
8928 Change all the uses of trace_flag to reflect the new flags.
8929 * tests/sets.at (Firsts, Nullable, Broken Closure): Use --trace=sets.
8930
8931 Strengthen `stage' portability.
8932
8933 * m4/stage.m4 (BISON_PREREQ_STAGE): New.
8934 * configure.in: Use it.
8935 Don't check for malloc.h and sys/times.h.
8936 * src/system.h: Include them when appropriate.
8937 * src/main.c (stage): Compile only when mallinfo, struct mallinfo,
8938 times and struct tms are available.
8939
217598da
AD
89402002-07-30 Akim Demaille <akim@epita.fr>
8941
8942 In verbose parse error message, don't report `error' as an
8943 expected token.
8944 * tests/actions.at (Printers and Destructors): Adjust.
8945 * tests/calc.at (Calculator $1): Adjust.
8946 * data/yacc.c, data/glr.c, data/lalr1.c: When making the verbose
8947 error message, do not report the parser accepts the error token in
8948 that state.
8949
52489d44
AD
89502002-07-30 Akim Demaille <akim@epita.fr>
8951
8952 Normalize conflict related messages.
8953
8954 * src/complain.h, src/complain.c (warn, complain): New.
8955 * src/conflicts.c (conflicts_print): Use them.
8956 (conflict_report_yacc): New, extracted from...
8957 (conflicts_print): here.
8958 * tests/conflicts.at, tests/existing.at: Adjust.
8959
e8832397
AD
89602002-07-30 Akim Demaille <akim@epita.fr>
8961
8962 Report rules which are never reduced by the parser: those hidden
8963 by conflicts.
8964
8965 * src/LR0.c (save_reductions): Don't make the final state too
8966 different: save its reduction (accept) instead of having a state
8967 without any action (no shift or goto, no reduce).
8968 Note: the final state is now a ``regular'' state, i.e., the
8969 parsers now contain `reduce 0' as default reduction.
8970 Nevertheless, since they decide to `accept' when yystate =
8971 final_state, they still will not reduce rule 0.
8972 * src/print.c (print_actions, print_reduction): Adjust.
8973 * src/output.c (action_row): Track reduced rules.
8974 (token_actions): Report rules never reduced.
8975 * tests/conflicts.at, tests/regression.at: Adjust.
8976
caf23d24
AD
89772002-07-30 Akim Demaille <akim@epita.fr>
8978
8979 `stage' was accidently included in a previous patch.
8980 Initiate its autoconfiscation.
8981
8982 * configure.in: Look for malloc.h and sys/times.h.
8983 * src/main.c (stage): Adjust.
8984 Report only when trace_flag.
8985
640748ee
AD
89862002-07-29 Akim Demaille <akim@epita.fr>
8987
8988 * src/state.h, src/state.c (transitions_t): Holds state_t*'s, not
8989 state_number_t.
8990 (errs_t): symbol_t*, not symbol_number_t.
8991 (reductions_t): rule_t*, not rule_number_t.
8992 (FOR_EACH_SHIFT): New.
8993 * src/LR0.c, src/conflicts.c, src/lalr.c, src/output.c
8994 * src/print.c, src/print_graph.c: Adjust.
8995
88bce5a2
AD
89962002-07-29 Akim Demaille <akim@epita.fr>
8997
8998 Use $accept and $end, as BYacc and BTYacc do, instead of $axiom and $.
8999
9000 * src/symtab.h, src/symtab.c (eoftoken, axiom): Rename as...
9001 (endtoken, accept): these.
9002 * src/reader.c (reader): Set endtoken's default tag to "$end".
9003 Set undeftoken's tag to "$undefined" instead of "$undefined.".
9004 * doc/bison.texinfo (Table of Symbols): Mention $accept and $end.
9005 Adjust.
9006
1bfb97db
AD
90072002-07-29 Akim Demaille <akim@epita.fr>
9008
9009 * src/reduce.c (reduce_grammar): When the language is empty,
9010 complain about the start symbol, not the axiom.
9011 Use its location.
9012 * tests/reduce.at (Empty Language): New.
9013
fc5734fe
AD
90142002-07-26 Akim Demaille <akim@epita.fr>
9015
9016 * src/reader.h, src/reader.c (gram_error): ... can't get
9017 yycontrol without making too strong assumptions on the parser
9018 itself.
9019 * src/output.c (prepare_tokens): Use the real 0th value of
9020 token_translations instead of `0'.
9021 * src/parse-gram.y (yyerror): Don't rely on yycontrol being
9022 visible here.
9023 * data/yacc.c (yyreport_parse_error): Rename yylocation as yylloc
9024 for the time being: %locations ought to provide it to yyerror.
9025
3650b4b8
AD
90262002-07-25 Akim Demaille <akim@epita.fr>
9027
9028 * src/output.c (prepare_tokens): Go up to ntokens, not ntokens + 1.
9029 * doc/bison.texinfo (Decl Summary): s/$illegal/$undefined./.
9030 * tests/regression.at (Web2c Actions): Adjust.
9031
4b3d3a8e
AD
90322002-07-25 Akim Demaille <akim@epita.fr>
9033
9034 Stop storing rules from 1 to nrules + 1.
9035
9036 * src/LR0.c, src/closure.c, src/derives.c, src/gram.c, src/lalr.c
9037 * src/nullable.c, src/output.c, src/print.c, src/reader.c
9038 * src/reduce.c: Allocate and free from &rules[0], not &rules[1].
9039 Iterate from 0 to nrules.
9040 Use rule_number_as_item_number and item_number_as_rule_number.
9041 Adjust to `derive' now containing possibly 0.
9042 * src/gram.h (rule_number_as_item_number, item_number_as_rule_number):
9043 Handle the `- 1' part in rule numbers from/to item numbers.
9044 * src/conflicts.c (log_resolution): Fix the message which reversed
9045 shift and reduce.
9046 * src/output.c (action_row): Initialize default_rule to -1.
9047 (token_actions): Adjust.
9048 * tests/sets.at (Nullable, Firsts): Fix the previously bogus
9049 expected output.
9050 * tests/conflicts.at (Resolved SR Conflicts): Likewise.
9051
4a2a22f4
AD
90522002-07-25 Akim Demaille <akim@epita.fr>
9053
9054 * data/c.m4 (b4_c_function, b4_c_ansi_args, b4_c_ansi_arg)
9055 (b4_c_knr_arg_names, b4_c_knr_arg_name, b4_c_knr_arg_decls)
9056 (b4_c_knr_arg_decl): New.
9057 * data/yacc.c: Use it to define yysymprint, yydestruct, and
9058 yyreport_parse_error.
9059
b8df3223
AD
90602002-07-25 Akim Demaille <akim@epita.fr>
9061
9062 * data/yacc.c (yyreport_parse_error): New, extracted from...
9063 (yyparse): here.
9064 (yydestruct, yysymprint): Move above yyparse.
9065 Be K&R compliant.
9066
a762e609
AD
90672002-07-25 Akim Demaille <akim@epita.fr>
9068
9069 * data/c.m4 (b4_ints_in, b4_int_type, b4_int_type_for): New,
9070 replace...
9071 (b4_sint_type, b4_uint_type): these.
9072 * data/yacc.c, data/glr.c, data/lalr1.cc: Use b4_int_type_for.
9073 * tests/regression.at (Web2c Actions): Adjust.
9074
12b0043a
AD
90752002-07-25 Akim Demaille <akim@epita.fr>
9076
9077 * src/gram.h (TIEM_NUMBER_MAX): New.
9078 (item_number_of_rule_number, rule_number_of_item_number): Rename
9079 as...
9080 (rule_number_as_item_number, item_number_as_rule_number): these.
9081 Adjust dependencies.
9082 * src/output.c (vector_number_t, VECTOR_NUMBER_MAX)
9083 (VECTOR_NUMBER_MIN, state_number_to_vector_number)
9084 (symbol_number_to_vector_number): New.
9085 (order): Of vector_number_t* type.
9086 (base_t, BASE_MAX, BASE_MIN): New.
9087 (froms, tos, width, pos, check): Of base_t type.
9088 (action_number_t, ACTION_MIN, ACTION_MAX): New.
9089 (actrow): Of action_number_t type.
9090 (conflrow): Of unsigned int type.
9091 (table_ninf, base_ninf): New.
9092 (GENERATE_MUSCLE_INSERT_TABLE): Also output the `*_min' value.
9093 (muscle_insert_int_table, muscle_insert_base_table)
9094 (muscle_insert_rule_number_table): New.
9095 (prepare_tokens): Output `toknum' as int_table.
9096 (action_row): Returns a rule_number_t.
9097 Use ACTION_MIN, not SHRT_MIN.
9098 (token_actions): yydefact is rule_number_t*.
9099 (table_ninf_remap): New.
9100 (pack_table): Use it for `base' and `table'.
9101 * data/yacc.c, data/glr.c, data/lalr1.cc (YYFLAG): Remove,
9102 replaced with...
9103 (YYPACT_NINF, YYTABLE_NINF): these.
9104 (yypact, yytable): Compute their types instead of hard-coded
9105 `short'.
9106 * tests/regression.at (Web2c Actions): Adjust.
9107
5dde258a
AD
91082002-07-19 Akim Demaille <akim@epita.fr>
9109
9110 * src/scan-gram.l (id): Can start with an underscore.
9111
a945ec39
AD
91122002-07-16 Akim Demaille <akim@epita.fr>
9113
9114 * src/assoc.c, src/asssoc.h (assoc_t, assoc_to_string): New.
9115 Adjust all former `associativity' dependencies.
9116 * src/symtab.c (symbol_new): Default associativity is `undef', not
9117 `right'.
9118 (symbol_check_alias_consistence): Adjust.
9119
fae437e8
AD
91202002-07-09 Akim Demaille <akim@epita.fr>
9121
9122 * doc/bison.texinfo: Properly set the ``header'' part.
9123 Use @dircategory ``GNU programming tools'' as per Texinfo's
9124 documentation.
9125 Use @copying.
9126
1a715ef2
AD
91272002-07-09 Akim Demaille <akim@epita.fr>
9128
9129 * lib/quotearg.h: Protect against multiple inclusions.
9130 * src/location.h (location_t): Add a `file' member.
9131 (LOCATION_RESET, LOCATION_PRINT): Adjust.
9132 * src/complain.c (warn_at, complain_at, fatal_at): Drop
9133 `error_one_per_line' support.
9134
a5d50994
AD
91352002-07-09 Akim Demaille <akim@epita.fr>
9136
9137 * src/complain.h, src/complain.c (warn, complain): Remove, unused.
9138 * src/reader.c (lineno): Remove.
9139 Adjust all dependencies.
9140 (get_merge_function): Take a location and use complain_at.
9141 * src/symtab.h, src/symtab.c (symbol_make_alias): Likewise.
9142 * tests/regression.at (Invalid inputs, Mixing %token styles):
9143 Adjust.
9144
b275314e
AD
91452002-07-09 Akim Demaille <akim@epita.fr>
9146
9147 * src/parse-gram.y (rules_or_grammar_declaration): Add an error
9148 recovery rule, and forbid extensions when --yacc.
9149 (gram_error): Use complain_at.
9150 * src/reader.c (reader): Exit if there were parse errors.
9151
865b9df1
AD
91522002-07-09 Akim Demaille <akim@epita.fr>
9153
9154 * tests/synclines.at (AT_SYNCLINES_COMPILE): New.
9155 (AT_TEST_SYNCLINE): Adjust to unusual GCC outputs.
9156 Reported by R Blake <blakers@mac.com>.
9157
c76e14da
AD
91582002-07-09 Akim Demaille <akim@epita.fr>
9159
9160 * data/yacc.c: Output the copyright notive in the header.
9161
7db2ed2d
AD
91622002-07-03 Akim Demaille <akim@epita.fr>
9163
9164 * src/output.c (froms, tos): Are state_number_t.
9165 (save_column): sp, sp1, and sp2 are state_number_t.
9166 (prepare): Rename `final' as `final_state_number', `nnts' as
9167 `nterms_number', `nrules' as `rules_number', `nstates' as
9168 `states_number', and `ntokens' as `tokens_number'. Remove `nsym',
9169 unused.
9170 * data/yacc.c, data/glr.c, data/lalr1.cc: Adjust.
9171 * data/lalr1.cc (nsym_): Remove, unused.
9172
e68e0410
AD
91732002-07-03 Akim Demaille <akim@epita.fr>
9174
9175 * src/lalr.h, src/lalr.c (goto_number_t): New.
9176 * src/lalr.c (goto_list_t): New.
9177 Propagate them.
9178 * src/nullable.c (rule_list_t): New.
9179 Propagate.
9180 * src/types.h: Remove.
9181
e1a4f3a4
AD
91822002-07-03 Akim Demaille <akim@epita.fr>
9183
9184 * src/closure.c (print_fderives): Use rule_rhs_print.
9185 * src/derives.c (print_derives): Use rule_rhs_print.
9186 (rule_list_t): New, replaces `shorts'.
9187 (set_derives): Add comments.
9188 * tests/sets.at (Nullable, Firsts): Adjust.
9189
536545f3
AD
91902002-07-03 Akim Demaille <akim@epita.fr>
9191
9192 * src/output.c (prepare_actions): Free `tally' and `width'.
9193 (prepare_actions): Allocate and free `order'.
9194 * src/symtab.c (symbols_free): Free `symbols'.
9195 * src/scan-gram.l (scanner_free): Clear Flex's scanners memory.
9196 * src/output.c (m4_invoke): Move to...
9197 * src/scan-skel.l: here.
9198 (<<EOF>>): Close yyout, and free its name.
9199
8b752b00
AD
92002002-07-03 Akim Demaille <akim@epita.fr>
9201
9202 Fix some memory leaks, and fix a bug: state 0 was examined twice.
9203
9204 * src/LR0.c (new_state): Merge into...
9205 (state_list_append): this.
9206 (new_states): Merge into...
9207 (generate_states): here.
9208 (set_states): Don't ensure a proper `errs' state member here, do it...
9209 * src/conflicts.c (conflicts_solve): here.
9210 * src/state.h, src/state.c: Comment changes.
9211 (state_t): Rename member `shifts' as `transitions'.
9212 Adjust all dependencies.
9213 (errs_new): For consistency, also take the values as argument.
9214 (errs_dup): Remove.
9215 (state_errs_set): New.
9216 (state_reductions_set, state_transitions_set): Assert that no
9217 previous value was assigned.
9218 (state_free): New.
9219 (states_free): Use it.
9220 * src/conflicts.c (resolve_sr_conflict): Don't use an `errs_t' as
9221 temporary storage: use `errs' and `nerrs' as elsewhere.
9222 (set_conflicts): Allocate and free this `errs'.
9223
613f5e1a
AD
92242002-07-02 Akim Demaille <akim@epita.fr>
9225
9226 * lib/libiberty.h: New.
9227 * lib: Update the bitset implementation from upstream.
9228 * src/closure.c, src/lalr.c, src/output.c, src/print_graph.c,
9229 * src/state.c: Use BITSET_FOR_EACH, not BITSET_EXECUTE.
9230 * src/main.c: Adjust bitset stats calls.
9231
26e0cadc
PE
92322002-07-01 Paul Eggert <eggert@twinsun.com>
9233
9234 * src/scan-gram.l (<SC_ESCAPED_CHARACTER>): Convert to unsigned
9235 char, so that negative chars don't collide with $.
9236
1154cced
AD
92372002-06-30 Akim Demaille <akim@epita.fr>
9238
9239 Have the GLR tests be `warning' checked, and fix the warnings.
9240
9241 * data/glr.c (YYFPRINTF): Always define it, not only when YYDEBUG
9242 (yyuserAction, yyreportAmbiguity): `Use' all the arguments.
9243 (yyremoveDeletes): `yyi' and `yyj' are size_t.
9244 Use YYFPRINTF when under if (YYDEBUG) to avoid empty `if' bodies.
9245 (yyaddDeferredAction): static.
9246 (yyglrReduce): yyi, yyk, amd yyposn are size_t.
9247 (yyreportParseError): yyprefix is const.
9248 yytokenp is used only when verbose.
9249 (yy__GNUC__): Replace with __GNUC__.
9250 (yypdumpstack): yyi is size_t.
9251 (yypreference): Un-yy local variables and arguments, to avoid
9252 clashes with `yyr1'. Anyway, we are not in the user name space.
9253 (yytname_size): be an int, as is compared with ints.
9254 * tests/testsuite.at (AT_COMPILE, AT_PARSER_CHECK): New.
9255 Use them.
9256 * tests/cxx-gram.at: Use quotation to protect $1.
9257 Use AT_COMPILE to enable warnings hunts.
9258 Prototype yylex and yyerror.
9259 `Use' argc.
9260 Include `string.h', not `strings.h'.
9261 Produce and prototype stmtMerge only when used.
9262 yylex takes a location.
9263
97650f4e
AD
92642002-06-30 Akim Demaille <akim@epita.fr>
9265
9266 We spend a lot of time in quotearg, in particular when --verbose.
9267
9268 * src/symtab.c (symbol_get): Store a quoted version of the key.
9269 (symbol_tag_get, symbol_tag_get_n, symbol_tag_print): Remove.
9270 Adjust all callers.
9271
d2576365
AD
92722002-06-30 Akim Demaille <akim@epita.fr>
9273
9274 * src/state.h (reductions_t): Rename member `nreds' as num.
9275 (errs_t): Rename members `nerrs' and `errs' as `num' and `symbols'.
9276 * src/state.c (ERRS_ALLOC, REDUCTIONS_ALLOC): Use the correct types.
9277
ccaf65bc
AD
92782002-06-30 Akim Demaille <akim@epita.fr>
9279
9280 * src/state.h, src/state.c (shift_t, SHIFT_SYMBOL, SHIFT_IS_SHIFT)
9281 (SHIFT_IS_GOTO, SHIFT_IS_ERROR, SHIFT_DISABLE, SHIFT_IS_DISABLED)
9282 (shifts_to): Rename as...
9283 (transition_t, TRANSITION_SYMBOL, TRANSITION_IS_TRANSITION)
9284 (TRANSITION_IS_GOTO, TRANSITION_IS_ERROR, TRANSITION_DISABLE)
9285 (TRANSITION_IS_DISABLED, transitions_to): these.
9286
87675353
AD
92872002-06-30 Akim Demaille <akim@epita.fr>
9288
9289 * src/print.c (print_shifts, print_gotos): Merge into...
9290 (print_transitions): this.
9291 (print_transitions, print_errs, print_reductions): Align the
9292 lookaheads columns.
9293 (print_core, print_transitions, print_errs, print_state,
9294 print_grammar): Output empty lines separator before, not after.
9295 (state_default_rule_compute): Rename as...
9296 (state_default_rule): this.
9297 * tests/conflicts.at (Defaulted Conflicted Reduction),
9298 (Unresolved SR Conflicts, Resolved SR Conflicts): Adjust.
9299 * tests/regression.at (Rule Line Numbers, Web2c Report): Adjust.
9300
ce4ccb4b
AD
93012002-06-30 Akim Demaille <akim@epita.fr>
9302
9303 Display items as we display rules.
9304
9305 * src/gram.h, src/gram.c (rule_lhs_print): New.
9306 * src/gram.c (grammar_rules_partial_print): Use it.
9307 * src/print.c (print_core): Likewise.
9308 * tests/conflicts.at (Defaulted Conflicted Reduction),
9309 (Unresolved SR Conflicts): Adjust.
9310 (Unresolved SR Conflicts): Adjust and rename as...
9311 (Resolved SR Conflicts): this, as was meant.
9312 * tests/regression.at (Web2c Report): Adjust.
9313
bc933ef1
AD
93142002-06-30 Akim Demaille <akim@epita.fr>
9315
9316 * src/print.c (state_default_rule_compute): New, extracted from...
9317 (print_reductions): here.
9318 Pessimize, but clarify the code.
9319 * tests/conflicts.at (Defaulted Conflicted Reduction): New.
9320
53d4308d
AD
93212002-06-30 Akim Demaille <akim@epita.fr>
9322
9323 * src/output.c (action_row): Let default_rule be always a rule
9324 number.
9325
574fb2d5
AD
93262002-06-30 Akim Demaille <akim@epita.fr>
9327
9328 * src/closure.c (print_firsts, print_fderives, closure):
9329 Use BITSET_EXECUTE.
9330 * src/lalr.c (lookaheads_print): Likewise.
9331 * src/state.c (state_rule_lookaheads_print): Likewise.
9332 * src/print_graph.c (print_core): Likewise.
9333 * src/print.c (print_reductions): Likewise.
9334 * src/output.c (action_row): Likewise.
9335 Use SHIFT_IS_DISABLED, SHIFT_IS_SHIFT and SHIFT_SYMBOL.
9336
05811fd7
AD
93372002-06-30 Akim Demaille <akim@epita.fr>
9338
9339 * src/print_graph.c: Use report_flag.
9340
0e4d5753
AD
93412002-06-30 Akim Demaille <akim@epita.fr>
9342
9343 * src/lalr.c (traverse, digraph, matrix_print, transpose): Move
9344 to...
9345 * src/relation.h, src/relation.c (traverse, relation_digraph)
9346 (relation_print, relation_transpose): New.
9347
24c7d800
AD
93482002-06-30 Akim Demaille <akim@epita.fr>
9349
9350 * src/state.h, src/state.c (shifts_to): New.
9351 * src/lalr.c (build_relations): Use it.
9352
9222837b
AD
93532002-06-30 Akim Demaille <akim@epita.fr>
9354
9355 * src/gram.h (rule_number_t, RULE_NUMBER_MAX, int_of_rule_number)
9356 (item_number_of_rule_number, rule_number_of_item_number): New.
9357 * src/LR0.c, src/closure.c, src/derives.c, src/derives.h,
9358 * src/gram.c, src/lalr.c, src/nullable.c, src/output.c, src/print.c,
9359 * src/print_graph.c, src/reader.c, src/reduce.c, src/reduce.h:
9360 Propagate their use.
9361 Much remains to be done, in particular wrt `shorts' from types.h.
9362
260008e5
AD
93632002-06-30 Akim Demaille <akim@epita.fr>
9364
9365 * src/symtab.c (symbol_new): Initialize the `printer' member.
9366
8a731ca8
AD
93672002-06-30 Akim Demaille <akim@epita.fr>
9368
9369 * src/LR0.c (save_reductions): Remove, replaced by...
9370 * src/state.h, src/state.c (state_reductions_set): New.
9371 (reductions, errs): Rename as...
9372 (reductions_t, errs_t): these.
9373 Adjust all dependencies.
9374
32e1e0a4
AD
93752002-06-30 Akim Demaille <akim@epita.fr>
9376
9377 * src/LR0.c (state_list_t, state_list_append): New.
9378 (first_state, last_state): Now symbol_list_t.
9379 (this_state): Remove.
9380 (new_itemsets, append_states, save_reductions): Take a state_t as
9381 argument.
9382 (set_states, generate_states): Adjust.
9383 (save_shifts): Remove, replaced by...
9384 * src/state.h, src/state.c (state_shifts_set): New.
9385 (shifts): Rename as...
9386 (shifts_t): this.
9387 Adjust all dependencies.
9388 * src/state.h (state_t): Remove the `next' member.
9389
e5fb6710
AD
93902002-06-30 Akim Demaille <akim@epita.fr>
9391
9392 * src/vcg.c (quote): Use slot 2, since we often pass symbol tag
9393 escaped in slot 0.
9394
c7ca99d4
AD
93952002-06-30 Akim Demaille <akim@epita.fr>
9396
9397 Use hash.h for the state hash table.
9398
9399 * src/LR0.c (STATE_HASH_SIZE, state_hash): Remove.
9400 (allocate_storage): Use state_hash_new.
9401 (free_storage): Use state_hash_free.
9402 (new_state, get_state): Adjust.
9403 * src/lalr.h, src/lalr.c (states): Move to...
9404 * src/states.h (state_t): Remove the `link' member, no longer
9405 used.
9406 * src/states.h, src/states.c: here.
9407 (state_hash_new, state_hash_free, state_hash_lookup)
9408 (state_hash_insert, states_free): New.
9409 * src/states.c (state_table, state_compare, state_hash): New.
9410 * src/output.c (output_actions): Do not free states now, since we
9411 still need to know the final_state number in `prepare', called
9412 afterwards. Do it...
9413 * src/main.c (main): here: call states_free after `output'.
9414
df0e7316
AD
94152002-06-30 Akim Demaille <akim@epita.fr>
9416
9417 * src/state.h, src/state.c (state_new): New, extracted from...
9418 * src/LR0.c (new_state): here.
9419 * src/state.h (STATE_ALLOC): Move to...
9420 * src/state.c: here.
9421 * src/LR0.h, src/LR0.c (nstates, final_state): Move to...
9422 * src/state.h, src/state.c: here.
9423
39f41916
AD
94242002-06-30 Akim Demaille <akim@epita.fr>
9425
9426 * src/reader.c (gensym): Rename as...
9427 * src/symtab.h, src/symtab.c (dummy_symbol_get): this.
9428 (getsym): Rename as...
9429 (symbol_get): this.
9430
d57650a5
AD
94312002-06-30 Akim Demaille <akim@epita.fr>
9432
9433 * src/state.h (state_number_t, STATE_NUMBER_MAX): New.
9434 * src/LR0.c, src/LR0.h, src/conflicts.c, src/lalr.c, src/lalr.h,
9435 * src/output.c, src/print.c, src/print_graph.c: Propagate.
9436 * src/LR0.h, src/LR0.h (final_state): Is a state_t*.
9437
5a08f1ce
AD
94382002-06-30 Akim Demaille <akim@epita.fr>
9439
9440 Make the test suite pass with warnings checked.
9441
9442 * tests/actions.at (Printers and Destructors): Improve.
9443 Avoid unsigned vs. signed issues.
9444 * tests/calc.at: Don't exercise the scanner here, do it...
9445 * tests/input.at (Torturing the Scanner): here.
9446
720623af
PH
94472002-06-28 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
9448
88e7e941 9449 * data/glr.c: Correct typo in Emacs-mode directive. Slightly
720623af
PH
9450 reorganize first lines parallel to yacc.c.
9451
fb8135fa
AD
94522002-06-28 Akim Demaille <akim@epita.fr>
9453
9454 * data/c.m4 (b4_copyright, b4_sint_type, b4_uint_type, b4_token_define)
9455 (b4_token_enum, b4_token_defines): New, factored from...
9456 * data/lalr1.cc, data/yacc.c, glr.c: here.
9457
41442480
AD
94582002-06-28 Akim Demaille <akim@epita.fr>
9459
9460 * data/yacc.c (yydestruct, yysymprint): Pacify GCC warnings for
9461 unused variables.
9462 * src/output.c (merger_output): static.
9463
e0e5bf84
AD
94642002-06-28 Akim Demaille <akim@epita.fr>
9465
ba0fe3c7 9466 * src/reader.h: s/grammer_current_rule_merge_set/grammar_.../.
e0e5bf84
AD
9467 * src/conflicts.c (conflicts_total_count): `i' is unsigned, to
9468 pacify GCC.
9469 * src/output.c (save_row): Initialize all the variables to pacify GCC.
e0e5bf84 9470
676385e2
PH
94712002-06-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
9472
9473 Accumulated changelog for new GLR parsing features.
9474
6a254321 9475 * src/conflicts.c (count_total_conflicts): Change name to
676385e2
PH
9476 conflicts_total_count.
9477 * src/conflicts.h: Ditto.
9478 * src/output.c (token_actions): Use the new name.
9479 (output_conflicts): Change conflp => conflict_list_heads, and
9480 confl => conflict_list for better readability.
9481 * data/glr.c: Use the new names.
9482 * NEWS: Add self to GLR announcement.
e0e5bf84 9483
676385e2
PH
9484 * src/reader.c (free_merger_functions): Cleanup: XFREE->free.
9485
9486 * doc/bison.texinfo (GLR Parsers): Make corrections suggested by
9487 Akim Demaille.
9488
9489 * data/bison.glr: Change name to glr.c
9490 * data/glr.c: Renamed from bison.glr.
9491 * data/Makefile.am: Add glr.c
e0e5bf84
AD
9492
9493 * src/getargs.c:
9494
676385e2 9495 * src/symlist.h: Add dprec and merger fields to symbol_list_s.
ba0fe3c7 9496 * src/symlist.c (symbol_list_new): Initialize dprec and merger fields.
e0e5bf84 9497
676385e2
PH
9498 Originally 2002-06-16 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
9499
9500 * data/bison.glr: Be sure to restore the
9501 current #line when returning to the skeleton contents after having
9502 exposed the input file's #line.
9503
9504 Originally 2002-06-13 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
9505
9506 * data/bison.glr: Bring up to date with changes to bison.simple.
9507
9508 Originally 2002-06-03 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
9509
9510 * data/bison.glr: Correct definitions that use b4_prefix.
9511 Various reformatting.
9512 (GLRStack): Make yychar (in YYPURE case) and yytokenp as part of stack.
9513 (yyreportParseError, yyrecoverParseError, yyprocessOneStack): remove
9514 yytokenp argument; now part of stack.
9515 (yychar): Define to behave as documented.
9516 (yyclearin): Ditto.
e0e5bf84 9517
676385e2
PH
9518 Originally 2002-05-14 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
9519
9520 * src/reader.h: Add declaration for free_merger_functions.
9521
9522 * src/reader.c (merge_functions): New variable.
9523 (get_merge_function): New function.
9524 (free_merger_functions): New function.
9525 (readgram): Check for %prec that is not followed by a symbol.
9526 Handle %dprec and %merge declarations.
9527 (packgram): Initialize dprec and merger fields in rules array.
9528
9529 * src/output.c (conflict_tos, conflrow, conflict_table, conflict_list,
9530 conflict_list_cnt, conflict_list_free): New variables.
9531 (table_grow): Also grow conflict_table.
e0e5bf84 9532 (prepare_rules): Output dprec and merger tables.
676385e2 9533 (conflict_row): New function.
e0e5bf84 9534 (action_row): Output conflict lists for GLR parser. Don't use
676385e2
PH
9535 default reduction in conflicted states for GLR parser so that there
9536 are spaces for the conflict lists.
9537 (save_row): Also save conflict information.
9538 (token_actions): Allocate conflict list.
9539 (merger_output): New function.
9540 (pack_vector): Pack conflict table, too.
9541 (output_conflicts): New function to output yyconflp and yyconfl.
9542 (output_check): Allocate conflict_tos.
9543 (output_actions): Output conflict tables, also.
9544 (output_skeleton): Output b4_mergers definition.
9545 (prepare): Output b4_max_rhs_length definition.
9546 Use 'bison.glr' as default skeleton for GLR parsers.
9547
9548 * src/gram.c (glr_parser): New flag.
9549 (grammar_free): Call free_merger_functions.
9550
9551 * src/conflicts.c (count_rr_conflicts): Augment to optionally count
9552 all pairs of conflicting reductions, rather than just all tokens
9553 causing conflicts. Needed to size conflict tables.
e0e5bf84 9554 (conflicts_output): Modify call to count_rr_conflicts for new
676385e2
PH
9555 interface.
9556 (conflicts_print): Ditto.
9557 (count_total_conflicts): New function.
9558
9559 * src/reader.h (merger_list): New type.
9560 (merge_functions): New variable.
9561
9562 * src/lex.h (tok_dprec, tok_merge): New token types.
9563
9564 * src/gram.h (rule_s): Add dprec and merger fields.
9565 (glr_parser): New flag.
9566
9567 * src/conflicts.h (count_total_conflicts): New function.
9568
9569 * src/options.c (option_table): Add %dprec, %merge, and %glr-parser.
9570
9571 * doc/bison.texinfo (Generalized LR Parsing): New section.
9572 (GLR Parsers): New section.
9573 (Language and Grammar): Mention GLR parsing.
9574 (Table of Symbols): Add %dprec, %glr-parser, %merge, GLR
9575 Correct typo ("tge" -> "the").
9576
9577 * data/bison.glr: New skeleton for GLR parsing.
9578
9579 * tests/cxx-gram.at: New tests for GLR parsing.
9580
9581 * tests/testsuite.at: Include cxx-gram.at.
9582
9583 * tests/Makefile.am: Add cxx-gram.at.
e0e5bf84 9584
676385e2
PH
9585 * src/parse-gram.y:
9586
9587 * src/scan-gram.l: Add %dprec, %glr-parser, %merge.
9588
9589 * src/parse-gram.y: Grammar for %dprec, %merge, %glr-parser.
e0e5bf84 9590
b5480d74 95912002-06-27 Akim Demaille <akim@epita.fr>
e2aaf4c4
AD
9592
9593 * src/options.h, src/options.c: Remove.
9594 * src/getargs.c (short_options, long_options): New.
9595
60491a94
AD
95962002-06-27 Akim Demaille <akim@epita.fr>
9597
9598 * data/bison.simple, data/bison.c++: Rename as...
9599 * data/yacc.c, data/lalr1.cc: these.
9600 * doc/bison.texinfo (Environment Variables): Remove.
9601
9be0c25b
AD
96022002-06-25 Raja R Harinath <harinath@cs.umn.edu>
9603
9604 * src/getargs.c (report_argmatch): Initialize strtok().
9605
1ae72863
AD
96062002-06-20 Akim Demaille <akim@epita.fr>
9607
9608 * data/bison.simple (b4_symbol_actions): New, replaces...
9609 (b4_symbol_destructor, b4_symbol_printer): these.
9610 (yysymprint): Be sure to call YYPRINT only for tokens, and using
9611 user token numbers.
9612
87542d29
AD
96132002-06-20 Akim Demaille <akim@epita.fr>
9614
9615 * data/bison.simple (yydestructor): Rename as...
9616 (yydestruct): this.
9617
1a31ed21
AD
96182002-06-20 Akim Demaille <akim@epita.fr>
9619
9620 * src/symtab.h, src/symtab.c (symbol_type_set)
9621 (symbol_destructor_set, symbol_precedence_set): The location is
9622 the last argument.
9623 Adjust all callers.
9624
e776192e
AD
96252002-06-20 Akim Demaille <akim@epita.fr>
9626
9627 * src/parse-gram.y (YYPRINT, yyprint): Don't mess with the parser
9628 internals.
9629 * src/reader.h, src/reader.c (grammar_current_rule_prec_set):
9630 Takes a location.
9631 * src/symtab.h, src/symtab.c (symbol_class_set)
9632 (symbol_user_token_number_set): Likewise.
9633 Adjust all callers.
9634 Promote complain_at.
9635 * tests/input.at (Type Clashes): Adjust.
9636
5c1180b3
AD
96372002-06-20 Akim Demaille <akim@epita.fr>
9638
9639 * data/bison.simple (YYLEX): Fix the declaration when
9640 %pure-parser.
9641
e3170060
AD
96422002-06-20 Akim Demaille <akim@epita.fr>
9643
9644 * data/bison.simple (yysymprint): Don't print the token number,
9645 just its name.
9646 * tests/actions.at (Destructors): Rename as...
9647 (Printers and Destructors): this.
9648 Also exercise %printer.
9649
253862fd
AD
96502002-06-20 Akim Demaille <akim@epita.fr>
9651
9652 * data/bison.simple (YYDSYMPRINT): New.
9653 Use it to remove many of the #if YYDEBUG/if (yydebug).
9654
366eea36
AD
96552002-06-20 Akim Demaille <akim@epita.fr>
9656
9657 * src/symtab.h, src/symtab.c (symbol_t): printer and
9658 printer_location are new members.
9659 (symbol_printer_set): New.
9660 * src/parse-gram.y (PERCENT_PRINTER): New token.
9661 Handle its associated rule.
9662 * src/scan-gram.l: Adjust.
9663 (handle_destructor_at, handle_destructor_dollar): Rename as...
9664 (handle_symbol_code_at, handle_symbol_code_dollar): these.
9665 * src/output.c (symbol_printers_output): New.
9666 (output_skeleton): Call it.
9667 * data/bison.simple (yysymprint): New. Cannot be named yyprint
9668 since there are already many grammar files with a user `yyprint'.
9669 Replace the calls to YYPRINT to calls to yysymprint.
9670 * tests/calc.at: Adjust.
9671 * tests/torture.at (AT_DATA_STACK_TORTURE): Remove YYPRINT: it was
9672 taking advantage of parser very internal details (stack size!).
9673
4f25ebb0
AD
96742002-06-20 Akim Demaille <akim@epita.fr>
9675
9676 * src/scan-gram.l: Complete the scanner with the missing patterns
9677 to pacify Flex.
9678 Use `quote' and `symbol_tag_get' where appropriate.
9679
93b68a0e
AD
96802002-06-19 Akim Demaille <akim@epita.fr>
9681
9682 * tests/actions.at (Destructors): Augment to test locations.
9683 * data/bison.simple (yydestructor): Pass it the current location
9684 if locations are enabled.
9685 Prototype only when __STDC__ or C++.
9686 Change the argument names to move into the yy name space: there is
9687 user code here.
9688
58612f1d
AD
96892002-06-19 Akim Demaille <akim@epita.fr>
9690
74310291
AD
9691 * data/bison.simple (b4_pure_if): New.
9692 Use it instead of #ifdef YYPURE.
9693
96942002-06-19 Akim Demaille <akim@epita.fr>
9695
9696 * data/bison.simple (b4_location_if): New.
58612f1d
AD
9697 Use it instead of #ifdef YYLSP_NEEDED.
9698
f25bfb75
AD
96992002-06-19 Akim Demaille <akim@epita.fr>
9700
9701 Prepare @$ in %destructor, but currently don't bind it in the
9702 skeleton, as %location use is not cleaned up yet.
9703
9704 * src/scan-gram.l (handle_dollar, handle_destructor_at)
9705 (handle_action_at): New.
9706 (handle_at, handle_action_dollar, handle_destructor_dollar): Take
9707 a braced_code_t and a location as additional arguments.
9708 (handle_destructor_dollar): Instead of requiring `b4_eval', just
9709 unquote one when outputting `b4_dollar_dollar'.
9710 Adjust callers.
9711 * data/bison.simple (b4_eval): Remove.
9712 (b4_symbol_destructor): Adjust.
9713 * tests/input.at (Invalid @n): Adjust.
9714
c732d2c6
AD
97152002-06-19 Zack Weinberg <zack@codesourcery.com>
9716
9717 * doc/bison.texinfo: Document ability to have multiple
9718 prologue sections.
9719
8c165d89
AD
97202002-06-18 Akim Demaille <akim@epita.fr>
9721
9722 * src/files.c (compute_base_names): When computing the output file
9723 names from the input file name, strip the directory part.
9724
ca98bf57
AD
97252002-06-18 Akim Demaille <akim@epita.fr>
9726
9727 * data/bison.simple.new: Comment changes.
9728 Reported by Andreas Schwab.
9729
0bfb02ff
AD
97302002-06-18 Matt Kraai <kraai@alumni.cmu.edu>
9731
9732 * data/bison.simple (yyoverflowlab): #ifndef yyoverflow, so that
9733 there are no `label `yyoverflowlab' defined but not used' warnings
9734 when yyoverflow is defined.
9735
24c0aad7
AD
97362002-06-18 Akim Demaille <akim@epita.fr>
9737
9738 * src/symtab.h, src/symtab.c (symbol_t): destructor_location is a
9739 new member.
9740 (symbol_destructor_set): Adjust.
9741 * src/output.c (symbol_destructors_output): Output the destructor
9742 locations.
9743 Output the symbol name.
9744 * data/bison.simple (b4_symbol_destructor): Adjust.
9745
5719c109
AD
97462002-06-18 Cris Bailiff <c.bailiff@awayweb.com>
9747 and Akim Demaille <akim@epita.fr>
9748
9749 * data/bison.simple.new (yyerrlab1): Be sure to pop and destroy
9750 what's left on the stack when the error recovery hits EOF.
9751 * tests/actions.at (Destructors): Complete to exercise this case.
9752
9280d3ef
AD
97532002-06-17 Akim Demaille <akim@epita.fr>
9754
9755 * data/m4sugar/m4sugar.m4 (m4_map): Recognize when the list of
9756 arguments is really empty, not only equal to `[]'.
9757 * src/symtab.h, src/symtab.c (symbol_t): `destructor' is a new
9758 member.
9759 (symbol_destructor_set): New.
9760 * src/output.c (symbol_destructors_output): New.
9761 * src/reader.h (brace_code_t, current_braced_code): New.
9762 * src/scan-gram.l (BRACED_CODE): Use it to branch on...
9763 (handle_dollar): Rename as...
9764 (handle_action_dollar): this.
9765 (handle_destructor_dollar): New.
9766 * src/parse-gram.y (PERCENT_DESTRUCTOR): New.
9767 (grammar_declaration): Use it.
9768 * data/bison.simple (yystos): Is always defined.
9769 (yydestructor): New.
9770 * tests/actions.at (Destructors): New.
9771 * tests/calc.at (_AT_CHECK_CALC_ERROR): Don't rely on egrep.
9772
dafdc66f
AD
97732002-06-17 Akim Demaille <akim@epita.fr>
9774
9775 * src/symlist.h, src/symlist.c (symbol_list_length): New.
9776 * src/scan-gram.l (handle_dollar, handle_at): Compute the
9777 rule_length only when needed.
9778 * src/output.c (actions_output, token_definitions_output): Output
9779 the full M4 block.
9780 * src/symtab.c: Don't access directly to the symbol tag, use
9781 symbol_tag_get.
9782 * src/parse-gram.y: Use symbol_list_free.
9783
56c47203
AD
97842002-06-17 Akim Demaille <akim@epita.fr>
9785
9786 * src/reader.h, src/reader.c (symbol_list, symbol_list_new)
9787 (symbol_list_prepend, get_type_name): Move to...
9788 * src/symlist.h, src/symlist.c (symbol_list_t, symbol_list_new)
9789 (symbol_list_prepend, symbol_list_n_type_name_get): here.
9790 Adjust all callers.
9791 (symbol_list_free): New.
9792 * src/scan-gram.l (handle_dollar): Takes a location.
9793 * tests/input.at (Invalid $n): Adjust.
9794
1e0bab92
AD
97952002-06-17 Akim Demaille <akim@epita.fr>
9796
9797 * src/reader.h, src/reader.c (symbol_list_new): Export it.
9798 (symbol_list_prepend): New.
9799 * src/parse-gram.y (%union): `list' is a new member.
9800 (symbols.1): New, replaces...
9801 (terms_to_prec.1, nterms_to_type.1): these.
9802 * src/symtab.h, src/symtab.c (symbol_type_set, symbol_precedence_set)
9803 Take a location as additional argument.
9804 Adjust all callers.
9805
04e60654
AD
98062002-06-15 Akim Demaille <akim@epita.fr>
9807
9808 * src/parse-gram.y: Move %token in the declaration section so that
9809 we don't depend upon CVS Bison.
9810
10e5b8bd
AD
98112002-06-15 Akim Demaille <akim@epita.fr>
9812
9813 * src/state.h, src/state.c (state_rule_lookaheads_print): New.
9814 * src/print.c (print_core): Use it.
9815
9801d40c
AD
98162002-06-15 Akim Demaille <akim@epita.fr>
9817
9818 * src/conflicts.c (log_resolution): Accept the rule involved in
9819 the sr conflicts instead of the lookahead number that points to
9820 that rule.
9821 (flush_reduce): Accept the current lookahead vector as argument,
9822 instead of the index in LA.
9823 (resolve_sr_conflict): Accept the current number of lookahead
9824 bitset to consider for the STATE, instead of the index in LA.
9825 (set_conflicts): Adjust.
9826 * src/lalr.c, src/lalr.h, src/state.h: Comment changes.
9827
c0263492
AD
98282002-06-15 Akim Demaille <akim@epita.fr>
9829
9830 * src/state.h (state_t): Replace the `lookaheadsp' member, a
9831 short, with `lookaheads' (bitsetv), `lookaheads_rule' (rule_t**).
9832 Adjust all dependencies.
9833 * src/lalr.c (initialize_lookaheads): Split into...
9834 (states_lookaheads_count, states_lookaheads_initialize): these.
9835 (lalr): Adjust.
9836
9757c359
AD
98372002-06-15 Akim Demaille <akim@epita.fr>
9838
9839 * src/gram.h, src/gram.c (grammar_rules_partial_print): New, eved
9840 out of...
9841 (grammar_rules_print): here.
9842 * src/reduce.c (reduce_output): Use it.
9843 * tests/reduce.at (Useless Rules, Reduced Automaton)
9844 (Underivable Rules): Adjust.
9845
6b98e4b5
AD
98462002-06-15 Akim Demaille <akim@epita.fr>
9847
9848 Copy BYacc's nice way to report the grammar.
9849
9850 * src/gram.h, src/gram.c (grammar_rhs_print, grammar_rules_print):
9851 New.
9852 Don't print the rules' location, it is confusing and useless.
9853 (rule_print): Use grammar_rhs_print.
9854 * src/print.c (print_grammar): Use grammar_rules_print.
9855
6b98e4b5
AD
98562002-06-15 Akim Demaille <akim@epita.fr>
9857
9858 Complete and rationalize `useless thing' warnings.
9859
9860 * src/symtab.h, src/symtab.c (symbol_tag_get, symbol_tag_get_n)
9861 (symbol_tag_print): New.
9862 Use them everywhere in place of accessing directly the tag member.
9863 * src/gram.h, src/gram.c (rule_print): New.
9864 Use it where a rule used to be printed `by hand'.
9865 * src/reduce.c (nonterminals_reduce): Report the use nonterminals.
9866 (reduce_grammar_tables): Report the useless rules.
9867 (reduce_print): Useless things are a warning, not an error.
9868 Report it as such.
9869 * tests/reduce.at (Useless Nonterminals, Useless Rules):
9870 (Reduced Automaton, Underivable Rules): Adjust.
9871 * tests/regression.at (Web2c Report, Web2c Report): Adjust.
9872 * tests/conflicts.at (Unresolved SR Conflicts)
9873 (Solved SR Conflicts): Adjust.
9874
ee000ba4
AD
98752002-06-15 Akim Demaille <akim@epita.fr>
9876
9877 Let symbols have a location.
9878
9879 * src/symtab.h, src/symtab.c (symbol_t): Location is a new member.
9880 (getsym): Adjust.
9881 Adjust all callers.
9882 * src/complain.h, src/complain.c (complain_at, fatal_at, warn_at):
9883 Use location_t, not int.
9884 * src/symtab.c (symbol_check_defined): Take advantage of the
9885 location.
9886 * tests/regression.at (Invalid inputs): Adjust.
9887
8efe435c
AD
98882002-06-15 Akim Demaille <akim@epita.fr>
9889
9890 * src/parse-gram.y (YYLLOC_DEFAULT, current_lhs_location): New.
9891 (input): Don't try to initialize yylloc here, do it in the
9892 scanner.
9893 * src/scan-gram.l (YY_USER_INIT): Initialize yylloc.
9894 * src/gram.h (rule_t): Change line and action_line into location
9895 and action_location, of location_t type.
9896 Adjust all dependencies.
9897 * src/location.h, src/location.c (empty_location): New.
9898 * src/reader.h, src/reader.c (grammar_start_symbol_set)
9899 (grammar_symbol_append, grammar_rule_begin, grammar_rule_end)
9900 (grammar_current_rule_symbol_append)
9901 (grammar_current_rule_action_append): Expect a location as argument.
9902 * src/reader.c (grammar_midrule_action): Adjust to attach an
9903 action's location as dummy symbol location.
9904 * src/symtab.h, src/symtab.c (startsymbol_location): New.
9905 * tests/regression.at (Web2c Report, Rule Line Numbers): Adjust
9906 the line numbers.
9907
1921f1d7
AD
99082002-06-14 Akim Demaille <akim@epita.fr>
9909
9910 Grammar declarations may be found in the grammar section.
9911
9912 * src/parse-gram.y (rules_or_grammar_declaration): New.
9913 (declarations): Each declaration may end with a semicolon, not
9914 just...
9915 (grammar_declaration): `"%union"'.
9916 (grammar): Branch to rules_or_grammar_declaration.
9917
4515534c
AD
99182002-06-14 Akim Demaille <akim@epita.fr>
9919
9920 * src/main.c (main): Invoke scanner_free.
9921
f958596b
AD
99222002-06-14 Akim Demaille <akim@epita.fr>
9923
9924 * src/output.c (m4_invoke): Extracted from...
9925 (output_skeleton): here.
9926 Free tempfile.
9927
2c569025
AD
99282002-06-14 Akim Demaille <akim@epita.fr>
9929
9930 * src/parse-gram.y (directives, directive, gram)
9931 (grammar_directives, precedence_directives, precedence_directive):
9932 Rename as...
9933 (declarations, declaration, grammar, grammar_declaration)
9934 (precedence_declaration, precedence_declarator): these.
9935 (symbol_declaration): New.
9936
592e8d4d
AD
99372002-06-14 Akim Demaille <akim@epita.fr>
9938
9939 * src/files.c (action_obstack): Remove, unused.
9940 (output_obstack): Remove it, and all its dependencies, as it is no
9941 longer needed.
9942 * src/reader.c (epilogue_set): Build the epilogue in the
9943 muscle_obstack.
9944 * src/output.h, src/output.c (muscle_obstack): Move to...
9945 * src/muscle_tab.h, src/muscle_tab.h: here.
9946 (muscle_init): Initialize muscle_obstack.
9947 (muscle_free): New.
9948 * src/main.c (main): Call it.
9949
0c15323d
AD
99502002-06-14 Akim Demaille <akim@epita.fr>
9951
9952 * src/location.h: New, extracted from...
9953 * src/reader.h: here.
9954 * src/Makefile.am (noinst_HEADERS): Merge into
9955 (bison_SOURCES): this.
9956 Add location.h.
9957 * src/parse-gram.y: Use location_t instead of Bison's.
9958 * src/reader.h, src/reader.c (prologue_augment, epilogue_set):
9959 Use location_t instead of ints.
9960
e96c9728
AD
99612002-06-14 Akim Demaille <akim@epita.fr>
9962
9963 * data/bison.simple, data/bison.c++: Be sure to restore the
9964 current #line when returning to the skeleton contents after having
9965 exposed the input file's #line.
9966
75d1fe16
AD
99672002-06-12 Akim Demaille <akim@epita.fr>
9968
9969 * src/scan-gram.l (SC_BRACED_CODE): Don't use `<.*>', it is too
9970 eager.
9971 * tests/actions.at (Exotic Dollars): New.
9972
6c35d22c
AD
99732002-06-12 Akim Demaille <akim@epita.fr>
9974
9975 * src/scan-gram.l (SC_PROLOGUE): Don't eat characters amongst
9976 ['"/] too eagerly.
9977 * tests/input.at (Torturing the Scanner): New.
9978
1d6412ad
AD
99792002-06-11 Akim Demaille <akim@epita.fr>
9980
9981 * src/scan-gram.l (YY_OBS_INIT): Remove, replace with...
9982 [SC_COMMENT,SC_STRING,SC_CHARACTER,SC_BRACED_CODE,SC_PROLOGUE]
9983 [SC_EPILOGUE]: Output the quadrigraphs only when not in a comment.
9984 * src/reader.h, src/scan-gram.l (scanner_initialize): this.
9985 * src/reader.c (reader): Use it.
9986
4cdb01db
AD
99872002-06-11 Akim Demaille <akim@epita.fr>
9988
9989 * src/scan-gram.l (YY_OBS_FINISH): Don't set yylval.
9990 Adjust all callers.
9991 (scanner_last_string_free): New.
9992
44995b2e
AD
99932002-06-11 Akim Demaille <akim@epita.fr>
9994
9995 * src/scan-gram.l (YY_INIT, YY_GROW, YY_FINISH): Rename as...
9996 (YY_OBS_INIT, YY_OBS_GROW, YY_OBS_FINISH): these.
9997 (last_string, YY_OBS_FREE): New.
9998 Use them when returning an ID.
9999
e9955c83
AD
100002002-06-11 Akim Demaille <akim@epita.fr>
10001
10002 Have Bison grammars parsed by a Bison grammar.
10003
10004 * src/reader.c, src/reader.h (prologue_augment): New.
10005 * src/reader.c (copy_definition): Remove.
10006
10007 * src/reader.h, src/reader.c (gram_start_symbol_set, prologue_augment)
10008 (grammar_symbol_append, grammar_rule_begin, grammar_midrule_action)
10009 (grammar_current_rule_prec_set, grammar_current_rule_check)
10010 (grammar_current_rule_symbol_append)
10011 (grammar_current_rule_action_append): Export.
10012 * src/parse-gram.y (symbol_list_new, symbol_list_symbol_append_
10013 (symbol_list_action_append): Remove.
10014 Hook the routines from reader.
10015 * src/scan-gram.l: In INITIAL, characters and strings are tokens.
10016 * src/system.h (ATTRIBUTE_NORETURN, ATTRIBUTE_UNUSED): Now.
10017
10018 * src/reader.c (read_declarations): Remove, unused.
10019
10020 * src/parse-gram.y: Handle the epilogue.
10021 * src/reader.h, src/reader.c (gram_start_symbol_set): Rename as...
10022 (grammar_start_symbol_set): this.
10023 * src/scan-gram.l: Be sure to ``use'' yycontrol to keep GCC quiet.
10024 * src/reader.c (readgram): Remove, unused.
10025 (reader): Adjust to insert eoftoken and axiom where appropriate.
10026
10027 * src/reader.c (copy_dollar): Replace with...
10028 * src/scan-gram.h (handle_dollar): this.
10029 * src/parse-gram.y: Remove `%thong'.
10030
10031 * src/reader.c (copy_at): Replace with...
10032 * src/scan-gram.h (handle_at): this.
10033
10034 * src/complain.h, src/complain.c (warn_at, complain_at, fatal_at):
10035 New.
10036
10037 * src/scan-gram.l (YY_LINES): Keep lineno synchronized for the
10038 time being.
10039
10040 * src/reader.h, src/reader.c (grammar_rule_end): New.
10041
10042 * src/parse.y (current_type, current_class): New.
10043 Implement `%nterm', `%token' support.
10044 Merge `%term' into `%token'.
10045 (string_as_id): New.
10046 * src/symtab.h, src/symtab.c (symbol_make_alias): Don't pass the
10047 type name.
10048
10049 * src/parse-gram.y: Be sure to handle properly the beginning of
10050 rules.
10051
10052 * src/parse-gram.y: Handle %type.
10053 * src/reader.c (grammar_rule_end): Call grammar_current_rule_check.
10054
10055 * src/parse-gram.y: More directives support.
10056 * src/options.c: No longer handle source directives.
10057
10058 * src/parse-gram.y: Fix %output.
10059
10060 * src/parse-gram.y: Handle %union.
10061 Use the prologue locations.
10062 * src/reader.c (parse_union_decl): Remove.
10063
10064 * src/reader.h, src/reader.c (epilogue_set): New.
10065 * src/parse-gram.y: Use it.
10066
10067 * data/bison.simple, data/bison.c++: b4_stype is now either not
10068 defined, then default to int, or to the contents of %union,
10069 without `union' itself.
10070 Adjust.
10071 * src/muscle_tab.c (muscle_init): Don't predefine `stype'.
10072
10073 * src/output.c (actions_output): Don't output braces, as they are
10074 already handled by the scanner.
10075
10076 * src/scan-gram.l (SC_CHARACTER): Set the user_token_number of
10077 characters to themselves.
10078
10079 * tests/reduce.at (Reduced Automaton): End the grammars with %% so
10080 that the epilogue has a proper #line.
10081
10082 * src/parse-gram.y: Handle precedence/associativity.
10083
10084 * src/symtab.c (symbol_precedence_set): Requires the symbol to be
10085 a terminal.
10086 * src/scan-gram.l (SC_BRACED_CODE): Catch strings and characters.
10087 * tests/calc.at: Do not use `%token "foo"' as it makes not sense
10088 at all to define terminals that cannot be emitted.
10089
10090 * src/scan-gram.l: Escape M4 characters.
10091
10092 * src/scan-gram.l: Working properly with escapes in user
10093 strings/characters.
10094
10095 * tests/torture.at (AT_DATA_TRIANGULAR_GRAMMAR)
10096 (AT_DATA_HORIZONTAL_GRAMMAR): Respect the `%token ID NUM STRING'
10097 grammar.
10098 Use more modest sizes, as for the time being the parser does not
10099 release memory, and therefore the process swallows a huge amount
10100 of memory.
10101
10102 * tests/torture.at (AT_DATA_LOOKAHEADS_GRAMMAR): Adjust to the
10103 stricter %token grammar.
10104
10105 * src/symtab.h (associativity): Add `undef_assoc'.
10106 (symbol_precedence_set): Do nothing when passed an undef_assoc.
10107 * src/symtab.c (symbol_check_alias_consistence): Adjust.
10108
10109 * tests/regression.at (Invalid %directive): Remove, as it is now
10110 meaningless.
10111 (Invalid inputs): Adjust to the new error messages.
10112 (Token definitions): The new grammar doesn't allow too many
10113 eccentricities.
10114
10115 * src/lex.h, src/lex.c: Remove.
10116 * src/reader.c (lastprec, skip_to_char, read_signed_integer)
10117 (copy_character, copy_string2, copy_string, copy_identifier)
10118 (copy_comment, parse_token_decl, parse_type_decl, parse_assoc_decl)
10119 (parse_muscle_decl, parse_dquoted_param, parse_skel_decl)
10120 (parse_action): Remove.
10121 * po/POTFILES.in: Adjust.
10122
2e047461
AD
101232002-06-11 Akim Demaille <akim@epita.fr>
10124
cd05d13c 10125 * src/reader.c (parse_action): Don't store directly into the
2e047461
AD
10126 rule's action member: return the action as a string.
10127 Don't require `rule_length' as an argument: compute it.
10128 (grammar_current_rule_symbol_append)
10129 (grammar_current_rule_action_append): New, eved out from
10130 (readgram): here.
10131 Remove `action_flag', `rulelength', unused now.
10132
9af3fbce
AD
101332002-06-11 Akim Demaille <akim@epita.fr>
10134
10135 * src/reader.c (grammar_current_rule_prec_set).
10136 (grammar_current_rule_check): New, eved out from...
10137 (readgram): here.
10138 Remove `xaction', `first_rhs': useless.
10139 * tests/input.at (Type clashes): New.
10140 * tests/existing.at (GNU Cim Grammar): Adjust.
10141
1485e106
AD
101422002-06-11 Akim Demaille <akim@epita.fr>
10143
10144 * src/reader.c (grammar_midrule_action): New, Eved out from
10145 (readgram): here.
10146
da4160c3
AD
101472002-06-11 Akim Demaille <akim@epita.fr>
10148
10149 * src/reader.c (grammar_rule_begin, previous_rule, current_rule):
10150 New.
10151 (readgram): Use them as replacement of inlined code, crule and
10152 crule1.
10153
f6d0f937
AD
101542002-06-11 Akim Demaille <akim@epita.fr>
10155
10156 * src/reader.c (grammar_end, grammar_symbol_append): New.
10157 (readgram): Use them.
10158 Make the use of `p' as local as possible.
10159
69078d4b
AD
101602002-06-10 Akim Demaille <akim@epita.fr>
10161
10162 GCJ's parser requires the tokens to be defined before the prologue.
10163
10164 * data/bison.simple: Output the token definition before the user's
10165 prologue.
10166 * tests/regression.at (Braces parsing, Duplicate string)
10167 (Mixing %token styles): Check the output from bison.
10168 (Early token definitions): New.
10169
5e424082
AD
101702002-06-10 Akim Demaille <akim@epita.fr>
10171
10172 * src/symtab.c (symbol_user_token_number_set): Don't complain when
10173 assigning twice the same user number to a token, so that we can
10174 use it in...
10175 * src/lex.c (lex): here.
10176 Also use `symbol_class_set' instead of hand written code.
10177 * src/reader.c (parse_assoc_decl): Likewise.
10178
44536b35
AD
101792002-06-10 Akim Demaille <akim@epita.fr>
10180
10181 * src/symtab.c, src/symtab.c (symbol_class_set)
10182 (symbol_user_token_number_set): New.
10183 * src/reader.c (parse_token_decl): Use them.
10184 Use a switch instead of ifs.
10185 Use a single argument.
10186
8b9f2372
AD
101872002-06-10 Akim Demaille <akim@epita.fr>
10188
10189 Remove `%thong' support as it is undocumented, unused, duplicates
10190 `%token's job, and creates useless e-mail traffic with people who
10191 want to know what it is, why it is undocumented, unused, and
10192 duplicates `%token's job.
10193
10194 * src/reader.c (parse_thong_decl): Remove.
10195 * src/options.c (option_table): Remove "thong".
10196 * src/lex.h (tok_thong): Remove.
10197
3ae2b51f
AD
101982002-06-10 Akim Demaille <akim@epita.fr>
10199
10200 * src/symtab.c, src/symtab.c (symbol_type_set)
10201 (symbol_precedence_set): New.
10202 * src/reader.c (parse_type_decl, parse_assoc_decl): Use them.
10203 (value_components_used): Remove, unused.
10204
2f1afb73
AD
102052002-06-09 Akim Demaille <akim@epita.fr>
10206
10207 Move symbols handling code out of the reader.
10208
10209 * src/reader.h, src/reader.c (errtoken, undeftoken, eoftoken)
10210 (axiom): Move to...
10211 * src/symtab.h, src/symtab.c: here.
10212
10213 * src/gram.c (start_symbol): Remove: use startsymbol->number.
10214 * src/reader.c (startval): Rename as...
10215 * src/symtab.h, src/symtab.c (startsymbol): this.
10216 * src/reader.c: Adjust.
10217
10218 * src/reader.c (symbol_check_defined, symbol_make_alias)
10219 (symbol_check_alias_consistence, symbol_pack, symbol_translation)
10220 (token_translations_init)
10221 Move to...
10222 * src/symtab.c: here.
10223 * src/reader.c (packsymbols): Move to...
10224 * src/symtab.h, src/symtab.c (symbols_pack): here.
10225 * src/symtab.h, src/symtab.c (symbol_make_alias): Takes SYMVAL as
10226 argument.
10227
e9bca3ad
AD
102282002-06-03 Akim Demaille <akim@epita.fr>
10229
10230 * src/muscle_tab.c (muscle_insert, muscle_find): Declarations,
10231 then statements.
10232
86eff183
AD
102332002-06-03 Akim Demaille <akim@epita.fr>
10234
10235 * src/muscle_tab.c (muscle_find, muscle_insert): Don't initialize
10236 structs with non literals.
10237 * src/scan-skel.l: never-interactive.
10238 * src/conflicts.c (enum conflict_resolution_e): No trailing
10239 comma.
10240 * src/getargs.c (usage): Split long literal strings.
10241 Reported by Hans Aberg.
10242
717be197
AD
102432002-05-28 Akim Demaille <akim@epita.fr>
10244
10245 * data/bison.c++: Use C++ ostreams.
10246 (cdebug_): New member.
10247
670ddffd
AD
102482002-05-28 Akim Demaille <akim@epita.fr>
10249
10250 * src/output.c (output_skeleton): Be sure to allocate enough room
10251 for `/' _and_ for `\0' in full_skeleton.
10252
769b430f
AD
102532002-05-28 Akim Demaille <akim@epita.fr>
10254
10255 * data/bison.c++: Catch up with bison.simple:
10256 2002-05-24 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
10257 and Paul Eggert <eggert@twinsun.com>: `error' handing.
10258 2002-05-26 Akim Demaille <akim@epita.fr>: stos_, token_number_,
10259 and popping traces.
10260
7067cb36
PH
102612002-05-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
10262
10263 * src/output.c (output_skeleton): Put an explicit path in front of
10264 the skeleton file name, rather than relying on the -I directory,
10265 to partially alleviate effects of having a skeleton file lying around
10266 in the current directory.
769b430f 10267
4a713ec2
PH
102682002-05-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
10269
769b430f 10270 * src/conflicts.c (log_resolution): Correct typo:
4a713ec2
PH
10271 obstack_printf should be obstack_fgrow1.
10272
b408954b
AD
102732002-05-26 Akim Demaille <akim@epita.fr>
10274
10275 * src/state.h (state_t): `solved_conflicts' is a new member.
10276 * src/LR0.c (new_state): Set it to 0.
10277 * src/conflicts.h, src/conflicts.c (print_conflicts)
10278 (free_conflicts, solve_conflicts): Rename as...
10279 (conflicts_print, conflicts_free, conflicts_solve): these.
10280 Adjust callers.
10281 * src/conflicts.c (enum conflict_resolution_e)
10282 (solved_conflicts_obstack): New, used by...
10283 (log_resolution): this.
10284 Adjust to attach the conflict resolution to each state.
10285 Complete the description with the precedence/associativity
10286 information.
10287 (resolve_sr_conflict): Adjust.
10288 * src/print.c (print_state): Output its solved_conflicts.
10289 * tests/conflicts.at (Unresolved SR Conflicts)
10290 (Solved SR Conflicts): Exercise --report=all.
10291
a49aecd5
AD
102922002-05-26 Akim Demaille <akim@epita.fr>
10293
10294 * src/LR0.c, src/derives.c, src/gram.c, src/gram.h, src/lalr.c,
10295 * src/nullable.c, src/output.c, src/print.c, src/print_graph.c,
10296 * src/reader.c, src/reduce.c, src/state.h, src/symtab.h
10297 (token_number_t, item_number_as_token_number)
10298 (token_number_as_item_number, muscle_insert_token_number_table):
10299 Rename as...
10300 (symbol_number_t, item_number_as_symbol_number)
10301 (symbol_number_as_item_number, muscle_insert_symbol_number_table):
10302 these, since it is more appropriate.
10303
5504898e
AD
103042002-05-26 Akim Demaille <akim@epita.fr>
10305
10306 * tests/calc.at (AT_CHECK_CALC): Adjust: there are now additional
10307 `Error:' lines.
10308 * data/bison.simple (yystos) [YYDEBUG]: New.
10309 (yyparse) [YYDEBUG]: Display the symbols which are popped during
10310 error recovery.
10311 * tests/regression.at (Web2c Actions): Adjust: yystos is output now.
10312
ec3bc396
AD
103132002-05-25 Akim Demaille <akim@epita.fr>
10314
10315 * doc/bison.texinfo (Debugging): Split into...
10316 (Tracing): this new section, its former contents, and...
10317 (Understanding): this new section.
10318 * src/getargs.h, src/getargs.c (verbose_flag): Remove, replaced
10319 by...
10320 (report_flag): this.
10321 Adjust all dependencies.
10322 (report_args, report_types, report_argmatch): New.
10323 (usage, getargs): Report/support -r, --report.
10324 * src/options.h
10325 (struct option_table_struct): Rename as..,
10326 (struct option_table_s): this.
10327 Rename the `set_flag' member to `flag' to match with getopt_long's
10328 struct.
10329 * src/options.c (option_table): Split verbose into an entry for
10330 %verbose, and another for --verbose.
10331 Support --report/-r, so remove -r from the obsolete --raw.
10332 * src/print.c: Attach full item sets and lookaheads reports to
10333 report_flag instead of trace_flag.
10334 * lib/argmatch.h, lib/argmatch.c: New, from Fileutils 4.1.
10335
78df8250
PE
103362002-05-24 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
10337 and Paul Eggert <eggert@twinsun.com>
769b430f 10338
78df8250
PE
10339 * data/bison.simple (yyparse): Correct error handling to conform to
10340 POSIX and yacc. Specifically, after syntax error is discovered,
10341 do not reduce further before shifting the error token.
10342 Clean up the code a bit by removing the labels yyerrdefault,
10343 yyerrhandle, yyerrpop.
10344 * NEWS: Document the above.
10345
c0c9ea05
PH
103462002-05-20 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
10347
10348 * data/bison.simple (yyr1): Don't use yy_token_number_type as element
10349 type; it isn't always big enough, since it doesn't necessarily
10350 include non-terminals.
769b430f 10351 (yytranslate): Expand definition of yy_token_number_type, so that
c0c9ea05
PH
10352 the latter can be removed.
10353 (yy_token_number_type): Remove, only one use.
10354 * data/bison.c++ (r1_): Parallel change to yyr1 in bison.simple---
10355 don't use TokenNumberType as element type.
769b430f 10356
c0c9ea05
PH
10357 * tests/regression.at: Modify expected output to agree with change
10358 to yyr1 and yytranslate.
769b430f 10359
6390a83f
FK
103602002-05-13 Florian Krohm <florian@edamail.fishkill.ibm.com>
10361
10362 * src/reader.c (parse_action): Use copy_character instead of
10363 obstack_1grow.
10364
db7c8e9a
AD
103652002-05-13 Akim Demaille <akim@epita.fr>
10366
10367 * tests/regression.at (Token definitions): Prototype yylex and
10368 yyerror.
10369
fcc61800
PH
103702002-05-12 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
10371
158c687b 10372 * src/scan-skel.l: Correct off-by-one error in handling of __oline__.
fcc61800
PH
10373 * data/bison.simple (b4_sint_type, b4_uint_type): Correct to reflect
10374 32-bit arithmetic.
10375 * data/bison.c++ (b4_sint_type, b4_uint_type): Ditto.
10376
5683e9b2
AD
103772002-05-07 Akim Demaille <akim@epita.fr>
10378
10379 * tests/synclines.at: Be sure to prototype yylex and yyerror to
10380 avoid GCC warnings.
10381
0c2d3f4c
AD
103822002-05-07 Akim Demaille <akim@epita.fr>
10383
10384 Kill GCC warnings.
10385
10386 * src/reduce.c (nonterminals_reduce): Don't loop over RITEM: loop
10387 over the RHS of each rule.
10388 * src/gram.h, src/gram.c (nritems): Is `unsigned int', not int.
10389 * src/state.h (state_t): Member `nitems' is unsigned short.
10390 * src/LR0.c (get_state): Adjust.
10391 * src/reader.c (packgram): Likewise.
10392 * src/output.c (GENERATE_MUSCLE_INSERT_TABLE): `max' is of type
10393 `Type'.
10394 (muscle_insert_int_table): Remove, unused.
10395 (prepare_rules): Remove `max'.
10396
1565b720
AD
103972002-05-06 Akim Demaille <akim@epita.fr>
10398
10399 * src/closure.c (print_firsts): Display of the symbol tags.
10400 (bitmatrix_print): Move to...
10401 * lib/bitsetv-print.h, lib/bitsetv-print.c (bitsetv_matrix_dump):
10402 here.
10403 * tests/sets.at (Nullable, Broken Closure, Firsts): Adjust.
10404
cfaee611
AD
104052002-05-06 Akim Demaille <akim@epita.fr>
10406
10407 * src/muscle_tab.c (muscle_m4_output): Must return TRUE for
10408 hash_do_for_each.
10409
458be8e0
AD
104102002-05-06 Akim Demaille <akim@epita.fr>
10411
10412 * src/LR0.c (new_state, get_state): Instead of using the global
10413 `kernel_size' and `kernel_base', have two new arguments:
10414 `core_size' and `core'.
10415 Adjust callers.
10416
a900a624
AD
104172002-05-06 Akim Demaille <akim@epita.fr>
10418
10419 * src/reader.c (packgram): No longer end `ritem' with a 0
10420 sentinel: it is not used.
10421
d4e7d3a1
AD
104222002-05-05 Akim Demaille <akim@epita.fr>
10423
10424 New experimental feature: display the lookaheads in the report and
10425 graph.
10426
10427 * src/print (print_core): When --trace-flag, display the rules
10428 lookaheads.
10429 * src/print_graph.c (print_core): Likewise.
10430 Swap the arguments.
10431 Adjust caller.
10432
39ceb25b
AD
104332002-05-05 Akim Demaille <akim@epita.fr>
10434
10435 * tests/torture.at (Many lookaheads): New test.
10436
5372019f
AD
104372002-05-05 Akim Demaille <akim@epita.fr>
10438
10439 * src/output.c (GENERATE_OUTPUT_TABLE): Replace with...
10440 (GENERATE_MUSCLE_INSERT_TABLE): this.
10441 (output_int_table, output_unsigned_int_table, output_short_table)
10442 (output_token_number_table, output_item_number_table): Replace with...
10443 (muscle_insert_int_table, muscle_insert_unsigned_int_table)
10444 (muscle_insert_short_table, muscle_insert_token_number_table)
10445 (muscle_insert_item_number_table): these.
10446 Adjust all callers.
10447 (prepare_tokens): Don't free `translations', since...
10448 * src/reader.h, src/reader.c (grammar_free): do it.
10449 Move to...
10450 * src/gram.h, src/gram.c (grammar_free): here.
10451 * data/bison.simple, data/bison.c++: b4_token_number_max is now
10452 b4_translate_max.
10453
5df5f6d5
AD
104542002-05-05 Akim Demaille <akim@epita.fr>
10455
10456 * src/output.c (output_unsigned_int_table): New.
10457 (prepare_rules): `i' is unsigned.
10458 `prhs', `rline', `r2' are unsigned int.
10459 Rename muscle `rhs_number_max' as `rhs_max'.
10460 Output muscles `prhs_max', `rline_max', and `r2_max'.
10461 Free rline and r1.
10462 * data/bison.simple, data/bison.c++: Adjust to use these muscles
10463 to compute types instead of constant types.
10464 * tests/regression.at (Web2c Actions): Adjust.
10465
b87f8b21
AD
104662002-05-04 Akim Demaille <akim@epita.fr>
10467
10468 * src/symtab.h (SALIAS, SUNDEF): Rename as...
10469 (USER_NUMBER_ALIAS, USER_NUMBER_UNDEFINED): these.
10470 Adjust dependencies.
10471 * src/output.c (token_definitions_output): Be sure not to output a
10472 `#define 'a'' when fed with `%token 'a' "a"'.
10473 * tests/regression.at (Token definitions): New.
10474
8bb936e4
PE
104752002-05-03 Paul Eggert <eggert@twinsun.com>
10476
10477 * data/bison.simple (b4_token_defines): Also define YYTOKENTYPE
10478 for K&R C.
10479
104802002-05-03 gettextize <bug-gnu-gettext@gnu.org>
10481
10482 * Makefile.am (SUBDIRS): Remove intl.
10483 (EXTRA_DIST): Add config/config.rpath.
10484
53c71a12
AD
104852002-05-03 Akim Demaille <akim@epita.fr>
10486
10487 * data/bison.simple (m4_if): Don't output empty enums.
10488 And actually, output valid enum definitions :(.
10489
289dd0cf
AD
104902002-05-03 Akim Demaille <akim@epita.fr>
10491
10492 * configure.bat: Remove, completely obsolete.
10493 * Makefile.am (EXTRA_DIST): Adjust.
10494 Don't distribute config.rpath...
10495 * config/Makefile.am (EXTRA_DIST): Do it.
10496
db85e524
AD
104972002-05-03 Akim Demaille <akim@epita.fr>
10498
10499 * configure.in (GETTEXT_VERSION): New.
10500 Suggested by Bruno Haible for the forthcoming Gettext 0.10.3.
10501
83ccf991
AD
105022002-05-03 Akim Demaille <akim@epita.fr>
10503
10504 * data/bison.simple (b4_token_enum): New.
10505 (b4_token_defines): Use it to output tokens both as #define and
10506 enums.
10507 Suggested by Paul Eggert.
10508 * src/output.c (token_definitions_output): Don't output spurious
10509 white spaces.
10510
1f418995
AD
105112002-05-03 Akim Demaille <akim@epita.fr>
10512
10513 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
10514
45119f04
RA
105152002-05-02 Robert Anisko <robert@lrde.epita.fr>
10516
10517 * data/bison.c++: Adapt expansion of $s and @s to the C++ parser.
10518 Update the stack class, give a try to deque as the default container.
10519
b2d52318
AD
105202002-05-02 Akim Demaille <akim@epita.fr>
10521
10522 * data/bison.simple (yyparse): Do not implement @$ = @1.
10523 (YYLLOC_DEFAULT): Adjust to do it.
10524 * doc/bison.texinfo (Location Default Action): Fix.
10525
3a8b4109
AD
105262002-05-02 Akim Demaille <akim@epita.fr>
10527
10528 * src/reader.c (parse_braces): Merge into...
10529 (parse_action): this.
10530
84614e13
AD
105312002-05-02 Akim Demaille <akim@epita.fr>
10532
10533 * configure.in (ALL_LINGUAS): Remove.
10534 * po/LINGUAS, hr.po: New.
10535
fdbcd8e2
AD
105362002-05-02 Akim Demaille <akim@epita.fr>
10537
10538 Remove the so called hairy (semantic) parsers.
10539
10540 * src/system.h (EXT_GUARD_C, EXT_STYPE_H): Remove.
10541 * src/gram.h, src/gram.c (semantic_parser): Remove.
10542 (rule_t): Remove the guard and guard_line members.
10543 * src/lex.h (token_t): remove tok_guard.
10544 * src/options.c (option_table): Remove %guard and %semantic_parser
10545 support.
10546 * src/output.c, src/output.h (guards_output): Remove.
10547 (prepare): Adjust.
10548 (token_definitions_output): Don't output the `T'
10549 tokens (???).
10550 (output_skeleton): Don't output the guards.
10551 * src/files.c, src/files.c (attrsfile): Remove.
10552 * src/reader.c (symbol_list): Remove the guard and guard_line
10553 members.
10554 Adjust dependencies.
10555 (parse_guard): Remove.
10556 * data/bison.hairy: Remove.
10557 * doc/bison.texinfo (Environment Variables): Remove occurrences of
10558 BISON_HAIRY.
10559
82b6cb3f
AD
105602002-05-02 Akim Demaille <akim@epita.fr>
10561
10562 * src/reader.c (copy_at, copy_dollarm parse_braces, parse_action)
10563 (parse_guard): Rename the formal argument `stack_offset' as
10564 `rule_length', which is more readable.
10565 Adjust callers.
10566 (copy_at, copy_dollar): Instead of outputting the hard coded
10567 values of $$, $n and so forth, output invocation to b4_lhs_value,
10568 b4_lhs_location, b4_rhs_value, and b4_rhs_location.
900c877b
AD
10569 Note: this patch partially drops `semantic-parser' support: it
10570 always does `rule_length - n', where semantic parsers ought to
10571 always use `-n'.
82b6cb3f
AD
10572 * data/bison.simple, data/bison.c++ (b4_lhs_value)
10573 (b4_lhs_location, b4_rhs_value, and b4_rhs_location: New.
10574
6cbfbcc5
AD
105752002-05-02 Akim Demaille <akim@epita.fr>
10576
10577 * configure.in (AC_INIT): Bump to 1.49b.
10578 (AM_INIT_AUTOMAKE): Short invocation.
10579
b8548114
AD
105802002-05-02 Akim Demaille <akim@epita.fr>
10581
10582 Version 1.49a.
10583
c20cd1fa
AD
105842002-05-01 Akim Demaille <akim@epita.fr>
10585
10586 * src/skeleton.h: Remove.
10587
8a9566d4
AD
105882002-05-01 Akim Demaille <akim@epita.fr>
10589
10590 * src/skeleton.h: Fix the #endif.
10591 Reported by Magnus Fromreide.
10592
8c6d399a
PE
105932002-04-26 Paul Eggert <eggert@twinsun.com>
10594
10595 * data/bison.simple (YYSTYPE_IS_TRIVIAL, YYLTYPE_IS_TRIVIAL):
10596 Define if we define YYSTYPE and YYLTYPE, respectively.
b756bb75 10597 (YYCOPY): Fix [] quoting problem in the non-GCC case.
8a9566d4 10598
2b7ed18a
RA
105992002-04-25 Robert Anisko <robert@lrde.epita.fr>
10600
10601 * src/scan-skel.l: Postprocess quadrigraphs.
10602
10603 * src/reader.c (copy_character): New function, used to output
10604 single characters while replacing `[' and `]' with quadrigraphs, to
10605 avoid troubles with M4 quotes.
10606 (copy_comment): Output characters with copy_character.
10607 (read_additionnal_code): Likewise.
10608 (copy_string2): Likewise.
10609 (copy_definition): Likewise.
10610
10611 * tests/calc.at: Exercise M4 quoting.
10612
34a89c50
AD
106132002-04-25 Akim Demaille <akim@epita.fr>
10614
10615 * tests/sets.at (AT_EXTRACT_SETS): Sed portability issue: no space
10616 between `!' and the command.
10617 Reported by Paul Eggert.
10618
0dd1580a
RA
106192002-04-24 Robert Anisko <robert@lrde.epita.fr>
10620
10621 * tests/calc.at: Exercise prologue splitting.
10622
10623 * data/bison.simple, data/bison.c++: Use `b4_pre_prologue' and
10624 `b4_post_prologue' instead of `b4_prologue'.
10625
10626 * src/output.c (prepare): Add the `pre_prologue' and `post_prologue'
10627 muscles.
10628 (output): Free pre_prologue_obstack and post_prologue_obstack.
10629 * src/files.h, src/files.c (attrs_obstack): Remove.
10630 (pre_prologue_obstack, post_prologue_obstack): New.
10631 * src/reader.c (copy_definition): Add a parameter to specify the
10632 obstack to fill, instead of using attrs_obstack unconditionally.
10633 (read_declarations): Pass pre_prologue_obstack to copy_definition if
10634 `%union' has not yet been seen, pass post_prologue_obstack otherwise.
10635
83c1796f
PE
106362002-04-23 Paul Eggert <eggert@twinsun.com>
10637
10638 * data/bison.simple: Remove unnecessary commentary and white
10639 space differences from 1_29-branch.
10640 Depend on YYERROR_VERBOSE, not defined (YYERROR_VERBOSE).
10641
10642 (union yyalloc, YYSTACK_GAP_MAX, YYSTACK_BYTES, YYCOPY,
10643 YYSTACK_RELOCATE): Do not define if yyoverflow is defined, or
10644 if this is a C++ parser and YYSTYPE or YYLTYPE has nontrivial
10645 constructors or destructors.
10646
10647 (yyparse) [! defined YYSTACK_RELOCATE]: Do not relocate the stack.
10648
1207eeac
AD
106492002-04-23 Akim Demaille <akim@epita.fr>
10650
10651 * tests/sets.at (AT_EXTRACT_SETS): Don't use 8 char long sed labels.
10652 * tests/synclines.at (AT_TEST_SYNCLINE): Be robust to GCC's
10653 location with columns.
10654 * tests/conflicts.at (%nonassoc and eof): Don't use `error.h'.
10655 All reported by Paul Eggert.
10656
78ab8f67
AD
106572002-04-22 Akim Demaille <akim@epita.fr>
10658
10659 * src/reduce.c (dump_grammar): Move to...
10660 * src/gram.h, src/gram.c (grammar_dump): here.
10661 Be sure to separate long item numbers.
10662 Don't read the members of a rule's prec if its nil.
10663
133c20e2
AD
106642002-04-22 Akim Demaille <akim@epita.fr>
10665
10666 * src/output.c (table_size, table_grow): New.
10667 (MAXTABLE): Remove, replace uses with table_size.
10668 (pack_vector): Instead of dying when the table is too big, grow it.
10669
9515e8a7
AD
106702002-04-22 Akim Demaille <akim@epita.fr>
10671
10672 * data/bison.simple (yyr1): Its type is that of a token number.
10673 * data/bison.c++ (r1_): Likewise.
10674 * tests/regression.at (Web2c Actions): Adjust.
10675
23c5a174
AD
106762002-04-22 Akim Demaille <akim@epita.fr>
10677
10678 * src/reader.c (token_translations_init): 256 is now the default
10679 value for the error token, i.e., it will be assigned another
10680 number if the user assigned 256 to one of her tokens.
10681 (reader): Don't force 256 to error.
10682 * doc/bison.texinfo (Symbols): Adjust.
10683 * tests/torture.at (AT_DATA_HORIZONTAL_GRAMMAR)
10684 (AT_DATA_TRIANGULAR_GRAMMAR): Number the tokens as 1, 2, 3
10685 etc. instead of 10, 20, 30 (which was used to `jump' over error
10686 (256) and undefined (2)).
10687
5fbb0954
AD
106882002-04-22 Akim Demaille <akim@epita.fr>
10689
10690 Propagate more token_number_t.
10691
10692 * src/gram.h (token_number_as_item_number)
10693 (item_number_as_token_number): New.
10694 * src/output.c (GENERATE_OUTPUT_TABLE): New.
10695 Use it to create output_item_number_table and
10696 output_token_number_table.
10697 * src/LR0.c, src/derives.c, src/gram.c, src/gram.h, src/lalr.c,
10698 * src/lex.c, src/nullable.c, src/output.c, src/print.c,
10699 * src/print_graph.c, src/reader.c, src/reduce.c, src/state.h,
10700 * src/symtab.c, src/symtab.h: Use token_number_t instead of shorts.
10701
4f940944
AD
107022002-04-22 Akim Demaille <akim@epita.fr>
10703
10704 * src/output.h, src/output.c (get_lines_number): Remove.
10705
3ded9a63
AD
107062002-04-19 Akim Demaille <akim@epita.fr>
10707
10708 * doc/bison.texinfo (Actions): Make clear that `|' is not the same
10709 as Lex/Flex'.
10710 (Debugging): More details about enabling the debugging features.
10711 (Table of Symbols): Describe $$, $n, @$, and @n.
10712 Suggested by Tim Josling.
10713
e0c471a9
AD
107142002-04-19 Akim Demaille <akim@epita.fr>
10715
10716 * doc/bison.texinfo: Remove the uses of the obsolete @refill.
10717
fecc10cd
AD
107182002-04-10 Akim Demaille <akim@epita.fr>
10719
10720 * src/system.h: Rely on HAVE_LIMITS_H.
10721 Suggested by Paul Eggert.
10722
51dec47b
AD
107232002-04-09 Akim Demaille <akim@epita.fr>
10724
10725 * tests/calc.at (_AT_CHECK_CALC_ERROR): Receive as argument the
10726 full stderr, and strip it according to the bison options, instead
10727 of composing the error message from different bits.
10728 This makes it easier to check for several error messages.
10729 Adjust all the invocations.
10730 Add an invocation exercising the error token.
10731 Add an invocation demonstrating a stupid error message.
10732 (_AT_DATA_CALC_Y): Follow the GCS: initial column is 1, not 0.
10733 Adjust the tests.
10734 Error message are for stderr, not stdout.
10735
007a50a4
AD
107362002-04-09 Akim Demaille <akim@epita.fr>
10737
10738 * src/gram.h, src/gram.c (error_token_number): Remove, use
10739 errtoken->number.
10740 * src/reader.c (reader): Don't specify the user token number (2)
10741 for $undefined, as it uselessly prevents using it.
10742 * src/gram.h (token_number_t): Move to...
10743 * src/symtab.h: here.
10744 (state_t.number): Is a token_number_t.
10745 * src/print.c, src/reader.c: Use undeftoken->number instead of
10746 hard coded 2.
10747 (Even though this 2 is not the same as above: the number of the
10748 undeftoken remains being 2, it is its user token number which
10749 might not be 2).
10750 * src/output.c (prepare_tokens): Rename the `maxtok' muscle with
10751 `user_token_number_max'.
10752 Output `undef_token_number'.
10753 * data/bison.simple, data/bison.c++: Use them.
10754 Be sure to map invalid yylex return values to
10755 `undef_token_number'. This saves us from gratuitous SEGV.
10756
10757 * tests/conflicts.at (Solved SR Conflicts)
10758 (Unresolved SR Conflicts): Adjust.
10759 * tests/regression.at (Web2c Actions): Adjust.
10760
06446ccf
AD
107612002-04-08 Akim Demaille <akim@epita.fr>
10762
10763 * data/bison.c++: s/b4_item_number_max/b4_rhs_number_max/.
10764 Adding #line.
10765 Remove the duplicate `typedefs'.
10766 (RhsNumberType): Fix the declaration and various other typos.
10767 Use __ofile__.
10768 * data/bison.simple: Use __ofile__.
10769 * src/scan-skel.l: Handle __ofile__.
10770
62a3e4f0
AD
107712002-04-08 Akim Demaille <akim@epita.fr>
10772
10773 * src/gram.h (item_number_t): New, the type of item numbers in
10774 RITEM. Note that it must be able to code symbol numbers as
10775 positive number, and the negation of rule numbers as negative
10776 numbers.
10777 Adjust all dependencies (pretty many).
10778 * src/reduce.c (rule): Remove this `short *' pointer: use
10779 item_number_t.
10780 * src/system.h (MINSHORT, MAXSHORT): Remove.
10781 Include `limits.h'.
10782 Adjust dependencies to using SHRT_MAX and SHRT_MIN.
10783 (shortcpy): Remove.
10784 (MAXTABLE): Move to...
10785 * src/output.c (MAXTABLE): here.
10786 (prepare_rules): Use output_int_table to output rhs.
10787 * data/bison.simple, data/bison.c++: Adjust.
10788 * tests/torture.at (Big triangle): Move the limit from 254 to
10789 500.
10790 * tests/regression.at (Web2c Actions): Ajust.
10791
10792 Trying with bigger grammars shows various phenomena: at 3000 (28Mb
10793 of grammar file) bison is killed by my system, at 2000 (12Mb) bison
10794 passes, but produces negative #line number, once fixed, GCC is
10795 killed while compiling 14Mb, at 1500 (6.7 Mb of grammar, 8.2Mb of
10796 C), it passes.
10797 * src/state.h (state_h): Code input lines on ints, not shorts.
10798
bb88b0fc
AD
107992002-04-08 Akim Demaille <akim@epita.fr>
10800
10801 * src/reduce.c (reduce_grammar): First reduce the nonterminals,
10802 and then the grammar.
10803
9a636f47
AD
108042002-04-08 Akim Demaille <akim@epita.fr>
10805
10806 * src/system.h: No longer using strndup.
10807
680e8701
AD
108082002-04-07 Akim Demaille <akim@epita.fr>
10809
10810 * src/muscle_tab.h (MUSCLE_INSERT_LONG_INT): New.
10811 * src/output.c (output_table_data): Return the longest number.
10812 (prepare_tokens): Output `token_number_max').
10813 * data/bison.simple, data/bison.c++ (b4_sint_type, b4_uint_type):
10814 New.
10815 Use them to define yy_token_number_type/TokenNumberType.
10816 Use this type for yytranslate.
10817 * tests/torture.at (Big triangle): Push the limit from 124 to
10818 253.
10819 * tests/regression.at (Web2c Actions): Adjust.
10820
817e9f41
AD
108212002-04-07 Akim Demaille <akim@epita.fr>
10822
10823 * tests/torture.at (Big triangle): New.
10824 (GNU AWK Grammar, GNU Cim Grammar): Move to...
10825 * tests/existing.at: here.
10826
5123689b
AD
108272002-04-07 Akim Demaille <akim@epita.fr>
10828
10829 * src/gram.h, src/gram.c (nitems): Remove, it is an alias of
10830 nritems.
10831 Adjust dependencies.
10832
f3849179
AD
108332002-04-07 Akim Demaille <akim@epita.fr>
10834
10835 * src/reader.c: Normalize increments to prefix form.
10836
bd02036a
AD
108372002-04-07 Akim Demaille <akim@epita.fr>
10838
10839 * src/reader.c, symtab.c: Remove debugging code.
10840
db8837cb
AD
108412002-04-07 Akim Demaille <akim@epita.fr>
10842
10843 Rename all the `bucket's as `symbol_t'.
10844
10845 * src/gram.c, src/gram.h, src/lex.c, src/lex.h, src/output.c,
10846 * src/reader.c, src/reader.h, src/reduce.c, src/state.h,
10847 * src/symtab.c, src/symtab.h (bucket): Rename as...
10848 (symbol_t): this.
10849 (symbol_list_new, bucket_check_defined, bucket_make_alias)
10850 (bucket_check_alias_consistence, bucket_pack, bucket_translation)
10851 (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
10852 (buckets_new, buckets_free, buckets_do): Rename as...
10853 (symbol_list_new, symbol_check_defined, symbol_make_alias)
10854 (symbol_check_alias_consistence, symbol_pack, symbol_translation)
10855 (symbol_new, symbol_free, hash_compare_symbol_t, hash_symbol_t)
10856 (symbols_new, symbols_free, symbols_do): these.
10857
72a23c97
AD
108582002-04-07 Akim Demaille <akim@epita.fr>
10859
10860 Use lib/hash for the symbol table.
10861
10862 * src/gram.c (ntokens): Initialize to 1, to reserve a slot for
10863 EOF.
10864 * src/lex.c (lex): Set the `number' member of new terminals.
10865 * src/reader.c (bucket_check_defined, bucket_make_alias)
10866 (bucket_check_alias_consistence, bucket_translation): New.
10867 (reader, grammar_free, readgram, token_translations_init)
10868 (packsymbols): Adjust.
10869 (reader): Number the predefined tokens.
10870 * src/reduce.c (inaccessable_symbols): Just use hard coded numbers
10871 for predefined tokens.
10872 * src/symtab.h (bucket): Remove all the hash table related
10873 members.
10874 * src/symtab.c (symtab): Replace by...
10875 (bucket_table): this.
10876 (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
10877 (buckets_new, buckets_do): New.
10878
280a38c3
AD
108792002-04-07 Akim Demaille <akim@epita.fr>
10880
10881 * src/gram.c (nitems, nrules, nsyms, ntokens, nvars, nritems)
10882 (start_symbol, max_user_token_number, semantic_parser)
10883 (error_token_number): Initialize.
10884 * src/reader.c (grammar, start_flag, startval, typed, lastprec):
10885 Initialize.
10886 (reader): Don't.
10887 (errtoken, eoftoken, undeftoken, axiom): Extern.
10888
03b31c0c
AD
108892002-04-07 Akim Demaille <akim@epita.fr>
10890
10891 * src/gram.h (rule_s): prec and precsym are now pointers
10892 to the bucket giving the priority/associativity.
10893 Member `associativity' removed: useless.
10894 * src/reduce.c, src/conflicts.c: Adjust.
10895
8b3df748
AD
108962002-04-07 Akim Demaille <akim@epita.fr>
10897
10898 * src/lalr.c, src/LR0.c, src/closure.c, src/gram.c, src/reduce.c:
10899 Properly escape the symbols' TAG when outputting them.
10900
e601aa1d
AD
109012002-04-07 Akim Demaille <akim@epita.fr>
10902
10903 * src/lalr.h (LA): Is a bitsetv, not bitset*.
10904
b0299a2e
AD
109052002-04-07 Akim Demaille <akim@epita.fr>
10906
10907 * src/lalr.h, src/lalr.c (LAruleno): Replace with...
10908 (LArule): this, which is an array to rule_t*.
10909 * src/print.c, src/conflicts.c: Adjust.
10910
d7e1f00c
AD
109112002-04-07 Akim Demaille <akim@epita.fr>
10912
10913 * src/gram.h (rule_t): Rename `number' as `user_number'.
10914 `number' is a new member.
10915 Adjust dependencies.
10916 * src/reduce.c (reduce_grammar_tables): Renumber rule_t.number.
10917
cc9305dd
AD
109182002-04-07 Akim Demaille <akim@epita.fr>
10919
10920 As a result of the previous patch, it is no longer needed
10921 to reorder ritem itself.
10922
10923 * src/reduce.c (reduce_grammar_tables): Don't sort RITEM.
10924
b0940840
AD
109252002-04-07 Akim Demaille <akim@epita.fr>
10926
10927 Be sure never to walk through RITEMS, but use only data related to
10928 the rules themselves. RITEMS should be banished.
10929
10930 * src/output.c (output_token_translations): Rename as...
10931 (prepare_tokens): this.
10932 In addition to `translate', prepare the muscles `tname' and
10933 `toknum', which were handled by...
10934 (output_rule_data): this.
10935 Remove, and move the remainder of its outputs into...
10936 (prepare_rules): this new routines, which also merges content from
10937 (output_gram): this.
10938 (prepare_rules): Be sure never to walk through RITEMS.
10939 (output_stos): Rename as...
10940 (prepare_stos): this.
10941 (output): Always invoke prepare_states, after all, just don't use it
10942 in the output if you don't need it.
10943
643a5994
AD
109442002-04-07 Akim Demaille <akim@epita.fr>
10945
10946 * src/LR0.c (new_state): Display `nstates' as the name of the
10947 newly created state.
10948 Adjust to initialize first_state and last_state if needed.
10949 Be sure to distinguish the initial from the final state.
10950 (new_states): Create the itemset of the initial state, and use
10951 new_state.
10952 * src/closure.c (closure): Now that the initial state has its
10953 items properly set, there is no need for a special case when
10954 creating `ruleset'.
10955
10956 As a result, now the rule 0, reducing to $axiom, is visible in the
10957 outputs. Adjust the test suite.
10958
10959 * tests/conflicts.at (Solved SR Conflicts)
10960 (Unresolved SR Conflicts): Adjust.
10961 * tests/regression.at (Web2c Report, Rule Line Numbers): Idem.
10962 * tests/conflicts.at (S/R in initial): New.
10963
b4c4ccc2
AD
109642002-04-07 Akim Demaille <akim@epita.fr>
10965
10966 * src/LR0.c (allocate_itemsets): Don't loop over ritem: loop over
10967 the RHS of the rules.
10968 * src/output.c (output_gram): Likewise.
10969
bba97eb2
AD
109702002-04-07 Akim Demaille <akim@epita.fr>
10971
10972 * src/gram.h (rule_t): `lhs' is now a pointer to the symbol's
10973 bucket.
10974 Adjust all dependencies.
10975 * src/reduce.c (nonterminals_reduce): Don't forget to renumber the
10976 `number' of the buckets too.
10977 * src/gram.h: Include `symtab.h'.
10978 (associativity): Move to...
10979 * src/symtab.h: here.
10980 No longer include `gram.h'.
10981
c3b407f4
AD
109822002-04-07 Akim Demaille <akim@epita.fr>
10983
10984 * src/gram.h, src/gram.c (rules_rhs_length): New.
10985 (ritem_longest_rhs): Use it.
10986 * src/gram.h (rule_t): `number' is a new member.
10987 * src/reader.c (packgram): Set it.
10988 * src/reduce.c (reduce_grammar_tables): Move the useless rules at
10989 the end of `rules', and count them out of `nrules'.
10990 (reduce_output, dump_grammar): Adjust.
10991 * src/print.c (print_grammar): It is no longer needed to check for
10992 the usefulness of a rule, as useless rules are beyond `nrules + 1'.
10993 * tests/reduce.at (Reduced Automaton): New test.
10994
11652ab3
AD
109952002-04-07 Akim Demaille <akim@epita.fr>
10996
10997 * src/reduce.c (inaccessable_symbols): Fix a buglet: because of a
10998 lacking `+ 1' to nrules, Bison reported as useless a token if it
10999 was used solely to set the precedence of the last rule...
11000
26b23c1a
AD
110012002-04-07 Akim Demaille <akim@epita.fr>
11002
11003 * data/bison.c++, data/bison.simple: Don't output the current file
11004 name in #line, to avoid useless diffs between two identical
11005 outputs under different names.
11006
18bcecb0
AD
110072002-04-07 Akim Demaille <akim@epita.fr>
11008
11009 * src/closure.c, src/print.c, src/reader.c, src/reduce.c:
11010 Normalize loops to using `< nrules + 1', not `<= nrules'.
11011
fa770c86
AD
110122002-04-07 Akim Demaille <akim@epita.fr>
11013
11014 * TODO: Update.
11015
d9b739c3
AD
110162002-04-07 Akim Demaille <akim@epita.fr>
11017
11018 * src/output.c, src/reader.c, src/symtab.c, src/symtab.h: Rename
11019 bucket.value as bucket.number.
11020
99013900
AD
110212002-04-07 Akim Demaille <akim@epita.fr>
11022
11023 * src/closure.c, src/derives.c, src/gram.h, src/lalr.c,
11024 * src/nullable.c, src/output.c, src/print.c, src/print_graph.c,
11025 * src/reader.c, src/reduce.c: Let rule_t.rhs point directly to the
11026 RHS, instead of being an index in RITEMS.
11027
e966383b
PE
110282002-04-04 Paul Eggert <eggert@twinsun.com>
11029
11030 * doc/bison.texinfo: Update copyright date.
11031 (Rpcalc Lexer, Symbols, Token Decl): Don't assume ASCII.
11032 (Symbols): Warn about running Bison in one character set,
11033 but compiling and/or running in an incompatible one.
11034 Warn about character code 256, too.
11035
110362002-04-03 Paul Eggert <eggert@twinsun.com>
11037
11038 * src/bison.data (YYSTACK_ALLOC): Depend on whether
11039 YYERROR_VERBOSE is nonzero, not whether it is defined.
11040
11041 Merge changes from bison-1_29-branch.
c307773e 11042
8d6c48b9
PE
110432002-03-20 Paul Eggert <eggert@twinsun.com>
11044
11045 Merge fixes from Debian bison_1.34-1.diff.
11046
11047 * configure.in (AC_PREREQ): 2.53.
11048
e53c6322
AD
110492002-03-20 Akim Demaille <akim@epita.fr>
11050
11051 * src/conflicts.c (log_resolution): Argument `resolution' is const.
11052
9ffbeca7
PE
110532002-03-19 Paul Eggert <eggert@twinsun.com>
11054
21db0b2a
PE
11055 * src/bison.simple (YYCOPY): New macro.
11056 (YYSTACK_RELOCATE): Use it.
11057 Remove Type arg; no longer needed. All callers changed.
11058 (yymemcpy): Remove; no longer needed.
11059
9ffbeca7
PE
11060 * Makefile.am (AUTOMAKE_OPTIONS): 1.6.
11061 * doc/Makefile.am (AUTOMAKE_OPTIONS): Remove.
11062
642cb8f8
AD
110632002-03-19 Akim Demaille <akim@epita.fr>
11064
11065 Test and fix the #line outputs.
11066
11067 * tests/atlocal.at (GCC): New.
11068 * tests/synclines.at (AT_TEST_SYNCLINE): New macro.
0ffd4fd1 11069 (Prologue synch line, %union synch line, Postprologue synch line)
642cb8f8
AD
11070 (Action synch line, Epilogue synch line): New tests.
11071 * src/reader.c (parse_union_decl): Define the muscle stype_line.
11072 * data/bison.simple, data/bison.c++: Use it.
11073
3c31a486
AD
110742002-03-19 Akim Demaille <akim@epita.fr>
11075
11076 * tests/regression.at (%nonassoc and eof, Unresolved SR Conflicts)
11077 (Solved SR Conflicts, %expect not enough, %expect right)
11078 (%expect too much): Move to...
11079 * tests/conflicts.at: this new file.
11080
0d8bed56
AD
110812002-03-19 Akim Demaille <akim@epita.fr>
11082
11083 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
11084 * data/bison.simple, data/bison.c++: Handle the `#define' part, so
11085 that we can move to enums for instance.
11086 * src/output.c (token_definitions_output): Output a list of
11087 `token-name, token-number' instead of the #define.
11088 (output_skeleton): Name this list `b4_tokens', not `b4_tokendefs'.
11089
9208d17f
AD
110902002-03-14 Akim Demaille <akim@epita.fr>
11091
11092 Use Gettext 0.11.1.
11093
af27eacb
RA
110942002-03-09 Robert Anisko <robert@lrde.epita.fr>
11095
11096 * data/bison.c++: Make the user able to add members to the generated
11097 parser by subclassing.
11098
9101a310
RA
110992002-03-05 Robert Anisko <robert@lrde.epita.fr>
11100
11101 * src/reader.c (read_additionnal_code): `c' should be an integer, not
11102 a character.
11103 Reported by Nicolas Tisserand and Nicolas Burrus.
11104
fff9bf0b
RA
111052002-03-04 Robert Anisko <robert@lrde.epita.fr>
11106
11107 * src/reader.c: Warn about lacking semi-colons, do not complain.
11108
64dba31e
RA
111092002-03-04 Robert Anisko <robert@lrde.epita.fr>
11110
11111 * data/bison.c++: Remove a debug line.
11112
374f5a14
RA
111132002-03-04 Robert Anisko <robert@lrde.epita.fr>
11114
11115 * data/bison.c++: Unmerge value as yylval and value as yyval. Unmerge
11116 location as yylloc and location as yyloc. Use YYLLOC_DEFAULT, and
11117 provide a default implementation.
11118
bfcf1f3a
AD
111192002-03-04 Akim Demaille <akim@epita.fr>
11120
11121 * tests/input.at (Invalid $n, Invalid @n): Add the ending `;'.
11122 * tests/output.at (AT_CHECK_OUTPUT): Likewise.
11123 * tests/headers.at (AT_TEST_CPP_GUARD_H): Ditto.
11124 * tests/semantic.at (Parsing Guards): Similarly.
11125 * src/reader.at (readgram): Complain if the last rule is not ended
11126 with a semi-colon.
11127
65ccf9fc
AD
111282002-03-04 Akim Demaille <akim@epita.fr>
11129
11130 * src/warshall.h, src/warshall.c (bitmatrix_print): Move to...
11131 * src/closure.c: here.
11132 (set_firsts): Use bitsetv_reflexive_transitive_closure instead of
11133 RTC.
11134 * src/warshall.h, src/warshall.c: Remove.
11135 * tests/sets.at (Broken Closure): Adjust.
11136
d0039cbc
AD
111372002-03-04 Akim Demaille <akim@epita.fr>
11138
11139 * src/output.c (output_skeleton): tempdir is const.
11140 bytes_read is unused.
11141
345cea78
AD
111422002-03-04 Akim Demaille <akim@epita.fr>
11143
11144 * lib/bbitset.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
11145 * lib/bitsetv.h, lib/ebitset.c, lib/lbitset.c, lib/sbitset.c:
11146 Update.
11147 From Michael Hayes.
11148
564801f7
AD
111492002-03-04 Akim Demaille <akim@epita.fr>
11150
11151 * src/closure.c (closure): `r' is unused.
11152
e5352bc7
AD
111532002-03-04 Akim Demaille <akim@epita.fr>
11154
11155 * tests/sets.at (Broken Closure): Add the ending `;'.
11156 * src/reader.at (readgram): Complain if a rule is not ended with a
11157 semi-colon.
11158
914feea9
AD
111592002-03-04 Akim Demaille <akim@epita.fr>
11160
11161 * src/conflicts.c (set_conflicts): Use bitset_disjoint_p.
11162 (count_sr_conflicts): Use bitset_count.
11163 * src/reduce.c (inaccessable_symbols): Ditto.
11164 (bits_size): Remove.
11165 * src/warshall.h, src/warshall.c: Convert to bitsetv.
11166
f0250de6
AD
111672002-03-04 Akim Demaille <akim@epita.fr>
11168
11169 * src/closure.c, src/conflicts.c, src/lalr.c, src/print.c,
11170 * src/reduce.c: Remove the `bitset_zero's following the
11171 `bitset_create's, as now it is performed by the latter.
11172
ef017502
AD
111732002-03-04 Akim Demaille <akim@epita.fr>
11174
11175 * lib/bitset.c, lib/bitset.h, lib/bitsetv.c, lib/bitsetv.h,
11176 * lib/ebitset.c, lib/ebitset.h, lib/lbitset.c, lib/lbitset.h,
11177 * lib/sbitset.c, lib/sbitset.h, lib/bbitset.h: Update from the
11178 latest sources from Michael.
11179
76514394
AD
111802002-03-04 Akim Demaille <akim@epita.fr>
11181
11182 * src/output.c (output): Don't free the grammar.
11183 * src/reader.c (grammar_free): New.
11184 * src/main.c (main): Call it and don't free symtab here.
11185
55024580
AD
111862002-03-04 Akim Demaille <akim@epita.fr>
11187
11188 * src/lex.c (parse_percent_token): Be sure to 0-end token_buffer
11189 before returning.
11190 Reported by Benoit Perrot.
11191
f9abaa2c
AD
111922002-03-04 Akim Demaille <akim@epita.fr>
11193
11194 Use bitset operations when possible, not loops over bits.
11195
11196 * src/conflicts.c (set_conflicts, count_sr_conflicts): Use
11197 bitset_or.
11198 * src/print.c (print_reductions): Use bitset_and, bitset_andn.
11199 * src/reduce.c (useless_nonterminals): Formatting changes.
11200 * src/warshall.c (TC): Use bitset_or.
11201
0e721e75
AD
112022002-03-04 Akim Demaille <akim@epita.fr>
11203
11204 * src/lalr.h, src/lalr.c (tokensetsize): Remove, unused.
11205 * src/system.h (BITS_PER_WORD, WORDSIZE, SETBIT, RESETBIT, BITISSET):
11206 Ditto.
11207
0fb1ffb1
AD
112082002-03-04 Akim Demaille <akim@epita.fr>
11209
11210 * src/lalr.c (F): Now a bitset*.
11211 Adjust all dependencies.
11212
b86796bf
AD
112132002-03-04 Akim Demaille <akim@epita.fr>
11214
11215 * src/conflicts.c (shiftset, lookaheadset): Now bitset.
11216 Adjust all dependencies.
11217
602bbf31
AD
112182002-03-04 Akim Demaille <akim@epita.fr>
11219
11220 * src/L0.c, src/LR0.h (nstates): Be size_t.
11221 Adjust comparisons (signed vs unsigned).
11222 * src/conflics.c, src/lalr.c, src/lalr.h, src/output.c (LA): Now a
11223 bitset*.
11224 Adjust all dependencies.
11225
d8a0245c
AD
112262002-03-04 Akim Demaille <akim@epita.fr>
11227
11228 * src/closure.c (firsts): Now, also a bitset.
11229 Adjust all dependencies.
11230 (varsetsize): Remove, now unused.
11231 * src/warshall.h, src/warshall.c: Now work on arrays of bitsets.
11232
34ba9743
AD
112332002-03-04 Akim Demaille <akim@epita.fr>
11234
11235 * src/print.c: Convert to use bitset.h, not hand coded iterations
11236 over ints.
11237
ed86e78c
AD
112382002-03-04 Akim Demaille <akim@epita.fr>
11239
11240 * src/reduce.c: Convert to use bitset.h, not hand coded BSet.
11241
dfdb1797
AD
112422002-03-04 Akim Demaille <akim@epita.fr>
11243
11244 * src/closure.c (ruleset): Be a bitset.
11245 (rulesetsize): Remove.
11246
7086e707
AD
112472002-03-04 Akim Demaille <akim@epita.fr>
11248
11249 * lib/bitset-int.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
11250 * lib/bitsetv.h, lib/ebitset.c, lib/ebitset.h, lib/lbitset.c,
11251 * lib/lbitset.h, lib/sbitset.c, lib/sbitset.h: New.
11252 * src/closure.c (fderives): Be an array of bitsets.
11253
98254360
RA
112542002-02-28 Robert Anisko <robert@lrde.epita.fr>
11255
11256 * data/bison.c++: Merge the two generated headers. Insert a copyright
11257 notice in each output file.
11258
a75c057f
AD
112592002-02-28 Akim Demaille <akim@epita.fr>
11260
11261 * data/bison.c++: Copy the prologue of bison.simple to fetch
11262 useful M4 definitions, such as b4_header_guard.
11263
06b00abc
AD
112642002-02-25 Akim Demaille <akim@epita.fr>
11265
11266 * src/getargs.c (version): Give the name of the authors, and use a
a75c057f
AD
11267 translator friendly scheme for the bgr
11268 copyright notice.
06b00abc 11269
70e7d534
AD
112702002-02-25 Akim Demaille <akim@epita.fr>
11271
11272 * src/output.c (header_output): Remove, now handled completely via
11273 M4.
11274
abe017f6
AD
112752002-02-25 Akim Demaille <akim@epita.fr>
11276
11277 * m4/m4.m4: New, from CVS Autoconf.
11278 * configure.in: Invoke it.
11279 * src/output.c (output_skeleton): Use its result instead of the
11280 hard coded name.
11281
381fb12e
AD
112822002-02-25 Akim Demaille <akim@epita.fr>
11283
11284 * lib/tempname.c, lib/mkstemp.c, m4/mkstemp.m4: New, stolen from
11285 Fileutils 4.1.5.
11286 * configure.in: Invoke UTILS_FUNC_MKSTEMP.
11287 * src/output.c (output_skeleton): Use mkstemp to create a real
11288 temporary file.
11289 Move the filling of `skeleton' and its muscle to...
11290 (prepare): here.
11291 (output): Move the definition of the prologue muscle to...
11292 (prepare): here.
11293 * src/system.h (DEFAULT_TMPDIR): New.
11294
6f38107f
PE
112952002-02-14 Paul Eggert <eggert@twinsun.com>
11296
11297 Remove the support for C++ namespace cleanliness; it was
11298 causing more problems than it was curing, since it didn't work
11299 properly on some nonstandard C++ compilers. This can wait
11300 for a proper C++ parser.
11301
11302 * NEWS: Document this.
11303 * doc/bison.texinfo (Bison Parser, Debugging): Remove special mention
11304 of C++, as it's treated like C now.
11305 * src/bison.simple (YYSTD): Remove.
11306 (YYSIZE_T, YYFPRINTF, YYPARSE_PARAM_ARG, YYPARSE_PARAM_DECL):
11307 Treat C++ just like Standard C instead of trying to support
11308 namespace cleanliness.
11309
80cce3da
AD
113102002-02-14 Akim Demaille <akim@epita.fr>
11311
11312 * tests/regression.at (else): Adjust to Andreas' change.
11313
842e8679
AD
113142002-02-14 Akim Demaille <akim@epita.fr>
11315
11316 * lib/Makefile.am (EXTRA_DIST): Ship strnlen.c.
11317
4bda3f10
AD
113182002-02-13 Andreas Schwab <schwab@suse.de>
11319
11320 * src/output.c (output_rule_data): Don't output NULL, it might
11321 not be defined yet.
11322
4162fa07 113232002-02-11 Robert Anisko <robert@lrde.epita.fr>
b418ecd8 11324
4162fa07
RA
11325 * data/bison.c++ (YYDEBUG, YYERROR_VERBOSE): After the prologue.
11326 (Copyright notice): Update.
b418ecd8 11327
bd16a5dc
AD
113282002-02-11 Akim Demaille <akim@epita.fr>
11329
11330 * tests/regression.at (%nonassoc and eof): Don't include
11331 nonportable headers.
11332
8d69a1a3
RA
113332002-02-08 Robert Anisko <robert@lrde.epita.fr>
11334
11335 * data/bison.c++: Correct error recovery. Make the user able to
11336 initialize the starting location.
11337
9b2d0677
AD
113382002-02-07 Akim Demaille <akim@epita.fr>
11339
11340 * tests/input.at: New.
11341
69e2658b
RA
113422002-02-07 Robert Anisko <robert@lrde.epita.fr>
11343
11344 * data/bison.c++: Replace some direct m4 expansions by constants. Be
9b2d0677 11345 more consistent when naming methods and variables. Put preprocessor
69e2658b
RA
11346 directives around tables only needed for debugging.
11347
4aacc3a7
RA
113482002-02-07 Robert Anisko <robert@lrde.epita.fr>
11349
11350 * data/bison.c++ (yy::b4_name::print_): New method, replaces yyprint in
11351 C++ parsers.
11352 (yy::b4_name::parse): Use print_.
11353
762a801e
RA
113542002-02-07 Robert Anisko <robert@lrde.epita.fr>
11355
11356 * data/bison.c++ (yy::b4_name::parse): Error recovery is back.
11357
4bb2bc3f
RA
113582002-02-07 Robert Anisko <robert@lrde.epita.fr>
11359
11360 * data/bison.c++ (yy::b4_name::error_): New method, replaces yyerror in
11361 C++ parsers.
11362 (yy::b4_name::parse): Build verbose error messages, and use error_.
11363
6b45a3ca
RA
113642002-02-06 Robert Anisko <robert@lrde.epita.fr>
11365
11366 * data/bison.c++: Fix m4 quoting in comments.
11367
50997c6e
RA
113682002-02-06 Robert Anisko <robert@lrde.epita.fr>
11369
11370 * data/bison.c++: Adjust the parser code. Fix some muscles that were
11371 not expanded by m4.
11372
3f3eed27
AD
113732002-02-05 Akim Demaille <akim@epita.fr>
11374
11375 * data/bison.c++: Adjust to the M4 back end.
11376 More is certainly needed.
11377
be2a1a68
AD
113782002-02-05 Akim Demaille <akim@epita.fr>
11379
11380 Give a try to M4 as a back end.
11381
11382 * lib/readpipe.c: New, from wdiff.
11383 * src/Makefile.am (DEFS): Define PKGDATADIR, not BISON_SIMPLE and
11384 BISON_HAIRY.
11385 * src/system.h (BISON_HAIRY, BISON_SIMPLE): Remove the DOS and VMS
11386 specific values. Now it is m4 that performs the lookup.
11387 * src/parse-skel.y: Remove.
11388 * src/muscle_tab.c, src/muscle_tab.h (muscles_m4_output): New.
11389 * src/output.c (actions_output, guards_output)
11390 (token_definitions_output): No longer keeps track of the output
11391 line number, hence remove the second argument.
11392 (guards_output): Check against the guard member of a rule, not the
11393 action member.
11394 Adjust callers.
11395 (output_skeleton): Don't look for the skeleton location, let m4 do
11396 that.
11397 Create `/tmp/muscles.m4'. This is temporary, a proper temporary
11398 file will be used.
11399 Invoke `m4' on m4sugar.m4, muscles.m4, and the skeleton.
11400 (prepare): Given that for the time being changesyntax is not
11401 usable in M4, rename the muscles using `-' to `_'.
11402 Define `defines_flag', `output_parser_name' and `output_header_name'.
11403 * src/output.h (actions_output, guards_output)
11404 (token_definitions_output): Adjust prototypes.
11405 * src/scan-skel.l: Instead of scanning the skeletons, it now
11406 processes the output of m4: `__oline__' and `#output'.
11407 * data/bison.simple: Adjust to be used by M4(sugar).
11408 * tests/Makefile.am: Use check_SCRIPTS to make sure `bison' is up
11409 to date.
11410 * tests/bison.in: Use the secrete envvar `BISON_PKGDATADIR'
11411 instead of the dead `BISON_SIMPLE' and `BISON_HAIRY'.
11412 * data/m4sugar/m4sugar.m4, data/m4sugar/version.m4: New,
11413 shamelessly stolen from CVS Autoconf.
11414
beda758b
AD
114152002-02-05 Akim Demaille <akim@epita.fr>
11416
11417 * lib/hash.c, lib/hash.h: Replace with Fileutils 4.1's version.
11418 * configure.in: Check for the declarations of free and malloc.
11419 * src/muscle_tab.c: Adjust.
11420
5ece6d43
AD
114212002-02-05 Akim Demaille <akim@epita.fr>
11422
11423 * src/muscle_tab.c (muscle_init): Don't default to NULL muscle
11424 which have no values.
11425
5bb18f9a
AD
114262002-02-05 Akim Demaille <akim@epita.fr>
11427
11428 * src/bison.simple, src/bison.hairy, src/bison.c++: Move to...
11429 * data/: here.
11430
894dd62e
PE
114312002-01-29 Paul Eggert <eggert@twinsun.com>
11432
11433 * src/bison.simple (YYSIZE_T): Do not define merely because
11434 YYSTACK_USE_ALLOCA is nonzero or alloca or _ALLOCA_H are defined.
11435 On some platforms, <alloca.h> does not declare YYSTD (size_t).
11436
82841af7
AD
114372002-01-27 Akim Demaille <akim@epita.fr>
11438
11439 Fix `%nonassoc and eof'.
11440
11441 * src/state.c (errs_dup): Aaaah! The failure was due to bytes
11442 which were not properly copied! Replace
11443 memcpy (res->errs, src->errs, src->nerrs);
11444 with
11445 memcpy (res->errs, src->errs, src->nerrs * sizeof (src->errs[0]));
11446 !!!
11447 * tests/regression.at (%nonassoc and eof): Adjust to newest
11448 Autotest: `.' is not in the PATH.
11449
318b76e9
AD
114502002-01-27 Akim Demaille <akim@epita.fr>
11451
11452 * tests/sets.at (AT_EXTRACT_SETS): New.
11453 (Nullable): Use it.
11454 (Firsts): New.
11455
30d2f3d5
AD
114562002-01-26 Akim Demaille <akim@epita.fr>
11457
11458 * tests/actions.at, tests/calc.at, tests/headers.at,
11459 * tests/torture.at: Adjust to the newest Autotest which no longer
11460 forces `.' in the PATH.
11461
30f8c395
AD
114622002-01-25 Akim Demaille <akim@epita.fr>
11463
11464 * tests/regression.at (%nonassoc and eof): New.
11465 Suggested by Robert Anisko.
11466
29ae55f1
AD
114672002-01-24 Akim Demaille <akim@epita.fr>
11468
11469 Bison dumps core when trying to complain about broken input files.
11470 Reported by Cris van Pelt.
11471
11472 * src/lex.c (parse_percent_token): Be sure to set token_buffer.
11473 * tests/regression.at (Invalid input: 1, Invalid input: 2): Merge
11474 into...
11475 (Invalid inputs): Strengthen: exercise parse_percent_token.
11476
2b548aa6
RA
114772002-01-24 Robert Anisko <robert.anisko@epita.fr>
11478
11479 * src/Makefile.am: Add bison.c++.
11480 * src/bison.c++: New skeleton.
11481
bb0146c2
AD
114822002-01-21 Paolo Bonzini <bonzini@gnu.org>
11483
11484 * po/it.po: New.
11485
bec30531
AD
114862002-01-21 Kees Zeelenberg <kzlg@users.sourceforge.net>
11487
11488 * src/files.c (skeleton_find) [MSDOS]: Fix cp definition.
11489
fc6edc45
MA
114902002-01-20 Marc Autret <marc@gnu.org>
11491
11492 * src/files.c (compute_output_file_names): Fix
11493
5e5d5415
MA
114942002-01-20 Marc Autret <marc@gnu.org>
11495
11496 * tests/output.at: New test.
11497 * src/files.c (compute_base_names): Don't map extensions when
11498 the YACC flag is set, use defaults.
11499 Reported by Evgeny Stambulchik.
11500
44ea3fbd
MA
115012002-01-20 Marc Autret <marc@gnu.org>
11502
ba0fe3c7
PE
11503 * src/system.h: Need to define __attribute__ away for non-GCC
11504 compilers as well (i.e., the vendor C compiler).
44ea3fbd
MA
11505 Suggested by Albert Chin-A-Young.
11506
338963d1
TVH
115072002-01-11 Tim Van Holder <tim.van.holder@pandora.be>
11508
11509 * lib/hash.h, lib/hash.c: Renamed __P to PARAMS and used the
11510 canonical definition.
11511 * src/system.h: Use the canonical definition for PARAMS (avoids
11512 a conflict with the macro from lib/hash.h).
11513
c57b2479
AD
115142002-01-11 Akim Demaille <akim@epita.fr>
11515
11516 * configure.in: Use AC_FUNC_STRNLEN.
d9e9746c 11517 Fixes the failures observed on AIX 4.3 by H.Merijn Brand.
c57b2479 11518
b85810ae
AD
115192002-01-09 Akim Demaille <akim@epita.fr>
11520
11521 * src/files.c, src/files.h (output_infix): New.
11522 (tab_extension): Remove.
11523 (compute_base_names): Compute the former, drop the latter.
11524 * src/output.c (prepare): Insert the muscles `output-infix', and
11525 `output-suffix'.
11526 * src/parse-skel.y (string, string.1): New.
11527 (section.header): Use it.
11528 (section.yacc): Remove.
11529 (prefix): Remove too.
11530 * src/scan-skel.l: Adjust.
11531 * src/bison.simple, src/bison.hairy: Adjust.
11532
cae60122
AD
115332002-01-09 Akim Demaille <akim@epita.fr>
11534
11535 * configure.in (WERROR_CFLAGS): Compute it.
11536 * src/Makefile.am (CFLAGS): Pass it.
11537 * tests/atlocal.in (CFLAGS): Idem.
11538 * src/files.c: Fix a few warnings.
11539 (get_extension_index): Remove, unused.
11540
ae404801
AD
115412002-01-08 Akim Demaille <akim@epita.fr>
11542
11543 * src/getargs.c (AS_FILE_NAME): New.
11544 (getargs): Use it to convert DOSish file names.
11545 * src/files.c (base_name): Rename as full_base_name to avoid
11546 clashes with `base_name ()'.
11547 (filename_split): New.
11548 (compute_base_names): N-th rewrite, using filename_split.
11549
22312b71
AD
115502002-01-08 Akim Demaille <akim@epita.fr>
11551
11552 * lib/basename.c, lib/dirname.h, lib/dirname.c, lib/memrchr.c:
11553 New, stolen from the Fileutils 4.1.
11554 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
11555 * configure.in: Check for the presence of memrchr, and of its
11556 prototype.
11557
a67cef01
TVH
115582002-01-07 Tim Van Holder <tim.van.holder@pandora.be>
11559
11560 * lib/hash.h (__P): Added definition for this macro.
11561 * src/Makefile.am: Add parse-skel.c and scan-skel.c to
11562 BUILT_SOURCES, to ensure they are generated first.
11563 * src/parse-skel.y: Use YYERROR_VERBOSE instead of
11564 %error-verbose to allow bootstrapping with bison 1.30x.
11565
2b25d624
AD
115662002-01-06 Akim Demaille <akim@epita.fr>
11567
11568 * src/reader.c (parse_braces): Don't fetch the next char, the
11569 convention is to fetch on entry.
11570 * tests/torture.at (GNU Cim Grammar): Reintroduce their weird
11571 'switch' without a following semicolon.
11572 * tests/regression.at (braces parsing): New.
11573
3460813b
AD
115742002-01-06 Akim Demaille <akim@epita.fr>
11575
11576 Bison is dead wrong in its RR conflict reports.
11577
11578 * tests/torture.at (GNU Cim Grammar): New.
11579 * src/conflicts.c (count_rr_conflicts): Fix.
11580
73784c64
AD
115812002-01-06 Akim Demaille <akim@epita.fr>
11582
11583 Creating package.m4 from configure.ac causes too many problems.
11584
11585 * tests/Makefile.am (package.m4): Create it by hand,
11586 AC_CONFIG_TESTDIR no longer does in the most recent CVS Autoconf.
11587
25d81090
AD
115882002-01-06 Akim Demaille <akim@epita.fr>
11589
11590 * src/Makefile.am (bison_SOURCES): Add parse-skel.h and
11591 skeleton.h.
11592
a9b8959e
PE
115932002-01-04 Paul Eggert <eggert@twinsun.com>
11594
11595 * doc/bison.texinfo (Debugging):
11596 Remove YYSTDERR; it's no longer defined or used.
11597 Also, s/cstdio.h/cstdio/.
11598
25d81090
AD
115992002-01-03 Akim Demaille <akim@epita.fr>
11600
11601 * tests/bison.in, tests/atlocal.in: Adjust to CVS Autoconf.
11602
1109455c
AD
116032002-01-03 Akim Demaille <akim@epita.fr>
11604
11605 * src/parse-skel.y (process_skeleton): Don't bind the parser's
11606 tracing code to --trace, wait for a better --trace option, with
11607 args.
11608
7ea5e977
AD
116092002-01-03 Akim Demaille <akim@epita.fr>
11610
11611 * src/bison.simple (YYSTDERR): Remove, replace `stderr'.
11612 The ISO C++ standard is extremely clear about it: stderr is
11613 considered a macro, not a regular symbol (see table 94 `Header
11614 <cstdio> synopsis', [lib.c.files] 27.8.2 C Library files).
11615 Therefore std:: does not apply to it. It still does with fprintf.
11616 Also, s/cstdio.h/cstdio/.
11617
fab5b110
AD
116182002-01-03 Akim Demaille <akim@epita.fr>
11619
11620 * lib/quotearg.c: Use `#include "..."' instead of `#include <...>'
11621 for non system headers.
11622
aed7fd9b
AD
116232002-01-02 Akim Demaille <akim@epita.fr>
11624
11625 Equip the skeleton chain with location tracking, runtime trace,
11626 pure parser and scanner.
11627
11628 * src/parse-skel.y: Request a pure parser, locations, and prefix
11629 renaming.
11630 (%union): Having several members with the same type does not help
11631 type mismatches, simplify.
11632 (YYPRINT, yyprint): New.
11633 (yyerror): ``Rename'' (there is a #define yyerror skel_error) as...
11634 (skel_error): this.
11635 Handle locations.
11636 * src/scan-skel.l: Adjust to these changes.
11637 * src/skeleton.h (LOCATION_RESET, LOCATION_LINES, LOCATION_STEP)
11638 (LOCATION_PRINT, skel_control_t): New.
11639
24fad99e
AD
116402001-12-30 Akim Demaille <akim@epita.fr>
11641
11642 * src/parse-skel.y: Get rid of the shift/reduce conflict:
11643 replace `gb' with BLANKS.
11644 * src/scan-skel.l: Adjust.
11645
a4b36db4
AD
116462001-12-30 Akim Demaille <akim@epita.fr>
11647
11648 * src/system.h: We don't need nor want bcopy.
11649 Throw away MS-DOS crap: we don't need getpid.
11650 * configure.in: We don't need strndup. It was even causing
11651 problems: because Flex includes the headers *before* us,
11652 _GNU_SOURCE is not defined by config.h, and therefore strndup was
11653 not visible.
11654 * lib/xstrndup.c: New.
11655 * src/scan-skel.l: Use it.
11656 Be sure to initialize yylval.muscle member when scanning a MUSCLE.
11657 * src/parse-skel.y: Use %directives instead of #defines.
11658
1239777d
AD
116592001-12-30 Akim Demaille <akim@epita.fr>
11660
11661 * src/skeleton.h: New.
11662 * src/output.c (output_parser, output_master_parser): Remove, dead
11663 code.
11664 * src/output.h (get_lines_number, actions_output, guards_output)
11665 (token_definitions_output): Prototype them.
11666 * src/parse-skel.y: Add the license notice.
11667 Include output.h and skeleton.h.
11668 (process_skeleton): Returns void, and takes a single parameter.
11669 * src/scan-skel.l: Add the license notice.
11670 Include skeleton.h.
11671 Don't use %option yylineno: it seems that then Flex imagines
11672 REJECT has been used, and therefore it won't reallocate its
11673 buffers (which makes no other sense to me than a bug). It results
11674 in warnings for `unused: yy_flex_realloc'.
11675
9b3add5b
RA
116762001-12-30 Robert Anisko <robert.anisko@epita.fr>
11677
11678 * src/muscle_tab.h (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
11679 (MUSCLE_INSERT_PREFIX): ...to there.
11680 * src/output.c (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
11681 (MUSCLE_INSERT_PREFIX): Move from here...
11682
11683 * src/bison.hairy: Add a section directive. Put braces around muscle
11684 names. This parser skeleton is still broken, but Bison should not
11685 choke on a bad muscle 'syntax'.
11686 * src/bison.simple: Add a section directive. Put braces around muscle
11687 names.
11688
11689 * src/files.h (strsuffix, stringappend): Add declarations.
11690 (tab_extension): Add declaration.
11691 (short_base_name): Add declaration.
11692
11693 * src/files.c (strsuffix, stringappend): No longer static. These
11694 functions are used in the skeleton parser.
11695 (tab_extension): New.
11696 (compute_base_names): Use the computations done in this function
fab5b110 11697 to guess if the generated parsers should have '.tab' in their
9b3add5b
RA
11698 names.
11699 (short_base_name): No longer static.
11700
11701 * src/output.c (output_skeleton): New.
11702 (output): Disable call to output_master_parser, and give a try to
11703 a new skeleton handling system.
11704 (guards_output, actions_output): No longer static.
11705 (token_definitions_output, get_lines_number): No longer static.
11706
11707 * configure.in: Use AM_PROG_LEX and AC_PROG_YACC.
11708
fab5b110 11709 * src/Makefile.am (bison_SOURCES): Add scan-skel.l and
9b3add5b
RA
11710 parse-skel.y.
11711
11712 * src/parse-skel.y: New file.
11713 * src/scan-skel.l: New file.
11714
b5b61c61
AD
117152001-12-29 Akim Demaille <akim@epita.fr>
11716
11717 %name-prefix is broken.
11718
11719 * src/files.c (spec_name_prefix): Initialize to NULL, not to "yy".
11720 Adjust all dependencies.
11721 * tests/headers.at (export YYLTYPE): Strengthen this test: use
11722 %name-prefix.
11723
11724 Renaming yylval but not yylloc is not consistent. Now we do.
11725
11726 * src/bison.simple: Prefix yylloc if used.
11727 * doc/bison.texinfo (Decl Summary): Document that.
11728
8c9a50be
AD
117292001-12-29 Akim Demaille <akim@epita.fr>
11730
11731 * doc/bison.texinfo: Promote `%long-directive' over
11732 `%long_directive'.
11733 Remove all references to fixed-output-files, yacc is enough.
11734
d99361e6
AD
117352001-12-29 Akim Demaille <akim@epita.fr>
11736
11737 * src/bison.simple: Define YYDEBUG and YYERROR_VERBOSE *after* the
11738 user prologue. These are defaults.
11739 * tests/actions.at (Mid-rule actions): Make sure the user can
11740 define YYDEBUG and YYERROR_VERBOSE.
11741
b9cecb91
AD
117422001-12-29 Akim Demaille <akim@epita.fr>
11743
11744 * src/output.c (header_output): Don't forget to export YYLTYPE and
11745 yylloc.
11746 * tests/headers.at (export YYLTYPE): New, make sure it does.
11747 * tests/regression.at (%union and --defines, Invalid CPP headers):
11748 Move to...
11749 * tests/headers.at: here.
11750
aea13e97
AD
117512001-12-29 Akim Demaille <akim@epita.fr>
11752
11753 * src/gram.h (rule_s): Member `assoc' is of type `associativity'.
11754
931394cb
AD
117552001-12-29 Akim Demaille <akim@epita.fr>
11756
11757 * tests/actions.at (Mid-rule actions): Output on a single line
11758 instead of several.
11759
704a47c4
AD
117602001-12-29 Akim Demaille <akim@epita.fr>
11761
11762 * doc/bison.texinfo: Formatting changes.
11763
091e20bb
AD
117642001-12-29 Akim Demaille <akim@epita.fr>
11765
11766 Don't store the token defs in a muscle, just be ready to output it
11767 on command. Now possible via `symbols'. Fixes a memory leak.
11768
11769 * src/output.c (token_definitions_output): New.
11770 (output_parser, header_output): Use it.
11771 * src/reader.c (symbols_save): Remove.
11772
cce71710
AD
117732001-12-29 Akim Demaille <akim@epita.fr>
11774
11775 * src/bison.simple: Do not provide a default for YYSTYPE and
11776 YYLTYPE before the user's prologue. Otherwise it's hardly... a
11777 default.
11778
82c035a8
AD
117792001-12-29 Akim Demaille <akim@epita.fr>
11780
11781 Mid-rule actions are simply... ignored!
11782
11783 * src/reader.c (readgram): Be sure to attach mid-rule actions to
11784 the empty-rule associated to the dummy symbol, not to the host
11785 rule.
11786 * tests/actions.at (Mid-rule actions): New.
11787
8419d367
AD
117882001-12-29 Akim Demaille <akim@epita.fr>
11789
11790 Memory leak.
11791
11792 * src/reader.c (reader): Free grammar.
11793
375d5806
AD
117942001-12-29 Akim Demaille <akim@epita.fr>
11795
11796 Memory leak.
11797
11798 * src/LR0.c (new_itemsets): Don't allocate `shift_symbol' here,
11799 since it allocates it for each state, although only one is needed.
11800 (allocate_storage): Do it here.
11801
f51cb8ff
AD
118022001-12-29 Akim Demaille <akim@epita.fr>
11803
11804 * src/options.h, src/options.c (create_long_option_table): Rename
11805 as...
11806 (long_option_table_new): this, with a clearer prototype.
11807 (percent_table): Remove, unused,
11808 * src/getargs.c (getargs): Adjust.
11809
29e88316
AD
118102001-12-29 Akim Demaille <akim@epita.fr>
11811
11812 * src/LR0.c, src/conflicts.c, src/lalr.c, src/lalr.h, src/output.c
11813 * src/print.c, src/print_graph.c, src/state.h: Rename state_table
11814 as states.
11815
b9f71f19
AD
118162001-12-29 Akim Demaille <akim@epita.fr>
11817
11818 * src/lalr.c (build_relations): Rename `states' as `states1'.
11819 Sorry, I don't understand exactly what it is, no better name...
11820
1a2b5d37
AD
118212001-12-29 Akim Demaille <akim@epita.fr>
11822
11823 * src/closure.c, src/conflicts.c, src/derives.c, src/gram.c
11824 * src/gram.h, src/lalr.c, src/nullable.c, src/output.c, src/print.c
11825 * src/print_graph.c, src/reader.c, src/reduce.c: Rename rule_table
11826 as rules.
11827
1cca533e
AD
118282001-12-29 Akim Demaille <akim@epita.fr>
11829
11830 * src/gram.c (rprec, rprecsym, rassoc): Remove, unused since long
11831 ago.
11832
c03ae966
AD
118332001-12-29 Akim Demaille <akim@epita.fr>
11834
11835 * src/reader.c, src/reader.h (user_toknums): Remove.
11836 Adjust all users to use symbols[i]->user_token_number.
11837
5a670b1e
AD
118382001-12-29 Akim Demaille <akim@epita.fr>
11839
11840 * src/gram.c, src/gram.h (sprec, sassoc): Remove.
11841 Adjust all users to use symbols[i]->prec or ->assoc.
11842
ad949da9
AD
118432001-12-29 Akim Demaille <akim@epita.fr>
11844
11845 * src/reader.c, src/reader.h (tags): Remove.
11846 Adjust all users to use symbols[i]->tag.
11847
0e78e603
AD
118482001-12-29 Akim Demaille <akim@epita.fr>
11849
11850 * src/gram.h, src/gram.c (symbols): New, similar to state_table
11851 and rule_table.
11852 * src/reader.c (packsymbols): Fill this table.
11853 Drop sprec.
11854 * src/conflicts.c (resolve_sr_conflict): Adjust.
11855 * src/reduce.c (reduce_grammar): Adjust: just sort symbols, a
11856 single table.
11857 Use symbols[i]->tag instead of tags[i].
11858
213e640e
AD
118592001-12-29 Akim Demaille <akim@epita.fr>
11860
11861 * tests/calc.at (_AT_DATA_CALC_Y): Also use %union.
11862 In addition, put a comment in there, to replace...
11863 * tests/regression.at (%union and C comments): Remove.
11864
e7b8bef1
AD
118652001-12-29 Akim Demaille <akim@epita.fr>
11866
11867 * tests/regression.at (Web2c Actions): Blindly move the actual
11868 output as expected output. The contents *seem* right to me, but I
11869 can't pretend reading perfectly parser tables... Nonetheless, all
11870 the other tests pass correctly, the table look OK, even though the
11871 presence of `$axiom' is to be noted: AFAICS it is useless (but
11872 harmless).
11873
b68e7744
AD
118742001-12-29 Akim Demaille <akim@epita.fr>
11875
11876 * src/reader.c (readgram): Don't add the rule 0 if there were no
11877 rules read. In other words, add it _after_ having performed
11878 grammar sanity checks.
11879 Fixes the `tests/regression.at (Invalid input: 1)' Failure.
11880
78d5bae9
AD
118812001-12-29 Akim Demaille <akim@epita.fr>
11882
11883 * tests/regression.at (Web2c Report): Catch up: the rule 0 is now
11884 visible, and some states have now a different number.
11885
ff442794
AD
118862001-12-29 Akim Demaille <akim@epita.fr>
11887
11888 * src/reader.c (readgram): Bind the initial rule's lineno to that
11889 of the first rule.
11890 * tests/regression.at (Rule Line Numbers, Unresolved SR Conflicts):
11891 (Solved SR Conflicts): Adjust rule 0's line number.
11892
610ab194
AD
118932001-12-29 Akim Demaille <akim@epita.fr>
11894
11895 Fix the `GAWK Grammar' failure.
11896
11897 * src/LR0.c (final_state): Initialize to -1 so that we do compute
11898 the reductions of the first state which was mistakenly confused
11899 with the final state because precisely final_state was initialized
11900 to 0.
11901 * tests/sets.at (Nullable): Adjust: state 0 does have lookaheads,
11902 now noticed by Bison.
11903 * tests/regression.at (Rule Line Numbers): Adjust: state 0 does
11904 have a reduction on $default.
11905
29d29c8f
AD
119062001-12-29 Akim Demaille <akim@epita.fr>
11907
11908 * src/gram.c (ritem_print): Be sure to subtract 1 when displaying
11909 rule line numbers.
11910 * src/closure.c (print_closure): Likewise.
11911 * src/derives.c (print_derives): Likewise.
11912 * tests/sets.at (Nullable): Adjust: the rule numbers are correct
11913 now.
11914
7c6b64d0
AD
119152001-12-29 Akim Demaille <akim@epita.fr>
11916
11917 * src/lalr.c (lookaheads_print): New.
11918 (lalr): Call it when --trace-flag.
11919 * tests/sets.at (Nullable): Adjust: when tracing, the lookaheads
11920 are dumped.
11921
3d4daee3
AD
119222001-12-29 Akim Demaille <akim@epita.fr>
11923
11924 * src/derives.c (print_derives): Be sure to use `>= 0', not `> 0',
11925 when walking through ritem, even via rule->rhs.
11926 * src/reduce.c (dump_grammar, useful_production, reduce_output)
11927 (useful_production, useless_nonterminals): Likewise.
11928 (reduce_grammar_tables): Likewise, plus update nritems.
11929 * src/nullable.c (set_nullable): Likewise.
11930 * src/lalr.c (build_relations): Likewise.
11931 * tests/sets.at (Nullable): Adjust.
11932 Fortunately, now, the $axiom is no longer nullable.
11933
9e7f6bbd
AD
119342001-12-29 Akim Demaille <akim@epita.fr>
11935
11936 * src/LR0.c (generate_states): Use nritems, not nitems, nor using
11937 the 0-sentinel.
11938 * src/gram.c (ritem_longest_rhs): Likewise.
11939 * src/reduce.c (nonterminals_reduce): Likewise.
11940 * src/print_graph.c (print_graph): Likewise.
11941 * src/output.c (output_rule_data): Likewise.
11942 * src/nullable.c (set_nullable): Likewise.
11943
255ef638
AD
119442001-12-29 Akim Demaille <akim@epita.fr>
11945
11946 * src/output.c: Comment changes.
11947
0d8a7363
AD
119482001-12-27 Paul Eggert <eggert@twinsun.com>
11949
11950 * src/bison.simple (YYSTACK_ALLOC, YYSIZE_T): Remove special
11951 cases for non-GNU systems like AIX, HP-UX, SGI, Sun, and
11952 Sparc, as they were causing more porting problems than the
11953 (minor) performance improvement was worth.
11954
11955 Also, catch up with 1.31's YYSTD.
11956
3db472b9
AD
119572001-12-27 Akim Demaille <akim@epita.fr>
11958
11959 * src/output.c (output_gram): Rely on nritems, not the
11960 0-sentinel. See below.
11961 Use -1 as separator, not 0.
11962 * src/bison.simple (yyparse): Subtract 1 to the rule numbers.
11963 Rely on -1 as separator in yyrhs, instead of 0.
11964 * tests/calc.at (AT_CHECK_CALC): Now, the parsers no longer issue
11965 twice `Now at end of input', therefore there are two lines less to
11966 expect.
11967
b365aa05
AD
119682001-12-27 Akim Demaille <akim@epita.fr>
11969
11970 * tests/regression.at (Unresolved SR Conflicts):
11971 (Solved SR Conflicts, Rule Line Numbers): Adjust to the changes
11972 below.
11973
30171f79
AD
119742001-12-27 Akim Demaille <akim@epita.fr>
11975
11976 * src/LR0.c (new_state): Recognize the final state by the fact it
11977 is reached by eoftoken.
11978 (insert_start_shifting_state, insert_eof_shifting_state)
11979 (insert_accepting_state, augment_automaton): Remove, since now
11980 these states are automatically computed from the initial state.
11981 (generate_states): Adjust.
11982 * src/print.c: When reporting a rule number to the user, substract
11983 1, so that the axiom rule is rule 0, and the first user rule is 1.
11984 * src/reduce.c: Likewise.
11985 * src/print_graph.c (print_core): For the time being, just as for
11986 the report, depend upon --trace-flags to dump the full set of
11987 items.
11988 * src/reader.c (readgram): Once the grammar read, insert the rule
11989 0: `$axiom: START-SYMBOL $'.
11990 * tests/set.at: Adjust: rule 0 is now displayed, and since the
11991 number of the states has changed (the final state is no longer
11992 necessarily the last), catch up.
11993
75142d45
AD
119942001-12-27 Akim Demaille <akim@epita.fr>
11995
11996 Try to make the use of the eoftoken valid. Given that its value
11997 is 0 which was also used as a sentinel in ritem, (i) make sure >= 0
11998 is used instead of > 0 where appropriate, (ii), depend upon nritems
11999 instead of the 0-sentinel.
12000
12001 * src/gram.h, src/gram.c (nritems): New.
12002 Expected to be duplication of nitems, but for the time being...
12003 * src/reader.c (packgram): Assert nritems and nitems are equal.
12004 * src/LR0.c (allocate_itemsets, new_itemsets): Adjust.
12005 * src/closure.c (print_closure, print_fderives): Likewise.
12006 * src/gram.c (ritem_print): Likewise.
12007 * src/print.c (print_core, print_grammar): Likewise.
12008 * src/print_graph.c: Likewise.
12009
b7c49edf
AD
120102001-12-27 Akim Demaille <akim@epita.fr>
12011
12012 * src/main.c (main): If there are complains after grammar
12013 reductions, then output the report anyway if requested, then die.
12014 * src/symtab.c (bucket_new): Initialize `value' to -1, not 0.
12015 * src/reader.c (eoftoken): New.
12016 (parse_token_decl): If the token being defined has value `0', it
12017 is the eoftoken.
12018 (packsymbols): No longer hack `tags' to insert `$' by hand.
12019 Be sure to preserve the value of the eoftoken.
12020 (reader): Make sure eoftoken is defined.
12021 Initialize nsyms to 0: now eoftoken is created just like the others.
12022 * src/print.c (print_grammar): Don't special case the eof token.
12023 * src/regression.at: Adjust: `$' has value 0, not -1, which was a
12024 lie anyway, albeit pleasant.
12025 * tests/calc.at: Exercise error messages with eoftoken.
12026 Change the grammar so that empty input is invalid.
12027 Adjust expectations.
12028 When yyungeting, be sure to use a valid yylloc: use last_yylloc.
12029
ec2da99f
AD
120302001-12-27 Akim Demaille <akim@epita.fr>
12031
12032 * configure.in: Check the protos of strchr ans strspn.
12033 Replace strchr if needed.
12034 * src/system.h: Provide the protos of strchr, strspn and memchr if
12035 missing.
12036 * lib/strchr.c: New.
12037 * src/reader.c (symbols_save): Use strchr.
12038
8adfa272
AD
120392001-12-27 Akim Demaille <akim@epita.fr>
12040
12041 * src/print.c, src/print_graph.c (escape): New.
12042 Use it to quote the TAGS outputs.
12043 * src/print_graph.c (print_state): Now errors are in red, and
12044 reductions in green.
12045 Prefer high to wide: output the state number on a line of its own.
12046
80dac38c
AD
120472001-12-27 Akim Demaille <akim@epita.fr>
12048
12049 * src/state.h, src/state.c (reductions_new): New.
12050 * src/LR0.c (set_state_table): Let all the states have a
12051 `reductions', even if reduced to 0.
12052 (save_reductions): Adjust.
12053 * src/lalr.c (initialize_LA, initialize_lookaheads): Adjust.
12054 * src/print.c (print_reductions, print_actions): Adjust.
12055 * src/output.c (action_row): Adjust.
12056
2cec70b9
AD
120572001-12-27 Akim Demaille <akim@epita.fr>
12058
12059 * src/state.h, src/state.c (errs_new, errs_dup): New.
12060 * src/LR0.c (set_state_table): Let all the states have an errs,
12061 even if reduced to 0.
12062 * src/print.c (print_errs, print_reductions): Adjust.
12063 * src/output.c (output_actions, action_row): Adjust.
12064 * src/conflicts.c (resolve_sr_conflict): Adjust.
12065
13ca549a
AD
120662001-12-27 Akim Demaille <akim@epita.fr>
12067
12068 * src/lalr.c (set_goto_map, initialize_F): Use SHIFT_SYMBOL.
12069
5092aba5
AD
120702001-12-27 Akim Demaille <akim@epita.fr>
12071
12072 * src/conflicts.c, src/conflicts.h (print_reductions): Move to...
12073 * src/print.c: here.
12074 (lookaheadset, shiftset): New, used as additional storage by
12075 print_reductions.
12076 (print_results): Adjust.
12077 (print_shifts, print_gotos, print_errs): New, extracted from...
12078 (print_actions): here.
12079 * src/print_graph.c (print_actions): Remove dead code.
12080
11e2beca
AD
120812001-12-27 Akim Demaille <akim@epita.fr>
12082
12083 * src/reader.c (copy_dollar, copy_at): Better checking of `n' in
12084 `$n' and `@n'.
12085
dac3c910
AD
120862001-12-27 Akim Demaille <akim@epita.fr>
12087
12088 * src/lalr.c (add_lookback_edge): Use state_t instead of ints.
12089 (build_relations): Adjust.
12090
d0b0fefa
AD
120912001-12-27 Akim Demaille <akim@epita.fr>
12092
12093 * src/lalr.c (set_goto_map): Remove a wrong but benign loop
12094 duplication.
12095
adc8c848
AD
120962001-12-27 Akim Demaille <akim@epita.fr>
12097
12098 * src/reader.c (packgram): Catch nitems overflows.
12099
14d293ac
AD
121002001-12-27 Akim Demaille <akim@epita.fr>
12101
12102 * src/files.c, src/files.h (guard_obstack): Remove.
12103 * src/output.c (output): Adjust.
12104 * src/reader.c (parse_braces): New, factoring...
12105 (copy_action, copy_guard): these two which are renamed as...
12106 (parse_action, parse_guard): these.
12107 As a voluntary consequence, using braces around guards is now
12108 mandatory.
12109
f499b062
AD
121102001-12-27 Akim Demaille <akim@epita.fr>
12111
12112 * src/gram.h (rule_t): `guard' and `guard_line' are new members.
12113 * src/reader.c (symbol_list): `guard' and `guard_line' are new
12114 members.
12115 (symbol_list_new): Adjust.
12116 (copy_action): action_line is the first line, not the last.
12117 (copy_guard): Just as for actions, store the `action' only, not
12118 the switch/case/break flesh.
12119 Don't parse the user action that might follow the guard, let...
12120 (readgram): do it, i.e., now, there can be an action after a
12121 guard.
12122 In other words the guard is just explicitly optional.
12123 (packgram): Adjust.
12124 * src/output.c (guards_output): New.
12125 (output_parser): Call it when needed.
12126 (output): Also free the guard and attrs obstacks.
12127 * src/files.c, src/files.h (obstack_save): Remove.
12128 (output_files): Remove.
12129 As a result, if one needs the former `.act' file, using an
12130 appropriate skeleton which requires actions and guards is now
12131 required.
12132 * src/main.c (main): Adjust.
12133 * tests/semantic.at: New.
12134 * tests/regression.at: Use `input.y' as input file name.
12135 Avoid 8+3 problems by requiring input.c when the test needs the
12136 parser.
12137
d945f5cd
AD
121382001-12-27 Akim Demaille <akim@epita.fr>
12139
12140 * src/reader.c (symbol_list_new): Be sure to initialize all the
12141 fields.
12142
d200e455
AD
121432001-12-27 Akim Demaille <akim@epita.fr>
12144
12145 All the hacks using a final pseudo state are now useless.
12146
12147 * src/LR0.c (set_state_table): state_table holds exactly nstates.
12148 * src/lalr.c (nLA): New.
12149 (initialize_LA, compute_lookaheads, initialize_lookaheads): Use it
12150 instead of lookaheadsp from the pseudo state (nstate + 1).
12151
f9507c28
AD
121522001-12-27 Akim Demaille <akim@epita.fr>
12153
12154 * src/output.c (action_row, token_actions): Use a state_t instead
12155 of a integer, and nlookaheads instead of the following state's
12156 lookaheadsp.
12157
065fbd27
AD
121582001-12-27 Akim Demaille <akim@epita.fr>
12159
12160 * src/conflicts.c (log_resolution, flush_shift)
12161 (resolve_sr_conflict, set_conflicts, solve_conflicts)
12162 (count_sr_conflicts, count_rr_conflicts, conflicts_output)
12163 (conflicts_print, print_reductions): Use a state_t instead of an
12164 integer when referring to a state.
12165 As much as possible, depend upon nlookaheads, instead of the
12166 `lookaheadsp' member of the following state (since lookaheads of
12167 successive states are successive, the difference between state n + 1
12168 and n served as the number of lookaheads for state n).
12169 * src/lalr.c (add_lookback_edge): Likewise.
12170 * src/print.c (print_core, print_actions, print_state)
12171 (print_results): Likewise.
12172 * src/print_graph.c (print_core, print_actions, print_state)
12173 (print_graph): Likewise.
12174 * src/conflicts.h: Adjust.
12175
1b177bd7
AD
121762001-12-27 Akim Demaille <akim@epita.fr>
12177
12178 * src/bison.hairy: Formatting/comment changes.
12179 ANSIfy.
12180 Remove `register' indications.
12181 Add plenty of `static'.
12182
7742ddeb
AD
121832001-12-27 Akim Demaille <akim@epita.fr>
12184
12185 * src/output.c (prepare): Drop the muscle `ntbase' which
12186 duplicates ntokens.
12187 * src/bison.simple: Formatting/comment changes.
12188 Use YYNTOKENS only, which is documented, but not YYNTBASE, which
12189 is an undocumented synonym.
12190
1fa14068
AD
121912001-12-22 Akim Demaille <akim@epita.fr>
12192
12193 * src/output.c (output_table_data): Change the prototype to use
12194 `int' for array ranges: some invocations do pass an int, not a
12195 short.
12196 Reported by Wayne Green.
12197
b9752825
AD
121982001-12-22 Akim Demaille <akim@epita.fr>
12199
12200 Some actions of web2c.y are improperly triggered.
12201 Reported by Mike Castle.
12202
12203 * src/lalr.c (traverse): s/F (i)[k] = F (j)[k]/F (j)[k] = F (i)[k]/.
12204 * tests/regression.at (Web2c): Rename as...
12205 (Web2c Report): this.
12206 (Web2c Actions): New.
12207
776209d6
AD
122082001-12-22 Akim Demaille <akim@epita.fr>
12209
12210 Reductions in web2c.y are improperly reported.
12211 Reported by Mike Castle.
12212
12213 * src/conflicts.c (print_reductions): Fix.
12214 * tests/regression.at (Web2c): New.
12215
275fc3ad
AD
122162001-12-18 Akim Demaille <akim@epita.fr>
12217
12218 Some host fail on `assert (!"foo")', which expands to
12219 ((!"foo") ? (void)0 : __assert("!"foo."", __FILE__, __LINE__))
12220 Reported by Nelson Beebee.
12221
12222 * src/output.c, src/vcg.c: Replace `assert (!"it succeeded")' with
12223 `#define it_succeeded 0' and `assert (it_succeeded)'.
12224
897668ee
MA
122252001-12-17 Marc Autret <autret_m@epita.fr>
12226
12227 * src/bison.simple: Don't hard code the skeleton line and filename.
12228 * src/output.c (output_parser): Rename 'line' as 'output_line'.
12229 New line counter 'skeleton_line' (skeleton-line muscle).
12230
ab3399e0
PE
122312001-12-17 Paul Eggert <eggert@twinsun.com>
12232
12233 * NEWS, doc/bison.texinfo, doc/bison.1, doc/bison.rnh: Document that
12234 YYDEBUG must be defined to a nonzero value.
12235
12236 * src/bison.simple (yytname): Do not assume that the user defines
12237 YYDEBUG to a properly parenthesized expression.
12238
3877f72b
AD
122392001-12-17 Akim Demaille <akim@epita.fr>
12240
12241 * src/state.h (state_t): Rename lookaheads as lookaheadsp.
12242 nlookaheads is a new member.
12243 Adjust all users.
12244 * src/lalr.h (nlookaheads): Remove this orphan declaration.
12245 * src/lalr.c (initialize_lookaheads): Set nlookaheads for each
12246 state.
776209d6 12247
331dbc1b
AD
122482001-12-17 Akim Demaille <akim@epita.fr>
12249
12250 * src/files.h, src/files.c (open_files, close_files): Remove.
12251 * src/main.c (main): Don't open/close files, nor invoke lex_free,
12252 let...
12253 * src/reader.c (reader): Do it.
776209d6 12254
be750e4c
AD
122552001-12-17 Akim Demaille <akim@epita.fr>
12256
12257 * src/conflicts.c (print_reductions): Formatting changes.
776209d6 12258
709ae8c6
AD
122592001-12-17 Akim Demaille <akim@epita.fr>
12260
12261 * src/conflicts.c (flush_shift): Also adjust lookaheadset.
12262 (flush_reduce): New.
12263 (resolve_sr_conflict): Adjust.
776209d6 12264
f87685c3
AD
122652001-12-17 Akim Demaille <akim@epita.fr>
12266
12267 * src/output.c (output_obstack): Be static and rename as...
12268 (format_obstack): this, to avoid any confusion with files.c's
12269 output_obstack.
12270 * src/reader.h (muscle_obstack): Move to...
12271 * src/output.h: here, since it's defined in output.c.
12272
837491d8
AD
122732001-12-17 Akim Demaille <akim@epita.fr>
12274
12275 * src/output.c (action_row, save_column, default_goto)
12276 (sort_actions, matching_state, pack_vector): Better variable
12277 locality.
12278
796d61fb
AD
122792001-12-17 Akim Demaille <akim@epita.fr>
12280
12281 * src/output.c: Various formatting changes.
776209d6 12282
64d15509
AD
122832001-12-17 Akim Demaille <akim@epita.fr>
12284
12285 * src/files.c (output_files): Free the output_obstack.
12286 * src/main.c (main): Call print and print_graph conditionally.
12287 * src/print.c (print): Work unconditionally.
12288 * src/print_graph.c (print_graph): Work unconditionally.
12289 * src/conflicts.c (log_resolution): Output only if verbose_flag.
12290
fbc8ecb7
MA
122912001-12-16 Marc Autret <autret_m@epita.fr>
12292
12293 * src/output.c (actions_output): Fix. When we use %no-lines,
12294 there is one less line per action.
12295
f0440388
MA
122962001-12-16 Marc Autret <autret_m@epita.fr>
12297
12298 * src/bison.simple: Remove a useless #line directive.
12299 s/#line %%line %%skeleton/#line %%line "%%parser-file-name"/'.
12300 * src/output.c (get_lines_number): New.
776209d6 12301 (output_parser): Adjust, now takes care about the lines of a
f0440388
MA
12302 output muscles.
12303 Fix line numbering.
12304 (actions_output): Computes the number of lines taken by actions.
12305 (output_master_parser): Insert new skeleton which is the name of
12306 the output parser file name.
12307
a79986b8
MA
123082001-12-15 Marc Autret <autret_m@epita.fr>
12309
12310 * src/bison.simple [YYERROR_VERBOSE]: Restore backward compatibility.
12311
4ec8e00f
MA
123122001-12-15 Marc Autret <autret_m@epita.fr>
12313
12314 * src/output.c (output_gram): Keep track of the hairy one.
12315
1a4648ff
AD
123162001-12-15 Akim Demaille <akim@epita.fr>
12317
12318 Make `make distcheck' work.
12319
12320 * lib/Makefile.am (INCLUDES): Add top_srcdir/intl, since hash uses
12321 system.h which uses libgettext.h.
12322
9c2c67e6
AD
123232001-12-15 Akim Demaille <akim@epita.fr>
12324
12325 * src/nullable.c (set_nullable): Useless rules must be skipped,
12326 otherwise, since we range over their symbols, we might look at a
12327 nonterminal which no longer ``exists'', i.e., it is not counted in
12328 `nvars', hence we overflow our arrays.
12329
93ede233
AD
123302001-12-15 Akim Demaille <akim@epita.fr>
12331
12332 The header can also be produced directly, without any obstack!
12333 Yahoo!
12334
12335 * src/files.c, src/files.h (defines_obstack): Remove.
12336 (compute_header_macro): Global.
12337 (defines_obstack_save): Remove.
12338 * src/reader.c (parse_union_decl): No longer output to
12339 defines_obstack: its content can be found in the `stype' muscle
12340 anyway.
12341 (output_token_translations): Merge into...
12342 (symbols_output): this.
12343 Rename as...
12344 (symbols_save): this.
12345 (reader): Adjust.
12346 * src/output.c (header_output): New.
12347 (output): Call it.
12348
2666f928
AD
123492001-12-15 Akim Demaille <akim@epita.fr>
12350
12351 * src/reader.c (parse_union_decl): Instead of handling two obstack
12352 simultaneously, use one to define the `stype' muscle, and use the
12353 value of the latter to fill defines_obstack.
12354 (copy_comment): Remove.
12355 (copy_comment2): Work for a single obstack.
12356 Rename as...
12357 (copy_comment): this.
12358
428046f8
AD
123592001-12-15 Akim Demaille <akim@epita.fr>
12360
12361 * src/lex.c, src/lex.h (xgetc): No longer static.
12362 * src/reader.c (parse_union_decl): Revamp.
12363
ea52d706
AD
123642001-12-15 Akim Demaille <akim@epita.fr>
12365
12366 Still making progress in separating Bison into (i) input, (ii)
12367 process, (iii) output: now we can directly output the parser file
12368 without using table_obstack at all.
12369
12370 * src/files.c, src/files.h (table_obstack): Bye bye.
12371 (parser_file_name): New.
12372 * src/files.c (compute_output_file_names): Compute it.
12373 * src/output.c (actions_output, output_parser)
12374 (output_master_parser): To a file instead of an obstack.
12375
3f96f4dc
AD
123762001-12-15 Akim Demaille <akim@epita.fr>
12377
12378 Attach actions to rules, instead of pre-outputting them to
12379 actions_obstack.
12380
12381 * src/gram.h (rule_t): action and action_line are new members.
12382 * src/reader.c (symbol_list): Likewise.
12383 (copy_action): Save the actions within the rule.
12384 (packgram): Save them in rule_table.
12385 * src/output.c (actions_output): New.
12386 (output_parser): Use it on `%%actions'.
12387 (output_rule_data): Don't free rule_table.
12388 (output): Do it.
12389 (prepare): Don't save the `action' muscle.
12390 * src/bison.simple: s/%%action/%%actions/.
12391
51576fb3
AD
123922001-12-15 Akim Demaille <akim@epita.fr>
12393
12394 * src/reader.c (copy_action): When --yacc, don't append a `;'
12395 to the user action: let it fail if lacking.
dee049eb 12396 Suggested by Arnold Robbins and Tom Tromey.
51576fb3 12397
2648a72d
AD
123982001-12-14 Akim Demaille <akim@epita.fr>
12399
12400 * src/lex.c (literalchar): Simply return the char you decoded, non
12401 longer mess around with obstacks and int pointers.
12402 Adjust all callers.
12403
92790e5b
AD
124042001-12-14 Akim Demaille <akim@epita.fr>
12405
12406 * src/lex.c (literalchar): Don't escape the special characters,
12407 just decode them, and keep them as char (before, eol was output as
12408 the 2 char string `\n' etc.).
12409 * src/output.c (output_rule_data): Use quotearg to output the
12410 token strings.
12411
927c1557
PE
124122001-12-13 Paul Eggert <eggert@twinsun.com>
12413
12414 * src/bison.simple (YYSIZE_T, YYSTACK_ALLOC, YYSTACK_FREE):
12415 Do not infringe on the global user namespace when using C++.
12416 (YYFPRINTF, YYSTDERR): New macros, needed for the above.
12417 All uses of `fprintf' and `stderr' changed.
12418
12419 * doc/bison.texinfo: Document YYFPRINTF, YYSTDERR.
12420
ed8e1f68
AD
124212001-12-13 Akim Demaille <akim@epita.fr>
12422
12423 The computation of nullable is broken: it doesn't handle empty
12424 RHS's properly.
12425
12426 * tests/torture.at (GNU AWK Grammar): New.
12427 * tests/sets.at (Nullable): New.
12428 * src/nullable.c (set_nullable): Instead of blindly looping over
12429 `ritems', loop over the rules, and then over their rhs's.
12430
12431 Work around Autotest bugs.
12432
12433 * src/warshall.c (bitmatrix_print): Don't use `+--+' as table
12434 frame, because Autotest understand lines starting with a `+' as
12435 traces from the shell. Then, they are not processed properly.
12436 Admittedly an Autotest bug, but we don't have time to wait for
12437 Autotest to catch up.
12438 * tests/regression.at (Broken Closure): Adjust to the new table
12439 frames.
12440 Move to...
12441 * tests/sets.at: here.
12442
cb581495
AD
124432001-12-13 Akim Demaille <akim@epita.fr>
12444
12445 * src/closure.c (closure): Use nrules instead of playing tricks
12446 with BITS_PER_WORD.
12447
2e729273
AD
124482001-12-13 Akim Demaille <akim@epita.fr>
12449
12450 * src/print.c (print_actions): Output the handling of `$' as the
12451 traces do: shifting the token EOF. Before EOF was treated as a
12452 nonterminal.
12453 * tests/regression.at: Adjust some tests.
12454 * src/print_graph.c (print_core): Complete the set of items via
12455 closure. The next-to-final and final states are still unsatisfying,
12456 but that's to be addressed elsewhere.
12457 No longer output the rule numbers, but do output the state number.
12458 A single loop for the shifts + gotos is enough, but picked a
12459 distinct color for each.
12460 (print_graph): Initialize and finalize closure.
12461
107f7dfb
AD
124622001-12-13 Akim Demaille <akim@epita.fr>
12463
12464 * src/reader.c (readgram): Remove dead code, an strip useless
12465 braces.
12466 (get_type): Remove, unused.
12467
9b53a24f
AD
124682001-12-12 Akim Demaille <akim@epita.fr>
12469
12470 * src/complain.h, src/complain.c: Remove error_one_per_line, rely
12471 on that of lib/error.c.
12472
dbfb6dcd
AD
124732001-12-12 Akim Demaille <akim@epita.fr>
12474
12475 Some hosts don't like `/' in includes.
12476
12477 * src/system.h: Include libgettext.h without qualifying the path.
12478 * src/Makefile.am (INCLUDES): Add $(top_srcdir)/intl, remove
12479 $(top_srcdir).
12480
c25fb648
MA
124812001-12-11 Marc Autret <autret_m@epita.fr>
12482
12483 * src/output.c (output_parser): Remove useless muscle.
12484
710ddc4f
MA
124852001-12-11 Marc Autret <autret_m@epita.fr>
12486
12487 * src/bison.simple: Remove #line just before %%epilogue. It
12488 is now handled in ...
12489 * src/reader.c (read_additionnal_code): Add the output of a
12490 #line for the epilogue.
12491
e83d80b8
MA
124922001-12-10 Marc Autret <autret_m@epita.fr>
12493
927c1557 12494 * src/reader.c (copy_definition): Re-use CPP-outed code which
e83d80b8
MA
12495 replace precedent remove.
12496 * src/bison.simple: Remove #line before %%prologue because
12497 %%input-line is wrong at this time.
12498
971d5158
MA
124992001-12-10 Marc Autret <autret_m@epita.fr>
12500
12501 * src/reader.c (symbols_output): Clean up.
927c1557 12502 * src/output.c (output_gram, output): Clean up.
971d5158 12503
5edafffd
AD
125042001-12-10 Akim Demaille <akim@epita.fr>
12505
12506 * src/lalr.c (initialize_lookaheads): New. Extracted from...
12507 * src/LR0.c (set_state_table): here.
12508 * src/lalr.c (lalr): Call it.
12509
0279f8e9
AD
125102001-12-10 Akim Demaille <akim@epita.fr>
12511
12512 * src/state.h (shifts): Remove the `number' member: shifts are
12513 attached to state, hence no longer need to be labelled with a
12514 state number.
12515
190c4f5f
AD
125162001-12-10 Akim Demaille <akim@epita.fr>
12517
12518 Now that states have a complete set of members, the linked list of
12519 shifts is useless: just fill directly the state's shifts member.
12520
12521 * src/state.h (shifts): Remove the `next' member.
12522 * src/LR0.c (first_state, last_state): Remove.
12523 Adjust the callers.
12524 (augment_automaton): Don't look for the shifts that must be added
12525 a shift on EOF: it is those of the state we looked for! But now,
12526 since shifts are attached, it is no longer needed to looking
12527 merely by its id: its number.
12528
2a73b93d
AD
125292001-12-10 Akim Demaille <akim@epita.fr>
12530
12531 * src/LR0.c (augment_automaton): Better variable locality.
12532 Remove an impossible branch: if there is a state corresponding to
12533 the start symbol being shifted, then there is shift for the start
12534 symbol from the initial state.
12535
74392f6a
AD
125362001-12-10 Akim Demaille <akim@epita.fr>
12537
12538 * src/LR0.c (augment_automaton): Call `insert_eof_shifting_state'
12539 only when appropriate: when insert_start_shifting_state' is not
12540 invoked.
12541 * tests/regression.at (Rule Line Numbers): Adjust.
12542
37c82725
AD
125432001-12-10 Akim Demaille <akim@epita.fr>
12544
12545 * src/LR0.c (augment_automaton): Now that all states have shifts,
12546 merge the two cases addition shifts to the initial state.
12547
6a164e0c
AD
125482001-12-10 Akim Demaille <akim@epita.fr>
12549
12550 * src/lalr.c (set_state_table): Move to...
12551 * src/LR0.c: here.
12552 * src/lalr.c (lalr): Don't call it...
12553 * src/LR0.c (generate_states): do it.
12554 * src/LR0.h (first_state): Remove, only the table is used.
12555
7215de24
AD
125562001-12-10 Akim Demaille <akim@epita.fr>
12557
12558 * src/LR0.h (first_shift, first_reduction): Remove.
12559 * src/lalr.c: Don't use first_shift: find shifts through the
12560 states.
12561
80e25d4d
AD
125622001-12-10 Akim Demaille <akim@epita.fr>
12563
12564 * src/LR0.c: Attach shifts to states as soon as they are
12565 computed.
12566 * src/lalr.c (set_state_table): Instead of assigning shifts to
12567 state, just assert that the mapping was properly done.
12568
0ab3728b
AD
125692001-12-10 Akim Demaille <akim@epita.fr>
12570
12571 * src/LR0.c (insert_start_shift): Rename as...
12572 (insert_start_shifting_state): this.
12573 (insert_eof_shifting_state, insert_accepting_state): New.
12574 (augment_automaton): Adjust.
12575 Better locality of the variables.
12576 When looking if the start_symbol is shifted from the initial
12577 state, using `while (... symbol != start_symbol ...)' sounds
12578 better than `while (... symbol < start_symbol ...)': If fail
12579 to see how the order between symbols could be relevant!
12580
78af9bbc
AD
125812001-12-10 Akim Demaille <akim@epita.fr>
12582
12583 * src/getargs.h: Don't declare `spec_name_prefix' and
12584 `spec_file_prefix', declared by src/files.h.
12585 * src/files.c, src/files.h: Default for spec_name_prefix is "yy".
12586 * src/muscle_tab.c (muscle_init): Default prefix to NULL.
12587 * src/output.c (prepare): Adjust.
12588 * src/reader.c (symbols_output): Likewise.
12589 * src/vmsgetargs.c: Vaguely adjust, but who cares?
12590
bdef2a41
AD
125912001-12-10 Akim Demaille <akim@epita.fr>
12592
12593 * src/muscle_tab.c (muscle_init): NULL is a better default than
12594 `"0"'.
12595
3735969c
AD
125962001-12-10 Akim Demaille <akim@epita.fr>
12597
12598 * src/reader.c (reader): Calling symbols_output once is enough.
12599
49701457
AD
126002001-12-10 Akim Demaille <akim@epita.fr>
12601
12602 Now that states have a complete set of members, the linked list of
12603 reductions is useless: just fill directly the state's reductions
12604 member.
12605
12606 * src/state.h (struct reductions): Remove member `number' and
12607 `next'.
12608 * src/LR0.c (first_reduction, last_reduction): Remove.
12609 (save_reductions): Don't link the new reductions, store them in
12610 this_state.
12611 * src/lalr.c (set_state_table): No need to attach reductions to
12612 states, it's already done.
12613 * src/output.c (output_actions): No longer free the shifts, then
12614 the reductions, then the states: free all the states and their
12615 members.
12616
0edad749
AD
126172001-12-10 Akim Demaille <akim@epita.fr>
12618
12619 * src/options.c (OPTN, DRTV, BOTH): New.
12620 (option_table): Use them.
12621
0edad749
AD
12622 * src/muscle_tab.c: Don't include xalloc.h and string.h: that's
12623 the job of system.h.
12624 * src/options.c: Don't include stdio.h and xalloc.h for the same
12625 reasons.
12626
5449dd0f
AD
126272001-12-10 Akim Demaille <akim@epita.fr>
12628
12629 * src/output.c (output, prepare): Make sure the values of the
12630 muscles `action' and `prologue' are 0-terminated.
12631
a870c567
AD
126322001-12-10 Akim Demaille <akim@epita.fr>
12633
12634 Clean up GCC warnings.
12635
12636 * src/reader.c (copy_action): `buf' is not used.
12637 (parse_skel_decl): Be static.
12638 * src/muscle_tab.c (mhash1, mhash2, muscle_insert): Preserve `const'.
12639 * src/options.h (create_long_option_table): Have a real prototype.
12640 * lib/hash.c, lib/hash.h (hash_insert, hash_insert_at, hash_delete)
12641 (hash_delete_at): Return const void *.
12642 Adjust casts to preserve the const.
12643
80df8768
AD
126442001-12-10 Akim Demaille <akim@epita.fr>
12645
12646 * configure.in: Require 2.52g.
12647 M4 is not needed, but AUTOM4TE is.
12648 * m4/m4.m4: Remove.
12649 * tests/Makefile.am: Adjust.
12650
f693ad14
AD
126512001-12-10 Akim Demaille <akim@epita.fr>
12652
12653 One structure for states is enough, even though theoretically
12654 there are LR(0) states and LALR(1) states.
12655
12656 * src/lalr.h (state_t): Remove.
12657 (state_table): Be state_t **, not state_t *.
12658 * src/state.h (core, CORE_ALLOC): Rename as...
12659 (state_t, STATE_ALLOC): this.
12660 Add the LALR(1) members: shifts, reductions, errs.
12661 * src/LR0.c (state_table): Rename as...
12662 (state_hash): this, to avoid name clashes with the global
12663 `state_table'.
12664 * src/print_graph.c, src/LR0.c, src/LR0.h, src/conflicts.c
12665 * src/lalr.c, src/lalr.h, src/output.c, src/print.c: Adjust.
12666
74ffbcb6
AD
126672001-12-10 Akim Demaille <akim@epita.fr>
12668
12669 Bison dumps core on bash.y.
12670 Reported by Pascal Bart.
12671
12672 * src/warshall.c (bitmatrix_print): New.
12673 (TC): Use it.
ba0fe3c7 12674 When performing a transitive closure R(i, j) && R(j, k) => R(i, k),
74ffbcb6
AD
12675 j must be the outer loop.
12676 * tests/regression.at (Broken Closure): New.
12677
07708e19
AD
126782001-12-05 Akim Demaille <akim@epita.fr>
12679
12680 * tests/atlocal.in (CPPFLAGS): Do not leave a space between -I and
12681 its argument.
ba1ecc07 12682 Reported by Peter Hamorsky.
07708e19 12683
92b16366
AD
126842001-12-05 Akim Demaille <akim@epita.fr>
12685
12686 * src/conflicts.c (err_table): Remove.
12687 (resolve_sr_conflict): Adjust.
12688 * src/lalr.h (state_t.reduction_table, state_t.shift_table):
12689 Rename as...
12690 (state_t.reductions, state_t.shifts): this.
12691
076ab033
AD
126922001-12-05 Akim Demaille <akim@epita.fr>
12693
12694 * src/reduce.c (reduce_grammar_tables): No longer disable the
12695 removal of useless rules via CPP but via `if (0)', so that the
12696 compiler still check the code is valid.
12697 For instance, it should have noticed `rline' no longer exists: use
12698 the `line' member of rule_t.
12699 * src/gram.c (dummy, rline): Remove, unused.
12700
3843c413
AD
127012001-12-05 Akim Demaille <akim@epita.fr>
12702
12703 * src/output.c (pack_vector): Use assert, not berror.
12704 * src/main.c (berror): Remove, unused.
12705
43168960
AD
127062001-12-05 Akim Demaille <akim@epita.fr>
12707
12708 New experimental feature: if --verbose --trace output all the
12709 items of a state, not only its kernel.
12710
12711 * src/print.c (print_core): If `trace_flag', then invoke closure
12712 before outputting the items of the state (print_core is no longer
12713 a correct name them).
12714 (print_results): Invoke new_closure/free_closure if needed.
12715
b2872512
AD
127162001-12-05 Akim Demaille <akim@epita.fr>
12717
12718 * src/LR0.c (new_itemsets): Use nshifts only, not shiftcount.
12719 * src/closure.c, src/closure.h (itemsetsize): Rename as...
12720 (nitemset): for consistency with the rest of the project.
12721
23cbcc6c
AD
127222001-12-05 Akim Demaille <akim@epita.fr>
12723
12724 * src/closure.c (print_closure): Improve.
12725 (closure): Use it for printing input and output.
12726
03ec521c
AD
127272001-12-05 Akim Demaille <akim@epita.fr>
12728
12729 * src/closure.c (FIRSTS, FDERIVES): Adjust to reality: they are
12730 indexed by nonterminals.
12731
3a7456dd
AD
127322001-12-05 Akim Demaille <akim@epita.fr>
12733
12734 * src/warshall.c (TC, RTC): De-obsfucate (source reduced to 22% of
12735 what it was!).
12736 * src/warshall.h: Remove accidental duplication of the content.
12737
1cbcf2e7
AD
127382001-12-05 Akim Demaille <akim@epita.fr>
12739
12740 * src/closure.c (set_fderives): De-obfuscate.
12741
84182270
AD
127422001-12-05 Akim Demaille <akim@epita.fr>
12743
12744 * src/closure.c (print_firsts, print_fderives): De-obfuscate.
12745
3f6f053c
AD
127462001-12-05 Akim Demaille <akim@epita.fr>
12747
12748 * src/closure.c (set_firsts): De-obfuscate.
12749
7a5350ba
AD
127502001-12-05 Akim Demaille <akim@epita.fr>
12751
12752 * src/output.c (action_row): De-obfuscate
12753 using the good o' techniques: arrays not pointers, variable
12754 locality, BITISSET, RESETBIT etc.
12755
d954473d
AD
127562001-12-05 Akim Demaille <akim@epita.fr>
12757
12758 Pessimize the code to simplify it: from now on, all the states
12759 have a valid SHIFTS, which NSHIFTS is possibly 0.
12760
12761 * src/LR0.c (shifts_new): Be global and move to..
12762 * src/state.c, src/state.h: here.
12763 * src/conflicts, src/lalr.c, src/output.c, src/print.c,
12764 * src/print_graph: Adjust.
12765
9839bbe5
AD
127662001-12-05 Akim Demaille <akim@epita.fr>
12767
12768 * src/state.h (SHIFT_DISABLE, SHIFT_IS_DISABLED): New.
12769 * src/conflicts.c: Use it.
12770 Restore a few missing `if (!SHIFT_IS_DISABLED)' which were
12771 incorrectly ``simplified''.
12772
9f136c07
AD
127732001-12-05 Akim Demaille <akim@epita.fr>
12774
12775 * src/conflicts.c (flush_shift, resolve_sr_conflict): De-obfuscate
12776 using the good o' techniques: arrays not pointers, variable
12777 locality, BITISSET, RESETBIT etc.
12778
b608206e
AD
127792001-12-05 Akim Demaille <akim@epita.fr>
12780
12781 * src/state.h (SHIFT_SYMBOL): New.
12782 * src/conflicts.c: Use it to deobfuscate.
12783
52afa962
AD
127842001-12-05 Akim Demaille <akim@epita.fr>
12785
12786 * src/conflicts.c (count_sr_conflicts, count_rr_conflicts)
12787 (print_reductions): De-obfuscate using the good o' techniques:
12788 arrays not pointers, variable locality, BITISSET.
12789
e74dc321
AD
127902001-12-05 Akim Demaille <akim@epita.fr>
12791
12792 * src/conflicts.c (print_reductions): Arrays, not pointers.
12793 Use BITISSET.
12794
768fca83
AD
127952001-12-05 Akim Demaille <akim@epita.fr>
12796
12797 * src/conflicts.c (print_reductions): Pessimize, but clarify.
12798
a17e599f
AD
127992001-12-05 Akim Demaille <akim@epita.fr>
12800
12801 * src/conflicts.c (print_reductions): Improve variable locality.
12802
a04bc341
AD
128032001-12-05 Akim Demaille <akim@epita.fr>
12804
12805 * src/conflicts.c (print_reductions): Pessimize, but clarify.
12806
c8ea038e
AD
128072001-12-05 Akim Demaille <akim@epita.fr>
12808
12809 * src/conflicts.c (print_reductions): Improve variable locality.
12810
aa2aab3c
AD
128112001-12-05 Akim Demaille <akim@epita.fr>
12812
12813 * src/state.h (SHIFT_IS_ERROR, SHIFT_IS_GOTO, SHIFT_IS_SHIFT): New.
12814 * src/lalr.c: Use them.
12815
b178c8cc
AD
128162001-12-05 Akim Demaille <akim@epita.fr>
12817
12818 * src/LR0.c (augment_automaton): Formatting changes.
12819 Better variable locality.
12820
f67d13aa
AD
128212001-12-05 Akim Demaille <akim@epita.fr>
12822
12823 * src/lalr.c (matrix_print): New.
12824 (transpose): Use it.
12825 Use arrays instead of pointers.
12826
c2713865
AD
128272001-12-05 Akim Demaille <akim@epita.fr>
12828
12829 * src/lalr.c (maxrhs): Move to...
12830 * src/gram.c, src/gram.h (ritem_longest_rhs): here.
12831 * src/lalr.c (build_relations): Adjust.
12832
9887c18a
AD
128332001-12-05 Akim Demaille <akim@epita.fr>
12834
12835 * src/lalr.c (transpose): Free the memory allocated to the
12836 argument, as it is replaced by the results by the unique caller.
12837 (build_relations): Merely invoke transpose: it handles the memory
12838 deallocation.
12839 Improve variable locality.
12840 Avoid variables used as mere abbreviations.
12841 (compute_lookaheads): Use arrays instead of pointers.
12842
4d4f699c
AD
128432001-12-05 Akim Demaille <akim@epita.fr>
12844
12845 * src/lalr.c (initialize_F): Improve variable locality.
12846 Avoid variables used as mere abbreviations.
12847
80a69750
AD
128482001-12-05 Akim Demaille <akim@epita.fr>
12849
12850 * src/derives.c (print_derives): Display the ruleno.
12851 * src/lalr.c (initialize_F, transpose): Better variable locality
12852 to improve readability.
12853 Avoid variables used as mere abbreviations.
12854
fe961097
AD
128552001-12-05 Akim Demaille <akim@epita.fr>
12856
12857 * src/lalr.c (traverse): Use arrays instead of pointers.
12858
e3e4e814
AD
128592001-12-05 Akim Demaille <akim@epita.fr>
12860
12861 * src/nullable.c (set_nullable): Use a for loop to de-obfuscate
12862 the handling of squeue.
12863 `symbol >= 0' is wrong now, use `rule_table[ruleno].useful'.
12864
630e182b
AD
128652001-12-05 Akim Demaille <akim@epita.fr>
12866
12867 Because useless nonterminals are now kept alive (instead of being
12868 `destroyed'), we now sometimes examine them, and store information
12869 related to them. Hence we need to know their number, and adjust
12870 memory allocations.
12871
12872 * src/reduce.c, src/reduce.h (nuseless_nonterminals): No longer
12873 static.
12874 * src/LR0.c (allocate_itemsets): The memory allocated to
12875 `symbol_count' was used for two different purpose: once to count
12876 the number of occurrences of each symbol, and later reassigned to
12877 `shift_symbol', containing the symbol that can be shifted from a
12878 given state.
12879 Deobfuscate, i.e., allocate, use and free `symbol_count' here
12880 only, and...
12881 (new_itemsets): Allocate `shift_symbol' here.
12882 (allocate_itemsets): symbol_count includes useless nonterminals.
12883 Make room for them.
12884 (free_storage): Use `free', not `XFREE', for pointers that cannot
12885 be null.
12886
81b51460
AD
128872001-12-05 Akim Demaille <akim@epita.fr>
12888
12889 * src/nullable.c (set_nullable): Deobfuscate the handling of
12890 ritem.
12891 `symbol >= 0' is wrong now, use `rule_table[ruleno].useful'.
12892
3067fbef
AD
128932001-12-05 Akim Demaille <akim@epita.fr>
12894
12895 * src/gram.c, src/gram.h (ritem_print): New.
12896 * src/gram.c (dummy): Remove, now there is actual code in gram.c.
12897 (This useless function was defined only to work around VMS linkers
12898 that can't handle compilation units with variables only).
12899 * src/reduce.c (dump_grammar): Use it to trace the construction of
12900 ritem.
12901
c2bea5f9
PE
129022001-12-04 Paul Eggert <eggert@twinsun.com>
12903
7d27c823
PE
12904 * src/bison.simple (union yyalloc): Change member names
12905 to be the same as the stack names.
12906 (yyparse): yyptr is now union yyalloc *, not char *.
12907 (YYSTACK_RELOCATE): Likewise. This avoids a GCC warning,
12908 and may generate better code on some machines.
c2bea5f9
PE
12909 (yystpcpy): Use prototype if __STDC__ is defined, not just
12910 if __cplusplus is defined.
35687a9d 12911
2c8a9dfa
AD
129122001-11-30 Akim Demaille <akim@epita.fr>
12913
12914 * configure.in (WARNING_CFLAGS): Add -Werror when possible.
12915 (CFLAGS): Do not include the WARNING_CFLAGS here, since GNU
12916 Gettext doesn't compile cleanly, and dies with -Werror.
12917 * src/Makefile.am, lib/Makefile.am, tests/atlocal.in (CFLAGS):
12918 Include WARNING_CFLAGS here.
12919 * lib/xstrdup.c: Include xalloc.h, so that xstrdup be declared
12920 before being defined.
12921
f4e421e6
AD
129222001-11-27 Paul Eggert <eggert@twinsun.com>
12923
12924 * lib/quotearg.h (quotearg_n, quotearg_n_style):
12925 First arg is int, not unsigned.
12926 * lib/quotearg.c (quotearg_n, quotearg_n_style): Likewise.
12927 (SIZE_MAX, UINT_MAX): New macros.
12928 (quotearg_n_options): Abort if N is negative.
12929 Avoid overflow check on hosts where size_t is 64 bits and int
12930 is 32 bits, as overflow is impossible there.
12931 Fix off-by-one typo that caused unnecessary reallocation.
12932
7093d0f5
AD
129332001-11-29 Paul Eggert <eggert@twinsun.com>
12934
12935 Name space cleanup in generated parser.
12936
12937 * doc/bison.texinfo (Bison Parser): Discuss system headers
12938 and their effect on the user name space.
12939
12940 * src/bison.simple:
12941 (YYSTACK_ALLOC, YYSTACK_FREE, union yyalloc, YYSTACK_GAP_MAX,
12942 YYSTACK_BYTES, YYSTACK_RELOCATE): Do not define unless necessary,
12943 i.e. unless ! defined (yyoverflow) || defined (YYERROR_VERBOSE).
12944
12945 (YYSIZE_T): New macro. Use it instead of size_t, to avoid infringing
12946 on user names when possible.
12947
12948 (YYSTACK_USE_ALLOCA): Do not define; just use any existing defn.
12949 Simplify test for whather <alloca.h> exists.
12950
12951 (<stdlib.h>): Include if we will use malloc, and if standard C or C++.
12952
12953 (<stdio.h>): Include if YYDEBUG.
12954
12955 (yymemcpy): Renamed from __yy_memcpy. Do not define unless
12956 ! defined (yyoverflow) && ! defined (yymemcpy).
12957
12958 (yymemcpy, yyparse): Rename local variables as needed so that
12959 they all begin with 'yy'.
12960
12961 (yystrlen, yystpcpy): New functions.
12962
12963 (YY_DECL_NON_LSP_VARIABLES): Renamed from _YY_DECL_VARIABLES.
12964 All uses changed.
12965
12966 (yyparse): size_t -> YYSIZE_T. Use yystrlen and yystpcpy
12967 instead of relying on string.h functions. Use YYSTACK_ALLOC
12968 and YYSTACK_FREE instead of malloc and free.
12969
fd51e5ff
AD
129702001-11-30 Akim Demaille <akim@epita.fr>
12971
12972 * src/bison.simple (YYSTYPE, YYLTYPE): Move their definitions
12973 before their first uses.
12974 (YYBISON, YYPURE): Move to the top of the output.
12975
7d13ff5f
AD
129762001-11-30 Akim Demaille <akim@epita.fr>
12977
12978 * tests/reduce.at (Useless Nonterminals): Fix.
12979
892a3995
AD
129802001-11-30 Akim Demaille <akim@epita.fr>
12981
12982 * src/bison.simple (YYSTACK_FREE): Use `do {;} while (0)' as empty
12983 if body instead of `;' to pacify GCC's warnings.
12984
68f1e3ed
AD
129852001-11-30 Akim Demaille <akim@epita.fr>
12986
12987 Instead of mapping the LHS of unused rules to -1, keep the LHS
12988 valid, but flag the rules as invalid.
12989
12990 * src/gram.h (rule_t): `useful' is a new member.
12991 * src/print.c (print_grammar): Adjust.
12992 * src/derives.c (set_derives): Likewise.
12993 * src/reader.c (packgram, reduce_output): Likewise.
12994 * src/reduce.c (reduce_grammar_tables): Likewise.
12995 * tests/reduce.at (Underivable Rules, Useless Rules): New.
12996
d2d1b42b
AD
129972001-11-30 Akim Demaille <akim@epita.fr>
12998
12999 * src/reduce.c (reduce_output): Formatting changes.
13000 * src/print.c (print_results, print_grammar): Likewise.
13001 * tests/regression.at (Rule Line Numbers)
13002 (Solved SR Conflicts, Unresolved SR Conflicts): Adjust.
13003
760b53a8
AD
130042001-11-30 Akim Demaille <akim@epita.fr>
13005
13006 * src/reduce.c (nonterminals_reduce): Instead of throwing away
13007 useless nonterminals, move them at the end of the symbol arrays.
13008 (reduce_output): Adjust.
13009 * tests/reduce.at (Useless Nonterminals): Adjust.
13010
00238958
AD
130112001-11-30 Akim Demaille <akim@epita.fr>
13012
13013 * src/reduce.c: Various comment/formatting changes.
13014 (nonterminals_reduce): New, extracted from...
13015 (reduce_grammar_tables): here.
13016 (reduce_grammar): Call nonterminals_reduce.
13017
396452de
PE
130182001-11-29 Paul Eggert <eggert@twinsun.com>
13019
13020 * src/bison.simple (YYSTACK_REALLOC): Remove.
13021 (YYSTACK_ALLOC): Resurrect this macro, with its old meaning.
13022 (YYSTACK_FREE, YYSTACK_GAP_MAX, YYSTACK_BYTES, YYSTACK_RELOCATE):
13023 New macros.
13024 (union yyalloc): New type.
13025 (__yy_memcpy): Last arg is size_t, not unsigned int, to remove
13026 an arbitrary restriction on hosts where size_t is wider than int.
13027
13028 (yyparse): Don't dump core if alloca or malloc fails; instead, report
13029 a parser stack overflow. Allocate just one block of memory for all
13030 three stacks, instead of allocating three blocks; this typically is
13031 faster and reduces fragmentation.
13032
13033 Do not limit the number of items in the stack to a value that fits
13034 in 'int', as this is an arbitrary limit on hosts with 64-bit
13035 size_t and 32-bit int.
13036
147e184c
MA
130372001-11-29 Marc Autret <autret_m@epita.fr>
13038
13039 * tests/calc.at [AT_DATA_CALC_Y]: Use %error-verbose instead
13040 of defining YYERROR_VERBOSE.
13041 [AT_DATA]: $4 is now out of C declarations in the prologue.
13042
426cf563
MA
130432001-11-28 Marc Autret <autret_m@epita.fr>
13044
13045 * src/reader.c (parse_dquoted_param): New.
13046 (parse_skel_decl): Use it.
13047 * src/lex.h: Add its prototype.
13048 * src/lex.c (literalchar): Become not static.
13049
c7925b99
MA
130502001-11-28 Marc Autret <autret_m@epita.fr>
13051
13052 * src/output.h: And put its extern declaration here.
13053 * src/output.c (error_verbose): Define here.
13054 (prepare): Echo name modification.
13055 * src/getargs.h: Clean its extern declaration.
13056 * src/getargs.c (error_verbose_flag): Remove.
13057 (getargs): Remove case 'e'.
13058 * src/options.c (option_table): 'error-verbose' is now seen as simple
13059 percent option.
13060 Include output.h.
13061
13062 * src/reader.c (read_declarations): Remove case tok_include.
13063 (parse_include_decl): Remove.
13064 * src/lex.h (token_t): Remove tok_include.
13065 * src/options.c (option_table): 'include' is now a simple command line
13066 option.
13067
5b5d1929
MA
130682001-11-28 Marc Autret <autret_m@epita.fr>
13069
13070 * src/bison.simple: Adjust muscle names.
13071 * src/muscle_tab.c (muscle_init): Also rename the muscles.
13072 * src/output.c (prepare): s/_/-/ for the muscles names.
13073 (output_parser): When scanning for a muscle, allow '-' instead of '_'.
13074
8850be4b
MA
130752001-11-28 Marc Autret <autret_m@epita.fr>
13076
13077 * src/bison.simple: Fix debug.
13078 [YYERROR_VERBOSE]: Re-integrate as an internal macro.
13079
4a38e613
AD
130802001-11-28 Akim Demaille <akim@epita.fr>
13081
13082 * src/LR0.c (shifts_new): New.
13083 (save_shifts, insert_start_shift, augment_automaton): Use it.
13084
4b35e1c1
AD
130852001-11-28 Akim Demaille <akim@epita.fr>
13086
13087 * src/closure.c (closure): `b' and `ruleno' denote the same value:
13088 keep ruleno only.
13089
d2b04478
AD
130902001-11-28 Akim Demaille <akim@epita.fr>
13091
13092 * src/closure.c (closure): Instead of looping over word in array
13093 then bits in words, loop over bits in array.
13094
2c4c30aa
AD
130952001-11-28 Akim Demaille <akim@epita.fr>
13096
13097 * src/closure.c (closure): No longer optimize the special case
13098 where all the bits of `ruleset[r]' are set to 0, to make the code
13099 clearer.
13100
576890b7
AD
131012001-11-28 Akim Demaille <akim@epita.fr>
13102
13103 * src/closure.c (closure): `r' and `c' are new variables, used to
13104 de-obfuscate accesses to RULESET and CORE.
13105
cb487d7d
AD
131062001-11-28 Akim Demaille <akim@epita.fr>
13107
13108 * src/reduce.c (reduce_print): Use ngettext.
13109 (dump_grammar): Improve the trace accuracy.
13110
6013d43f
AD
131112001-11-28 Akim Demaille <akim@epita.fr>
13112
13113 * src/reduce.c (dump_grammar): Don't translate trace messages.
13114
cb4956ee
AD
131152001-11-28 Akim Demaille <akim@epita.fr>
13116
13117 * tests/reduce.at (Useless Terminals, Useless Nonterminals): New.
13118 * src/reduce.c (reduce_grammar_tables): Do not free useless tags,
13119 as all tags are free'ed afterwards.
13120 From Enrico Scholz.
13121
648185ab
PE
131222001-11-27 Paul Eggert <eggert@twinsun.com>
13123
13124 * src/bison.simple (YYSTACK_REALLOC): Fix typo that caused us to
13125 use alloca when we didn't want to, and vice versa.
13126
68254a03
MA
131272001-11-27 Marc Autret <autret_m@epita.fr>
13128
9113b58f
AD
13129 * src/muscle_tab.c (muscle_init): Remove 'verbose' muscle
13130 initialization.
68254a03
MA
13131 * src/output.c (prepare): Remove its update.
13132
04d843a2
MA
131332001-11-27 Marc Autret <autret_m@epita.fr>
13134
13135 * tests/torture.at [AT_DATA]: Remove YYERROR_VERBOSE definition.
13136 Use %error-verbose.
13137
d2079671 131382001-11-27 Marc Autret <autret_m@epita.fr>
eeeb962b
MA
13139
13140 * src/bison.simple: Remove YYERROR_VERBOSE using.
13141 Use %%error_verbose.
13142 (yyparse): Likewise.
13143 * src/output.c (prepare): Give its final value.
13144 * src/muscle_tab.c (muscle_init): Init new muscle 'error_verbose'.
13145 * src/getargs.h: Add its extern declaration.
13146 * src/getargs.c (error_verbose_flag): New int.
13147 (getargs): Update to catch new case.
13148 * src/options.c (option_table): 'error-verbose' is a new option.
13149 (shortopts): Update.
13150
e0327bc8
AD
131512001-11-27 Akim Demaille <akim@epita.fr>
13152
13153 * src/system.h: Use intl/libgettext.h.
13154 * src/Makefile.am (INCLUDES): Add -I $(top_srcdir).
13155
000f1a3c
AD
131562001-11-27 Akim Demaille <akim@epita.fr>
13157
13158 * tests/torture.at (Exploding the Stack Size with Malloc):
13159 s/YYSTACK_USE_ALLOCA_ALLOCA/YYSTACK_USE_ALLOCA/.
13160
26cfe0be
AD
131612001-11-27 Akim Demaille <akim@epita.fr>
13162
13163 * src/files.c: Include error.h.
13164 Reported by Hans Aberg.
13165
f6bd5427
MA
131662001-11-26 Marc Autret <autret_m@epita.fr>
13167
d2079671 13168 * src/reader.c (parse_include_decl): New, not yet implemented.
f6bd5427
MA
13169 (read_declarations): Add case tok_include.
13170 * src/getargs.h (include): Add its extern definition.
13171 * src/getargs.c (include): New const char *.
13172 (getargs): Add case '-I'.
13173 * src/options.c (option_table): Add include as command line and
13174 percent option.
13175 * src/lex.h (token_t): Add tok_include.
13176
2ca209c1
AD
131772001-11-26 Akim Demaille <akim@epita.fr>
13178
13179 * src/reader.c (readgram): Make sure rules for mid-rule actions
13180 have a lineno equal to that of their host rule.
13181 Reported by Hans Aberg.
13182 * tests/regression.at (Rule Line Numbers): New.
13183
0e41b407
AD
131842001-11-26 Akim Demaille <akim@epita.fr>
13185
13186 * src/LR0.c (allocate_itemsets): kernel_size contains ints, not
13187 size_ts.
13188
131892001-11-26 Akim Demaille <akim@epita.fr>
13190
13191 * src/complain.c, src/complain.h (error): Remove, provided by
13192 lib/error.[ch].
13193
e0c40012
AD
131942001-11-26 Akim Demaille <akim@epita.fr>
13195
13196 * src/reader.c (read_declarations): Don't abort on tok_illegal,
13197 issue an error message.
13198 * tests/regression.at (Invalid %directive): New.
13199 Reported by Hans Aberg.
13200
5e147124
AD
132012001-11-26 Akim Demaille <akim@epita.fr>
13202
13203 * configure.in: Invoke AC_FUNC_OBSTACK and AC_FUNC_ERROR_AT_LINE.
13204 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
13205
a034c8b8
AD
132062001-11-26 Akim Demaille <akim@epita.fr>
13207
13208 * src/conflicts.c (conflicts_print): Don't complain at all when
13209 there are no reduce/reduce conflicts, and as many shift/reduce
13210 conflicts as expected.
13211 * tests/regression.at (%expect right): Adjust.
13212
c64a20f3
AD
132132001-11-23 Akim Demaille <akim@epita.fr>
13214
13215 * lib/alloca.c: Update, from fileutils.
13216
5b0d29bb
AD
132172001-11-23 Akim Demaille <akim@epita.fr>
13218
13219 * lib/Makefile.am (libbison_a_LIBADD): Add @ALLOCA@.
13220
722c4bfe
AD
132212001-11-23 Akim Demaille <akim@epita.fr>
13222
13223 * src/system.h: Include alloca.h.
13224 * src/main.c (main) [C_ALLOCA]: Call alloca (0).
13225
6255b435
AD
132262001-11-23 Akim Demaille <akim@epita.fr>
13227
13228 * src/print_graph.c (print_actions): Remove `rule', unused.
13229 * src/LR0.c (kernel_size): Contain `int' instead of `size_t' to
13230 pacify GCC's signed < unsigned warnings.
13231 * src/closure.c (itemsetsize): Likewise.
13232 * src/reader.c (symbol_list_new): Static.
13233
b29b2ed5
AD
132342001-11-23 Akim Demaille <akim@epita.fr>
13235
13236 Attaching lineno to buckets is stupid, since only one copy of each
13237 symbol is kept, only the line of the first occurrence is kept too.
13238
13239 * src/symtab.h, src/symtab.c (bucket): Remove the line member.
13240 * src/reader.c (rline_allocated): Remove, unused.
13241 (symbol_list): Have a `line' member.
13242 (symbol_list_new): New.
13243 (readgram): Use it.
13244 * src/print.c (print_grammar): Output the rule line numbers.
13245 * tests/regression.at (Solved SR Conflicts)
13246 (Unresolved SR Conflicts): Adjust.
13247 Reported by Hans Aberg.
13248
a81b1d4a
MA
132492001-11-22 Marc Autret <autret_m@epita.fr>
13250
13251 * src/bison.simple [YYERROR_VERBOSE]: Force its value to be 1 or 0.
13252
c1ecb3c1
MA
132532001-11-22 Marc Autret <autret_m@epita.fr>
13254
13255 * src/muscle_tab.c (muscle_init): Remove initialization of
13256 skeleton muscle.
13257 * src/output.c (output_master_parser): Do it here.
13258
fbe01355
AD
132592001-11-20 Akim Demaille <akim@epita.fr>
13260
13261 * po/sv.po: New.
13262 * configure.in (ALL_LINGUAS): Adjust.
13263 * po/POTFILE.in: Remove `nullable.c' and `derives.c' which no
13264 longer contains strings to translate.
13265
81e895c0
AD
132662001-11-19 Akim Demaille <akim@epita.fr>
13267
13268 * src/conflicts.c (conflicts_print): Add a missing \n.
13269
6bb1878b
AD
132702001-11-19 Akim Demaille <akim@epita.fr>
13271
13272 * src/nullable.c (nullable_print): New.
13273 (set_nullable): Call it when tracing.
13274 Better locality of variables.
13275
d9ec2d07
AD
132762001-11-19 Akim Demaille <akim@epita.fr>
13277
13278 * src/print.c (print_actions): Better locality of variables.
13279
720e5c1b
AD
132802001-11-19 Akim Demaille <akim@epita.fr>
13281
13282 * src/derives.c (print_derives): Fix and enrich.
13283 * src/closure.c (print_fderives): Likewise.
13284
fb908786
AD
132852001-11-19 Akim Demaille <akim@epita.fr>
13286
13287 * src/closure.c (itemsetend): Remove, replaced with...
13288 (itemsetsize): new.
13289
125ecb56
AD
132902001-11-19 Akim Demaille <akim@epita.fr>
13291
13292 * src/LR0.c (kernel_end): Remove, replaced with...
13293 (kernel_size): new.
13294
d8cf039f
AD
132952001-11-19 Akim Demaille <akim@epita.fr>
13296
13297 * src/conflicts.c (set_conflicts): Use arrays instead of pointers
13298 to clarify.
13299
7bec0760
AD
133002001-11-19 Akim Demaille <akim@epita.fr>
13301
13302 * src/closure.c (closure): Use arrays instead of pointers to clarify.
13303
c87d4863
AD
133042001-11-19 Akim Demaille <akim@epita.fr>
13305
13306 * src/closure.c, src/derives.c, src/nullable.c: Adjust various
13307 trace messages.
13308 * src/LR0.c: Likewise.
13309 (allocate_itemsets): Use arrays instead of pointers to clarify.
13310
9bfe901c
AD
133112001-11-19 Akim Demaille <akim@epita.fr>
13312
13313 * src/getargs.c (statistics_flag): Replace with...
13314 (trace_flag): New.
13315 (longopts): Accept --trace instead of --statistics.
13316 * src/getargs.h, src/options.c: Adjust.
13317 * src/LR0.c, src/closure.c, src/derives.c, src/nullable.c,
13318 * src/reduce.c: Use trace_flags instead of the CPP conditional TRACE.
13319
97db7bd4
AD
133202001-11-19 Akim Demaille <akim@epita.fr>
13321
cc72668c 13322 * src/LR0.c (new_itemsets, get_state): Use more arrays and fewer
97db7bd4
AD
13323 pointers to clarify the code.
13324 (save_reductions, save_shifts): Factor common parts of alternatives.
13325
2c5f66ed
AD
133262001-11-19 Akim Demaille <akim@epita.fr>
13327
13328 * src/LR0.c (new_state, get_state): Complete TRACE code.
13329 * src/closure.c: Include `reader.h' to get `tags', needed by the
13330 trace code.
13331 Rename the conditional DEBUG as TRACE.
13332 Output consistently TRACEs to stderr, not stdout.
13333 * src/derives.c: Likewise.
13334 * src/reduce.c: (inaccessable_symbols): Using if is better style
13335 than goto.
13336 Use `#if TRACE' instead of `#if 0' for tracing code.
13337
300f275f
AD
133382001-11-19 Akim Demaille <akim@epita.fr>
13339
13340 * src/system.h (LIST_FREE, shortcpy): New.
13341 * src/LR0.c: Use them.
13342 * src/output.c (free_itemsets, free_reductions, free_shifts):
13343 Remove, replaced by LIST_FREE.
13344
f59c437a
AD
133452001-11-19 Akim Demaille <akim@epita.fr>
13346
13347 * src/state.h (CORE_ALLOC, SHIFTS_ALLOC, ERRS_ALLOC)
13348 (REDUCTIONS_ALLOC): New.
13349 * src/LR0.c, src/conflicts.c: Use them to de-obfuscate memory
13350 allocation.
13351
6986fd9e
AD
133522001-11-19 Akim Demaille <akim@epita.fr>
13353
13354 * src/LR0.c (new_state): Complete trace code.
13355 * src/nullable.c (set_nullable): Don't translate traces.
13356
4bc30f78
AD
133572001-11-19 Akim Demaille <akim@epita.fr>
13358
13359 * src/print_graph.c (print_core): Better locality of variables.
13360 * src/print.c (print_core): Likewise.
13361
08a946e0
AD
133622001-11-19 Akim Demaille <akim@epita.fr>
13363
13364 * src/vcg.c: You do the output, so you are responsible of the
13365 handling of VCG syntax, in particular: use quotearg.
13366 * src/print_graph.c: Don't.
13367 (print_actions): Don't output the actions as part of the nodes,
13368 since that's the job of the edges.
13369 (print_state): Don't output by hand: fill the node description,
9bfe901c 13370 and ask for its output.
08a946e0 13371
f0473484
AD
133722001-11-19 Akim Demaille <akim@epita.fr>
13373
cc72668c
AD
13374 * src/bison.simple (yyparse): When verbosely reporting an error,
13375 no longer put additional quotes around token names.
f0473484
AD
13376 * tests/calc.at: Adjust.
13377
e41dc700
AD
133782001-11-19 Akim Demaille <akim@epita.fr>
13379
13380 * src/symtab.h, src/symtab.c: `line' is a new member of `bucket'.
13381 * src/reader.c (record_rule_lines, rline, rline_allocated): Remove.
13382 * src/output.c: Adjust.
13383
652a871c
AD
133842001-11-19 Akim Demaille <akim@epita.fr>
13385
13386 * src/gram.h (rprec, rprecsym, rassoc): Remove, now part of...
13387 (rule_t): this.
13388 * src/conflicts.c, src/reader.c, src/reduce.c: Adjust.
13389
b2ed6e58
AD
133902001-11-19 Akim Demaille <akim@epita.fr>
13391
13392 * src/gram.h (rule_t): New.
13393 (rule_table): New.
13394 (rrhs, rlhs): Remove, part of state_t.
13395 * src/print_graph.c, src/closure.c, src/conflicts.c, src/derives.c,
13396 * src/lalr.c, src/nullable.c, src/output.c, src/print.c,
13397 * src/reader.c, src/reduce.c: Adjust.
13398
edad7067
AD
133992001-11-19 Akim Demaille <akim@epita.fr>
13400
13401 * src/reader.c (symbols_output): New, extracted from...
13402 (packsymbols): Here.
13403 (reader): Call it.
13404
3feec034
AD
134052001-11-19 Akim Demaille <akim@epita.fr>
13406
13407 * src/lalr.c (set_maxrhs, maxrhs): Remove, replaced with...
13408 (maxrhs): this new function.
13409
ddcd5fdf
AD
134102001-11-19 Akim Demaille <akim@epita.fr>
13411
cc72668c 13412 * src/lalr.c (F): New macro to access the variable F.
ddcd5fdf
AD
13413 Adjust.
13414
bb527fc2
AD
134152001-11-19 Akim Demaille <akim@epita.fr>
13416
cc72668c 13417 * src/lalr.h (LA): New macro to access the variable LA.
bb527fc2
AD
13418 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
13419 * src/lalr.c: Adjust.
13420
a845a697
AD
134212001-11-19 Akim Demaille <akim@epita.fr>
13422
13423 * src/lalr.c (initialize_LA): Only initialize LA. Let...
13424 (set_state_table): handle the `lookaheads' members.
13425
f004bf6a
AD
134262001-11-19 Akim Demaille <akim@epita.fr>
13427
cc72668c
AD
13428 * src/lalr.h (lookaheads): Removed array, whose contents is now
13429 a member of...
f004bf6a
AD
13430 (state_t): this structure.
13431 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
13432 Adjust.
13433
de326cc0
AD
134342001-11-19 Akim Demaille <akim@epita.fr>
13435
cc72668c
AD
13436 * src/lalr.h (consistent): Removed array, whose contents is now
13437 a member of...
de326cc0
AD
13438 (state_t): this structure.
13439 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
13440 Adjust.
13441
90b4416b
AD
134422001-11-19 Akim Demaille <akim@epita.fr>
13443
cc72668c
AD
13444 * src/lalr.h (reduction_table, shift_table): Removed arrays, whose
13445 contents are now members of...
90b4416b
AD
13446 (state_t): this structure.
13447 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
13448 Adjust.
13449
9703cc49
AD
134502001-11-19 Akim Demaille <akim@epita.fr>
13451
13452 * src/lalr.h (state_t): New.
13453 (state_table): Be a state_t * instead of a core **.
13454 (accessing_symbol): Remove, part of state_t.
13455 * src/lalr.c: Adjust.
13456 (set_accessing_symbol): Merge into...
13457 (set_state_table): this.
13458 * src/print_graph.c, src/conflicts.c: Adjust.
13459
d803322e
AD
134602001-11-14 Akim Demaille <akim@epita.fr>
13461
13462 * tests/calc.at, tests/output.at, tests/regression.at,
13463 * tests/testsuite.at, tests/torture.at: Rely on Autotest 2.52g:
13464 now the tests are run in private dirs, therefore AC_CLEANUP and
13465 family can be simplified to 0-ary.
13466 * tests/atlocal.in: Now that we run `elsewhere' than in tests/,
13467 use abs. path to find config.h.
13468 * tests/calc.at (AT_CHECK_CALC): Don't try to check the compiler's
13469 stderr, there can be way too much random noise.
13470 Instead pass -Werror to GCC and rely on the exit status.
13471 Reported by Wolfram Wagner.
13472
3d76b07d
AD
134732001-11-14 Akim Demaille <akim@epita.fr>
13474
13475 * src/bison.simple (yyparse): Let yyls1, yyss1 and yyvs1 be
13476 defined only if yyoverflow is defined, to avoid `warning: unused
13477 variable `yyvs1''.
13478 Reported by The Test Suite.
13479
09b503c8
AD
134802001-11-14 Akim Demaille <akim@epita.fr>
13481
13482 * src/print.c: Include reduce.h.
13483 Reported by Hans Aberg.
13484
134852001-11-14 Akim Demaille <akim@epita.fr>
13486
13487 * src/lex.c, src/lex.h (token_buffer, unlexed_token_buffer):
13488 Revert a previous patch: these are really const.
13489 * src/conflicts.c (conflict_report): Additional useless pair of
13490 braces to pacify GCC's warnings for `if () if () {} else {}'.
13491 * src/lex.c (parse_percent_token): Replace equal_offset with
13492 arg_offset.
13493 arg is const.
13494 Be sure to strdup `arg' when used, since there is no reason for
13495 token_buffer not to change.
13496
0f37a994
AD
134972001-11-14 Akim Demaille <akim@epita.fr>
13498
13499 * src/system.h (EXIT_SUCCESS, EXIT_FAILURE): Ensure a proper
13500 definition.
13501 * src/main.c (main): Use them.
13502 Suggested by Hans Aberg.
13503
d39d93b8
AD
135042001-11-12 Akim Demaille <akim@epita.fr>
13505
13506 * src/system.h (ngettext): Now that we use ngettext, be sure to
13507 provide a default definition when NLS are not used.
13508
9edcd895
AD
135092001-11-12 Akim Demaille <akim@epita.fr>
13510
13511 * doc/bison.texinfo: Use `$' as shell prompt, not `%'.
13512 Use @kbd to denote user input.
13513 (Language and Grammar): ANSIfy the example.
13514 Adjust its layout for info/notinfo.
13515 (Location Tracking Calc): Output error messages to stderr.
13516 Output locations in a more GNUtically correct way.
13517 Fix a couple of Englishos.
13518 Adjust @group/@end group pairs.
13519
7da99ede
AD
135202001-11-12 Akim Demaille <akim@epita.fr>
13521
e3aa65c5 13522 %expect was not functioning at all.
7da99ede
AD
13523
13524 * src/conflicts.c (expected_conflicts): Set to -1.
13525 (conflict_report): Use ngettext.
13526 (conflicts_print): Check %expect and make its violation an error.
13527 * doc/bison.texinfo (Expect Decl): Adjust.
13528 * configure.in (AM_GNU_GETTEXT): Ask for ngettext.
13529 * tests/regression.at (%expect not enough, %expect right)
13530 (%expect too much): New.
13531
ba9dda1a
AD
135322001-11-12 Akim Demaille <akim@epita.fr>
13533
13534 * tests/regression.at (Conflicts): Rename as...
13535 (Unresolved SR Conflicts): this.
13536 (Solved SR Conflicts): New.
13537
337c5bd1
AD
135382001-11-12 Akim Demaille <akim@epita.fr>
13539
13540 * src/reduce.c (print_results): Rename as...
13541 (reduce_output): This.
13542 Output to OUT, passed as argument, instead of output_obstack.
13543 (dump_grammar): Likewise.
13544 (reduce_free): New.
13545 Also free V1.
13546 (reduce_grammar): No longer call reduce_output, since...
13547 * src/print.c (print_results): do it.
13548 * src/main.c (main): Call reduce_free;
13549
c73a41af
AD
135502001-11-12 Akim Demaille <akim@epita.fr>
13551
13552 * src/conflicts.c (print_reductions): Accept OUT as argument.
13553 Output to it, not to output_obstack.
13554 * src/print.c (print_actions): Adjust.
13555
0df87bb6
AD
135562001-11-12 Akim Demaille <akim@epita.fr>
13557
13558 * src/conflicts.c (count_sr_conflicts, count_rr_conflicts): Return
13559 the result instead of using...
13560 (src_total, rrc_total, src_count, rrc_count): Remove.
13561 (any_conflicts): Remove.
13562 (print_conflicts): Split into...
13563 (conflicts_print, conflicts_output): New.
13564 * src/conflicts.h: Adjust.
13565 * src/main.c (main): Invoke both conflicts_output and conflicts_print.
0f37a994 13566 * src/print.c (print_grammar): Issue `\n' between two rules.
0df87bb6
AD
13567 * tests/regression.at (Conflicts): New.
13568 Reported by Tom Lane.
13569
e4d3d4de
AD
135702001-11-12 Akim Demaille <akim@epita.fr>
13571
13572 * tests/regression.at (Invalid input): Remove, duplicate with
13573 ``Invalid input: 1''.
13574
6d7d248e
AD
135752001-11-12 Akim Demaille <akim@epita.fr>
13576
13577 * tests/torture.at (AT_DATA_STACK_TORTURE)
13578 (Exploding the Stack Size with Alloca)
13579 (Exploding the Stack Size with Malloc): New.
13580
e9e4c321
AD
135812001-11-12 Akim Demaille <akim@epita.fr>
13582
13583 * src/bison.simple (YYSTACK_REALLOC): New.
13584 (yyparse) [!yyoverflow]: Use it and free the old stack.
0f37a994 13585 Reported by Per Allansson.
e9e4c321 13586
5f7e0832
AD
135872001-11-12 Pascal Bart <pascal.bart@epita.fr>
13588
13589 * src/bison.simple: Define type yystype instead of YYSTYPE, and
13590 define CPP macro, which substitute YYSTYPE by yystype.
13591 * src/reader.c (parse_union_decl): Output yystype/YYSTYPE as we do
13592 with yyltype/YYLTYPE. This allows inclusion of the generated
13593 header within the parser if the compiler, such as GGC, accepts
13594 multiple equivalent #defines.
13595 From Akim.
13596
e3f1699f
AD
135972001-11-05 Akim Demaille <akim@epita.fr>
13598
13599 * src/reader.c (symbols_output): New, extracted from...
13600 (packsymbols): here.
13601 (reader): Adjust.
13602
65be0866
AD
136032001-11-05 Akim Demaille <akim@epita.fr>
13604
13605 * src/lex.c (parse_percent_token): s/quotearg/quote/.
13606
e4d910bf
AD
136072001-11-05 Akim Demaille <akim@epita.fr>
13608
13609 * tests/regression.at (AT_TEST_CPP_GUARD_H): Adjust the clean up
13610 pattern.
13611
951366c1
AD
136122001-11-05 Akim Demaille <akim@epita.fr>
13613
13614 * src/options.h (struct option_table_struct): set_flags is void*.
13615 * src/options.c (longopts): Support `--output' and `%output'.
13616 (usage): Adjust.
13617 * src/lex.h (tok_setopt): Remove, replaced with...
13618 (tok_intopt, tok_stropt): these new guys.
13619 * src/lex.c (getopt.h): Not needed.
13620 (token_buffer, unlexed_token_buffer): Not const.
13621 (percent_table): Promote `-' over `_' in directive names.
13622 Active `%name-prefix', `file-prefix', and `output'.
13623 (parse_percent_token): Accept possible arguments to directives.
13624 Promote `-' over `_' in directive names.
13625
d8988b2f
AD
136262001-11-04 Akim Demaille <akim@epita.fr>
13627
13628 * doc/bison.texinfo (Decl Summary): Split the list into
13629 `directives for grammars' and `directives for bison'.
13630 Sort'em.
13631 Add description of `%name-prefix', `file-prefix', and `output'.
13632 Promote `-' over `_' in directive names.
13633 (Bison Options): s/%locactions/%locations/. Nice Freudian slip.
13634 Simplify the description of `--name-prefix'.
13635 Promote `-' over `_' in directive names.
13636 Promote `--output' over `--output-file'.
13637 Fix the description of `--defines'.
13638 * tests/output.at: Exercise %file-prefix and %output.
13639
6468d18e
AD
136402001-11-02 Akim Demaille <akim@epita.fr>
13641
13642 * doc/refcard.tex: Update.
13643
6b7e85b9
AD
136442001-11-02 Akim Demaille <akim@epita.fr>
13645
13646 * src/symtab.h (SUNDEF): New.
13647 * src/symtab.c (bucket_new): Init user_token_number to SUNDEF to
13648 stand for `uninitialized', instead of 0.
13649 * src/reader.c (packsymbols, parse_thong_decl): Adjust.
13650 * src/lex.c (lex): Adjust.
13651
13652 * tests/calc.at (_AT_DATA_CALC_Y): Declare a token for EOF.
13653 Number it 0.
13654 Let yylex return it instead of a plain 0.
13655 Reported by Dick Streefland.
13656
cd5aafcf
AD
136572001-11-02 Akim Demaille <akim@epita.fr>
13658
13659 * tests/regression.at (Mixing %token styles): New test.
13660
037ca2f1
AD
136612001-11-02 Akim Demaille <akim@epita.fr>
13662
13663 * src/reader.c (parse_thong_decl): Formatting changes.
13664 (token_translations_init): New, extracted from...
13665 (packsymbols): Here.
13666 Adjust.
13667
270a173c
AD
136682001-11-01 Akim Demaille <akim@epita.fr>
13669
13670 * tests/regression.at (AT_TEST_CPP_GUARD_H): New.
13671 Check that `9foo.y' produces correct cpp guards.
13672 * src/files.c (compute_header_macro): Prepend `BISON_' to CPP
13673 guards.
13674 Reported by Wwp.
13675
561f9a30
AD
136762001-11-01 Akim Demaille <akim@epita.fr>
13677
13678 * tests/regression.at (Invalid input: 2): New.
13679 * src/lex.c (unlexed_token_buffer): New.
13680 (lex, unlex): Adjust: when unlexing, be sure to save token_buffer
13681 too.
13682 Reported by Wwp.
13683
f987e9d2
AD
136842001-11-01 Akim Demaille <akim@epita.fr>
13685
13686 * tests/calc.at: Catch up with 1.30.
13687 * configure.in: Bump to 1.49a.
13688 Adjust to newer Autotest.
13689
0846f581
PB
136902001-10-19 Pascal Bart <pascal.bart@epita.fr>
13691
13692 * src/conflicts.c: Move global variables rrc_total and src_total ...
13693 (print_conflicts): here.
13694 * src/output.c (output): Free global variable user_toknums.
13695 * src/lex.c (token_obstack): Become static.
13696
3c1a79b3
AD
136972001-10-18 Akim Demaille <akim@epita.fr>
13698
13699 * tests/atlocal.in (GCC): Add.
13700 * tests/calc.at: s/m4_match/m4_bmatch/.
13701 s/m4_patsubst/m4_bpatsubst/.
13702 (AT_CHECK_CALC): Check the compiler's stderr only if it's GCC.
13703 * configure.in: AC_SUBST(GCC).
13704
5d52e7d0
MA
137052001-10-14 Marc Autret <autret_m@epita.fr>
13706
13707 * src/options.c (create_long_option_table): Fix.
13708
631aa1d3
AD
137092001-10-10 Akim Demaille <akim@epita.fr>
13710
13711 * src/bison.simple: Be sure to set YYSTACK_USE_ALLOCA.
13712
f6ec6d13
AD
137132001-10-04 Akim Demaille <akim@epita.fr>
13714
13715 * src/reader.c (parse_union_decl): Push the caracters in
13716 union_obstack, not attrs_obstack.
13717
342b8b6e
AD
137182001-10-04 Akim Demaille <akim@epita.fr>
13719
13720 Merge in the branch 1.29.
13721
13722 * src/reader.c (packsymbols): Use a temporary obstack for
13723 `%%tokendef', since output_stack is already used elsewhere.
13724
13725 2001-10-02 Akim Demaille <akim@epita.fr>
13726
13727 Bump 1.29d.
13728
13729 2001-10-02 Akim Demaille <akim@epita.fr>
13730
13731 Version 1.29c.
13732
13733 2001-10-02 Akim Demaille <akim@epita.fr>
13734
13735 * tests/regression.at (Invalid CPP headers): New.
13736 From Alexander Belopolsky.
13737 * src/files.c (compute_header_macro): Map non alnum chars to `_'.
13738
13739 2001-10-02 Akim Demaille <akim@epita.fr>
13740
13741 * tests/regression.at (Invalid input): New.
13742 * src/lex.c (lex): Be sure to set `token_buffer' in any case.
13743 Reported by Shura.
13744
13745 2001-10-02 Akim Demaille <akim@epita.fr>
13746
13747 * tests/calc.at: Now that --debug works, the tests must be adjusted.
13748
13749 2001-10-02 Akim Demaille <akim@epita.fr>
13750
13751 * src/output.c (output_parser): Assert `skeleton'.
13752 * src/files.c (skeleton_find): Look harder for skeletons on DOSish
13753 systems.
13754 From Shura.
13755
13756 2001-10-01 Marc Autret <autret_m@epita.fr>
13757
13758 * src/lex.h: Echo modifications.
13759 * src/lex.c (unlex): Parameter is now token_t.
13760 From Hans Aberg.
13761
13762 2001-10-01 Marc Autret <autret_m@epita.fr>
13763
13764 * src/main.c: Include lex.h.
13765 From Hans Aberg.
13766
13767 2001-09-29 Akim Demaille <akim@epita.fr>
13768
13769 * src/getargs.c (longopts): `--debug' is `-t', not `-d'.
13770
13771 2001-09-28 Akim Demaille <akim@epita.fr>
13772
13773 * tests/testsuite.at: Update to newer Autotest.
13774 * tests/Makefile.am (EXTRA_DIST): bison is not to be shipped.
13775
13776 2001-09-27 Akim Demaille <akim@epita.fr>
13777
13778 Position independent wrapper.
13779
13780 * tests/bison: Remove.
13781 * tests/bison.in: New.
13782 * configure.in: Adjust.
13783
13784 2001-09-27 Paul Eggert <eggert@twinsun.com>
13785
13786 Port quotearg fixes from tar 1.13.24.
13787
13788 * lib/quotearg.c: BSD/OS 4.1 wchar.h requires FILE and struct
13789 tm to be declared.
13790 (HAVE_MBSINIT): Undef if !HAVE_MBRTOWC.
13791 (mbsinit): Define to 1 if !defined mbsinit && !HAVE_MBSINIT.
13792
13793 * m4/Makefile.am (EXTRA_DIST): Add mbrtowc.m4.
13794 * m4/mbrtowc.m4: New file.
13795 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Check for mbsinit and stddef.h.
13796 Use jm_FUNC_MBRTOWC instead of AC_CHECK_FUNCS(mbrtowc).
13797
13798 2001-09-27 Akim Demaille <akim@epita.fr>
13799
13800 Bump to 1.29c.
13801
13802 2001-09-27 Akim Demaille <akim@epita.fr>
13803
13804 Version 1.29b.
13805
13806 2001-09-25 Akim Demaille <akim@epita.fr>
13807
13808 * src/system.h: Include `xalloc.h'.
13809 Remove it from the C files.
13810 * src/files.c (output_files): Free the obstacks.
13811 * src/lex.c (init_lex): Rename as...
13812 (lex_init): this.
13813 (lex_free): New.
13814 * src/main.c (main): Use it.
13815
13816 2001-09-24 Marc Autret <autret_m@epita.fr>
13817
13818 * src/vcg.c (open_edge, close_edge, open_node, close_node): Change
13819 to output informations in fout (FILE*).
13820 (open_graph, close_graph): Likewise.
13821 (output_graph, output_edge, output_node): Likewise.
13822 * src/vcg.h: Update function prototypes.
13823 * src/print_graph.c (print_graph): Open output graph file.
13824 (print_actions): Adjust.
13825 * src/files.h: Remove extern declaration.
13826 * src/files.c: Remove graph_obstack declaration.
13827 (open_files): Remove graph_obstack initialization.
13828 (output_files): Remove graph_obstack saving.
13829
13830 2001-09-24 Marc Autret <autret_m@epita.fr>
13831
13832 * src/files.c (compute_output_file_names): Fix.
13833
13834 2001-09-24 Marc Autret <autret_m@epita.fr>,
13835 Akim Demaille <akim@epita.fr>
13836
13837 * src/reader.c (reader): Remove call to free_symtab ().
13838 * src/main.c (main): Call it here.
13839 Include symtab.h.
13840 * src/conflicts.c (initialize_conflicts): Rename as...
13841 (solve_conflicts): this.
13842 * src/print.c (print_core, print_actions, print_state)
13843 (print_grammar): Dump to a file instead a `output_obstack'.
13844 (print_results): Dump `output_obstack', and then proceed with the
13845 FILE *.
13846 * src/files.c (compute_output_file_names, close_files): New.
13847 (output_files): Adjust.
13848 * src/main.c (main): Adjust.
13849
13850 2001-09-23 Marc Autret <autret_m@epita.fr>
13851
13852 * src/files.c (compute_header_macro): Computes header macro name
13853 from spec_defines_file when given.
13854
13855 2001-09-23 Marc Autret <autret_m@epita.fr>
13856
13857 * src/files.c (output_files): Add default extensions.
13858
13859 2001-09-22 Akim Demaille <akim@epita.fr>
13860
13861 * src/conflicts.c (finalize_conflicts): Rename as...
13862 (free_conflicts): this.
13863
13864 2001-09-22 Akim Demaille <akim@epita.fr>
13865
13866 * src/gram.c (gram_free): Rename back as...
13867 (dummy): this.
13868 (output_token_translations): Free `token_translations'.
13869 * src/symtab.c (free_symtab): Free the tag field.
13870
13871 2001-09-22 Akim Demaille <akim@epita.fr>
13872
13873 Remove `translations' as it is always set to true.
13874
13875 * src/gram.h: Adjust.
13876 * src/reader.c (packsymbols, parse_token_decl): Adjust
13877 * src/print.c (print_grammar): Adjust.
13878 * src/output.c (output_token_translations): Adjust.
13879 * src/lex.c (lex): Adjust.
13880 * src/gram.c: Be sure the set pointers to NULL.
13881 (dummy): Rename as...
13882 (gram_free): this.
13883
13884 2001-09-22 Akim Demaille <akim@epita.fr>
13885
13886 * configure.in: Invoke AM_LIB_DMALLOC.
13887 * src/system.h: Use dmalloc.
13888 * src/LR0.c: Be sure to have pointers initialized to NULL.
13889 (allocate_itemsets): Allocate kernel_items only if needed.
13890
13891 2001-09-22 Akim Demaille <akim@epita.fr>
13892
13893 * configure.in: Bump to 1.29b.
13894 * tests/Makefile.am (DISTCLEANFILES): Add package.m4.
13895 * tests/calc.at (_AT_DATA_CALC_Y): #undef malloc so that we don't
13896 need xmalloc.c in calc.y.
13897 From Pascal Bart.
13898
13899 2001-09-21 Akim Demaille <akim@epita.fr>
13900
13901 Version 1.29a.
13902 * Makefile.maint, config/config.guess, config/config.sub,
13903 * config/missing: Update from masters.
13904 * tests/Makefile.am ($(srcdir)/$(TESTSUITE)): No longer depend
13905 upon package.m4.
13906 * configure.in (ALL_LINGUAS): Add `tr'.
13907
13908 2001-09-21 Akim Demaille <akim@epita.fr>
13909
13910 * tests/Makefile.am (package.m4): Move to...
13911 ($(srcdir)/$(TESTSUITE)): here.
13912
13913 2001-09-20 Akim Demaille <akim@epita.fr>
13914
13915 * src/complain.c: No longer try to be standalone: use system.h.
13916 Don't assume __STDC__ is defined to 1. Just test if it is defined.
13917 * src/complain.h: Likewise.
13918 * src/reduce.c (useless_nonterminals, inaccessable_symbols):
13919 Remove the unused variable `n'.
13920 From Albert Chin-A-Young.
13921
13922 2001-09-18 Marc Autret <autret_m@epita.fr>
13923
13924 * doc/bison.1: Update.
13925 * doc/bison.texinfo (Bison Options): Update --defines and --graph
13926 descriptions.
13927 (Option Cross Key): Update.
13928 Add --graph.
13929
13930 2001-09-18 Marc Autret <autret_m@epita.fr>
13931
13932 * tests/regression.at: New test (comment in %union).
13933
13934 2001-09-18 Marc Autret <autret_m@epita.fr>
13935
13936 * src/reader.c (parse_union_decl): Do not output '/'. Let copy_comment
13937 do that.
13938 Reported by Keith Browne.
13939
13940 2001-09-18 Marc Autret <autret_m@epita.fr>
13941
13942 * tests/output.at: Add tests for --defines and --graph.
13943
13944 2001-09-18 Marc Autret <autret_m@epita.fr>
13945
13946 * tests/output.at: Removes tests of %{header,src}_extension features.
13947
13948 2001-09-18 Akim Demaille <akim@epita.fr>
13949
13950 * tests/Makefile.am (package.m4): New.
13951 * tests/calc.at (_AT_CHECK_CALC): Just run `calc input'.
13952 (_AT_CHECK_CALC_ERROR): Likewise.
13953 Factor the `, ' part of verbose error messages.
13954
13955 2001-09-18 Marc Autret <autret_m@epita.fr>
13956
13957 * src/getargs.c (longopts): Declare --defines and --graph as options
13958 with optional arguments.
13959 * src/files.h: Add extern declarations.
13960 * src/files.c (spec_graph_file, spec_defines_file): New.
13961 (output_files): Update.
13962 Remove CPP-outed code.
13963
13964 2001-09-18 Marc Autret <autret_m@epita.fr>
13965
13966 Turn off %{source,header}_extension feature.
13967
13968 * src/files.c (compute_exts_from_gf): Update.
13969 (compute_exts_from_src): Update.
13970 (output_files): CPP-out useless code.
13971 * src/files.h: Remove {header,source}_extension extern declarations.
13972 * src/reader.c (parse_dquoted_param): CPP-out.
13973 (parse_header_extension_decl): Remove.
13974 (parse_source_extension_decl): Remove.
13975 (read_declarations): Remove cases tok_{hdrext,srcext}.
13976 * src/lex.c (percent_table): Remove {header,source}_extension entries.
13977 * src/lex.h (token_t): Remove tok_hdrext and tok_srcext.
13978
13979 2001-09-10 Akim Demaille <akim@epita.fr>
13980
13981 * tests/output.at (AT_CHECK_BISON_FLAGS, AT_CHECK_BISON_PERCENT):
13982 (AT_CHECK_BISON_PERCENT_FLAGS): Merge into...
13983 (AT_CHECK_OUTPUT): this.
13984 Merely check ls' exit status, its output is useless.
13985
13986 2001-09-10 Akim Demaille <akim@epita.fr>
13987
13988 * tests/calc.at: Use m4_match.
13989 (_AT_DATA_CALC_Y): Check `yyin != NULL', not `stdin != NULL'.
13990
13991 2001-09-10 Marc Autret <autret_m@epita.fr>,
13992 Akim Demaille <akim@epita.fr>
13993
13994 * src/vcg.h (graph_s): color, textcolor, bordercolor are now
13995 enum color_e.
13996 * src/print_graph.c (print_graph): Initalize graph.layoutalgorithm
13997 to `normal'.
13998 * src/reader.c (parse_token_decl): Initialize token with tok_eof.
13999 * src/lex.h: Adjust prototype.
14000 (token_t): Add `tok_undef'.
14001 * src/lex.c (struct percent_table_struct): Retval is now a token_t.
14002 (parse_percent_token): Now returns token_t.
14003 Add default statement in switch.
14004 (lex): Separate `c' as an input variable, from the token_t result
14005 part.
14006 (unlexed): Is a token_t.
14007
14008 2001-09-10 Akim Demaille <akim@epita.fr>
14009
14010 * configure.in: Bump to 1.29a.
14011
14012 2001-09-07 Akim Demaille <akim@epita.fr>
14013
14014 Version 1.29.
14015
14016 2001-08-30 Akim Demaille <akim@epita.fr>
14017
14018 * tests/atgeneral.m4, tests/atconfig.in, tests/suite.at: Remove.
14019 * m4/atconfig.m4: Remove.
14020 * tests/testsuite.at, tests/atlocal.in, tests/output.at,
14021 * tests/bison: New.
14022 * tests/regression.at, tests/calc.at: Use m4_define, AT_BANNER,
14023 m4_if, m4_patsubst, and m4_regexp.
14024 * tests/calc.at (_AT_CHECK_CALC, _AT_CHECK_CALC_ERROR): Use an
14025 `input' file instead of echo.
14026
14027 2001-08-29 Akim Demaille <akim@epita.fr>
14028
14029 Bump to 1.28e.
14030
14031 2001-08-29 Akim Demaille <akim@epita.fr>
14032
14033 Version 1.28d.
14034
14035 2001-08-29 Paul Eggert <eggert@twinsun.com>
14036
14037 * src/bison.simple (yyparse): Don't take the address of an
14038 item before the start of an array, as that doesn't conform to
14039 the C Standard.
14040
14041 2001-08-29 Robert Anisko <anisko_r@epita.fr>
14042
14043 * doc/bison.texinfo (Location Tracking Calc): New node.
14044
14045 2001-08-29 Paul Eggert <eggert@twinsun.com>
14046
14047 * src/output.c (output): Do not define const, as this now
14048 causes more problems than it cures.
14049
14050 2001-08-29 Akim Demaille <akim@epita.fr>
14051
14052 * doc/bison.texinfo: Modernize `@node' and `@top' use: just name
14053 the nodes.
14054 Be sure to tag the `detailmenu'.
14055
14056 2001-08-29 Akim Demaille <akim@epita.fr>
14057
14058 * Makefile.maint (do-po-update): Wget refuses to overwrite files:
14059 download in a tmp dir.
14060
14061 2001-08-28 Marc Autret <autret_m@epita.fr>
14062
14063 * config/depcomp: New file.
14064
14065 2001-08-28 Marc Autret <autret_m@epita.fr>
14066
14067 * doc/bison.1 (mandoc): Adjust.
14068 From Juan Manuel Guerrero.
14069
14070 2001-08-28 Marc Autret <autret_m@epita.fr>
14071
14072 * src/print_graph.c (print_state): Fix.
14073
14074 2001-08-27 Marc Autret <autret_m@epita.fr>
14075
14076 * src/vcg.h (classname_s, infoname_s, node_s): Constify the
14077 char * members.
14078 Echo modifications to the functions prototypes.
14079 * src/vcg.c (add_classname, add_infoname): Adjust arguments.
14080
14081 2001-08-27 Marc Autret <autret_m@epita.fr>
14082
14083 * src/vcg.c: Include `xalloc.h'.
14084 (add_colorentry): New.
14085 (add_classname): New.
14086 (add_infoname): New.
14087 * src/vcg.h: Add new prototypes.
14088
14089 2001-08-27 Akim Demaille <akim@epita.fr>
14090
14091 * Makefile.maint: Sync. again with CVS Autoconf.
14092
14093 2001-08-27 Akim Demaille <akim@epita.fr>
14094
14095 * Makefile.maint: Formatting changes.
14096 (po-update, cvs-update, update): New targets.
14097 (AMTAR): Remove.
14098
14099 2001-08-27 Akim Demaille <akim@epita.fr>
14100
14101 * Makefile.am (AUTOMAKE_OPTIONS): 1.5.
14102 * Makefile.maint: Sync. with CVS Autoconf.
14103
14104 2001-08-27 Marc Autret <autret_m@epita.fr>
14105
14106 * src/vcg.h (struct infoname_s): New.
14107 (struct colorentry_s): New.
14108 (graph_s): New fields {vertical,horizontal}_order in structure.
14109 Add `infoname' field.
14110 Add `colorentry' field;
14111 * src/vcg_defaults.h (G_VERTICAL_ORDER): New.
14112 (G_HORIZONTAL_ORDER): New.
14113 (G_INFONAME): New.
14114 (G_COLORENTRY): New.
14115 * src/vcg.c (output_graph): Add output of {vertical,horizontal}_order.
14116 Add output of `infoname'.
14117 Add output of `colorentry'.
14118
14119 2001-08-27 Marc Autret <autret_m@epita.fr>
14120
14121 * src/reader.c (parse_dquoted_param): Rename variable `index' to `i'.
14122 This one shadowed a global parameter.
14123
14124 2001-08-24 Marc Autret <autret_m@epita.fr>
14125
14126 * src/print_graph.c (node_output_size): Declared POSIX `size_t' type,
14127 instead of `unsigned'.
14128 (print_state): Do not call obstack_object_size () in obstack_grow ()
14129 to avoid macro variables shadowing.
14130
14131 2001-08-23 Marc Autret <autret_m@epita.fr>
14132
14133 * src/lex.c (percent_table): Typo: s/naem/name/.
14134 Add graph option.
14135 Normalize new options declarations.
14136
14137 2001-08-20 Pascal Bart <pascal.bart@epita.fr>
14138
14139 * tests/suite.at: Exercise %header_extension and %source_extension.
14140
14141 2001-08-16 Marc Autret <autret_m@epita.fr>
14142
14143 * src/reader.c (parse_dquoted_param): New.
14144 (parse_header_extension_decl): Use it.
14145 (parse_source_extension_decl): Likewise.
14146
14147 2001-08-16 Marc Autret <autret_m@epita.fr>
14148
14149 * src/vcg.c: Remove includes of `complain.h' and `xalloc.h'.
14150 (get_xxxx_str): Use assert () instead of complain ().
14151 Remove return invokations in default cases.
14152 (get_decision_str): Modify default behaviour. Remove second argument.
14153 Echo modifications on calls.
14154 (output_graph): Fix.
14155
14156 2001-08-16 Marc Autret <autret_m@epita.fr>
14157
14158 * src/getargs.c (usage): Update with ``-g, --graph''.
14159
14160 2001-08-16 Marc Autret <autret_m@epita.fr>
14161
14162 * doc/bison.texinfo (Bison Options): Add items `-g', `--graph'.
14163 (Option Cross Key): Likewise.
14164 * doc/bison.1: Update.
14165
1c8c2190
PB
141662001-09-25 Pascal Bart <pascal.bart@epita.fr>
14167
14168 * src/output.c (output_master_parser): Don't finish action_obstack.
14169 (output_parser): Don't care about the muscle action, here.
14170 (prepare): Copy the action_obstack in the action muscle.
14171 (output): Free action_obstack.
14172
180d45ba
PB
141732001-09-23 Pascal Bart <pascal.bart@epita.fr>
14174
14175 * src/reader.c (parse_union_decl): Add new obstack union_obstack. Which
14176 will contain `%union' declaration.
14177 (parse_union_decl): Delete #line directive output.
14178 (parse_union_decl): Substitute /attrs_obstack/union_obstack for all
14179 informations about %union.
14180 (parse_union_decl): Copy the union_obstack in the muscle stype.
14181 * src/bison.simple: Add new #line directive.
14182 Add typdef %%stype YYSTYPE.
14183
c51d1a19
PB
141842001-09-23 Pascal Bart <pascal.bart@epita.fr>
14185
14186 * src/bison.simple: Add new `#line' directive.
14187
6f9344da
PB
141882001-09-22 Pascal Bart <pascal.bart@epita.fr>
14189
14190 * src/bison.simple: New `#line' directive.
14191 * src/output.c (output_parser): Support new dynamic muscle input_line.
14192
652def80
MA
141932001-09-22 Marc Autret <autret_m@epita.fr>
14194
14195 * src/output.c (output_master_parser): New.
14196 (output_parser): Be more re-entrant.
14197
25b222fa
MA
141982001-09-21 Marc Autret <autret_m@epita.fr>
14199
14200 * src/reader.c (copy_definition, parse_union_decl): Update and use
14201 `linef' muscle.
14202 (copy_action): Likewise.
14203 Use obstack_1grow ().
14204 * src/muscle_tab.c (muscle_init): Add muscle `linef'.
14205
6bc35ae5
MA
142062001-09-21 Marc Autret <autret_m@epita.fr>
14207
14208 * src/options.c (option_table): Adjust.
14209 * src/lex.c (parse_percent_token): Fix.
14210
c0629aa1
PB
142112001-09-20 Pascal Bart <pascal.bart@epita.fr>
14212
14213 * src/options.c (symtab.h): Include it, need by lex.h.
342b8b6e 14214
82b6d266
PB
142152001-09-20 Pascal Bart <pascal.bart@epita.fr>
14216
14217 * src/lex.c (parse_percent_token): Change type of variable `tx', which
14218 is now an option_table_struct*.
14219 (option_strcmp): New function option_strcmp.
14220 (parse_percent_token): Call option_strcmp.
14221 * src/getargs.c (xalloc.h, options.h): Include it.
14222 (getargs): Call create_long_option_table.
14223 (getargs): Free longopts at the end of the function.
14224 (shortopts): Move in options.c.
14225 * src/options.c (create_long_option_table): New function. Convert
14226 information from option_table to option structure.
14227 * src/reader.c (options.h): Include it.
14228
14229 * src/Makefile.am: Adjust.
14230 * src/options.c (option_table): Create from longopts and percent_table.
14231 * src/getargs.c (longopts): Delete.
14232 * src/lex.c (struct percent_table_struct): Delete.
14233 (percent_table): Delete.
14234 (options.h): Include it.
14235 * src/options.c: Create.
14236 * src/options.h: Create.
14237 Declare enum opt_access_e.
14238 Define struct option_table_struct.
14239
75f5aaea
MA
142402001-09-20 Marc Autret <autret_m@epita.fr>
14241
14242 * doc/bison.texinfo: Adjust terminologies about prologue and epilogue
14243 sections of Bison.
14244
f508cb0a
PB
142452001-09-19 Pascal Bart <pascal.bart@epita.fr>
14246
14247 * src/bison.simple: s/%%filename/%%skeleton.
14248 * src/muscle_tab.c (getargs.h): Include it.
14249 (muscle_init): Insert new muscle skeleton.
14250
13105fc1
PB
142512001-09-18 Pascal Bart <pascal.bart@epita.fr>
14252
14253 * src/output.c (output_parser): Delete unused variable actions_dumped.
14254
b0c4483e
PB
142552001-09-07 Pascal Bart <pascal.bart@epita.fr>
14256
14257 * src/output.c (output): Delete call to reader_output_yylsp.
14258 * src/reader.c (reader): Likewise.
ba0fe3c7 14259 * src/reader.h: Delete declaration of reader_output_yylsp.
342b8b6e 14260
11d82f03
MA
142612001-09-02 Marc Autret <autret_m@epita.fr>
14262
14263 * src/reader.c: Include muscle_tab.h.
14264 (parse_union_decl): Update.
14265 (parse_macro_decl): Rename parse_muscle_decl.
14266 Update to use renamed functions and variable.
14267 (read_declarations, copy_action, read_additionnal_code, : Updated
14268 with correct variables and functions names.
14269 (packsymbols, reader): Likewise.
342b8b6e 14270
11d82f03 14271 * src/reader.h (muscle_obstack): Extern declaration update.
342b8b6e 14272
11d82f03
MA
14273 * src/output.c: Include muscle_tab.h
14274 In all functions using macro_insert, change by using muscle_insert ().
14275 (macro_obstack): Rename muscle_obstack.
14276 Echo modifications in the whole file.
14277 (MACRO_INSERT_INT): Rename MUSCLE_INSERT_INT.
14278 (MACRO_INSERT_STRING): Rename MUSCLE_INSERT_STRING.
14279 (MACRO_INSERT_PREFIX): Rename MUSCLE_INSERT_PREFIX.
14280
14281 * src/muscle_tab.h: Update double inclusion macros.
14282 (macro_entry_s): Rename muscle_entry_s.
14283 Update prototypes.
342b8b6e 14284
11d82f03
MA
14285 * src/muscle_tab.c: Include muscle_tab.h.
14286 Rename macro_tabble to muscle_table.
14287 (mhash1, mhash2, mcmp): Use muscle_entry.
14288 (macro_init): Rename muscle_init. Update.
14289 (macro_insert): Rename muscle_insert. Update.
14290 (macro_find): Rename muscle_find. Update.
14291
14292 * src/main.c: Include muscle_tab.h.
14293 (main): Call muscle_init ().
14294 * src/Makefile.am (bison_SOURCES): Echo modifications.
14295
93a37297
MA
142962001-09-02 Marc Autret <autret_m@epita.fr>
14297
f753cd62 14298 Now the files macro_tab.[ch] are named muscle_tab.[ch].
342b8b6e 14299
f753cd62
MA
14300 * src/muscle_tab.c, src/muscle_tab.h: Add files.
14301
143022001-09-02 Marc Autret <autret_m@epita.fr>
14303
14304 * src/macrotab.c, src/macrotab.h: Remove.
93a37297 14305
682d48cd
PB
143062001-09-01 Pascal Bart <pascal.bart@epita.fr>
14307
342b8b6e 14308 * src/reader.c (copy_guard): Use muscle to specify the `#line'
682d48cd
PB
14309 filename.
14310
087c8fda
MA
143112001-09-01 Marc Autret <autret_m@epita.fr>
14312
14313 * tests/calc.at (exp): Now, YYERROR_VERBOSE need to be set
14314 to an explicit value to activate the feature. We do it here.
14315
dda680cb
PB
143162001-08-31 Pascal Bart <pascal.bart@epita.fr>
14317
14318 * src/output.c (prepare): Delete the `filename' muscule insertion.
14319 * src/reader.c (copy_action): Use `filename' muscule with `#line'.
14320 (parse_union_decl): Likewise.
14321 * src/macrotab.c (macro_init): Initialize filename by infile.
14322
9e644e64
MA
143232001-08-31 Marc Autret <autret_m@epita.fr>
14324
14325 * src/bison.simple (YYLSP_NEEDED): New definition.
14326 * src/output.c (prepare): Add macro insertion of `locations_flag'
14327
17da6427
PB
143282001-08-31 Pascal Bart <pascal.bart@epita.fr>
14329
14330 * src/output.c (prepare): Delete insertion of previous muscles,
14331 and insert the `prefix' muscles.
14332 * src/macrotab.c (macro_init): Likewise.
14333 (macro_init): Initialization prefix directive by `yy'.
342b8b6e 14334 * src/bison.simple: Substitute all %%yylex, %%yychar, %%yylval,
17da6427
PB
14335 %%yydebug, %%yyerror, %%yynerrs and %%yyparse by yylex, yychar,
14336 yylval, yydebug, yyerror, yynerrs and yyparse.
342b8b6e 14337 New directive `#define' to substitute yydebug, ... with option
17da6427
PB
14338 name_prefix.
14339
e8cb70b9
PB
143402001-08-31 Pascal Bart <pascal.bart@epita.fr>
14341
14342 * src/main.c (main): Standardize.
14343 * src/output.c (output_table_data, output_parser): Likewise.
14344 * src/macrotab.h, src/macrotab.c, src/bison.simple: Likewise.
14345
63c2d5de
MA
143462001-08-31 Pascal Bart <pascal.bart@epita.fr>, Marc Autret <autret_m@epita.fr>
14347
342b8b6e 14348 * src/reader.c (read_additionnal_code): Rename %%user_code to
63c2d5de
MA
14349 %%epilogue.
14350 * src/output.c (output): Rename %%declarations to %%prologue.
14351 * src/bison.simple: Echo modifications.
342b8b6e 14352
d8cb5183
MA
143532001-08-31 Marc Autret <autret_m@epita.fr>
14354
14355 * src/reader.c (readgram): CleanUp.
14356 (output_token_defines): Likewise.
14357 (packsymbols): Likewise.
14358 (reader): Likewise.
14359 * src/output.c (output): CPP-out useless code.
14360
6c686258
PB
143612001-08-31 Pascal Bart <pascal.bart@epita.fr>
14362
342b8b6e 14363 * src/reader.c (reader): Delete obsolete call to function
6c686258
PB
14364 output_trailers and output_headers.
14365 * src/output.h: Remove obsolete functions prototypes of output_headers
14366 and output_trailers.
14367
8f451ef7
PB
143682001-08-30 Pascal Bart <pascal.bart@epita.fr>
14369
14370 * src/main.c: Include macrotab.h.
342b8b6e 14371 * src/macrotab.h (macro_entry_s): Constify fields.
8f451ef7
PB
14372 Adjust functions prototypes.
14373 * src/macrotab.c (macro_insert): Constify key and value.
14374 (macro_find): Constify key.
14375 (macro_insert): Include 'xalloc.h'
14376 (macro_insert): Use XMALLOC.
14377 (macro_find): Constify return value.
14378 * src/output.c (output_table_data): Rename table to table_data.
14379 (output_parser): Constify macro_key, macro_value.
14380
997b6fd0 143812001-08-30 Marc Autret <autret_m@epita.fr>
2ba3b73c
MA
14382
14383 * src/reader.c (parse_skel_decl): New.
342b8b6e 14384 (read_declarations): Add case `tok_skel', call parse_skel_decl ().
2ba3b73c
MA
14385 * src/lex.h (token_t): New token `tok_skel'.
14386 * src/lex.c (percent_table): Add skeleton option entry.
14387 Standardize.
14388
ff48177d
MA
143892001-08-29 Marc Autret <autret_m@epita.fr>
14390
14391 * src/bison.simple: Add %%user_code directive at the end.
14392 * src/reader.c (read_additionnal_code): New.
14393 (reader): Use it.
14394 * src/output.c (output_program): Remove.
14395 (output): Update.
14396
b33160bf
MA
143972001-08-28 Marc Autret <autret_m@epita.fr>
14398
14399 * src/output.c (output_actions): Clean up.
4e5caae2 14400 (output_gram): CPP-out useless code.
b33160bf
MA
14401 * src/reader.c (reader): Clean up, CPP-out useless code.
14402
d1a2daf7
PB
144032001-08-28 Pascal Bart <pascal.bart@epita.fr>
14404
342b8b6e 14405 * src/output.c (output): Copy attrs_obstack in the '%%definitions'
535c0e75 14406 directive.
d1a2daf7
PB
14407 * src/bison.simple: Add `%%definitions'.
14408
2b763dfe
MA
144092001-08-28 Marc Autret <autret_m@epita.fr>
14410
14411 * config/depcomp: New file.
14412
f1a87ef6
PE
144132001-08-27 Paul Eggert <eggert@twinsun.com>
14414
14415 * src/bison.simple (yyparse): Don't take the address of an
14416 item before the start of an array, as that doesn't conform to
14417 the C Standard.
14418
82e236e2
RA
144192001-08-27 Robert Anisko <robert.anisko@epita.fr>
14420
f1a87ef6 14421 * src/output.c (output): Remove the initialization of the macro
82e236e2
RA
14422 obstack. It was done too late here.
14423
14424 * src/reader.c (parse_macro_decl): Fix. Use of the macro obstack was
14425 completely wrong.
14426 (reader): Initialize the macro obstack here, since we need it to grow
14427 '%define' directives.
14428
14429 * src/reader.h: Declare the macro obstack as extern.
14430
b0cfa28a
RA
144312001-08-27 Robert Anisko <robert.anisko@epita.fr>
14432
14433 * src/output.c (output_parser): Fix. Store single '%' characters in
14434 the output obstack instead of throwing them away.
14435
6fc74234
AD
144362001-08-27 Akim Demaille <akim@epita.fr>
14437
14438 * Makefile.am (AUTOMAKE_OPTIONS): 1.5.
14439
9c76d118
RA
144402001-08-25 Robert Anisko <robert.anisko@epita.fr>
14441
14442 * lib/Makefile.am: Adjust.
14443
a8289c62
RA
144442001-08-25 Robert Anisko <robert.anisko@epita.fr>
14445
14446 * src/bison.simple: Update and add '%%' directives.
14447
b6610515
RA
144482001-08-25 Robert Anisko <robert.anisko@epita.fr>
14449
14450 * src/reader.c (reader): Remove calls to 'output_headers' and
14451 'output_trailers'. Remove some C output.
14452 (readgram): Disable a piece of code that was writing a default
14453 definition for 'YYSTYPE'.
14454 (reader_output_yylsp): Remove.
14455 (packsymbols): Output token defintions to a macro.
14456 (copy_definition): Disable C output.
6fc74234 14457
b6610515
RA
14458 * src/reader.c (parse_macro_decl): New function used to parse macro
14459 declarations.
14460 (copy_string2): Put the body of copy_string into this new function.
14461 Add a parameter to let the caller choose whether he wants to copy the
14462 string delimiters or not.
14463 (copy_string): Be a simple call to copy_string2 with the last argument
14464 bound to true.
14465 (read_declarations): Add case for macro definition.
14466 (copy_identifier): New.
6fc74234 14467 (parse_macro_decl): Read macro identifiers using copy_identifier
b6610515
RA
14468 rather than lex.
14469
26f609ff
RA
144702001-08-25 Robert Anisko <robert.anisko@epita.fr>
14471
14472 * src/output.c (prepare): Add prefixed names.
14473 (output_parser): Output semantic actions.
14474 (output_parser): Fix bug on '%%line' directives.
6fc74234 14475
26f609ff
RA
14476 * src/output.c (output_headers): Remove. The C code printed by this
14477 function should now be in the skeletons.
14478 (output_trailers): Remove.
14479 (output): Disable call to 'reader_output_yylsp'.
14480 (output_rule_data): Do not output tables to the table obstack.
14481
14482 * src/output.c: Remove some C dedicated output.
14483 Improve the use of macro and output obstacks.
14484 (output_defines): Remove.
6fc74234 14485
26f609ff
RA
14486 * src/output.c (output_token_translations): Associate 'translate'
14487 table with a macro. No output to the table obstack.
14488 (output_gram): Same for 'rhs' and 'prhs'.
14489 (output_stos): Same for 'stos'.
14490 (output_rule_data): Same for 'r1' and 'r2'.
14491 (token_actions): Same for 'defact'.
14492 (goto_actions): Same for 'defgoto'.
14493 (output_base): Same for 'pact' and 'pgoto'.
14494 (output_table): Same for 'table'.
14495 (output_check): Same for 'check'.
6fc74234 14496
26f609ff
RA
14497 * src/output.c (output_table_data): New function.
14498 (output_short_table): Remove.
14499 (output_short_or_char_table): Remove.
6fc74234 14500
26f609ff
RA
14501 * src/output.c (output_parser): Replace most of the skeleton copy code
14502 with something new. Skeletons are now processed character by character
14503 rather than line by line, and Bison looks for '%%' macros. This is the
14504 first step in making Bison's output process (a lot) more flexible.
14505 (output_parser): Use the macro table.
14506
6f43b113
RA
145072001-08-25 Robert Anisko <robert.anisko@epita.fr>
14508
14509 * src/main.c (main): Initialize the macro table.
14510
dd3127cf
RA
145112001-08-25 Robert Anisko <robert.anisko@epita.fr>
14512
14513 * src/lex.c (percent_table): Add tok_define.
14514 * src/lex.h: Add tok_define.
14515
aa321494
RA
145162001-08-25 Robert Anisko <robert.anisko@epita.fr>
14517
14518 * src/macrotab.c: New file.
14519 * src/macrotab.h: New file.
14520 * src/Makefile.am: Update.
14521
68bd3b6b
RA
145222001-08-25 Robert Anisko <robert.anisko@epita.fr>
14523
14524 * lib/hash.c: New file.
14525 * lib/hash.h: New file.
14526 * lib/Makefile.am: Update.
14527
45f8dd1e
AD
145282001-08-15 Akim Demaille <akim@epita.fr>
14529
14530 Version 1.28c.
14531
40a64a7a 145322001-08-15 Marc Autret <autret_m@epita.fr>
0b8afb77
AD
14533
14534 * src/reader.c (readgram): Indent output macro YYSTYPE.
14535 (packsymbols): Likewise.
14536 (output_token_defines): Likewise.
14537 * src/files.c: Standardize.
14538 (compute_header_macro): New.
14539 (defines_obstack_save): New. Use compute_header_macro.
14540 (output_files): Update. Use defines_obstack_save.
14541
f9a8293a
AD
145422001-08-15 Akim Demaille <akim@epita.fr>
14543
14544 * doc/bison.texinfo (Table of Symbols): Document
14545 YYSTACK_USE_ALLOCA.
14546
150ca7a7
AD
145472001-08-15 Akim Demaille <akim@epita.fr>
14548
14549 * missing: Update from CVS Automake.
14550 * config/config.guess, config/config.sub, config/texinfo.tex:
14551 Update from gnu.org.
14552
69b5cec4
AD
145532001-08-15 Akim Demaille <akim@epita.fr>
14554
14555 * Makefile.maint: Sync with CVS Autoconf.
14556
f2b5126e
PB
145572001-08-14 Pascal Bart <pascal.bart@epita.fr>
14558
69b5cec4 14559 * doc/bison.texinfo: Include GNU Free Documentation License from
f2b5126e
PB
14560 `fdl.texi'.
14561 * doc/fdl.texi: Add to package.
14562
4ecbf796
MA
145632001-08-14 Marc Autret <autret_m@epita.fr>
14564
14565 Turn on %{source,header}_extension features.
14566
69b5cec4 14567 * src/lex.c (percent_table): Un-CPP out header_extension and
4ecbf796
MA
14568 source_extension.
14569 * src/files.c (compute_exts_from_gf): Compare pointers with NULL.
69b5cec4 14570 (compute_exts_from_src): Remove conditions. It restores priorities
4ecbf796
MA
14571 between options.
14572
95fb5662
MA
145732001-08-14 Marc Autret <autret_m@epita.fr>
14574
14575 * src/files.c (compute_base_names): Add extensions computing when
14576 `--file-prefix' used.
14577 Standardize function calls.
14578
78d09da9
MA
145792001-08-13 Marc Autret <autret_m@epita.fr>
14580
69b5cec4 14581 * src/bison.simple (YYSTACK_USE_ALLOCA): Changed to allow users
78d09da9
MA
14582 defining it (defined but null disables alloca).
14583
5a009f2c
MA
145842001-08-13 Marc Autret <autret_m@epita.fr>
14585
14586 * src/bison.simple (_yy_memcpy): CPP reformat.
14587
1e41465a
PB
145882001-08-13 Pascal Bart <pascal.bart@epita.fr>
14589
14590 * tests/atconfig.in (CPPFLAGS): Fix.
14591
c67a198d
PB
145922001-08-10 Pascal Bart <pascal.bart@epita.fr>
14593
79282c6c 14594 * doc/bison.texinfo: Include GNU General Public License from
c67a198d
PB
14595 `gpl.texi'.
14596 * doc/gpl.texi: Add to package.
14597
09a6de7e
MA
145982001-08-10 Marc Autret <autret_m@epita.fr>
14599
14600 * src/print_graph.h: Fix.
14601 * src/reader.c (read_declarations): Use parse_header_extension_decl ().
14602
b77b9ee0
AD
146032001-08-10 Akim Demaille <akim@epita.fr>
14604
14605 * src/system.h: Provide default declarations for stpcpy, strndup,
14606 and strnlen.
14607
3e259915
MA
146082001-08-10 Robert Anisko <anisko_r@epita.fr>
14609
14610 * doc/bison.texinfo (Locations): Update @$ stuff.
14611
ca96bc2d
MA
146122001-08-09 Robert Anisko <anisko_r@epita.fr>
14613
14614 * src/bison.simple (YYLLOC_DEFAULT): Update.
14615 (yyparse): Adjust.
14616
fdc6758b
MA
146172001-08-08 Marc Autret <autret_m@epita.fr>
14618
b77b9ee0 14619 * doc/bison.texinfo: Change @samp{$<@dots{}>} to
fdc6758b
MA
14620 @samp{$<@dots{}>@var{n}} in Section Actions in Mid-Rule.
14621 Reported by Fabrice Bauzac.
957d4dbf 14622
600cad3b
MA
146232001-08-08 Marc Autret <autret_m@epita.fr>
14624
14625 * src/vcg_default.h: Use NULL instead of 0 to initialize pointers.
14626 * src/vcg.c (output_node): Fix.
14627 * src/vcg.h: Cleanup.
14628 * src/print_graph.c: Add comments.
b77b9ee0 14629 (node_output_size): New global variable. Simplify the formatting of
600cad3b 14630 the VCG graph output.
b77b9ee0 14631 (print_actions): Unused code is now used. It notifies the final state
600cad3b 14632 and no action states in the VCG graph. It also give the reduce actions.
b77b9ee0 14633 The `shift and goto' edges are red and the `go to state' edges are
600cad3b
MA
14634 blue.
14635 Get the current node name and node_obstack by argument.
14636 (node_obstack): New variable.
14637 (print_state): Manage node_obstack.
14638 (print_core): Use node_obstack given by argument.
14639 A node is not only computed here but in print_actions also.
14640 (print_graph): CPP out useless code instead of commenting it.
14641
976e528f
AD
146422001-08-07 Pascal Bart <pascal.bart@epita.fr>
14643
14644 * tests/atconfig.in (CPPFLAGS): Fix.
14645
20e8e5ca
AD
146462001-08-07 Akim Demaille <akim@epita.fr>
14647
14648 * src/print_graph.c (quote): New.
14649 (print_core): Use it.
14650
957d4dbf 146512001-08-06 Akim Demaille <akim@epita.fr>, Marc Autret <autret_m@epita.fr>
3e3da797 14652
3e3da797
AD
14653 * src/vcg.c (complain.h): Include it.
14654 Unepitaize `return' invocations.
c4b66126 14655 [NDEBUG] (main): Remove.
79282c6c 14656 * src/vcg.h (node_t, edge_t, graph_t): Constify the char * members.
c4b66126
AD
14657 * src/files.c (open_files): Initialize graph_obstack.
14658 * src/print_graph.c (print_actions): CPP out useless code.
14659 (print_core): Don't output the last `\n' in labels.
14660 Use `quote'.
14661 * src/files.c (output_files): Output the VCG file.
14662 * src/main.c (main): Invoke print_graph ();
3e3da797 14663
957d4dbf 146642001-08-06 Marc Autret <autret_m@epita.fr>
22c2cbc0
AD
14665
14666 Automaton VCG graph output.
14667 Using option ``-g'' or long option ``--graph'', you can generate
14668 a gram_filename.vcg file containing a VCG description of the LALR (1)
14669 automaton of your grammar.
14670
14671 * src/main.c: Call to print_graph() function.
14672 * src/getargs.h: Update.
14673 * src/getargs.c (options): Update to catch `-g' and `--graph' options.
14674 (graph_flag): New flag.
14675 (longopts): Update.
14676 (getargs): Add case `g'.
14677 * src/files.c (graph_obstack): New obstack struct.
14678 (open_files): Initialize new obstack.
14679 (output_files): Saves graph_obstack if required.
14680 * src/files.h (graph_obstack): New extern declaration.
14681 * src/Makefile.am: Add new source files.
14682
927c1557 146832001-08-06 Marc Autret <autret_m@epita.fr>
ce4d5ce0
AD
14684
14685 * src/print_graph.c, src/print_graph.h (graph): New.
14686 * src/vcg.h: New file.
14687 * src/vcg.c: New file, VCG graph handling.
14688
7333d403
AD
146892001-08-06 Marc Autret <autret_m@epita.fr>
14690
14691 Add of %source_extension and %header_extension which specify
14692 the source or/and the header output file extension.
14693
14694 * src/files.c (compute_base_names): Remove initialisation of
14695 src_extension and header_extension.
14696 (compute_exts_from_gf): Update.
14697 (compute_exts_from_src): Update.
14698 (output_files): Update.
14699 * src/reader.c (parse_header_extension_decl): New.
14700 (parse_source_extension_decl): New.
14701 (read_declarations): New case statements for the new tokens.
14702 * src/lex.c (percent_table): Add entries for %source_extension
14703 and %header_extension.
14704 * src/lex.h (token_e): New tokens tok_hdrext and tok_srcext.
14705
84163231
AD
147062001-08-06 Marc Autret <autret_m@epita.fr>
14707
14708 * configure.in: Bump to 1.28c.
14709 * doc/bison.texinfo: Texinfo thingies.
14710
8303fc42
AD
147112001-08-04 Pascal Bart <pascal.bart@epita.fr>
14712
14713 * tests/atconfig.in (CPPFLAGS): Add.
14714 * tests/calc.at (AT_CHECK): Use CPPFLAGS.
14715
70a84437
AD
147162001-08-03 Akim Demaille <akim@epita.fr>
14717
14718 Version 1.28b.
14719
2ce10144
AD
147202001-08-03 Akim Demaille <akim@epita.fr>
14721
14722 * tests/Makefile.am (check-local): Ship testsuite.
14723 * tests/calc.at (_AT_DATA_CALC_Y): Prototype all the functions.
14724 Include `string.h'.
14725
1e3e4bc1
AD
147262001-08-03 Akim Demaille <akim@epita.fr>
14727
14728 * configure.in: Try using -Wformat when compiling.
14729
42b45b7f
AD
147302001-08-03 Akim Demaille <akim@epita.fr>
14731
14732 * configure.in: Bump to 1.28b.
14733
8f13fe33
AD
147342001-08-03 Akim Demaille <akim@epita.fr>
14735
14736 * src/complain.c: Adjust strerror_r portability issues.
14737
b37ba92c
AD
147382001-08-03 Akim Demaille <akim@epita.fr>
14739
14740 Version 1.28a.
14741
b0ce6046
AD
147422001-08-03 Akim Demaille <akim@epita.fr>
14743
14744 * src/getargs.c, src/getarg.h (skeleton)): Constify.
14745 * src/lex.c (literalchar): Avoid name clashes on `buf'.
14746 * src/getargs.c: Include complain.h.
14747 * src/files.c, src/files.h (skeleton_find): Avoid name clashes.
14748 * lib/quotearg.c, lib/quotearg.h: Update from fileutils 4.1.
14749
d01c415b
AD
147502001-08-03 Akim Demaille <akim@epita.fr>
14751
14752 * src/reader.c (readgram): Display hidden chars in error messages.
14753
459dd1a6
AD
147542001-08-03 Akim Demaille <akim@epita.fr>
14755
14756 Update to gettext 0.10.39.
14757
53b74c0c
AD
147582001-08-03 Akim Demaille <akim@epita.fr>
14759
14760 * lib/strspn.c: New.
14761
234a3be3
AD
147622001-08-01 Marc Autret <autret_m@epita.fr>
14763
14764 * doc/bison.texinfo: Update.
14765 * doc/bison.1 (mandoc): Update.
14766 * src/system.h (EXT_GUARD_C, EXT_STYPE_H): Remove .c and .h.
14767 * src/files.c: Support output files extensions computing.
14768 (src_extension): New static variable.
14769 (header_extension): New static variable.
14770 (tr): New function.
14771 (get_extension_index): New function, gets the index of an extension
14772 filename in a string.
14773 (compute_exts_from_gf): New function, computes extensions from the
14774 grammar file extension.
14775 (compute_exts_from_src): New functions, computes extensions from the
14776 C source file extension, file given by ``-o'' option.
14777 (compute_base_names): Update.
14778 (output_files): Update.
14779
847bf1f5
AD
147802001-08-01 Robert Anisko <anisko_r@epita.fr>
14781
d995fee7 14782 * doc/bison.texi: Document @$.
847bf1f5
AD
14783 (Locations): New section.
14784
d074a105
AD
147852001-07-18 Akim Demaille <akim@epita.fr>
14786
14787 * Makefile.maint, GNUmakefile: New, from Autoconf 2.52.
14788 * config/prev-version.txt, config/move-if-change: New.
14789 * Makefile.am: Adjust.
14790
3419715d
AD
147912001-07-08 Pascal Bart <pascal.bart@epita.fr>
14792
14793 * src/bison.simple (yyparse): Suppress warning `comparaison
14794 between signed and unsigned'.
14795
62ab6972
AD
147962001-07-05 Pascal Bart <pascal.bart@epita.fr>
14797
14798 * src/getargs.h (raw_flag): Remove.
14799 * src/getargs.c: Die on `-r'/`--raw'.
14800 * src/lex.c (parse_percent_token): Die on `%raw'.
14801 * src/reader.c (output_token_defines): Suppress call to `raw_flag'.
14802 * tests/calc.at: Suppress test with option `--raw'.
14803
1e24cc5b
AD
148042001-07-14 Akim Demaille <akim@epita.fr>
14805
14806 * config/: New.
14807 * configure.in: Require Autoconf 2.50.
14808 Update to gettext 0.10.38.
14809
32dfccf8
AD
148102001-03-16 Akim Demaille <akim@epita.fr>
14811
14812 * doc/bison.texinfo: ANSIfy the examples.
14813
cd5bd6ac
AD
148142001-03-16 Akim Demaille <akim@epita.fr>
14815
14816 * getargs.c (skeleton): New variable.
14817 (longopts): --skeleton is a new option.
14818 (shortopts, getargs): -S is a new option.
14819 * getargs.h: Declare skeleton.
14820 * output.c (output_parser): Use it.
14821
5141b016
AD
148222001-03-16 Akim Demaille <akim@epita.fr>
14823
14824 * m4/strerror_r.m4: New.
14825 * m4/error.m4: Run AC_FUNC_STRERROR_R.
14826 * lib/error.h, lib/error.c: Update.
14827
447992b9
AD
148282001-03-16 Akim Demaille <akim@epita.fr>
14829
14830 * src/getargs.c (longopts): Clean up.
14831
274d42ce
AD
148322001-02-21 Akim Demaille <akim@epita.fr>
14833
14834 * src/reader.c (gensym): `gensym_count' is your own.
14835 Use a static buf to create the symbol name, as token_buffer is no
14836 longer a buffer.
14837
22c821f3
AD
148382001-02-08 Akim Demaille <akim@epita.fr>
14839
14840 * src/conflicts.c (conflict_report): Be sure not to append to res
14841 between two calls, which could happen if both first sprintf were
14842 skipped, but not the first cp += strlen.
14843
18569462
AD
148442001-02-08 Akim Demaille <akim@epita.fr>
14845
14846 * lib/memchr.c, lib/stpcpy.c, lib/strndup.c, lib/strnlen.c:
14847 New, from fileutils 4.0.37.
14848 * configure.in: Require Autoconf 2.49c. I took some time before
14849 making this decision. This is the only way out for portability
14850 issues in Bison, it would mean way too much duplicate effort to
14851 import in Bison features implemented in 2.49c since 2.13.
14852 AC_REPLACE_FUNCS and AC_CHECK_DECLS the functions above.
14853
0d8f3c8a
AD
148542001-02-02 Akim Demaille <akim@epita.fr>
14855
14856 * lib/malloc.c, lib/realloc.c: New, from the fileutils 4.0.37.
66075dcf 14857 * lib/xalloc.h, lib/xmalloc.c: Update.
0d8f3c8a 14858
f17bcd1f
AD
148592001-01-19 Akim Demaille <akim@epita.fr>
14860
14861 Get rid of the ad hoc handling of token_buffer in the scanner: use
14862 the obstacks.
14863
14864 * src/lex.c (token_obstack): New.
14865 (init_lex): Initialize it. No longer call...
14866 (grow_token_buffer): this. Remove it.
14867 Adjust all the places which used it to use the obstack.
14868
511e79b3
AD
148692001-01-19 Akim Demaille <akim@epita.fr>
14870
14871 * src/lex.h: Rename all the tokens:
14872 s/\bENDFILE\b/tok_eof/g;
14873 s/\bIDENTIFIER\b/tok_identifier/g;
14874 etc.
14875 Let them be enums, not #define, to ease debugging.
14876 Adjust all the code.
14877
0d6508ef
AD
148782001-01-18 Akim Demaille <akim@epita.fr>
14879
14880 * src/lex.h (MAXTOKEN, maxtoken, grow_token_buffer): Remove, private.
14881 * src/lex.c (maxtoken, grow_token_buffer): Static.
14882
6deb4447
AD
148832001-01-18 Akim Demaille <akim@epita.fr>
14884
14885 Since we now use obstacks, more % directives can be enabled.
14886
14887 * src/lex.c (percent_table): Also accept `%yacc',
14888 `%fixed_output_files', `%defines', `%no_parser', `%verbose', and
14889 `%debug'.
14890 Handle the actions for `%semantic_parser' and `%pure_parser' here,
14891 instead of returning a token.
14892 * src/lex.h (SEMANTIC_PARSER, PURE_PARSER): Remove, unused.
14893 * src/reader.c (read_declarations): Adjust.
14894 * src/files.c (open_files): Don't call `compute_base_names', don't
14895 compute `attrsfile' since they depend upon data which might be
14896 *in* the input file now.
14897 (output_files): Do it here.
14898 * src/output.c (output_headers): Document the fact that this patch
14899 introduces a guaranteed SEGV for semantic parsers.
14900 * doc/bison.texinfo: Document them.
14901 * tests/suite.at: Exercise these %options.
14902
ff4423cc
AD
149032000-12-20 Akim Demaille <akim@epita.fr>
14904
14905 Also handle the output file (--verbose) with obstacks.
14906
14907 * files.c (foutput): Remove.
14908 (output_obstack): New.
14909 Adjust all dependencies.
14910 * src/conflicts.c: Return a string.
14911 * src/system.h (obstack_grow_string): Rename as...
14912 (obstack_sgrow): this. Be ready to work with non literals.
14913 (obstack_fgrow4): New.
14914
956dba3a
AD
149152000-12-20 Akim Demaille <akim@epita.fr>
14916
14917 * src/files.c (open_files): Fix the computation of short_base_name
14918 in the case of `-o foo.tab.c'.
14919
337bab46
AD
149202000-12-20 Akim Demaille <akim@epita.fr>
14921
14922 * src/reader.c (copy_string, copy_comment, copy_comment2, copy_at)
14923 (copy_dollar): Now that everything uses obstacks, get rid of the
14924 FILE * parameters.
14925
5d3214b8
AD
149262000-12-20 Akim Demaille <akim@epita.fr>
14927
14928 * src/files.c (open_files): Actually the `.output' file is based
14929 on the short_base_name, not base_name.
14930 * tests/suite.at (Checking output file names): Adjust.
14931
29092a57
AD
149322000-12-20 Akim Demaille <akim@epita.fr>
14933
14934 * src/bison.s1: Remove, we now use directly...
14935 * src/bison.simple: this.
14936 * src/Makefile.am: Use pkgdata instead of data.
14937
ea5607fd
AD
149382000-12-20 Akim Demaille <akim@epita.fr>
14939
14940 * src/files.c (guard_obstack): New.
14941 (open_files): Initialize it.
14942 (output_files): Dump it...
14943 * src/files.h: Export it.
14944 * src/reader.c (copy_guard): Use it.
14945
27110317
AD
149462000-12-19 Akim Demaille <akim@epita.fr>
14947
14948 * src/files.c (outfile, defsfile, actfile): Removed as global
14949 vars.
14950 (open_files): Don't compute them.
14951 (output_files): Adjust.
14952 (base_name, short_base_name): Be global.
14953 Adjust dependencies.
14954
19c50364
AD
149552000-12-19 Akim Demaille <akim@epita.fr>
14956
14957 * src/files.c (strsuffix): New.
14958 (stringappend): Be just like strcat but allocate.
14959 (base_names): Eve out from open_files.
14960 Try to simplify the rather hairy computation of base_name and
14961 short_base_name.
14962 (open_files): Use it.
14963 * tests/suite.at (Checking output file names): New test.
14964
573c1d9f
AD
149652000-12-19 Akim Demaille <akim@epita.fr>
14966
14967 * src/system.h (obstack_grow_literal_string): Rename as...
14968 (obstack_grow_string): this.
14969 * src/output.c (output_parser): Recognize `%% actions' instead of
14970 `$'.
14971 * src/bison.s1: s/$/%% actions/.
14972 * src/bison.hairy: Likewise.
14973
ef7ddedd
AD
149742000-12-19 Akim Demaille <akim@epita.fr>
14975
14976 * src/output.c (output_parser): Compute the `#line' lines when
14977 there are.
14978 * src/Makefile.am (bison.simple): Be a simple copy of bison.s1.
14979 Suggested by Hans Aberg.
14980
ff61dabd
AD
149812000-12-19 Akim Demaille <akim@epita.fr>
14982
14983 Let the handling of the skeleton files be local to the procedures
14984 that use it.
14985
14986 * src/files.c (xfopen, xfclose, skeleton_find, guardfile): No
14987 longer static.
14988 (fparser, open_extra_files): Remove.
14989 (open_files, output_files): Don't take care of fparser.
14990 * src/files.h: Adjust.
14991 * src/output.c (output_parser): Open and close the file to the
14992 skeleton.
14993 * src/reader.c (read_declarations): When %semantic_parser, open
14994 fguard.
14995
55b96341
AD
149962000-12-19 Akim Demaille <akim@epita.fr>
14997
14998 * src/file.h (BISON_SIMPLE, BISON_HAIRY): Move from here...
14999 * src/system.h (BISON_SIMPLE, BISON_HAIRY): ... to here.
15000
358c15b7
AD
150012000-12-19 Akim Demaille <akim@epita.fr>
15002
15003 * src/files.c (open_files): Yipee! We no longer need all the code
15004 looking for `/tmp' since we have no tmp file.
15005
7de3329e
AD
150062000-12-19 Akim Demaille <akim@epita.fr>
15007
15008 * src/system.h (EXT_TAB, EXT_OUTPUT, EXT_STYPE_H, EXT_GUARD_C):
15009 New macros.
15010 * src/files.c (open_files): Less dependency on MSDOS etc.
15011
3abcd459
AD
150122000-12-14 Akim Demaille <akim@epita.fr>
15013
15014 * src/bison.s1 (YYLLOC_DEFAULT): New macro.
15015 Provide a default definition.
15016 Use it when executing the default @ action.
15017 * src/reader.c (reader_output_yylsp): No longer include
15018 `timestamp' and `text' in the default YYLTYPE.
15019
2a91a95e
AD
150202000-12-12 Akim Demaille <akim@epita.fr>
15021
15022 * src/reader.c (copy_definition, parse_union_decl, copy_action)
15023 (copy_guard): Quote the file names.
15024 Reported by Laurent Mascherpa.
15025
14d3eb9b
AD
150262000-12-12 Akim Demaille <akim@epita.fr>
15027
15028 * src/output.c (output_headers, output_program, output): Be sure
15029 to escape special characters when outputting filenames.
15030 (ACTSTR_PROLOGUE, ACTSTR_EPILOGUE): Remove.
15031 (output_headers): Don't depend on them, Use ACTSTR.
15032
d7045ec6
AD
150332000-11-17 Akim Demaille <akim@epita.fr>
15034
15035 * lib/obstack.h: Formatting changes.
15036 (obstack_grow, obstack_grow0): Don't cast WHERE at all: it
15037 prevents type checking.
15038 (obstack_ptr_grow, obstack_ptr_grow_fast): When assigning, don't
15039 cast the value to (void *): assigning a `foo *' to a `void *'
15040 variable is valid.
15041 (obstack_int_grow, obstack_int_grow_fast): Don't cast AINT to int.
15042 * src/reader.c (parse_union_decl): Typo: use obstack_1grow to
15043 append characters.
15044
6fd54b73
AD
150452000-11-17 Akim Demaille <akim@epita.fr>
15046
15047 * tests/Makefile.am (suite.m4, regression.m4, calc.m4): Rename
15048 as...
15049 (suite.m4, regression.m4, calc.m4): these.
15050 * tests/atgeneral.m4: Update from CVS Autoconf.
15051
4c50eae6
AD
150522000-11-17 Akim Demaille <akim@epita.fr>
15053
15054 * tests/regression.m4 (%union and --defines): New test,
15055 demonstrating a current bug in the obstack implementation.
15056
a35f64ea
AD
150572000-11-17 Akim Demaille <akim@epita.fr>
15058
15059 * src/bison.s1 (_YY_DECL_VARIABLES, YY_DECL_VARIABLES): New
15060 macros.
15061 Use them to declare the variables which are global or local to
15062 `yyparse'.
15063
7de23534
AD
150642000-11-17 Akim Demaille <akim@epita.fr>
15065
15066 * acconfig.h: Remove, no longer used.
15067
aa7815f5
AD
150682000-11-07 Akim Demaille <akim@epita.fr>
15069
15070 * src: s/Copyright (C)/Copyright/g.
15071
5af1f549
AD
150722000-11-07 Akim Demaille <akim@epita.fr>
15073
15074 * src/reader.c (reader): #define YYLSP_NEEDED to 1 instead of just
15075 defining.
15076 * src/bison.s1: s/#ifdef YYLSP_NEEDED/#if YYLSP_NEEDED/.
15077
553e2b22
AD
150782000-11-07 Akim Demaille <akim@epita.fr>
15079
15080 * src/bison.s1 (YYLEX): Use #if instead of #ifdef.
15081 Merge in a single CPP if/else.
15082
8a4f41d6
AD
150832000-11-07 Akim Demaille <akim@epita.fr>
15084
15085 * src/output.c (output): Remove useless variables.
15086 * lib/obstack.c (obstack_grow, obstack_grow0): Rename the second
15087 argument `data' for consistency with the prototypes.
15088 Qualify it `const'.
15089 (obstack_copy, obstack_copy0): Rename the second argument as
15090 `address' for consistency. Qualify it `const'.
15091 * lib/obstack.h (obstack_copy, obstack_copy0, obstack_grow)
15092 (obstack_grow0, obstack_ptr_grow, obstack_ptr_grow_fast): Qualify
15093 `const' their input argument (`data' or `address').
15094 Adjust the corresponding macros to include `const' in casts.
15095
095a3fb5
AD
150962000-11-03 Akim Demaille <akim@epita.fr>
15097
15098 * src/Makefile.am (INCLUDES): s/PFILE/BISON_SIMPLE/.
15099 s/PFILE1/BISON_HAIRY/.
15100 Adjust dependencies.
15101
d1cdce7c
AD
151022000-11-03 Akim Demaille <akim@epita.fr>
15103
090c5ebf 15104 For some reason, this was not applied.
d1cdce7c
AD
15105
15106 * src/files.c [VMS]: No longer include `ssdef.h', no longer define
15107 `unlink': it's no longer used.
15108
9311529b
AD
151092000-11-03 Akim Demaille <akim@epita.fr>
15110
15111 * src/files.c (skeleton_find): New function, eved out of...
15112 (open_files, open_extra_files): here.
15113
d8880f69
AD
151142000-11-03 Akim Demaille <akim@epita.fr>
15115
15116 Don't use `atexit'.
15117
15118 * src/files.c (obstack_save): New function.
15119 (done): Rename as...
15120 (output_files): this.
15121 Use `obstack_save'.
15122 * src/main.c (main): Don't use `atexit' to register `done', since
15123 it no longer has to remove tmp files, just call `output_files'
15124 when there are no errors.
15125
0dbb648e
AD
151262000-11-02 Akim Demaille <akim@epita.fr>
15127
15128 * src/files.c [VMS]: No longer include `ssdef.h', no longer define
15129 `unlink': it's no longer used.
15130 * src/files.h: Formatting changes.
15131
896fe5c1
AD
151322000-11-02 Akim Demaille <akim@epita.fr>
15133
15134 Remove the last uses of mktemp and unlink/delete.
15135
15136 * src/files.c (fdefines, ftable): Removed.
15137 (defines_ostack, table_obstack): New.
15138 Adjust dependencies of the former into uses of the latter.
15139 * src/output.c (output_short_or_char_table, output_short_table):
15140 Convert to using obstacks.
15141 * src/reader.c (copy_comment2): Accept one FILE * and two
15142 obstacks.
15143 (output_token_defines, reader_output_yylsp): Use obstacks.
15144 * src/system.h (obstack_fgrow3): New.
1f65350a 15145 * po/POTFILES.in: Adjust.
896fe5c1 15146
dd60faec
AD
151472000-11-01 Akim Demaille <akim@epita.fr>
15148
15149 Change each use of `fattrs' into a use of `attrs_obstack'.
15150
15151 * src/reader.c (copy_at): Typo: s/yylloc/yyloc/.
15152 * src/files.c (fattrs): Remove.
15153 (attrs_obstack): New.
15154 Adjust all dependencies.
15155 (done): If SEMANTIC_PARSER, dump attrs_obstack into attrsfile.
15156
8c7ebe49
AD
151572000-11-01 Akim Demaille <akim@epita.fr>
15158
15159 Introduce obstacks.
15160 Change each use of `faction' into a use of `action_obstack'.
15161
15162 * lib/obstack.h, lib/obstack.c: New files.
15163 * src/files.c (faction): Remove.
15164 (action_obstack): New.
15165 Adjust all dependencies.
15166
77aee789
AD
151672000-10-20 Akim Demaille <akim@epita.fr>
15168
15169 * lib/quote.h (PARAMS): New macro. Use it.
15170
43591cec
AD
151712000-10-16 Akim Demaille <akim@epita.fr>
15172
15173 * src/output.c (output_short_or_char_table): New function.
15174 (output_short_table, output_token_translations): Use it.
15175 (goto_actions): Use output_short_table.
15176
1e9798d5
AD
151772000-10-16 Akim Demaille <akim@epita.fr>
15178
15179 * src/symtab.c (bucket_new): New function.
15180 (getsym): Use it.
15181
15182 * src/output.c (output_short_table): New argument to display the
15183 comment associated with the table.
15184 Adjust dependencies.
15185 (output_gram): Use it.
15186 (output_rule_data): Nicer output layout for YYTNAME.
15187
f282676b
AD
151882000-10-16 Akim Demaille <akim@epita.fr>
15189
15190 * src/lex.c (read_typename): New function.
15191 (lex): Use it.
15192 * src/reader.c (copy_dollar): Likewise.
15193
550a72a3
AD
151942000-10-16 Akim Demaille <akim@epita.fr>
15195
15196 * src/reader.c (copy_comment2): Expect the input stream to be on
15197 the `/' which is suspected to open a comment, instead of being
15198 called after `//' or `/*' was read.
15199 (copy_comment, copy_definition, parse_union_decl, copy_action)
15200 (copy_guard): Adjust.
15201
131e2fef
AD
152022000-10-16 Akim Demaille <akim@epita.fr>
15203
15204 * src/reader.c (parse_expect_decl): Use `skip_white_space' and
15205 `read_signed_integer'.
15206
79282c5a
AD
152072000-10-16 Akim Demaille <akim@epita.fr>
15208
15209 * src/reader.c (copy_dollar): New function.
15210 (copy_guard, copy_action): Use it.
15211
ff4a34be
AD
152122000-10-16 Akim Demaille <akim@epita.fr>
15213
15214 * lib/quote.h, lib/quote.c, lib/quotearg.h, lib/quotearg.c:
15215 * m4/prereq.m4, m4/c-bs-a.m4, m4/mbstate.m4:
15216 New files, from Fileutils 4.0.27.
15217 * src/main.c (printable_version): Remove.
15218 * src/lex.c, src/reader.c: Use `quote'.
15219
152202000-10-04 Akim Demaille <akim@epita.fr>
15221
15222 * lib/error.c, lib/error.h: New files, needed by xmalloc.c.
15223
14ded682
AD
152242000-10-04 Akim Demaille <akim@epita.fr>
15225
15226 * doc/bison.texinfo: Various typos spotted by Neil Booth.
15227
8e03724b
AD
152282000-10-04 Akim Demaille <akim@epita.fr>
15229
15230 When a literal string is used to define two different tokens,
15231 `bison -v' segfaults.
15232 Reported by Piotr Gackiewicz, and fixed by Neil Booth.
15233
15234 * tests/regression.m4: New file.
15235 Include the core of the sample provided by Piotr Gackiewicz.
15236 * src/reader.c (parse_token_decl): Diagnose bad cases, and proceed
15237 properly.
15238
a9e64249
AD
152392000-10-04 Akim Demaille <akim@epita.fr>
15240
15241 * src/reader.c (parse_expect_decl): Keep `count' within the size
15242 of `buffer'.
15243 From Neil Booth.
15244
da9abf43
AD
152452000-10-02 Paul Eggert <eggert@twinsun.com>
15246
15247 * bison.s1 (yyparse): Assign the default value
15248 unconditionally, to avoid a GCC warning and make the parser a
15249 tad smaller.
15250
c33638bb
AD
152512000-10-02 Akim Demaille <akim@epita.fr>
15252
15253 * src/getargs.c (getargs): Don't dump `--help' on unrecognized
15254 options.
15255
444c570a
AD
152562000-10-02 Akim Demaille <akim@epita.fr>
15257
15258 * src/derives.c, src/print.c, src/reduce.c: To ease the
15259 translation, move some `\n' out of the translated strings.
15260
89cab50d
AD
152612000-10-02 Akim Demaille <akim@epita.fr>
15262
15263 The location tracking mechanism is precious for parse error
15264 messages. Nevertheless, it is enabled only when `@n' is used in
15265 the grammar, which is a different issue (you can use it in error
15266 message, but not in the grammar per se). Therefore, there should
15267 be another means to enable it.
15268
15269 * src/getargs.c (getargs): Support `--locations'.
15270 (usage): Report it.
15271 * src/getargs.h (locationsflag): Export it.
15272 * src/lex.c (percent_table): Support `%locations'.
15273 * src/reader.c (yylsp_needed): Remove this variable, now replaced
15274 with `locationsflag'.
15275 * doc/bison.texinfo: Document `--locations' and `%locations'.
15276 Sort the options.
15277 * tests/calc.m4: Test it.
15278
15279 For regularity of the names, replace each
15280 (nolineflag, toknumflag, rawtokenumflag, noparserflag): with...
15281 (no_lineflag, token_tableflag, rawflag, no_parserflag): this.
15282 In addition replace each `flag' with `_flag'.
15283
d6c2cba0
AD
152842000-10-02 Akim Demaille <akim@epita.fr>
15285
15286 Also test parse error messages, including with YYERROR_VERBOSE.
15287
15288 * tests/calc.m4 (calc.y): Add support for `exp = exp' (non
15289 associative).
15290 Use it to check the computations.
15291 Use it to check `nonassoc' is honored.
15292 (AT_DATA_CALC_Y): Equip `calc.y' with YYERROR_VERBOSE when passed
15293 `--yyerror-verbose'.
15294 (_AT_CHECK_CALC): Adjust to this option.
15295 (_AT_CHECK_CALC_ERROR): New macro to check parse error messages.
15296
5a35a6cb
AD
152972000-10-02 Akim Demaille <akim@epita.fr>
15298
15299 Test also `--verbose', `--defines' and `--name-prefix'. Testing
15300 the latter demonstrates a flaw in the handling of non debugging
15301 parsers introduced by myself on 2000-03-16: `#define yydebug 0'
15302 was used in order to simplify:
15303
15304 #if YYDEBUG
15305 if (yydebug)
15306 {
15307 ...
15308 }
15309 #endif
15310
15311 into
15312
15313 if (yydebug)
15314 {
15315 ...
15316 }
15317
15318 unfortunately this leads to a CPP conflict when
15319 `--name-prefix=foo' is used since it produces `#define yydebug
15320 foodebug'.
15321
15322 * src/bison.s1 [!YYDEBUG]: Do not define yydebug.
15323 (YYDPRINTF): New macro.
15324 Spread its use.
15325 * tests/calc.m4 (AT_CHECK_CALC): Do require a title, build it from
15326 the bison options.
15327 Also test `--verbose', `--defines' and `--name-prefix'.
15328
71da9eea
AD
153292000-10-02 Akim Demaille <akim@epita.fr>
15330
15331 Improve the readability of the produced parsers.
15332
15333 * src/bison.s1: Formatting changes.
15334 Improve the comment related to the `$' mark.
15335 (yydefault): Don't fall through to `yyresume': `goto' there.
15336 * src/output.c (output_parser): When the `$' is met, skip the end
15337 of its line.
15338 New variable, `number_of_dollar_signs', to check there's exactly
15339 one `$' in the parser skeleton.
15340
95e36146
AD
153412000-10-02 Akim Demaille <akim@epita.fr>
15342
15343 * lib/xstrdup.c: New file, from the fileutils.
15344 * src/reader.c (parse_token_decl, get_type_name, parse_type_decl)
15345 (parse_assoc_decl, parse_thong_decl, get_type): Use `xstrdup'
15346 instead of strlen + xmalloc + strcpy.
15347 * src/symtab.c (copys): Remove, use xstrdup instead.
15348
d7020c20
AD
153492000-10-02 Akim Demaille <akim@epita.fr>
15350
15351 * src/gram.h (associativity): New enum type which replaces the
15352 former CPP macros `RIGHT_ASSOC', `LEFT_ASSOC' and `NON_ASSOC' with
15353 `right_assoc', `left_assoc' and `non_assoc'.
15354 Adjust all dependencies.
15355 * src/reader.c: Formatting changes.
15356 (LTYPESTR): Don't define it, use it as a literal in
15357 `reader_output_yylsp'.
15358 * src/symtab.h (symbol_class): New enum type which replaces the
15359 former CPP macros `SUNKNOWN', `STOKEN and `SNTERM' with
15360 `sunknown', `stoken and `snterm'.
15361
1916f98e
AD
153622000-10-02 Akim Demaille <akim@epita.fr>
15363
15364 * src/getargs.c (fixed_outfiles): Rename as...
15365 (yaccflag): for consistency and accuracy.
15366 Adjust dependencies.
15367
d7913476
AD
153682000-10-02 Akim Demaille <akim@epita.fr>
15369
15370 Use the more standard files `xalloc.h' and `xmalloc.c' instead of
15371 Bison's `allocate.c' and `alloc.h'. This patch was surprisingly
15372 difficult and introduced a lot of core dump. It turns out that
15373 Bison used an implementation of `xmalloc' based on `calloc', and
15374 at various places it does depend upon the initialization to 0. I
15375 have not tried to isolate the pertinent places, and all the former
15376 calls to Bison's `xmalloc' are now using `XCALLOC'. Someday,
15377 someone should address this issue.
15378
15379 * src/allocate.c, src/alloc.h, m4/bison-decl.m4: Remove.
15380 * lib/xmalloc.c, lib/xalloc.h, m4/malloc.m4, m4/realloc.m4: New
15381 files.
15382 Adjust dependencies.
15383 * src/warshall.h: New file.
15384 Propagate.
15385
340ef489
AD
153862000-10-02 Akim Demaille <akim@epita.fr>
15387
15388 Various anti-`extern in *.c' changes.
15389
15390 * src/system.h: Include `assert.h'.
15391
b2ca4022
AD
153922000-10-02 Akim Demaille <akim@epita.fr>
15393
15394 * src/state.h (nstates, final_state, first_state, first_shift)
15395 (first_reduction): Move their exportation from here...
15396 * src/LR0.h: to here.
15397 Adjust dependencies.
15398 * src/getargs.c (statisticsflag): New variable.
15399 Add support for `--statistics'.
15400 Adjust dependencies.
15401
15402 Remove a lot of now useless `extern' statements in most files.
15403
403b315b
AD
154042000-10-02 Akim Demaille <akim@epita.fr>
15405
15406 * src/LR0.h: New file.
15407 Propagate its use.
15408
07a58c13
AD
154092000-10-02 Akim Demaille <akim@epita.fr>
15410
15411 * src/print.h: New file.
15412 Propagate its use.
15413 * src/print.c: Formatting and ordering changes.
15414 (verbose, terse): Replace with...
15415 (print_results): this new function.
15416 Adjust dependencies.
15417
0619caf0
AD
154182000-10-02 Akim Demaille <akim@epita.fr>
15419
15420 * src/conflicts.c (conflict_report): New function.
15421 (conflict_log, verbose_conflict_log): Replace with...
15422 (print_conflicts): this function.
15423 Adjust dependencies.
15424 * src/conflicts.h: New file.
15425 Propagate its inclusion.
15426
3519ec76
AD
154272000-10-02 Akim Demaille <akim@epita.fr>
15428
15429 * src/nullable.h: New file.
15430 Propagate its inclusion.
15431 * src/nullable.c: Formatting changes.
15432
015acc48
AD
154332000-10-02 Akim Demaille <akim@epita.fr>
15434
15435 * src/reduce.h: New file.
15436 Propagate its inclusion.
15437 * src/reduce.c: Topological sort and other formatting changes.
15438 (bool, TRUE, FALSE): Move their definition to...
15439 * src/system.h: here.
15440
8963a27b
AD
154412000-10-02 Akim Demaille <akim@epita.fr>
15442
15443 * src/files.c: Formatting changes.
15444 (tryopen, tryclose, openfiles): Rename as...
15445 (xfopen, xfclose, open_files): this.
15446 (stringappend): static.
15447 * src/files.h: Complete the list of exported symbols.
15448 Propagate its use.
15449
a70083a3
AD
154502000-10-02 Akim Demaille <akim@epita.fr>
15451
15452 * src/reader.h: New file.
15453 Propagate its use instead of tedious list of `extern' and
15454 prototypes.
15455 * src/reader.c: Formatting changes, topological sort,
15456 s/register//.
15457
abadc117
AD
154582000-10-02 Akim Demaille <akim@epita.fr>
15459
15460 * src/lex.h: Prototype `lex.c' exported functions.
15461 * src/reader.c: Adjust.
15462 * src/lex.c: Formatting changes.
15463 (safegetc): Rename as...
15464 (xgetc): this.
15465
720d742f
AD
154662000-10-02 Akim Demaille <akim@epita.fr>
15467
15468 * src/lalr.h: New file.
15469 Propagate its inclusion instead of prototypes and `extern'.
15470 * src/lalr.c: Formatting changes, topological sorting etc.
15471
f2acea59
AD
154722000-10-02 Akim Demaille <akim@epita.fr>
15473
15474 * src/output.c (token_actions): Introduce a temporary array,
15475 YYDEFACT, that makes it possible for this function to use
15476 output_short_table.
15477
d019d655
AD
154782000-10-02 Akim Demaille <akim@epita.fr>
15479
15480 `user_toknums' is output as a `short[]' in `output.c', while it is
15481 defined as a `int[]' in `reader.c'. For consistency with the
15482 other output tables, `user_toknums' is now defined as a table of
15483 shorts.
15484
15485 * src/reader.c (user_toknums): Be a short table instead of an int
15486 table.
15487 Adjust dependencies.
15488
15489 Factor the short table outputs.
15490
15491 * src/output.c (output_short_table): New function.
15492 * src/output.c (output_gram, output_stos, output_rule_data)
15493 (output_base, output_table, output_check): Use it.
15494
6c89f1c1
AD
154952000-10-02 Akim Demaille <akim@epita.fr>
15496
15497 * src/output.c (output): Topological sort of the functions, in
15498 order to get rid of the `static' prototypes.
15499 No longer use `register'.
15500 * src/output.h: New file.
15501 Propagate its inclusion in files explicitly prototyping functions
15502 from output.c.
15503
d9efd181
AD
155042000-09-21 Akim Demaille <akim@epita.fr>
15505
15506 * src/atgeneral.m4: Update from Autoconf.
15507
c29240e7 155082000-09-21 Akim Demaille <akim@epita.fr>
2fa6973e
AD
15509
15510 * src/closure.h: New file.
15511 * src/closure.c: Formatting changes, topological sort over the
15512 functions, use of closure.h.
15513 (initialize_closure, finalize_closure): Rename as...
15514 (new_closure, free_closure): these. Adjust dependencies.
15515 * src/LR0.c: Formatting changes, topological sort, use of
15516 cloture.h.
15517 (initialize_states): Rename as...
15518 (new_states): this.
15519 * src/Makefile.am (noinst_HEADERS): Adjust.
15520
499daa50
AD
155212000-09-20 Akim Demaille <akim@epita.fr>
15522
15523 * src/acconfig.h: Don't protect config.h against multiple
15524 inclusion.
15525 Don't define PARAMS.
15526 * src/system.h: Define PARAMS.
15527 Remove some of the ad-hoc CPP magic for DOS, VMS etc.: this is the
15528 purpose of config.h. system.h must not try to fix wrong
15529 definitions in config.h.
15530
cc84fd5d
AD
155312000-09-20 Akim Demaille <akim@epita.fr>
15532
15533 * src/derives.h: New file.
15534 * src/main.c, src/derives.h: Use it.
15535 Formatting changes.
15536 * src/Makefile.am (noinst_HEADERS): Adjust.
15537
db5b3a89
AD
155382000-09-20 Akim Demaille <akim@epita.fr>
15539
15540 * tests/atgeneral.m4: Update from Autoconf.
15541 * tests/calc.m4 (_AT_DATA_CALC_Y, AT_DATA_CALC_Y, _AT_CHECK_CALC)
15542 (AT_CHECK_CALC): New macros.
15543 Use these macros to test bison with options `', `--raw',
15544 `--debug', `--yacc', `--yacc --debug'.
15545
ceed8467
AD
155462000-09-19 Akim Demaille <akim@epita.fr>
15547
15548 * src/output.c: Formatting changes.
15549 * src/machine.h: Remove, leaving its contents in...
15550 * src/system.h: here.
15551 Include stdio.h.
15552 Adjust all dependencies on stdio.h and machine.h.
15553 * src/getargs.h: New file.
15554 Let all `extern' declarations about getargs.c be replaced with
15555 inclusion of `getargs.h'.
15556 * src/Makefile.am (noinst_HEADERS): Adjust.
15557
15558 * tests/calc.m4 (yyin): Be initialized in main, not on the global
15559 scope.
15560 (yyerror): Returns void, not int.
15561 * doc/bison.texinfo: Formatting changes.
15562
05a1d24b
AD
155632000-09-19 Akim Demaille <akim@epita.fr>
15564
15565 * tests/calc.m4 (calc.y): Do not assign to stdin, as it's not
15566 portable.
15567
cbd25751
AD
155682000-09-18 Akim Demaille <akim@epita.fr>
15569
15570 * configure.in: Append WARNING_CFLAGS to CFLAGS.
15571 * src/Makefile.am (INCLUDES): Don't.
15572 Be ready to fetch headers in lib/.
15573
13863333
AD
155742000-09-18 Akim Demaille <akim@epita.fr>
15575
15576 * doc/bison.texinfo: Update the copyright.
15577 ANSIfy and GNUify the examples.
15578 Remove the old menu.
15579
0d533154
AD
155802000-09-18 Akim Demaille <akim@epita.fr>
15581
15582 First set of tests: use the `calc' example from the documentation.
15583
15584 * src/bison.s1 (yyparse): Condition the code using `yytname' which
15585 is defined only when YYDEBUG is.
15586 * m4/atconfig.m4 (AT_CONFIG): Adjust to Autoconf 2.13.
15587 * src/files.c (tryopen, tryclose): Formatting changes.
15588 Move to the top and be static.
15589 * src/reader.c (read_signed_integer): Likewise.
15590 * tests/calc.m4: New file.
15591 * Makefile.am, suite.m4: Adjust.
15592 * m4/atconfig.m4: Set BISON_SIMPLE and BISON_HAIRY.
15593
e79137ac
AD
155942000-09-18 Akim Demaille <akim@epita.fr>
15595
15596 Add support for an Autotest test suite for Bison.
15597
15598 * m4/m4.m4, m4/atconfig.m4: New files.
15599 * m4/Makefile.am (EXTRA_DIST): Adjust.
15600 * tests/suite.m4, tests/Makefile.am, tests/atgeneral.m4: New
15601 files.
15602 * src/getargs.c: Display a more standard --version message.
15603 * src/reader.c (reader): Formatting changes.
15604 No longer depend upon VERSION_STRING.
15605 * configure.in: No longer use `dnl'.
15606 Set up the test suite and the new directory `tests/.
15607 (VERSION_STRING): Remove.
15608
27821bff
AD
156092000-04-14 Akim Demaille <akim@epita.fr>
15610
15611 * src/reader.c (copy_comment2): New function, same as former
15612 `copy_comment', but outputs into two FILE *.
15613 (copy_comment): Use it.
15614 (parse_union_decl): Use it.
15615 (get_type, parse_start_decl): Use the same `invalid' message.
15616 (parse_start_decl, parse_union_decl): Use the same `multiple'
15617 message.
15618 (parse_union_decl, copy_guard, copy_action): Use the same
15619 `unmatched' message.
15620 * m4/Makefile.am (EXTRA_DIST): Add `warning.m4'.
15621
cfe5fbc0
AD
156222000-03-31 Akim Demaille <akim@epita.fr>
15623
15624 * src/files.c (tryopen, tryclose): Move to the top.
15625 Be static.
15626
cb7db13e
AD
156272000-03-31 Akim Demaille <akim@epita.fr>
15628
15629 * src/main.c (main): Don't call `done', exit does it.
15630
a0f6b076
AD
156312000-03-31 Akim Demaille <akim@epita.fr>
15632
36281465
AD
15633 * allocate.c: s/return (foo)/return foo/.
15634 * lalr.c: Likewise.
15635 * LR0.c: Likewise.
15636 * output.c: Likewise.
15637 * reader.c: Likewise.
15638 * symtab.c: Likewise.
15639 * vmsgetargs.c: Likewise.
15640
156412000-03-31 Akim Demaille <akim@epita.fr>
15642
15643 Clean up the error reporting functions.
a0f6b076
AD
15644
15645 * src/report.c: New file.
15646 * src/report.h: Likewise.
15647 * src/Makefile.am: Adjust.
15648 * m4/error.m4: New file.
15649 * m4/Makefile.am: Adjust.
15650 * configure.in (jm_PREREQ_ERROR): Call it.
15651 * src/main.c (int_to_string, banner, fatal_banner, warn_banner):
15652 Remove.
15653 (fatal, fatals): Remove. All callers use complain.c::fatal.
15654 (warn, warni, warns, warnss, warnss): Remove. All callers use
15655 complain.c::complain.
15656 (toomany): Remove, use fatal instead.
15657 * src/files.c (done): No argument, use complain_message_count.
15658 * src/main.c (main): Register `done' to `atexit'.
15659
15660 * src/getargs.c (usage): More `fputs', less `fprintf'.
15661
18539825
AD
156622000-03-28 Akim Demaille <akim@epita.fr>
15663
15664 * lib/: New directory.
15665 * Makefile.am (SUBDIRS): Adjust.
15666 * configure.in: Adjust.
15667 (LIBOBJS): Although not used yet, AC_SUBST it, otherwise it's
15668 useless.
15669 * src/alloca.c: Moved to lib/.
15670 * src/getopt.c: Likewise.
15671 * src/getopt1.c: Likewise.
15672 * src/getopt.h: Likewise.
15673 * src/ansi2knr.c: Likewise.
15674 * src/ansi2knr.1: Likewise.
15675 * src/Makefile.am: Adjust.
15676 * lib/Makefile.am: New file.
15677
9f306f2a
AD
156782000-03-28 Akim Demaille <akim@epita.fr>
15679
15680 * src/getargs.c (usage): Refresh the help message.
15681
0ba347b6
AD
156822000-03-17 Akim Demaille <akim@epita.fr>
15683
15684 * src/getopt1.c: Updated from textutils 2.0e
15685 * src/getopt.c: Likewise.
15686 * src/getopt.h: Likewise.
15687
dbe7f271
AD
156882000-03-17 Akim Demaille <akim@epita.fr>
15689
15690 * src/Makefile.am (bison.simple): Fix the awk program: quote only
15691 the file name, not the whole `#line LINE FILE'.
15692
75bbe78d
AD
156932000-03-17 Akim Demaille <akim@epita.fr>
15694
15695 On syntax errors, report the token on which we choked.
15696
aa5fd0ee
AD
15697 * src/bison.s1 (yyparse): In the label yyerrlab, when
15698 YYERROR_VERBOSE, add yychar in msg.
75bbe78d 15699
7b306f52
AD
157002000-03-17 Akim Demaille <akim@epita.fr>
15701
aa5fd0ee 15702 * src/reader.c (copy_at): New function.
7b306f52
AD
15703 (copy_guard): Use it.
15704 (copy_action): Use it.
15705
e87b5700
AD
157062000-03-17 Akim Demaille <akim@epita.fr>
15707
15708 Be kind to translators, save some useless translations.
15709
aa5fd0ee 15710 * src/main.c (banner): New function.
e87b5700
AD
15711 (fatal_banner): Use it.
15712 (warn_banner): Use it.
15713
ae3c3164
AD
157142000-03-17 Akim Demaille <akim@epita.fr>
15715
aa5fd0ee
AD
15716 * src/reader.c (copy_definition): Use copy_string and
15717 copy_comment. Removed now unused `match', `ended',
15718 `cplus_comment'.
ae3c3164
AD
15719 (copy_comment, copy_string): Moved, to be visible from
15720 copy_definition.
15721
4dc58e7c
AD
157222000-03-17 Akim Demaille <akim@epita.fr>
15723
aa5fd0ee
AD
15724 * src/reader.c (copy_string): Declare `static inline'. No
15725 problems with inline, since it is checked by configure.
4dc58e7c
AD
15726 (copy_comment): Likewise.
15727
0a6384c4
AD
157282000-03-17 Akim Demaille <akim@epita.fr>
15729
aa5fd0ee 15730 * src/reader.c (packsymbols): Formatting changes.
0a6384c4 15731
3cef001a
AD
157322000-03-17 Akim Demaille <akim@epita.fr>
15733
aa5fd0ee 15734 * src/reader.c (copy_comment): New function, factored out from:
3cef001a
AD
15735 (copy_action): Use it. Removed now unused `match', `ended',
15736 `cplus_comment'.
15737 (copy_guard): Likewise.
15738
ca36d2ef
AD
157392000-03-17 Akim Demaille <akim@epita.fr>
15740
aa5fd0ee 15741 * src/reader.c (copy_string): New function, factored out from:
ca36d2ef
AD
15742 (copy_action): Use it.
15743 (copy_guard): Likewise.
15744
6666f98f
AD
157452000-03-17 Akim Demaille <akim@epita.fr>
15746
15747 Change the handling of @s so that they behave exactly like $s.
15748 There is now a pseudo variable @$ (readble and writable), location
15749 of the lhs of the rule (by default ranging from the location of
15750 the first symbol of the rhs, to the location of the last symbol,
15751 or, if the rhs is empty, YYLLOC).
15752
15753 * src/bison.s1 [YYLSP_NEEDED] (yyloc): New variable, twin of
15754 yyval.
15755 (yyparse): When providing a default semantic action, provide a
15756 default location action.
15757 (after the $): No longer change `*YYLSP', just stack YYLOC the
15758 same way you stack YYVAL.
15759 * src/reader.c (read_declarations): Use warns.
15760 (copy_guard, case '@'): Also recognize `@$', expanded as `YYLOC'.
15761 (copy_action, case '@'): Likewise.
15762 Use a standard error message, to save useless work from
15763 translators.
15764
41aca2e0
AD
157652000-03-17 Akim Demaille <akim@epita.fr>
15766
aa5fd0ee
AD
15767 * src/bison.s1: Formatting and cosmetics changes.
15768 * src/reader.c: Likewise.
41aca2e0
AD
15769 Update the Copyright notice.
15770
dc08c1d5
AD
157712000-03-17 Akim Demaille <akim@epita.fr>
15772
aa5fd0ee
AD
15773 * src/bison.s1 (#line): All set to `#line' only, since the
15774 Makefile now handles them.
dc08c1d5 15775
9ee3c97b
AD
157762000-03-16 Akim Demaille <akim@epita.fr>
15777
15778 * src/output.c (output_rule_data): Output the documentation of
15779 some of the tables.
15780 (Copyright notice): Update.
15781 Formatting changes.
15782
0de741ca
AD
157832000-03-16 Akim Demaille <akim@epita.fr>
15784
15785 * src/bison.s1 [!YYDEBUG]: Define yydebug to 0. This allows to
15786 remove most `#if YYDEBUG != 0', since `if (yydebug)' is enough.
15787 One `#if YYDEBUG' remains, since it uses variables which are
15788 defined only if `YYDEBUG != 0'.
15789
bb10be54
AD
157902000-03-16 Akim Demaille <akim@epita.fr>
15791
15792 * src/bison.s1 (yyparse): Reorganize the definitions of the stacks
15793 and related variables so that the similarities are highlighted.
15794
b07b484a
AD
157952000-03-16 Akim Demaille <akim@epita.fr>
15796
15797 * src/bison.s1: Properly indent CPP directives.
15798
361f60b3
AD
157992000-03-16 Akim Demaille <akim@epita.fr>
15800
15801 * src/bison.s1: Properly indent the `alloca' CPP section.
15802
8c44d3ec
AD
158032000-03-16 Akim Demaille <akim@epita.fr>
15804
15805 Do not hard code values of directories in `configure.in'.
15806 Update the `configure' tool chain.
15807
15808 * configure.in (XPFILE, XPFILE1, LOCALEDIR): Remove, handled by
15809 src/makefile.am.
15810 (VERSION_STRING): Use the third arg of AC_DEFINE_UNQUOTED.
15811 (AC_OUTPUT): Add m4/Makefile.
15812 Bump to bison 1.28a, 1.29 has never been released.
15813 * acconfig.h (XPFILE, XPFILE1, LOCALEDIR): Remove, since they are
15814 handled via src/Makefile.am.
15815 (VERSION_STRING, PROTOTYPES, ENABLE_NLS, HAVE_CATGETS,
15816 HAVE_GETTEXT, HAVE_LC_MESSAGES, HAVE_STPCPY): Remove, handled by
15817 autoheader.
15818 * Makefile.am (SUBDIRS): Add m4.
15819 (ACLOCAL_AM_FLAGS): New variable.
15820 (AUTOMAKE_OPTIONS): Add check-news.
15821 * src/Makefile.am (bison.simple): Use awk to replace #line lines with
15822 the proper line number and file name.
15823 (DEFS): Propagate the location of bison library files and of the
15824 locale files.
15825 (INCLUDES): Added `-I ..' so that one can compile with srcdir !=
15826 builddir.
15827 * acinclude.m4: Remove, replaced by the directory m4.
15828 * m4/Makefile.am (EXTRA_DIST): New variable.
15829 * m4/gettext.m4: New file, from the fileutils.
15830 * m4/lcmessage.m4: Likewise
15831 * m4/progtest.m4: Likewise.
15832 * m4/bison-decl.m4: New file, extracted from former acinclude.m4.
15833
f95997e7
AD
158342000-03-10 Akim Demaille <akim@epita.fr>
15835
15836 * src/closure.c:
15837 Formatting changes of various comments.
15838 Respect the GNU coding standards at various places.
15839 Don't use `_()' when no translation is needed.
15840
158411999-12-13 Jesse Thilo <jthilo@gnu.org>
15842
15843 * src/files.c:
15844 OS/2 honors TMPDIR environment variable.
15845
158461999-12-13 Jesse Thilo <jthilo@gnu.org>
15847
15848 * doc/bison.texinfo: Tweaked spelling and grammar.
15849 Updated ISBN.
15850 Removed reference to price of printed copy.
15851 Mention BISON_SIMPLE and BISON_HAIRY.
15852
158531999-12-13 Jesse Thilo <jthilo@gnu.org>
15854
15855 * configure.in, NEWS:
15856 Bison 1.29 released.
15857
158581999-10-27 Jesse Thilo <jthilo@gnu.org>
15859
15860 * doc/.cvsignore, doc/Makefile.am, doc/refcard.tex:
15861 Added reference card.
15862
158631999-07-26 Jesse Thilo <jthilo@gnu.org>
15864
15865 * po/ru.po: Added Russian translation.
15866
158671999-07-26 Jesse Thilo <jthilo@gnu.org>
15868
15869 * configure.in: Added Russian translation.
15870
158711999-07-06 Jesse Thilo <jthilo@gnu.org>
15872
15873 * configure.in, NEWS, README:
15874 Released version 1.28.
15875
158761999-06-14 Jesse Thilo <jthilo@gnu.org>
15877
15878 * src/system.h:
15879 Squashed redefinition warning on some systems.
15880
15881 * src/getargs.c, src/Makefile.am, src/reader.c, src/version.c:
15882 Have configure build version string instead of relying on ANSI string
15883 concatentation.
15884
158851999-06-14 Jesse Thilo <jthilo@gnu.org>
15886
15887 * po/POTFILES.in: Got rid of version.c.
15888
158891999-06-14 Jesse Thilo <jthilo@gnu.org>
15890
15891 * acconfig.h, configure.in:
15892 Have configure build version string instead of relying on ANSI string
15893 concatentation.
15894
158951999-06-08 Jesse Thilo <jthilo@gnu.org>
15896
15897 * doc/bison.1:
15898 Dropped mention of `+' for long-named options.
15899
159001999-05-30 Jesse Thilo <jthilo@gnu.org>
15901
15902 * src/files.c: Added <unistd.h> for unlink().
15903
15904 * src/Makefile.am, src/system.h:
15905 I18n fixes.
15906
159071999-05-30 Jesse Thilo <jthilo@gnu.org>
15908
15909 * README: Added a FAQ list.
15910
15911 * configure.in, acconfig.h:
15912 I18n fixes.
15913
159141999-05-30 Jesse Thilo <jthilo@gnu.org>
15915
15916 * doc/FAQ, doc/Makefile.am:
15917 Added a FAQ list.
15918
159191999-05-19 Jesse Thilo <jthilo@gnu.org>
15920
15921 * src/alloc.h, src/symtab.h, src/version.c:
15922 Protected inclusion of "config.h" with HAVE_CONFIG_H.
15923
159241999-04-18 Jesse Thilo <jthilo@gnu.org>
15925
15926 * src/.cvsignore, src/Makefile.am:
15927 Reorganized: sources in `src', documentation in `doc'.
15928
15929 * src/lex.c (literalchar):
15930 fixed the code for escaping double quotes (thanks
15931 Jonathan Czisny.)
15932
159331999-04-18 Jesse Thilo <jthilo@gnu.org>
15934
15935 * po/de.po, po/es.po, po/fr.po, po/nl.po, po/POTFILES.in:
15936 Adjusted paths to reflect directory reorganization.
15937
159381999-04-18 Jesse Thilo <jthilo@gnu.org>
15939
15940 * doc/.cvsignore, doc/Makefile.am:
15941 Reorganized: sources in `src', documentation in `doc'.
15942
159431999-04-18 Jesse Thilo <jthilo@gnu.org>
15944
15945 * configure.in:
15946 Updated AC_INIT file to reflect directory reorganization.
15947
15948 * configure.in, .cvsignore, Makefile.am, POTFILES.in:
15949 Reorganized: sources in `src', documentation in `doc'.
15950
159511999-04-13 Jesse Thilo <jthilo@gnu.org>
15952
15953 * src/allocate.c:
15954 Don't declare calloc() and realloc() if not necessary.
15955
159561999-04-13 Jesse Thilo <jthilo@gnu.org>
15957
15958 * configure.in, acconfig.h, acinclude.m4:
15959 Don't declare calloc() and realloc() if not necessary.
15960
159611999-03-23 Jesse Thilo <jthilo@gnu.org>
15962
15963 * po/.cvsignore: Added i18n support.
15964
159651999-03-23 Jesse Thilo <jthilo@gnu.org>
15966
15967 * acconfig.h, configure.in, Makefile.am:
15968 Added i18n support.
15969
159701999-03-22 Jesse Thilo <jthilo@gnu.org>
15971
15972 * src/bison.s1: Fixed #line numbers.
15973
159741999-03-15 Jesse Thilo <jthilo@gnu.org>
15975
15976 * po/es.po, po/fr.po, po/nl.po, po/de.po:
15977 Added PO files from Translation Project.
15978
159791999-03-03 Jesse Thilo <jthilo@gnu.org>
15980
15981 * Makefile.am:
15982 Added support for non-ANSI compilers (ansi2knr).
15983
159841999-02-16 Jesse Thilo <jthilo@gnu.org>
15985
15986 * configure.in: Bumped version number to 1.27.
15987
15988 * Makefile.am:
15989 Added `bison.simple' to list of files removed by `make distclean'.
15990
159911999-02-12 Jesse Thilo <jthilo@gnu.org>
15992
15993 * src/files.c, src/files.h:
15994 Defined locations of parser files in config.h instead of Makefile.
15995
159961999-02-12 Jesse Thilo <jthilo@gnu.org>
15997
15998 * acconfig.h, acinclude.m4, configure.in, Makefile.am:
15999 Defined locations of parser files in config.h instead of Makefile.
16000
160011999-02-09 Jesse Thilo <jthilo@gnu.org>
16002
16003 * Makefile.am:
16004 Removed inappropriate use of $< macro.
16005
160061999-02-05 Jesse Thilo <jthilo@gnu.org>
16007
16008 * po/Makefile.in.in, po/POTFILES.in:
16009 Add `po' directory skeleton.
16010
160111999-01-27 Jesse Thilo <jthilo@gnu.org>
16012
16013 * README: Document help-bison list.
16014
16015 * configure.in: Add check for mkstemp().
16016
160171999-01-20 Jesse Thilo <jthilo@gnu.org>
16018
16019 * src/conflicts.c, src/LR0.c, src/output.c, src/reader.c:
16020 Hush a few compiler warnings.
16021
16022 * src/files.c:
16023 Add tryclose(), which verifies that fclose was successful.
16024 Hush a couple of compiler warnings.
16025
160261999-01-20 Jesse Thilo <jthilo@gnu.org>
16027
16028 * Makefile.am, OChangeLog:
16029 ChangeLog is now automatically generated. Include the old version as
16030 OChangeLog.
16031
160321999-01-14 Jesse Thilo <jthilo@gnu.org>
16033
16034 * 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:
16035 Update FSF address.
16036
160371999-01-14 Jesse Thilo <jthilo@gnu.org>
16038
16039 * doc/bison.texinfo: Fix formatting glitch.
16040
16041 * doc/bison.texinfo: Update FSF address.
16042
160431999-01-14 Jesse Thilo <jthilo@gnu.org>
16044
16045 * acconfig.h: Update FSF address.
16046
160471999-01-08 Jesse Thilo <jthilo@gnu.org>
16048
16049 * src/system.h:
16050 Don't define PACKAGE here, since config.h defines it.
16051
160521998-12-30 Jesse Thilo <jthilo@gnu.org>
16053
16054 * src/reader.c: Update copyright date.
16055
16056 * src/main.c:
16057 Ditch sprintf to statically-sized buffers in fatal/warn functions in
16058 favor of output directly to stderr (avoids buffer overruns).
16059
16060 * src/reader.c: Some checks for premature EOF.
16061
16062 * 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:
16063 Use prototypes if the compiler understands them.
16064
16065 * src/files.c: Honor TMPDIR on Unix hosts.
16066 Use prototypes if the compiler understands them.
16067
16068 * src/reader.c:
16069 Fix a couple of buffer overrun bugs.
16070 Use prototypes if the compiler understands them.
16071
16072 * src/system.h: Include unistd.h and ctype.h.
16073 Use #ifdef instead of #if for NLS symbols.
16074
160751998-12-30 Jesse Thilo <jthilo@gnu.org>
16076
16077 * doc/bison.texinfo:
16078 Delete comment "consider using @set for edition number, etc..." since
16079 we now are doing so.
16080
160811998-12-30 Jesse Thilo <jthilo@gnu.org>
16082
16083 * configure.in:
16084 Use prototypes if the compiler understands them.
16085
16086 * NEWS: Document 1.26 highlights.
16087
16088 * Makefile.am: Require Automake 1.3 or later.
16089
16090 * acconfig.h:
16091 Use prototypes if the compiler understands them.
16092
160931998-12-29 Jesse Thilo <jthilo@gnu.org>
16094
16095 * src/version.c:
16096 Use VERSION symbol from automake for version number.
16097
160981998-12-29 Jesse Thilo <jthilo@gnu.org>
16099
16100 * acconfig.h, configure.in, version.cin:
16101 Use VERSION symbol from automake for version number.
16102
161031998-11-28 Jesse Thilo <jthilo@gnu.org>
16104
16105 * Makefile.am:
16106 Distribute original version of simple parser (bison.s1), not built
16107 version (bison.simple).
16108
161091998-11-28 Jesse Thilo <jthilo@gnu.org>
16110
16111 * doc/bison.texinfo: Add info dir entry.
16112
16113 * doc/bison.texinfo:
16114 Let automake put version number into documentation.
16115
161161998-11-26 Jesse Thilo <jthilo@gnu.org>
16117
16118 * src/bison.cld, src/build.com, src/vmshlp.mar:
16119 Add non-RCS files from /gd/gnu/bison.
16120
161211998-11-26 Jesse Thilo <jthilo@gnu.org>
16122
16123 * doc/bison.1:
16124 Document the BISON_HAIRY and BISON_SIMPLE variables.
16125
161261998-11-25 Jesse Thilo <jthilo@gnu.org>
16127
16128 * src/version.c: Build version.c automatically.
16129
16130 * src/reader.c:
16131 Fix token numbering (used to start at 258, not 257).
16132
16133 * src/system.h: Include config.h.
16134
16135 * src/getargs.c: Update bug report address.
16136
16137 * src/alloca.c, src/getopt1.c, src/getopt.c, src/getopt.h:
16138 Get latest copies of alloca.c, getopt.c, getopt.h, getopt1.c from gnu.org.
16139
161401998-11-25 Jesse Thilo <jthilo@gnu.org>
16141
16142 * Makefile.am:
16143 Rename bison.simple to bison.s1 (bison.simple is then built from bison.s1).
16144
16145 * configure.in, version.cin:
16146 Build version.c automatically.
16147
16148 * AUTHORS: Add AUTHORS file.
16149
16150 * README: Update bug report address.
16151
16152 * bison.simple:
16153 Rename bison.simple to bison.s1 (bison.simple is then built from bison.s1).
16154
16155 * configure.in, Makefile.am, Makefile.in, stamp-h.in:
16156 Add automake stuff.
16157
161581998-11-25 Jesse Thilo <jthilo@gnu.org>
16159
16160 * doc/bison.texinfo: Clean up some formatting.
16161
161621998-05-05 Richard Stallman <rms@gnu.org>
16163
16164 * doc/bison.texinfo:
16165 Explain better why to make a pure parser.
16166
161671998-01-05 Richard Stallman <rms@gnu.org>
16168
16169 * src/files.c (openfiles):
16170 [_WIN32 && !__CYGWIN32__] Use TEMP or Temp to
16171 find a temporary directory, if possible. Do not unlink files while
16172 they are open.
16173
161741997-08-25 Richard Stallman <rms@gnu.org>
16175
16176 * src/reader.c (stack_offset;):
16177 Change some warni to warns.
16178
16179 * src/lex.c (literalchar): Use warns, not warni.
16180
161811997-06-28 Richard Stallman <rms@gnu.org>
16182
16183 * src/bison.s1: Add a Bison version comment.
16184
16185 * src/main.c (fatal, warn, berror):
16186 Use program_name.
16187
161881997-06-28 Richard Stallman <rms@gnu.org>
16189
16190 * Makefile.in (bison_version): New variable.
16191 (dist): Use that variable.
16192 (bison.s1): Substitute the Bison version into bison.simple.
16193
16194 * bison.simple: Add a Bison version comment.
16195
161961997-06-18 Richard Stallman <rms@gnu.org>
16197
16198 * src/main.c (fatal, warn, berror):
16199 Make error messages standard.
16200 (toomany): Improve error message text.
16201
16202 * 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:
16203 new.h renamed to alloc.h.
16204
162051997-06-18 Richard Stallman <rms@gnu.org>
16206
16207 * Makefile.in: new.h renamed to alloc.h.
16208
162091997-05-24 Richard Stallman <rms@gnu.org>
16210
16211 * src/lex.c (literalchar):
16212 Fix the code for escaping \, " and '.
16213
16214 (lex): Avoid trouble when there are many chars
16215 to discard in a char literal with just several chars in it.
16216
162171997-05-17 Richard Stallman <rms@gnu.org>
16218
16219 * src/bison.s1:
16220 Use malloc, if using alloca is troublesome.
16221 (YYSTACK_USE_ALLOCA): New flag macro.
16222 Define it for some systems and compilers.
16223 (YYSTACK_ALLOC): New macro.
16224 (yyparse): Use YYSTACK_ALLOC to allocate stack.
16225 If it was malloc'd, free it.
16226
162271997-05-17 Richard Stallman <rms@gnu.org>
16228
16229 * bison.simple:
16230 Use malloc, if using alloca is troublesome.
16231 (YYSTACK_USE_ALLOCA): New flag macro.
16232 Define it for some systems and compilers.
16233 (YYSTACK_ALLOC): New macro.
16234 (yyparse): Use YYSTACK_ALLOC to allocate stack.
16235 If it was malloc'd, free it.
16236
162371997-04-23 Richard Stallman <rms@gnu.org>
16238
16239 * src/bison.s1:
16240 (alloca) [__hpux]: Always define as __builtin_alloca.
16241
162421997-04-23 Richard Stallman <rms@gnu.org>
16243
16244 * bison.simple:
16245 (alloca) [__hpux]: Always define as __builtin_alloca.
16246
162471997-04-22 Richard Stallman <rms@gnu.org>
16248
16249 * src/bison.s1:
16250 [__hpux]: Include alloca.h (right for HPUX 10)
16251 instead of declaring alloca (right for HPUX 9).
16252
16253 * src/bison.s1 (__yy_memcpy):
16254 Declare arg `count' as unsigned int.
16255 (yyparse): Cast third arg to __yy_memcpy to unsigned int.
16256
162571997-04-22 Richard Stallman <rms@gnu.org>
16258
16259 * bison.simple:
16260 [__hpux]: Include alloca.h (right for HPUX 10)
16261 instead of declaring alloca (right for HPUX 9).
16262
16263 * bison.simple (__yy_memcpy):
16264 Declare arg `count' as unsigned int.
16265 (yyparse): Cast third arg to __yy_memcpy to unsigned int.
16266
162671997-01-03 Richard Stallman <rms@gnu.org>
16268
16269 * src/allocate.c: [__STDC__ or _MSC_VER]:
16270 Declare calloc and realloc to return void *.
16271
162721997-01-02 Richard Stallman <rms@gnu.org>
16273
16274 * src/system.h:
16275 [_MSC_VER]: Include stdlib.h and process.h.
16276 [_MSC_VER] (getpid): Define as macro--translate it to _getpid.
16277
16278 * src/main.c (main): Return FAILURE as a value.
16279 (printable_version): Declare arg as int, not char.
16280
162811997-01-02 Richard Stallman <rms@gnu.org>
16282
16283 * Makefile.in (dist):
16284 Explicitly check for symlinks, and copy them.
16285
162861996-12-19 Richard Stallman <rms@gnu.org>
16287
16288 * src/files.c:
16289 [_MSC_VER] (XPFILE, XPFILE1): Define, if not already defined.
16290
162911996-12-18 Paul Eggert <eggert@gnu.org>
16292
16293 * src/bison.s1 (yyparse):
16294 If __GNUC__ and YYPARSE_PARAM are both defined,
16295 declare yyparse to have a void * argument.
16296
162971996-12-18 Paul Eggert <eggert@gnu.org>
16298
16299 * bison.simple (yyparse):
16300 If __GNUC__ and YYPARSE_PARAM are both defined,
16301 declare yyparse to have a void * argument.
16302
163031996-12-17 Richard Stallman <rms@gnu.org>
16304
16305 * src/reduce.c (nbits): Add some casts.
16306
163071996-08-12 Richard Stallman <rms@gnu.org>
16308
16309 * src/bison.s1: Test _MSDOS as well as _MSDOS_.
16310
163111996-08-12 Richard Stallman <rms@gnu.org>
16312
16313 * bison.simple: Test _MSDOS as well as _MSDOS_.
16314
163151996-07-31 Richard Stallman <rms@gnu.org>
16316
16317 * src/bison.s1:
16318 [__sun && __i386]: Include alloca.h.
16319
163201996-07-31 Richard Stallman <rms@gnu.org>
16321
16322 * bison.simple:
16323 [__sun && __i386]: Include alloca.h.
16324
163251996-07-30 Richard Stallman <rms@gnu.org>
16326
16327 * src/bison.s1: Comment change.
16328
16329 * src/bison.s1: Test _MSDOS_, not MSDOS.
16330
163311996-07-30 Richard Stallman <rms@gnu.org>
16332
16333 * bison.simple: Comment change.
16334
16335 * bison.simple: Test _MSDOS_, not MSDOS.
16336
163371996-06-01 Richard Stallman <rms@gnu.org>
16338
16339 * 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:
16340 Insert `_' macro around many string constants.
16341
16342 * src/main.c:
16343 Insert `_' macro around many string constants.
16344
16345 (main): Call setlocale, bindtextdomain and textdomain.
16346
16347 * src/system.h: [HAVE_LOCALE_H]: Include locale.h.
16348 [! HAVE_LOCALE_H] (setlocale): Define as no-op.
16349 [ENABLE_NLS]: Include libintl.h.
16350 [ENABLE_NLS] (gettext): Define.
16351 [! ENABLE_NLS] (bintextdomain, textdomain, _): Consolation definitions.
16352 (N_, PACKAGE, LOCALEDIR): New macros.
16353
163541996-06-01 Richard Stallman <rms@gnu.org>
16355
16356 * POTFILES.in: New file.
16357
16358 * Makefile.in (allocate.o):
16359 Define target explicitly.
16360
16361 * Makefile.in (CFLAGS): Set to @CFLAGS@.
16362 (LDFLAGS): Set to @LDFLAGS@.
16363 (configure): Run autoconf only if preceding `cd' succeeds.
16364 (bison.s1): Redirect output to temporary file then move the
16365 temporary to the target, rather than redirecting directly to bison.s1.
16366 (clean): Remove config.status and config.log.
16367 (distclean): Don't remove config.status here.
16368
163691996-05-12 Richard Stallman <rms@gnu.org>
16370
16371 * src/bison.s1:
16372 (__yy_memcpy) [__cplusplus]: Reorder declarations of variables f and t.
16373
163741996-05-12 Richard Stallman <rms@gnu.org>
16375
16376 * bison.simple:
16377 (__yy_memcpy) [__cplusplus]: Reorder declarations of variables f and t.
16378
163791996-05-11 Richard Stallman <rms@gnu.org>
16380
16381 * src/bison.s1 (__yy_memcpy):
16382 Really reorder the args, as was supposedly done on Feb 14 1995.
16383 (yyparse): Calls changed accordingly.
16384
163851996-05-11 Richard Stallman <rms@gnu.org>
16386
16387 * Makefile.in (dist): Don't use $(srcdir).
16388
16389 * bison.simple (__yy_memcpy):
16390 Really reorder the args, as was supposedly done on Feb 14 1995.
16391 (yyparse): Calls changed accordingly.
16392
163931996-01-27 Richard Stallman <rms@gnu.org>
16394
16395 * src/output.c (output_rule_data):
16396 Test YYERROR_VERBOSE in the conditional
16397 around the definition of ttyname.
16398
163991995-12-29 Richard Stallman <rms@gnu.org>
16400
16401 * src/bison.s1:
16402 Fix line numbers in #line commands.
16403
164041995-12-29 Richard Stallman <rms@gnu.org>
16405
16406 * bison.simple:
16407 Fix line numbers in #line commands.
16408
164091995-12-27 Richard Stallman <rms@gnu.org>
16410
16411 * src/bison.s1 (YYPARSE_PARAM_DECL):
16412 In C++, make it always null.
16413 (YYPARSE_PARAM_ARG): New macro.
16414 (yyparse): Use YYPARSE_PARAM_ARG.
16415
164161995-12-27 Richard Stallman <rms@gnu.org>
16417
16418 * bison.simple (YYPARSE_PARAM_DECL):
16419 In C++, make it always null.
16420 (YYPARSE_PARAM_ARG): New macro.
16421 (yyparse): Use YYPARSE_PARAM_ARG.
16422
164231995-11-29 Richard Stallman <rms@gnu.org>
16424
16425 * doc/bison.texinfo:
16426 Describe literal string tokens, %raw, %no_lines, %token_table.
16427
164281995-11-29 Daniel Hagerty <hag@gnu.org>
16429
16430 * doc/bison.texinfo: Fixed update date
16431
164321995-10-16 Richard Stallman <rms@gnu.org>
16433
16434 * src/version.c: Version 1.25.
16435
164361995-10-16 Richard Stallman <rms@gnu.org>
16437
16438 * NEWS: *** empty log message ***
16439
164401995-10-16 Richard Stallman <rms@gnu.org>
16441
16442 * doc/bison.1, doc/bison.rnh:
16443 Add new options.
16444
164451995-10-15 Richard Stallman <rms@gnu.org>
16446
16447 * src/vmsgetargs.c, src/getargs.c:
16448 Added -n, -k, and -raw switches.
16449 (noparserflag, toknumflag, rawtoknumflag): New variables.
16450
16451 * src/symtab.h (SALIAS):
16452 New #define for adding aliases to %token.
16453 (struct bucket): Added `alias' field.
16454
16455 * src/reduce.c (reduce_grammar):
16456 Revise error message.
16457 (print_notices): Remove final `.' from error message.
16458
16459 * src/reader.c (reader_output_yylsp):
16460 New function.
16461 (readgram): Use `#if 0' around code that accepted %command
16462 inside grammar rules: The documentation doesn't allow it,
16463 and it will fail since the %command processors scan for the next %.
16464 (parse_token_decl): Extended the %token
16465 declaration to allow a multi-character symbol as an alias.
16466 (parse_thong_decl): New function.
16467 (read_declarations): Added %thong declarations.
16468 (read_declarations): Handle NOOP to deal with allowing
16469 % declarations as another means to specify the flags.
16470 (readgram): Allow %prec prior to semantics embedded in a rule.
16471 (skip_to_char, read_declarations, copy_definition)
16472 (parse_token_decl, parse_start_decl, parse_type_decl)
16473 (parse_assoc_decl, parse_union_decl, parse_expect_decl)
16474 (get_type_name, copy_guard, copy_action, readgram)
16475 (get_type, packsymbols): Revised most error messages.
16476 Changed `fatal' to `warnxxx' to avoid aborting for error.
16477 Revised and use multiple warnxxx functions to avoid using VARARGS1.
16478 (read_declarations): Improve the error message for
16479 an invalid character. Do not abort.
16480 (read_declarations, copy_guard, copy_action): Use
16481 printable_version to avoid unprintable characters in printed output.
16482 (parse_expect_decl): Error if argument to %expect exceeds 10 digits.
16483 (parse_token_decl, parse_assoc_decl, parse_type_decl, get_type):
16484 Allow the type of a non-terminal can be given
16485 more than once, as long as all specifications give the same type.
16486
16487 * src/output.c:
16488 (output_headers, output_trailers, output, output_gram)
16489 (output_rule_data): Implement noparserflag variable.
16490 Implement toknumflag variable.
16491 (output): Call reader_output_yylsp to output LTYPESTR.
16492
16493 * src/main.c (main):
16494 If reader sees an error, don't process the grammar.
16495 (fatals): Updated to not use VARARGS1.
16496 (printable_version, int_to_string, warn, warni, warns, warnss)
16497 (warnsss): New error reporting functions. Avoid abort for error.
16498
16499 * src/lex.h:
16500 Added THONG and NOOP for alias processing.
16501 Added SETOPT for the new code that allows setting options with %flags.
16502
16503 * src/lex.c:
16504 Include getopt.h. Add some extern decls.
16505 (safegetc): New function to deal with EOF gracefully.
16506 (literalchar); new function to deal with reading \ escapes.
16507 (lex): Use literalchar.
16508 (lex): Implemented "..." tokens.
16509 (literalchar, lex, parse_percent_token): Made tokenbuffer
16510 always contain the token. This includes growing the token
16511 buffer while reading an integer.
16512 (parse_percent_token): Replaced if-else statement with percent_table.
16513 (parse_percent_token): Added % declarations as another
16514 way to specify the flags -n, -l, and -r. Also added hooks for
16515 -d, -k, -y, -v, -t, -p, -b, -o, but implementation requires
16516 major changes to files.c.
16517 (lex) Retain in the incoming stream a character following
16518 an incorrect '/'.
16519 (skip_white_space, lex): Revised most error messages
16520 and changed fatal to warn to avoid aborting.
16521 (percent_table): Added %thong declarations.
16522
16523 * src/gram.h: Comment changes.
16524
16525 * src/files.c (openfiles, open_extra_files, done):
16526 Add faction flag
16527 and actfile file. Handle noparserflag. Both for -n switch.
16528
16529 * src/conflicts.c (resolve_sr_conflict):
16530 Remove use of alloca.
16531
165321995-06-01 Jim Meyering <meyering@gnu.org>
16533
16534 * doc/bison.texinfo: *** empty log message ***
16535
165361995-05-06 Richard Stallman <rms@gnu.org>
16537
16538 * src/bison.s1: Comment change.
16539
165401995-05-06 Richard Stallman <rms@gnu.org>
16541
16542 * bison.simple: Comment change.
16543
165441995-05-03 Richard Stallman <rms@gnu.org>
16545
16546 * src/version.c: Version now 1.24.
16547
16548 * src/bison.s1: Change distribution terms.
16549
16550 * src/version.c: Version now 1.23.
16551
165521995-05-03 Richard Stallman <rms@gnu.org>
16553
16554 * doc/bison.texinfo:
16555 Rewrite "Conditions for Using Bison".
16556 Update version to 1.24.
16557
165581995-05-03 Richard Stallman <rms@gnu.org>
16559
16560 * bison.simple: Change distribution terms.
16561
165621995-02-23 Richard Stallman <rms@gnu.org>
16563
16564 * src/files.c: Test __VMS_POSIX as well as VMS.
16565
165661995-02-14 Jim Meyering <meyering@gnu.org>
16567
16568 * src/bison.s1 (__yy_memcpy):
16569 Renamed from __yy_bcopy to avoid
16570 confusion. Reverse FROM and TO arguments to be consistent with
16571 those of memcpy.
16572
165731995-02-14 Jim Meyering <meyering@gnu.org>
16574
16575 * bison.simple (__yy_memcpy):
16576 Renamed from __yy_bcopy to avoid
16577 confusion. Reverse FROM and TO arguments to be consistent with
16578 those of memcpy.
16579
165801994-11-10 David J. MacKenzie <djm@gnu.org>
16581
16582 * NEWS: reformat
16583
16584 * NEWS: New file.
16585
16586 * Makefile.in (DISTFILES): Include NEWS.
16587
16588 * Makefile.in (DISTFILES):
16589 Include install-sh, not install.sh.
16590
16591 * configure.in: Update to Autoconf v2 macro names.
16592
165931994-10-05 David J. MacKenzie <djm@gnu.org>
16594
16595 * Makefile.in: fix typo
16596
16597 * Makefile.in (prefix, exec_prefix):
16598 Let configure set them.
16599
166001994-09-28 David J. MacKenzie <djm@gnu.org>
16601
16602 * Makefile.in: Set datadir to $(prefix)/share.
16603
166041994-09-15 Richard Stallman <rms@gnu.org>
16605
16606 * src/bison.s1:
16607 Update copyright notice and GPL version.
16608
166091994-09-15 Richard Stallman <rms@gnu.org>
16610
16611 * bison.simple:
16612 Update copyright notice and GPL version.
16613
166141994-07-12 Richard Stallman <rms@gnu.org>
16615
16616 * src/reduce.c, src/reader.c:
16617 entered into RCS
16618
166191994-05-05 David J. MacKenzie <djm@gnu.org>
16620
16621 * Makefile.in: entered into RCS
16622
166231994-03-26 Richard Stallman <rms@gnu.org>
16624
16625 * src/bison.s1: entered into RCS
16626
166271994-03-26 Richard Stallman <rms@gnu.org>
16628
16629 * bison.simple: entered into RCS
16630
166311994-03-25 Richard Stallman <rms@gnu.org>
16632
16633 * src/main.c: entered into RCS
16634
166351994-03-24 Richard Stallman <rms@gnu.org>
16636
16637 * src/conflicts.c: entered into RCS
16638
166391994-01-02 Richard Stallman <rms@gnu.org>
16640
16641 * Makefile.in: *** empty log message ***
16642
166431993-11-21 Richard Stallman <rms@gnu.org>
16644
16645 * src/bison.s1: *** empty log message ***
16646
166471993-11-21 Richard Stallman <rms@gnu.org>
16648
16649 * doc/bison.texinfo: entered into RCS
16650
16651 * doc/bison.texinfo: *** empty log message ***
16652
166531993-11-21 Richard Stallman <rms@gnu.org>
16654
16655 * bison.simple: *** empty log message ***
16656
166571993-10-25 David J. MacKenzie <djm@gnu.org>
16658
16659 * doc/bison.texinfo: *** empty log message ***
16660
166611993-10-19 Richard Stallman <rms@gnu.org>
16662
16663 * src/bison.s1: *** empty log message ***
16664
166651993-10-19 Richard Stallman <rms@gnu.org>
16666
16667 * bison.simple: *** empty log message ***
16668
166691993-10-14 Richard Stallman <rms@gnu.org>
16670
16671 * src/bison.s1: *** empty log message ***
16672
166731993-10-14 Richard Stallman <rms@gnu.org>
16674
16675 * bison.simple: *** empty log message ***
16676
166771993-09-14 David J. MacKenzie <djm@gnu.org>
16678
16679 * doc/bison.texinfo: *** empty log message ***
16680
166811993-09-13 Noah Friedman <friedman@gnu.org>
16682
16683 * Makefile.in: *** empty log message ***
16684
166851993-09-10 Richard Stallman <rms@gnu.org>
16686
16687 * src/conflicts.c: *** empty log message ***
16688
16689 * src/system.h: entered into RCS
16690
166911993-09-10 Richard Stallman <rms@gnu.org>
16692
16693 * doc/bison.1: entered into RCS
16694
166951993-09-06 Noah Friedman <friedman@gnu.org>
16696
16697 * src/version.c: entered into RCS
16698
166991993-09-06 Noah Friedman <friedman@gnu.org>
16700
16701 * Makefile.in: *** empty log message ***
16702
167031993-07-30 David J. MacKenzie <djm@gnu.org>
16704
16705 * Makefile.in: *** empty log message ***
16706
167071993-07-24 Richard Stallman <rms@gnu.org>
16708
16709 * src/bison.s1: *** empty log message ***
16710
167111993-07-24 Richard Stallman <rms@gnu.org>
16712
16713 * bison.simple: *** empty log message ***
16714
167151993-07-08 David J. MacKenzie <djm@gnu.org>
16716
16717 * Makefile.in: *** empty log message ***
16718
167191993-07-04 Richard Stallman <rms@gnu.org>
16720
16721 * src/bison.s1: *** empty log message ***
16722
167231993-07-04 Richard Stallman <rms@gnu.org>
16724
16725 * bison.simple: *** empty log message ***
16726
167271993-06-26 David J. MacKenzie <djm@gnu.org>
16728
16729 * src/getargs.c: entered into RCS
16730
167311993-06-26 David J. MacKenzie <djm@gnu.org>
16732
16733 * doc/bison.texinfo: *** empty log message ***
16734
16735 * doc/bison.1: New file.
16736
167371993-06-25 Richard Stallman <rms@gnu.org>
16738
16739 * src/getargs.c: New file.
16740
167411993-06-16 Richard Stallman <rms@gnu.org>
16742
16743 * src/bison.s1: *** empty log message ***
16744
167451993-06-16 Richard Stallman <rms@gnu.org>
16746
16747 * bison.simple: *** empty log message ***
16748
167491993-06-03 Richard Stallman <rms@gnu.org>
16750
16751 * src/bison.s1: New file.
16752
167531993-06-03 Richard Stallman <rms@gnu.org>
16754
16755 * doc/bison.texinfo: *** empty log message ***
16756
167571993-06-03 Richard Stallman <rms@gnu.org>
16758
16759 * bison.simple: New file.
16760
167611993-05-19 Richard Stallman <rms@gnu.org>
16762
16763 * doc/bison.texinfo: New file.
16764
167651993-05-07 Noah Friedman <friedman@gnu.org>
16766
16767 * Makefile.in: *** empty log message ***
16768
167691993-04-28 Noah Friedman <friedman@gnu.org>
16770
16771 * src/reader.c: *** empty log message ***
16772
167731993-04-23 Noah Friedman <friedman@gnu.org>
16774
16775 * src/alloc.h: entered into RCS
16776
167771993-04-20 David J. MacKenzie <djm@gnu.org>
16778
16779 * src/version.c: *** empty log message ***
16780
16781 * src/files.c, src/allocate.c:
16782 entered into RCS
16783
16784 * src/reader.c: *** empty log message ***
16785
16786 * src/lex.c: entered into RCS
16787
16788 * src/conflicts.c: New file.
16789
16790 * src/symtab.c: entered into RCS
16791
16792 * src/alloc.h: New file.
16793
16794 * src/LR0.c: entered into RCS
16795
167961993-04-18 Noah Friedman <friedman@gnu.org>
16797
16798 * src/reader.c: New file.
16799
16800 * src/version.c: *** empty log message ***
16801
168021993-04-18 Noah Friedman <friedman@gnu.org>
16803
16804 * Makefile.in: *** empty log message ***
16805
168061993-04-17 Noah Friedman <friedman@gnu.org>
16807
16808 * Makefile.in: *** empty log message ***
16809
168101993-04-15 Richard Stallman <rms@gnu.org>
16811
16812 * src/main.c, src/files.c:
16813 New file.
16814
168151993-04-15 Noah Friedman <friedman@gnu.org>
16816
16817 * configure.in: entered into RCS
16818
16819 * configure.in: *** empty log message ***
16820
16821 * configure.in: New file.
16822
168231993-04-14 Richard Stallman <rms@gnu.org>
16824
16825 * Makefile.in: New file.
16826
168271993-04-13 Richard Stallman <rms@gnu.org>
16828
16829 * src/version.c: New file.
16830
168311993-03-25 Richard Stallman <rms@gnu.org>
16832
16833 * src/output.c: entered into RCS
16834
168351992-09-25 Richard Stallman <rms@gnu.org>
16836
16837 * configure.bat: entered into RCS
16838
168391992-06-22 Richard Stallman <rms@gnu.org>
16840
16841 * src/vmsgetargs.c: entered into RCS
16842
168431992-06-22 Richard Stallman <rms@gnu.org>
16844
16845 * doc/bison.rnh: entered into RCS
16846
168471992-04-20 David J. MacKenzie <djm@gnu.org>
16848
16849 * README: entered into RCS
16850
168511992-01-22 Richard Stallman <rms@gnu.org>
16852
16853 * src/machine.h: entered into RCS
16854
168551991-12-21 Richard Stallman <rms@gnu.org>
16856
16857 * src/lalr.c, src/closure.c:
16858 entered into RCS
16859
168601991-12-20 Richard Stallman <rms@gnu.org>
16861
16862 * src/state.h: entered into RCS
16863
168641991-12-18 Richard Stallman <rms@gnu.org>
16865
16866 * src/print.c, src/nullable.c, src/derives.c:
16867 entered into RCS
16868
168691991-11-03 David J. MacKenzie <djm@gnu.org>
16870
16871 * src/warshall.c, src/types.h, src/symtab.h, src/lex.h, src/gram.c, src/gram.h, src/files.h:
16872 entered into RCS
16873
168741988-09-09 Richard Stallman <rms@gnu.org>
16875
16876 * src/bison.hairy: entered into RCS
16877
168781987-12-16 Richard Stallman <rms@gnu.org>
16879
16880 * REFERENCES: entered into RCS
dc546b0f 16881
f294a2c2 16882
04098407 16883 -----
f294a2c2 16884
04098407 16885 Copyright (C) 1987, 1988, 1991, 1992, 1993, 1994, 1995, 1996,
e2a21b6f
PE
16886 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free
16887 Software Foundation, Inc.
f294a2c2 16888
04098407
PE
16889 Copying and distribution of this file, with or without
16890 modification, are permitted provided the copyright notice and this
16891 notice are preserved.
e9071366
AD
16892
16893$Id$